Hello, I am very new with macs but I need to install zoph (www.nother.net) on my imac (Intel CPU). For this I need new apache, php and more. So I installed darwin|macports 1.3.2 and php5 and apache2.2. 1. How do I get a php5 Module for apache? 2. How do I start the mysql5-Server and restart it every time I start the mac? 3. If I start apachectl, it still uses /usr/bin/apachectl from my Mac-OS. I already added the PATH in /etc/profiles and as well in my .profile. Can I uninstall the older versions of apache, mysql, perl etc. that came with my macos? 4. If I figured out all the problems above i can install zoph. I could do it from source in /usr/local, or is there a better way? Is it possible to build my own zoph-package to install/uninstall it with macports? Thanks for your help. Uli
On Oct 22, 2006, at 07:57, Ulrich Wiederhold wrote:
I am very new with macs but I need to install zoph (www.nother.net) on my imac (Intel CPU).
For this I need new apache, php and more. So I installed darwin| macports 1.3.2 and php5 and apache2.2.
1. How do I get a php5 Module for apache?
sudo port install php5 +apache2 +mysql5
2. How do I start the mysql5-Server and restart it every time I start the mac?
sudo port install mysql5 +server Note: Do this command *before* you install the php5 module as above. If you do not, you will end up with mysql5 installed without the server variant. Then, to start it now, and start it at every system startup: sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist To stop it now, and no longer start it up at every system startup: sudo launchctl unload -w /Library/LaunchDaemons/ org.macports.mysql5.plist This is assuming you're on Mac OS X 10.4.0 or greater.
3. If I start apachectl, it still uses /usr/bin/apachectl from my Mac-OS. I already added the PATH in /etc/profiles and as well in my .profile. Can I uninstall the older versions of apache, mysql, perl etc. that came with my macos?
MySQL does not come with Mac OS X. (It only comes with Mac OS X Server.) Do not attempt to uninstall any parts of the OS (including Perl, Apache, PHP) that Apple provided or your next update of Mac OS X may explode. MacPorts installs everything in a completely separate heirarchy (/opt/local) and thus cannot and does not interfere with the Apple components. Simply leave the Apple parts where they are and do not use them. You could start MacPorts' Apache 2 by using /opt/local/apache2/bin/ apachectl. You could put /opt/local/apache2/bin into your PATH (before /usr/sbin) if you'd like to be able to run this by just typing "apachectl". However I recommend starting and stopping your MacPorts Apache 2 by using launch services (if you're on Mac OS X 10.4.0 or greater). For example, to start Apache 2 now and have it start at every system startup: sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist To stop Apache 2 now and have it no longer start at system startup: sudo launchctl unload -w /Library/LaunchDaemons/ org.macports.apache2.plist
4. If I figured out all the problems above i can install zoph. I could do it from source in /usr/local, or is there a better way? Is it possible to build my own zoph-package to install/uninstall it with macports?
You can certainly write a portfile. The best way to get started might be to read some existing portfiles to see what the syntax is like. You can do this by typing "port edit foo" where foo is the name of the port whose portfile you wish to see. To see where the files are stored, type "port file foo".
"Ulrich Wiederhold" <wubuwei@gmx.net> on Sunday, October 22, 2006 at 5:57 AM -0800 wrote:
I am very new with macs but I need to install zoph (www.nother.net) on my imac (Intel CPU).
For this I need new apache, php and more. So I installed darwin|macports 1.3.2 and php5 and apache2.2.
1. How do I get a php5 Module for apache?
The INSTALL file for zoph says it requires PHP4. But hopefully it works with PHP5. Install it like this ans watch for some additional instructions at the end of the install. port install php5 +apache2 +mysql5 It has worked fine for me in the past. Right now I'm having trouble geting PHP5 to work with my new MacBook Pro and I haven't found the problem yet. Perhaps it is just my machine though.
2. How do I start the mysql5-Server and restart it every time I start the mac?
Install using the server variant like this: port install mysql5 +server The server variant installs a LaunchD item. A ui_msg during install will tell you to do something like this to activate the startupitem. sudo launchctl load -w /Library/LaunchDaemons/ .....
3. If I start apachectl, it still uses /usr/bin/apachectl from my Mac-OS. I already added the PATH in /etc/profiles and as well in my .profile. Can I uninstall the older versions of apache, mysql, perl etc. that came with my macos?
Set your path to have MacPorts paths in front of the rest and it will always find MacPort's apachectl first. Just turn off Personal Web Sharing in System Preferences so Apple's Apache isn't running. http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts
4. If I figured out all the problems above i can install zoph. I could do it from source in /usr/local, or is there a better way? Is it possible to build my own zoph-package to install/uninstall it with macports?
Making your own port is the way to go. Something like below probably. The destroot section you'll need to modify, it is only an example. Use a local repository by editing /opt/local/etc/ports/sources.conf to have a 'file:///' entry locating yor local repository. file:///Users/johndoe/dports rsync://rsync.darwinports.org/dpupdate/dports Then run 'portindex' from that directory and then install like any other port. After you get thePortfile modified properly and tested it can be committed. Mark # $Id: Portfile PortSystem 1.0 name zoph version 0.6 categories www maintainers darwinports@opendrwin.org description Web based digital image presentation and management system. long_description ${description} homepage http://www.nother.net/zoph/ platforms darwin master_sites sourceforge checksums md5 7e139b32bd477cccf43454cb4c07c16d depends_lib port:mysql5 \ port:apache2 \ port:php5 \ port:perl5.8 \ port:p5-dbi \ port:p5-dbd-mysql \ port:p5-image-size \ port:imagemagick \ port:jhead use_configure no build {} variant mysql4 { depends_lib-delete port:mysql5 depends_lib-append port:mysql4 } set appdir ${prefix}/share/${name} set docdir ${prefix}/share/doc/${name} destroot { # Comments describing what is being installed ...... xinstall -m 755 -d ${destroot}${appdir} xinstall -m 755 -d ${destroot}${docdir} system "cd ${worksrcpath} && cp -R . ${destroot}${appdir}" system "cp ${worksrcpath}/docs/* ${destroot}${docdir}" }
Oops. I didn't see Ryan had already replied to this until after I sent it. Our spam appliance failed this weekend and until we get our replacement my inbox is even messier than usual. Mark
At 13:16 -0700 22/10/06, Mark Duling wrote:
Set your path to have MacPorts paths in front of the rest and it will always find MacPort's apachectl first. Just turn off Personal Web Sharing in System Preferences so Apple's Apache isn't running.
http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts
With Personal Web Sharing off, how do you enable the relevant ports in the Firewall? Mark
Hi Mark In the Firewall tab of your System Preferences, make a new entry for TCP port 80 and call it MyApache for example. Tick and un-tick as required. Mike On Oct 22, 2006, at 5:17 PM, Mark Hattam wrote:
At 13:16 -0700 22/10/06, Mark Duling wrote:
Set your path to have MacPorts paths in front of the rest and it will always find MacPort's apachectl first. Just turn off Personal Web Sharing in System Preferences so Apple's Apache isn't running.
http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts
With Personal Web Sharing off, how do you enable the relevant ports in the Firewall?
Mark _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Hello, I did a lot of installs/reinstalls and I still have the same problem. I couldn´t get to work apache2 with php4 or 5. 1. I installed mysql5 +server -> works 2. I installed apache2 -> works 3. I installed php4 +apache2 +mysql5 and followed the steps at the end, renaming php.ini, pear.conf, checked for the httpd.conf entry and the permissions of libphp4.so, no result. Apache works fine, test.php (<?php echo phpinfo(); ?>) only displays the code. 4. reinstalled php4, tryed the same with php5, same result. Error.log shows that I am missing dbd: "this function has not yet implemented on this platform: DBD: driver for [DBDriver unset] not available" Port instelled shows: apache2 @2.2.3_0 (active) apr @1.2.7_0 (active) apr-util @1.2.7_0 (active) cclient @2004g_0 (active) curl @7.15.5_0+darwin_8 (active) db4 @4.3.29_0+darwin_8 (active) expat @2.0.0_1 (active) freetype @2.1.10_1 (active) gettext @0.15_0 (active) jpeg @6b_1 (active) libiconv @1.11_0+darwin_8 (active) libmcrypt @2.5.7_2+darwin_8 (active) libpng @1.2.10_2+darwin_8 (active) libtool @1.5.22_0 (active) libxml2 @2.6.23_0 (active) libxslt @1.1.15_0 (active) mhash @0.9.2_0+darwin_8 (active) mysql5 @5.0.26_0+darwin_8+server (active) openssl @0.9.8d_0+darwin_8 (active) pcre @6.7_0 (active) php5 @5.1.6_2+apache2+darwin_8+macosx+mysql5 (active) tidy @20051025_0+darwin_8 (active) tiff @3.8.2_0+darwin_8 (active) zlib @1.2.3_0 (active) I have no idea, what my mistake is. Thanks Uli
-----Ursprüngliche Nachricht----- Von: Mark Duling [mailto:mark.duling@biola.edu] Gesendet: Sonntag, 22. Oktober 2006 22:16 An: Ulrich Wiederhold Cc: macports-users@lists.macosforge.org Betreff: Re: Php-module for apache - start server
"Ulrich Wiederhold" <wubuwei@gmx.net> on Sunday, October 22, 2006 at 5:57 AM -0800 wrote:
I am very new with macs but I need to install zoph (www.nother.net) on my imac (Intel CPU).
For this I need new apache, php and more. So I installed darwin|macports 1.3.2 and php5 and apache2.2.
1. How do I get a php5 Module for apache?
The INSTALL file for zoph says it requires PHP4. But hopefully it works with PHP5. Install it like this ans watch for some additional instructions at the end of the install.
port install php5 +apache2 +mysql5
It has worked fine for me in the past. Right now I'm having trouble geting PHP5 to work with my new MacBook Pro and I haven't found the problem yet. Perhaps it is just my machine though.
2. How do I start the mysql5-Server and restart it every
time I start
the mac?
Install using the server variant like this:
port install mysql5 +server
The server variant installs a LaunchD item. A ui_msg during install will tell you to do something like this to activate the startupitem.
sudo launchctl load -w /Library/LaunchDaemons/ .....
3. If I start apachectl, it still uses /usr/bin/apachectl
from my Mac-OS.
I already added the PATH in /etc/profiles and as well in my .profile. Can I uninstall the older versions of apache, mysql, perl etc. that came with my macos?
Set your path to have MacPorts paths in front of the rest and it will always find MacPort's apachectl first. Just turn off Personal Web Sharing in System Preferences so Apple's Apache isn't running.
http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts
4. If I figured out all the problems above i can install
zoph. I could
do it from source in /usr/local, or is there a better way? Is it possible to build my own zoph-package to install/uninstall it with macports?
Making your own port is the way to go. Something like below probably. The destroot section you'll need to modify, it is only an example. Use a local repository by editing /opt/local/etc/ports/sources.conf to have a 'file:///' entry locating yor local repository.
file:///Users/johndoe/dports rsync://rsync.darwinports.org/dpupdate/dports
Then run 'portindex' from that directory and then install like any other port. After you get thePortfile modified properly and tested it can be committed.
Mark
# $Id: Portfile
PortSystem 1.0 name zoph version 0.6 categories www maintainers darwinports@opendrwin.org description Web based digital image presentation and management system. long_description ${description}
homepage http://www.nother.net/zoph/ platforms darwin master_sites sourceforge checksums md5 7e139b32bd477cccf43454cb4c07c16d
depends_lib port:mysql5 \ port:apache2 \ port:php5 \ port:perl5.8 \ port:p5-dbi \ port:p5-dbd-mysql \ port:p5-image-size \ port:imagemagick \ port:jhead
use_configure no build {}
variant mysql4 { depends_lib-delete port:mysql5 depends_lib-append port:mysql4 }
set appdir ${prefix}/share/${name} set docdir ${prefix}/share/doc/${name}
destroot { # Comments describing what is being installed ...... xinstall -m 755 -d ${destroot}${appdir} xinstall -m 755 -d ${destroot}${docdir} system "cd ${worksrcpath} && cp -R . ${destroot}${appdir}" system "cp ${worksrcpath}/docs/* ${destroot}${docdir}" }
On Oct 23, 2006, at 12:18, Ulrich Wiederhold wrote:
I did a lot of installs/reinstalls and I still have the same problem. I couldn´t get to work apache2 with php4 or 5. 1. I installed mysql5 +server -> works 2. I installed apache2 -> works
3. I installed php4 +apache2 +mysql5 and followed the steps at the end, renaming php.ini, pear.conf, checked for the httpd.conf entry and the permissions of libphp4.so, no result. Apache works fine, test.php (<?php echo phpinfo(); ?>) only displays the code.
4. reinstalled php4, tryed the same with php5, same result.
Are you sure you're accessing the MacPorts apache2 server? Or could it still be Apple's apache1 server? Go to System Preferences > Sharing > Personal Web Sharing and make sure it's off. Then stop and start MacPorts' apache2 using the launchctl commands from earlier in this thread. If that still doesn't work, check your httpd.conf (that's /opt/local/ apache2/conf/httpd.conf). It should contain (for the php5 module) the following line near the other LoadModule lines: LoadModule php5_module modules/libphp5.so And also these lines inside the "IfModule mime_module" section: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps If it does not, add these lines and restart apache2 again.
Error.log shows that I am missing dbd: "this function has not yet implemented on this platform: DBD: driver for [DBDriver unset] not available"
This is unrelated and harmless. If you do not want to see these lines in your log anymore, comment out (i.e., put a # before) the following lines in the httpd.conf: LoadModule authn_dbd_module modules/mod_authn_dbd.so LoadModule dbd_module modules/mod_dbd.so
Port instelled shows: apache2 @2.2.3_0 (active) apr @1.2.7_0 (active) apr-util @1.2.7_0 (active) cclient @2004g_0 (active) curl @7.15.5_0+darwin_8 (active) db4 @4.3.29_0+darwin_8 (active) expat @2.0.0_1 (active) freetype @2.1.10_1 (active) gettext @0.15_0 (active) jpeg @6b_1 (active) libiconv @1.11_0+darwin_8 (active) libmcrypt @2.5.7_2+darwin_8 (active) libpng @1.2.10_2+darwin_8 (active) libtool @1.5.22_0 (active) libxml2 @2.6.23_0 (active) libxslt @1.1.15_0 (active) mhash @0.9.2_0+darwin_8 (active) mysql5 @5.0.26_0+darwin_8+server (active) openssl @0.9.8d_0+darwin_8 (active) pcre @6.7_0 (active) php5 @5.1.6_2+apache2+darwin_8+macosx+mysql5 (active) tidy @20051025_0+darwin_8 (active) tiff @3.8.2_0+darwin_8 (active) zlib @1.2.3_0 (active)
Hi, Thanks a lot. The lines in httpd.conf about in the mime-section were missing. Now it works. Thanks. Perhaps there should be another little textmsg after installing php for apache2? It used to be this way in older apache versions, I thaught it´s not nessesary anymore for verions 2. Anyways. Thanks again. Now I can continue with perl and the other stuff... Uli
-----Ursprüngliche Nachricht----- Von: Ryan Schmidt [mailto:macports-2006d@ryandesign.com] Gesendet: Montag, 23. Oktober 2006 19:55 An: Ulrich Wiederhold Cc: macports-users@lists.macosforge.org Betreff: Re: Php-module for apache - start server
On Oct 23, 2006, at 12:18, Ulrich Wiederhold wrote:
I did a lot of installs/reinstalls and I still have the same problem. I couldn´t get to work apache2 with php4 or 5. 1. I installed mysql5 +server -> works 2. I installed apache2 -> works
3. I installed php4 +apache2 +mysql5 and followed the steps at the end, renaming php.ini, pear.conf, checked for the httpd.conf entry and the permissions of libphp4.so, no result. Apache works fine, test.php (<?php echo phpinfo(); ?>) only displays the code.
4. reinstalled php4, tryed the same with php5, same result.
Are you sure you're accessing the MacPorts apache2 server? Or could it still be Apple's apache1 server? Go to System Preferences > Sharing > Personal Web Sharing and make sure it's off. Then stop and start MacPorts' apache2 using the launchctl commands from earlier in this thread.
If that still doesn't work, check your httpd.conf (that's /opt/local/ apache2/conf/httpd.conf). It should contain (for the php5 module) the following line near the other LoadModule lines:
LoadModule php5_module modules/libphp5.so
And also these lines inside the "IfModule mime_module" section:
AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
If it does not, add these lines and restart apache2 again.
Error.log shows that I am missing dbd: "this function has not yet implemented on this platform: DBD: driver for [DBDriver unset] not available"
This is unrelated and harmless. If you do not want to see these lines in your log anymore, comment out (i.e., put a # before) the following lines in the httpd.conf:
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule dbd_module modules/mod_dbd.so
Port instelled shows: apache2 @2.2.3_0 (active) apr @1.2.7_0 (active) apr-util @1.2.7_0 (active) cclient @2004g_0 (active) curl @7.15.5_0+darwin_8 (active) db4 @4.3.29_0+darwin_8 (active) expat @2.0.0_1 (active) freetype @2.1.10_1 (active) gettext @0.15_0 (active) jpeg @6b_1 (active) libiconv @1.11_0+darwin_8 (active) libmcrypt @2.5.7_2+darwin_8 (active) libpng @1.2.10_2+darwin_8 (active) libtool @1.5.22_0 (active) libxml2 @2.6.23_0 (active) libxslt @1.1.15_0 (active) mhash @0.9.2_0+darwin_8 (active) mysql5 @5.0.26_0+darwin_8+server (active) openssl @0.9.8d_0+darwin_8 (active) pcre @6.7_0 (active) php5 @5.1.6_2+apache2+darwin_8+macosx+mysql5 (active) tidy @20051025_0+darwin_8 (active) tiff @3.8.2_0+darwin_8 (active) zlib @1.2.3_0 (active)
"Ulrich Wiederhold" <wubuwei@gmx.net> on Monday, October 23, 2006 at 1:32 PM -0800 wrote:
The lines in httpd.conf about in the mime-section were missing. Now it works. Thanks. Perhaps there should be another little textmsg after installing php for apache2? It used to be this way in older apache versions, I thaught it´s not nessesary anymore for verions 2. Anyways. Thanks again. Now I can continue with perl and the other stuff...
What lines were missing? PHP5 isn't working for me right now so perhaps I have the same problem. Mark
On Oct 24, 2006, at 14:43, Mark Duling wrote:
"Ulrich Wiederhold" on Monday, October 23, 2006 at 1:32 PM -0800 wrote:
The lines in httpd.conf about in the mime-section were missing. Now it works. Thanks. Perhaps there should be another little textmsg after installing php for apache2? It used to be this way in older apache versions, I thaught it´s not nessesary anymore for verions 2. Anyways. Thanks again. Now I can continue with perl and the other stuff...
What lines were missing? PHP5 isn't working for me right now so perhaps I have the same problem.
The AddType directives I mentioned here: http://lists.macosforge.org/pipermail/macports-users/2006-October/ 000449.html What symptoms are you experiencing?
-----Ursprüngliche Nachricht----- Von: Mark Duling [mailto:mark.duling@biola.edu] Gesendet: Dienstag, 24. Oktober 2006 21:44 An: Ulrich Wiederhold Cc: macports-users@lists.macosforge.org Betreff: Re: AW: Php-module for apache - start server What lines were missing? PHP5 isn't working for me right now so perhaps I have the same problem. ´ AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
These lines. Hope it helps. Uli
Ryan Schmidt <macports-2006d@ryandesign.com> on Tuesday, October 24, 2006 at 1:34 PM -0800 wrote:
"Ulrich Wiederhold" on Monday, October 23, 2006 at 1:32 PM -0800 wrote:
The lines in httpd.conf about in the mime-section were missing. Now it works. Thanks. Perhaps there should be another little textmsg after installing php for apache2? It used to be this way in older apache versions, I thaught it´s not nessesary anymore for verions 2. Anyways. Thanks again. Now I can continue with perl and the other stuff...
What lines were missing? PHP5 isn't working for me right now so perhaps I have the same problem.
The AddType directives I mentioned here:
http://lists.macosforge.org/pipermail/macports-users/2006-October/ 000449.html
What symptoms are you experiencing?
Apache worked, but <?php phpinfo() ?>. didn't show PHP running. But yes, I followed your email : Add these lines inside the "IfModule mime_module" section: AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps and mine also works fine now. Funny, last time I installed PHP5, I followed the ui_msg to the letter and they worked as is. Can someone add these statements to the ui_msg's? Thanks a lot. Mark
participants (5)
-
Mark Duling
-
Mark Hattam
-
Mike Savory
-
Ryan Schmidt
-
Ulrich Wiederhold