PHP auf der Shell

Hier können Sie von gefundenen Bugs berichten. Wir sind für jeden Hinweis dankbar.

Moderators: severin, Dirk Einecke

Post Reply
rkiefer
Posts: 2
Joined: Fri 17. Aug 2007, 21:03

PHP auf der Shell

Post by rkiefer » Fri 17. Aug 2007, 21:08

Hallo zusammen,

ich habe eine frische Installation von MAMP 1.7.

Wenn ich pear oder das Kommandozeilentool von PHP aufrufe erhalte ich immer folgende Fehlermeldungen:

./php -version
dyld: NSLinkModule() error
dyld: Library not loaded: /Users/severin/Dev/Projects/MAMP_1.7_src/lib/libltdl.3.dylib
Referenced from: /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/mcrypt.so
Reason: image not found
Trace/BPT trap

Weiß da irgendwer Rat?

Danke im Vorab...

severin
Posts: 225
Joined: Thu 8. Mar 2007, 08:03
Location: Germany

Post by severin » Mon 20. Aug 2007, 11:03

Hi rkiefer,

does it also happen if you call:

/Applications/MAMP/bin/php5/bin/php -v

?

Thanks,

Severin Kurpiers
living-e AG

rkiefer
Posts: 2
Joined: Fri 17. Aug 2007, 21:03

Post by rkiefer » Mon 20. Aug 2007, 12:47

Yes it does...

severin
Posts: 225
Joined: Thu 8. Mar 2007, 08:03
Location: Germany

Post by severin » Mon 20. Aug 2007, 13:55

Hi rkiefer,

just to be sure, can you check if you have the file:

/Applications/MAMP/Library/lib/libltdl.3.1.5.dylib

and a sym link:

/Applications/MAMP/Library/lib/libltdl.dylib

pointing to it?

Thanks,

Severin Kurpiers
living-e AG

Morten Rasmussen
Posts: 2
Joined: Wed 22. Aug 2007, 12:28

Post by Morten Rasmussen » Wed 22. Aug 2007, 12:30

Hi all

I have the exact same problem, and would appreciate an answer to why this error occurs. Furthermore the two files mentioned above are both present in my installation.

Thanks
/Morten

severin
Posts: 225
Joined: Thu 8. Mar 2007, 08:03
Location: Germany

Post by severin » Wed 22. Aug 2007, 12:43

Hi,

it would be interesting to know if mcrypt is enabled? Could you check the phpinfo, please?

Thanks,

Severin Kurpiers
living-e AG

severin
Posts: 225
Joined: Thu 8. Mar 2007, 08:03
Location: Germany

Post by severin » Wed 22. Aug 2007, 13:47

Hi,

the command line tools delivered with MAMP are often linked against dynamic libraries also delivered with MAMP. Both, executables and dynamic libraries, are located within a non-standard directory /Applications/MAMP/Library/ which makes it tricky to get them executed and/or found.

To run an executable you have to make sure that the used dynamic libraries will be found. One possibility is to set the environment variable DYLD_PRINT_LIBRARIES like (in bash):

export DYLD_LIBRARY_PATH=/Applications/MAMP/Library/lib:${DYLD_LIBRARY_PATH}

and then to call (in the same terminal window) the executable like:

/Applications/MAMP/bin/php5/bin/php -v

Can you try out if it works for you?

Thanks,

Severin Kurpiers
living-e AG

Morten Rasmussen
Posts: 2
Joined: Wed 22. Aug 2007, 12:28

Post by Morten Rasmussen » Thu 23. Aug 2007, 18:26

Thanks for the reply.

Now it works - great!..

Cheers

almsta
Posts: 15
Joined: Fri 10. Aug 2007, 12:29

Post by almsta » Thu 13. Sep 2007, 12:51

Hallo!

Leider habe ich seit 1.7 auch einen "Fehler" mit PHP in der Shell.

php -v
dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /Applications/MAMP/Library/lib/libJPEG.dylib

Trace/BPT trap
Ausgeführt wird php aus "/usr/bin/php" und nicht das von MAMP?

Mit Version 1.6.1 hat IMO noch alles gut funktioniert :(

Meine .bash_profile
export MAGICK_HOME="/Applications/ImageMagick"
export DYLD_LIBRARY_PATH=${MAGICK_HOME}/lib:/Applications/MAMP/Library/lib:${DYLD_LIBRARY_PATH}

export PATH=$PATH:/usr/local/bin:$MAGICK_HOME/bin
Muss ich noch was ändern? Danke für die Hilfe :)

severin
Posts: 225
Joined: Thu 8. Mar 2007, 08:03
Location: Germany

Post by severin » Fri 14. Sep 2007, 13:12

Hi almsta,

versuchen Sie den vollen Pfad zu verwenden, wie z.B.

/Applications/MAMP/bin/php5/bin/php

Gruß,

Severin Kurpiers
living-e AG

phalkunz
Posts: 1
Joined: Sun 21. Oct 2007, 17:07
Contact:

Thanks

Post by phalkunz » Sun 21. Oct 2007, 17:16

Thanks alot

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest