I'm trying to install PHP5 from source on FC5 and everything is configures and compiles fine. When I try to run php however I receive the following errors.
PHP Warning: PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: mysqli: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: gd: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: mysqli: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
I configured PHP with the following options:
./configure --with-mysql --with-gd --enable-modules=php5 -with-zlib --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared
Anybody know what is going on. I know it is the modules that are not the correct versions but I don't know how to correct this.
How can I get this to install correctly?
Have you removed your old PHP RPMs first? It looks like some old libraries are still there and the new PHP binary is attempting to access them.
I'm not much for building packages up from source on RPM-based distros unless the build ends up generating an RPM that I can install. My opinion is that non-RPM-based installs on such machines just "gunk up" the machine.
It looks like Remi Collett is maintaining some pretty recent RPMs for php-5 and modules (in fact, he just built PHP-5.3 a couple of days ago for a bunch of Fedora Core distros, but he stops at 6! See: http://blog.famillecollet.com/post/2009/06/30/PHP-5.3.0-Released).
I'd see if any of his RPMs do what you want (http://rpms.famillecollet.com/fedora/5/ or a mirror). If you really want to compile from source (because, perhaps, you want an even newer verison that what Remi Collett provides), I'd download the SRPMs from Remi's site, install them, modify the .specfiles to refer to the newer versions, and build using his .specfiles. (It may not work the first time, but you should be able to figure out what has changed that's breaking the build, and it will give you some good experience with RPM).
You might even find that his PHP-5.3 RPMs for FC6 install fine on FC5.
I regularly build RPM packages for software to install onto multiple RPM-based machines (typically CentOS). Installing new software from RPM means that my "production" machines stay clean, and don't need compilers installed. It's a strategy I highly recommend.
Why are you still running Fedora Core 5? I would suggest switching to something with a longer support life like CentOS 5 (which incidentally has php 5.1 out of the box). You're running a 3 year old release of Fedora, so it's 2 years past its EOL...
Upgrade of Fedora 11 if that is possible. It is worth it.
If you cant upgrade OS for some reason configure PHP without any mysql, gd, etc. support and see if you can make it work. Test with simple or scritps.
If this works. then upgrade mysql and then try only with --with-mysql do not add other libraries at same time. If this works. Then upgrade zlib and add zlib flag. If some upgrade like mysql is not working upgrade other things and take care of mysql later. It will take more than a day to get things work. I hope it is worth it.
Port forward port 80 of this server to port 80 of server having latest OS, if that is acceptable.