Jump to content
xisto Community
Semsem

Zend Framework and how to request it...

Recommended Posts

Would the $1.95 per month bit be able to have Zend Framwork installed on it? And if so, how would one do that?

Yes, you can install Zend Framework on the $1.95 hosting (I have it running here). Installing it is as simple as following the instructions from Zend - upload the framework and point your website's configuration to the Zend installation so it knows where to look for the functions.

Share this post


Link to post
Share on other sites

Yes, you can install Zend Framework on the $1.95 hosting (I have it running here). Installing it is as simple as following the instructions from Zend - upload the framework and point your website's configuration to the Zend installation so it knows where to look for the functions.

Well, I feel stupid...how do I point the websites configuration to the Zend installation?

Share this post


Link to post
Share on other sites

The Zend Framework documentation contains helpful tips and suggestions, but it all depends on exactly what directory structure you're using and how you're using the framework. You should just make sure that the path to the Zend libraries is included in the Zend Framework's list of paths to search. For example the recommended location for the Zend Framework to be uploaded is ~/php/Zend. Then, in your index.php file, include that path in your include paths to search. For example, one of my sites uses the following:

 

set_include_path('library' . PATH_SEPARATOR . '/home/<username>/php' . PATH_SEPARATOR . 'application/models' . PATH_SEPARATOR . get_include_path());

Obviously replacing <username> with the username for your hosting account.

Share this post


Link to post
Share on other sites

What I start out with...

set_include_path('library' . PATH_SEPARATOR . '/home/semsemx/php/'. PATH_SEPARATOR . 'application/models' . PATH_SEPARATOR . get_include_path());require_once 'Zend/Rest/Client.php';
And, this is what I get:

Warning: require_once(Zend/Rest/Client.php) [function.require-once]: failed to open stream: No such file or directory in /home/semsemx/public_html/index.php on line 4

 

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Rest/Client.php' (include_path='library:/home/semsemx/php/:application/models:.:/usr/lib/http://forums.xisto.com/no_longer_exists/;) in /home/semsemx/public_html/index.php on line 4

 

(http://forums.xisto.com/no_longer_exists/)


Any thoughts as to what I did wrong?

Share this post


Link to post
Share on other sites

Seems like you haven't actually uploaded the Zend Framework into the correct place. Make sure it's there and you have the correct permissions to read it. Also, it is often better to put

require 'Zend/Loader.php';

instead, which will load files as and when it needs them.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.