integrated PHP in Mac OS X

I'm trying to install MagickWand, a PHP API for ImageMagick (an open-source Unix image editor). I need to untar the directory in the /ext directory in my PHP source directory. The problem is that, since I'm using the built-in PHP (v. 4.3.11), which I didn't install, I don't know where the source directory is. The "which php" command in tcsh gives me "/usr/bin/php", but that's not a directory; phpinfo() tells me the php.ini file is in /etc (and /etc does contain a file called php.ini.default), but, again, no directory. What should I do?

PowerMac Dual-2GHz G5 Mac OS X (10.4.5)

Posted on Mar 17, 2006 1:32 PM

Reply
2 replies

Mar 18, 2006 2:26 AM in response to haydn

Hi,

I don't what you have to do after putting the files in the ./ext/. directory, but here are hints where to find this directory.

The php-ext directory can be found at:
/usr/include/php/ext

And if you don't find a php.ini in /etc you should create one. This is easy.
If no php.ini can be found, php uses defaults, that is the reason, why something is set within php to values.
Just copy the /etc/php.ini.default to /etc/php.ini and you got it.

Now you can change the /etc/php.ini file to values you like and don't forget to restart your Apache-Server.
Two ways:
1. within System-Preferences turn off and turn on personal websharing
2. apachectl restart

During the restart your new /etc/php.ini file will be used.
You can check if you change one of the default values and and after the restart call the phpinfo()-Routine again and you should see the new value set.

Hope that helps,

~ Markus

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

integrated PHP in Mac OS X

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.