icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » PHP Debugging with the Debugger turned off

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Closed Thread
 
LinkBack Thread Tools Search this Thread Rate Thread
Old July 11th, 2003, 4:03 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jun 2003
16 posts
Gave thanks: 0
Thanked 0 times
Since surpass now has the php debuggers turned off, have any of you found alternate ways of accessing php's debugger or error logs?

I have over 10000 lines of php code; searching for an error in that is a needle in a haystack given only the information that 'yes there is an error somewhere in there.'
__________________
-Peter Thorson
Zaphoyd Graphics and Software
www.zaphoyd.com
[server vega]
zaphoyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old July 11th, 2003, 5:41 PM   #2 (permalink)
Registered User
Seasoned Poster
 
Joined in May 2003
Lives in Ottawa, Ontario, Canada
80 posts
Gave thanks: 0
Thanked 0 times
it tells you what line the error was on
XtremeDesigns is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old July 11th, 2003, 6:26 PM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jun 2003
16 posts
Gave thanks: 0
Thanked 0 times
No, it does not; usually it does, but right now it just returns nothing, resulting in a blank white page, try it.. (server: vega)
__________________
-Peter Thorson
Zaphoyd Graphics and Software
www.zaphoyd.com
[server vega]
zaphoyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old July 12th, 2003, 1:29 AM   #4 (permalink)
Registered User
Seasoned Poster
 
Joined in May 2003
Lives in Ottawa, Ontario, Canada
80 posts
Gave thanks: 0
Thanked 0 times
i dont know what server im on, but this is just 1 of the errors on 1 of my pages

(to prove that it does work some places :lol: )

Code:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/matthewa/public_html/XD-3/index.php on line 26
XtremeDesigns is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old July 12th, 2003, 9:02 AM   #5 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jun 2003
16 posts
Gave thanks: 0
Thanked 0 times
yes that is what it has done in the past, but it stopped working now. I recieved the following email from surpass support.

Ok looks like we might have disabled PHP debuging by default, but maybe if you go to www.php.net you might find an option to add to your code so that it debugs by default. If we have any more ways of fixing your problem we will contact you. Thanks.

I looked at everything as far as debugging on php.net, non of the PHP 4 compatible things do anything. I see one function debugger_on but it was dropped in PHP 4. Just wondering if anyone else has had this problem and/or has found a solution.
__________________
-Peter Thorson
Zaphoyd Graphics and Software
www.zaphoyd.com
[server vega]
zaphoyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old July 12th, 2003, 10:06 AM   #6 (permalink)
the one who was
Super #1
 
patrickb's Avatar
 
Joined in Jul 2003
Lives in Memphis
1,967 posts
Gave thanks: 0
Thanked 3 times
I dont think that is the debug options you are talking about zaphyod.

Try this function:
ini_set("display_errors, "On");

That should fix your problem more than likely. And that can be a big security hole in theory. I would recommend doing your own error handling, and having it write to a log file that you can review. Maybe for quick testing and rewriting code leave it on, but cut it off.

http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors

Has a good example of those to deal with error handling logging....

Patrick
__________________
Patrick

Warnings: The program(s) might crash unexpectedly or behave otherwise strangely. (But of course, so do many commercial programs on Windows.) --www.gimp.org
patrickb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old July 12th, 2003, 9:19 PM   #7 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jun 2003
16 posts
Gave thanks: 0
Thanked 0 times
does ANYBODY else have this problem? can someone else on vega just delete a semicolon somewhere and see what happens.

thanks for your insight patrickb, display_errors is definitely what should be on by default, and obviously, at least for my server, it is not on. I tried that function and several variations of it based on different examples from that page and none of them make any difference.

The following link is an example of the problem. I have removed one semicolon, and it does that instead of helpfully saying looky no semicolon on line xyz like it did 2 days ago.

http://www.zaphoyd.com/projects/signup.php
__________________
-Peter Thorson
Zaphoyd Graphics and Software
www.zaphoyd.com
[server vega]
zaphoyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old July 13th, 2003, 12:39 PM   #8 (permalink)
the one who was
Super #1
 
patrickb's Avatar
 
Joined in Jul 2003
Lives in Memphis
1,967 posts
Gave thanks: 0
Thanked 3 times
Could you put a phpinfo file on your server somewhere and send me the link.. Ill look through the results and see what I can come up with.
__________________
Patrick

Warnings: The program(s) might crash unexpectedly or behave otherwise strangely. (But of course, so do many commercial programs on Windows.) --www.gimp.org
patrickb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old July 13th, 2003, 3:50 PM   #9 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jun 2003
16 posts
Gave thanks: 0
Thanked 0 times
http://www.zaphoyd.com/projects/phpinfo.php

There ya go patrickb, thanks a bunch in advance.

note: this page clearly shows display_errors as off...
__________________
-Peter Thorson
Zaphoyd Graphics and Software
www.zaphoyd.com
[server vega]
zaphoyd is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On