Page 1 of 1

php stops executing scripts!?!?

Posted: Tue Aug 29, 2006 8:33 am
by dastudios
I'm not sure whats going wrong here.
My friend downloaded and installed XAMPP - works fine. No problems at all. But as soon as a certain number of php files exist in a directory, they refuse to execute.

No errors, just they don't get parsed by php, all it outputs is the source code of the php file.

Anyone had this problem before, or have some idea whats going wrong? Anything at all would be appreciated.

Posted: Tue Aug 29, 2006 8:37 am
by Obadiah
what folder do you have your files in? i placed all my content in the htdocs folder....that should work fine....how many files arte in the folder thats not executing...are you just linking from page to page?

Posted: Tue Aug 29, 2006 8:41 am
by dastudios
Yes they are in htdocs. There are currently 19 files in the directory and at least 2 files that dont get executed by php. I am just linking from page to page.

Thanks for your fast response though.

EDIT: some files get sent postdata as well. I did once experience this before, which back then the project was small enough for me to compile it all into one single php file.. but this one is much to big to do that kind of thing.

Posted: Tue Aug 29, 2006 8:50 am
by Obadiah
ok...what do you mean by not executing...do you get a page cannot be displayed...do you see the code in the window....what happens when you follow the link?

Posted: Tue Aug 29, 2006 8:52 am
by dastudios
I get sent the source code of the php script - either the page is blank or the browser makes out what it can of the static html inside the php. When I "view source" of the page I can see the raw php script. Not only is it annoying its also a security risk.

Posted: Tue Aug 29, 2006 9:02 am
by RobertGonzalez
So at what number of files does apache stop processing PHP scripts?

Posted: Tue Aug 29, 2006 9:02 am
by Obadiah
try this....try going on another computer and seeing if the same thing happens...if it does....i would move all my stuff outside of the htdocs folder then uninstall and reinstall then restart your server and/or pc....ill look into this a little more for you...i have xampp but i never ran into this problem myself but...ill definately look into it for ya

Posted: Thu Aug 31, 2006 4:35 am
by dastudios
Ok, I just downloaded xampp, installed it on my computer. EXACTLY the same problem.... same files causing the problem too.

This is crazy!

Posted: Thu Aug 31, 2006 4:40 am
by dastudios
AH! I THINK I MAY HAVE IT!

Does the encoding of the file make a difference? I re-saved one of the files that was causing trouble using notepad, selected ANSI encoding instead of UTF-8... and now it seems to work.

thanks so far!

Posted: Thu Aug 31, 2006 8:10 am
by feyd
As long as there's no BOM injected by the UTF-8 encoding, PHP can handle it fine, that I recall. However with the BOM, you will run into issues with headers, cookies and the like.