Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to 0.
How do I turn debug on without editing the mysql file?
thanks, .sander
Hi If you only want to se your error-messages on screen you can put this line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to 0.
How do I turn debug on without editing the mysql file?
thanks, .sander
Thanks - I know those. In this case I'm not looking to see error messages on the screen - I've already eliminated errors. And web developer and firebug are client side tools. What I want is to trace what's happening on the app when there are no errors but things are still not happening as expected. It's clear that drupal already has it built in - I'm just looking to find out how to turn it on.
dupal1.no wrote:
Hi If you only want to se your error-messages on screen you can put this line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to 0.
How do I turn debug on without editing the mysql file?
thanks, .sander
OK. This is not my strongest side :-D But I will try this idea ; Can this module help you? http://drupal.org/project/devel
sander-martijn skrev:
Thanks - I know those. In this case I'm not looking to see error messages on the screen - I've already eliminated errors. And web developer and firebug are client side tools. What I want is to trace what's happening on the app when there are no errors but things are still not happening as expected. It's clear that drupal already has it built in - I'm just looking to find out how to turn it on.
dupal1.no wrote:
Hi If you only want to se your error-messages on screen you can put this line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to 0.
How do I turn debug on without editing the mysql file?
thanks, .sander
ok, that was cute. The devel module seems to have brought my entire site down. Even after deleting it from the modules dir. oh well - looks like i'm done for the night!
dupal1.no wrote:
OK. This is not my strongest side :-D But I will try this idea ; Can this module help you? http://drupal.org/project/devel
sander-martijn skrev:
Thanks - I know those. In this case I'm not looking to see error messages on the screen - I've already eliminated errors. And web developer and firebug are client side tools. What I want is to trace what's happening on the app when there are no errors but things are still not happening as expected. It's clear that drupal already has it built in - I'm just looking to find out how to turn it on.
dupal1.no wrote:
Hi If you only want to se your error-messages on screen you can put this line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to 0.
How do I turn debug on without editing the mysql file?
thanks, .sander
Also fixable from settings.php. At least the disabling the module part....
-Mike
__________________ Michael Prasuhn mike@mikeyp.net mikeyp.phone@gmail.com phone 714.356.0168 cell 949.200.7670 fax
-----Original Message----- From: sander-martijn lists@severeddreams.com
Date: Wed, 26 Sep 2007 21:39:20 To:support@drupal.org Subject: Re: [support] turn debug on?
ok, that was cute. The devel module seems to have brought my entire site down. Even after deleting it from the modules dir. oh well - looks like i'm done for the night!
dupal1.no wrote:
OK. This is not my strongest side :-D But I will try this idea ; Can this module help you? http://drupal.org/project/devel
sander-martijn skrev:
Thanks - I know those. In this case I'm not looking to see error messages on the screen - I've already eliminated errors. And web developer and firebug are client side tools. What I want is to trace what's happening on the app when there are no errors but things are still not happening as expected. It's clear that drupal already has it built in - I'm just looking to find out how to turn it on.
dupal1.no wrote:
Hi If you only want to se your error-messages on screen you can put this line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to 0.
How do I turn debug on without editing the mysql file?
thanks, .sander
thanks,
I actually went directly into the system table on the database and changed the status and bootstrap columns from 1 to 0 which should disable it. I also deleted the folder from the modules dir. Still, my site is down with a 500 internal server error. Is there anything else this module modifies on install or am I pretty much SOL and having to reinstall? It's not a disaster bc i did this on my dev instance - so I can download from the primary box and reinstall from there - but I'll lose a couple hours to it (mostly in ftp wait time) so it's not ideal.
.s
Michael Prasuhn wrote:
Also fixable from settings.php. At least the disabling the module part....
-Mike
Michael Prasuhn mike@mikeyp.net mikeyp.phone@gmail.com phone 714.356.0168 cell 949.200.7670 fax
-----Original Message----- From: sander-martijn lists@severeddreams.com
Date: Wed, 26 Sep 2007 21:39:20 To:support@drupal.org Subject: Re: [support] turn debug on?
ok, that was cute. The devel module seems to have brought my entire site down. Even after deleting it from the modules dir. oh well - looks like i'm done for the night!
dupal1.no wrote:
OK. This is not my strongest side :-D But I will try this idea ; Can this module help you? http://drupal.org/project/devel
sander-martijn skrev:
Thanks - I know those. In this case I'm not looking to see error messages on the screen - I've already eliminated errors. And web developer and firebug are client side tools. What I want is to trace what's happening on the app when there are no errors but things are still not happening as expected. It's clear that drupal already has it built in - I'm just looking to find out how to turn it on.
dupal1.no wrote:
Hi If you only want to se your error-messages on screen you can put this line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to 0.
How do I turn debug on without editing the mysql file?
thanks, .sander
sander-martijn wrote:
I actually went directly into the system table on the database and changed the status and bootstrap columns from 1 to 0 which should disable it. I also deleted the folder from the modules dir. Still, my site is down with a 500 internal server error. Is there anything else this module modifies on install or am I pretty much SOL and having to reinstall? It's not a disaster bc i did this on my dev instance - so I can download from the primary box and reinstall from there - but I'll lose a couple hours to it (mostly in ftp wait time) so it's not ideal.
Execute:
DELETE FROM variable WHERE name = 'dev_query'; TRUNCATE cache;
http://drupal.org/node/126098 might apply to your situation.
If it's for debugging, I see no problem editing files. Install xdebug/zend debugger for real debugging.
Heine
Yeah I found that this morning - I've tried the long list of possible solutions - deleting references from the systems and variables tables, deleting the devel tables, empty cache tables, run cron.php. still not working.
Honestly the attitude of the maintainers of this module is pretty awful. They're claiming that a warning on the main page is all that is needed and that they shouldn't have to fix the module since it's a bug in zend. Well I was under a crunch last night and quickly and wrongly assumed it was a zend related module - knowing that i had installed no such module I went forward. This module should not allow itself to be installed if the wrong version of zend is present, or as some suggested should disable the buggy functionality. now my site is hosed and none of the prescribed solutions are helping.
The only positive thing about this is that I have a dev environment and installed it on there. I feel really bad for those that are like me only days from launch, install this to debug a problem with a module someone else has stopped maintaining but only have one instance so lose everything. always run at least two (preferably 3) instances of any site in development.
damn. .s
Heine Deelstra wrote:
sander-martijn wrote:
I actually went directly into the system table on the database and changed the status and bootstrap columns from 1 to 0 which should disable it. I also deleted the folder from the modules dir. Still, my site is down with a 500 internal server error. Is there anything else this module modifies on install or am I pretty much SOL and having to reinstall? It's not a disaster bc i did this on my dev instance - so I can download from the primary box and reinstall from there - but I'll lose a couple hours to it (mostly in ftp wait time) so it's not ideal.
Execute:
DELETE FROM variable WHERE name = 'dev_query'; TRUNCATE cache;
http://drupal.org/node/126098 might apply to your situation.
If it's for debugging, I see no problem editing files. Install xdebug/zend debugger for real debugging.
Heine
A full restore of the database from backup was the only thing that fixed the problem. now back to square one with a nonworking location module...
.sander
p.s. - your databases are almost definitely NOT being backed up unless you set it up. I know of no hosts that back up your database for you (and many shared hosts don't back anything up for you). google "cron mysql backup" to find out how to make sure your db gets backed up, or regularly do an export - from PhpMyAdmin if nothing else. It may well save you some day.
sander-martijn wrote:
Yeah I found that this morning - I've tried the long list of possible solutions - deleting references from the systems and variables tables, deleting the devel tables, empty cache tables, run cron.php. still not working.
Honestly the attitude of the maintainers of this module is pretty awful. They're claiming that a warning on the main page is all that is needed and that they shouldn't have to fix the module since it's a bug in zend. Well I was under a crunch last night and quickly and wrongly assumed it was a zend related module - knowing that i had installed no such module I went forward. This module should not allow itself to be installed if the wrong version of zend is present, or as some suggested should disable the buggy functionality. now my site is hosed and none of the prescribed solutions are helping.
The only positive thing about this is that I have a dev environment and installed it on there. I feel really bad for those that are like me only days from launch, install this to debug a problem with a module someone else has stopped maintaining but only have one instance so lose everything. always run at least two (preferably 3) instances of any site in development.
damn. .s
Heine Deelstra wrote:
sander-martijn wrote:
I actually went directly into the system table on the database and changed the status and bootstrap columns from 1 to 0 which should disable it. I also deleted the folder from the modules dir. Still, my site is down with a 500 internal server error. Is there anything else this module modifies on install or am I pretty much SOL and having to reinstall? It's not a disaster bc i did this on my dev instance - so I can download from the primary box and reinstall from there - but I'll lose a couple hours to it (mostly in ftp wait time) so it's not ideal.
Execute:
DELETE FROM variable WHERE name = 'dev_query'; TRUNCATE cache;
http://drupal.org/node/126098 might apply to your situation.
If it's for debugging, I see no problem editing files. Install xdebug/zend debugger for real debugging.
Heine
sander-martijn wrote:
Yeah I found that this morning - I've tried the long list of possible solutions - deleting references from the systems and variables tables, deleting the devel tables, empty cache tables, run cron.php. still not working.
If deleting the dev_query variable doesn't help, I doubt you are experiencing this particular issue. To be sure, manually remove the debug_backtrace from the relevant database.??.inc file ($bt = debug_backtrace();).
Honestly the attitude of the maintainers of this module is pretty awful. They're claiming that a warning on the main page is all that is needed and that they shouldn't have to fix the module since it's a bug in zend. Well I was under a crunch last night and quickly and wrongly assumed it was a zend related module - knowing that i had installed no such module I went forward.
If I get this right; you read the warning, then decided to go ahead anyway?
Zend Optimizer is a Zend (the PHP company) related module and the cause for a lot of pain through the years, but still in use on many hosts.
This module should not allow itself to be installed if the wrong version of zend is present, or as some suggested should disable the buggy functionality. now my site is hosed and none of the prescribed solutions are helping.
The wrong version of Zend is a subtle issue and depends on the PHP version you are on. I am with the module maintainers that they should not step in this sorry mess.
Or, in the words of PHP.net, "Always disable any Zend or other 3rd party extensions (Turck MMCache, ionCube loader, Xdebug, APC) before submitting a *PHP* bug."
The only positive thing about this is that I have a dev environment and installed it on there. I feel really bad for those that are like me only days from launch, install this to debug a problem with a module someone else has stopped maintaining but only have one instance so lose everything. always run at least two (preferably 3) instances of any site in development.
It's painful I'm sure, though I'm not yet convinced your site is unrecoverable, or that you've exhausted investigative possibilities. Of course, sometimes it's much quicker to revert to a backup / different site that to satisfy ones curiosity.
Heine
You might want to get the devel module which has a ton of useful SQL debugging options.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of dupal1.no Sent: Wednesday, September 26, 2007 5:34 PM To: support@drupal.org Subject: Re: [support] turn debug on?
Hi If you only want to se your error-messages on screen you can put this line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location module
is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that
may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support
page as well as edited some sql to eliminate an ambiguity issue - I
got
rid of the errors but not get "Displaying results 1 - 0 of 11 for
search
on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with
the
module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to
0.
How do I turn debug on without editing the mysql file?
thanks, .sander
see the other messages - the module totally hosed my system. no way i'm trying it again. Wish it had worked because it would be useful.
Metzler, David wrote:
You might want to get the devel module which has a ton of useful SQL debugging options.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of dupal1.no Sent: Wednesday, September 26, 2007 5:34 PM To: support@drupal.org Subject: Re: [support] turn debug on?
Hi If you only want to se your error-messages on screen you can put this line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location module
is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that
may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support
page as well as edited some sql to eliminate an ambiguity issue - I
got
rid of the errors but not get "Displaying results 1 - 0 of 11 for
search
on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with
the
module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to
How do I turn debug on without editing the mysql file?
thanks, .sander
Yeah I eventually saw that message. Too bad, cause it's a kickin' module. I have no idea why that would cause your site to be hosed..... It is used by darn near every module developer out there, so you might consider checking the issue queue for issues like what happened to you.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of sander-martijn Sent: Thursday, September 27, 2007 8:10 AM To: support@drupal.org Subject: Re: [support] turn debug on?
see the other messages - the module totally hosed my system. no way i'm
trying it again. Wish it had worked because it would be useful.
Metzler, David wrote:
You might want to get the devel module which has a ton of useful SQL debugging options.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org]
On
Behalf Of dupal1.no Sent: Wednesday, September 26, 2007 5:34 PM To: support@drupal.org Subject: Re: [support] turn debug on?
Hi If you only want to se your error-messages on screen you can put this
line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location
module
is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I
guess it's not. The module doesn't seem to be actively maintained so
I'm stuck debugging it myself. If anyone has any ideas as to why
that
may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the
support
page as well as edited some sql to eliminate an ambiguity issue - I
got
rid of the errors but not get "Displaying results 1 - 0 of 11 for
search
on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with
the
module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to
How do I turn debug on without editing the mysql file?
thanks, .sander
Yeah I found a thread on it - it's not comnpatible with certain version of zend optimizer, shipped with php 5. But instead of fixing the module so that it doesn't install on those versions or disables the little bit of functionality that depends on it, they say it's not their fault and you should update zend (not an option for everyone, especially not people on shared hosts which is where my dev env is) and closed the issue by putting a warning on the main page. Not a very professional approach IMHO, but heck I've only been programming for a decade and a half - what do I know?
.s
Metzler, David wrote:
Yeah I eventually saw that message. Too bad, cause it's a kickin' module. I have no idea why that would cause your site to be hosed..... It is used by darn near every module developer out there, so you might consider checking the issue queue for issues like what happened to you.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of sander-martijn Sent: Thursday, September 27, 2007 8:10 AM To: support@drupal.org Subject: Re: [support] turn debug on?
see the other messages - the module totally hosed my system. no way i'm
trying it again. Wish it had worked because it would be useful.
Metzler, David wrote:
You might want to get the devel module which has a ton of useful SQL debugging options.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org]
On
Behalf Of dupal1.no Sent: Wednesday, September 26, 2007 5:34 PM To: support@drupal.org Subject: Re: [support] turn debug on?
Hi If you only want to se your error-messages on screen you can put this
line in you htaccess-file:
php_flag display_errors on (remember to take it away when you are finis.
But Firefox hav some fine tools: *Web Developer* and *Firebug*. I use them all the time.
sander-martijn skrev:
Hi,
I'm trying to debug an issue with the queries that the location
module
is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I
guess it's not. The module doesn't seem to be actively maintained so
I'm stuck debugging it myself. If anyone has any ideas as to why
that
may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the
support
page as well as edited some sql to eliminate an ambiguity issue - I
got
rid of the errors but not get "Displaying results 1 - 0 of 11 for
search
on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with
the
module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to
How do I turn debug on without editing the mysql file?
thanks, .sander
Follow the example at the bottom of settings.php for overriding variables.
-Mike
__________________ Michael Prasuhn mike@mikeyp.net mikeyp.phone@gmail.com phone 714.356.0168 cell 949.200.7670 fax
-----Original Message----- From: sander-martijn lists@severeddreams.com
Date: Wed, 26 Sep 2007 20:23:16 To:support@drupal.org Subject: [support] turn debug on?
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not. I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself. If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
I found in database.mysql.inc the following: if ($debug)... which is a variable that gets passed to the function and defaults to 0.
How do I turn debug on without editing the mysql file?
thanks, .sander
Hello,
I've been following this thread, and have a couple suggestions --
sander-martijn wrote:
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not.
I would have to say that the location.module works pretty well -- we have deployed it on a variety of sites over the last year and have had minimal issues.
I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself.
Debugging code is pretty standard. The time spent debugging/customizing is still less than the time required to build it from scratch. Your initial statement reads as if you are criticizing a developer who has put a lot of time into writing code that you now want to leverage. The last commit to this module was August 23rd, just over a month ago, which is pretty recent. I don't know if your intent was to level criticism, but it came across that way to me. If you want more focused attention, you might want to try a short term support deal with the dev -- you pay him to help solve your problems. It would save you time and frustration, and would get more focused attention on the module from a person who knows it well.
If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
There are now a few different variables to troubleshoot -- the integrity of the module, the integrity of the patch, and the integrity of new code.
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
Have you looked at the MySQL query log? http://dev.mysql.com/doc/refman/5.0/en/query-log.html
Good luck in solving your issues, and I hope that these suggestions are helpful.
Cheers,
Bill
Hi,
I'm sorry if my post was misunderstood. I was far from criticizing others for their hard and usually free work. I am more than grateful for how much work is already done with drupal. I am simply a tired, stressed developer who has already lost money on the job (long story) so can't afford to pay anyone to help and am close to launch with some bugs on major pieces of functionality, and if anything it was that stress coming through.
I have no problem doing the debugging work myself and am quite used to it - I wanted to make it clear the paths I've already gone down before posting to the list, both to save people time and to show that I'm not turning to the list for free advice for things I should be able to figure out on my own.
Also I should not have said not maintained, but rather not well supported. While there was a commit on 8/23 I was referring to the many open issues and submitted patches that are important fixes and in many cases have been around for a while but have not been rolled into that commit. And I'm not criticizing the developer for it, just pointing out that this close to release I cannot expect it to be fixed on the module in the time I need without paying, which I unfortunately cannot afford to do.
I am sorry if my post came off as offensive - it was certainly not intended that way. I'm just tired.
regards, sander
Bill Fitzgerald wrote:
Hello,
I've been following this thread, and have a couple suggestions --
sander-martijn wrote:
Hi,
I'm trying to debug an issue with the queries that the location module is performing. Basically it works flawlessly when logged in but not when you're not.
I would have to say that the location.module works pretty well -- we have deployed it on a variety of sites over the last year and have had minimal issues.
I erred earlier thinking it was working fine, but I guess it's not. The module doesn't seem to be actively maintained so I'm stuck debugging it myself.
Debugging code is pretty standard. The time spent debugging/customizing is still less than the time required to build it from scratch. Your initial statement reads as if you are criticizing a developer who has put a lot of time into writing code that you now want to leverage. The last commit to this module was August 23rd, just over a month ago, which is pretty recent. I don't know if your intent was to level criticism, but it came across that way to me. If you want more focused attention, you might want to try a short term support deal with the dev -- you pay him to help solve your problems. It would save you time and frustration, and would get more focused attention on the module from a person who knows it well.
If anyone has any ideas as to why that may happen or what to look for I would greatly appreciate it (i've already patched the module with a patch someone offered on the support page as well as edited some sql to eliminate an ambiguity issue - I got rid of the errors but not get "Displaying results 1 - 0 of 11 for search on 05401" for a search that has 11 results if you're logged in).
There are now a few different variables to troubleshoot -- the integrity of the module, the integrity of the patch, and the integrity of new code.
That said I have a more general question that has nothing to do with the module. I want to find out what the queries are that are getting executed on the database so that I can a. compare them to the code (i discovered while debugging the first issue that the queries executed are not always the same as t b. run them directly on the db and see what I get
Have you looked at the MySQL query log? http://dev.mysql.com/doc/refman/5.0/en/query-log.html
Good luck in solving your issues, and I hope that these suggestions are helpful.
Cheers,
Bill
For those that have been following this thread, I did finally find what the problem was. Unfortunately I don't have the time right now to figure out why it's a problem and therefore would not feel comfortable submitting a patch with an explanation.
The problem was with the following line in location.module: $result = pager_query(db_rewrite_sql($query), 10, 0, $count_query, db_rewrite_sql($query_args));
Specifically, it was the db_rewrite_sql method. Removing it results in the following line: $result = pager_query($query, 10, 0, $count_query, $query_args);
This works. I read through the api documentation for a bit at http://api.drupal.org/api/function/db_rewrite_sql/5 and believe it has something to do with "nid is rewritten if needed" since I was getting an "nid is ambiguous" error earlier. However since I can't be positive as to why that function was being used and whether it is indeed necessary in certain cases, I will refrain from submitting a patch.
I will review this more thoroughly when I have more time, but I wanted to thank all those that helped with the approach to take for debugging this. Not only did it help me in this case but I have a much better idea of what to do to debug module issues in the future.
Thanks everyone, .sander
Quoting sander-martijn lists@severeddreams.com:
The problem was with the following line in location.module: $result = pager_query(db_rewrite_sql($query), 10, 0, $count_query, db_rewrite_sql($query_args));
Specifically, it was the db_rewrite_sql method. Removing it results in the following line: $result = pager_query($query, 10, 0, $count_query, $query_args);
After reviewing the CVS code I think you want $result = pager_query(db_rewrite_sql($query), 10, 0, $count_query, $query_args);
This works. I read through the api documentation for a bit at
I don't know if this will help (read: work). I do know that the code in HEAD is completely different than the code for the DRUPAL-5 tag.
http://api.drupal.org/api/function/db_rewrite_sql/5 and believe it has something to do with "nid is rewritten if needed" since I was getting an "nid is ambiguous" error earlier. However since I can't be positive as to why that function was being used and whether it is indeed necessary in certain cases, I will refrain from submitting a patch.
It is part of the API that allows for the use of multiple databases on differing servers. If you don't have multiple databases, then you don't need it; but ...
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/