Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#40597 closed defect (invalid)

Trouble upgrading Mac OS 10.6.8 from PHP 5.3.26 to the newest version PHP 5.5

Reported by: jonjon831@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: php

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I'm getting this error when trying to upgrade with Terminal:

httpd: Syntax error on line 489 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+php-osx.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv\n  Referenced from: /usr/local/php5/lib/libintl.8.dylib\n  Expected in: /usr/lib/libiconv.2.dylib\n in /usr/local/php5/lib/libintl.8.dylib

I just recently upgraded to Mac OS Snow Leopard. The PHP version 5.3 came with the install. I'm having trouble upgrading to the newest PHP version. I'm trying to upgrade with MacPorts but it doesn't seem to work. I also tried upgrading with http://php-osx.liip.ch, but doesn't seem to let me upgrade.

Any help will be appreciated. Thank you.

Change History (3)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Description: modified (diff)
Keywords: syntax error line 489 line 8 removed
Port: php added
Priority: HighNormal
Resolution: invalid
Status: newclosed
Type: updatedefect

Welcome to MacPorts, but nothing about your report suggests a problem in MacPorts. The only thing you said about MacPorts was that its PHP "doesn't seem to work" which doesn't give us anything to go on. I am the maintainer of PHP in MacPorts and it works fine for me.

The error message you showed mentions /private/etc/apache2/httpd.conf, which is the configuration of Apple's Apache server (not MacPorts'), and /usr/local/php5/libphp5.so, which could have come from anywhere (except MacPorts). The MacPorts prefix (unless you've changed it) is /opt/local, so if your problems concern software in a different location, it's not MacPorts software and we can't help you with it.

If you would like to try MacPorts PHP 5.5, install the php55 port by running "sudo port install php55". Since I presume you'll want to run that inside a web server, perhaps Apache, you'll probably also want the PHP 5.5 Apache 2 module, which you can install by running "sudo port install php55-apache2handler". You'll then need to configure MacPorts Apache to load that module and customize the server to your liking. We do have a wiki page about setting this up, but I hesitate to mention it because it is years out of date and does not address the current PHP 5.5 ports, so you'll have to make the appropriate adjustments to the instructions as you read them.

Note that /usr/local is a special location. Software installed there can interfere with software installed anywhere else, including MacPorts' /opt/local prefix. Therefore we do not support the use of MacPorts while software is installed in /usr/local, so if you wish to try MacPorts, remove or move aside /usr/local before doing so.

If you have any questions about how to use MacPorts, please write to the macports-users mailing list. If you encounter build failures, then please do file tickets in this issue tracker.

comment:2 in reply to:  1 Changed 11 years ago by jonjon831@…

Hi ryan,

I do think that Apples configuration is running the php along with apache. I haven't changed any configurations which pertains to prefix's. How do I change the configurations to point to MacPorts?

Also, I'm running MAMP software for testing wordpress sites remotely. Is this giving me problems? Do I need to uninstall this to get MacPorts running properly?

Sorry if these questions are simple but I'm new to the php world and upgrading to the newest version with MacPorts is something I've never done before.

Thanks for your input.

comment:3 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Apple's Apache may use the PHP they included with OS X. You've installed some other PHP in /usr/local and your Apple Apache is configure to use it, but it is broken.

If you want to use MacPorts PHP, you'll be using MacPorts Apache, not Apple Apache.

Note: See TracTickets for help on using tickets.