New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #21871 (assigned defect)

Opened 4 years ago

Last modified 4 years ago

php52 - depends on non-standard apache2 config

Reported by: apinstein@… Owned by: ryandesign@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: jwa@…
Port: php52

Description (last modified by macsforever2000@…) (diff)

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

comment:1 Changed 4 years ago by jmr@…

  • Cc jwa@… added
  • Owner changed from macports-tickets@… to ryandesign@…
  • Port set to php52

comment:2 Changed 4 years ago by macsforever2000@…

  • Description modified (diff)

comment:3 Changed 4 years ago by ryandesign@…

  • Status changed from new to assigned

You are meant to add the following line to your httpd.conf to make php5 +apache2 work:

Include conf/extra/mod_php.conf

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.

comment:4 Changed 4 years ago by ryandesign@…

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

Note: See TracTickets for help on using tickets.