This is a discussion on PEAR::DB kill the script or crashes PHP ? within the PHP Language forums, part of the PHP Programming Forums category; Hello, I've a strange problem using PEAR::DB (even with the latest version). Our PHP version is 4.3....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I've a strange problem using PEAR::DB (even with the latest version). Our PHP version is 4.3.4. The above line stop the PHP script execution or crashes PHP (I don't know exactly) when the script is runned throught the browser (so, via Apache) : $db = DB::connect(DATASOURCE); I don't have any error message, any traces in the Apache error_log... The page is WHITE... :-/ But, if use the linux console to cat the php script to apache (cat script.php | php) the script is running very well... If I use the native PHP PostgreSQL functions pg_*, everything runs perfectly (in console or via the browser) Do you have any idea to solve that problem (except from removing all the PEAR modules from our application) ? Thanks in advance for your help ! PS : We are currently removing ALL the PEAR modules from our application, but since the application is large this will take a while to do. -- ---------------------------------------- Bruno Baguette - bouchon@alussinan.org Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL |
|
|||
|
In article <pan.2004.04.27.19.37.43.921000@usenet.baguette.ne t>, Bruno Baguette wrote:
> $db = DB::connect(DATASOURCE); And what does DB::IsError($db) tell? > But, if use the linux console to cat the php script to apache (cat > script.php | php) the script is running very well... That looks like excessive use of cat, What's wrong with user@host: /usr/bin/php script.php ? -- http://home.mysth.be/~timvw |
|
|||
|
Le Tue, 27 Apr 2004 19:51:14 +0000, Tim Van Wassenhove a écrit :
> In article <pan.2004.04.27.19.37.43.921000@usenet.baguette.ne t>, Bruno > Baguette wrote: >> $db = DB::connect(DATASOURCE); > > And what does DB::IsError($db) tell? Nothing, absolutely nothing... In fact, the script seems to be "killed" (or PHP crashed) just when I do the $db = DB::connect(DATASOURCE); Even if I put an echo('Foo'); after that line, the echo is not displayed... All lines after the $db = DB::connect(DATASOURCE) are not executed. >> But, if use the linux console to cat the php script to apache (cat >> script.php | php) the script is running very well... > > That looks like excessive use of cat, What's wrong with user@host: > /usr/bin/php script.php ? php script.php runs perfectly without any problems (DB connection and SQL queries are done). My problem only occurs when the script is runned via the Apache server using the browser. And there isn't any errors in the error_log file. Any idea about that problem ? Thanks in advance ! -- ---------------------------------------- Bruno Baguette - bouchon@alussinan.org Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL |
|
|||
|
In article <pan.2004.04.27.19.37.43.921000@usenet.baguette.ne t>,
Bruno Baguette <bouchon@alussinan.org> wrote: > PS : We are currently removing ALL the PEAR modules from our application, > but since the application is large this will take a while to do. Just out of curiosity, why is that? I'm at the moment switching from mysql_* specific functions to PEAR::DB. I like PEAR's error handling and the many convenient DB 'shortcut' methods ($db_object->getOne(), et al.). JP -- Sorry, <devnull@cauce.org> is een "spam trap". E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @. |