Maximum execution time on php script with no actual code...

Maximum execution time on php script with no actual code...

am 25.01.2008 00:38:41 von Andrew Weaver

Hi there, we have a site which is totally static hosted on a server
which is totally dynamic and database driven on IIS 6.0 on Windows 2003
Standard Edition. I've been getting these errors in my PHP logs about the
maximum execution time being exceeded on pages which are simply included
html files (with php extensions)

for example, we have a file called main.php, it has no dynamic code in it
but it fails with the 'maximum execution time' error a few times a day, i've
never had this issue in apache on linux before.

Can anyone give me some advice on what to look for? i noticed that raising
the maximum execution time doesnt do anything but change the number logged
in the php.log for the number which was exceeded.

I'm running php as an asapi filter.

thanks,
-Drew

Re: Maximum execution time on php script with no actual code...

am 25.01.2008 01:38:03 von David Wang

On Jan 24, 3:38=A0pm, "Andy" wrote:
> =A0 =A0 Hi there, we have a site which is totally static hosted on a serve=
r
> which is totally dynamic and database driven on IIS 6.0 on Windows 2003
> Standard Edition. I've been getting these errors in my PHP logs about the
> maximum execution time being exceeded on pages which are simply included
> html files (with php extensions)
>
> for example, we have a file called main.php, it has no dynamic code in it
> but it fails with the 'maximum execution time' error a few times a day, i'=
ve
> never had this issue in apache on linux before.
>
> Can anyone give me some advice on what to look for? i noticed that raising=

> the maximum execution time doesnt do anything =A0but change the number log=
ged
> in the php.log for the number which was exceeded.
>
> I'm running php as an asapi filter.
>
> thanks,
> -Drew


This sounds like a PHP bug to me.

IIS never has such problems with static HTML that's loaded with
ASP.DLL, so this is not a performance problem with IIS or static files

To me, the only common link here is PHP -- which may be "cross
platform", but it is hardly comparable on different platforms.

FYI: Depending on the PHP version, their ISAPI implementation for IIS
is really, really bad -- PHP will run single threaded and single
instanced, like the CGI version. PHP wouldn't run in a performant way
(which wouldn't have these "maximum execution time" errors) with
asynchronous IO because the various PHP user libraries that you may
use are not thread safe and thus randomly crash.

Of course, end users don't know/care about these details and would
just say "PHP is not stable on IIS -- use Apache because it seems to
work". And I would agree -- if you want to use PHP, use Apache --
because obviously Open Source does not care about scratching the
"itch" to run PHP on IIS.

The alternative is to use something like ASP.Net, which is light years
ahead of PHP and superior on IIS. Most PHP developers secretly want to
use ASP.Net if it didn't come from Microsoft.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: Maximum execution time on php script with no actual code...

am 25.01.2008 03:12:15 von Andrew Weaver

"David Wang" wrote in message
news:de94ba21-48cc-45b0-86ea-ebf839afdd25@n22g2000prh.google groups.com...
On Jan 24, 3:38 pm, "Andy" wrote:
> Hi there, we have a site which is totally static hosted on a server
> which is totally dynamic and database driven on IIS 6.0 on Windows 2003
> Standard Edition. I've been getting these errors in my PHP logs about the
> maximum execution time being exceeded on pages which are simply included
> html files (with php extensions)
>
> for example, we have a file called main.php, it has no dynamic code in it
> but it fails with the 'maximum execution time' error a few times a day,
> i've
> never had this issue in apache on linux before.
>
> Can anyone give me some advice on what to look for? i noticed that raising
> the maximum execution time doesnt do anything but change the number logged
> in the php.log for the number which was exceeded.
>
> I'm running php as an asapi filter.
>
> thanks,
> -Drew


This sounds like a PHP bug to me.

IIS never has such problems with static HTML that's loaded with
ASP.DLL, so this is not a performance problem with IIS or static files

To me, the only common link here is PHP -- which may be "cross
platform", but it is hardly comparable on different platforms.

FYI: Depending on the PHP version, their ISAPI implementation for IIS
is really, really bad -- PHP will run single threaded and single
instanced, like the CGI version. PHP wouldn't run in a performant way
(which wouldn't have these "maximum execution time" errors) with
asynchronous IO because the various PHP user libraries that you may
use are not thread safe and thus randomly crash.

Of course, end users don't know/care about these details and would
just say "PHP is not stable on IIS -- use Apache because it seems to
work". And I would agree -- if you want to use PHP, use Apache --
because obviously Open Source does not care about scratching the
"itch" to run PHP on IIS.

The alternative is to use something like ASP.Net, which is light years
ahead of PHP and superior on IIS. Most PHP developers secretly want to
use ASP.Net if it didn't come from Microsoft.

----------------

Actually, barring everything you said about IIS I find most of the
comments you said about PHP to be totally and completely ridiculous.
In fact, if "every PHP developer secretly had an ASP.NET fetish" why would
microsoft had invested so much money in making (mainly) PHP work so well
with IIS 7 (FastCGI)?

I was going to move the sites to server 2008 next month when it is released
but I guess it'll be Redhat like all of our other servers.

Thanks,
-Drew

Re: Maximum execution time on php script with no actual code...

am 25.01.2008 06:42:15 von David Wang

On Jan 24, 6:12=A0pm, "Andy" wrote:
> "David Wang" wrote in message
>
> news:de94ba21-48cc-45b0-86ea-ebf839afdd25@n22g2000prh.google groups.com...
> On Jan 24, 3:38 pm, "Andy" wrote:
>
>
>
>
>
> > Hi there, we have a site which is totally static hosted on a server
> > which is totally dynamic and database driven on IIS 6.0 on Windows 2003
> > Standard Edition. I've been getting these errors in my PHP logs about th=
e
> > maximum execution time being exceeded on pages which are simply included=

> > html files (with php extensions)
>
> > for example, we have a file called main.php, it has no dynamic code in i=
t
> > but it fails with the 'maximum execution time' error a few times a day,
> > i've
> > never had this issue in apache on linux before.
>
> > Can anyone give me some advice on what to look for? i noticed that raisi=
ng
> > the maximum execution time doesnt do anything but change the number logg=
ed
> > in the php.log for the number which was exceeded.
>
> > I'm running php as an asapi filter.
>
> > thanks,
> > -Drew
>
> This sounds like a PHP bug to me.
>
> IIS never has such problems with static HTML that's loaded with
> ASP.DLL, so this is not a performance problem with IIS or static files
>
> To me, the only common link here is PHP -- which may be "cross
> platform", but it is hardly comparable on different platforms.
>
> FYI: Depending on the PHP version, their ISAPI implementation for IIS
> is really, really bad -- PHP will run single threaded and single
> instanced, like the CGI version. PHP wouldn't run in a performant way
> (which wouldn't have these "maximum execution time" errors) with
> asynchronous IO because the various PHP user libraries that you may
> use are not thread safe and thus randomly crash.
>
> Of course, end users don't know/care about these details and would
> just say "PHP is not stable on IIS -- use Apache because it seems to
> work". And I would agree -- if you want to use PHP, use Apache --
> because obviously Open Source does not care about scratching the
> "itch" to run PHP on IIS.
>
> The alternative is to use something like ASP.Net, which is light years
> ahead of PHP and superior on IIS. Most PHP developers secretly want to
> use ASP.Net if it didn't come from Microsoft.
>
> ----------------
>
> =A0 =A0 Actually, barring everything you said about IIS I find most of the=

> comments you said about PHP to be totally and completely ridiculous.
> In fact, if "every PHP developer secretly had an ASP.NET fetish" why would=

> microsoft had invested so much money in making (mainly) PHP work so well
> with IIS 7 (FastCGI)?
>
> I was going to move the sites to server 2008 next month when it is release=
d
> but I guess it'll be Redhat like all of our other servers.
>
> Thanks,
> -Drew- Hide quoted text -
>
> - Show quoted text -



My comments about PHP came from my direct first-hand conversation with
the developers of PHP themselves at various conferences, so I firmly
stand by them.

As for why Microsoft invests in making PHP work well with IIS7?
Consider this:
1. You do not deny that there is the proverbial Open Source "itch" to
run PHP on IIS. It has been there for a long, long time. However, no
one in Open Source is motivated to scratch that itch... I speculate it
is because the *nix bias tells them to run it on Apache and *nix since
it's "easy"
2. ASP.Net, ASP, and PHP are the largest application platforms right
now, so it makes good business sense to have them all be supported
well. Java is a different case because Sun essentially sued to get
Java off of Windows.
3. Microsoft wants #2 to happen on Windows, hence it is scratching the
itch and investing in FastCGI
4. Compare against what *nix platform supports -- mainly PHP, Java,
Perl/Ruby. ASP/ASP.Net is hardly well supported on *nix.

If I can make an observation here -- it seems that Microsoft Windows
is making a better business proposition to support whatever you want
to use as your application platform. Versus any other *nix vendor,
which does not support all the major application platforms. Can you
say "lock-in"?

Now, I do have to remind you that you said your test of PHP was as an
ISAPI on IIS6 -- which is clearly not comparable to PHP as FastCGI on
IIS7 -- so I do not think you have made an apples-to-apples
comparison.

Thus, I do not think you ever planned to move the websites to Windows
Server 2008 -- you're not making valid comparisons to make such a
decision.

And if you are trying to imply that my "ridiculous comments" make you
lean towards Redhat -- I am sorry that your opinions are so easily
swayed because I have nothing to apologize for -- I am telling you my
first hand experience, so you can take it or leave it.

Besides, I'd rather you use servers which take advantage of your
comfortable skill set. I hardly want to see you struggle with Windows
Server and be unhappy with how poorly your application platform
supports it because you'd unjustly blame Windows Server. I just want
to make it clear that if you see problems with PHP serving static
files, that would be a PHP problem... because ASP is just another
ISAPI on Windows and it has no such problems. Why should PHP ISAPI?

I only want to know that your ear is open to discussion in the future
when you do want to see how much better things can be with ASP.Net and
Windows Server 2008. Or if you think that PHP/Apache is better, I want
to know what specific features/behaviors make you think that way.

In the end, I want to know what is in *your* best interest. Which is
different than Open Source, which tends to do things in a *general*
best interest -- which clearly works against you if you are not
interested in what most people want.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//