PEAR::DB kill the script or crashes PHP ?

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....


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-27-2004
Bruno Baguette
 
Posts: n/a
Default PEAR::DB kill the script or crashes PHP ?

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
Reply With Quote
  #2 (permalink)  
Old 04-27-2004
Tim Van Wassenhove
 
Posts: n/a
Default Re: PEAR::DB kill the script or crashes PHP ?

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
Reply With Quote
  #3 (permalink)  
Old 04-27-2004
Bruno Baguette
 
Posts: n/a
Default Re: PEAR::DB kill the script or crashes PHP ?

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
Reply With Quote
  #4 (permalink)  
Old 04-29-2004
Jan Pieter Kunst
 
Posts: n/a
Default Re: PEAR::DB kill the script or crashes PHP ?

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" = @.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0