Solved

Panther (10.3.5) Server php.ini

Posted on 2004-09-14
5
454 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Deploystudio is a system which can be used to deploy OSX clients and servers within the small/medium or large business environments. The system is built ontop of the OSX Server NetBoot system and uses images & workflows as its core assets. Although …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

11 Experts available now in Live!

Get 1:1 Help Now