Hi I have a newly-Leopardized PowerPC running Leopard (10.5.1) Fresh install of MacPorts Fresh install of XCode 3 I do this sudo port selfupdate port version Version: 1.520 On my other systems (PPC 10.3.9, Intel 10.4.11) I used this command to install PHP5 sudo port install php5 +apache +macosx +mysql5 +pear On Leopard I would prefer to use the Apple installed Apache2, so I assume that this command would be appropriate sudo port install php5 +apache2 +macosx +mysql5 +pear What I get is this (which is different than yesterday) ---> Building apache2 with target all Error: Target org.macports.build returned: shell command " cd "/opt/ local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_www_apa che2/work/httpd-2.2.6" && make all " returned error 2 Command output: ab.c: In function 'start_connect': ab.c:1150: warning: passing argument 2 of 'BIO_set_callback_arg' from incompatible pointer type So, does anyone have a handy list of hints for making PHP5 work with the Apple-provided Apache2? I got mysql5 installed and working just fine. Thanks in advance. 8) ---------------------------------- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM 8) ---------------------------------- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM
On Dec 4, 2007, at 12:28, Chris Janton wrote:
I have a newly-Leopardized PowerPC running Leopard (10.5.1) Fresh install of MacPorts Fresh install of XCode 3
I do this
sudo port selfupdate port version Version: 1.520
On my other systems (PPC 10.3.9, Intel 10.4.11) I used this command to install PHP5
sudo port install php5 +apache +macosx +mysql5 +pear
On Leopard I would prefer to use the Apple installed Apache2, so I assume that this command would be appropriate
sudo port install php5 +apache2 +macosx +mysql5 +pear
What I get is this (which is different than yesterday)
---> Building apache2 with target all Error: Target org.macports.build returned: shell command " cd "/opt/ local/var/macports/build/ _opt_local_var_macports_sources_rsync.macports.org_release_ports_www_a pache2/work/httpd-2.2.6" && make all " returned error 2 Command output: ab.c: In function 'start_connect': ab.c:1150: warning: passing argument 2 of 'BIO_set_callback_arg' from incompatible pointer type
So, does anyone have a handy list of hints for making PHP5 work with the Apple-provided Apache2? I got mysql5 installed and working just fine.
I'm the maintainer of php5 (along with Jyrki). I had intended to bring this topic up with the list before--as soon as I noticed that Leopard includes Apache 2, not Apache 1--but I forgot. Thanks for reminding me. In php5, +apache uses Apple's Apache 1.3 (when running on Mac OS X 10.4 or earlier, and probably explodes on 10.5 and later), or uses MacPorts's Apache 1.3 (when not running on Mac OS X). +apache2 uses MacPorts's Apache 2.2. There is no way, with the current set of variants, to use the Apple Apache 2 in Leopard, nor the MacPorts Apache 1.3 when running on Mac OS X. This is all very confusing and has to stop. MacPorts philosophy is to use MacPorts libraries only, unless there's a very good reason. This is explained in the FAQ: http://trac.macports.org/projects/macports/wiki/ FAQ#WhyisMacPortsusingitsownlibraries In the case of php5, the "very good reason" was that Apple's Apache 1.3 was perfectly fine and it was convenient to be able to continue to use System Preferences to deal with the web server. Leopard's inclusion of Apache 2 changes all that for me. I no longer wish to support using Apple's Apache at all. I don't care what version it is. I want +apache to use MacPorts's Apache 1.3, and +apache2 to use MacPorts's Apache 2.2. This will make things much simpler in the portfile, much simpler for users to understand, and will be consistent with established guidelines. If there are any objections, now is the time to voice them. Otherwise I'll make these modifications soon. None of the above unfortunately helps your problem, which I cannot understand. Apparently you cannot build apache2 on Leopard. You should take that up with the maintainer of the apache2 port. Though I know it should build on Leopard, because I saw someone do it.
Chris Janton wrote:
Hi
I have a newly-Leopardized PowerPC running Leopard (10.5.1) Fresh install of MacPorts Fresh install of XCode 3
I do this
sudo port selfupdate port version Version: 1.520
On my other systems (PPC 10.3.9, Intel 10.4.11) I used this command to install PHP5
sudo port install php5 +apache +macosx +mysql5 +pear
On Leopard I would prefer to use the Apple installed Apache2, so I assume that this command would be appropriate
sudo port install php5 +apache2 +macosx +mysql5 +pear
...
So, does anyone have a handy list of hints for making PHP5 work with the Apple-provided Apache2? I got mysql5 installed and working just fine.
Thanks in advance.
Ryan Schmidt gave you some reasoning. Now, if you _do_ want to try and use the Apple version of Apache 2.2.6 in concert with the macports PHP5 you'll have to modify the php5 Portfile. My suggestion is as follows: In Terminal, execute the following two commands: export EDITOR=/Applications/TextEdit.app/Contents/MacOS/TextEdit sudo port edit php5 You'll now have to change the Portfile in TextEdit in two places: 1) # Build an Apache 2 module. Keep the options here in sync with those in the # relevant part of the post-destroot phase. variant apache2 conflicts apache { destroot.violate_mtree yes configure.args-append \ --with-apxs2=/usr/sbin/apxs } 2) # Copy the Apache 2 module. if { [variant_isset apache2] } { xinstall -m 755 ${worksrcpath}/libs/libphp5.so /usr/libexec/apache2/lib_php5.so } Save, and quit TextEdit. Please note that I've _!NOT!_ tested this and that it might fail horribly ;-) Likewise, I don't intend to test it either. ;-) Also note, that the php5 Portfile will revert to the original each time you execute a 'port sync' I'm keeping the Apple PHP5 *.so module, so you can switch between the Apple and the macports versions at yuor own discretion. I assume you know how to enable PHP5 manually in httpd.conf :-)
8) ---------------------------------- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM
-- Bjarne D Mathiesen K¯benhavn N ; Danmark ; Europa ---------------------------------------------------------------------- denne besked er skrevet i et totalt M$/Intel-frit milj¯ MacOS X 10.4.2 Tiger ; Seamonkey 1.1a ; PowerPC G4 800MHz http://mozilla.mathiesen.info/ http://webadmin.mathiesen.info/
On 2007-12-04 , at 19:16 , Ryan Schmidt wrote:
Leopard's inclusion of Apache 2 changes all that for me. I no longer wish to support using Apple's Apache at all. I don't care what version it is. I want +apache to use MacPorts's Apache 1.3, and +apache2 to use MacPorts's Apache 2.2. This will make things much simpler in the portfile, much simpler for users to understand, and will be consistent with established guidelines.
If there are any objections, now is the time to voice them. Otherwise I'll make these modifications soon.
I would ask you to wait until it is clear that Apache2 will build and work on Leopard. I can't build Apache2. I can't build PHP5. I can build MySQL5. Those are the 3 big ones for me. Of course I would be quite unhappy on my old 10.3.9 server. That probably won't get updated to Tiger or Leopard, so at some point I will probably have to grab the Portfiles and supporting files and put them into a local tree. I'll have to maintain that set on my own. Gee - at this point I have to wonder if I should bother with macports at all. The ease and benefit of using the port system will be gone. By ease and benefit I mean that I am not subject to Apple changing out my software and breaking my production system. Now the macports system will do it for me. sigh. 8) ---------------------------------- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM
Chris Janton wrote:
On 2007-12-04 , at 19:16 , Ryan Schmidt wrote:
Leopard's inclusion of Apache 2 changes all that for me. I no longer wish to support using Apple's Apache at all. I don't care what version it is. I want +apache to use MacPorts's Apache 1.3, and +apache2 to use MacPorts's Apache 2.2. This will make things much simpler in the portfile, much simpler for users to understand, and will be consistent with established guidelines.
If there are any objections, now is the time to voice them. Otherwise I'll make these modifications soon.
I would ask you to wait until it is clear that Apache2 will build and work on Leopard.
I can't build Apache2. I can't build PHP5. I can build MySQL5. Those are the 3 big ones for me.
Of course I would be quite unhappy on my old 10.3.9 server. That probably won't get updated to Tiger or Leopard, so at some point I will probably have to grab the Portfiles and supporting files and put them into a local tree. I'll have to maintain that set on my own.
Gee - at this point I have to wonder if I should bother with macports at all. The ease and benefit of using the port system will be gone. By ease and benefit I mean that I am not subject to Apple changing out my software and breaking my production system. Now the macports system will do it for me.
Well, except for ssl support in Apache2 it's possible to get everything to work :-) http://blog.phpdoc.info/archives/83-php-5.2.5-on-Leopard.html and I'm following along somewhat the same lines using macports to get the necessary libraries etc for php _BUT_ installing Apache, MySQL and PHP outside the macports framework. If you are interested, I can send you my development environment.
sigh.
8) ---------------------------------- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM
-- Bjarne D Mathiesen København N ; Danmark ; Europa ---------------------------------------------------------------------- denne besked er skrevet i et totalt M$-frit miljø MacOS X 10.5.1 Leopard ; Seamonkey 1.1.x ; PowerPC G4 800MHz
On 2007-12-04 , at 19:16 , Ryan Schmidt wrote:
None of the above unfortunately helps your problem, which I cannot understand. Apparently you cannot build apache2 on Leopard. You should take that up with the maintainer of the apache2 port. Though I know it should build on Leopard, because I saw someone do it.
I cleaned out apache2 and php5 sudo port -f clean --work apache2 php5 I built apache2 and got it started (commenting out the ssl module in the conf file) apache2 @2.2.6_0 (active) I built php5 php5 @5.2.5_1+apache2+macosx+mysql5+pear+sqlite (active) I included the php5 extra-conf file in the httpd.conf PHP5 works - phpinfo() - via browsers. Now it would just appear to be conf file (and .ini file and others) configuration and testing. The one "problem" that I currently see is that if I have the bad taste to do sudo apachectl graceful (or whatever) I wind up running /usr/sbin/apachectl Just about everything that is in /opt/local/apache2/bin/ is also in / usr/sbin. I need to either modify my PATH to include the correct path, or make all the fine utilities show up in /opt/local/sbin Don't know which is the "best" way to do it. If I have to modify the PATH for apache2 that's OK, but that isn't what I expect to need to do with any of the other ports. 8) ---------------------------------- Chris Janton - face at CentosPrime dot COM Netminder for Opus1.COM
participants (3)
-
Bjarne D Mathiesen
-
Chris Janton
-
Ryan Schmidt