|
Mac GeekeryGet your geek on. |
PHP5 5.1.2 on MacBook ProWhen I try to install PHP 5.1.2 on my MacBook Pro I get an error message at the end of install. Looking at the console, PHP has been installed correctly but can’t be initialized by Apache. About Jacques Garrouste@www.macgeekery.com |
|
||||
What’s the exact error message?
Entropy-PHP-5.1.2-1.pkg :
“Some errors have succeded during installation”
“Please retry installation”
and after
“PHP was not correctly installed”
In the console, the install.log says :
Mar 9 14:04:20 MBPro2 : postflight296: [entropy php /Volumes/Entropy PHP 5.1.2-1/php-5.1.2.pkg/Contents/Resources/activate-module.pl]: Unable to verify that the Apache webserver is running correctly with the new module and the configuration file changes using the ‘apachectl configtest’ command. The PHP software itself has been installed sucessfully, but it has not been activated. Your old /etc/httpd/httpd.conf file is untouched… at /Volumes/Entropy PHP 5.1.2-1/php-5.1.2.pkg/Contents/Resources/activate-module.pl line 181.
Mar 9 14:04:20 MBPro2 : postflight296: [entropy php /Volumes/Entropy PHP 5.1.2-1/php-5.1.2.pkg/Contents/Resources/activate-module.pl]: The modified config file is available in ‘/etc/httpd/httpd.conf.entropy-temp’ so you can examine it and try to activate the PHP module. at /Volumes/Entropy PHP 5.1.2-1/php-5.1.2.pkg/Contents/Resources/activate-module.pl line 182.
Mar 9 14:04:20 MBPro2 : postflight296:
Mar 9 14:04:20 MBPro2 : Install failed: The following install step failed: run postflight script for PHP
So what to do?
Thank you for help
Hello,
I ran into the same issues you had this weekend when I tried to set up PHP 5 on my MacBook Pro. I got around it by compiling it from source on the MacBook Pro. Here are some brief instructions:
1. Make sure you have the Apple Developer Tools installed (you need these in order to compile). Download from http://connect.apple.com (XCODE Tools image from the downloads area).
2. Download PHP5 source from http://www.php.net/downloads.php
3. Follow the instructions posted here for compiling the software: http://www.osxfaq.com/tips/unix-tricks/week108/friday.ws
4. Make sure you modify httpd.conf to add support for php5. See the INSTALL file in the directory that you expand the PHP source code into. In short, these lines should be added ot /etc/httpd/httpd.conf:
LoadModule php5_module libexec/httpd/libphp5.so
AddModule mod_php5.c
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
5. Make sure you’ve got php.ini in the right directory. By defaiult it should be in /usr/local/lib/php.ini
Also make sure you’ve got the version of libphp5.so in the right directory. You copy the one that got created during this build process from /usr/libexec/httpd/libphp5.so to /usr/local/php5/libphp5.so or whereever else you’ve configured the module to load from.
6. Restart apache. This is where you’ll see if there are any problems with your new build.
apachectl restart
Booyah
You should be able to create a phpinfo page in /Library/WebServer/Documents/phpinfo.php (by default) similar to this:
// Show all information, defaults to INFO_ALL phpinfo();
// Show just the module information.
// phpinfo(Cool yields identical results. phpinfo(INFO_MODULES);
Load that page in your web browser to verify that PHP is working.
http://127.0.0.1/phpinfo.php
Good luck.
Pardon the possilbe ignorance of this question, but I can’t seem to find the dir /usr/local/ on my MacBook Pro after migrating from my PB G4. Viewing both the PB and the MBP in Terminal I can see /usr/local/ on the PB, which contains:
./ bin/ libexec/ sbin/
../ include/ local/ share/
X11R6/ lib/ mysql/ standalone/
But the dir /usr/ on the MBP shows only:
./ X11R6/ lib/ sbin/ standalone/
../ bin/ libexec/ share/
Obviously some significant dirs have not been “migrated” to the MPB.
My goal is to get php & mysql back up and running as soon as possible.
Thanks for any assistance you can offer.
Bill J.
Thanks a lot grape, that worked perfectly. Was my first time installing on a mac, so the file locations were a life saver:P
Nate
I have apache2, php5 and mysql all running without issues on my mbp. My problem is I can not figure out how to start apache2 at system start. I have been using sudo apachectl start from a terminal command line and would like to have it start automatically. All the discussions I have been able to find are for OS X 10.5 Server and do not relate to my mbp. I know how to use rc.d stuff in linux but max bsd appears to be a different animal. Any help would be appreciated.
Post new comment