You are not logged in.

#1 2002-12-31 09:02:09

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,293
Website

php with apache and mysql?

How do you setup php with apache and mysql? Is there a mod_php package or pacman config option (pacman -S php --with-mysgl, etc.)???


Markku

Offline

#2 2002-12-31 13:26:28

Arielext
Member
From: Amersfoort, the Netherlands
Registered: 2002-08-12
Posts: 362
Website

Re: php with apache and mysql?

download the three packages
add the 3 lines to httpd.conf and start httpd and mydqld and it should work

the 3 lines?
yes!
the 3 lines!

LoadModule libphp4 /lib/apache/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

Please note that I could be wrong (did it by heart)


apt-get install arch

Offline

#3 2002-12-31 15:51:37

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,293
Website

Re: php with apache and mysql?

Thanks. With a small edit I got everything to work. The code is:

LoadModule php4_module /usr/lib/apache/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

Once mod_php4.c is loaded, tag the line. If not, there is message:
[Tue Dec 31 04:55:50 2002] [warn] module mod_php4.c is already added, skipping
/usr/sbin/apachectl start: httpd started


Markku

Offline

#4 2003-01-02 05:10:11

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,293
Website

Re: php with apache and mysql?

To run php with mysql, untag "extension=msql.so" in /usr/etc/php.ini

; Dynamic Extensions ;
;:::::::::::::::::::::::::::::::
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;   extension=modulename.extension
;
; For example, on Windows:
;   extension=msql.dll
;
; ... or under UNIX:
;
   extension=msql.so
;

Markku

Offline

#5 2003-01-02 05:53:25

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,293
Website

Re: php with apache and mysql?

Sorry, I made an error. Don't untag "extension=msql.so" but instaed add line:

extension=mysql.so

Markku

Offline

#6 2003-01-03 13:03:38

Arielext
Member
From: Amersfoort, the Netherlands
Registered: 2002-08-12
Posts: 362
Website

Re: php with apache and mysql?

rasat wrote:

Thanks. With a small edit I got everything to work. The code is:

LoadModule php4_module /usr/lib/apache/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

Once mod_php4.c is loaded, tag the line. If not, there is message:
[Tue Dec 31 04:55:50 2002] [warn] module mod_php4.c is already added, skipping
/usr/sbin/apachectl start: httpd started

Why not use the httpd start script in /etc/rc.d ?
Works perfectly and you don't have to comment things out


apt-get install arch

Offline

#7 2003-04-05 10:44:55

xirus
Member
Registered: 2002-12-01
Posts: 113

Re: php with apache and mysql?

LoadModule libphp4 /usr/lib/apache/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

The weird thing is that this aint working for me, although it's correct sad

When I open a .php file with apache, he doesn't recognize its extension and my browser asks me to open or save it...

However when I deleted the .php in the url  (localhost/info instead of localhost/info.php) he DID load the phpinfo page.
Now after al lot of testing that doesn't even work anymore (although I'm pretty sure that my config files are exactly the same as when that did work)

(and I'm using rc.d/httpd)
There are NO errors at all in my apache logs.

Offline

#8 2003-04-05 15:41:56

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,293
Website

Re: php with apache and mysql?

=X¥®µ§= wrote:

LoadModule libphp4 /usr/lib/apache/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

The weird thing is that this aint working for me, although it's correct sad

Check your code. What you quoted (first line) is not correct.

LoadModule php4_module /usr/lib/apache/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php

Markku

Offline

#9 2003-04-05 18:42:53

xirus
Member
Registered: 2002-12-01
Posts: 113

Re: php with apache and mysql?

Ok, I just copied these lines from this thread, but in reality I was using the code you just gave...

As I said, at one point php WAS working (when I didn't give an extension) so this proves that everything is working except something with the addtype?

Offline

#10 2003-04-05 18:45:22

xirus
Member
Registered: 2002-12-01
Posts: 113

Re: php with apache and mysql?

ok this is weird

after a reboot it's all working properly  :shock:

I thought only windows needed a reboot to fix things  :cry:

Offline

#11 2003-04-05 18:48:06

orelien
Forum Fellow
From: France
Registered: 2002-12-05
Posts: 220
Website

Re: php with apache and mysql?

=X¥®µ§= wrote:

after a reboot it's all working properly

It was perhaps only apache that needed a restart?

Offline

#12 2003-04-05 18:51:54

xirus
Member
Registered: 2002-12-01
Posts: 113

Re: php with apache and mysql?

nope, I must have given the "/etc/rc.d/httpd restart" command dozens of times while testing smile

I'm not a complete idiot tongue

Offline

#13 2004-04-26 17:13:55

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: php with apache and mysql?

I have a new install of 0.6.  I did the pacman -Sy pacman and added apache and php and mysql.

I uncommented the line for php in the module list and made other changes such as server name.

I cannot get even one page to load though.  The connection is made...(netsta t -atn) and then it just sits there and keeps trying to load in the browser.

A bit disturbing and frustrating.....

Offline

#14 2004-04-26 17:45:32

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: php with apache and mysql?

When I execute a ps -ax I only see 1 httpd process in the list.... I updated the MPM start servers to 10 but I am still only seeing the one httpd listing.

Offline

#15 2004-04-26 19:15:48

Zoobarb
Member
From: Plattsburgh,NY
Registered: 2004-04-22
Posts: 22
Website

Re: php with apache and mysql?

Well,
  it works....

I commented out the webdav modules and all seems to be working.   I spoke with someone I work with and it seems there may be issues with PHP and Webdav coexisting nicely on the same system.

Thanks for a GREAT system.

Offline

Board footer

Powered by FluxBB