[SOLVED] can't figure out how to get php to work in slack 12.2
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
can't figure out how to get php to work in slack 12.2
I recently made the move to Linux from windoze, with a short trip with Ubuntu. When that failed through my own stupidity and a broken down CD drive, I installed Slackware 12.2.
Now, I want to start learning php scripting, and have Apache 2 installed, as well as php5 and mysql. For some reason, apache isn't recognizing and/or executing even simple php scripts.
My php appears to be running, as does apache, and I can't for the life of me find anyone who has asked this question in any forum, so I started this. If someone knows of another thread where I can find info, please don't hesitate to correct me. I'm not afraid to admit that (a), I don't know what I'm doing, yet, and (b), I might be wrong about something/anything.
Ok, I found that and uncommented it. I restarted the computer, and still can't get a simple script to work. I run my index.php file, which is designed simply to display information about my php install, from localhost and it won't do anything. I get no error, but no display, either. Am I being dense? Wouldn't surprise me...
Oh, also check your /etc/httpd/mod_php.conf file and make sure that first, it is loading the module and second that it is set to parse .php files. So you should have these two lines in there (there are a lot of comments in that file, so just look for these two lines separately).
That's all good, so I cleared the cache in my browser and tried again to go to localhost. It appears that my apache is not running. I checked it in package manager; it is definitely installed.
httpd: Syntax error on line 117 of /etc/httpd/httpd.conf: Cannot load /usr/php5apache2.so into server: /usr/php5apache2.so: cannot open shared object file: No such file or directory
Sounds like a typo somewhere. There should never be any *.so files in the /usr directory. They should be under some lib directory, whether /usr/lib or /lib.
I am running 12.1 and I do not have that file at all. So I would suggest running
Code:
locate php5apache2.so
and it should tell you where it is located, then just adjust that in the conf file.
And to get this running you shouldn't need to restart your computer, because when you start it up, all it does is run that same file with the start command. If it doesn't work when you do it manually, it won't work on boot.
Ok, typed locate php5apache2.so in terminal, returned nothing. Hmmm, seems that might be the problem, but I don't understand how I can have apache and php both installed and not have that file.
Next?
And I can't tell you how much I appreciate your help!
Well, on my system my php module is called libphp5.so (and I am not so sure they would've changed the naming scheme).
If you do a locate on that, and it is there, then you will either need to modify your httpd.conf or your mod_php.conf files both in the /etc/httpd/ directory (depending on how that module is called). I am wondering if somehow the conf go screwed up somehow, whether like a sticky backspace/del key (happens occasionally with my laptop).
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
Rep:
Quote:
Ok, typed locate php5apache2.so in terminal, returned nothing. Hmmm, seems that might be the problem, but I don't understand how I can have apache and php both installed and not have that file.
This is because there's no such file in a standard installation. This is the relevant line from /etc/httpd/mod_php.conf :
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.