Opened 15 years ago
Last modified 15 years ago
#21871 assigned defect
php52 - depends on non-standard apache2 config
Reported by: | apinstein@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.1 |
Keywords: | Cc: | jyrkiwahlstedt | |
Port: | php52 |
Description (last modified by mf2k (Frank Schima))
I have installed apache2 + php52 / php53 a few times from scratch lately, and there is a slight problem that's very tricky to track down.
The default httpd.conf from the apache install no longer includes:
Include conf/extras-conf/*
Thus the conf file that the php5* ports install in that directory are never loaded, and php is not available by default on machines "ootb".
I am not sure the most appropriate way to fix this, whether this is an apache bug or a php bug, but it seemed more appropriate to report to you first since you are relying on an assumption about apache configs.
I look forward to your response.
Regards, Alan
Change History (4)
comment:1 Changed 15 years ago by jmroot (Joshua Root)
Cc: | jwa@… added |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
Port: | php52 added |
comment:2 Changed 15 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|
comment:3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Status: | new → assigned |
---|
comment:4 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Alan sent the following reply by email:
From: Alan Pinstein <apinstein@…>
Date: October 5, 2009 23:22:50 CDT
To: macports-dev@…
Cc: ryandesign@…, macports-tickets@…, jwa@…
Subject: Re: [MacPorts] #21871: php52 - depends on non-standard apache2 config
Thanks for the quick update.
I read the other ticket, that's good info.
However, that Wiki/MAMP article is not referenced anywhere so I had no idea it existed.
Plus, I use Postgres so I tend not to search for MAMP stuff (that's on me of course).
But I've gotten to the point where to bootstrap a new machine I need only do:
port install apache2 postgresql83 postgresql83-server php52 +apache2+postgresql83+pear+readline php5-syck php5-xdebug
And then add to the bottom of httpd.conf:
Include conf/extras-conf/*
NameVirtualHost 10.0.1.201:8080
Include /Users/alanpinstein/dev/sandbox/project1/conf/httpd.conf
Include /Users/alanpinstein/dev/sandbox/project2/conf/httpd.conf
The only thing that isn't "mine" is the php-conf setup.
It's unexpected that the port sets up the loadmodule and installs the php-conf but doesn't "include" the conf file.
Is there no apache-recommended way to automate module installs the same way that the LoadModule stuff is automated?
If it can't be totally automated at least the ui_msg output should indicate to add:
Include conf/extra/mod_php.conf
to the conf file.
Regards,
Alan
You are meant to add the following line to your httpd.conf to make php5 +apache2 work:
See the MAMP how-to.
Note that php5's conf file is in "extra" now and no longer in "extras-conf". php52 will be changed as well. See #21217.