Configure PEAR on Leopard

Irgendwelche Probleme mit XAMPP für Mac OS X? Dann ist hier genau der richtige Ort um nachzufragen.

Configure PEAR on Leopard

Postby prakashc » 07. November 2007 18:50

How do you get PEAR configured and working with XAMPP under Leopard? I can see that some PEAR files are there but can't work out what I need to do to get PEAR up and running and tested. I want to try out Symfony and various other apps that need them. Thanks.
prakashc
 
Posts: 1
Joined: 07. November 2007 18:41

Postby reticulator » 07. November 2007 22:12

I am also working on setting up symfony on Leopard using XAMPP. Of course, symfony requires php5. I set php to php5 using mampp, but I noticed that the pear config (pear list-config) still shows at least one reference to php4:
Code: Select all
ext_dir /Applications/xampp/xamppfiles/lib/php/php4/extensions/no-debug-non-zts-20020429

Since you will be using php5, I would say this should probably be
Code: Select all
/Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613

I am new to pear, so don't have any more to offer at the moment.
reticulator
 
Posts: 3
Joined: 07. November 2007 21:31
Location: California, USA

Postby reticulator » 09. November 2007 01:54

OK, I still don't know anything about PEAR, but here's how I got it to install Symfony on Leopard and XAMPP:

1) Arrange that your userid has write access to the directories and files under /Applications/xampp/xamppfiles. You might run pear, etc., using sudo, but I don't want my userid in the "admin" group, so I can't. I leave this as an exercise.

2) Set your shell PATH to include php_bin. You'll need this later to run symfony from the shell, so you should fix your shell initialization file (such as .profile) so this will happen every time you log in.
Code: Select all
PATH=/Applications/xampp/xamppfiles/bin/php:$PATH

3) Tell XAMPP to use php5. You need this for symfony anyway.
Code: Select all
sudo /Applications/xampp/xamppfiles/mampp php5

4) Change ext_dir in the pear configuration to match php5
Code: Select all
pear config-set ext_dir /Applications/xampp/xamppfiles/lib/php/php5/extensions/no-debug-non-zts-20060613/

5) Test pear by upgrading pear.
Code: Select all
pear upgrade PEAR

6) Now, to install symfony, pear needs more memory than is allowed by default
Code: Select all
In /Applications/xampp/etc/php.ini, change
    memory_limit = 8M
to
    memory_limit = 32M

7) And finally, install symfony according to the directions at http://www.symfony-project.com/book/1_0/03-Running-Symfony
Code: Select all
pear channel-discover pear.symfony-project.com
pear install symfony/symfony
reticulator
 
Posts: 3
Joined: 07. November 2007 21:31
Location: California, USA


Return to XAMPP für Mac OS X

Who is online

Users browsing this forum: No registered users and 2 guests