Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am running Fedora Core 1 and using the version of Apache that it installs (2.0.47), and have installed MySQL 4.0.18-standard from an RPM.
I am preparing to install PHP 4.3.6 from source but have some questions.
My understanding is that I want to install PHP as an Apache DSO. In order to do that, I need to configure PHP using the option
The problem is that I don't seem to have apxs. If I understand correctly, apxs is included with the development version of Apache, and that is not the one that is installed by FC1 installation. Is there some other way to get this script? I have searched high and low and cannot seem to find it.
Secondly, I want to--of course--enable MySQL support. I tried this on another box (and it didn't go too well). When I tried
it complained that it could not locate the mysql header files. Now this makes sense that I do not have the header files, since I installed MySQL from an rpm and not from source. But I have a source that states that "If you do not specify a directory, the bundled MySQL library will be used." (http://hotwired.lycos.com/webmonkey/...tw=programming) So would my line be ./configure --with-mysql, or would I leave out --with-mysql altogether?
To sum up my question, how can I install PHP as an Apache DSO without reinstalling Apache from source, and include MySQL support when I installed it from an rpm?
Hi, thanks for the response. Here is what I get from the configure script:
| *** WARNING *** |
| You will be compiling the CGI version of PHP without any |
| redirection checking. By putting this cgi binary somewhere in |
| your web space, users may be able to circumvent existing .htaccess |
| security by loading files directly through the parser. See |
| http://www.php.net/manual/security.php for more details. |
So this means that it will not be running as a DSO, correct? Does that mean that Apache was previously compiled without DSO supprt, or does it mean that I need to include the --with-apxs option?
I am using Apache 2, but I have neither apxs nor apxs2. I read somewhere that apxs comes with a developer installation of Apache (?) and that is apparently not what is installed with Fedora Core 1. At any rate, I don't have it and can't seem to find how to get it. I'm not really interested in this point at reinstalling Apache from source if there is *any* other way.
and I got some error about "call to unknown function" or some such. For whatever reason, PHP installed without MySQL support.
So I'm thinking that the Fedora PHP rpm wouldn't be the solution. While installing Apache from source is no big deal, I was unable to do it in such a way that everything works the way it does in a "normal" install. I have run through this whole process before on another box, and while I believe I have it working (finally), there are a number of problems, all of them dealing with the way I installed Apache. Apache no longer starts automatically on a reboot; /etc/init.d/httpd is gone; the conf file is not where I am accustomed to having it (now in /usr/local/apache/bin/httpd.conf or some such) and so forth.
Perhaps there is another rpm somewhere that would install PHP with MySQL support? That sounds like the ticket...What do you think?
Hmmm well from my experience Red Hat compiles their PHP RPM with just about everything bundled with it - certainly with MySQL support. I think the easiest option would be to install the Apache, PHP and MySQL RPMs from your Fedora CD and try debugging that setup.
One more thing, also in the phpinfo() output in the section on the configure command is this:
As I mentioned earlier in the thread, I was unable to find apxs on my machine, and it is not in /usr/sbin unless it is hidden or something.
If the line above was successful, then PHP would have compiled as a DSO, and then I would need a LoadModule directive in httpd.conf in order for PHP to work (as I understand it). The directive is not there, and PHP is working (just doesn't recognize mysql functions), so it must not be a DSO?
No it would be a DSO. The fact that you can't find the apxs2 file doesn't matter. As long as it's there when PHP compiles (which is taken care of by Red Hat) then it's fine. Your error seems kind of strange. As you can imagine the Fedora RPM's are designed to play well with each other, so I'm surprised it doesn't work by default.
After doing a bit of research it looks like you need to install an RPM called php-mysql (http://www.redhat.com/archives/fedor.../msg00439.html). For Fedora core 1 it will probably be php-mysql-4.3.3-6.i386.rpm or something. Remember to service httpd restart after installing it.
If you have in fact already installed this RPM then I think I'm out of ideas!