Yori Posted June 1, 2008 Share Posted June 1, 2008 I just installed Apache 2.2 and PHP 5, they appear to be working fine, phpinfo() returns just fine... but when I try to use some old user handling code, all I get is a blank empty document. I can't find where it's placing the errors for the PHP, if there was one, nor can I figure out why it's doing this when this is code I used prior on a web host and it worked great. I'd be glad to drop the code to a pastehere for the accesscontrol.php and login.php if needed. Though, getting the errors to output to the web document would be helpful as well if that's possible. Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/ Share on other sites More sharing options...
trq Posted June 1, 2008 Share Posted June 1, 2008 Have you set error_reporting to E_ALL and enabled display_errors in your php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-554923 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 yes Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-554925 Share on other sites More sharing options...
trq Posted June 1, 2008 Share Posted June 1, 2008 Then it is likely a fatal error. Have you looked at the apache error logs? Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-554926 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 Nothing relating to PHP in the Apache2.2\logs\error.log Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-554928 Share on other sites More sharing options...
PFMaBiSmAd Posted June 1, 2008 Share Posted June 1, 2008 It is either likely that the php.ini that you are changing is not the one that php is using or you did not stop and start your web server to get changes made to php.ini to take effect. Post your code, as this could be something like short open tags <? What do you see when you do a "view source" of the blank page in your browser? Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-554953 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 http://75.150.35.182/phpinfo.php - http://www.pastehere.com/?bstuun accesscontrol.php - http://www.pastehere.com/?abnuqg login.php - http://www.pastehere.com/?eswyps http://75.150.35.182/login.php Comcast is having timeout issues local to me, so pulling it up may timeout. Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-554960 Share on other sites More sharing options...
wildteen88 Posted June 1, 2008 Share Posted June 1, 2008 Strange! PHP is reading your php.ini (which is C:/program files/php/php.ini) according to phpinfo display_errors is enabled too and error_reporting is set to 6143 (E_ALL) yet no errors are displayed. accesscontrol.php is working as it redirects me to login.php. Its login.php that does not outut anything. The issue I have is that you have register_globals enabled, but it appears your script replys on register globals to function. I do not recommend you to rely on register_globals in your scripts. It is depreciated and is being removed as of PHP6. I also see you have compiled PHP yourself for some reason. Why is this? PHP comes pre-compiled for Windows. Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555000 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 Yeah, I know about the globals bit. And I didn't compile PHP, it's the .msi binary installer off of the php site. Any clue why login.php returns nothing? Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555011 Share on other sites More sharing options...
PFMaBiSmAd Posted June 1, 2008 Share Posted June 1, 2008 Post your code Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555018 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 *cough* I did, look at the www.pastehere.com links :-\ Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555021 Share on other sites More sharing options...
wildteen88 Posted June 1, 2008 Share Posted June 1, 2008 Do you get any output if yo change: <?php include_once("survconfig.php"); $TheDB = dbConnect($dbsurv); to <?php echo 'Starting Login.php'; include_once("survconfig.php"); echo '<br /> include srvconfig.php'; $TheDB = dbConnect($dbsurv); echo '<br />Call dbConnect...'; What is in servconfig.php too? Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555027 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 That's the database userid, password, host, and schema. Similair to what you see in most things that connect to db's. Seperates it out so I can stash it somewhere else. Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555034 Share on other sites More sharing options...
wildteen88 Posted June 1, 2008 Share Posted June 1, 2008 Do you get any output after the changes I suggested for login.php? Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555037 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 <?php $dbhost = "x.x.x.x:x"; $dbname = "x"; $dbpass = "x"; $dbsurv = "x"; function dbConnect($db="") { global $dbhost, $dbname, $dbpass; $ThisDB = @mysql_connect($dbhost, $dbname, $dbpass) or die("Could Not Connect To Database!! Oh No!!".mysql_error()); if ($db!="" and !@mysql_select_db($db, $ThisDB)) die("Bad! Bad! Can't open the right DB! Bad!!!".mysql_error()); return $ThisDB; } ?> And it doesn't give the echo after that :-\ The db info is all right, and I can connect to the db computer fine from the apache server computer... Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555045 Share on other sites More sharing options...
wildteen88 Posted June 1, 2008 Share Posted June 1, 2008 Remove the @ symbols from infront of mysql_connect and mysql_select_db function calls The @ suppresses errors. Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555054 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\survconfig.php on line 12 :-\ Followed the instructions on this: http://us3.php.net/manual/en/mysql.installation.php And still get that error. Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555066 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 Did a change option on php install and put all of the extensions in to try to get php_mysql.dll working as it came with the installer, and now I get [notice] Parent: child process exited with status 3221225477 -- Restarting. :-\ Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555076 Share on other sites More sharing options...
Yori Posted June 1, 2008 Author Share Posted June 1, 2008 eww... the install makes all the extensions installed. After commenting out all of them except php_mysql.dll, it works. Thanks :-) Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555086 Share on other sites More sharing options...
wildteen88 Posted June 1, 2008 Share Posted June 1, 2008 I recommend you to add PHP to PATH. ALso read this thread Quote Link to comment https://forums.phpfreaks.com/topic/108254-new-apache-22php5-old-php-code-results-in-empty-document-in-browser/#findComment-555125 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.