PEAR::DB kill the script or crashes PHP ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruno Baguette

    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(DAT ASOURCE);

    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@alussin an.org

    Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
  • Tim Van Wassenhove

    #2
    Re: PEAR::DB kill the script or crashes PHP ?

    In article <pan.2004.04.27 .19.37.43.92100 0@usenet.baguet te.net>, Bruno Baguette wrote:[color=blue]
    > $db = DB::connect(DAT ASOURCE);[/color]

    And what does DB::IsError($db ) tell?
    [color=blue]
    > But, if use the linux console to cat the php script to apache (cat
    > script.php | php) the script is running very well...[/color]

    That looks like excessive use of cat,
    What's wrong with user@host: /usr/bin/php script.php ?


    --

    Comment

    • Bruno Baguette

      #3
      Re: PEAR::DB kill the script or crashes PHP ?

      Le Tue, 27 Apr 2004 19:51:14 +0000, Tim Van Wassenhove a écrit :
      [color=blue]
      > In article <pan.2004.04.27 .19.37.43.92100 0@usenet.baguet te.net>, Bruno
      > Baguette wrote:[color=green]
      >> $db = DB::connect(DAT ASOURCE);[/color]
      >
      > And what does DB::IsError($db ) tell?[/color]

      Nothing, absolutely nothing... In fact, the script seems to be "killed"
      (or PHP crashed) just when I do the $db = DB::connect(DAT ASOURCE);

      Even if I put an echo('Foo'); after that line, the echo is not
      displayed... All lines after the $db = DB::connect(DAT ASOURCE) are not
      executed.
      [color=blue][color=green]
      >> But, if use the linux console to cat the php script to apache (cat
      >> script.php | php) the script is running very well...[/color]
      >
      > That looks like excessive use of cat, What's wrong with user@host:
      > /usr/bin/php script.php ?[/color]

      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@alussin an.org

      Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

      Comment

      • Jan Pieter Kunst

        #4
        Re: PEAR::DB kill the script or crashes PHP ?

        In article <pan.2004.04.27 .19.37.43.92100 0@usenet.baguet te.net>,
        Bruno Baguette <bouchon@alussi nan.org> wrote:
        [color=blue]
        > 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.[/color]

        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" = @.

        Comment

        Working...