View previous topic :: View next topic |
Author |
Message |
Artem n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Mar 2004 Posts: 33
|
Posted: Thu Mar 11, 2004 10:19 pm Post subject: Apache2 + PHP + MySQL |
|
|
How would I go about setting this up? Anyone have a guide? I alreade emerged apache, php, mysql, mod_php, etc but it still says PHP is not running, and I bet that it doesn't recognize MySQL either. So how can I make this work?
-Artem |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steveb Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1198140199438f3db8ee800.gif)
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Thu Mar 11, 2004 10:27 pm Post subject: |
|
|
if you have apache2 and mod_php installed, then you only need to edit /etc/conf.d/apache2 and enable php in the APACHE2_OPTS, by adding "-D PHP4" to the line: Code: | APACHE2_OPTS="-D SSL -D PHP4" | and then restart apache2
cheers
SteveB |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Artem n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Mar 2004 Posts: 33
|
Posted: Thu Mar 11, 2004 10:28 pm Post subject: |
|
|
Tried that, same thing happens ![Sad :(](images/smiles/icon_sad.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
steveb Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/1198140199438f3db8ee800.gif)
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Thu Mar 11, 2004 10:30 pm Post subject: |
|
|
what is the content of /var/log/apache2/error_log?
cheers
SteveB |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fixxxer n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Mar 2004 Posts: 3 Location: Moscow, Russia
|
Posted: Thu Mar 11, 2004 10:35 pm Post subject: |
|
|
The first thing is that you should not install Apache2+mod_php for production or semi-production purposes:
http://www.php.net/install.apache2
I also prefer to emerge them separately: first Apache then mod_php (mysql should be emerged before php, too). At least this always works fine.
You should also study the configure parameters of php and add the corresponding directives to the USE variable or you'll get no modules like DOM, XSLT or GD which are very useful.
If you're going to serve several virtual host you SHOULD read about the base_opendir and safe_mode ini directoves of PHP: this is due to all the php scripts run from the same user and therefore can access each other's sensitive data by default. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Artem n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Mar 2004 Posts: 33
|
Posted: Thu Mar 11, 2004 10:39 pm Post subject: |
|
|
After emptying the log, restarting the server, and trying to access a PHP page this is what's in the log.
However this does not look like something special =\
Code: | [Wed Mar 10 15:38:43 2004] [notice] Digest: generating secret for digest authentication ...
[Wed Mar 10 15:38:43 2004] [notice] Digest: done
[Wed Mar 10 15:38:44 2004] [notice] Apache/2.0.48 (Gentoo/Linux) configured -- resuming normal operations
[Wed Mar 10 15:38:56 2004] [error] [client XX.XX.XX.XXX] File does not exist: /var/www/localhost/htdocs/favicon.ico |
Note: XX.XX.XX.XXX is my blanked out IP address ![Wink ;)](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fixxxer n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Mar 2004 Posts: 3 Location: Moscow, Russia
|
Posted: Thu Mar 11, 2004 10:45 pm Post subject: |
|
|
This is not an informative part of the log. It's all normal...
Are there mod_php.conf and php.ini files in /etc/apache/conf/addon-modules?
Is mod_php.conf included in httpd.conf or its includes?
What happens if you put an index.php file containing
<?php phpinfo() ?>
to your DocumentRoot and go to http://your_ip/index.php with your browser? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Artem n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Mar 2004 Posts: 33
|
Posted: Thu Mar 11, 2004 10:47 pm Post subject: |
|
|
OK I see a problem because i don't have an addon-modules folder in conf. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fixxxer n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Mar 2004 Posts: 3 Location: Moscow, Russia
|
Posted: Thu Mar 11, 2004 10:55 pm Post subject: |
|
|
Hmm.
If you emerged them all-in-time there probably are no addon-modules and everything is in httpd.conf. I just never tried it this way...but i can suppose it is so...
check your conf files for presense of the line like this
LoadModule php4_module /usr/lib/apache/libphp4.so
is it present? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Artem n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Mar 2004 Posts: 33
|
Posted: Thu Mar 11, 2004 11:00 pm Post subject: |
|
|
Added that - still won't work, even though the file exists... ![Sad :(](images/smiles/icon_sad.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Artem n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 09 Mar 2004 Posts: 33
|
Posted: Thu Mar 11, 2004 11:19 pm Post subject: |
|
|
Damn, apache is pointless for me if I don't have PHP working ![Sad :(](images/smiles/icon_sad.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
radice n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2003 Posts: 27
|
Posted: Fri Mar 12, 2004 9:15 am Post subject: |
|
|
I have php4, apache 2.0.48 and mysql 12.22.
To install I followed these steps:
emerge apache
emerge mysql
emerge php
emerge mod_php
Added Line in /etc/apache2/conf/apache2.conf:
LoadModule php4_module modules/libphp4.so
Didn't added the -D PHP in APACHE2_OPTS in /etc/conf.d/apache2
Now it is working perfectly _________________ "Occupatevi delle cose di Lassù" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
meyer37 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/3118119473e80c70f5e83e.jpg)
Joined: 04 Feb 2003 Posts: 41 Location: Milwaukee, WI
|
Posted: Sat Mar 13, 2004 8:05 pm Post subject: |
|
|
I also had a bit of trouble setting up APACHE2 and PHP. What work for me was
Code: |
emerge apache
emerge php
emerge mod_php
|
I then followed the suggestions at the end of the mod_php emerge and add to the APACHE2_OPTS and also uncommented that line.
The main thing was to uncomment the APACHE2_OPTS line because by default it is commented out. How the simplest errors can sometimes be the hardest to find ![Cool 8)](images/smiles/icon_cool.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
webkiller71 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 29 Nov 2003 Posts: 20
|
Posted: Sat Mar 13, 2004 8:31 pm Post subject: |
|
|
Artem wrote: | [Wed Mar 10 15:38:56 2004] [error] [client XX.XX.XX.XXX] File does not exist: /var/www/localhost/htdocs/favicon.ico |
this is irrelevant, this is the icon in the adres bar, if it doesn't exists, it doesn't matter |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hermes_jr l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1218839918407d5742349af.gif)
Joined: 26 Feb 2004 Posts: 701 Location: Moscow, Russia
|
Posted: Sat Mar 13, 2004 10:13 pm Post subject: |
|
|
Hmm... icon... DIY!!! (Draw It Youself)
And what about this? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mach.82 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 30 Oct 2003 Posts: 75 Location: 43°N/79°W
|
Posted: Wed Dec 08, 2004 12:28 am Post subject: Apache2 + PHP + MySQL |
|
|
hermes_jr wrote: | Hmm... icon... DIY!!! (Draw It Youself)
And what about this? |
Hwo do you do that? Or
What tool(s) do I use?
Thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|