Page 1 of 1

startup error

Posted: Fri May 30, 2008 3:18 pm
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?

Re: startup error

Posted: Fri May 30, 2008 3:43 pm
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

Posted: Fri May 30, 2008 3:46 pm
by grubbish
Yeah I have the current version of php5mysql.....is there anything else you can think of that may be causing the error?

Posted: Fri May 30, 2008 4:06 pm
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

Posted: Fri May 30, 2008 4:34 pm
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....

Posted: Fri May 30, 2008 5:34 pm
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

Posted: Fri May 30, 2008 5:36 pm
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