[PHP] Re: [Bulk] Re: [PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-13 Thread Jean-Pierre Arneodo
Ashley Sheridan a écrit : On Thu, 2009-06-11 at 20:52 +0200, Jean-Pierre Arneodo wrote: Ashley Sheridan a écrit : On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. A

[PHP] Re: [Bulk] Re: [PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Jean-Pierre Arneodo
Ashley Sheridan a écrit : On Thu, 2009-06-11 at 10:47 +, Jean-Pierre Arneodo wrote: Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 20:06

[PHP] Why [?php while (true) { sleep(5); } ?] dies on CLI?

2009-06-11 Thread Jean-Pierre Arneodo
Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script. Any idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7 2009 20:06:36) Linux ubuntu 2.6.24-19-server #1 SMP Wed Jun 18 14:44:47 UTC 2008 x86_64 GNU/Linux Conf [php.ini] max_

[PHP] Best method to detect Apache, IIS, or CLI?

2003-06-05 Thread Jean-Pierre Arneodo
Hi, what is the best method to detect if a php script is started into Apache, IIS or in a CLI script? I've found several issues, but I am not sure to be right. * CLI: - PHP_SELF='-' - var $argv, $argc exist - constant STDIN, STDOUT, STDERR exist * http server: - PHP_SELF != '-' for ever - $ar

[PHP] $a=1.2; // $a is rounded to 1 Why?

2002-11-05 Thread Jean-Pierre Arneodo
Hi, double variables are rounded as integer but GetType is 'double' $a=10.2; echo get_cfg_var('precision'); // print 14 echo ini_get('precision'); // print 14 echo GetType($a); // print double echo $a; // print 10 I use php 4.1.2 / apache 1.3.24 but I have tried to upgrade to 4.2.3 without succe

[PHP] foreach, side effect or good behaviour?

2002-09-23 Thread Jean-Pierre Arneodo
Hi, $a=1; $b=&$a; foreach(array(2,3) as $b); echo "a=$a"; // Print a=3 Is it the behaviour expected in a foreach loop? JP ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com --

[PHP] PhpMyAdmin and PHP4.2.* Too many I/Os

2002-09-10 Thread Jean-Pierre Arneodo
Hi, I have some troubles with PhpMyAdmin and PHP4.2.* I experimented these couples of installations: PhpMyAdmin / PHP 2.2.6 / 4.1.2 2.2.7pl1 / 4.1.2 2.3.0 / 4.1.2 2.2.6 / 4.2.1 2.2.7pl1 / 4.2.1 2.3.0 / 4.2.1 2.2.6 / 4.2.3 2.2.7pl1 / 4.2.3 2.3.0 / 4.2.3 with MySQL v3.23.49 on RedHat7.2 PhpMyAdmin

[PHP] Is the $this variable affectation authorized (clean enough)?

2002-03-22 Thread Jean-Pierre Arneodo
Hi, is the $this variable affectation authorized (clean enough)? It's works in 4.1.x, but next php versions... class X { function polymorph($class){ // Backup vars here $this=new $class(); // Restore vars here } } What is the usage?

[PHP] mysql_select_db doesn't change db on expected link, bug?

2001-12-26 Thread Jean-Pierre Arneodo
The function mysql_select_db set the db for one or for all link identifiers? The table my_table is in db1 but the active database seems to be test on link #8. Here the result with PHP 4.1.0 and MySQL 3.23.41-log: mysql_pconnect() id1=Resource id #8 mysql_select_db(db1,Resource id #8) mysql_pcon

[PHP] parent::mymethod() call $this->mymethod() bug?

2001-09-21 Thread Jean-Pierre Arneodo
Hi! something looks strange for me. Why the method Fils::x is called? MyConfig: RH7.1 PHP4.0.6 I found something similar in the bug database. http://bugs.php.net/index.php?id=12313 Open 4.0.6 Linux parent resolving and deep require's ## RESULT Fils::Fils called Pere::Pere called Fils::x calle