Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie-updates to php?



I have tried this on the 10.3.4 Server and it didn't worked for me unless I edited one more thing in php.ini. That thing was "extension_dir" property in "Path and Directories" section. When I changed it from original:

extension_dir = "./"

to:

extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20020429"

everything started to work as expected, before I was getting error in the apache error log that gd.so could not be loaded because it was not found.

Thanks for the package/hint Steve, it was exactly what I was looking for.

Jan


On 25.6.2004, at 4:10, Steve Luzynski wrote:

I'll make this as easy as I know how for everyone. :)

Go grab http://homepage.mac.com/sluzynsk/PHPGDModule.sitx. Unstuff it to your Desktop.

Open Terminal.
Type:
ls /usr/lib/php/extensions.

You'll see a directory called something like no-debug-non-zts-20020429. Remember that name.

Type:
sudo cp gd.so /usr/lib/php/extensions/no-debug-non-zts-20020429 (or whatever it was above)
sudo cp gd.a /usr/lib/php/extensions/no-debug-non-zts-20020429


That puts the PHP GD module (which I compiled against the stock Panther PHP and statically linked against GD) into the PHP modules directory.

Finally,
sudo vi /etc/php.ini

(If you've never used vi before, it's a bit unfriendly...)
You're wanting to add the line
extension=gd.so
to the file. If you don't know how:

Press "esc", then ":", then "/". Type "Dynamic Extensions" (w/o quotes).
Press "j", then "o". Type the "extension=gd.so" line (try not to mess up, vi editing is tricky) and press "esc" ":" "wq" and hit "return".


From system preferences, stop web sharing and then start it again. Run that phpinfo() script and you should see GD listed.

I have not tested this on any other machine (I only have the one) and only on Panther (10.3.4 specifically) client, not server. But it should theoretically work on any PHP 4.3.x install.

If this works for you, you don't have to replace your Apple provided PHP, install any extra junk, or attempt to get through a compile of PHP.

I should probably bundle that up into a .pkg installer. Maybe someday... :)

Good luck. If it doesn't work I'll try to help if I can.

-Steve
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Newbie-updates to php? (From: Diana <email@hidden>)
 >Re: Newbie-updates to php? (From: Steve Luzynski <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.