error_reporting(E_ALL) fails to show anything - help!!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • comp.lang.php

    error_reporting(E_ALL) fails to show anything - help!!

    I am having problems tracing errors in my code using PHP 4.3.9 on Linux
    RHEL 4 with Apache 2.0.54

    On occasions I see no errors, no parse, no fatal, no warnings, no
    notices.. and no code either! No HTML, nothing! I get a completely
    blank page with no content whatsoever.

    I have at the very top of my page
    [PHP]
    error_reporting (E_ALL);
    [/PHP]

    As a test to see if even notices would pop up, but nothing.

    What could cause this to happen?

    Thanx
    Phil

  • Gordon Burditt

    #2
    Re: error_reporting (E_ALL) fails to show anything - help!!

    >I am having problems tracing errors in my code using PHP 4.3.9 on Linux[color=blue]
    >RHEL 4 with Apache 2.0.54
    >
    >On occasions I see no errors, no parse, no fatal, no warnings, no
    >notices.. and no code either! No HTML, nothing! I get a completely
    >blank page with no content whatsoever.
    >
    >I have at the very top of my page
    >[PHP]
    >error_reportin g(E_ALL);
    >[/PHP][/color]

    My bet is that you have at least:
    [PHP]
    <?php
    error_reporting (E_ALL);
    ?>
    [/PHP]

    rather than what you indicated above.

    Gordon L. Burditt

    Comment

    • comp.lang.php

      #3
      Re: error_reporting (E_ALL) fails to show anything - help!!


      Gordon Burditt wrote:[color=blue][color=green]
      > >I am having problems tracing errors in my code using PHP 4.3.9 on Linux
      > >RHEL 4 with Apache 2.0.54
      > >
      > >On occasions I see no errors, no parse, no fatal, no warnings, no
      > >notices.. and no code either! No HTML, nothing! I get a completely
      > >blank page with no content whatsoever.
      > >
      > >I have at the very top of my page
      > >[PHP]
      > >error_reportin g(E_ALL);
      > >[/PHP][/color]
      >
      > My bet is that you have at least:
      > [PHP]
      > <?php
      > error_reporting (E_ALL);
      > ?>
      > [/PHP]
      >
      > rather than what you indicated above.[/color]

      That sounds redundant to me, unclear as to how this will shed light on
      my problem.
      Phil[color=blue]
      >
      > Gordon L. Burditt[/color]

      Comment

      • Justin Koivisto

        #4
        Re: error_reporting (E_ALL) fails to show anything - help!!

        comp.lang.php wrote:[color=blue]
        > I am having problems tracing errors in my code using PHP 4.3.9 on Linux
        > RHEL 4 with Apache 2.0.54
        >
        > On occasions I see no errors, no parse, no fatal, no warnings, no
        > notices.. and no code either! No HTML, nothing! I get a completely
        > blank page with no content whatsoever.
        >
        > I have at the very top of my page
        > [PHP]
        > error_reporting (E_ALL);
        > [/PHP]
        >
        > As a test to see if even notices would pop up, but nothing.
        >
        > What could cause this to happen?
        >
        > Thanx
        > Phil
        >[/color]

        check to see what the log_errors value is set to in php.ini... if it is
        1, then you have to check your error.log file rather than the browser.

        --
        Justin Koivisto, ZCE - justin@koivi.co m

        Comment

        • Iván Sánchez Ortega

          #5
          Re: error_reporting (E_ALL) fails to show anything - help!!

          -----BEGIN PGP SIGNED MESSAGE-----
          Hash: SHA1

          comp.lang.php wrote:
          [color=blue]
          > I am having problems tracing errors in my code using PHP 4.3.9 on Linux
          > RHEL 4 with Apache 2.0.54[/color]

          Can you run PHP on a CLI in that machine? That would clear things up.

          Try:

          echo "<?php phpinfo(); ?> " | /usr/bin/php

          - --
          - ----------------------------------
          Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

          Un ordenador no es un televisor ni un microondas, es una herramienta
          compleja.
          -----BEGIN PGP SIGNATURE-----
          Version: GnuPG v1.4.2 (GNU/Linux)

          iD8DBQFD4UoN3jc Q2mg3Pc8RAlqEAJ 4iEZGJr7UxpcRF1 Yq5c+A9E2uYFACc CPNe
          IV8RwjNjUvne2+G EEL21iNg=
          =H1cH
          -----END PGP SIGNATURE-----

          Comment

          • Chung Leong

            #6
            Re: error_reporting (E_ALL) fails to show anything - help!!

            If error_reporting is set to 0 in php.ini, you won't see any E_PARSE
            error message even if you do an error_reporting (E_ALL), as the error
            would occur prior to the line being executed.

            Comment

            • Pedro Graca

              #7
              Re: error_reporting (E_ALL) fails to show anything - help!!

              Iván Sánchez Ortega wrote:[color=blue]
              > comp.lang.php wrote:
              >[color=green]
              >> I am having problems tracing errors in my code using PHP 4.3.9 on Linux
              >> RHEL 4 with Apache 2.0.54[/color]
              >
              > Can you run PHP on a CLI in that machine? That would clear things up.
              >
              > Try:
              >
              > echo "<?php phpinfo(); ?> " | /usr/bin/php[/color]

              The CLI and the Apache module may have different configurations.

              In my setup, they do

              The Apache module
              ~$ wget http://localhost/info.php -O- 2> /dev/null | grep error_log
              <tr><td class="e">error _log</td><td
              class="v">/var/www/log/phperrors.log</td><td
              class="v">/var/www/log/phperrors.log</td></tr>

              This last line, reformatted, becomes
              error_log => /var/www/log/phperrors.log => /var/www/log/phperrors.log

              The CLI
              ~$ php /var/www/normal/info.php | grep error_log
              error_log => no value => no value

              --
              If you're posting through Google read <http://cfaj.freeshell. org/google>

              Comment

              • Pedro Graca

                #8
                Re: error_reporting (E_ALL) fails to show anything - help!!

                Justin Koivisto wrote:[color=blue]
                > comp.lang.php wrote:[color=green]
                >> On occasions I see no errors, no parse, no fatal, no warnings, no
                >> notices.. and no code either! No HTML, nothing! I get a completely
                >> blank page with no content whatsoever.
                >>
                >> I have at the very top of my page
                >> [PHP]
                >> error_reporting (E_ALL);
                >> [/PHP]
                >>
                >> As a test to see if even notices would pop up, but nothing.[/color]
                >
                > check to see what the log_errors value is set to in php.ini... if it is
                > 1, then you have to check your error.log file rather than the browser.[/color]

                If you want to override the log_errors directive in php.ini, you can do
                that with

                ini_set('displa y_errors', 1);
                <http://www.php.net/manual/en/ref.errorfunc.p hp#ini.display-errors>

                or, maybe with (I never tested it)

                ini_set('error_ log', NULL);
                <http://www.php.net/manual/en/ref.errorfunc.p hp#ini.error-log>

                --
                If you're posting through Google read <http://cfaj.freeshell. org/google>

                Comment

                • comp.lang.php

                  #9
                  Re: error_reporting (E_ALL) fails to show anything - help!!

                  error_reporting is set to '1', this according to php.ini

                  Phil

                  Chung Leong wrote:[color=blue]
                  > If error_reporting is set to 0 in php.ini, you won't see any E_PARSE
                  > error message even if you do an error_reporting (E_ALL), as the error
                  > would occur prior to the line being executed.[/color]

                  Comment

                  • Chung Leong

                    #10
                    Re: error_reporting (E_ALL) fails to show anything - help!!


                    comp.lang.php wrote:[color=blue]
                    > error_reporting is set to '1', this according to php.ini
                    >
                    > Phil
                    >
                    > Chung Leong wrote:[color=green]
                    > > If error_reporting is set to 0 in php.ini, you won't see any E_PARSE
                    > > error message even if you do an error_reporting (E_ALL), as the error
                    > > would occur prior to the line being executed.[/color][/color]

                    1 is E_ERROR, so you won't not be getting any E_PARSE message.

                    Comment

                    Working...