Re: PHP script won't run in the background

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 30, 2011 at 01:01:48PM +0100, richard gray wrote:

> >You need a bit more info, get a backtrace with 'where'.
> Thanks for the response Alain - below is the output:-

Ah, much more useful .....

> [rich@LeMans] (/Web/scripts)> gdb --pid=3294
> GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug  8 20:32:45 
> UTC 2011)
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "x86_64-apple-darwin".
> /Web/scripts/3294: No such file or directory
> Attaching to process 3294.
> Reading symbols for shared libraries . done
> Reading symbols for shared libraries 
> ................................................................................................................................................ 
> done
> Reading symbols for shared libraries + done
> 0x00007fff8f8ac7ee in __ioctl ()
> (gdb) where
> #0  0x00007fff8f8ac7ee in __ioctl ()
> #1  0x00007fff8f8ac1fe in ioctl ()
> #2  0x00007fff910a6b1c in tcsetattr ()

OK - it is setting tty modes as I suspected.

> #3  0x000000010ab05df7 in tty_end ()
> #4  0x000000010ab05c39 in tty_init ()
> #5  0x000000010aaf7261 in el_init ()
> #6  0x000000010aafeb8e in rl_initialize ()
> #7  0x000000010a3ef39a in zm_startup_readline ()

This is the readline routine ... probably setting the tty to raw mode, thus the tcsetattr() above.

Look at the link below, it is how your CLI version of PHP is compiled:

	http://www.php.net/manual/en/readline.installation.php

readline is mentioned as part of CLI:

	http://www.php.net/manual/en/features.commandline.usage.php

> #8  0x000000010a37a1c8 in zend_startup_module_ex ()
> #9  0x000000010a38166b in zend_hash_apply ()
> #10 0x000000010a37d3dd in zend_startup_modules ()
> #11 0x000000010a3287bf in php_module_startup ()
> #12 0x000000010a3ef637 in php_cli_startup ()

This is done BEFORE your script starts - so nothing that you can do to stop it.

> #13 0x000000010a3efff8 in main ()

Try the daemonize that I wrote about a few minutes ago.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux