This forum is no longer active. Please post your questions to our new community site

Forums Redmine

PHP error mysql_connect()

Subscribe to PHP error mysql_connect() 2 post(s), 2 voice(s)

Avatar nivarp 3 post(s)

I am using bitnami redmine stack on my Linux machine. Redmine works perfectly fine.

Now in the htdocs folder of apache I have added a php file that needs access to the mysql database.


I get this error

Fatal error: Call to undefined function mysql_connect() in /opt/redmine-1.1.0-0/apache2/htdocs/betacg/admin/connect.php

The specific line where I get the error is this

$conn = mysql_connect($host, $username, $password) or die (“Could not connect”);

Essentially php is not able to resolve mysql_connect and hence the error. I believe bitnami stack has mysql extension for php enabled by default.

Any pointers to solve this would be really appreciated.

Avatar Beltrán Rueda Administrator 3,714 post(s)


Redmine does not ship PHP. You should install RubyStack and then the Redmine module to use PHP and Ruby in the same Stack. Maybe Apache is using the PHP installed in your system. If this is case, try to install the php-mysql extension.

Forums Redmine