When attempting to run 'create project' in Zend from command line using zf I get the following error:
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path
I'm using XAMPP and my php ini located at: C:\xampp\php\php.ini reads:
include_path = ".;C:\xampp\php\PEAR;C:\ZendFramework-2.1.1\library"
I'm running Windows 7 and my environment variables read:
C:\xampp\php;C:\ZendFramework-2.1.1\library;C:\ZendFramework-2.1.1\bin
So even though I'm referencing the framework in the php.ini it is still not recognized. Please help
Looks like a ZF1 vs. ZF2 issue.
The ZF2 command line tool ZFTool is a distinctly different creature from the ZF1 version.
Looks like you are trying to use a ZF1 tool invocation on a ZF2 installation.
Related
When checking with app/check.php Symfony2 says this Configuration file used by PHP : /etc/php5/cli/php.ini however phpinfo(); displays that Apache is using /etc/php5/apache2/php.ini.
I tried searching but couldn't find a solution. Could someone explain how do I tell my Symfony2 app to use Apache2's php.ini? Or is there something obvious I am missing here?
I am new to Symfony
PHP cli uses another ini than PHP apache. That happends quite often (you often also want other configuration).
When you use Symfony from both console (the commands) and apache (the app), you should make sure both ini files are correctly configured for Symfony.
In the browser, you can go to web/config.php to see a report of Symfony about your PHP settings and such.
On Ubuntu Apache uses /etc/php5/apache2/php.ini and the command line uses /etc/php5/cli/php.ini. This is related to your OS and not Symfony2.
I have installed Netbeans 8.0 and I think he installed with php because I haven't made others installation and everything work, but now I try to make Zend Framework 2 work and I have downloaded the skeleton select it, select the composer but because it can't detect php interpreter it can't run the composer and gives an error when use zend classes.
My question is where I can find the interpreter because I look in netbeans/php and I haven't find a php.exe and also I haven't find it anywhere my pc.
You can use software like XAMPP, LAMP (both available also for linux), WAMP. All off them contain PHP. Windows packages have pretty installers.
I'm having an issue with PHP Code Sniffer plugin for Zend studio. I set up my php Executable to be my version of Zend 5.3.14. The PEAR library is also pointed to the executable in my zend directory. When I run code sniffer on a file it creates a new php.ini file in /tmp/zend_debug/session###########/php.ini. I get the following type of error
PHP Notice: Use of undefined constant T_CALLABLE - assumed 'T_CALLABLE'
If I replace the php.ini in that path with a copy of my current php.ini I can run Code Sniffer in Zend Studio. Anyone have any idea how I can stop this from being generated. Or maybe to change the include path that's being generated?
Thanks in advance!
I don't have any knowledge of Code Sniffer or Zend Studio. But T_CALLABLE did not exist prior to PHP 5.4. I suspect you are running php 5.3 and you plugin assumes php 5.4.
I currently have PHP 5.4 setup, can we install Zend 1.11 with it or do we need to go for Zend 2 (have not come across decent tutorials explaining the setup for Zend 2 on WAMP)
I tried installing 1.11, but it gives out a errow while using the zf CLI
***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.
You can absolutely run Zend Framework 1.11 with PHP 5.4.
The error you are getting is because you are trying to use "zf" in the command line, but PHP can't find where the Zend Framework is loaded. In order to fix this, find the include_path directive in your php.ini file, and update the path to include where you have installed the Zend Framework.
Don't forget to restart your web server after you have done this!
i've been using xampp 1.7.3 for a while now and today i've decided to have a look into zend framework and got a zendserver ce 5.0.2.
i'm on windows 7 and until i used the command line tool, i haven't noticed that there was a version of zend framework (zf) shipped with xampp.
zendserver got a more recent version than the xampp one. xampp was already added to the path before zend server.so command prompt is only seeing xampp one, plus it's throwing errors when creating projects.
i'ld like to use the zendserver one as default and i've tried to put the zend server bin before php in the environment variables and restarted the machine but no success.any ideas ? thanks for reading
If you cannot find how to take out the xammp zf path you could always rename/move/delete de version from xammp. Since the zend server one is on your path it should not be a problem at all.
Alternatively you could try replacing the version in xampp with the more recent one. As far as I know xampp does not use zf itself so I doubt it would break something.
If you are just trying out zend any of these solutions is pretty easy to undo. Also maybe look into virtualisation for these kind of needs. Easier to just create virtual machines then make many webservers work on the same one.