0.9.1 and MySQL 5.0.16

Found a bug? Tell us!!
Post Reply
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

0.9.1 and MySQL 5.0.16

Post by joho »

I just moved my S9Y-blog from a MySQL 4.0.x-server to MySQL 5.0.16 and got this:

Code: Select all

Query failed:

SELECT 
                    e.id,
                    e.title,
                    e.timestamp,
                    e.comments,
                    e.exflag,
                    e.authorid,
                    e.trackbacks,
                    e.isdraft,
                    e.allow_comments,
                    e.last_modified,
                    [..]

 / No database selected
I have changed nothing else, except for the hostname in the S9Y configuration file?!?!

PHP 4.4.1 is running on the server, with the MYSQL-extensions (not MYSQLI) compiled into it (from the MySQL 5-client library of course).
At the end of a smile, there is a laugh and a 1/2 [DAD]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: 0.9.1 and MySQL 5.0.16

Post by garvinhicking »

You should use mysqli if connecting to MySQL > 4.1.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

Post by joho »

How does that matter?
I run on a host with only MySQL-extensions installed, not MySQLI.
I mean, S9Y must be doing something it shouldn't if it doesn't work all of a sudden, no?

I have moved other applications and they work fine, without utilizing the MySQLI extensions.
At the end of a smile, there is a laugh and a 1/2 [DAD]
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

Post by joho »

And getting MYSQLI and MYSQL extensions both to work with PHP 4.4.1 is no problem? When compiled with MYSQL 5.0.16 client libraries?
At the end of a smile, there is a laugh and a 1/2 [DAD]
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

Post by joho »

From the PHP manual, a user comment:
jedifreeman at comcast dot net
21-Mar-2005 10:49
It should be noted here that mysqli is a PHP 5 only extension.
At the end of a smile, there is a laugh and a 1/2 [DAD]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Okay, my experience was that connecting to MySQL 5 with the usual mysql library exposes problems.

The error you're getting somes because serendipity is not able to "select" (use) your database. That can happen if:

1. Your serendipity_config_lcaol.inc.php file contains an empty dbName parameter

2. Your user account does not have privileges on the user account

3. Your mysql library is broken and cannot properly issue a mysql_select_db() call

At least those are the 3 things that instantly come to my mind...

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

Post by joho »

Do you think it helps if, when moving from one MySQL-server to another, I set-up the proper privileges for the S9Y-user? :oops:

Duh! :shock:

Everything works; so it's now PHP 4.4.1, MySQL 5.0.16-client libraries talking with a MySQL 5.0.16 server; using the MySQL-extension in S9Y.
At the end of a smile, there is a laugh and a 1/2 [DAD]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yay, great we solved it. Sorry it took so long, I really thought it were mysqli related! :(

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply