Solved

Panther (10.3.5) Server php.ini

Posted on 2004-09-14
5
462 Views
Last Modified: 2010-04-29
Hi all,
I have the Web Service (Apache) running with the php module (enabled via Server Admin).  Things work OK, but i need to enable a few other librairies in PHP for my app work fully (the GD Libraries to be exact).  Where can I find Apple's php.ini file so I can enable these other options?

I found a php.ini.default file (in /etc), but I don't think that's what I'm looking for.

Thanks.
0
Comment
Question by:Schandor
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:whitefael
ID: 12056631
An easy way to find it is to create file called info.php with the following text:

<? phpinfo ?>


Save it in your Library/WebServer/Documents directory.

Then open 127.0.0.1/~username/info.php in Safari or whatever browser you choose. There is a table cell that lists the location of your php.ini file. Mine is in /usr/local/php/lib/php.ini

Brian
0
 
LVL 2

Expert Comment

by:whitefael
ID: 12056656
Sorry, I put the wrong path. When viewing info.php type:
127.0.0.1/info.php

NOT

127.0.0.1/~username/info.php

Sorry about that.
0
 
LVL 1

Author Comment

by:Schandor
ID: 12058225
Thanks, I forgot about that command.  I got it to work with some slight modification:
<?php

phpinfo();

?>

The script mentions that the config file is /etc/php.ini.  However when I look in that directory php.ini does not exist.  I made a copy of the php.ini.default file and modified that to allow the gd2.dll extension, then changed the name to php.ini.  I then stopped and restarted the web service, and reran the info script.  Suddenly my config file changed to /private/etc/php.info.  When I checked the file, I found that it was an exact copy of the php.ini that I created.  Unfortunately the gd libraries still don't seem to be working, I'm fairly certain that Apple did not include those files in their default install.

Does anyone have anything else to add?  Any detail as to why my php.ini file didn't really exist until i created it would be helpful.  If not, I'll ask about the GD Libraries in another question.  Though I'd like to simply add it to this one so we're not reinventing the wheel.

Thanks
0
 
LVL 2

Accepted Solution

by:
whitefael earned 125 total points
ID: 12058650
I just can't get my head together today... Sorry about forgetting to put (); after phpinfo.

From what I understand php.ini doesn't actually exist, although the template /etc/php.ini.default is provided for you to edit and create your own php.ini, which you did.

However, GD isn't part of the OS X installation of PHP. You can get PHP 5 or PHP 4 for OS X 10.3.5 at:
http://www.entropy.ch/software/macosx/php/

Since PHP is already installed on your Mac, you'll want to do the upgrade. The owner of the site has compiled various libraries into his PHP install, including GD.

Hope this helps,
Brian
0
 
LVL 1

Author Comment

by:Schandor
ID: 12066379
I went in and simply installed the PHP4 module because the software I'm trying to run required it.  Everything seems to be working fine.  Thanks for the help.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The /etc/authorization file in Mac OS X 10.x can be used to control access to the various panes of the System Preferences amongst other things. It’s used by some of us Mac Sys Admin’s to give Standard Users access to System Prefs panes that only adm…
Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now