phpinfo() not working
Moderator: General Moderators
phpinfo() not working
Hi all,
I had to uninstall PHP5 and install PHP4. Stupid I know, but my code needs to run on PHP4.
Anyhow, my .php file is not working and phpinfo() shows an empty page.
I am using Apache 2.2.11 and I even tried to reinstall that.
I'll really appreciate any help!!
thanks,
Kimberly
I had to uninstall PHP5 and install PHP4. Stupid I know, but my code needs to run on PHP4.
Anyhow, my .php file is not working and phpinfo() shows an empty page.
I am using Apache 2.2.11 and I even tried to reinstall that.
I'll really appreciate any help!!
thanks,
Kimberly
Re: phpinfo() not working
Did you follow all the instructions?
Re: phpinfo() not working
Thanks for the link.
Do you think the instructions will work for downgrading 5 to 4?
thanks,
Kimberly
Re: phpinfo() not working
You're uninstalling PHP 5 and installing PHP 4, right? So it's not really a downgrade, just a fresh installation of an older version.
Re: phpinfo() not working
Hi!
Thanks for telling me to RTFM LOL!
I've now followed the instructions to the letter.
Apache wouldnt start, so I reinstalled Apache.
When I add these lines as per instructions, Apache still wont start:
LoadModule php4_module "c:/PHP/php4apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/PHP/"
It did complain during the installation about this: PHPIniDir
If I comment out those lines, Apache starts but ofcourse phpInfo() is still a blank page.
Thanks again for any advice.
regards,
Kimberly
Thanks for telling me to RTFM LOL!
I've now followed the instructions to the letter.
Apache wouldnt start, so I reinstalled Apache.
When I add these lines as per instructions, Apache still wont start:
LoadModule php4_module "c:/PHP/php4apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/PHP/"
It did complain during the installation about this: PHPIniDir
If I comment out those lines, Apache starts but ofcourse phpInfo() is still a blank page.
Thanks again for any advice.
regards,
Kimberly
Re: phpinfo() not working
httpd.exe: Syntax error on line 488 of C:\Program Files\Apache Group\Apache2.2\conf:
Cannot load C:/PHP/php4apache2.dll into server: The procedure could not be found.
Note the errors or messages above, and press the <ESC> key to exit.
I promise you, the file is there!

Are they supposed to be forward-slashes?
also, I added c:\php into the system path.
Cannot load C:/PHP/php4apache2.dll into server: The procedure could not be found.
Note the errors or messages above, and press the <ESC> key to exit.
I promise you, the file is there!
Are they supposed to be forward-slashes?
also, I added c:\php into the system path.
Re: phpinfo() not working
Make sure you're using the right file.Here is a list of server modules shipped with PHP 4 and PHP 5: ...
* sapi/php4apache2.dll (php5apache2.dll) - Apache 2.0.x module.
* sapi/php5apache2_2.dll - Apache 2.2.x module.
Re: phpinfo() not working
and for Apache 2.2.x with PHP4?
The doc says php4apache2.dll which I copied from the sapi directory into c:\php
But it doesnt find it.
The doc says php4apache2.dll which I copied from the sapi directory into c:\php
But it doesnt find it.
Re: phpinfo() not working
Hi,
I still cant get Apache to start with the load module.
If I used the suggested CGI lines in httpd.conf:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
# For PHP 4
Action application/x-httpd-php "/php/php.exe"
Then Apache will start but when I try to access the page with my phpInfo() in it, I get this:
You don't have permission to access /php/php.exe/hello.php on this server.
Please help?
I still cant get Apache to start with the load module.
If I used the suggested CGI lines in httpd.conf:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
# For PHP 4
Action application/x-httpd-php "/php/php.exe"
Then Apache will start but when I try to access the page with my phpInfo() in it, I get this:
You don't have permission to access /php/php.exe/hello.php on this server.
Please help?
Re: phpinfo() not working
No, it doesn't say that.kimberly wrote:and for Apache 2.2.x with PHP4?
The doc says php4apache2.dll which I copied from the sapi directory into c:\php
But it doesnt find it.
Read this again.
There's no mention of PHP 4 and Apache 2.2. Which is good, because PHP 4 is too old and they've been telling us to upgrade for a few years now.Here is a list of server modules shipped with PHP 4 and PHP 5: ...
* sapi/php4apache2.dll (php5apache2.dll) - Apache 2.0.x module.
* sapi/php5apache2_2.dll - Apache 2.2.x module.
Unless you need something that only CGI-mode offers, go with the module version.
Re: phpinfo() not working
Are you saying that Apache 2.2 wont work with PHP4??
Now I need to downgrade Apache???!
I need PHP4 to match the server the code will be running on.
thanks again for the replies.
Now I need to downgrade Apache???!
I need PHP4 to match the server the code will be running on.
thanks again for the replies.
Re: phpinfo() not working
Correct.kimberly wrote:Are you saying that Apache 2.2 wont work with PHP4??
Note: Apache 2.2.x Support
Users of Apache 2.2.x may use the documentation below except the appropriate DLL file is named php5apache2_2.dll and it only exists as of PHP 5.2.0. See also http://snaps.php.net/
Re: phpinfo() not working
thanks for your replies
Re: phpinfo() not working
I've just installed Apache 2.0.58 and I have the same result.
Re: phpinfo() not working
- Are you using PHP as a CGI program or as a module?
- What error messages are you getting?
- And post the httpd.conf and any .htaccess stuff you used to configure PHP.
- What error messages are you getting?
- And post the httpd.conf and any .htaccess stuff you used to configure PHP.