php pages sometimes empty

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
pelos
Forum Newbie
Posts: 2
Joined: Thu Mar 23, 2006 2:15 pm

php pages sometimes empty

Post by pelos »

I have a strange problem on a sun server with php with apache. After installing the php, the php pages I am trying to put up sometimes display OK, but sometimes result in an empty page with the source
<html><body></body></html>

It is very strange, when one hits reload a number of times, sometimes the two states (empty page or real page) alternate.

There are no errors in apache error log files and the access log shows an OK transfer. I tried firefox and explorer on windows, firefox on linux, and links on linux, and all behave the same, so I dont think it's a browser. I tried many php scripts, last attempts were with the simple file shown below:
<html>
<body>
<?php echo("Hello world!<br>"); ?>
Done...
</body>
</html>

But errors were always the same, it didn't even show "Done...", which is not in a php block. All pages work fine on another linux server that has apache with php. HTML works without a problem on the server.

Anyone had a similar problem? Any ideas about a solution or ways I could test the system to identify the problem? I'd appreciate any help.

Btw, here's the phpinfo file address, if you want to try it. Does the same thing-sometimes it will work sometimes it will give you a blank page.
http://www.cs.umsl.edu/phpinfo.php
CyberSpatium
Forum Newbie
Posts: 21
Joined: Thu Mar 20, 2003 12:23 pm
Contact:

Post by CyberSpatium »

Are you saving your php files with an html extention? Doing so will cause php to not work unless apache is configured to parce php from html files. Save all php files with php extention.
pelos
Forum Newbie
Posts: 2
Joined: Thu Mar 23, 2006 2:15 pm

Post by pelos »

No, of course php pages have php extension (like the one I listed above). HTML pages work well, PHP pages return blank page most of the time (but not sometimes).
Post Reply