Archive for the ‘Konfiguration (configuration)’ Category

Fehlermeldungen Xdebug in apache_error_log unter MAMP Failed loading /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so

Wednesday, June 30th, 2010

;Problem: Fehlermeldungen
:Error in /Applications/MAMP/logs/apache_error_log: ”’Failed loading /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so”’

[Tue Jun 29 18:14:41 2010] [error] …
Failed loading /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so: (null)
Failed loading /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so: (null)
Failed loading /usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so: (null)

  • Wieder Anleitung von Debuggable benutzt.
  • Von Kommodo Downloads Remote Debugging Komodo-PHPRemoteDebugging-6.0.0-beta1-44391-macosx.tar.gz runtergeladen.
  • in /Applications/MAMP/bin/php5/lib/php/extensions/ gespeichert und entpackt (sollte eigentlich woanders hin - unter downloads o.ä.)
  • Unterordner für alle PHP-Versionen (!) drin: Version 5.1, 5.2, 5.3
  • bei mir installiert ist 5.2 (phpinfo())
  • in php.ini Pfad herausfinden, nach dem MAMP-PHP sucht:
  • in /Applications/MAMP/conf/php5/php.ini:
  • unter Paths and Directories den Eintrag: extension_dir = “/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/ gefunden
  • dort (in in /Applications/MAMP/conf/php5/php.ini) war noch eine Einstellung zend_extension=”/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so unter den Einstellungen für Xdebug/ZEND - diese muss auskommentiert werden, sie überschreibt sonst den Pfad für das extension_dir: ;zend_extension=”/usr/…”!!
  • xdebug.so aus Unterordner “5.2″ in /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/ kopiert
  • Apache neu gestartet
  • funktioniert: keine Fehlermeldungen mehr

Dank an Christian Hartmann für die Hilfe !!!

Installing PECL for MAMP

Monday, May 3rd, 2010

There are a couple of installation instructions for PECL around. But if you use it together with MAMP, installation still doesn’t work (or install things somewhere near the nirvana). This is about how to install it the right way, tie it to MAMP and make your Terminal use the right one from now on:

Installing PECL in MAMP

http://developerkarma.com/blog/andrew-m-riley/quick-and-dirty-pecl-mamp-os-x shows how to install pecl directly into mamp.

Your PECL should now be available at /Applications/MAMP/bin/php5/bin/pecl

Use MAMP PECL instead of the wrong one

As you might have an additional “system” pecl in your system server path (which is used by default when you just enter “pecl install” or something alike), make sure you use the mamp one in the terminal.

The easiest way is to adress pecl using the full url any time you call it: Instead of typing

pecl install something

type:

/Applications/MAMP/bin/php5/bin/pecl install something

Pointing to the MAMP PECL from your terminal permanently

This is pretty annoying after a while (and error-prone beyond that!) so tell your terminal which one to use. To do this add an alias in your .bashrc file:

edit the .bashrc of your personal account:

propellermac:testcase achimbode$ sudo edit ~/.bashrc

To the ~/.bashrc file add the following line:

alias pecl=/Applications/MAMP/bin/php5/bin/pecl

When you start a new terminal window, your .bashrc should be run automatically and typing

pecl install something

should now point to the right pecl.

Execute .bashrc automatically

If the .bashrc is not run automatically on shell startup, create a bash_profile.

It’s just about editing the file and add a few lines you find on the page mentioned above. If the file does not exist, create it:

propellermac:testcase achimbode$ sudo edit ~/.bash_profile

The following code is copied from http://forums.macrumors.com/showthread.php?t=409238

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

export PS1=’\[\e[0;31m\]\u\[\e[0m\]\[\e[1;31m\]@\[\e[0m\]\[\e[0;31m\]\H\[\e[0m\] \w $ ‘
source ~/.bashrc

It also colors your terminal prompt red, so you know if it works…
This looks like a lot of work. But actually it’s just editing a few files. And it’s worth while: No more confusion when installing libraries to MAMP! Have fun!