Jump to content

New Apache 2.2/PHP5 - Old php code results in empty document in browser?


Recommended Posts

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.

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?

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.

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?

<?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...

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.

 

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.

 

:-\

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.