phpinfo.php returns blank page.

netboss99
netboss99 used Ask the Experts™
on
As the subject says, phpinfo.php returns a blank page.

Contents of phpinfo.php

<? phpinfo(); ?>


OS = FreeBSD (x86)

Partial results of server-status = "Server Version: Apache/2.2.3 (FreeBSD) mod_ssl/2.2.3 OpenSSL/0.9.7e-p1 DAV/2 PHP/5.2.10 with Suhosin-Patch"

Contents of PHP Log
[17-Jul-2009 20:33:46] PHP Warning:  Module 'pcre' already loaded in Unknown on line 0

php.ini file attached

INTERESTINGLY another php program, and installer for CubeCart runs and displays the following

CubeCart Requirements Test
Not AvailableIoncube Loader:
Not AvailableZend Optimizer:
Version 2GD Image Library:
5.2.10PHP e 4.3.0:
5.1.34MySQL e 4.1.0:
CubeCart v4 will not run on your server without either Zend Optimizer or Ioncube


PHP Configuration
EnabledZip:
2Mupload_max_filesize:
Installer

I'm assigning 500 points to this because all the answers in the database are incomplete and do not lead to a resolution.  I would think this would be fairly straightforward for someone experienced in PHP (which I am not) to lead one through the debug process, but the answers I have found indicate it must be quite complex.
php.ini.txt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2008

Commented:
Try using complete PHP start tag:

<?php phpinfo(); ?>
try

<?php  phpinfo(); ?>

Author

Commented:
To both gamebits and cxr,

I don't think you read my entire post.  The third line shows the contents of phpinfo.php which as far as I can tell is exactly the suggestion you posted.  I cut and pasted the contents of the file so that there would be no typo errors in my question.

Do you see something in the contents of the phpinfo.php file that I am missing?
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Top Expert 2008
Commented:
There is a difference. You had this:

<? phpinfo(); ?>

...we suggest you use this:

<?php  phpinfo(); ?>

>> Do you see something in the contents of the phpinfo.php file that I am missing?

You are missing this: short_open_tag = On

...but you should rather use complete PHP start tags: <?php  ?>
No it is not, may I did not understood your question but you start by saying phpinfo return a blank page and you show the content of phpinfo.php, we are cxr and myself saying use the full php tag opener <?php not the abreviated one <? that you use in your phpinfo page.

Author

Commented:
OOPS, dyslexia kicked in.  I offer my apologies.

Tried <?php  phpinfo(); ?> and it worked .

Funny thing I downloaded my copy of phpinfo.php from some "php site" and did not alter it.  Probably a lot of other people got program from same site having same frustration.

I'm going to split the points (I think I can do that).  I would like to know what "<?php  phpinfo(); ?>"  and "...but you should rather use complete PHP start tags: <?php  ?>" means.  I'm not trying to program in php but just trying to get a php application running.  My next post will ask additional questions based upon the results of running phpinfo.php and the applications install program.

Author

Commented:
Dang, I'm really blowing it.

Correct to last post.  Should read

What does "You are missing this: short_open_tag = On" not what does "<?php  phpinfo(); ?>" mean?
cxr will probably be faster than me on this but in your php.ini file there is an option

short_open_tag = On

which can be on or off, if it's on you can use <? no problem if it's off you need <?php you should always use <?php because than you are not dependant of the server configuration if you export the script to another server.

Author

Commented:
Thanks for great explanations.  My first question has been a much better experience than searching database of previous answers.

I'm awarding split points.  Please watch for my next question which I will post in 10 mins or so.  Need time to get all info together.

Author

Commented:
Thanks!!!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial