What is the proper way to add modules to an installation of php5?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What is the proper way to add modules to an installation of php5?
If I have placed this question in the wrong area of the forum, I apologize, and respectfully request that it be moved to where it belongs. This simply seemed to be the most logical place for the thread to go.
I am currently attempting to work with a server running the SuSE 9.3 OS, apache2, php 5.2.0, and MySQL. (Sorry, I can't recall offhand what version of MySQL the system is running.) In previous versions of PHP, internal libraries were provided for accessing MySQL databases. As of php5, that has ceased. I have a copy of php4 on the same system, so I know that I have the libraries I need, but I am not sure where they are, nor how to properly add them to the configuration command for php5. I'm wanting to think that the proper procedure would simply be add the --with-mysql command, adding the path to the appropriate .so file, but I'm not certain about that. Is this the correct way to add a module to a configuration setup? And if not, would someone please be gracious enough to point me towards some documentation that does describe the correct manner to do this?
Note that /path/to/mysql is the directory where mysql is installed and you can omit it if you want to build the default mysql support. You can also use the new mysqli extension "./configue --with-mysqli=/path/to/mysql_config" for newer versions of mysql. Just check to see if you have the mysql_config file.
Running ./configure --help will give you all the available options
A check reveals that I do not have mysql_config anywhere on the system I'm working on.
What files should I be looking for? I was under the impression I was supposed to be looking for a file 'mysql.so', but when I tried that I got the following error:
Code:
configure: error: Cannot find MySQL header files under /usr/lib/php/extensions/mysql.so.
Since it says it can't find the header files, do you have any suggestions as to what I might need to start looking for? I'm not sure exactly what the installation wants at this point.
You can leave just --with-mysql, so php uses its built-in mysql extension, or you can point to the directory where your mysql is installed (--with-mysql=/path/to/mysql), so php uses your specific mysql version. According to this mysql header files are installed in /usr/include/mysql
Thank you for your assistance. However, I'm still a bit stumped.
PHP5 no longer comes with the built in extensions; an attempt to run ./configure with just the '--with-mysql' tag leads to the following error message:
Quote:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
Also, I was not the one who set up MySQL on this system, my predecessor did. I do not know what path he installed it on, and attempts to seek it out using the find command reveal far too many possible options. (21 files or directories with paths ending in /mysql, 3 with paths ending in /mysql.so. I tried them all anyway, and got the same kind of error, with the word 'yes' replaced with the path in question.) Is there some way to determine the path of a set of libraries without having to know the name of one or more of the files within? I might be able to seek them out from MySQL somehow if that's possible. Is it? Or is there something similar I could do to track down the file path?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.