Page 1 of 1

Fedora Core 5 MySQL support

Posted: Tue Apr 03, 2007 12:17 pm
by rogergreenlaw
I just successfully installed Timetrex 6.0.2-beta-2 on Fedora Core 5 (Redhat Linux).

Mysql support is not compiled in PHP but is instead inserted as a module. It would be nice if the installer could ask if MySQL support is compiled in or is a module and updates timetrex/includes/globals.ini.php adding

if ( extension_loaded('mysql') == FALSE ) {
@dl($prefix . 'mysql.' . PHP_SHLIB_SUFFIX);
}

to the dynamically loading modules section. This simple addition makes MySQL work correctly without recompiling PHP. I am considering upgrading to the newest 6.0.2 released but am worried that the installation work I have completed will disappear when I install the new version.

Posted: Tue Apr 03, 2007 1:10 pm
by shaunw
You don't need to recompile PHP either way. Simply add the MySQL extension to your php.ini file and it will automatically be loaded that way.

Posted: Tue Apr 03, 2007 2:34 pm
by rogergreenlaw
Without adding the "if" statement to the globals.ini.php file the routines to create the database failed to execute on my computer. I discovered that unless I inserted the instructions to force the module to load MySQL support was not loaded and the database was not being created. Adding this statement was necessary to get MySQL to function within PHP.

Posted: Tue Apr 03, 2007 3:40 pm
by shaunw
Yes, you can add the "if" statement, or you can tell php.ini to load the MySQL extension without modifying any TimeTrex code. (easier upgrades)

Either way I will pass this on to our developers to see if they can do something to help the issue.

Posted: Tue Apr 03, 2007 4:46 pm
by rogergreenlaw
How can I tell PHP to load MySQL from the php.ini file?

Posted: Tue Apr 03, 2007 5:17 pm
by shaunw
Add something along the lines of:

extension=mysql.so

To your php.ini file.

Posted: Tue Apr 03, 2007 7:03 pm
by rogergreenlaw
Thanks for the help. I just installed the upgrade and everything is working fine.