PDA

View Full Version : php.ini include_path?



pinacoladaxb
06-14-2009, 03:04 AM
I've added the Zend Framework to my /home/[domain]/ directory, and I want to add it as an include_path in the php.ini file so that the library may be accessed by php. What would be the path to the library?

Here's what it looks like in the file manager:
/home/pauliuko/ZendGdata-1.8.3/library/

Here's the line in the php.ini file I need to edit:
include_path = ".:/usr/lib/php:/usr/local/lib/php"

Here's the link to the file I am using to test my installation of the Zend Framework:
http://www.pauliukonis.com/atomicriot/zend_test.php

Here's the link to my php.ini file:
*** removed link ***

shadmego
06-14-2009, 08:15 AM
Just wanted you to be aware that Zend is preinstalled on all servers with Hostmonster ... You can install the paths to the Zend framework by logging onto you cPanel and clicking on the PHP Config link. From there, you should be able to find your way.

~regards

pinacoladaxb
06-14-2009, 10:53 AM
Are you sure the zend framework is installed? I found information on IonCube/SourceGuardian and the zend optimizer, but nothing on the zend framework.

EDIT: I copied the php.ini file from my root directory to the directory where my test file was and it worked fine. But I shouldn't have had to do that, right? What could be the problem here?

shadmego
06-14-2009, 01:55 PM
typically, the php.ini file needs to be in every directory that runs php scripts. This is so you can use the php environment unique to that script. Ideally, you can have as many different php environments as you want to development/production requirements as you have.

Hostmonster also allow you to use 1 php file for your entire site through the use of PHP5 (Single php.ini) or PHP5 (FastCGI). Both of these options allow the use of one php.ini file, in your public_html folder. The FastCGI option allows php to run through mod_fastcgi instead of mod_suphp. As far as I know, this allows for faster execution of your scripts, but from my experience, it comes at the cost of reliability.

I personally use the Single php.ini file for my sites. I haven't noticed anything terribly negative as far as performace, but the choice is entirely yours.

Good to hear you got it working though ...

~regards