try to install mysql5 + php5 + apache2

Takashi Yoshida tyoshida at mac.com
Sun Feb 24 09:30:05 PST 2008


On Feb 24, 2008, at 7:47 PM, Jean-Luc BERTé wrote:

>
> Le 24 févr. 08 à 00:51, Ryan Schmidt a écrit :
>
>> On Feb 23, 2008, at 21:22, Jean-Luc BERTé wrote:
>>
>>> Le 23 févr. 08 à 21:57, Ryan Schmidt a écrit :
>>>
>>>> On Feb 23, 2008, at 18:41, Jean-Luc BERTé wrote:
>>>>
>>>>> ok i made :
>>>>>
>>>>> sudo port -f activate ncurses
>>>>> sudo port install ncurses readline
>>>>> sudo port install php5 +postgresql +pear +apache2 +mysql5
>>>>>
>>>>> apache2  had been installed but now i have :
>>>>>
>>>>> Error: Target org.macports.build returned: shell command " cd "/ 
>>>>> opt/local/var/macports/build/ 
>>>>> _opt_local_var_macports_sources_rsync 
>>>>> .macports.org_release_ports_graphics_jpeg/work/jpeg-6b" && make  
>>>>> all " returned error 2
>>>>> Command output: ./libtool --mode=compile /usr/bin/gcc-4.0 -O2 -I/ 
>>>>> opt/local/include -I. -c ./rdswitch.c
>>>>> rm -f .libs/rdswitch.lo
>>>>> /usr/bin/gcc-4.0 -O2 -I/opt/local/include -I. -c ./rdswitch.c  - 
>>>>> fno-common -DPIC -o .libs/rdswitch.lo
>>>>> /usr/bin/gcc-4.0 -O2 -I/opt/local/include -I. -c ./rdswitch.c -o  
>>>>> rdswitch.o >/dev/null 2>&1
>>>>> mv -f .libs/rdswitch.lo rdswitch.lo
>>>>> ./libtool --mode=compile /usr/bin/gcc-4.0 -O2 -I/opt/local/ 
>>>>> include -I. -c ./cdjpeg.c
>>>>> rm -f .libs/cdjpeg.lo
>>>>> /usr/bin/gcc-4.0 -O2 -I/opt/local/include -I. -c ./cdjpeg.c  - 
>>>>> fno-common -DPIC -o .libs/cdjpeg.lo
>>>>> /usr/bin/gcc-4.0 -O2 -I/opt/local/include -I. -c ./cdjpeg.c -o  
>>>>> cdjpeg.o >/dev/null 2>&1
>>>>> mv -f .libs/cdjpeg.lo cdjpeg.lo
>>>>> ./libtool --mode=link /usr/bin/gcc-4.0 -L/opt/local/lib -o cjpeg  
>>>>> cjpeg.lo rdppm.lo rdgif.lo rdtarga.lo rdrle.lo rdbmp.lo  
>>>>> rdswitch.lo cdjpeg.lo libjpeg.la
>>>>> /usr/bin/gcc-4.0 -L/opt/local/lib -o .libs/cjpeg cjpeg.o rdppm.o  
>>>>> rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o cdjpeg.o -L.libs - 
>>>>> ljpeg
>>>>> /usr/bin/ld: warning /opt/local/lib/libjpeg.dylib cputype (18,  
>>>>> architecture ppc) does not match cputype (7) for specified -arch  
>>>>> flag: i386 (file not loaded)
>>>>
>>>> [snip]
>>>>
>>>> Although it's currently trying to build the jpeg library, you  
>>>> appear to already have /opt/local/lib/libjpeg.dylib, and it's for  
>>>> PowerPC, but you're currently trying to build for Intel.
>>>>
>>>> It sounds like you have an Intel Mac, but somehow transferred  
>>>> your /opt/local to this Mac from a PowerPC Mac. If so, that's  
>>>> going to cause all sorts of problems like what you're seeing, and  
>>>> the best idea is to move /opt/local aside (rename it to /opt/ 
>>>> local-ppc for example) and start over and install MacPorts again  
>>>> from scratch. There are other directories you may also need to  
>>>> move aside first, like /Library/Tcl/macports1.0 and /Applications/ 
>>>> MacPorts. Don't remove /opt/local-ppc just yet because there may  
>>>> be configuration files or databases or other data you may want to  
>>>> save first; do this at your leisure after your new MacPorts is  
>>>> installed. Also, you can save the distfiles if you want to avoid  
>>>> having to redownload them all. (You can move /opt/local-ppc/var/ 
>>>> macports/distfiles to /opt/local/var/macports/distfiles if you  
>>>> want.)
>>>
>>> I have install the last version of macports( 1-6-0-10.4) to  
>>> install apache2, php5 and mysql5 on my mac because it doesn't  
>>> works anywhere ( Fink, compilation,entropy...). I think like you  
>>> have said, it isn't make for an Intel Mac.
>>>
>>> Don't you think install Macports again from scratch will do  same ?
>>
>> As I said, it seems that you have lots of existing files in /opt/ 
>> local, for some reason, which should not be, and that now, while  
>> compiling jpeg, you get the message that the existing file is for  
>> PowerPC Macs, which should not be if you have an Intel Mac. For  
>> these reasons, I recommend moving all existing parts of MacPorts  
>> aside and reinstalling. MacPorts works great on Intel Macs.
>>
>>
>>
> i have follow all your directives and
>
> ALL THE COMPILATION IS SUCCESSFULL !!!
> I HAVE INSTALL A APACHE2 PHP5 MYSQL5 ON MY MAC !!!
>
> ***GREAT THANKS***
>
> last little question please :
>
> i start my apache2 server and i replace a index.html in htdocs :
>
> index.html
> <html>
> <head><title>Test for PHP</title></head>
> <body>
> <form action="test.php" method="post">
> <input type="submit" value="OK">
> </form>
> </html>
>
> and "test.php" program :
>
> <?php
>     phpinfo();
> ?>
>
> i have my OK button in localhost but the php program doesn't work.
> How can i start PHP5 and MySQL5 please ?
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users


To start MySQL5, run:

> In order to setup the database, you might want to run
>
> sudo -u mysql mysql_install_db5
>
> if this is a new install
>
> A startup item has been generated that will aid in
> starting mysql5 with launchd. It is disabled
> by default. Execute the following command to start it,
> and to cause it to launch at startup:
>
> sudo launchctl load -w /Library/LaunchDaemons/ 
> org.macports.mysql5.plist
>

To enable PHP5, run:

> If this is your first install, you might want
> cd /opt/local/apache2/modules
> /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
>
> * copy  /opt/local/etc/php.ini-dist to  /opt/local/etc/php.ini
>

These message should have appeared during your installation of MySQL5  
and PHP5.
Perhaps you missed them during the installation.

--
Takashi Yoshida
tyoshida [at] mac [dot] com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20080225/d4edb20f/attachment-0001.html 


More information about the macports-users mailing list