Knowing that the Zend command line php executable is php-cli, not php, I made one last tweak:
me:ZendServer laran$ sudo pear config-set php_bin /Applications/ZendServer/bin/php-cli
dyld: Library not loaded: /usr/local/postgresql-8.2.3/lib/libpq.5.dylib
Referenced from: /Applications/ZendServer/bin/php
Reason: image not found
Trace/BPT trap
Doh! Looks like the damage was already done. So, I had to manually modify /Applications/ZendServer/bin/pear to use php-cli. Here’s what it looked like when I was done.
#!/bin/sh
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
PHP="$PHP_PEAR_PHP_BIN"
else
if test "/Applications/ZendServer/bin/php" = '@'php_bin'@'; then
PHP=php-cli
else
PHP="/Applications/ZendServer/bin/php-cli"
fi
fi
# then look for the right pear include dir
if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then
INCDIR=$PHP_PEAR_INSTALL_DIR
INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR"
else
if test "/Applications/ZendServer/share/pear/PEAR" = '@'php_dir'@'; then
INCDIR=`dirname $0`
INCARG=""
else
INCDIR="/Applications/ZendServer/share/pear/PEAR"
INCARG="-d include_path=/Applications/ZendServer/share/pear/PEAR"
fi
fi
exec $PHP -C -q $INCARG -d output_buffering=1 -d variables_order=EGPCS -d open_basedir="" -d safe_mode=0 -d register_argc_argv="On" -d auto_prepend_file="" -d auto_append_file="" $INCDIR/pearcmd.php "$@"
The changes in there are on lines 8 and 10, I changed php to php-cli.
Now I can go back to change the Pear php_bin config properly:
Just to be sure, I checked the include_path in /Applications/ZendServer/etc/php.ini. Be sure that /Applications/ZendServer/share/pear/PEAR is on the path.
Restart apache with sudo /Applications/ZendServer/apache2/bin/apachectl restart
Lastly, any modules I’d installed while Pear was still configured to install them to /opt/local have to be re-installed.
And with that, I was ready to rock! Hope this helps.
I've got a masters degree in computer science and over 10 years of experience building web-based systems using Java/J2EE, Ruby, Rails and PHP. I'm a strong believer in the effectiveness of Agile Methods. Read more »
Configuring ZendServer to use Pear on OSX 10.5
I had some issues yesterday trying to use some Pear libraries in a web app.
So, I checked my Pear config:
That’s wack. Why are my Pear libraries in /opt/local?
So, I changed those settings so that everything would be in /Applications/ZendServer
Knowing that the Zend command line php executable is php-cli, not php, I made one last tweak:
Doh! Looks like the damage was already done. So, I had to manually modify /Applications/ZendServer/bin/pear to use php-cli. Here’s what it looked like when I was done.
The changes in there are on lines 8 and 10, I changed php to php-cli.
Now I can go back to change the Pear php_bin config properly:
Just to be sure, I checked the include_path in /Applications/ZendServer/etc/php.ini. Be sure that /Applications/ZendServer/share/pear/PEAR is on the path.
Restart apache with sudo /Applications/ZendServer/apache2/bin/apachectl restart
Lastly, any modules I’d installed while Pear was still configured to install them to /opt/local have to be re-installed.
And with that, I was ready to rock! Hope this helps.