PHP Question...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • galleryseek
    Confirmed User
    • Mar 2002
    • 8234

    #1

    PHP Question...

    why the hell, is it when I have an error in the coding and I upload it and go to the page, it shows up completely BLANK/WHITE and says nothing... If I go to view source, it shows some html tags and that is it...

    Awhile back, it used to say what type of error, and on what line it is on... but now, if I forget a semi colon for example, it doesn't say anything, its just completely blank..

    is there a code to turn the error display back on or some shit?

    thx
  • JSA Matt
    So Fucking Banned
    • Aug 2003
    • 5464

    #2
    Try putting this at the top of your script(s)

    PHP Code:
    @ini_set('display_errors', '1');
    error_reporting(E_ERROR | E_WARNING | E_PARSE); 
    
    That will limit the type of errors it displays... you can also do this one to report ALL errors.

    PHP Code:
    error_reporting(E_ALL); 
    
    If you have access to the php.ini it is better to change display_errors to '1' instead of doing @ini_set('display_errors', '1');

    Comment

    • galleryseek
      Confirmed User
      • Mar 2002
      • 8234

      #3
      Originally posted by JSA Matt
      Try putting this at the top of your script(s)

      PHP Code:
      @ini_set('display_errors', '1');
      error_reporting(E_ERROR | E_WARNING | E_PARSE); 
      
      That will limit the type of errors it displays... you can also do this one to report ALL errors.

      PHP Code:
      error_reporting(E_ALL); 
      
      If you have access to the php.ini it is better to change display_errors to '1' instead of doing @ini_set('display_errors', '1');
      thanks for the effort man, but its STILL doing the same thing i tried both of them...

      Comment

      • liquidmoe
        Confirmed User
        • Mar 2002
        • 4994

        #4
        Is the code you are running php only or is it html + php, are you parsing .php extension, or something else like .html for php?

        Take Luck!

        Comment

        • JSA Matt
          So Fucking Banned
          • Aug 2003
          • 5464

          #5
          If you take out the @ before ini_set does it return an error? : )

          Do you have access to the php.ini file?

          Comment

          • galleryseek
            Confirmed User
            • Mar 2002
            • 8234

            #6
            Originally posted by liquidmoe
            Is the code you are running php only or is it html + php, are you parsing .php extension, or something else like .html for php?
            it is HTML + php...

            its the standard .php extension.

            Comment

            • galleryseek
              Confirmed User
              • Mar 2002
              • 8234

              #7
              Originally posted by JSA Matt
              If you take out the @ before ini_set does it return an error? : )

              Do you have access to the php.ini file?
              no, and no.

              Comment

              • block
                Confirmed User
                • Jan 2004
                • 1258

                #8
                I had some problems like this one time and it was because in my echo I had used "" instead of ' '.

                ICQ - 19961769

                Comment

                • JSA Matt
                  So Fucking Banned
                  • Aug 2003
                  • 5464

                  #9
                  Originally posted by galleryseek


                  no, and no.
                  Make a seperate file and put nothing but this code in it:

                  PHP Code:
                  info.php
                  
                  <?php
                  phpinfo();
                  ?>
                  Run that script from your server and tell me if the variable 'display_errors' is set to 'Off'

                  Comment

                  • liquidmoe
                    Confirmed User
                    • Mar 2002
                    • 4994

                    #10
                    You may want to turn on error notices while debugging this, also does the HTML come up or is it completely blank?

                    Take Luck!

                    Comment

                    • Nysus
                      Confirmed User
                      • Aug 2001
                      • 7817

                      #11
                      Originally posted by JSA Matt
                      Run that script from your server and tell me if the variable 'display_errors' is set to 'Off'
                      It's so annoying not having access to everything.

                      Good luck.

                      Cheers,
                      Matt
                      What name is pr0 / Untouched Markets using these days? Untouched Markets - pr0 - Refund My Money Now

                      Someone owes me $2,000 because they didn't do any work that was paid for *pointing at pr0 / William / UntouchedMarkets*

                      See http://www.gfy.com/showthread.php?p=16744521 and for more detailed see http://www.gfy.com/showthread.php?t=948645

                      Comment

                      • gornyhuy
                        Chafed.
                        • May 2002
                        • 18041

                        #12
                        Try running the browser WITHOUT Call of Duty going in a background window.

                        icq:159548293

                        Comment

                        • galleryseek
                          Confirmed User
                          • Mar 2002
                          • 8234

                          #13
                          Originally posted by JSA Matt


                          Make a seperate file and put nothing but this code in it:

                          PHP Code:
                          info.php
                          
                          <?php
                          phpinfo();
                          ?>
                          Run that script from your server and tell me if the variable 'display_errors' is set to 'Off'
                          display_errors are both set to On (for local and master value)

                          display_startup_errors are both set to off

                          error_reporting are both set to "81"

                          html_errors On On

                          ignore_repeated_errors Off Off

                          Comment

                          • galleryseek
                            Confirmed User
                            • Mar 2002
                            • 8234

                            #14
                            Originally posted by liquidmoe
                            You may want to turn on error notices while debugging this, also does the HTML come up or is it completely blank?
                            i've tried turning on the errors from what people suggested in this thread...

                            and only the very initial HTML coding is displayed...

                            Comment

                            • JSA Matt
                              So Fucking Banned
                              • Aug 2003
                              • 5464

                              #15
                              Originally posted by galleryseek


                              display_errors are both set to On (for local and master value)

                              display_startup_errors are both set to off

                              error_reporting are both set to "81"

                              html_errors On On

                              ignore_repeated_errors Off Off
                              I'm all out of ideas man... i've had this problem many times but the first code I posted always fixed it.

                              Trying contacting your host and ask them about it.

                              The error_reporting on my server is set to '2047'.... not sure if that will help you at all

                              Comment

                              • galleryseek
                                Confirmed User
                                • Mar 2002
                                • 8234

                                #16
                                Originally posted by gornyhuy
                                Try running the browser WITHOUT Call of Duty going in a background window.
                                lol, i tried deleting it man.. that only lasted for 2 days... wanna play?

                                Comment

                                • galleryseek
                                  Confirmed User
                                  • Mar 2002
                                  • 8234

                                  #17
                                  Originally posted by JSA Matt


                                  I'm all out of ideas man... i've had this problem many times but the first code I posted always fixed it.

                                  Trying contacting your host and ask them about it.

                                  The error_reporting on my server is set to '2047'.... not sure if that will help you at all
                                  yeah, thanks for the help though.

                                  Comment

                                  • liquidmoe
                                    Confirmed User
                                    • Mar 2002
                                    • 4994

                                    #18
                                    Make it:

                                    html

                                    php

                                    html

                                    See if the php is returning any results and if the second chunk of html is being displayed, also make sure that you have ErrorLog enabled for the domain in your httpd.conf and tail -f the errorlog to see if apache is having issues parsing something or if its a more critical error than just a php coding issue.

                                    Take Luck!

                                    Comment

                                    Working...