Fedora Core 5 MySQL support

Use this forum to discuss desired new features for TimeTrex
Locked
rogergreenlaw
Posts: 4
Joined: Fri Mar 30, 2007 7:43 pm

Fedora Core 5 MySQL support

Post 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.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post 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.
rogergreenlaw
Posts: 4
Joined: Fri Mar 30, 2007 7:43 pm

Post 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.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post 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.
rogergreenlaw
Posts: 4
Joined: Fri Mar 30, 2007 7:43 pm

Post by rogergreenlaw »

How can I tell PHP to load MySQL from the php.ini file?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Add something along the lines of:

extension=mysql.so

To your php.ini file.
rogergreenlaw
Posts: 4
Joined: Fri Mar 30, 2007 7:43 pm

Post by rogergreenlaw »

Thanks for the help. I just installed the upgrade and everything is working fine.
Locked