I would like to work with YouTube API, so I have to install Zend Framework. I have linux server with WHM/cpanel, and I upladed zend from http://framework.zend.com/download/latest to /home/jancom/php/Zend
How do I include this path into my php so I get it to work?
If you’re on a shared host I don’t imagine they’ll let you get at any config files.
Except for your htaccess file. I have never tried setting a path in htaccess so I don’t know how or if it’s possible to do, though it seems it should be.
If you do the ini_set in your main file the ini_set will be OK for as long as the script runs, it’s not really any increase server load, you just need to remember to have it in your code.
Well, magically I got it to work by:
$path = “/usr/lib/php/Zend”;
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once ‘Loader.php’; // the Zend dir must be in your include_path
But I am wondering, how do I get it to work without having to call this function every time (I want to reduce server resources usage). I can’t find php.ini file anywhere.
Im pulling my hair off. I tried:
$path = “/php/Zend”;
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
But I still get error:
Fatal error: require_once() [function.require]: Failed opening required ‘Loader.php’ (include_path=‘.:/usr/lib/php:/usr/local/lib/php:/php/Zend’) in /home/jancom/public_html/janbirsa.com/tools/TubePromoter/dashboard/functions.php on line 6
So I logged in via ssh and did:
[root@server]# cp -r /home/jancom/php/Zend /usr/lib/php