neoice
asked on
Running phpinfo displays a blank page
Hi,
I have installed SLES 10 SP2 with the 'webserver' custom config. All appears to have gone well. If i type http://localhost in the browser it says 'it works!' - however I seem to ahve a problem with PHP 5. if I create a file called phpinfo.php with the following information in it:
<? php phpinfo(); ?>
and store it in /srv/www/htdocs.
I then type http://localhost/phpinfo.php and it simply displays a blank page.
If I store other HTML pages in HTDOCS they work fine, it just seems to be a problem with php.
I have also added index.php to the 'directoryIndex' line in httpd.conf.
Can somebody explain what is wrong and how I should fix it?
I have tried researching the matter but it is getting very confusing as Apache2 locations seem to vary depending on OS.
I have installed SLES 10 SP2 with the 'webserver' custom config. All appears to have gone well. If i type http://localhost in the browser it says 'it works!' - however I seem to ahve a problem with PHP 5. if I create a file called phpinfo.php with the following information in it:
<? php phpinfo(); ?>
and store it in /srv/www/htdocs.
I then type http://localhost/phpinfo.php and it simply displays a blank page.
If I store other HTML pages in HTDOCS they work fine, it just seems to be a problem with php.
I have also added index.php to the 'directoryIndex' line in httpd.conf.
Can somebody explain what is wrong and how I should fix it?
I have tried researching the matter but it is getting very confusing as Apache2 locations seem to vary depending on OS.
What does the apache error log say? Not sure on SLES, but on Debian based systems its in /var/log/apache/error.log. Yours might be /var/log/httpd.log or something like that. Usually if php or any plugin has problems, it reports it there.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Torimar - thanks for the assistance.
Grrr - after all this time it was a 'blank space' - DOH!
Grrr - after all this time it was a 'blank space' - DOH!
ASKER
Torimar,
On reflection, I did not get a parse error or any error for that matter - just a blank page. Do I need to set something in the pHP.ini file to display such an error message?
Cheers
On reflection, I did not get a parse error or any error for that matter - just a blank page. Do I need to set something in the pHP.ini file to display such an error message?
Cheers
I must admit I am not quite sure which setting is responsible for this error report.
On checking my php.ini file, it has all the default values set as explained here:
http://www.addedbytes.com/php/php-ini-guide-error-handling-and-logging/
On checking my php.ini file, it has all the default values set as explained here:
http://www.addedbytes.com/php/php-ini-guide-error-handling-and-logging/