PHP5 / MySQL 4.x

General discussion about netjukebox
Post Reply
Posts: 2
Joined: Tue Jun 14, 2005 9:57 pm

PHP5 / MySQL 4.x

Post by Felix »

From the php-documentation:

The function mysql_create_db() is deprecated. It is preferable to use mysql_query() to is-sue a sql CREATE DATABASE statement instead.

Note: This function will not be available if the MySQL extension was built against a MySQL 4.x client library.

Line 63 of must be changed to

mysql_query('CREATE DATABASE ' . $cfg['mysql_db']) or message('error', '<strong>Can\'t create database:</strong><br>' . $cfg['mysql_db']);

Otherwise the DB can't be created, the script fails and only a white page (with the headers) will be shown (no login, no other functions...).


User avatar
netjukebox developer
Posts: 850
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands

Post by wbartels »

Thanks very much Felix,

I haven't had any problems with PHP 5 and MySQL 4.0.x
But it could be that I already had created the database ;-)

The function mysql_create_db() is deprecated as you said,
So I will update it with a query in the next version.

Thanks again,

Post Reply