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.
I have installed Apache/MySQL/php on a Mandrake dist using RPMDrake. When trying to access the database through php, I get the "Call to Undefined function" error.
I think I have traced this to the fact that I do not seem to have a php.ini file in the correct place. Using kFind, I have found 2 sample php.ini files...
So I guess I copy and rename one of these to the apache directory, right? Am I on the right track and where can I find some documentation on this step?
Damm. Still does not work. I copied the file to /usr/local/lib as noted in the docs, but I don't think this is the correct location. Any hints on where it should be in a Mandrake dist?
Okay... some progress. Now the phpinfo Configuration File Path says "/etc/php.ini". So now I know that it is reading the configuration file.
But I still get the "Call to Undefined function" error when making a call to mysql_connect. So now I have to figure out how to get the php-mysql libraries installed, I guess. Any input is welcome.
Any suggestions on where my problem is? I'm kind of concerned that I don't see a mysql entry here, but I can run mysql from the command line and interact with it. Maybe apache does not know it is there or something?
Did a KFind Contents search for the string php4_module...
Nothing.
So now I notice that I have two httpd configuration files, etc/httpd/conf/httpd2.conf (this one looks to be where I should find the configuration file) and usr/share/ADVX/compat/httpd.conf.
So now the questions are, which file do I modify and where are the php4 libraries located?
I think I will start a blog titled 'The trials of the Otter and the Penguin'.
I quess my main error here was assuming that the mandrake rpmdrake interface would install and configure this stuff. It has been difficult to figure out what has been done and what has not. Windows for all it's faults does tend to spoil you.
Went into rpmdrake. At first I could not find anything in the list that was close, but then I noticed the radio buttons at the top and switched from Mandrake choices to All Packages, alphabetical. Now I see php-mysql-4.3.0-2.mdk. Looks promising, but I am a little worried that this is not the latest version...
I searched the forum on mandrake and mysql. After reading many posts, I came across this gem posted by FlyingSmurf:
I had a similar problem, had everything necessary installed from the 9.1 CD's yet php couldn't talk to mysql!!
This is how I fixed it: in /etc/php there's a 34_mysql.ini file that says 'extension = mysql.so'
I replaced mysql.so to the exact location of the file /usr/lib/php/extensions/mysql.so
This did the trick.
In addition, haobaba1 had this comment:
I had a similar problem when I installed apache, php, mysql on mandrake 9.1. First off the the install notes instructed me to move the php.ini to an incorrect directory it should be in /etc or /etc/php and in the php.ini file the modules_ext(something similar to this) variable was =./ this would have been correct for the directory they tell you to move the php.ini file to not for the directory it should be in. You should move the php.ini file to either of the correct directories I mentioned and then change the variable to point to where ever it is that mysql.so and all your other modules are located.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.