liip / php-osx

DEPRECATED: See https://php-osx.liip.ch/ for details. The uploader and website for the PHP 5 package for OS X 10.6 built with https://github.com/liip/build-entropy-php
http://php-osx.liip.ch
Other
328 stars 30 forks source link

Mavericks: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv #75

Closed jmaver closed 10 years ago

jmaver commented 11 years ago

I am have had PHP installed for quite a while on a machine I upgraded to Mavericks. All worked fine. Today, I decided to update to 5.5, and the install seems to go ok, but apache won't start with the new php libphp5.so.

I get the following error:

Syntax error on line 1198 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

If I copy in the old libphp5.so, then it loads fine. Is there any workaround for this?

pjezek commented 11 years ago

Hi, sorry but currently we do not support Maverick. I can't recompile and test. Your error report points out that libintl was compiled with wrong libiconv. I am not sure if you can point libintl to latest libiconv version:

/usr/bin/install_name_tool -change "@/usr/lib/libiconv.2.dylib" "/usr/lib/libiconv.dylib" /usr/local/php5/lib/libintl.8.dylib

(point to the new path of libiconv.dylib)

pjezek commented 11 years ago

We just compiled a new php package for 5.5 and I installed it on maverik. PHPInfo works and shows the correct version. Can you test if the new package fixes this issue?

alokyadav15 commented 11 years ago

same happening with me when testing apache config in 10.9 DP6 ( date: Fri 30 Aug 2013 ) $sudo apachectl -t

Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv\n Referenced from: /usr/lib/libintl.8.dylib\n Expected in: /usr/lib/libiconv.2.dylib\n in /usr/lib/libintl.8.dylib screen shot 2013-08-30 at 9 38 51 pm

pjezek commented 11 years ago

hmm... strange. Looks like you have libintl.8.dylib installed systemwide. I don't have them on Maverik and it works. (With 5.5.3 package)

can you verify that both files /usr/sbin/envvars and /usr/sbin/envvars-std contains the following lines:

DYLD_LIBRARY_PATH="/usr/local/php5/lib:/usr/lib:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH

Then apache should load /usr/local/php5/lib/libintl.8.dylib (Not the same issue as @jmaver has)

grok commented 10 years ago

I'm running OSX 10.7.5 I'm having the same issues. I even uninstalled it and reinstalled, during the reinstall it bombs out.

From the re-install:

Create symlink /usr/local/php5/entropy-php.conf /etc/apache2/other/+php-osx.conf
Restarting Apache
httpd: Syntax error on line 665 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /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

But checking /usr/sbin/envvars I see:

if test "x$DYLD_LIBRARY_PATH" != "x" ; then
  DYLD_LIBRARY_PATH="/usr/lib:$DYLD_LIBRARY_PATH"
else
  DYLD_LIBRARY_PATH="/usr/lib"
fi
export DYLD_LIBRARY_PATH

and /usr/sbin/envvars-std

if test "x$DYLD_LIBRARY_PATH" != "x" ; then
  DYLD_LIBRARY_PATH="/usr/lib:$DYLD_LIBRARY_PATH"
else
  DYLD_LIBRARY_PATH="/usr/lib"
fi
export DYLD_LIBRARY_PATH
grok commented 10 years ago

Adding the line you mentioned above...

I now get this:

httpd: Syntax error on line 665 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /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: __cg_jpeg_resync_to_restart\n  Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO\n  Expected in: /usr/local/php5/lib/libjpeg.7.dylib\n in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO

Going to undo those changes :(

grok commented 10 years ago

Uninstalled for the time being. Back to 5.3 :(

robocoder commented 10 years ago

10.7.5: I got the same error on the initial install. I then manually ran without error:

export DYLD_LIBRARY_PATH=/usr/local/php5/lib
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5
unset DYLD_LIBRARY_PATH
ziadoz commented 10 years ago

I'm experiencing the exact same issue on OS X 10.7.5. Before upgrading from 10.7.4 to 10.7.5 everything worked fine. I've tried the 5.4 and 5.5 installs, each with the same result.

Update 1: Just as a quick update, I can easily reproduce this on any machine running OS X 10.7.5.

Update 2: Upgrading OS X 10.7.5 to 10.8.5 fixed this issue for me.

yellowmamba commented 10 years ago

Today I upgraded to Mavericks, and it seems there's been some conflicts with PHP 5.5. After running sudo apachectl -t I got this:

httpd: Syntax error on line 501 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

It was working perfectly before I upgraded to the new OS. Waiting for a solution!

shaggyz commented 10 years ago

Hi! I've tried two fresh installs (5.4.x and 5.5.x) on 10.7.5 with the same result, the issue:

httpd: Syntax error on line 666 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /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

Is there any solution? i will back to 5.3.7

habashyjr commented 10 years ago

I always had this error showing (Using PHP 5.4 package) back when was on 10.7.5 on startup and Apache won't able to restart (should restart OS to make it so) but everything was normal by then ie; Apache running and PHP running normally, now on Mavericks it stuck with the same error and Apache ran but not the PHP

I'm trying now to reinstall PHP5.5 package on Mavericks

v8jupiter commented 10 years ago

php 5.3, os x mavericks. After install get this error Restarting Apache httpd: Syntax error on line 501 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

v8jupiter commented 10 years ago

This error in build php5-5.3.27-20130930-203815 . I install build php5-5.3.27-20130930-102956 and all works fine

habashyjr commented 10 years ago

@v8jupiter How would you install specific build?

v8jupiter commented 10 years ago

I have archive of build php5-5.3.27-20130930-102956. Build php5-5.3.27-20130930-203815 install with /usr/local/packager/packager.py. After having known that it dosn`t work i unpack old build archive in /usr/local and changed symlink (/usr/local/php5) to old build

asakaev commented 10 years ago

10.7.5 5.5.5-20131020-233829 Same problem.

ReLiesDev commented 10 years ago

This doesn't fix the problem, necessarily, but if you just want it to stop spewing errors into your error log, I was able to eliminate the issue by going to the /private/etc/apache2/other/+php-osx.conf file and commenting out the line attempting to load libphp5.so.

shaggyz commented 10 years ago

The syntax error message doesn't appear if you use: sudo apachectl restart instead of sudo apachectl -k restart. Seems to work ok without -k parameter and apache restarts correctly. Php-5.5.5 under OSX 10.7.5.

tshaw commented 10 years ago

On 10.7.5 have same problem with PHP 5.5 install

httpd: Syntax error on line 492 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

Runs perfectly good from the command line:

$ php -i phpinfo() PHP Version => 5.5.6

Using prefs->sharing to turn off and then on failed

Shaggyz's suggestion of using sudo apachectl restart started apache and now system prefs-> sharing works

arrebucio commented 10 years ago

Me too... using osx 10.9.1, when I installed using your one line command and it works fine!

$ curl -s http://php-osx.liip.ch/install.sh | bash -s 5.5
Detected OS X Mavericks 10.9. Experimental, use at your own risk!
Get packager.tgz
Unpack packager.tgz
Please type in your password, as we want to install this into /usr/local
Start packager (may take some time)
downloading http://php-osx.liip.ch/install/5.5-10.8-frontenddev-latest.dat
downloading http://php-osx.liip.ch/install/5.5-10.8/frontenddev/5.5-10.8-frontenddev-5.5.6-20131114-132217.tar.bz2

Installing package 5.5-10.8-frontenddev into root /
./pkg/pre-install
pkg/pre-install
Skipping existing directory 
Skipping existing directory usr/
Skipping existing directory usr/local/
Extracting usr/local/php5-5.5.6-20131114-132217/
Extracting usr/local/php5-5.5.6-20131114-132217/bin/
Extracting usr/local/php5-5.5.6-20131114-132217/entropy-php.conf
...
Extracting usr/local/php5-5.5.6-20131114-132217/bin/xsltproc
Executing post-install script /tmp/5.5-10.8-frontenddev-post-install
Create symlink /usr/local/php5/entropy-php.conf /etc/apache2/other/+php-osx.conf
Restarting Apache
Syntax OK

but if I try to update,

$ sudo /usr/local/packager/packager.py install tools-frontenddev
downloading http://php-osx.liip.ch/install/tools-frontenddev-latest.dat
downloading http://php-osx.liip.ch/install/tools/frontenddev/tools-frontenddev-20130328-134941.tar.bz2

Installing package tools-frontenddev into root /
./pkg/pre-install
pkg/pre-install
Skipping existing directory 
Skipping existing directory usr/
Skipping existing directory usr/local/
Extracting usr/local/php5-20130328-134941/
Extracting usr/local/php5-20130328-134941/bin/
Extracting usr/local/php5-20130328-134941/entropy-php.conf
...
Extracting usr/local/php5-20130328-134941/bin/xslt-config
Extracting usr/local/php5-20130328-134941/bin/xsltproc
Executing post-install script /tmp/tools-frontenddev-post-install
Restarting Apache
httpd: Syntax error on line 501 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"

and the installation gets corrupted.

chregu commented 10 years ago

I just tested it on a fresh install of 10.9 and it works fine for me.

Please reopen, if it's still a problem for you

iworker commented 10 years ago

Hi all! My OSX's version is 10.6.8 and I've got same problem: Restarting Apache httpd: Syntax error on line 493 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

my /usr/local/php5 directory symlinks to: php5 -> /usr/local/php5-5.4.24-20140112-190754

cewebdev commented 10 years ago

Also having this issue on 10.7.5, and a fresh install is not an option right now.

nexflo commented 10 years ago

beta i know..but 10.10 has the same issues right now.

michelinium commented 10 years ago

I am surprised why is this closed, when the trouble still exists? Apache & PHP is running fine, but syntax check always fails.

My config: OSX 10.7.5 with php5-5.5.14-20140628-130843 (php5-20130328-134941 was the same)

root# export DYLD_LIBRARY_PATH=/usr/local/php5/lib
root# apachectl -t
httpd: Syntax error on line 582 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: __cg_jpeg_resync_to_restart\n  Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO\n  Expected in: /usr/local/php5/lib/libjpeg.7.dylib\n in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
root# unset DYLD_LIBRARY_PATH
root# apachectl -t
httpd: Syntax error on line 582 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
chregu commented 10 years ago

It was closed because the problem described in the initial ticket was fixed, yours has a different cause, I'll check

faddah commented 10 years ago

hello @pjezek & @chregu -

i am also seeing this and cannot get my apache v.2.2.26 web server with php v.5.5.15 to run.

this is on a iMac with intel core i7 2.8 GHz, 16 GB of RAM, a 1 TB internal hard drive & running Mac OS X 10.9.4 Mavericks with all the latest updates.

here is what i get when i attempt $ sudo apachectl -t

$ sudo apachectl -t
httpd: Syntax error on line 501 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): no suitable image found.  Did find:\n\t/usr/local/php5/libphp5.so: no matching architecture in universal wrapper

i assume since the $ sudo apachectl -t fails with this ^^^^error above, $ sudo apachectl start is not really working either, and indeed, when i open a browser and attempt to go to either http://127.0.0.1/ or http://localhost/, both fail with “The Webpage is Not Available,” and Error code: ERR_CONNECTION_REFUSED.

as suggested above in this thread, i changed the /usr/sbin/envvars and /usr/sbin/envvars-std to be the following, commenting out previous code in them with '#':

DYLD_LIBRARY_PATH="/usr/local/php5/lib:/usr/lib:$DYLD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH

i have even since restarted the machine and still get the same error & fail on $ sudo apachectl -t about libphp5.so .

any help here getting both apache v.2.2.26 and php 5.5.15 up and running finally on my iMac would be greatly apprecialted. thank you.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

anupamsaha commented 10 years ago

Just to update, I am on Mac OSX 10.6.8 and upgraded PHP 5.3.26 to PHP 5.5.15. While upgrading, I faced the same issue with libphp5.so not loading. It was the issue with the missing path info (/usr/local/php5/lib) from /usr/sbin/envvars and /usr/sbin/envvars-std files. Once I fixed those files, apache restart was a success. Thank you for the support.

faddah commented 10 years ago

@anupamsaha - that's good for you, but i have done that change to /usr/sbin/envvars and usr/sbin/envvars-std, restarted apache, even restarted my whole iMac, and i still get the same error.

i really would appreciate @pjezek & @chregu responding to this and providing some sort of help. i am dead in the water doing any web development without being able to start my apache server.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

chregu commented 10 years ago

will look into it. to go back to the os x provided php version in the meantime, see http://php-osx.liip.ch/#uninstall

chregu commented 10 years ago

Hi again, I just installed it on a fresh 10.9.4 VM. Works as expected for me.

faddah commented 10 years ago

@chregu that's great for you, but does nothing to explain why myself and so many others on this thread are seeing this issues and the fix of altering the /usr/sbin/envvars & /usr/sbin/envvars-std files is not working. i tried that again this morning, restarted the iMac, and am still having that issue whenever i even attemp $ sudo apachectl -t. what other diagnostics or log files can i run and send to you in order to get this working right, please? please advise.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

chregu commented 10 years ago

Sorry, If I knew how I could help you, I would certainly do it. But I don't, don't even know how to debug.. "no matching architecture in universal wrapper" sounds very strange ;)

Can you do a otool -L /usr/local/php5/libphp5.so and see what the output is. Maybe it includes a library which is too old. On my Mac it outputs:

chregu@pri14:~$ otool -L /usr/local/php5/libphp5.so
/usr/local/php5/libphp5.so:
    /usr/lib/libaprutil-1.0.dylib (compatibility version 4.0.0, current version 4.12.0)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.4.0)
    /usr/lib/libexpat.1.dylib (compatibility version 7.0.0, current version 7.2.0)
    /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/lib/libsqlite3.dylib (compatibility version 9.0.0, current version 9.6.0)
    /usr/lib/libapr-1.0.dylib (compatibility version 5.0.0, current version 5.5.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)
    /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 47.2.0)
    /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 47.2.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/local/php5/lib/libtidy-0.99.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.18.0)
    /usr/lib/libpam.2.dylib (compatibility version 3.0.0, current version 3.0.0)
    /usr/local/php5/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
    /usr/local/php5/lib/libpng12.0.dylib (compatibility version 51.0.0, current version 51.0.0)
    /usr/local/php5/lib/libjpeg.7.dylib (compatibility version 8.0.0, current version 8.0.0)
    /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
    /usr/local/php5/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.8.0)
    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 6.0.0)
    /usr/local/php5/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.22.0)
    /usr/lib/libiodbcinst.2.dylib (compatibility version 4.0.0, current version 4.18.0)

on

Darwin pri14.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64

(which is the latest 10.9)

faddah commented 10 years ago

.@chregu - thank you for your response. i have a business appointment but will run these tests you suggest when i get home this afternoon and posts the results here (unless you'd rather i e-mailed them to you? please let me know). thank you.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

chregu commented 10 years ago

Here is fine. I'm not on the computer for the next few hours anyway as well. it's Friday evening here ;)

On Friday, August 8, 2014, Faddah Wolf notifications@github.com wrote:

.@chregu https://github.com/chregu - thank you for your response. i have a business appointment but will run these tests you suggest when i get home this afternoon and posts the results here (unless you'd rather i e-mailed them to you? please let me know). thank you.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

— Reply to this email directly or view it on GitHub https://github.com/liip/php-osx/issues/75#issuecomment-51631915.

Sent from a device with no real keys

faddah commented 10 years ago

hello again, @chregu ,

o.k., here's what i get when i run $ otool -L /usr/local/php5/libphp5.so

$ otool -L /usr/local/php5/libphp5.so
/usr/local/php5/libphp5.so (architecture ppc):
    /usr/local/apache2/lib/libaprutil-1.0.dylib (compatibility version 3.0.0, current version 3.7.0)
    /usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
    /usr/local/apache2/lib/libexpat.0.dylib (compatibility version 2.0.0, current version 2.0.0)
    /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
    /usr/local/apache2/lib/libapr-1.0.dylib (compatibility version 3.0.0, current version 3.7.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 22.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
    /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.10.0)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.2.0)
    /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libpam.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/php5/lib/libt1.5.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/local/php5/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.8.0)
    /usr/local/php5/lib/libpng.3.dylib (compatibility version 4.0.0, current version 4.0.0)
    /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.2)
    /usr/local/php5/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.26.0)
    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
    /usr/lib/libnetsnmp.5.dylib (compatibility version 8.0.0, current version 8.1.0)
/usr/local/php5/libphp5.so (architecture i386):
    /usr/local/apache2/lib/libaprutil-1.0.dylib (compatibility version 3.0.0, current version 3.7.0)
    /usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
    /usr/local/apache2/lib/libexpat.0.dylib (compatibility version 2.0.0, current version 2.0.0)
    /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
    /usr/local/apache2/lib/libapr-1.0.dylib (compatibility version 3.0.0, current version 3.7.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 22.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
    /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.10.0)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.2.0)
    /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libpam.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/php5/lib/libt1.5.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/local/php5/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.8.0)
    /usr/local/php5/lib/libpng.3.dylib (compatibility version 4.0.0, current version 4.0.0)
    /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.2)
    /usr/local/php5/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.26.0)
    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
    /usr/lib/libnetsnmp.5.dylib (compatibility version 8.0.0, current version 8.1.0)

my build of darwin — Darwin django.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 i386

my build of Mac OS X — ProductName: Mac OS X ProductVersion: 10.9.4 BuildVersion: 13E28

please let me know if there's anything else i can get to you or facilitate in order to properly hunt this down and fix it.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

chregu commented 10 years ago

Hi

It seems to link to the apache lib in /usr/local/apache2/lib/libaprutil-1.0.dylib, which may be the problem.

Can you move that folder away and check if this helps.

faddah commented 10 years ago

hello @chregu ,

thank you for responding and i am sorry it has taken me until now to respond, other life events have taken precedence.

could you please be more specific in your instructions - i do not quite understand. move which folder/directory, to where? and will this not totally break my apapche2 & php 5.5.15 installs? i had to re-do a bunch of symlinks all ready on php lib.s0 files after the last php install, due to errors i was getting and instructions i found on apple support communities discussions and stack overflow.

please advise specifically on the above, and i will try your suggestion and see if that makes it work.

best,

— faddah wolf portland, oregon, u.s.a. http://github.com/faddah

chregu commented 10 years ago

you have some apache installation in /usr/local/apache2/, I don't know from where, it's certainly not the one provided by OS X. Can you move that to some place else and see, if it helps, eg mv /usr/local/apache2 /tmp and then restart apache (the one provided by OS X)

You can move it back afterwards, if you still depend on that, but then we would at least know the reason.

faddah commented 10 years ago

hi @chregu,

per my system, there is no /usr/local/apache2/ on it.

per your instructions, when i attempt to do mv /usr/local/apache2 /tmp, i get —

$ sudo mv /usr/local/apache2 /tmp
mv: /usr/local/apache2: No such file or directory

if i do an ls -al /usr/local/, here is what i get —

$ ls -al /usr/local
total 464
drwxrwxr-x   39 yuetsu  admin    1326 Aug  7 16:23 .
drwxr-xr-x@  12 root    wheel     408 May  1 16:19 ..
-rw-r--r--@   1 yuetsu  admin    6148 May 20 17:56 .DS_Store
drwxr-xr-x   15 yuetsu  admin     510 Aug  7 16:23 .git
-rw-r--r--    1 yuetsu  admin     246 May 20 17:58 .gitignore
-rw-r--r--    1 yuetsu  admin    3158 May 20 17:58 CODEOFCONDUCT.md
-rw-r--r--    1 yuetsu  admin     846 Jul 25 18:53 CONTRIBUTING.md
drwxr-xr-x   37 yuetsu  admin    1258 Jul 25 21:33 Cellar
-rw-r--r--    1 yuetsu  admin  131845 Jul 27 21:36 ChangeLog
-rw-r--r--    1 yuetsu  admin   41356 Jul 27 21:36 LICENSE
-rw-r--r--    1 yuetsu  admin    1253 May 20 17:58 LICENSE.txt
drwxr-xr-x   10 yuetsu  admin     340 Jul 25 18:53 Library
-rw-r--r--    1 yuetsu  admin    1870 Aug  7 16:23 README.md
-rw-r--r--    1 yuetsu  admin   23719 May 20 17:58 SUPPORTERS.md
drwxrwxr-x  249 yuetsu  admin    8466 Aug  7 16:50 bin
drwxr-xr-x    8 yuetsu  wheel     272 Oct 23  2013 clamXav
drwxr-xr-x    7 yuetsu  wheel     238 Oct 23  2013 dyndns
drwxrwxr-x   12 yuetsu  admin     408 Aug  7 16:39 etc
drwxr-xr-x    9 yuetsu  wheel     306 Oct 23  2013 git
drwxr-xr-x   20 yuetsu  wheel     680 Mar  2 17:02 go
drwxrwxr-x   81 yuetsu  admin    2754 Aug  7 16:39 include
drwxrwxr-x  229 yuetsu  admin    7786 Aug  7 16:39 lib
drwxr-xr-x   47 yuetsu  admin    1598 Oct 23  2013 lib-extras
drwxr-xr-x    4 yuetsu  wheel     136 Oct 23  2013 libexec
drwxr-xr-x    5 yuetsu  wheel     170 Oct 23  2013 man
lrwxr-xr-x    1 yuetsu  wheel      36 Jun 25  2012 memcached -> /usr/local/memcached-20101209-132451
drwxr-xr-x    7 yuetsu  wheel     238 Oct 23  2013 memcached-20101209-132451
drwxr-xr-x   18 yuetsu  wheel     612 Oct 23  2013 mysql-5.1.30-osx10.5-x86_64
drwxr-xr-x    3 yuetsu  admin     102 Oct 23  2013 n
drwxr-xr-x   35 yuetsu  admin    1190 Aug  7 16:50 opt
drwxr-xr-x   14 yuetsu  wheel     476 Jul 28 13:38 packager
drwxr-xr-x   12 yuetsu  wheel     408 Oct 23  2013 php5
drwxr-xr-x   13 yuetsu  wheel     442 Oct 23  2013 php5-20120619-090026
drwxr-xr-x   13 yuetsu  wheel     442 Jul 28 13:40 php5-5.5.14-20140628-105310
drwxrwxr-x    3 yuetsu  wheel     102 Oct 23  2013 rubinius
drwxrwxr-x    4 yuetsu  admin     136 Oct 23  2013 sbin
drwxrwxr-x   25 yuetsu  admin     850 Aug  7 16:39 share
drwxr-xr-x    4 yuetsu  wheel     136 Oct 23  2013 src
drwxr-xr-x    7 yuetsu  admin     238 Jul 25 21:12 var

...so i don't know where it's getting that i have a /usr/local/apache2 - i updated my apache 2 using homebrew. i don't believe it puts it in those directories. and if i do a which httpd, i get —

$ which httpd
/usr/sbin/httpd

... so how do you suggest proceeding from here? please advise. thank you.

best,

— faddah wolf portland, oregon, u.s.a. https://github.com/faddah/

faddah commented 10 years ago

hi @chregu ,

just wondering if you saw my response above and if you have any follow up as to what steps to try next? please advise. thank you.

— faddah wolf portland, oregon, u.s.a. https://github.com/faddah/

chregu commented 10 years ago

homebrew puts everything into /usr/local, the one from /usr/sbin/httpd is the one provided by apple.

Just for finding the problem, either move /usr/local/apache2 somewhere else temporary or remove apache installed by homebrew. It looks like that is in the way, as our php library picks up a library from the apache installed by homebrew.

faddah commented 10 years ago

hi @chregu ,

thank you for responding. however, i showed you previously, three messages above (^^^) my /usr/local/ contains no /usr/local/apache2, so there is no directory there for me to temporarily move. i never installed apache with homebrew, i've been using what came with the iMac/Mac OS X 10.9.4 Mavericks.

in fact, as stated above, when i attempt to move the apache2 directory as you say to, here is what i get —

$ sudo mv /usr/local/apache2 /Users/[my home directory]/tmp/
mv: rename /usr/local/apache2 to /Users/[my home directory]/tmp/apache2: No such file or directory

any further suggestions, please?

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

chregu commented 10 years ago

You said you updated apache with homebrew three messages above...

And your otool output for shows

/usr/local/apache2/lib/libaprutil-1.0.dylib

that's why I thought that this is the culprit. Can you redo that then and post it here?

faddah commented 10 years ago

hi @chregu ,

thank you for responding. i perhaps misspoke about updating to apache2 through homebrew - probably my confusion.

output of otool —

$ ./otool -L /usr/local/php5/libphp5.so
/usr/local/php5/libphp5.so (architecture ppc):
    /usr/local/apache2/lib/libaprutil-1.0.dylib (compatibility version 3.0.0, current version 3.7.0)
    /usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
    /usr/local/apache2/lib/libexpat.0.dylib (compatibility version 2.0.0, current version 2.0.0)
    /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
    /usr/local/apache2/lib/libapr-1.0.dylib (compatibility version 3.0.0, current version 3.7.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 22.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
    /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.10.0)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.2.0)
    /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libpam.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/php5/lib/libt1.5.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/local/php5/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.8.0)
    /usr/local/php5/lib/libpng.3.dylib (compatibility version 4.0.0, current version 4.0.0)
    /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.2)
    /usr/local/php5/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.26.0)
    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
    /usr/lib/libnetsnmp.5.dylib (compatibility version 8.0.0, current version 8.1.0)
/usr/local/php5/libphp5.so (architecture i386):
    /usr/local/apache2/lib/libaprutil-1.0.dylib (compatibility version 3.0.0, current version 3.7.0)
    /usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
    /usr/local/apache2/lib/libexpat.0.dylib (compatibility version 2.0.0, current version 2.0.0)
    /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0)
    /usr/local/apache2/lib/libapr-1.0.dylib (compatibility version 3.0.0, current version 3.7.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.9)
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 22.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
    /usr/lib/libiodbc.2.dylib (compatibility version 4.0.0, current version 4.10.0)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.2.0)
    /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
    /usr/lib/libpam.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/php5/lib/libt1.5.dylib (compatibility version 7.0.0, current version 7.0.0)
    /usr/local/php5/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.8.0)
    /usr/local/php5/lib/libpng.3.dylib (compatibility version 4.0.0, current version 4.0.0)
    /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.2)
    /usr/local/php5/lib/libxml2.2.dylib (compatibility version 9.0.0, current version 9.26.0)
    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
    /usr/lib/libnetsnmp.5.dylib (compatibility version 8.0.0, current version 8.1.0)

... i realize this contains around five reference lines that say i have an /usr/local/apache2/ directory, but please keep in mind several searches of that have shown it doesn't exist. here again is my ls -al /usr/local/

$ ls -al /usr/local/
total 464
drwxrwxr-x   39 yuetsu  admin    1326 Aug  7 16:23 .
drwxr-xr-x@  12 root    wheel     408 May  1 16:19 ..
-rw-r--r--@   1 yuetsu  admin    6148 May 20 17:56 .DS_Store
drwxr-xr-x   15 yuetsu  admin     510 Aug  7 16:23 .git
-rw-r--r--    1 yuetsu  admin     246 May 20 17:58 .gitignore
-rw-r--r--    1 yuetsu  admin    3158 May 20 17:58 CODEOFCONDUCT.md
-rw-r--r--    1 yuetsu  admin     846 Jul 25 18:53 CONTRIBUTING.md
drwxr-xr-x   37 yuetsu  admin    1258 Jul 25 21:33 Cellar
-rw-r--r--    1 yuetsu  admin  131845 Jul 27 21:36 ChangeLog
-rw-r--r--    1 yuetsu  admin   41356 Jul 27 21:36 LICENSE
-rw-r--r--    1 yuetsu  admin    1253 May 20 17:58 LICENSE.txt
drwxr-xr-x   10 yuetsu  admin     340 Jul 25 18:53 Library
-rw-r--r--    1 yuetsu  admin    1870 Aug  7 16:23 README.md
-rw-r--r--    1 yuetsu  admin   23719 May 20 17:58 SUPPORTERS.md
drwxrwxr-x  249 yuetsu  admin    8466 Aug  7 16:50 bin
drwxr-xr-x    8 yuetsu  wheel     272 Oct 23  2013 clamXav
drwxr-xr-x    7 yuetsu  wheel     238 Oct 23  2013 dyndns
drwxrwxr-x   12 yuetsu  admin     408 Aug  7 16:39 etc
drwxr-xr-x    9 yuetsu  wheel     306 Oct 23  2013 git
drwxr-xr-x   20 yuetsu  wheel     680 Mar  2 17:02 go
drwxrwxr-x   81 yuetsu  admin    2754 Aug  7 16:39 include
drwxrwxr-x  229 yuetsu  admin    7786 Aug  7 16:39 lib
drwxr-xr-x   47 yuetsu  admin    1598 Oct 23  2013 lib-extras
drwxr-xr-x    4 yuetsu  wheel     136 Oct 23  2013 libexec
drwxr-xr-x    5 yuetsu  wheel     170 Oct 23  2013 man
lrwxr-xr-x    1 yuetsu  wheel      36 Jun 25  2012 memcached -> /usr/local/memcached-20101209-132451
drwxr-xr-x    7 yuetsu  wheel     238 Oct 23  2013 memcached-20101209-132451
drwxr-xr-x   18 yuetsu  wheel     612 Oct 23  2013 mysql-5.1.30-osx10.5-x86_64
drwxr-xr-x    3 yuetsu  admin     102 Oct 23  2013 n
drwxr-xr-x   35 yuetsu  admin    1190 Aug  7 16:50 opt
drwxr-xr-x   14 yuetsu  wheel     476 Jul 28 13:38 packager
drwxr-xr-x   12 yuetsu  wheel     408 Oct 23  2013 php5
drwxr-xr-x   13 yuetsu  wheel     442 Oct 23  2013 php5-20120619-090026
drwxr-xr-x   13 yuetsu  wheel     442 Jul 28 13:40 php5-5.5.14-20140628-105310
drwxrwxr-x    3 yuetsu  wheel     102 Oct 23  2013 rubinius
drwxrwxr-x    4 yuetsu  admin     136 Oct 23  2013 sbin
drwxrwxr-x   25 yuetsu  admin     850 Aug  7 16:39 share
drwxr-xr-x    4 yuetsu  wheel     136 Oct 23  2013 src
drwxr-xr-x    7 yuetsu  admin     238 Jul 25 21:12 var

... see? no /usr/local/apache2 in there, anywhere.

and again, my build of darwin — Darwin django.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 i386

my build of Mac OS X — ProductName: Mac OS X ProductVersion: 10.9.4 BuildVersion: 13E28

please let me know if there is anything else i can provide you.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

chregu commented 10 years ago

now I see it... It looks like your /usr/local/php5 directory is not symlinking to php5-5.5.14-20140628-105310 but has a very old version of php-osx (one with even PPC and i386 compiled in from 2012). Can you please just delete all php5 directories rm -rf /usr/local/php5* and then reinstall it.

(why it still shows that it links to /usr/local/apache2/, no idea...)

faddah commented 10 years ago

hi @chregu,

ok, but first, yesterday i was also doing troubleshooting on this issue with the folks from homebrew (see the link to the github issue here) and as a result, i uninstalled/deleted the php 5.5.15 directory in their /usr/local/ and reinstalled it, twice, even, using brew doctor, brew update, brew upgrade, brew uninstall php55 and then brew install php55. that bring php 5.5.15 back and i get a version on it just fine —

$ php -v
PHP 5.5.15 (cli) (built: Aug 20 2014 19:11:58) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

however, i still get the error mentioned from the start of this thread and from my first post to this thread every time i do sudo apachectl -t just to run a test. fails on the php, every time.

so are you sure you want me to do this, as effectively, i did the same thing yesterday and got nowhere with the homebrew folk and am waiting on their response in that thread linked above to see what to try next?

that said, i will try to do your rm -rf /usr/local/php5* and re-install it, after backing it all up to another drive first, to be safe. i will then attempt to unlink it (brew unlink php55) and then re-install and re-link php 5.5.15 through homebrew. i will let you know.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

faddah commented 10 years ago

hi @chregu ,

ok, i've come a little further, completely wiped php 5.4.x & php 5.5.x from my system and reinstalled php 5.5.15, and now have a different error, perhaps more fixable, when trying to run sudo apachectl -t. so here's what i did —

i ran essentially the following, and have a gist of all the output and fixes along the way —

brew doctor
// then essentially went through and fixed/linked/unlinked anything it said to the ran it again until clean
brew update
brew doctor
brew update
brew upgrade
brew uninstall --force php54
brew unlink php54
brew uninstall --force php55
brew unlink php55
//  Then i ran what you had suggested to make sure all directories were removed.
rm -rf /usr/local/php5*
//  Then reinstalled php 5.5.15 with homebrew.
brew install php55

you can see the output of all of the above, and all the fixes/links i went through in this gist.

after that, i ran —

sudo apachectl -t

this time i got a new error, perhaps one you can more easily help me with?

httpd: Syntax error on line 501 of /private/etc/apache2/httpd.conf: Could not open configuration file /private/etc/apache2/other/+php-osx.conf: No such file or directory

...so at least it seems to be progressing. could you please help me out with this current, new error? it would be most appreciated.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah

faddah commented 10 years ago

hello @chregu ,

fixed it!! yay!

so, to recap from the last message, i had gone through with homebrew tools & your rm -rf /usr/local/php5* and removed everything related to php 5.5.15, and then reinstalled. however, i was —

httpd: Syntax error on line 501 of /private/etc/apache2/httpd.conf: Could not open configuration file /private/etc/apache2/other/+php-osx.conf: No such file or directory

so i googled that "httpd: Syntax error...," and after a couple of tries editing search, found this Apple Support Communities article that had the basic solution. basically, you need to edit the /private/etc/httpd.conf so it has this —

#LoadModule php5_module libexec/apache2/libphp5.so
LoadModule php5_module /usr/local/php5/libphp5.so

or in my case, after searching the directories under /usr/local/ for where libphp5.so was, it was —

LoadModule php5_module /usr/local/Cellar/php55/5.5.15/libexec/apache2/libphp5.so

that got me a little further, but i was still getting this error —

Syntax error on line 502 of /private/etc/apache2/httpd.conf: Could not open configuration file /private/etc/apache2/other/+php-osx.conf: No such file or directory

...so i went in and looked at the /private/etc/apache2/other/httpd.conf again — that line, 501 or 502, depending on your httpd.conf file parameters, is the last line that just says —

Include /private/etc/apache2/other/*.conf

...so basically, run all the *.conf scripts in the private/etc/apache2/other/.

so i went and looked in that private/etc/apache2/other/ directory at the files in there. turns out +php-osx.conf is a symlink you created that points to /usr/local/php5/entropy-php.conf. however /usr/local/php5/entropy-php.conf no longer exists — probably got blown away when i uninstalled all the php stuff and did your rm -rf /usr/local/php5*.

so i just backed up that private/etc/apache2/other/+php-osx.conf symlink file to another drive, blew it away on my main drive, then tried sudo apachectl -t again —

$ sudo apachectl -t
httpd: Could not reliably determine the server's fully qualified domain name, using django.local for ServerName
Syntax OK

voila! the php & apache2, they work c'est magnifique!

some suggestions — your uninstall scripts should remove all references to php-osx from out of the /private/etc/apache2/httpd.conf file and also you should remove the symlink /private/etc/apache2/other/+php-osx.conf when the other file it points to for libphp5.so gets uninstalled.

that said, unless you think there is anything further to this you have to add, i think i have things running and working o.k. now. thank you for all the help. hopefully, reading this will help others in similar trouble.

best,

— faddah wolf portland, oregon, u.s.a. github.com/faddah