Including Zend library issue - zend-framework

I'm new to Zend. I've download the latest version and followed the instructions to install it but I'm having trouble including the library.
So far I've saved the entire Zend folder to my local host file. Which is the 'sites' folder located in the user folder.
As advised I have altered the php.ini file to include the path of the library as so:
;include_path = ".:/php/includes"
;include_path = ".:/Users/myusername/Sites/ZendFramework20/library"
However when I attempt to run one of the zend demo scripts I get an error:
Warning: require_once(Zend/Registry.php) [function.require-once]: failed to open stream: No such file or directory in /Users/Sumbop/Sites/ZendFramework20/demos/Zend/Wildfire/public/index.php on line 27
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Registry.php' (include_path='.:') in /Users/Sumbop/Sites/ZendFramework20/demos/Zend/Wildfire/public/index.php on line 27
I've searched and tried many things to no avail. How do I get this working? Or find a guide?
Thanks

Your include path is wrong.
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Registry.php' (include_path='.:') in /Users/Sumbop/Sites/ZendFramework20/demos/Zend/Wildfire/public/index.php on line 27
You may use next code (somewhere in index.php - best would be first line) to set it.
set_include_path($pathWhereZendFolderIsLocated . PATH_SEPARATOR . get_include_path());

Related

Typo3 is Not working on Web server

Warning: require_once(D:/wamp/www/sevenstar_caters/typo3/sysext/core/Classes/Package/PackageManager.php) [function.require-once]: failed to open stream: No such file or directory in /home4/code9/public_html/sevenstarcaterers.com/typo3/sysext/core/Classes/Core/ClassLoader.php on line 184
Fatal error: require_once() [function.require]: Failed opening required 'D:/wamp/www/sevenstar_caters/typo3/sysext/core/Classes/Package/PackageManager.php' (include_path='/home4/code9/public_html/sevenstarcaterers.com/typo3/contrib/pear/:.:/opt/php53/lib/php') in /home4/code9/public_html/sevenstarcaterers.com/typo3/sysext/core/Classes/Core/ClassLoader.php on line 184
Web page Link http://www.sevenstarcaterers.com/
It seems that you have moved from a unix mashine to a windows mashine without clearing the cache. Remove all files from typo3temp and visit the install tool at http://www.sevenstarcaterers.com/typo3/install. Check out the Important actions to clear the cache and Folder structure to fix the folder permission/creation in typo3temp.

ZendFramework 1.12 and PHPUnit Error: include_once(PageRegex.php): failed to open stream: No such file or directory

I'm trying to run some unit tests with PHPunit on my ZF install.
I've followed this tutorial to get it setup:
and I'm getting this error:
1) FirsttestTest::testCanDoUnitTest
include_once(PageRegex.php): failed to open stream: No such file or directory
Had a google, but cannot find anything
Solved my own problem, I simply didn't have the right include path setup.

Not able to register Plugin in Zend Framework application.ini

my plugins directory sits in
application
/plugins
Dbcount.php
ModuleLayout.php
i am unable to register the plugin with frontController. here is my application.ini code.
#Plugin path and namespace
pluginPaths.Plugins = APPLICATION_PATH "/plugins"
autoloaderNamespaces[] = "Plugin_"
#register plugin
resources.frontController.plugins[] = "Plugin_DbCount"
it gives me following error.
Warning: include_once(Plugin/DbCount.php) [function.include-once]: failed to open stream: No such file or directory in /Users/azhararmar/htdocs/joofris/v1/library/Zend/Loader.php on line 146
Warning: include_once() [function.include]: Failed opening 'Plugin/DbCount.php' for inclusion (include_path='/Users/azhararmar/htdocs/joofris/v1/application/../library:/Users/azhararmar/htdocs/joofris/v1/library:.:/Applications/MAMP/bin/php5.2/lib/php') in /Users/azhararmar/htdocs/joofris/v1/library/Zend/Loader.php on line 146
Fatal error: Class 'Plugin_DbCount' not found in /Users/azhararmar/htdocs/joofris/v1/library/Zend/Application/Resource/Frontcontroller.php on line 117
what is wrong?
If you are using the default appnamespace Application, then the plugin stored in application/plugins/DbCount.php should be named Application_Plugin_DbCount. Use the full classname when you register:
resources.frontController.plugins[] = "Application_Plugin_DbCount"
To use the namespace like that your Plugin classes need to be under Library or you need to map them else where. Looks like you have the frontcontroller plugin set up right but incorrect autoload definitions.
Easiest thing to do here is to name your plugins YourAppNamespace_Plugin_YourPluginName.
They are two types of plugin in ZF . You are mixing some part of each .
To make your code work do
1) put application dir in include_path
2) change directory name plugins to 'Plugin'

Failed opening required 'Zend/Config/Exception.php'

I've been working on this project for about two weeks now. I don't understand why now I receive this error:
Warning: require_once(Zend/Config/Exception.php) [function.require-once]: failed to open stream: No such file or directory in /usr/local/zendsvr/share/ZendFramework/library/Zend/Config/Ini.php on line 180
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Config/Exception.php' (include_path='/www/zendsvr/htdocs/TassiWeb/application/../library:/www/zendsvr/htdocs/TassiWeb/library:.:/usr/local/zendsvr/share/ZendFramework/library:/usr/local/zendsvr/share/pear') in /usr/local/zendsvr/share/ZendFramework/library/Zend/Config/Ini.php on line 180
I'm using ZendServer CE into IBMi but others web-application works correctly!
How can solve it?
Does the requested file exist in your Zend Framework folder? The include path etc seem to be correct, so it may just be an accidentally deleted file...

Zend GData YouTube API errors

Greetings,
Having quite a bit of difficulty with the YouTube API. I added the Zend Gdata folder to my include_path and all of the API tests run fine, but when I try to load the YouTube API Demo App, I get the following error:
Warning: include_once(Zend/Gdata/YouTube.php) [function.include-once]: failed to open stream: No such file or directory in /home/tappess1/public_html/includes/ZendGdata/library/Zend/Loader.php on line 146
Warning: include_once() [function.include]: Failed opening 'Zend/Gdata/YouTube.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tappess1/public_html/includes/ZendGdata/library/Zend/Loader.php on line 146
Warning: require_once(Zend/Exception.php) [function.require-once]: failed to open stream: No such file or directory in /home/tappess1/public_html/includes/ZendGdata/library/Zend/Loader.php on line 98
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tappess1/public_html/includes/ZendGdata/library/Zend/Loader.php on line 98
The PHP include_path seems to be set correctly, the tests run.. the issue seems to be either in operations.php in the YouTube API's demo or in Loader.php. The default directory for Loader.php was simply Zend/Loader.php, I generally use $_SERVER['DOCUMENT_ROOT'] . '/path/to/dir'; due to listing restrictions on my host.
Any idea why this will not work? It occurs when I click on the Authenticate link within the demo.
Thanks
Urgh, I had exactly the same errors. My solution was to totally scrap using the Zend GData API and use the REST interface. This way you're writing more code, but it's all under your control.