Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-11-15 13:59:04

semanio
Member
Registered: 2005-10-18
Posts: 20

Textpattern 4.0.4 showing MySQL Errors on invalide log-in to admin are

Hello,

I’m running Textpattern 4.0.4 at MediaTemple’s previous Shared Server environment. For woodcreekdental.com if you log-in to the admin area incorrectly I get the following MySQL message at the top of the page above the yellow Textpattern banner/logo:

Warning: You have an error in your SQL syntax near '(lower('password')) or pass = old_password('password')) and privs > 0' at line 2 select name from main_txp_users as txp_users where name = 'user' and (pass = old_password(lower('password')) or pass = old_password('password')) and privs > 0 in /home/virtual/site244/fst/var/www/html/textpattern/lib/txplib_db.php on line 84

FYI. I have the same Textpattern 4.0.4 running on MediaTemple’s new GridServers and I do not receive this error at the top of the page with an invalid log-in. Also, to rule out any personal plug-ins I have written I turned them all off and still received the same error.

To further help diagnose the issue I’ve provided the diagnosis file below:

Textpattern version: 4.0.4 (r1956)
Last Update: 2006-10-19 03:18:50/2006-10-19 02:53:53
Document root: --removed for security--
$path_to_site: --removed for security--
Textpattern path: --removed for security--
Permanent link mode: section_title
Temporary directory path: --removed for security--
Site URL: woodcreekdental.com
PHP version: 4.4.1
Register globals: 1
Server Local Time: 2006-11-15 05:38:22
MySQL: 3.23.58
Locale: en_US.UTF-8
Server: Apache/2.0.46 (Red Hat)
PHP Server API: apache2filter
RFC 2616 headers: 
Server OS: Linux 2.4.21-37.ELsmp
Active plugins: ob1_title-2.1, ob1_if_section-0.2m, rss_admin_show_adv_opts-0.2, nlh_article_max_sortorder-0.9.6, upm_savenew-0.3.1, nlh_article_order-0.7.5m, nlh_sitemap_nav-0.8.7, nlh_article_nav_custom-1.1.9, nlh_section_nav_custom-0.8.9, ign_password_protect-0.4.2, kml_flashembed-1.1, zem_contact_reborn-4.0.3.17, zem_contact_lang-4.0.3.03, mdn_if_section-2.1, nlh_flashspot_mgmt-0.9.2.1m, nlh_lb_gallery-0.5.0, mem_randimg-0.3m, tcm_if_article_image-0.1m, upm_image-0.4.5m, upm_insert_tab-0.2.2, upm_img_popper-1.1, rss_google_map-0.3, nlh_smileGallery_display-0.5.2m, upm_file_packets-0.3.2m, nlh_specialist_mgmt-0.5.6, nlh_specialist_cats-0.5.5, nlh_specialist_display-0.4.5, zem_link-0.6.1m, mdn_if_custom-1.1
------------------------
htaccess file contents: 
------------------------
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/
------
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule ^(.+) - [PT,L]
 ------
 RewriteRule ^(.*) index.php
</IfModule>
------
#php_value register_globals 0
------------------------

Any help would be appriciated; if i must I can upgrade this site to the new GridServers which run a newer version of PHP and MySQL 4.1.11.

Best Regards,
Nate Hanna

Last edited by semanio (2006-11-15 13:59:59)

Offline

#2 2006-11-15 14:07:23

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Textpattern 4.0.4 showing MySQL Errors on invalide log-in to admin are

It’s related to the MySQL version used. The ‘old_password’ function was introduced in MySQL 4.0.11. Your MySQL version is older so it gives an error. I think this is a bug in TXP.

Offline

#3 2006-11-15 14:12:06

semanio
Member
Registered: 2005-10-18
Posts: 20

Re: Textpattern 4.0.4 showing MySQL Errors on invalide log-in to admin are

Ruud,

Thanks for the reply. I hope that this is a bug and it can be resolved soon for I hate nasty MySQL messages.

For the long haul, I plan on moving the site to MediaTemple’s GridServer which run MySQL 4.1.11 and PHP 5.1.6. I would have already but lately the GridServer is a bit buggy since it was released last month so I’m waiting for the issues to get resolved before I move the site.

Best Regards,
Nate Hanna

Offline

#4 2006-11-17 13:21:29

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Textpattern 4.0.4 showing MySQL Errors on invalide log-in to admin are

It’s a bug… and it isn’t. The use of old_password is intentional, but you shouldn’t try and use it unless you’re sure it is available.

Offline

#5 2007-03-30 19:09:08

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: Textpattern 4.0.4 showing MySQL Errors on invalide log-in to admin are

Mary wrote:

It’s a bug… and it isn’t. The use of old_password is intentional, but you shouldn’t try and use it unless you’re sure it is available.

I got this same error when a client tried to log in unsuccessfully to a 4.0.4 TXP site running on a 3.24 MySQL server. It’s not a bug in so far as the use of old_password is intentional. It is however an oversight of TXP to use it without first testing to see if the version of MySQL supports it – by parsing the version # out of mysql_get_client_info() or something. In my case I just commented the lines out of include/txp_auth.php – but I’m sure one of the developers could add a more elegant catch for that.


Travel Atlas * Org | Start Somewhere

Offline

#6 2007-05-17 18:59:43

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Textpattern 4.0.4 showing MySQL Errors on invalide log-in to admin are

This should be fixed in revision 2356

Offline

Board footer

Powered by FluxBB