Re: PHP Script/Thread ID thingie
| From: | Jochem Maas | Date: | Tue, 19 Aug 2008 13:52:36 +0000 |
| Subject: | Re: PHP Script/Thread ID thingie | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278326@lists.php.net to get a copy of this message | ||
Herman Gomez schreef:
Jochem Maas wrote:....ceo@l-i-e.com schreef:I'm logging things with error_log, and would like to be able to sort out one script run from another. So I'm looking for some kind of "script id" or "thread id" or "PHP script run execution ID" type of function. getmypid() just returns the same apache child process ID all the time, so that's not what I want.
d'oh ... looking back at the code I was thinking of I actually used the session ID!Following the wrapper idea, you can use the session ID. It's unique per user, no matter if they share the thread some times.
Regards, Herman