[SOLVED] Debug shows error in sql syntax jdatabasemysql qyery 1064,

9 years 1 month ago #141618 by sfraise
With debug mode on I get the following when sh404sef is enabled:
I'm experiencing high spikes in cpu load caused by php so I'm trying to go through the debug mode to find issues with the code. With debug on without being logged in it's fine, but when you log in you get a 500 error with the following:
JDatabaseMySQL::query: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 SQL=SELECT username FROM jos_users WHERE id=

Call stack
# Function Location
1 JSite->render() /home/oohyane/public_html/index.php:79
2 JDocumentHTML->render() /home/oohyane/public_html/includes/application.php:168
3 JDocumentHTML->_parseTemplate() /home/oohyane/public_html/libraries/joomla/document/html/html.php:249
4 JDocumentHTML->getBuffer() /home/oohyane/public_html/libraries/joomla/document/html/html.php:386
5 JDocumentRendererModules->render() /home/oohyane/public_html/libraries/joomla/document/html/html.php:190
6 JDocumentRendererModule->render() /home/oohyane/public_html/libraries/joomla/document/html/renderer/modules.php:41
7 JModuleHelper->renderModule() /home/oohyane/public_html/libraries/joomla/document/html/renderer/module.php:84
8 require() /home/oohyane/public_html/libraries/joomla/application/module/helper.php:173
9 cbPluginHandler->trigger() /home/oohyane/public_html/modules/mod_cblogin/mod_cblogin.php:460
10 cbPluginHandler->call() /home/oohyane/public_html/administrator/components/com_comprofiler/plugin.class.php:509
11 call_user_func_array() /home/oohyane/public_html/administrator/components/com_comprofiler/plugin.class.php:551
12 getprofilebookTab->onAfterLogoutForm()
13 cbTabHandler->_getAbsURLwithParam() /home/oohyane/public_html/components/com_comprofiler/plugin/user/plug_cbprofilebook/cb.profilebook.php:169
14 cbSef() /home/oohyane/public_html/administrator/components/com_comprofiler/plugin.class.php:3072
15 CBframework->cbSef() /home/oohyane/public_html/administrator/components/com_comprofiler/plugin.foundation.php:2469
16 call_user_func_array() /home/oohyane/public_html/administrator/components/com_comprofiler/plugin.foundation.php:2121
17 JRoute::_()
18 shRouter->build() /home/oohyane/public_html/libraries/joomla/methods.php:54
19 JRouter->build() /home/oohyane/public_html/plugins/system/shsef.php:250
20 shRouter->_buildSefRoute() /home/oohyane/public_html/libraries/joomla/application/router.php:167
21 shSefRelToAbs() /home/oohyane/public_html/plugins/system/shsef.php:405
22 sef_404->create() /home/oohyane/public_html/administrator/components/com_sh404sef/sh404sef.class.php:1665
23 include() /home/oohyane/public_html/components/com_sh404sef/sef_ext.php:300
24 JDatabaseMySQL->loadResult() /home/oohyane/public_html/components/com_sh404sef/sef_ext/com_comprofiler.php:184
25 JDatabaseMySQL->query() /home/oohyane/public_html/libraries/joomla/database/database/mysql.php:355
26 JError->raiseError() /home/oohyane/public_html/libraries/joomla/database/database/mysql.php:231
27 JError->raise() /home/oohyane/public_html/libraries/joomla/error/error.php:171
28 JException->__construct() /home/oohyane/public_html/libraries/joomla/error/error.php:136

Anyone know what exactly is causing this and recommendations to fix it?
With sh404sef not enabled I don't get this error.

I posted in the sh404sef forum but they seem to think that the issue lies with community builder, any thoughts? I've been getting really high cpu spikes from php and have been trying to find what exactly is causing it. I've tuned mysql pretty tight and I've configured apache and php to run on fastcgi with worker, running eaccelerator, memcached/mod_memcache and have joomla set to use memcache as the cache method and set the php.ini to use memcached as the php session handler. The cpu will run steady at .2 - 2 for a while then spike to as high as over 100 at times, however it seems since upgrading to the latest sh404sef version it's only been spiking to around 11-20.

Post edited by: krileon, at: 2010/09/10 21:20
9 years 1 month ago #141695 by krileon

With sh404sef not enabled I don't get this error.

That's your answer. Please review the call stack. The error is clearly coming from sh404sefs community builder integration.

components/com_sh404sef/sef_ext/com_comprofiler.php:184

The query causing the problem is in the above file at the above line of code. You'll need to discuss this issue with the extensions developers.

I posted in the sh404sef forum but they seem to think that the issue lies with community builder, any thoughts?

They're wrong.

however it seems since upgrading to the latest sh404sef version it's only been spiking to around 11-20.

3rd party SEF are general inefficient and/or broken. This is why we only support native Joomla SEF. 3rd party SEF also do not use internal methods which means they'll SEF pretty much any internal URL on the page, which is not the case as internally API can tell a URL NOT to SEF, but the 3rd party extension will ignore this.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
9 years 1 month ago #141771 by sfraise
Thanks for the reply Kyle.

That's pretty much the same thing I told them in my reply back the other day and suggested the problem lied in the cb integration. It didn't make sense to blame CB when it only happened with sh404sef enabled. They came around to the idea and are having their programmers look into it and are supposed to get back to me on it.

I'll post what I find out after they get back to me.
9 years 1 month ago #141841 by krileon

I'll post what I find out after they get back to me.

Please do as may assist other users with similar issues.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Templates - CBSubs - Hosting - Forge - Incubator - GroupJive
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM EST to 4:00 PM EST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
9 years 1 month ago #141863 by sfraise
The sh404sef guys said they found the issue and are getting it fixed in the next release which should be out in a few days.
Moderators: beatnantkrileon
Time to create page: 0.382 seconds
Facebook Twitter Google LinkedIn