Thread: [gbd-dev] mysql_connect
Status: Beta
Brought to you by:
mccabe
From: Brett S. <tec...@se...> - 2005-06-09 00:00:14
|
All, I've run into an issue using gubed with mysql client calls. When mysql_connect() is called, gubed never regains control. Doesn't seem to matter if I try to step over this call directly, over a function that calls mysql_connect() or attempt to reach a break point past this call. I have to assume mysql_connect is setting some sort of handler that is causing the issue. Has anyone run into this issue? Any suggestions? The connect to the database occurs early, making gubed fairly useless for this project. :-( Brett ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Aaron M. <wmc...@ho...> - 2005-06-09 13:26:43
|
Brett, I think I've experienced this same issue but the projects I've been debugging have used wrappers for the mysql functions. These wrappers have been defined in a separate file which I've added to the "No Debug" list in localsettings.php. I haven't looked into the issue at all. Maybe Linus will be able to provide some insight when he gets back from vacation. Aaron McDonald --------------------------------------------------------------------------------------------------- All, I've run into an issue using gubed with mysql client calls. When mysql_connect() is called, gubed never regains control. Doesn't seem to matter if I try to step over this call directly, over a function that calls mysql_connect() or attempt to reach a break point past this call. I have to assume mysql_connect is setting some sort of handler that is causing the issue. Has anyone run into this issue? Any suggestions? The connect to the database occurs early, making gubed fairly useless for this project. :-( Brett ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Linus M. <Li...@mc...> - 2005-06-14 12:01:33
|
Hello! Does this happen wether an error occurs in your script or not (ie connection error to the db or similar)? Does your script run all towards the end, or does execution just freeze? If you comment out the call to mysql_connect(), can you single step past that line? Did Aarons suggestion about putting the script with the db call in gbdNoDebug help (was it at all possible?) If I try to singlestep through mysql_connect() i have no problem (at least not when connection is successfull) Are the scripts open source, or available for me to test? /Linus On Thursday 09 June 2005 01.59, Brett Serkez wrote: > All, > > I've run into an issue using gubed with mysql client calls. When > mysql_connect() is called, gubed never regains control. Doesn't seem to > matter if I try to step over this call directly, over a function that > calls mysql_connect() or attempt to reach a break point past this call. > > I have to assume mysql_connect is setting some sort of handler that is > causing the issue. > > Has anyone run into this issue? Any suggestions? The connect to the > database occurs early, making gubed fairly useless for this project. > > :-( > > Brett > ------------------------------------- > Brett C. Serkez, Technical Trainer > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput a projector? How fast can you ride your desk chair down the office > luge track? If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Gubed-devel mailing list > Gub...@li... > https://lists.sourceforge.net/lists/listinfo/gubed-devel |
From: Brett S. <tec...@se...> - 2005-06-14 12:57:54
|
Linus, Welcome back. Yes, Aarons helped me setup the module that made the MySQL calls with gbdNoDebug and all was well, I was by-passing the issue. Interestingly, by happenstance yesterday I discovered that the issue wasn't with MySQL at all, but rather the failure of php to find the entry point. I was going to post this morning, thanks for asking. I'm not sure what exactly was happening on the Fedora box, I had uninstalled the default version of MySQL (which was a 3.x) and installed the latest MySQL V5 beta. With a Windoze box, I would have rebooted, but of source with Linux you simply go about you business, the rpm utility stops and restarts the services (daemons) and off you go. So for whatever reason, apache was correctly locating the new MySQL entry points and thus running fine without Gubed, but when attempting to run the scripts via Gubed, the entry points were not located and all processing simply stopped at that point. The issue *appeared* to be Gubed, which was misleading, as I now see. Yesterday I happen to notice this same behavior, when I had mistyped an entry point in new php code I was writing. When attempting to step (into/over) this entry point, Gubed simply 'exited', the web page being debugged comes back empty and the debugger has no where to go. When I recognized this behavior I took out the gdbNoDebug around my module for MySQL, reproduced the old behavior and then rebooted the fedora system (it had been up for weeks) and then all was well, I too can see the MySQL calls are now just fine. Now when I see this behavior, I know what to look for. I don't know if there is anyway for Gubed to report the missing entry point vs. just exiting? It is a mystery to me as to why the MySQL entry points would be found outside the Gubed environment but not within until the OS was rebooted. Thank you for your reply, I hope this informations is useful. Brett On Tue, 14 Jun 2005 14:01:15 +0200, "Linus McCabe" <Li...@mc...> said: > > Hello! > > Does this happen wether an error occurs in your script or not (ie > connection > error to the db or similar)? > Does your script run all towards the end, or does execution just freeze? > If you comment out the call to mysql_connect(), can you single step past > that > line? > Did Aarons suggestion about putting the script with the db call in > gbdNoDebug > help (was it at all possible?) > > If I try to singlestep through mysql_connect() i have no problem (at > least not > when connection is successfull) > > Are the scripts open source, or available for me to test? > > /Linus > > On Thursday 09 June 2005 01.59, Brett Serkez wrote: > > All, > > > > I've run into an issue using gubed with mysql client calls. When > > mysql_connect() is called, gubed never regains control. Doesn't seem to > > matter if I try to step over this call directly, over a function that > > calls mysql_connect() or attempt to reach a break point past this call. > > > > I have to assume mysql_connect is setting some sort of handler that is > > causing the issue. > > > > Has anyone run into this issue? Any suggestions? The connect to the > > database occurs early, making gubed fairly useless for this project. > > > > :-( > > > > Brett > > ------------------------------------- > > Brett C. Serkez, Technical Trainer > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > > shotput a projector? How fast can you ride your desk chair down the office > > luge track? If you want to score the big prize, get to know the little guy. > > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > > _______________________________________________ > > Gubed-devel mailing list > > Gub...@li... > > https://lists.sourceforge.net/lists/listinfo/gubed-devel > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far can you > shotput > a projector? How fast can you ride your desk chair down the office luge > track? > If you want to score the big prize, get to know the little guy. > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Gubed-devel mailing list > Gub...@li... > https://lists.sourceforge.net/lists/listinfo/gubed-devel ------------------------------------- Brett C. Serkez, Technical Trainer |
From: Linus M. <Li...@mc...> - 2005-06-14 20:25:10
|
On Tuesday 14 June 2005 14.57, Brett Serkez wrote: > Interestingly, by happenstance yesterday I discovered that the issue > wasn't with MySQL at all, but rather the failure of php to find the > entry point. I was going to post this morning, thanks for asking. What do you mean by entry point? The actual dynamic linking to the mysql lib? If it was working without gubed but not with it _could_ have been because of different apache processes were used - one that was using the new mysql lib and another that was loaded after the update that used the new one. Of course, if you tried several times, chances are slimmer that the same apache instance was used for gubed and another for non-gubed over and over again. > Yesterday I happen to notice this same behavior, when I had mistyped an > entry point in new php code I was writing. When attempting to step You mean you mistyped a function name and gubed just bugged out without showing any error message? If I try to call a function or object method that doesent exists, i get something like: Fatal error: Call to undefined function: s() in /mnt/hdc1/projects/Gubed/Gubed/ServerScripts/Gubed.php(82) : eval()'d code on line 27 Do you get the same error if you try in a simple script, say <?php echo "a"; s(); echo b(); ?> > Thank you for your reply, I hope this informations is useful. It is, thanks for the extensive reply! /Linus |
From: Brett S. <tec...@se...> - 2005-06-19 23:07:32
|
Appologies for the delayed response, just getting back to this. > > Interestingly, by happenstance yesterday I discovered that the issue > > wasn't with MySQL at all, but rather the failure of php to find the > > entry point. I was going to post this morning, thanks for asking. > > What do you mean by entry point? The actual dynamic linking to the mysql > lib? Yes. > Of course, if you tried several times, chances are slimmer that the same > apache instance was used for gubed and another for non-gubed over and > over again. Yes, this is a great point. I *believe* that caching is occuring as if I make edits to a script and then run it in Gubed, some times it will simply exhibit odd behavior such as not stopping on specific entry points, prematurely exiting and such. If I restart Apache after every edit, not something everyone can do, nor very efficient, I get a 'perfect' debug session every time. > Do you get the same error if you try in a simple script, say > <?php > echo "a"; > s(); > echo b(); > ?> Running this script in Gubed on Fedora Core 3, simply exits, no errors. This is the behavior I orginally described. Brett ------------------------------------- Brett C. Serkez, Technical Trainer |