cliftonbazaar Posted September 5, 2011 Share Posted September 5, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/246443-php-works-on-test-server-but-not-production/ Share on other sites More sharing options...
Pikachu2000 Posted September 5, 2011 Share Posted September 5, 2011 Judging solely from the error message, it looks like short_open_tags is On in the php.ini file, and there's no space between the open tag and 'error_reporting'. Quote Link to comment https://forums.phpfreaks.com/topic/246443-php-works-on-test-server-but-not-production/#findComment-1265524 Share on other sites More sharing options...
cliftonbazaar Posted September 6, 2011 Author Share Posted September 6, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/246443-php-works-on-test-server-but-not-production/#findComment-1265879 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.