mktime() usage resulting in infinite loop
I'm using PHP 5.3 and I'm using ajax requests to execute parts of the php program in the background.
So far it all functioned without problems until I wanted to update a database coloumn with the current timestamp to avoid multiple entries there with the same value.

Suddenly I ran into infinite loops that even went on longer than the 30 secs timeout for php I had configured.
After testing a bit I saw that the root of this evil lay in the execution of the mktime command, thus:

    $value=mktime();
resulted in an infinite loop (as above it just went on and on for over 5 mins until the ajax request itself aborted) while

    $value=rand(0,90000);
functionted as I had expected and set the value to a random number between 0 and 90000. 

I've used mktime() before without any problems in normal php routines (non ajaxexecuted).
So I'm wondering if that is a general ajax bug and if this is the case if there is a workaround
as I'm sure I'll need to set the current time/date in the near future in my current project.

Tnx for all help!



mktime() usage resulting in infinite loop
===

I'm using PHP 5.3 and I'm using ajax requests to execute parts of the php program in the background.
So far it all functioned without problems until I wanted to update a database coloumn with the current timestamp to avoid multiple entries there with the same value.

Suddenly I ran into infinite loops that even went on longer than the 30 secs timeout for php I had configured.
After testing a bit I saw that the root of this evil lay in the execution of the mktime command, thus:

    $value=mktime();
resulted in an infinite loop (as above it just went on and on for over 5 mins until the ajax request itself aborted) while

    $value=rand(0,90000);
functionted as I had expected and set the value to a random number between 0 and 90000. 

I've used mktime() before without any problems in normal php routines (non ajaxexecuted).
So I'm wondering if that is a general ajax bug and if this is the case if there is a workaround
as I'm sure I'll need to set the current time/date in the near future in my current project.

Tnx for all help!


