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.
I just installed the PHP package from Slackware.com. Whenever I try and run a php script now though, instead of having the server parse them, it asks me where should I save the php file. any ideas?
i had the similar problems last time with my apache 2.0....
What browser do u use? i remember this prob happened only in opera, and fine in konquerer and mozilla......
but after restarting for several times, it finally works.... lol, that's something unexplainable in computing...
I don't think the addtype application thing is it. I don't know what version of Slack he's running but I'm running 9.1.. I have the mod_php.conf with the Addtype Application stuff in that.. it seems to load, because when I told it to load mod_php it said there was a dupe and it wasn't going to load it.. so. I'm lost right now. still googling for it, but if you know of anything else to try post it here please! =)
and I dont think its a browser issue.. running IE.
I installed Slackware for the first time ever (9.1), and Apache wouldn't parse PHP scripts. So here's what I did to remedy my situation:
-- removepkg apache; removepkg php
-- downloaded the apache and php sources
-- compiled apache first, being sure to select mod_php while running ./configure
-- compiled php
-- installed with checkinstall (rather than 'make install')
After that, a little conf file tweaking had me up and running. One tweak did include setting the AddType directive.
Anyway, the point I'm getting to here is, if all else fails, compile the sources. :-)
(I know I didn't answer your actual question. I'm just putting in my two cents.)
I just did a clean install of slack 9.0 and had the problem to start with, everything is setup by default ok, you don't need to add mod_php on it own, all you need to do is scroll to the very bottom of /etc/apache/httpd.conf and un-commment the install line (sorry can't remember the exact syntax- at a windows box right now) but then PHP is added as a DSO and everything should work ok
also remember to add index.php to the DirectoryIndex section of your httpd.conf in order to see default php scripts in a directory
in my case I didn't have to do anything else to get PHP running perfectly - also GD is compiled as part of it so all the lovely image functiosn are there without any hassle too
hope it helps
Mlqds
Last edited by melquiades; 10-03-2003 at 05:09 AM.
You know what was weird, I uncommented that line at the bottom and when I restarted Apache it was giving me errors about it already being loaded ( that was the first thing I tried ).. So I didn't think that was the problem.. I tried it again later and did not recieve the errors. Working now. Thanks!
if it does start giving you the error about being loaded twice then you need to comment out the lines in the mod_php file that is telling PHP to load, thus it being told to load twice. the install module line in httpd.conf will take care of everything, so just # out the line in (I think the file is) mod_php.conf
again sorry for not specific detilas but still on a windows box. anyway the file to comment out the line is real short, about 10 lines, ah hell you'll be able to figure it out - glad it worked
I will mess with it further when I get back ... have to run out for a few now. I'd like to find a solution that doesn't include removing PHP and Apache packages and reinstalling.
its beyond me why this works looking at it rationally but this is all I did to a default installation of slack 9.0 in order to get it running
this is the end of my httpd.conf
Code:
# ==> mod_php configuration settings <==
#
# PACKAGES REQUIRED: openssl-solibs (A series) and/or openssl (N series),
# mysql (AP series), gmp (L series), and apache (N series)
#
Include /etc/apache/mod_php.conf
and this is the entire contents of my mod_php.conf
Code:
#
# mod_php - PHP Hypertext Preprocessor module
#
LoadModule php4_module libexec/libphp4.so
#AddModule mod_php4.c
# Tell Apache to feed all *.php files through the PHP module
AddType application/x-httpd-php .php
# This will display PHP files in colored syntax form. Use with caution.
#AddType application/x-httpd-php-source .phps
as you can see the include line tells apache to load mod_php.conf - then mod_php.conf tells apache to 'AddType...' but the line to add module needs to be commented out else you get a double loading error - why? I have no idea, this is just what I've found on my system - I'm pretty new to all this so I hope this helps you out
tell me about it! see what I mean, it doesn't seem to make any sense at all? if you find anything out please pop a quick note in here coz I'd love to know also
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.