Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    php error checking

    Hey Guys,
    I'm using php as a backend language to a flex application i'm building. For those of you who are unfirmiliar with flex, it is an asynchronous style language built on flash. My problem is it is very hard to debug. Similar to many problems developers have encoutered with ajax, you can't actually see whats going on in the backend. To help i'm just writting all the variables that are coming in and and out to a txt file. I was wondering if there was a way to catch any type of warning or synax error that might have occured. I'm using a try catch right now to write anything that errors in that sense to a file, but i wanted to take it a step further and basically catch any type server side (pre-runtime) error and spit that into a error.txt file as well. Any advice would be great.

    ~Jamie

  • #2
    New Coder
    Join Date
    Jul 2006
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Check out.

    http://www.php.net/error_reporting

    Good luck!

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts
    great... thanks for the reply!!

  • #4
    Regular Coder
    Join Date
    Jan 2006
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey,
    Finally got a chance to check this out. It seems like the error reporting only controls which errors are being displayed. Does anyone know if there is a way to actually write the error to a file?

    EXAMPLE:
    Right now i have a simple synax error:
    "Parse error: syntax error, unexpected T_VARIABLE in /var/www/server/site/remote_php/remote_objects/management.php on line 65"

    i would like to actually have the file written to an error.txt file. It can still display to the screen, but using an asynchronous language, this will give me the ability to actaully read what had printed to the screen.

    Thanks!
    ~Jamie

  • #5
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    In php.ini you have log_errors and error_log.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •