View previous topic :: View next topic |
Author |
Message |
theProphecy n00b
Joined: 29 Oct 2003 Posts: 50 Location: Denmark, Århus-->Åbyhøj
|
Posted: Tue Nov 11, 2003 4:03 am Post subject: Installing Apache2 with PHP5.x (incl. old Apache+PHP4.x) |
|
|
New: Installing Apache2 with PHP5.x
It has been quite a while since I was poking around with my Gentoo servers last, but recently I picked up, and started building myself some stripped down, gentoo servers with focus on security and stability, but of course, I couldn't accept that PHP5.x was not to be installed "just" because it's marked unstable. Hey, a developer needs the cutting edge, aye? hehe....
Actually Apache 2.x and PHP5.x is quite easy to compile, configure and run, so follow these steps and your web server should be up-and-ready for use.
Notice: This tutorial is tested/focused on x86 users, unknown results on any other arch!
Step 1. - Compiling Apache2.x
Because Apache 2.x has been marked as stable, it's easier than ever to install apache, just emerge it
This will most probably emerge at most the following (tested on a fresh base system)
Code: | These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] net-www/gentoo-webroot-default-0.2
[ebuild N ] dev-libs/apr-0.9.6-r3
[ebuild N ] app-misc/mime-types-4
[ebuild N ] dev-libs/apr-util-0.9.6-r2
[ebuild N ] net-www/apache-2.0.54-r31 |
If you plan on using https (ssl) with apache, remember to check if ssl is enabled (should be by default, but never hurts to be sure):
Code: | # emerge -pv apache
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] net-www/apache-2.0.54-r31 -apache2 -debug -doc -ldap -mpm-leader -mpm-peruser -mpm-prefork -mpm-threadpool -mpm-worker -no-suexec (-selinux) +ssl -static-modules -threads 0 kB
|
Step 2. - Compiling PHP5.x
In order to compile PHP5.x (and not PHP4.x), be sure to use dev-lang/php, and not dev-php/php.
Now that we have come to php, we also need to use the ACCEPT_KEYWORD="~x86", because the ebuild has been marked as unstable!
Step 2.1 - Determining which USE flags to use
In order to get extra features into PHP, we now need to decide which we wan't, and which we don't wan't.
Notice:Don't forget to add the 'apache2' USE flag!
To see which USE flags are used by default, issue:
Code: | # ACCEPT_KEYWORDS="~x86" emerge -pv dev-lang/php
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] dev-lang/php-5.0.5-r4 -adabas -apache -apache2* -bcmath* +berkdb* -birdstep +bzip2 -calendar -cdb -cgi -cjk -cli +crypt -ctype -curl -curlwrappers -db2 -dba -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fdftk -filepro -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd* -gd-external +gdbm* -gmp -hardenedphp -hyperwave-api -iconv -imap -informix -inifile -interbase -iodbc -ipv6 -java-external -kerberos -ldap -libedit -mcve -memlimit -mhash -ming -mnogosearch -msql -mssql +mysql -mysqli +ncurses +nls -oci8 -oci8-instant-client -odbc -oracle7 -ovrimos -pcntl -pcre -pdo-external -pear -pfpro -pic -posix* -postgres -qdbm +readline -recode -sapdb -sasl -session* -sharedext -sharedmem -simplexml* -snmp -soap -sockets* -solid +spell -spl -sqlite* +ssl -sybase -sybase-ct -sysvipc -threads -tidy* -tiff -tokenizer +truetype -wddx +xml2 -xmlrpc -xpm -xsl -yaz -zip +zlib 0 kB
|
Step 2.2 - Compiling PHP5.x with the USE flags you have choosen
Now personally I like to select only the exact features I like, therefor my compile command would look like this:
Code: | # USE="*- apache2 bcmath mysql posix session simplexml tidy truetype bzip2 ncurses nls readline xml2 sqlite crypt spell sockets gd jpeg" ACCEPT_KEYWORDS="~x86" emerge -p dev-lang/php
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild N ] net-mail/mailbase-1
[ebuild N ] mail-mta/ssmtp-2.61
[ebuild N ] media-libs/libpng-1.2.8-r1
[ebuild N ] app-text/aspell-0.60.4
[ebuild N ] media-libs/freetype-2.1.10
[ebuild N ] app-text/htmltidy-4.8.6
[ebuild N ] dev-libs/libmcrypt-2.5.7
[ebuild N ] media-libs/t1lib-5.0.2
[ebuild N ] media-libs/jpeg-6b-r6
[ebuild N ] net-www/gentoo-webroot-default-0.2
[ebuild N ] dev-libs/apr-0.9.7
[ebuild N ] app-misc/mime-types-4
[ebuild N ] dev-libs/apr-util-0.9.7
[ebuild N ] net-www/apache-2.0.55
[ebuild N ] app-admin/eselect-1.0_rc2
[ebuild N ] app-admin/eselect-php-0.96
[ebuild N ] dev-db/mysql-5.0.16-r3
[ebuild N ] perl-core/Storable-2.15
[ebuild N ] dev-perl/Net-Daemon-0.38
[ebuild N ] dev-perl/PlRPC-0.2018
[ebuild N ] dev-perl/DBI-1.48
[ebuild N ] dev-perl/DBD-mysql-3.0002_p4
[ebuild U ] sys-devel/m4-1.4.4 [1.4.2-r1]
[ebuild N ] dev-libs/libxml2-2.6.22
[ebuild N ] dev-lang/php-5.0.5-r4
|
Notice:The compile process might halt with a warning telling you that a selected feature needs another, in that case you will need to add this needed feature to your compile USE flag.
It is a good idea to write down which USE flags you have added.
This compile might take a while depending on the power of your system, but when it finally finishes, we a ready to move onto the next step.
Step 3. - Testing our Apache2 Install
It's always a good idea to test the installed software, to better determin the origin of possible warnings and/or errors.
Step 3.1 - Configuring ServerName in httpd.conf
To get rid of the "Could not determine the servers fully qualified domain name..." when running apache, we will edit the '#ServerName localhost' line in the httpd.conf file:
Code: | # nano -w /etc/apache2/httpd.conf
#ServerName localhost
// First uncomment the line
ServerName localhost
// Then edit the line to fit your current IP and the port the webserver listens on.
// In this example, if your ip is 192.168.0.1 and the port is 80 (default)
ServerName 192.168.0.1:80 |
Step 3.2 - Testing the Apache server
Quite simple:
Code: | # /etc/init.d/apache2 start
* Starting apache2 ... [ ok ] |
If no errors showed, it's up and running, and just to be sure, try opening a browser and go to your servers ip, and you should be greeted with Apache default install screen.
Step 4. - Configuring Apache2.x with PHP5.x
Again quite simple, just open the /etc/conf.d/apache2 file, and edit:
Code: | # nano -w /etc/conf.d/apache2
// First find the line:
APACHE2_OPTS="-D DEFAULT_VHOST"
// Now we just add '-D PHP5', and if you are using SSL, also '-D SSL',
// or for that reason, any other extra module you have compiled which needs to be
// activated.
APACHE2_OPTS="-D DEFAULT_VHOST -D SSL -D PHP5" |
Now save the file, and create a 'Hello World!' test script in your htdocs folder (to test the php install):
Code: | # touch /var/www/localhost/htdocs/hello_world.php
# nano -w /var/www/localhost/htdocs/hello_world.php
// Insert this:
<?php
echo "Hello World!";
?> |
Now to get the php module loaded, restart the apache server:
Code: | # /etc/init.d/apache2 restart
* Stopping apache2 ... [ ok ]
* Starting apache2 ... [ ok ] |
If no errors occur, we are off for testing the script in a browser, in our example the server was on 192.168.0.1:80, so to test the script, we would use the URL:
Code: | http://192.168.0.1:80/hello_world.php |
To test our new script, it should now print out:
And nothing else...
Well there you have it.... Finished!
Possible Issues:
Some might get an error when trying to stop their Apache2 server
Code: | # /etc/init.d/apache2 stop
* Stopping apache2 ...
httpd (no pid file) not running [ ok ] |
And from there on, the server will not start again, and just give you this error:
Code: | * Starting apache2 ...
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
no listening sockets available, shutting down
Unable to open logs [ !! ] |
I haven't yet found the origin of this problem, but a quick work-around is to kill the running apache server the hard way:
And from there on, our apache2 server will start and restart without problems again (but not stop, for some reason).
I will of course bring an update as soon as I get this problem fixed.!
Old: Installing Apache 1.x with PHP4.x
I have been having some problems getting Apache and PHP running on Gentoo, and have now gotten it to work.I couldn't find anyone who had posted something about this inhere, so i thought that i would just write what i did, maybe this can be to help for someone out there.
Well the steps i made was for installing Apache and PHP from scratch.
Step 1. - Installing Apache and PHP
The first thing to do is emerging down Apache and PHP, and then ebuild.
Code: |
# emerge apache php mod_php
# ebuild /var/db/pkg/dev-php/mod_php-x.x.x-rx/mod_php-x.x.x-rx.ebuild config
|
I have written x instead of version numbers, since there are always comming new versions up. To find out wich version you have just emerged type:
Code: |
# emerge -s mod_php
|
Now just sit back and wait a while. Emergin apache and php takes about 10min
Step 2. - Configuring Apache and PHP
Now it's time to configure Apache and PHP, before we are ready to test.
First we will edit /etc/conf.d/apache2, so that apache2 will start with php.
Code: |
# nano -w /etc/conf.d/apache2
APACHE_OPTS="-D SSL -D PHP4"
|
-D SSL is optional, and remember to uncomment the line.
If you want apache to start when the machine boots, do this
Code: |
# rc-update add apache2 default
|
Now for configureing apache. I have noticed that someone gets a httpd.conf file, and some places apache installs different places. But here is how i did it.
When i emerged apache, i got a folder in /etc/apache2 and the configuration files are in /etc/apache2/conf
Here to add PHP to apache as a module
Code: |
# cd /etc/apache2/conf
# cp apache2.conf apache2.conf.working
# nano -w apache2.conf
|
Now here there sometimes also are differences. You have to locate the libphp4.so file. Some has it in /etc/apache2/lib/libphp4.so others in /etc/apache2/modules/libphp4.so, mine where in /etc/apache2/extramodules/libphp4.so
Code: |
LoadModule php4_module where_you_found_it/libphp4.so
|
You don't have to write for eksampel /etc/apache2/extramodules/libphp4.so, you can just write extramodules/libphp4.so
If your configuration files are seperated into apache2.conf and commonapache2.conf, then you have to add the LoadModule... line into apache2.conf, as i showed above, but if you also adds the AddType to the apache2.conf file, it will not work. These lines has to be added into commonapache2.conf.
Here, still cd'ed into the folder /etc/apache2/conf
Code: |
# cp commonapache2.conf commonapache2.conf.working
# nano -w commonapache2.conf
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
|
The second AddType is optional, only if you want to allow .phps files (where the php code is shown with colors)
A good rule is to add the LoadModule and AddType lines together with all the others (other LoadModule or AddType lines in the configuration files), or at the end of the file(s).
Step 3. - Testing the webserver
Now to see if any of the things you have just done, actually works
You have to be logged in as su to do this command.
If you are not logged in as super user, its pretty simple
Now for starting the apache server
The commands for controlling the apache server are:
Code: | apache2 -k [start | restart | stop] |
I hope this is going to help somebody out there..
Last edited by theProphecy on Fri Dec 09, 2005 1:18 am; edited 1 time in total |
|
Back to top |
|
|
karwoski n00b
Joined: 30 Jun 2002 Posts: 16 Location: Columbia, MO
|
Posted: Fri Nov 14, 2003 3:17 pm Post subject: |
|
|
Thanks. I'm trying it out now. |
|
Back to top |
|
|
theProphecy n00b
Joined: 29 Oct 2003 Posts: 50 Location: Denmark, Århus-->Åbyhøj
|
Posted: Fri Nov 14, 2003 4:55 pm Post subject: |
|
|
You're welcome... Just hope that my post maybe helped you out a bit.. _________________ Michael Dahl
theprophecy software
innovations make the future |
|
Back to top |
|
|
theProphecy n00b
Joined: 29 Oct 2003 Posts: 50 Location: Denmark, Århus-->Åbyhøj
|
Posted: Fri Nov 14, 2003 4:55 pm Post subject: |
|
|
Damn.... Pressed the 'Submit' button two times... _________________ Michael Dahl
theprophecy software
innovations make the future |
|
Back to top |
|
|
ctenet Apprentice
Joined: 10 Aug 2003 Posts: 156 Location: New York, USA
|
Posted: Sat Nov 15, 2003 1:46 am Post subject: |
|
|
Why's this in desktop environments? |
|
Back to top |
|
|
lucindrea n00b
Joined: 09 Nov 2003 Posts: 50
|
Posted: Sat Nov 15, 2003 2:00 am Post subject: |
|
|
ctenet wrote: | Why's this in desktop environments? |
admin hasnt moved it yet? |
|
Back to top |
|
|
ian! Bodhisattva
Joined: 25 Feb 2003 Posts: 3829 Location: Essen, Germany
|
Posted: Sat Nov 15, 2003 1:40 pm Post subject: |
|
|
Moved from 'Desktop Environments' to 'Networking & Security'. _________________ "To have a successful open source project, you need to be at least somewhat successful at getting along with people." -- Daniel Robbins |
|
Back to top |
|
|
ArloWhite n00b
Joined: 23 May 2003 Posts: 53
|
Posted: Sun Nov 16, 2003 12:48 am Post subject: |
|
|
Thanks,
I was trying to figure out why php wasn't working. Looking at my configs all the php lines were already correct. It turns out I only needed to do the ebuild config script. Maybe I should have paid attention after mod_php emerged to know to do this??
Code: |
# ebuild /var/db/pkg/dev-php/mod_php-x.x.x-rx/mod_php-x.x.x-rx.ebuild config
|
-Arlo |
|
Back to top |
|
|
volrathxp n00b
Joined: 24 Apr 2003 Posts: 33
|
Posted: Sun Nov 16, 2003 2:35 am Post subject: |
|
|
You know... I've done all this and apache2 still seems broken.. it acts like it starts but it just stops completely.
/var/log/apache2/error_log reports:
Code: |
[Sat Nov 15 21:31:55 2003] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "*************"
Configuration Failed
|
is there something completely wrong here? or is the fact that i'm trying to start it via SSH a problem?
edit: nvm i fixed it, forgot to add my host/ip to /etc/hosts _________________ Joseph Dyer
MCP, Windows XP Professional (70-270)
MCP, Managing and Maintaining a Windows Server 2003 Environment (70-290)
Rock-Comics.com
Working on:
Linux+
Security+ |
|
Back to top |
|
|
timvor n00b
Joined: 14 Aug 2003 Posts: 7 Location: South Africa
|
Posted: Thu Nov 20, 2003 11:33 am Post subject: |
|
|
hi all
still cant get php going
links http://localhost and https://localhost gives me the default apache page which is fine , yet http://localhost/test.php gives me
404 Not Found
The requested URL /test.php was not found on this server.
Apache/2.0.48 (Gentoo/Linux) PHP/4.3.3 mod_ssl/2.0.48 OpenSSL/0.9.6k Server at localhost Port 80
/var/log/apache2/error_log shows this after reboot
[Thu Nov 20 13:00:13 2003] [notice] Digest: generating secret for digest authentication ...
[Thu Nov 20 13:00:13 2003] [notice] Digest: done
[Thu Nov 20 13:00:14 2003] [notice] Apache/2.0.48 (Gentoo/Linux) PHP/4.3.3 mod_ssl/2.0.48 OpenSSL/0.9.6k configured -- resuming normal operations
script not found or unable to stat
script not found or unable to stat
I remerged mod_php and apache2 with the following USE flags
USE="pam tcpd ssl sasl libwww mysql imap maildir apache apache2 "
the file seems to be there
root@esnet / # ls -al /var/www/localhost
total 28
drwxr-xr-x 6 root root 4096 Nov 20 08:40 .
drwxr-xr-x 3 root root 4096 Nov 19 14:04 ..
drwxr-xr-x 2 root root 4096 Nov 19 14:04 cgi-bin
drwxr-xr-x 3 root root 4096 Nov 19 14:04 error
drwxr-xr-x 3 root root 4096 Nov 20 11:57 htdocs
drwxr-xr-x 3 root root 4096 Nov 19 14:04 icons
-rw-r--r-- 1 root root 21 Nov 20 08:40 test.php
The required file is there so why can i not get to it or does this mean that php is not working ?????
Any help herereally appreciated
timvor _________________ tongue tied and twisted , just another GUI bound misfit I |
|
Back to top |
|
|
volrathxp n00b
Joined: 24 Apr 2003 Posts: 33
|
Posted: Thu Nov 20, 2003 12:41 pm Post subject: |
|
|
move test.php to the htdocs directory _________________ Joseph Dyer
MCP, Windows XP Professional (70-270)
MCP, Managing and Maintaining a Windows Server 2003 Environment (70-290)
Rock-Comics.com
Working on:
Linux+
Security+ |
|
Back to top |
|
|
timvor n00b
Joined: 14 Aug 2003 Posts: 7 Location: South Africa
|
Posted: Thu Nov 20, 2003 1:45 pm Post subject: |
|
|
thanks for the help
this is what you get when you put a MS user + gentoo + outdated docs
Thanks again _________________ tongue tied and twisted , just another GUI bound misfit I |
|
Back to top |
|
|
volrathxp n00b
Joined: 24 Apr 2003 Posts: 33
|
Posted: Thu Nov 20, 2003 8:14 pm Post subject: |
|
|
timvor wrote: |
thanks for the help
this is what you get when you put a MS user + gentoo + outdated docs
Thanks again |
no problem
happy to help _________________ Joseph Dyer
MCP, Windows XP Professional (70-270)
MCP, Managing and Maintaining a Windows Server 2003 Environment (70-290)
Rock-Comics.com
Working on:
Linux+
Security+ |
|
Back to top |
|
|
Random Task Apprentice
Joined: 31 Mar 2003 Posts: 171 Location: Canada
|
Posted: Thu Nov 20, 2003 9:11 pm Post subject: |
|
|
I have a question:
I installed apache and php just fine using your awesome guide however at bootup I receive the following message:
Quote: | Warning: module_php4 already loaded ignoring |
(That's not the actual message, but it's close enough).
I have set up a phpBB so obviously php is working, but I'm just wondering how can I get rid of that error message?
Thanks _________________ If you can't kill something with that, it ain't supposed to die...
You're so drunk you're seeing double...
I've got two guns, one for each of ya!
-Val Kilmer as Doc Holliday, Tombstone |
|
Back to top |
|
|
volrathxp n00b
Joined: 24 Apr 2003 Posts: 33
|
Posted: Fri Nov 21, 2003 4:42 am Post subject: |
|
|
Random Task wrote: | I have a question:
I installed apache and php just fine using your awesome guide however at bootup I receive the following message:
Quote: | Warning: module_php4 already loaded ignoring |
(That's not the actual message, but it's close enough).
I have set up a phpBB so obviously php is working, but I'm just wondering how can I get rid of that error message?
Thanks |
I get the same message... I just left it alone, meh... _________________ Joseph Dyer
MCP, Windows XP Professional (70-270)
MCP, Managing and Maintaining a Windows Server 2003 Environment (70-290)
Rock-Comics.com
Working on:
Linux+
Security+ |
|
Back to top |
|
|
omahorst n00b
Joined: 13 Nov 2003 Posts: 39 Location: Washington, DC
|
Posted: Fri Nov 21, 2003 7:45 pm Post subject: great guide |
|
|
Hey Prophecy,
GREAT explanation. Exactly what I had been looking for.
Kudos!
Sebastian |
|
Back to top |
|
|
theProphecy n00b
Joined: 29 Oct 2003 Posts: 50 Location: Denmark, Århus-->Åbyhøj
|
Posted: Mon Nov 24, 2003 4:14 pm Post subject: |
|
|
Great... Glad that it can help someone out! _________________ Michael Dahl
theprophecy software
innovations make the future |
|
Back to top |
|
|
Random Task Apprentice
Joined: 31 Mar 2003 Posts: 171 Location: Canada
|
Posted: Tue Nov 25, 2003 2:09 am Post subject: |
|
|
volrathxp wrote: | Random Task wrote: | I have a question:
I installed apache and php just fine using your awesome guide however at bootup I receive the following message:
Quote: | Warning: module_php4 already loaded ignoring |
(That's not the actual message, but it's close enough).
I have set up a phpBB so obviously php is working, but I'm just wondering how can I get rid of that error message?
Thanks |
I get the same message... I just left it alone, meh... |
Well I _think_ I solved it without any _major_ problems!
What I did was comment out the line where you are supposed to put the following:
Code: | LoadModule php4_module where_you_found_it/libphp4.so |
in /etc/apache2/conf/apache2/conf
I tested my phpBB that I put up and it was still working so I _think_ commenting out that line doesn't break anything.
Please post back here with any comments! _________________ If you can't kill something with that, it ain't supposed to die...
You're so drunk you're seeing double...
I've got two guns, one for each of ya!
-Val Kilmer as Doc Holliday, Tombstone |
|
Back to top |
|
|
blasterboy n00b
Joined: 30 Aug 2002 Posts: 57 Location: Belgium
|
Posted: Thu Dec 18, 2003 2:26 pm Post subject: |
|
|
The reason you get that message is probably that you executed the ebuild script at the end of emerging mod_php several times.
If you look at you apache configurations (both files) you'll probably find that is multiple times in your config.
When apache finds it for the second time, it just ignores it.
So you do need it at least ONCE in your apache.conf files.
Regards,
A |
|
Back to top |
|
|
spp n00b
Joined: 11 Jul 2003 Posts: 27 Location: Alexandria, VA USA
|
Posted: Thu Dec 18, 2003 3:03 pm Post subject: |
|
|
Not necessarily. If you do the ebuild config line, it *should* add the following to apache.conf
Code: |
<IfDefine PHP4>
LoadModule php4_module extramodules/libphp4.so
</IfDefine>
...
<IfDefine PHP4>
AddModule mod_php4.c
</IfDefine>
... And also at the bottom...
Include conf/addon-modules/mod_php.conf
|
Doing the extra editing to add those lines manually will cause the error. The config line takes care of that.
This + the editing of the /etc/conf.d/ file will get the server running.
The steps in order would be...
Code: |
# emerge apache mod_php php
If you want MySQL or other support in there...
# USE="mysql <other options>" emerge apache mod_php php
# ebuild /var/db/pkg/dev-php/mod_php-x.x.x-rx/mod_php-x.x.x-rx.ebuild config
For Apache 1.x
# nano -w /etc/conf.d/apache
For Apache 2.x
# nano -w /etc/conf.d/apache2
Uncomment the APACHE_OPTS line and ensure that the -D PHP4 is in there.
OPTIONAL to start at run time - Apache 1.x
# rc-update add apache default
OPTIONAL to start at run time - Apache 2.x
# rc-update add apache2 default
|
Create a file under your DocumentRoot called info.php with the folllowing in it:
and if you point your browser to http://<name/ip of box>/info.php you should get the PHP info page.
The install for Gentoo apache is pretty different than from the "Standard" install. It is radically different from the Redhat version as it uses the include functionality of the conf files.
SP _________________ Installing Gentoo... (Still) |
|
Back to top |
|
|
hereticorp n00b
Joined: 25 Dec 2003 Posts: 6 Location: Burlington, VT
|
Posted: Fri Dec 26, 2003 5:47 am Post subject: Got most of the way there... |
|
|
* Starting apache2...[Thu Dec 25 17:02:08 2003] [warn] module php4_module is already loaded, skipping
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[ !! ]
So, I tried binding it to the local address on ETH0 (192.168.123.159) and I tried binding it to everything. (Listen *:80) and neither of them work.
Error message only changes in that 0.0.0.0:80 becaomse 192.168.123.159:80 when I issue "Listen 192.168.123.159:80" rather then "Listen *:80"
Ideas? I have no other versions of Apache emerged, and I have no idea what else could be binding port 80. |
|
Back to top |
|
|
Bathroom Ninja n00b
Joined: 25 Dec 2003 Posts: 30 Location: Austin, TX
|
Posted: Sun Dec 28, 2003 10:32 am Post subject: |
|
|
THANK YOU. this worked for me and saved me from shooting my computer.
Another computer saved by a good HowTo |
|
Back to top |
|
|
flecluse n00b
Joined: 08 Nov 2003 Posts: 24 Location: Belgium (Brussels)
|
Posted: Tue Dec 30, 2003 10:29 pm Post subject: |
|
|
Thanks man you saved me a lot of work,
Great help, maybe you should post it to the documentation team.
Greetings
Filip _________________ To kill one is a tragedy,
To kill one million is a statistic! |
|
Back to top |
|
|
mangobrain Tux's lil' helper
Joined: 11 Sep 2003 Posts: 109
|
Posted: Fri Jan 02, 2004 12:53 am Post subject: |
|
|
Erm..maybe things are a little different since the time of the original post in this thread, but all I had to do was emerge Apache, emerge mod_php, and add "-D PHP4" to the relevant config file. I did have to run an ebuild config on one (or maybe both) of the packages, but basically, I didn't do anything that portage didn't suggest to me.
I didn't realise this until AFTER I'd finished compiling it, but if you emerge php (as opposed to mod_php), you'll get a commandline-only version. Mod_php - the webserver version - doesn't even depend on having php (CLI version) installed, it seems. I emerged Apache, emerged PHP, unmerged PHP again after being warned by portage that what I'd just installed was CLI-only, and merged mod_php, which didn't (fortunately for me) depend on what I'd just unmerged. I can confirm that, at the very least, Apache and the phpinfo() function are working.
The purpose of the two PHP packages, and the fact that one doesn't depend on the other, should be made clearer (put it in the package descriptions, perhaps). |
|
Back to top |
|
|
Oopsz Guru
Joined: 08 Oct 2002 Posts: 340
|
Posted: Fri Jan 02, 2004 3:20 am Post subject: |
|
|
...it is in the package description.
Code: | oopsz@venus oopsz $ esearch php
* dev-php/php
Latest version available: 4.3.3-r2
Latest version installed: 4.3.3-r2
Size of downloaded files: 3,625 kB
Homepage: http://www.php.net/
Description: PHP Shell Interpreter |
php is useful for shell scripting and cgi-php, mod_php is the persistent php environment for apache. Similar for perl vs mod_perl. _________________ Pop-before-SMTP with the Gentoo Virtual Mailhosting Guide |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|