Page 1 of 2

[SOLVED] mysql_driver.inc error

Posted: Tue Apr 16, 2013 11:18 pm
by postiffm
Has anyone seen an error like this:

Notice: Undefined offset: 2 in /home/fbcaaorg/public_html/cms/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc on line 320

at

http://www.fbcaa.org/cms/home

Matt

Re: mysql_driver.inc error

Posted: Wed Apr 17, 2013 1:22 am
by Jo Morg

Re: mysql_driver.inc error

Posted: Wed Apr 17, 2013 1:48 am
by postiffm
Sorry...was just wondering if anyone had a thought quickly. Here's a more complete report of what I have going on:

Haven't changed the site in any substantive way in a few days. Error seems to have popped up. It is always reproducible.

www.fbcaa.org/cms/

Right after the <head> tag, the page has this:

<br />
<b>Notice</b>: Undefined offset: 2 in <b>/home/fbcaaorg/public_html/cms/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc</b> on line <b>320</b><br />


All the following error messages are displayed:

Notice: Undefined offset: 2 in /home/fbcaaorg/public_html/cms/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc on line 320

Notice: Undefined index: prevnode in /home/fbcaaorg/public_html/cms/tmp/templates_c/4c6e1b54de2519b42ee2730f41c81d60^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 47

Notice: Trying to get property of non-object in /home/fbcaaorg/public_html/cms/tmp/templates_c/4c6e1b54de2519b42ee2730f41c81d60^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 47

Notice: Trying to get property of non-object in /home/fbcaaorg/public_html/cms/tmp/templates_c/4c6e1b54de2519b42ee2730f41c81d60^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 47
Notice: Undefined index: collapseopened in /home/fbcaaorg/public_html/cms/tmp/templates_c/4c6e1b54de2519b42ee2730f41c81d60^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 90

Notice: Trying to get property of non-object in /home/fbcaaorg/public_html/cms/tmp/templates_c/4c6e1b54de2519b42ee2730f41c81d60^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 90
onclick="expandcontent('sub7')" style="cursor:pointer">

I am running 1.11.5. Modules installed:

Name Version Status Active Action Cachable Help About Export
CGBlog 1.9.12 Installed Uninstall No Help About
CGExtensions 1.32.2 Installed
Has Dependents (CGBlog, CGFeedMaker, FrontEndUsers, SelfRegistration, SiteMapMadeSimple) No Help About
CGFeedMaker 1.0.17 Installed Uninstall No Help About
CGSimpleSmarty 1.6 Installed
Has Dependents (CGBlog) No Help About
CMSForms 1.0.8 Installed
Has Dependents (Twitter) No Help About
CMSMailer 5.2.1 Installed
Has Dependents (FrontEndUsers, SelfRegistration, FormBuilder) No Help About
CMSPrinting 1.0.4 Installed Uninstall No Help About
Captcha 0.4.6 Installed Uninstall No Help About
CustomContent 1.8.3 Installed Uninstall No Help About
FileManager 1.4.3 Installed Uninstall No Help About
FormBuilder 0.7.3 Installed Uninstall No Help About
FrontEndUsers 1.21.2 Installed
Has Dependents (SelfRegistration, CustomContent) No Help About
MenuManager 1.8.5 Installed Uninstall No Help About
MicroTiny 1.2.5 Installed Uninstall No Help About
ModuleManager 1.5.5 Installed Uninstall No Help About
News 2.12.12 Installed Uninstall Yes Help About
SEOTools2 1.1.1 Installed Uninstall No Help About
Search 1.7.8 Installed Uninstall No Help About
SelfRegistration 1.7.4 Installed Uninstall No Help About
ThemeManager 1.1.8 Installed Uninstall No Help About
Twitter 1.10 Installed Uninstall No Help About


CMS Config Settings
php_memory_limit
process_whole_template
output_compression
max_upload_size 2000000
url_rewriting mod_rewrite
page_extension
query_var page
image_manipulation_prog GD
auto_alias_content true
locale
default_encoding utf-8
admin_encoding utf-8
set_names true
debug false
root_url http://fbcaa.org/cms
ssl_url https://fbcaa.org/cms
root_path /home/fbcaaorg/public_html/cms (0755)
previews_path /home/fbcaaorg/public_html/cms/tmp/cache (0755)
uploads_path /home/fbcaaorg/public_html/cms/uploads (0755)
uploads_url http://fbcaa.org/cms/uploads
image_uploads_path /home/fbcaaorg/public_html/cms/uploads/images (0755)
image_uploads_url http://fbcaa.org/cms/uploads/images
ssl_uploads_url https://fbcaa.org/cms/uploads
use_smarty_php_tags

PHP Information
Current PHP Version (phpversion) 5.4.8
md5 function (md5_function) On (True)
GD version (gd_version) 2
tempnam function (tempnam_function) On (True)
Magic quotes in runtime (magic_quotes_runtime) Off (False)
Is E_STRICT disabled in error_reporting (E_STRICT) E_STRICT is enabled in the error_reporting
Is E_DEPRECATED disabled in error_reporting (E_DEPRECATED) E_DEPRECATED is enabled
PHP Effective Memory Limit (memory_limit) 128M
Maximum Execution Time (max_execution_time) 30
PHP output_buffering (output_buffering) 4096
PHP Safe Mode (safe_mode) Off (False)
File uploads (file_uploads) On (True)
Maximum Post Size (post_max_size) 8M
Maximum Upload Size (upload_max_filesize) 2M
Session Save Path (session_save_path) /tmp (1777)
Sessions are allowed to use Cookies (session_use_cookies) On (True)
Basic XML (expat) support (xml_function) On (True)
Checking for the XMLReader class (xmlreader_class) On (True)
Checking if the httpd process can create a file inside of a directory it created (create_dir_and_file)
PHP register_globals (register_globals) Off (False)
disable_functions in PHP (disable_functions)
PHP Open Basedir (open_basedir)
Test for remote URL (test_remote_url)
fsockopen: Connection ok!
fopen: When allow url fopen is disabled you will not be able to accessing URL object like file using the ftp or http protocol.
Test ini_set (check_ini_set) On (True)
Test for the curl library (curl) On
Test curl version (curlversion) version 7.24.0, minimum recommended version is 7.19.7

Server Information
Server API (server_api) cgi-fcgi
Server Database (server_db_type) mysql (mysql)
Server Database Version (server_db_version) 5.5.28
Check database access levels (server_db_grants) found a "grant all" statement that appears to be suitable
Server Software (server_software) apache
Server Operating System (server_os) linux 2.6.32-379.22.1.lve1.2.14.el6.x86_64 on x86_64

Permission Information
tmp /home/fbcaaorg/public_html/cms/tmp (0755)
templates_c /home/fbcaaorg/public_html/cms/tmp/templates_c (0755)
modules /home/fbcaaorg/public_html/cms/modules (0755)
File Creation Mask (umask) /home/fbcaaorg/public_html/cms/tmp/cache (0755)
config_file 0644
config.php writable. It is more safe if you change permission to read-only

I did clear the cache after encountering the error, with no improvement.

Re: mysql_driver.inc error

Posted: Wed Apr 17, 2013 2:09 am
by Jo Morg
I'm not sure what is causing the errors but, usually Warnings and Notices are normal and shouldn't(*) disrupt the normal behavior of the scripts. That's why on production sites you should have:
On PHP.ini

Code: Select all

display_startup_errors = Off
or as an alternative
On .htaccess File

Code: Select all

# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_value docref_root 0
php_value docref_ext 0
in which case you would need to look in the log file to see if there are any fatal errors, when and if anything doesn't work as it should.
But as long as the site works well, all you really need is to suppress the displaying of errors.
HTH

(*) edit: I had should there by mistake...

Re: mysql_driver.inc error

Posted: Wed Apr 17, 2013 3:09 am
by postiffm
My immediate concern, then, would be "Why are the errors appearing now when they have never appeared before?" What has broken that wasn't broken before? As a general software engineering rule, I don't like to just "turn errors off" when I don't clearly understand why they are there.

I suspect something changed with php on my host, a2hosting. I see that they are now offering php versions 5.4.13 and 5.5.0beta2, which they were not offering few weeks ago when I upgraded to 5.4.8. Maybe they changed a setting...like turned on error reporting when it was off all this time.

Thanks for the tip.

Matt

Re: mysql_driver.inc error

Posted: Wed Apr 17, 2013 2:18 pm
by Jo Morg
postiffm wrote:My immediate concern, then, would be "Why are the errors appearing now when they have never appeared before?" What has broken that wasn't broken before? As a general software engineering rule, I don't like to just "turn errors off" when I don't clearly understand why they are there.
I understand that :) but errors on production sites should be silently logged, to not give any data to the public that should not be public.
postiffm wrote:I suspect something changed with php on my host, a2hosting. I see that they are now offering php versions 5.4.13 and 5.5.0beta2, which they were not offering few weeks ago when I upgraded to 5.4.8. Maybe they changed a setting...like turned on error reporting when it was off all this time.
Yup I got that suspicion too when you posted your system info, and visited the site. All appeared to be working without fatal errors, but that wouldn't rule out other possible issues as I couldn't possibly know if there wasn't anything missing.
If there wasn't any other change on the site, I figured it had to be a host settings change.

Re: mysql_driver.inc error

Posted: Wed Apr 17, 2013 2:24 pm
by calguy1000

Code: Select all

<head>
<br />
<b>Notice</b>:  Undefined offset: 2 in <b>/home/fbcaaorg/public_html/cms/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc</b> on line <b>320</b><br />
This indicates that something is generating a malformed sql query.
Thankfully the hint is that it is being called at the top of the <head> section of your template.... you will have to investigate what is being called there, and see if you can de-activate it,or fix it.

I bet it's probably SeoTools2 ...

Re: mysql_driver.inc error

Posted: Wed Apr 17, 2013 2:28 pm
by Jo Morg
calguy1000 to the rescue :D.

Re: mysql_driver.inc error

Posted: Wed Apr 17, 2013 3:05 pm
by a2hostingandy
Hi there,

Thanks for posting about the E_Notice and E_Warnings - we did introduce a new version of PHP to our selector yesterday, while that normally does not change any of the settings for existing installations of PHP, that doesn't mean the two are not inter-related. We're taking a look to see if anything we did could have triggered the change to the error setting level.

The .htaccess fix is the quickest way to handle this - if you need any other help let me know and if we find anything on our end that did cause the change I'll post a followup so you know.

Thanks,
Andy M.
A2 Hosting Community Manager

Re: mysql_driver.inc error

Posted: Thu Apr 18, 2013 1:57 am
by postiffm
Hi all,

Thanks for the help. I commented out {SEOTools2} for now, but only the first error message went away. The others remain, having to do with the menu system. If I remove {menu} then all the errors go away, along with my menu :-). I will start looking into these a bit more now.

Andy M. @ a2hosting - my ticket on your system is XAP-751892. No one seems to have interacted on there.

Matt

Errors remaining:

Notice: Undefined index: prevnode in /home/fbcaaorg/public_html/cms/tmp/templates_c/3f44f6678b4daeb1c2915a278fd1dbda^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 47

Notice: Trying to get property of non-object in /home/fbcaaorg/public_html/cms/tmp/templates_c/3f44f6678b4daeb1c2915a278fd1dbda^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 47

Notice: Trying to get property of non-object in /home/fbcaaorg/public_html/cms/tmp/templates_c/3f44f6678b4daeb1c2915a278fd1dbda^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 47

Notice: Undefined index: collapseopened in /home/fbcaaorg/public_html/cms/tmp/templates_c/3f44f6678b4daeb1c2915a278fd1dbda^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 90

Notice: Trying to get property of non-object in /home/fbcaaorg/public_html/cms/tmp/templates_c/3f44f6678b4daeb1c2915a278fd1dbda^d56912f174519eded6223b12277b93053e882d23.module_db_tpl.MenuManager;section_expand.php on line 90
onclick="expandcontent('sub7')" style="cursor:pointer">

Re: mysql_driver.inc error

Posted: Thu Apr 18, 2013 2:10 am
by postiffm
Upraded to SEOTools 1.2. My original first error now expands to several. I'm sending these to the module author as well.

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/fbcaaorg/public_html/cms/modules/SEOTools2/action.default.php on line 81

Warning: implode(): Invalid arguments passed in /home/fbcaaorg/public_html/cms/modules/SEOTools2/action.default.php on line 81

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/fbcaaorg/public_html/cms/modules/SEOTools2/action.default.php on line 82

Warning: implode(): Invalid arguments passed in /home/fbcaaorg/public_html/cms/modules/SEOTools2/action.default.php on line 82

Notice: Use of undefined constant ENT_QU0TES - assumed 'ENT_QU0TES' in /home/fbcaaorg/public_html/cms/modules/SEOTools2/action.default.php on line 175

Warning: htmlspecialchars() expects parameter 2 to be long, string given in /home/fbcaaorg/public_html/cms/modules/SEOTools2/action.default.php on line 175

Re: mysql_driver.inc error

Posted: Thu Apr 18, 2013 12:03 pm
by postiffm
calguy, regarding your suggestion about SEOTools2...the module author says that

Code: Select all

<head>
<br />
<b>Notice</b>:  Undefined offset: 2 in <b>/home/fbcaaorg/public_html/cms/lib/adodb_lite/adodbSQL_drivers/mysql/mysql_driver.inc</b> on line <b>320</b><br />
is a CMSMS core conflict and something he cannot help with. He said best idea is to let the dev team know.

SEOTools2 has not been tested with php 5.4+ so some of my other errors (htmlspecialchars) have to do with type casting.

Matt

Re: mysql_driver.inc error

Posted: Thu Apr 18, 2013 1:16 pm
by a2hostingandy
Did you place the lines in your .htaccess file as described earlier in this thread? None of those are errors that you should be worried about. Notices and Warnings are simply to point out places where programmers can make their code more efficient. They are not functionality errors and will not affect the functionality of your website. If you placed the lines in your .htaccess they should go away, specifically

Code: Select all

php_flag display_errors off
should do the trick.

-Andy

Re: SEOTools2 Errors

Posted: Thu Apr 18, 2013 10:02 pm
by storm
hi all,
i have the same errors with the SEOTool2:

Code: Select all

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /mnt/webd/b3/63/53091963/htdocs/modules/SEOTools2/action.default.php on line 81
Warning: implode(): Invalid arguments passed in /mnt/webd/b3/63/53091963/htdocs/modules/SEOTools2/action.default.php on line 81
Warning: htmlspecialchars() expects parameter 1 to be string, array given in /mnt/webd/b3/63/53091963/htdocs/modules/SEOTools2/action.default.php on line 82
Warning: implode(): Invalid arguments passed in /mnt/webd/b3/63/53091963/htdocs/modules/SEOTools2/action.default.php on line 82
Warning: htmlspecialchars() expects parameter 2 to be long, string given in /mnt/webd/b3/63/53091963/htdocs/modules/SEOTools2/action.default.php on line 175
my problem is, my hoster denys the:

Code: Select all

php_flag display_errors off
in the .htaccess

what can i else do to remove those errors?

Re: mysql_driver.inc error

Posted: Thu Apr 18, 2013 10:09 pm
by a2hostingandy
If your host offers a custom php.ini (many do) you can edit the file and set

Code: Select all

error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING
If they do not allow custom php.ini - you can check in your control panel for an error level setting, or perhaps just contact them directly and ask how they support turning of warnings and notices.

-Andy