homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

PHP Fatal Error, Unknown in Line 0
PHP Fatal Error, Unknown in Line 0

 11:51 am on Sep 6, 2003 (gmt 0)

I moved my DocumentRoot (and <directory /> ) in apache from




And suddenly started getting this error (in the apache error log):

[Sat Sep 06 08:40:32 2003] [error] [client] PHP Fatal error: Unable to open c:\DIR1\SUBDIR/phppage.php in Unknown on line 0

This is really baffling me - any help would be really appreciated! It used to work and now it doesn't...

I even tried changing the doc_root setting in the php.ini file (in C:\WINDOWS\) but again without any luck




 10:59 pm on Sep 6, 2003 (gmt 0)

try using / in your path, or enclosing it all in " "
c:/dir1 or "c:\dir1"


 8:26 am on Sep 7, 2003 (gmt 0)

Nope, still no luck.

The funny thing is it use to work OK and it works OK if I put it back to


Apache is fine, but any php pages come back blank and create the entry above in the apache error log.

.... There must be a setting I'm missing somewhere.

Yours desperately

Josh :'(


 8:40 am on Sep 7, 2003 (gmt 0)

Bizarrely, PHP files in the deeper, older directory are still working!
(i.e. [localhost...] works ok whereas [localhost...] does not - but it does if I move my apache document root back to c:\DIR1\DIR2)

I have changed my %SYSTEMROOT%/php.ini file to the following:

; The root of the PHP pages, used only if nonempty.
doc_root = "c:\DIR1"

And I've since turned errors on and off in this file and those changes took effect so it must have read in this change too...

So confused!


 8:32 am on Sep 8, 2003 (gmt 0)

silly question... you don't have a sneaky .htaccess throwing a spanner in the works of one or other directory do you?


 8:52 am on Sep 8, 2003 (gmt 0)

What a gumpty!

I was trying to access a .php page that didn't exist. I was sure I'd copied my example.php file over but obviously not... strange though because instead of getting a 404 I just got a blank page and the strange PHP error in the Apache Error Log.

I'm really quite embarrassed.... oops.

Can I stop it doing this and make it go back to fiving me a nice 404 if the php page doesn't exist?

Yours apologetically,


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved