Code gives blank page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
St8ic
Forum Newbie
Posts: 16
Joined: Thu Dec 09, 2004 10:40 pm

Code gives blank page

Post by St8ic »

Apache
PHP5 (and 4)
Trustix Linux (and OpenBSD)
Safemod off
phpinfo(); works perfectly

I've tried three different PHP scripts on two different versions of PHP and two different operating systems. No matter what, my PHP scripts return a blank page. Do you have any ideas?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

I have seen that happen when there is a fatal error in the script. I can't remember how to fix it, but you may want to change error reporting to E_ALL and see if that helps.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

what happens when you put this into its own file

Code: Select all

<?php

echo 'i was output using echo';

?>
<br>
i was output directly
it should work perfectly if phpinfo() worked.


like said above, you prob have an error in your script, and dont get an eror because you turned error_reporting or display_errors off,
St8ic
Forum Newbie
Posts: 16
Joined: Thu Dec 09, 2004 10:40 pm

Post by St8ic »

That code (the echo test) worked just like it should.

The strangest thing is that "error_reporting = E_ALL"!

Thanks for the replies, and sorry for being to general.
St8ic
Forum Newbie
Posts: 16
Joined: Thu Dec 09, 2004 10:40 pm

Post by St8ic »

I had display_errors off. I turned it on, fixed the error, but I still have one problem.

I can't make directories (it says permission denied). Is there an option in php.ini that I could change, or do I have to chmod the directory?
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

the directory which your are trying to write to must be writable, whether your trying to make a file, or a new directory inside it.

in my experience, if safemode is on, you cant make a directory inside a directory that was created w/ php

eg
mkdir('foo'); // ok
mkdir('foo/bar'); // denied
Post Reply