|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
So I have a new Gentoo server running. I emerged Apache and dev-lang/
PHP, went to emerge mod_php and portage couldn't find it. Since that had always been the easiest way to get PHP working, I had to spend some time researching the issue. Appearantly, Apache just needed to be compiled with a few USE flags, and allegedly it would include PHP support. Mine did not. So I kept looking, and ran across about 10 different "guides" none of which worked. Some seem to have been written for older versions of Gentoo and Apache. I ran across mod_suphp which I can't get emerged because it seems that Gentoo wants to just ignore my changes to portage.unmask and portage.keyword. I got to the point where the Apache_OPTS could not load -D PHP5 because it could not find libphp5.so. I looked and could not find that. I am running the latest versions of Gentoo, Apache, and PHP5. A simple phpinfo() script just dumps the PHP code out in the browser, without interpreting it. Does anyone know of a surefire, 99% accurate, works almost every single time, method of getting Apache and PHP5 integrated on Gentoo? What happened to mod_php anyway? (If I don't find an answer soon, I am going to be forced to just use Xampp.) |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"Jerim79" <mylek@hotmail.com> wrote in message news:1178809054.691200.282670@l77g2000hsb.googlegr oups.com... > So I have a new Gentoo server running. I emerged Apache and dev-lang/ > PHP, went to emerge mod_php and portage couldn't find it. Since that > had always been the easiest way to get PHP working, I had to spend > some time researching the issue. Appearantly, Apache just needed to be > compiled with a few USE flags, and allegedly it would include PHP > support. Mine did not. So I kept looking, and ran across about 10 > different "guides" none of which worked. Some seem to have been > written for older versions of Gentoo and Apache. I ran across > mod_suphp which I can't get emerged because it seems that Gentoo wants > to just ignore my changes to portage.unmask and portage.keyword. I got > to the point where the Apache_OPTS could not load -D PHP5 because it > could not find libphp5.so. I looked and could not find that. > > I am running the latest versions of Gentoo, Apache, and PHP5. A simple > phpinfo() script just dumps the PHP code out in the browser, without > interpreting it. Does anyone know of a surefire, 99% accurate, works > almost every single time, method of getting Apache and PHP5 integrated > on Gentoo? What happened to mod_php anyway? (If I don't find an answer > soon, I am going to be forced to just use Xampp.) > I have both php4 and 5 running under gentoo hardened let me look to see what I did... here's what I used as a reference: http://www.gentoo.org/proj/en/php/ph...figuration.xml ok here's my package.use entry for php5: =dev-lang/php-5* cgi force-cgi-redirect crypt ssl zlib apache2 bcmath calendar cli ctype curl filter gd ldap mysql mysqli odbc pcre postgres session simplexml soap sockets tidy tokenizer unicode xml xsl and here's the emerge # time emerge '=dev-lang/php-4*' '=dev-lang/php-5*' > phpEmerge4.log .... real 24m29.941s user 25m58.560s sys 9m8.550s here's my /etc/apache2/modules.d/php4-cgi.conf # handler for PHP 4 scripts <IfDefine PHP4CGI> ScriptAlias /php4-cgi /usr/lib/php4/bin/php-cgi Action php4-cgi /php4-cgi AddHandler php4-cgi .php4 .php3 .php .phtml </IfDefine> and here's the /etc/apache2/modules.d/php5-cgi.conf # handler for PHP 5 scripts <IfDefine PHP5CGI> ScriptAlias /php5-cgi /usr/lib/php5/bin/php-cgi Action php5-cgi /php5-cgi AddHandler php5-cgi .php5 </IfDefine> and in /etc/apache2/modules.d/70_mod_php.conf: <IfDefine PHP4> # Load the module first <IfModule !sapi_apache2.c> LoadModule php4_module modules/libphp4.so </IfModule> # Set it to handle the files <IfModule mod_mime.c> AddType application/x-httpd-php .php AddType application/x-httpd-php .phtml AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 AddType application/x-httpd-php-source .phps </IfModule> AddDirectoryIndex index.php index.phtml </IfDefine> and in /etc/apache2/modules.d/70_mod_php5.conf: <IfDefine PHP5> # Load the module first <IfModule !mod_php5.c> LoadModule php5_module modules/libphp5.so </IfModule> # Set it to handle the files <IfModule mod_mime.c> AddType application/x-httpd-php .php AddType application/x-httpd-php .phtml AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 AddType application/x-httpd-php .php5 AddType application/x-httpd-php-source .phps </IfModule> AddDirectoryIndex index.php index.phtml </IfDefine> and here's /etc/conf.d/apache2 APACHE2_OPTS="-D DEFAULT_VHOST -D SSL_DEFAULT_VHOST -D CGI -D PHP5CGI -D PHP4 -D SSL" and it just works like the guide said. Johnny |
|
![]() |
| Outils de la discussion | |
|
|