By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,721 Members | 1,468 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,721 IT Pros & Developers. It's quick & easy.

PEAR::DB kill the script or crashes PHP ?

P: n/a
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 - bo*****@alussinan.org

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <pa****************************@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
Jul 17 '05 #2

P: n/a
Le Tue, 27 Apr 2004 19:51:14 +0000, Tim Van Wassenhove a écrit :
In article <pa****************************@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 - bo*****@alussinan.org

Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
Jul 17 '05 #3

P: n/a
In article <pa****************************@usenet.baguette.ne t>,
Bruno Baguette <bo*****@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, <de*****@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.