Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 487
  • Last Modified:

Panther (10.3.5) Server php.ini

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
Schandor
Asked:
Schandor
  • 3
  • 2
1 Solution
 
whitefaelCommented:
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
 
whitefaelCommented:
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
 
SchandorAuthor Commented:
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
 
whitefaelCommented:
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
 
SchandorAuthor Commented:
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now