Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Running phpinfo displays a blank page

Posted on 2009-04-10
5
1,592 Views
Last Modified: 2012-05-06
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.

0
Comment
Question by:neoice
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:Morne Lategan
ID: 24119819
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.
0
 
LVL 35

Accepted Solution

by:
torimar earned 500 total points
ID: 24120942
<? php phpinfo(); ?>

Is that the exact contents of your file?
It will produce a parse error.

There should be no blank space between the '?' and 'php', i.e.:
<?php phpinfo(); ?>
0
 

Author Closing Comment

by:neoice
ID: 31569042
Torimar - thanks for the assistance.
Grrr - after all this time it was a 'blank space' - DOH!
0
 

Author Comment

by:neoice
ID: 24121115
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

0
 
LVL 35

Expert Comment

by:torimar
ID: 24121147
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/
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to get maximum transfer speed over LAN 4 104
How code a 301 redirect for folder files -> 1 file 2 58
linux SFTP 8 60
Samba 4, Users Permission, 5 44
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question