Weird PHP problem - scripts won't work

mattboston

Member
Aug 29, 2003
15
0
151
I'm running the following
WHM 11.2.0 cPanel 11.10.0-R16448
CENTOS Enterprise 4.5 x86_64 - WHM X v3.1.0

[[email protected] www]# php -v
PHP 5.1.6 (cli) (built: Aug 28 2007 13:50:42)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies

The problem I'm having is really weird and I've used Apache Update to recompile with different versions of php. 5.1.6 seems the most stable.

When someone adds a new php file to their public_html folder, and they browse to it they get a Premature end of script headers, they can hit refresh any number of times and it's the same error. But if they wait 5 or so minutes, the script seems to work fine.

Anyone know why this is happening?

thanks
-matt
 

mattboston

Member
Aug 29, 2003
15
0
151
Does anyone know what's going on? I can post more information about the server if you let me know what you need to see.
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,133
1
168
New York
Does anyone know what's going on? I can post more information about the server if you let me know what you need to see.
Can YOU reliably reproduce this error each and every time or is it users reporting this error?.

Can you access the error log for this account to see if the server is adding any helpful info to it at the time the php is accessed?.

Oddly it sounds like some kind of caching issue, but I cant think of anything that would cause this. I have heard of this kind of error when uploading a php in binary mode from a pc or if a user mistakenly adds a // to the end or something but that would either fail each time or not at all.

If you can take out the Zend Optimizer temporarily see if that clears up this weird error.
 

mattboston

Member
Aug 29, 2003
15
0
151
Can YOU reliably reproduce this error each and every time or is it users reporting this error?.

Can you access the error log for this account to see if the server is adding any helpful info to it at the time the php is accessed?.

Oddly it sounds like some kind of caching issue, but I cant think of anything that would cause this. I have heard of this kind of error when uploading a php in binary mode from a pc or if a user mistakenly adds a // to the end or something but that would either fail each time or not at all.

If you can take out the Zend Optimizer temporarily see if that clears up this weird error.
Yes, I can reproduce with every user on the system. Every time a new php file is created it does this and fixes itself 5 - 10 minutes later. It's not a binary/ascii problem, because I've even created files through vi and it does it.

I'll try taking Zend out and see what that does. I've tried removing IonCube and that doesn't make a difference.
 

mattboston

Member
Aug 29, 2003
15
0
151
could it be that new php files are getting created as chmod 775? I just changed to 755 and they seemed to work fine.