startup error

Having trouble installing serendipity?
Post Reply
grubbish
Regular
Posts: 5
Joined: Fri May 30, 2008 2:54 pm

startup error

Post by grubbish »

Hi,

I just set up my web server for serendipity. I'm getting this error message whenever I browse to the site.....



Fatal error: Call to undefined function: mysql_connect() in /usr/share/serendipity/www/include/db/mysql.inc.php on line 251


any suggestions?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: startup error

Post by garvinhicking »

Hi!

You must configure your PHP installation so that at least mysql or mysqli or sqlite extensions are available.

On debian, you need "apt-get install php5-mysql" for example, and then restart apache.

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/
grubbish
Regular
Posts: 5
Joined: Fri May 30, 2008 2:54 pm

Post by grubbish »

Yeah I have the current version of php5mysql.....is there anything else you can think of that may be causing the error?
sonichouse
Regular
Posts: 196
Joined: Sun May 11, 2008 2:53 am
Contact:

Post by sonichouse »

grubbish wrote:Yeah I have the current version of php5mysql.....is there anything else you can think of that may be causing the error?
You could check your php.ini file

you should have something like

Code: Select all

extension=mysql.so
extension=pdo_mysql.so
Steve is occasionally blogging here
grubbish
Regular
Posts: 5
Joined: Fri May 30, 2008 2:54 pm

Post by grubbish »

hmmm this is very peculiar.....I added those extensions to the php.ini file but the same error is still popping up??? A friend told me the mysql_connect function was broken in the code is this a possibility? I haven't made any changes to the code what so ever so I don't see why it would do this....
sonichouse
Regular
Posts: 196
Joined: Sun May 11, 2008 2:53 am
Contact:

Post by sonichouse »

grubbish wrote:hmmm this is very peculiar.....I added those extensions to the php.ini file but the same error is still popping up??? A friend told me the mysql_connect function was broken in the code is this a possibility? I haven't made any changes to the code what so ever so I don't see why it would do this....
Verify that your installation of PHP has been compiled with mysql support.
Create a test web page containing

Code: Select all

<?php phpinfo(); exit(); ?>
and load it in your browser. Search the page for MySQL
Steve is occasionally blogging here
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

As I mentioned: Always make sure you restart your apache webserver. Without it, new modules might not be loaded, if your PHP is compiled as apache module.

It is definitely an issue with your server config, it is completely unrelated to serendipity.

Sonichouses' tip for the phpinfo() should be very helpful!

Best 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