mysql_fetch_object error with PHP 5.3.6 [SOLVED] (Windows Server 2003)

t.schutter

Joined: 2012-09-16
Posts: 2
Posted: Sun, 2012-09-16 22:06

I am installing Gallery 3.0.4 for the first time. When I browse to the installer, I get this error message:

PHP Fatal error: Call to undefined function mysql_fetch_object() in /gallery3/installer/installer.php on line 120

This sounds exactly like the problem described at http://gallery.menalto.com/node/98344, but their solution was to use PHP 5.2 instead of PHP 6. I am using PHP 5.3, and downgrading to 5.2 is a difficult procedure for me.

I am installing on OpenBSD 5.0.

$ pkg_info -I php mysql-server mysql-client php-mysqli-5.3.6
php-5.3.6p1 server-side HTML-embedded scripting language
mysql-server-5.1.54p9 multithreaded SQL database (server)
mysql-client-5.1.54p0 multithreaded SQL database (client)
php-mysqli-5.3.6 mysql database access extensions for php5

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2012-09-17 03:02
Quote:
Call to undefined function mysql_fetch_object(

Perhaps your version of php does not have the mysql_fetch_object() enabled? It is a php function not a gallery function.
I'm no server expert so just guessing here.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
raaaphii

Joined: 2012-09-17
Posts: 3
Posted: Mon, 2012-09-17 05:34

I have the same problem.

Always the error message:
PHP Fatal error: Call to undefined function mysql_fetch_object() in /gallery3/installer/installer.php on line 120

I have already searched how to enable this php function but i can't find something about that.

Who can help?

Raphi

 
t.schutter

Joined: 2012-09-16
Posts: 2
Posted: Tue, 2012-09-18 02:19

Solved.

Gallery3 does not support php-mysqli. It only supports php-mysql. As you can see in the original post, I had installed php-mysqli, not php-mysql. Installing php-mysqli solved the problem.

sudo pkg_add php-mysql-5.3.6

 
raaaphii

Joined: 2012-09-17
Posts: 3
Posted: Tue, 2012-09-18 08:19

My installed packages on Windows Server 2003:

- IIS 6
- FastCGI 1.5
- PHP 5.4.7
- mysql 5.1.65 (http://www.mysql.com/downloads/mysql/)

have i the correct packages?

The error is always the same:
PHP Fatal error: Call to undefined function mysql_fetch_object() in /gallery3/installer/installer.php on line 120

 
raaaphii

Joined: 2012-09-17
Posts: 3
Posted: Tue, 2012-09-18 08:57
 
Ranger187
Ranger187's picture

Joined: 2005-12-02
Posts: 204
Posted: Mon, 2012-09-24 18:43

I'll bet you were running a threaded release as NTS = Non threaded safe and VC9 is the visual c+ part.

It also could have been php, but it's not gallery related. It's a bug within PHP itself.

=======
Windows Install Guide

 
PashD

Joined: 2012-09-25
Posts: 1
Posted: Tue, 2012-09-25 20:56

Thanks Schutter, that solved my problem too.

 
drcoram

Joined: 2012-10-07
Posts: 1
Posted: Sun, 2012-10-07 00:50

Just for clarification, installing mysql solved the problem, Post mentions installing mysqli as the solution.

 
Ranger187
Ranger187's picture

Joined: 2005-12-02
Posts: 204
Posted: Wed, 2012-10-10 07:25
drcoram wrote:
Just for clarification, installing mysql solved the problem, Post mentions installing mysqli as the solution.

MySQL is the application. MySQLi is more like an extension. Simply uncommenting the (I forget the actual syntax) php=extension_mysqli in php.ini will enable it.

=======
Windows Install Guide

 
Carnildo

Joined: 2012-10-12
Posts: 1
Posted: Fri, 2012-10-12 22:50
Ranger187 wrote:
drcoram wrote:
Just for clarification, installing mysql solved the problem, Post mentions installing mysqli as the solution.

MySQL is the application. MySQLi is more like an extension. Simply uncommenting the (I forget the actual syntax) php=extension_mysqli in php.ini will enable it.

I had the same problem as the original poster, on the same setup, and the solution was the same:

php-mysql is a software package that adds MySQL support to PHP. php-mysqli is a software package that adds MySQL support to PHP. php-mysql is the right package. php-mysqli is the wrong package. Confusingly, the error message you get if neither one is installed states that both are acceptable.