Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
Like Tree2Likes
  • 1 Post By mlseim
  • 1 Post By Andrew Yurlov

Thread: PHP equivalent of ASPError object

  1. #1
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times

    PHP equivalent of ASPError object

    Yes, I'm asking a question. And yes, it's a PHP question.

    Basically, I'm trying to help debug a site that I never built (since it's in PHP and I have a known allergy). I know a custom 500 error page can be set up, but what I'm looking to capture is along these lines.

    ASP ASPError Object

    Specifically, line, error number, and error description, but the more info the merrier.

    I have a tough time believing this isn't available in PHP. It's been a part of ASP for many years (ASP.net, too, but I figured this would be easier to understand).

    So can this be done? Is there a rough tutorial for this?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    Add this line at the top of your script ... like this ...

    <?php
    error_reporting(E_ALL);


    PHP can selectively display fatal errors, or warnings of things that could be a problem.
    In the case above, you'll get all errors.
    TheGAME1264 likes this.


  4. #3
    Senior Member Andrew Yurlov's Avatar
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    1,306
    Member #
    27566
    Liked
    181 times
    What? TheGAME is asking a questing!? About the much hated PHP!?

    100720-little-girl-dafuq-meme-Imgur-7ysM.jpg
    TheGAME1264 likes this.
    Artificial intelligence is nothing compared to natural stupidity -Someone

    Design is a funny word. Some people think design means how it looks.
    But of course, if you dig deeper, itís really how it works.
    -Steve Jobs



  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    I didn't build the site. :P If I had my way, it would be rebuilt from the ground up.

    Max: it happens on various pages throughout the site at random. Would I have to add that to all of them?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    There will be a PHP config file on the server (via control panel), where they have the global setting for error reporting.

    Some webhosts allow your own php.ini file in the root directory to specify global settings.

    Depending on the webhost ... you can google "php config error reporting" ... that might give some better examples than I.


  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    We're got a dedicated server for this project. We can pretty much do whatever we want.

    Thanks, Max.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:25 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com