I have installed a new zf project, and get the next error:
Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\zend\public\index.php on line 18
I have set the include path and in addition i have uploaded zf to the library folder.
But, I can't find any trace to a file named Application.php ...
Somewhere along the line you have mixed ZF1 and ZF2 instructions or code. There is no Zend/Application.php in ZF2 (this is a ZF1 thing), and ZF2 apps do not generally have a 'library' folder. So either you are using ZF2 but have followed some app setup instructions for ZF1, or you've used the ZF1 command line tool to create a ZF1 project and have then put ZF2 into the library folder.
Here is the ZF2 skeleton app: https://github.com/zendframework/ZendSkeletonApplication - this should give you an idea what your app should look like.
As the error obviously says Zend/Application.php is not there. Check you include path and your folder.
Related
Website given error like as bellow. its build using cakephp. Can you help me
Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your /cake core directory and your /vendors root directory. in /home/tracepk/public_html/webroot/index.php on line 0
View this solution and provide for analyze content of your file index.php
I look for a while, but don't find a solution. I have a Symfony2 project that I'm trying to deploy. The strcture that I have is this:
/www/my_app/ -> where lives all symfony folders (app, bin, src and vendor) but 'web'
/www/public_html/my_app/ -> this is the 'web' folder renamed to 'my_app'
With this structure I change the routes in app.php:
$loader = require_once __DIR__.'/../../my_app/app/bootstrap.php.cache';
require_once __DIR__.'/../../my_app/app/AppKernel.php';
And I get this error:
Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'The "D:\www\public_html\my_app\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle/Resources/views" directory does not exist.' in D:\www\my_app\vendor\twig\twig\lib\Twig\Loader\Filesystem.php on line 93
Twig_Error_Loader: The "D:\www\public_html\my_app\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle/Resources/views" directory does not exist. in D:\www\my_app\vendor\twig\twig\lib\Twig\Loader\Filesystem.php on line 93
The problems is that that files that Twig are trying to load no lives in "D:\www\public_html\my_app\vendor", but in "D:\www\my_app\vendor".
I hope that you can get the problem. I'm running the app within apache.
Thanks in advance for any comment.
I'm not sure if it would help in your case, but when I want to load twig templates from other directories in controller I run:
$this->get('twig.loader')->addPath('../app');
This is just example how I tell Twig - "I want also use templates from other ../app path".
I'm trying to load a custom library in Concrete5.
I've created a library file, internallib.php, and placed the file in the /libraries folder. This file does not extend any core library files. I keep getting this error:
Warning: require_once(/var/www/concrete/libraries/internalauth.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/portal/concrete/core/libraries/loader.php on line 30
Though if I move the file into the folder /concrete/libraries, I don't get this error. Should I be putting my library file into the concrete/libraries, or /libraries folder? I assumed that since this is a 3rd party library, it should go into the root libraries folder, as not to conflict with any future core updates.
I'm currently running v.5.6.0.2
Any ideas?
You are right, the root libraries folder is the place to go.
You could try to put it in libraries/3rdparty which is where 3rd party libraries should be.
The problem however might come from the way you are calling the library, not from the library itself.
Maybe you could tell us more?
I want to integrate phpspec2 with CodeIgniter 2. I've succesfully installed phpspec using composer as described on phpspec website. Now I'd like to integrate it into my CodeIgniter 2 installation. I've found an article by AniDear on this subject and did everything as described. However when I run bin/phpspec I get an error:
PHP Warning: require(core/Common.php): failed to open stream: No such file or directory
in C:\xampp\htdocs\eljotengine\spec\ci_bootstrap.php on line 37
Warning: require(core/Common.php): failed to open stream: No such file or directory in C:\xampp\htdocs\eljotengine\spec\ci_bootstrap.php on line 37
and so on. My file structure looks like this:
eljotengine
|-application
|-sytem
|- ... other CI
|-spec
| |- ci_bootstrap.php
I am using xampp on Windows 7. My ci_bootstrap.php file looks like the one in the above mentioned article by AniDear.
I've tried to change the paths in the ci_bootstrap.php file (it seems to be the problem) however it did not change much.
Any ideas how to make this work?
Greets :)
I am having problem with PHPSpec2 too.
Since I have only tried it with PHPSpec (not PHPSpec2), I would suggest you to install PHPSpec instead. Just change the file composer.json, on the line "phpspec/phpspec2": "*" to "phpspec/phpspec": "*" , then runs composer update again.
Run this phpspec, by using command vendor\bin\phpspec.php.bat spec on your project path, whereas "spec" is the folder containing spec files.
And since you're running phpspec from your project directory, I suggest changing content inside ci_bootstrap.php as follow
define('BASEPATH',realpath('system/').'/'); //set absolute path to CI system/
define('APPPATH', 'application/'); //set relative path to CI application
set_include_path(
get_include_path().PATH_SEPARATOR.
realpath(APPPATH).PATH_SEPARATOR.
realpath(BASEPATH).PATH_SEPARATOR.
'spec'); //adding 'spec' in path, for easily do require 'ci_bootstrap.php' from inside spec files
require BASEPATH.'core/Common.php';
require APPPATH.'config/constants.php';
require BASEPATH.'core/Controller.php';
I am trying to develop a project in zend framework. I have created a project gil using command line as follows then I entered to the project directory in command line and tried to create an action but I got an error as follows. I am using Windows XP and XAMPP and my Zend frameworks version is 1.11.7.
C:\xampp\htdocs\zframework12>zf create project gil
Creating project at C:/xampp/htdocs/zframework12/gil
C:\xampp\htdocs\zframework12>cd gil
C:\xampp\htdocs\zframework12\gil>zf create action add index
An Error Has Occurred
A project profile was not found.
Zend Framework Command Line Console Tool v1.9.0
Details for action "Create" and provider "Action"
Action
zf create action name controller-name[=index] view-included[=1] module
C:\xampp\htdocs\zframework12\gil>
Please help to sort out this issue
Thank you very much
In the second prompt, you type: cd gil . So, you'll move in the gil directory. This directory doesn't contain the zf xml file called .zfproject.xml (hidden). You should type:
zf create action add index
In the root directory: C:\xampp\htdocs\zframework12
I have the same problem, which caused by moving from one folders into another that lead to missing deleting hiden file .zfproject.xml. The solution is creating a new project "create project newname" and move all former files into this one.
Had the same problem with zf 1.12.9.
In my case, i was trying to execute command
zf1 enable layout from the parent dir to the project.
The solution was to go to the correct directory and then execute command.
This link helped me with my problem
original solution source
copy your zf.bat file to your new project 'gil' directory