Re: [gentoo-user] Setting up a local web server
On Friday 01 April 2011 21:56:47 Peter Humphrey wrote: On Friday 01 April 2011 13:18:39 Stéphane Guedon wrote: I have APACHE2_OPTS=-D DEFAULT_VHOST -D INFO -D LANGUAGE -D PHP5 you should try at least language and php5 ! That missing 5 is important - thanks. Then, however, I got this: * apache2 has detected an error in your setup: apache2: Syntax error on line 149 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory That's after emerge -Cv apache and removing by hand all files and directories left behind by emerge. Same with php. Then I reinstalled both apache and php but without using the packages I had and all came right - thanks Stéphane. This is connected with the other thread I've written to today, about using my workstation as an emerge server. A complication I didn't mention there is that both make.conf and package.use have to be identical in the chroot and the target system nfs-mounted under it. I must have got them out of step at some stage. Incidentally, apache is wrong to complain of syntax errors - they're errors of configuration, not syntax. Try recompiling php. You may have accidentally removed the php-library as that is located under: /usr/lib/apache2/modules/... -- Joost
Re: [gentoo-user] Setting up a local web server
On Monday 04 April 2011 10:17:34 Joost Roeleveld wrote: On Friday 01 April 2011 21:56:47 Peter Humphrey wrote: This is connected with the other thread I've written to today, about using my workstation as an emerge server. A complication I didn't mention there is that both make.conf and package.use have to be identical in the chroot and the target system nfs-mounted under it. I must have got them out of step at some stage. Try recompiling php. You may have accidentally removed the php-library as that is located under: /usr/lib/apache2/modules/... It may not be clear from what preceded this, but the problem was actually caused by the particular way I'd used chroot, nfs mounting and --root parameter to portage running in the chroot on my emerge server. As soon as I change my process the problem went away, together with several others I haven't bothered the list with. Thanks anyway. -- Rgds Peter
Re: [gentoo-user] Setting up a local web server
On Fri, 01 Apr 2011 16:03:10 -0700, kashani wrote: * apache2 has detected an error in your setup: apache2: Syntax error on line 149 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory Incidentally, apache is wrong to complain of syntax errors - they're errors of configuration, not syntax. Apache doesn't recognize the syntax, therefore it's a syntax error. It does recognise the syntax, otherwise it wouldn't be trying to load the module. I agree, it's a misleading error message. -- Neil Bothwick Insanity: doing the same thing over and over again and expecting different results. (Albert Einstein) signature.asc Description: PGP signature
Re: [gentoo-user] Setting up a local web server
* Adam Carter adamcart...@gmail.com [110402 01:15]: dig you build php with an apache2 flag to enable the Apache module? And you'll also need this in your httpd.conf; AddType application/x-httpd-php .php 70_mod_php5.conf in /etc/apache2/modules.d adds the handler for that automatically when PHP5 is defined (and mod_mime.c is there.) So doublecheck that php was built with the apache2 USE flag as mentioned above. I've rebuilt php after apache2 before to be sure the needed modules are installed. Also as mentioned make sure your APACHE2_OPTS in /etc/conf.d/apache2 uses -D PHP5 and not just PHP or PHP4. And finally don't forget to restart apache after emerging php Todd
[gentoo-user] Setting up a local web server
Hello list, I want a box on my LAN to be a local web and database server. I've installed Apache, MySQL, PHP and phpmyadmin and I'm about to get phpmyadmin going. The problem is that Apache is displaying the contents of php files instead of interpreting them. What have I missed? I have USE=apache2 php in make.conf and APACHE2_OPTS=-D PHP in /etc/conf.d/apache2. (Why is it so hard to get a web server going in Gentoo? I remember having the same difficulty 18 months ago; it'd be good to be able to remember what I did. This is the one area I've found where the Gentoo documentation is weak - well, nonexistent actually. We ought to have an idiot's guide to getting started, at least.) -- Rgds Peter
Re: [gentoo-user] Setting up a local web server
On Friday 01 April 2011 13:57:49 Peter Humphrey wrote: Hello list, I want a box on my LAN to be a local web and database server. I've installed Apache, MySQL, PHP and phpmyadmin and I'm about to get phpmyadmin going. The problem is that Apache is displaying the contents of php files instead of interpreting them. What have I missed? I have USE=apache2 php in make.conf and APACHE2_OPTS=-D PHP in /etc/conf.d/apache2. (Why is it so hard to get a web server going in Gentoo? I remember having the same difficulty 18 months ago; it'd be good to be able to remember what I did. This is the one area I've found where the Gentoo documentation is weak - well, nonexistent actually. We ought to have an idiot's guide to getting started, at least.) I have APACHE2_OPTS=-D DEFAULT_VHOST -D INFO -D LANGUAGE -D PHP5 you should try at least language and php5 ! Don't know actually if it will help ! -- Stéphane Guedon page web : http://www.22decembre.eu/ carte de visite : http://www.22decembre.eu/downloads/Stephane-Guedon.vcf clé publique gpg : http://www.22decembre.eu/downloads/Stephane-Guedon.asc signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Setting up a local web server
On Friday 01 April 2011 13:18:39 Stéphane Guedon wrote: I have APACHE2_OPTS=-D DEFAULT_VHOST -D INFO -D LANGUAGE -D PHP5 you should try at least language and php5 ! That missing 5 is important - thanks. Then, however, I got this: * apache2 has detected an error in your setup: apache2: Syntax error on line 149 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory That's after emerge -Cv apache and removing by hand all files and directories left behind by emerge. Same with php. Then I reinstalled both apache and php but without using the packages I had and all came right - thanks Stéphane. This is connected with the other thread I've written to today, about using my workstation as an emerge server. A complication I didn't mention there is that both make.conf and package.use have to be identical in the chroot and the target system nfs-mounted under it. I must have got them out of step at some stage. Incidentally, apache is wrong to complain of syntax errors - they're errors of configuration, not syntax. -- Rgds Peter
Re: [gentoo-user] Setting up a local web server
On 4/1/2011 12:56 PM, Peter Humphrey wrote: On Friday 01 April 2011 13:18:39 Stéphane Guedon wrote: I have APACHE2_OPTS=-D DEFAULT_VHOST -D INFO -D LANGUAGE -D PHP5 you should try at least language and php5 ! That missing 5 is important - thanks. Then, however, I got this: * apache2 has detected an error in your setup: apache2: Syntax error on line 149 of /etc/apache2/httpd.conf: Syntax error on line 4 of /etc/apache2/modules.d/70_mod_php5.conf: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory That's after emerge -Cv apache and removing by hand all files and directories left behind by emerge. Same with php. Then I reinstalled both apache and php but without using the packages I had and all came right - thanks Stéphane. This is connected with the other thread I've written to today, about using my workstation as an emerge server. A complication I didn't mention there is that both make.conf and package.use have to be identical in the chroot and the target system nfs-mounted under it. I must have got them out of step at some stage. Incidentally, apache is wrong to complain of syntax errors - they're errors of configuration, not syntax. Apache doesn't recognize the syntax, therefore it's a syntax error. dig you build php with an apache2 flag to enable the Apache module? kashani
Re: [gentoo-user] Setting up a local web server
dig you build php with an apache2 flag to enable the Apache module? And you'll also need this in your httpd.conf; AddType application/x-httpd-php .php