Yasuo, I don't quite understand. define() hasn't been changed in the Zend Engine 1. Can you please send me a reproducing script without pg_*() which works on 4.0.6 and crashes on 4.2.0-dev?
Thanks, Andi On Fri, 25 Jan 2002, Yasuo Ohgaki wrote: > Hi Andi, > > I think you are interested in this bug report :) > Accoding to this bug report, define() works like a macro somewhat > until 4.1.x. > > [EMAIL PROTECTED] wrote > > <?php > define ("DBCONN01",pg_connect("dbname=db01 user=username")); > pg_exec(DBCONN01,"select * from fugafuga"); > ?> > > it worked with 4.0.6. (I verified with 4.0.6 and it works! > It segfaults with 4.2.0-dev/ZE2 and 4.2.0-dev/ZE1) > > I thought define() defines scaler constant in ZE1. (and array > in ZE2) > > Is this intended behavior? > > -- > Yasuo Ohgaki > > [EMAIL PROTECTED] wrote: > > ID: 15186 > > Comment by: [EMAIL PROTECTED] > > Old Reported By: [EMAIL PROTECTED] > > Reported By: [EMAIL PROTECTED] > > Status: Open > > Bug Type: MySQL related > > Operating System: Linux > > PHP Version: 4.1.1 > > New Comment: > > > > The same probrem occur with PostgreSQL. > > > > This script will hang. > > > > <?php > > define ("DBCONN01",pg_connect("dbname=db01 user=username")); > > define ("DBCONN02",pg_connect("dbname=db02 user=username")); > > pg_exec(DBCONN01,"select * from hogehoge"); > > pg_exec(DBCONN02,"select * from fugafuga"); > > ?> > > > > RedhatLinux6.2(en) + php4.1.1 + PostgreSQL7.1.3 > > > > > > Previous Comments: > > ------------------------------------------------------------------------ > > > > [2002-01-23 15:20:50] [EMAIL PROTECTED] > > > > Previous to version 4.1.1, using define() to define a handle to a MySQL > > connection worked fine: > > > > define(DB, mysql_connect(host,user,pass)); > > > > In PHP 4.1.1, if the above is done, then the script will hang for a > > long time (for a minute or so) if other mysql connections are attempted > > to be made. > > > > i.e.: > > > > function hang_mysql() > > { > > define(DB1, mysql_connect(host,user,pass)); > > define(DB2, mysql_connect(host,user,pass)); > > } > > > > function doesnt_hang() > > { > > $db1 = mysql_connect(host,user,pass); > > $db2 = mysql_connect(host,user,pass); > > } > > > > This wasn't a problem in PHP 4.0.6 and older versions. > > > > > > ------------------------------------------------------------------------ > > > > > > > > Edit this bug report at http://bugs.php.net/?id=15186&edit=1 > > > > > > > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]