Jump to content

PHP works on test server but not production


cliftonbazaar

Recommended Posts

I have tested my code and got it working but when it was uploaded to my web host of godaddy.com it suddenly stops working on one page; it literally comes up a blank page, the page source is completely empty as well.

 

the code on the page is

<?PHP
session_start();
include("../functions/common.php");
$sqldb = open_database();  //Open the database
include("../functions/create_game.php");  #This is the actual game creation code
header('Location:'.$_SESSION['web_site'].'/home.php');  //Go back to the home page
?>

 

first thing I did was put error code reporting in

<?PHP
error_reporting( E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR );
ini_set ('display_errors', '1');

session_start();
include("../functions/common.php");
$sqldb = open_database();  //Open the database
include("../functions/create_game.php");  #This is the actual game creation code
header('Location:'.$_SESSION['web_site'].'/home.php');  //Go back to the home page
?>

The test server the code still worked fine but on the production server it gave me

Fatal error: Call to undefined function PHPerror_reporting() in /home/content/74/8039674/html/testcricketmanager.com/gameplay/challenge.php on line 1

 

Out of frustration I put

<BR>1
<?PHP
#error_reporting( E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR );
#ini_set ('display_errors', '1');
echo "<br>2";
/*	session_start();
include("../functions/common.php");
$sqldb = open_database();  //Open the database
include("../functions/create_game.php");  #This is the actual game creation code
header('Location:'.$_SESSION['web_site'].'/home.php');  //Go back to the home page*/
?>
<BR>3

 

and the output was

1

3

 

James

 

NOTE: All the code works fine on the test server (at home on a Linux box); production server (godaddy) the PHP code works on each page except this one :(

Link to comment
Share on other sites

Have tested this more and the problem seems to be comments

<?php
session_start();
include("../functions/common.php");
$sqldb = open_database();
include("../functions/create_game.php");
header('Location:'.$_SESSION['web_site'].'/home.php');  //Go back to the home page
?>

works fine but

<?php
session_start();  
include("../functions/common.php");  #Get all the functions that we need
$sqldb = open_database();  #Open the database
include("../functions/create_game.php");  #Create the game, this is the most important file
header('Location:'.$_SESSION['web_site'].'/home.php');  //Go back to the home page
?>

doesn't!!  :'(  I have been working on this for over an hour and it is only this one file (I have comments all over my files).

Wether I use the # character or // it doesn't work in this file :(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.