Help really needed.
Oh well, I'll give it another try... I'm trying to set up a SuSE 8.2 Pro system with Apache2 and php4, but after choosing these (with auto-dependence check on) the server will not interpret the php pages but instead it insists on sending me the files as "downloads". I've got a couple of hints on that I need to add this and that into the different config files, that wouldn't normally be a problem if the system was meant for me personally, but it's not, it's for a client, so I really would prefer to have it set up to be "strictly the SuSE way) of administering etc. So, is there a way to have Apache2 and php4 set up "the SuSE way", or should I stick to Apache 1.x on this particular system? Any hints are appreciated! Anders Norrbring Norrbring Consulting
Anders Norrbring wrote:
Oh well, I'll give it another try...
I'm trying to set up a SuSE 8.2 Pro system with Apache2 and php4, but after choosing these (with auto-dependence check on) the server will not interpret the php pages but instead it insists on sending me the files as "downloads".
I've got a couple of hints on that I need to add this and that into the different config files, that wouldn't normally be a problem if the system was meant for me personally, but it's not, it's for a client, so I really would prefer to have it set up to be "strictly the SuSE way) of administering etc.
So, is there a way to have Apache2 and php4 set up "the SuSE way", or should I stick to Apache 1.x on this particular system?
Any hints are appreciated!
Anders Norrbring Norrbring Consulting
What apache and php related packages do you have installed? rpm -qa | grep php rpm -qa | grep apache Just a guess, but you may have apache2 installed along with the php module for apache 1 or vice versa. I think you should have the packages apache2, apache2-prefork or apache2-worker, mod_php4-core, and apache2-mod_php4 installed. The package mod_php4 is for apache 1 which has a package name of apache. Jason Joines Open Source = Open Mind =======================
What apache and php related packages do you have installed?
rpm -qa | grep php rpm -qa | grep apache
Just a guess, but you may have apache2 installed along with the php module for apache 1 or vice versa. I think you should have the packages apache2, apache2-prefork or apache2-worker, mod_php4-core, and apache2-mod_php4 installed. The package mod_php4 is for apache 1 which has a package name of apache.
berit:~ # rpm -qa | grep apache apache2-doc-2.0.44-32 apache2-example-pages-2.0.44-32 apache2-prefork-2.0.44-32 apache2-mod_php4-4.3.1-24 apache2-2.0.44-32 berit:~ # rpm -qa | grep php selfphp-1.0.1-97 apache2-mod_php4-4.3.1-24 mod_php4-core-4.3.1-24 phpMyAdmin-2.4.0-12 Anders Norrbring Norrbring Consulting
Anders Norrbring wrote:
What apache and php related packages do you have installed?
rpm -qa | grep php rpm -qa | grep apache
Just a guess, but you may have apache2 installed along with the php module for apache 1 or vice versa. I think you should have the packages apache2, apache2-prefork or apache2-worker, mod_php4-core, and apache2-mod_php4 installed. The package mod_php4 is for apache 1 which has a package name of apache.
berit:~ # rpm -qa | grep apache apache2-doc-2.0.44-32 apache2-example-pages-2.0.44-32 apache2-prefork-2.0.44-32 apache2-mod_php4-4.3.1-24 apache2-2.0.44-32
berit:~ # rpm -qa | grep php selfphp-1.0.1-97 apache2-mod_php4-4.3.1-24 mod_php4-core-4.3.1-24 phpMyAdmin-2.4.0-12
Anders Norrbring Norrbring Consulting
I was able to duplicate your problem on an 8.2 box. After installing the apache2 and php4 stuff and doing no configuration, attempts to access a test php page resulted in a dowload dialogue. Edit the file "/etc/sysconfig/apache2" and add "libphp4" to the APACHE_MODULES line. If you don't change anything else, it'll look like this: APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir" Then run the SuSEconfig command and restart apache2. Php pages should load up fine. Jason ===========
Jason, That doesn't really sounds like "the SuSE way", but I guess it's close enough.. :) One question pops up though, what happens with that config-change if the customer decides to do an upgrade? Will it stick? Anyway, it's such a simple thing to include that little thing in the documentation I'll include with the system at delivery. Another guy here (sorry, I can't recall your name) told me he's read at the php home site that they suggest that Apache2 and php isn't really stable enough for a production environment, and since this particular system IS going to a production env, it's imperative that it's as stable as a rock.. Which a "un-tweaked" SuSE system is in 99.9% of the installations I've made throughout the years. Anders Norrbring Norrbring Consulting
I was able to duplicate your problem on an 8.2 box. After installing the apache2 and php4 stuff and doing no configuration, attempts to access a test php page resulted in a dowload dialogue. Edit the file "/etc/sysconfig/apache2" and add "libphp4" to the APACHE_MODULES line. If you don't change anything else, it'll look like this:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir"
Then run the SuSEconfig command and restart apache2. Php pages should load up fine.
Jason ===========
Anders Norrbring wrote:
Jason, That doesn't really sounds like "the SuSE way", but I guess it's close enough.. :) One question pops up though, what happens with that config-change if the customer decides to do an upgrade? Will it stick? Anyway, it's such a simple thing to include that little thing in the documentation I'll include with the system at delivery.
Another guy here (sorry, I can't recall your name) told me he's read at the php home site that they suggest that Apache2 and php isn't really stable enough for a production environment, and since this particular system IS going to a production env, it's imperative that it's as stable as a rock.. Which a "un-tweaked" SuSE system is in 99.9% of the installations I've made throughout the years.
Anders Norrbring Norrbring Consulting
I was able to duplicate your problem on an 8.2 box. After installing the apache2 and php4 stuff and doing no configuration, attempts to access a test php page resulted in a dowload dialogue. Edit the file "/etc/sysconfig/apache2" and add "libphp4" to the APACHE_MODULES line. If you don't change anything else, it'll look like this:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir"
Then run the SuSEconfig command and restart apache2. Php pages should load up fine.
Jason ===========
Actually, I think that is very much the SuSE way. If you look in the file /etc/apache2/httpd.conf file that comes with the SuSE 8.2 apache2 package you'll see: "# Note: # # The file that is included after this comment can contain LoadModule statements. # It is created by the start script (/etc/init.d/apache2). # The list of enabled modules is set in /etc/sysconfig/apache2. # Include /etc/apache2/suse_loadmodule.conf" instead of seeing the actual LoadModule statements Then if you look in that file, /etc/apache2/suse_loadmodule.conf you see: "# # This file is created at apache start time by /usr/sbin/rcapache2. Do not edit it! # # as listed in APACHE_MODULES (/etc/sysconfig/apache2) LoadModule access_module /usr/lib/apache2-prefork/mod_access.so ...." They (SuSE) want you to edit /etc/sysconfig/apache2 and then let SuSEconfig (again SuSEconfig) edit the include file so that upgrades will be easier. I know that Apache considers apache2 to be stable and I believe php4 is stable as long as you use it with prefork. You should read probably read /usr/share/doc/packages/apache2/README.SuSE to get an idea of what is SuSE specific. Jason ==========
Sorry to tell you Jason, but it didn't do any difference for me? Anders Norrbring Norrbring Consulting
I was able to duplicate your problem on an 8.2 box. After installing the apache2 and php4 stuff and doing no configuration, attempts to access a test php page resulted in a dowload dialogue. Edit the file "/etc/sysconfig/apache2" and add "libphp4" to the APACHE_MODULES line. If you don't change anything else, it'll look like this:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir"
Then run the SuSEconfig command and restart apache2. Php pages should load up fine.
Jason ===========
Anders Norrbring wrote:
Sorry to tell you Jason, but it didn't do any difference for me?
Anders Norrbring Norrbring Consulting
I was able to duplicate your problem on an 8.2 box. After installing the apache2 and php4 stuff and doing no configuration, attempts to access a test php page resulted in a dowload dialogue. Edit the file "/etc/sysconfig/apache2" and add "libphp4" to the APACHE_MODULES line. If you don't change anything else, it'll look like this:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir"
Then run the SuSEconfig command and restart apache2. Php pages should load up fine.
Jason ===========
Is SuSEConfig still enabled in /etc/sysconfig/apache2? ENABLE_SUSECONFIG_APACHE="yes" What does 'SuSEconfig --module apache2' report? Jason ===========
Anders Norrbring Norrbring Consulting
I was able to duplicate your problem on an 8.2 box. After installing the apache2 and php4 stuff and doing no configuration, attempts to access a test php page resulted in a dowload dialogue. Edit the file "/etc/sysconfig/apache2" and add "libphp4" to the APACHE_MODULES line. If you don't change anything else, it'll look like this:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir"
Then run the SuSEconfig command and restart apache2. Php pages should load up fine.
Jason ===========
Is SuSEConfig still enabled in /etc/sysconfig/apache2? ENABLE_SUSECONFIG_APACHE="yes"
What does 'SuSEconfig --module apache2' report?
Jason ===========
From /etc/sysconfig/apache2:
# your settings APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include /usr/lib/apache2-prefork/libphp4 log_config mime negotiation setenvif status suexec userdir" The resulting /etc/apache2/suse_loadmodule.conf: # # This file is created at apache start time by /usr/sbin/rcapache2. Do not edit it! # # as listed in APACHE_MODULES (/etc/sysconfig/apache2) LoadModule access_module /usr/lib/apache2-prefork/mod_access.so LoadModule actions_module /usr/lib/apache2-prefork/mod_actions.so LoadModule alias_module /usr/lib/apache2-prefork/mod_alias.so LoadModule auth_module /usr/lib/apache2-prefork/mod_auth.so LoadModule auth_dbm_module /usr/lib/apache2-prefork/mod_auth_dbm.so LoadModule autoindex_module /usr/lib/apache2-prefork/mod_autoindex.so LoadModule cgi_module /usr/lib/apache2-prefork/mod_cgi.so LoadModule dir_module /usr/lib/apache2-prefork/mod_dir.so LoadModule env_module /usr/lib/apache2-prefork/mod_env.so LoadModule expires_module /usr/lib/apache2-prefork/mod_expires.so LoadModule include_module /usr/lib/apache2-prefork/mod_include.so LoadModule log_config_module /usr/lib/apache2-prefork/mod_log_config.so LoadModule mime_module /usr/lib/apache2-prefork/mod_mime.so LoadModule negotiation_module /usr/lib/apache2-prefork/mod_negotiation.so LoadModule setenvif_module /usr/lib/apache2-prefork/mod_setenvif.so LoadModule status_module /usr/lib/apache2-prefork/mod_status.so LoadModule suexec_module /usr/lib/apache2-prefork/mod_suexec.so LoadModule userdir_module /usr/lib/apache2-prefork/mod_userdir.so # And here's the "SuSEconfig --module apache2" output: Starting SuSEconfig, the SuSE Configuration Tool... Running module apache2 only Reading /etc/sysconfig and updating the system... Executing /sbin/conf.d/SuSEconfig.apache2... APACHE_MPM= Looking for multi-processing modules (MPM)... 1 MPM installed (prefork) Choosing the only installed MPM (prefork) create symbolic link `/usr/sbin/httpd2' to `/usr/sbin/httpd2-prefork' create symbolic link `/usr/share/apache2/build/config_vars.mk' to `config_vars.mk-prefork' Processing module files (/etc/apache2/modules/*) Finished. I'm REALLY confused.. Seems like the libphp4 won't "bite" in the processing, I also tried to put in the whole path "/usr/lib/apache2-prefork/libphp4.so" in the config file before running SuSEconfig, same result? Anders.
Anders Norrbring wrote:
Anders Norrbring Norrbring Consulting
I was able to duplicate your problem on an 8.2 box. After installing the apache2 and php4 stuff and doing no configuration, attempts to access a test php page resulted in a dowload dialogue. Edit the file "/etc/sysconfig/apache2" and add "libphp4" to the APACHE_MODULES line. If you don't change anything else, it'll look like this:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir"
Then run the SuSEconfig command and restart apache2. Php pages should load up fine.
Jason ===========
Is SuSEConfig still enabled in /etc/sysconfig/apache2? ENABLE_SUSECONFIG_APACHE="yes"
What does 'SuSEconfig --module apache2' report?
Jason ===========
From /etc/sysconfig/apache2:
# your settings APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include /usr/lib/apache2-prefork/libphp4 log_config mime negotiation setenvif status suexec userdir"
The resulting /etc/apache2/suse_loadmodule.conf:
# # This file is created at apache start time by /usr/sbin/rcapache2. Do not edit it! #
# as listed in APACHE_MODULES (/etc/sysconfig/apache2)
LoadModule access_module /usr/lib/apache2-prefork/mod_access.so LoadModule actions_module /usr/lib/apache2-prefork/mod_actions.so LoadModule alias_module /usr/lib/apache2-prefork/mod_alias.so LoadModule auth_module /usr/lib/apache2-prefork/mod_auth.so LoadModule auth_dbm_module /usr/lib/apache2-prefork/mod_auth_dbm.so LoadModule autoindex_module /usr/lib/apache2-prefork/mod_autoindex.so LoadModule cgi_module /usr/lib/apache2-prefork/mod_cgi.so LoadModule dir_module /usr/lib/apache2-prefork/mod_dir.so LoadModule env_module /usr/lib/apache2-prefork/mod_env.so LoadModule expires_module /usr/lib/apache2-prefork/mod_expires.so LoadModule include_module /usr/lib/apache2-prefork/mod_include.so LoadModule log_config_module /usr/lib/apache2-prefork/mod_log_config.so LoadModule mime_module /usr/lib/apache2-prefork/mod_mime.so LoadModule negotiation_module /usr/lib/apache2-prefork/mod_negotiation.so LoadModule setenvif_module /usr/lib/apache2-prefork/mod_setenvif.so LoadModule status_module /usr/lib/apache2-prefork/mod_status.so LoadModule suexec_module /usr/lib/apache2-prefork/mod_suexec.so LoadModule userdir_module /usr/lib/apache2-prefork/mod_userdir.so #
And here's the "SuSEconfig --module apache2" output:
Starting SuSEconfig, the SuSE Configuration Tool... Running module apache2 only Reading /etc/sysconfig and updating the system... Executing /sbin/conf.d/SuSEconfig.apache2... APACHE_MPM= Looking for multi-processing modules (MPM)... 1 MPM installed (prefork) Choosing the only installed MPM (prefork) create symbolic link `/usr/sbin/httpd2' to `/usr/sbin/httpd2-prefork' create symbolic link `/usr/share/apache2/build/config_vars.mk' to `config_vars.mk-prefork' Processing module files (/etc/apache2/modules/*) Finished.
I'm REALLY confused.. Seems like the libphp4 won't "bite" in the processing, I also tried to put in the whole path "/usr/lib/apache2-prefork/libphp4.so" in the config file before running SuSEconfig, same result?
Anders.
You definitely don't need the full path. Mine looks like this: APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir" Then running SuSEconfig added this to /etc/apache2/suse_loadmodule.conf: LoadModule php4_module /usr/lib/apache2-prefork/libphp4.so I imagine that adding that to /etc/apache2/suse_loadmodule.conf manually will do the trick but I don't know why SuSEconfig isn't putting it in for you. It may be computing md5 stuff to see if some file has been changed manually, then skipping stuff because it has. I knwo from reading /sbin/conf.d/SuSEconfig.apache2 that it checks to see if suse_include.conf has been modified. I don't get the "create symbolic link `/usr/share/apache2/build/config_vars.mk' to`config_vars.mk-prefork'" part when I run SuSEconfig. I do have both the file config_vars.mk and config_vars.mk-prefork. Neither is a symbolic link. In config_vars.mk-prefork I have the lines: exp_libexecdir = /usr/lib/apache2-prefork rel_libexecdir = /usr/lib/apache2-prefork Both of these refer to the folder where the libphp4.so is. You might check to see if those lines are in your config_vars.mk-prefork. Jason ===========
You definitely don't need the full path. Mine looks like this:
APACHE_MODULES="access actions alias auth auth_dbm autoindex cgi dir env expires include libphp4 log_config mime negotiation setenvif status suexec userdir"
Then running SuSEconfig added this to /etc/apache2/suse_loadmodule.conf:
LoadModule php4_module /usr/lib/apache2-prefork/libphp4.so
I imagine that adding that to /etc/apache2/suse_loadmodule.conf manually will do the trick but I don't know why SuSEconfig isn't putting it in for you. It may be computing md5 stuff to see if some file has been changed manually, then skipping stuff because it has. I knwo from reading /sbin/conf.d/SuSEconfig.apache2 that it checks to see if suse_include.conf has been modified.
I don't get the "create symbolic link `/usr/share/apache2/build/config_vars.mk' to`config_vars.mk-prefork'" part when I run SuSEconfig. I do have both the file config_vars.mk and config_vars.mk-prefork. Neither is a symbolic link. In config_vars.mk-prefork I have the lines: exp_libexecdir = /usr/lib/apache2-prefork rel_libexecdir = /usr/lib/apache2-prefork Both of these refer to the folder where the libphp4.so is. You might check to see if those lines are in your config_vars.mk-prefork.
Well Jason, on my system there's no config_vars.mk-prefork at all! I even re-installed the system from scratch, formatting partitions and all.. Still no config_vars.mk-prefork.. But after manually editing that file, everything works perfectly well. Anders Norrbring Norrbring Consulting
On Wed, 11 Jun 2003 18:13:22 +0200
"Anders Norrbring"
Oh well, I'll give it another try...
I'm trying to set up a SuSE 8.2 Pro system with Apache2 and php4, but after choosing these (with auto-dependence check on) the server will not interpret the php pages but instead it insists on sending me the files as "downloads".
I've got a couple of hints on that I need to add this and that into the different config files, that wouldn't normally be a problem if the system was meant for me personally, but it's not, it's for a client, so I really would prefer to have it set up to be "strictly the SuSE way) of administering etc.
So, is there a way to have Apache2 and php4 set up "the SuSE way", or should I stick to Apache 1.x on this particular system?
Any hints are appreciated!
Go to http://groups.google.com and enter "apache2 php4 suse" into the search box. I'll bet your answer is in the first 10 posts listed. -- use Perl; #powerful programmable prestidigitation
Anders Norrbring wrote:
Oh well, I'll give it another try...
I'm trying to set up a SuSE 8.2 Pro system with Apache2 and php4, but after choosing these (with auto-dependence check on) the server will not interpret the php pages but instead it insists on sending me the files as "downloads".
I've got a couple of hints on that I need to add this and that into the different config files, that wouldn't normally be a problem if the system was meant for me personally, but it's not, it's for a client, so I really would prefer to have it set up to be "strictly the SuSE way) of administering etc.
So, is there a way to have Apache2 and php4 set up "the SuSE way", or should I stick to Apache 1.x on this particular system?
If it's for a production webserver, the advice is still use Apache 1.x. The only reason I set up Apache2 + PHP was because there was a problem starting Apache 1.x on SuSE 8.2 on my box (and a few others'). If you do set up Apache2 the 'SuSE way' you should end up with a file /etc/apache2/conf.d/mod_php4.conf containing: <IfModule sapi_apache2.c> AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 AddType application/x-httpd-php-source .phps DirectoryIndex index.php DirectoryIndex index.php3 DirectoryIndex index.php4 </IfModule> -- JDL Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
I've read somewhere that there is no working PHP-module for Apache2, yet. And If you use Apache1: YaST Control Center - System - Editor for /etc/sysconfig files - Network - www - Apache HTTPD_SEC_MOD_PHP - yes. /Lars Anders Norrbring wrote:
Oh well, I'll give it another try...
I'm trying to set up a SuSE 8.2 Pro system with Apache2 and php4, but after choosing these (with auto-dependence check on) the server will not interpret the php pages but instead it insists on sending me the files as "downloads".
I've got a couple of hints on that I need to add this and that into the different config files, that wouldn't normally be a problem if the system was meant for me personally, but it's not, it's for a client, so I really would prefer to have it set up to be "strictly the SuSE way) of administering etc.
So, is there a way to have Apache2 and php4 set up "the SuSE way", or should I stick to Apache 1.x on this particular system?
Any hints are appreciated!
Anders Norrbring Norrbring Consulting
I've read somewhere that there is no working PHP-module for Apache2, yet. And If you use Apache1: YaST Control Center - System - Editor for /etc/sysconfig files - Network - www - Apache HTTPD_SEC_MOD_PHP - yes.
/Lars
Yep, that's what I've heard too (now, that is...) So I'm going for 1.x instead, we all know that old mare is stable at least.. :) Anders Norrbring Norrbring Consulting
Lars Norén wrote:
I've read somewhere that there is no working PHP-module for Apache2, yet. And If you use Apache1: YaST Control Center - System - Editor for /etc/sysconfig files - Network - www - Apache HTTPD_SEC_MOD_PHP - yes.
/Lars
Anders Norrbring wrote:
Oh well, I'll give it another try...
I'm trying to set up a SuSE 8.2 Pro system with Apache2 and php4, but after choosing these (with auto-dependence check on) the server will not interpret the php pages but instead it insists on sending me the files as "downloads".
I've got a couple of hints on that I need to add this and that into the different config files, that wouldn't normally be a problem if the system was meant for me personally, but it's not, it's for a client, so I really would prefer to have it set up to be "strictly the SuSE way) of administering etc.
So, is there a way to have Apache2 and php4 set up "the SuSE way", or should I stick to Apache 1.x on this particular system?
Any hints are appreciated!
Anders Norrbring Norrbring Consulting
There was a working module back as far as php 4.2 although it was considered experimental. I don't know if it's considered stable or not now, but I've had php 4 and apache 2 running on a production SuSE 8.1 box for several months now.
participants (5)
-
Anders Norrbring
-
Jason Joines
-
John Lamb
-
Lars Norén
-
zentara