I am trying to install Zendframework Version 1.11.11 to my PC using Xampp version 3.1.0 3.10 . When I run the "ZF" command in "cmd" I receive the message "ZF is not a recognized operation.....".
What I tried so far:
Going to my computer properties and changing the path. ;\C:\xampp\php; and \C:\Zend\bin
What else can I do to solve this problem?
The path to zf (to the zf.bat file, to be exact) needs to be in your system path, not in php.ini includes. Refer to this question on Superuser. If your OS is not Win 7, you might need to google for the corretc instructions on setting the path.
Alternatively, you can also use the zf command with the full path:
C:\xampp\Zend\bin\zf create project myproj
Related
I am getting environment variable PATH error from wamp server.
already set the path (C:\wamp64\bin\php\php7.2.10) in advance system settings but again getting the same error
Sorry,
There is an error.
There is Wampserver path (c:/wamp64)
into Windows PATH environnement variable: (C:\wamp64\bin\php\php7.2.10)
It seems that a PHP installation is declared in the environment variable PATH
C:\wamp64\bin\php\php7.2.10
Wampserver does not use, modify or require the PATH environment variable.
Using a PATH on Wampserver or PHP version
is detrimental to the proper functioning of Wampserver.
Press ENTER to continue...
see the picture below:
how to resolve wamp server (path) error
The error is telling you that you have set the windows path to contain a folder to a version of PHP. WAMPServer does not need and does not like to have the PATH set to any version of PHP whether it came with WAMPServer or was installed some other way. It is all in the message on the Command Window.
So to remove the error, remove all references to any PHP you may have anywhere on your system from your PATH environment variable, regardless of whether it came with WAMPServer or was installed some other way.
The reason of course is that with WAMPServer you can have many versions of PHP installed into WAMPServer. If you notice it comes out of the box now with more than one version of PHP ready to go.
The Reason
If you add ONE of those PHP versions to the PATH, then when you switch to another version of PHP your PATH would still be pointing to the old version. You will undoubtedly forget to amend the PATH, and this will just cause confusion and issues, so we prefer you not to have any version of PHP on the path at all.
The PHP CLI
Ok so now you have no version of PHP on your path how will you run the PHP CLI (Command Line Interface) I hear you ask :)
To do this I have a little .bat/.cmd file that I place in a folder that is already on the Windows PATH so I can run it form anywhere.
I have already written that up in this answer to a previous question, so follow this link rather than me writing it all up in 2 places.
I have worked on Zend-Framework on linux environment since last 6 months where i used to install the zend framework by simply creating a virtual host and in the corresponding virtual host i will change the path to the zend public folder.. In this way I installed zend framework on Linux (Ubuntu) but currently i have requirment to install to zend framework on windows 7 + xampp , i am not able to install this.. i stuck there...please help me to install zend on windows + xampp environment.
Thanks in Advance!!
You can do pretty much the same as you have done under Linux. You will need to go in your Xampp install. There, you will have a bin folder (might be an other name) which will contain your apache folder. In that folder, dig deep enough to find the httpd.conf file.
In that file, search for the include of the vhost.conf files. It will probably be commented out with a # at the beginning of the line. Uncomment it. Take note of the path and find the vhost file (most likely in the extras folder).
In that file, you can define your vhost as you see fit.
Last step, go to C:\Windows\System32\drivers\etc and edit the hosts file. To edit it, you have to be admin (launch NotePad as admin through right clic menu > Execute as administrator). Add the name of the vhost you just created and make it point to your localhost ip address.
Restart Xampp, it should now find your freshly created vhost.
I have installed a xampp portable package on my drive D, added the php folder path inside it on the system environment so I would be able to run php basically anywhere from the command line. but when i try to check if its working by executing the "php -v" command, it runs but i get this following error/warning messages.
"Warning: PHP Startup: Unable to load dynamic library 'xampp-portable\php\ext[:any].dll - The specified module could not be found."
*the [:any] there just means some dll filename.
and i get a lot of that warnings with just varying dll filenames,
anyway, here's the catch. when i do change my current path in the command line to somewhere in drive D, and then run the same command "php -v" it runs smoothly.
so what configuration should i do to fix this problem?
by the way, i do the same with mysql, putting its bin directory path on the system enviroment, run it in both inside drive C and drive D. and it runs smoothly. so i guess this problem is only on php.
I've posted the same question in xampp forums and this is the answer that was given to me. I'll be quoting the answer as it was and give credit to the one who answere it.
XAMPP is very proud that it don't have to set any environment
variables or registry values.
What you want to do is not possible with XAMPP portable without
mapping to a specific Drive letter. All configurations in xampp
portable have relative paths, so if you want to use cli from a
different drive letter, php can be executed, but all extensions of
them throw errors.
I would install the full version of XAMPP, map it to the current drive
letter with help of the setup_xampp.bat file and use the XAMPP control
panel Shell instead of default command line (advantage: The XAMPP
control panel shell sets local include paths to the needed XAMPP
folders).
Works for me (i can even use pear, git, composer, and other cli
scripts with the Xampp Shell if correct integrated).
best wishes, Altrea
credits to Altrea
Open your php.ini file, replace all relative paths to absolute paths. Eg: \xampp\ to C:\xampp\
I'm new to working in a WAMP environment, in this case I'm using Easyphp, and I can't find how to execute php commands (like a simple php -v), like I would do for example when connecting to a server with SSH.
I have Easyphp installed, apache and mysql servers are on, and I created a virtual host using the module in the same folder where I'm trying to execute the php command (using the cmd tool in windows).
Is there any other way to do this? Is there a "console" just for that? Any help would be appreciated!
EDIT
OK maybe I should give a specific example of what I'm trying to do in case I didn't explain myself very well. I'm trying to follow this guide to getting started with Zend Framework, and in the very first step after downloading the files, it asks to "type" 2 commands:
php composer.phar self-update
php composer.phar install
Where do I exactly "type" those commands?
In windows you need to set up your path environment variable (if it hasn't already been done by the installer) so that it points to the correct location for the PHP executables. Refer to the documentation for EasyPHP to see if/how you need to do this.
Then, open a dos window, and cd into the directory for your project. Then you should be able to run the commands as shown.
I'm new to Zend Framework and i'm trying to do some tests on my local server. I use xampp on a Windows 7 pc.
So i downloaded the zend package who comes with a command line tool to setting up projects. Copied the folder with zf.sh on the hard-drive on the location C:\Program Files (x86)\ZendFrameworkCli\bin, than updated the system variables to make it work.
When i type in the command line "zf show version" i get an error by "php.exe". I guess this happens becouse php and apache are not installed on the OS but runs under xampp server.
So, there's any way to make it work with xampp? Thanx in advance.
You need to had the php executable path to you PATH variable. You can do this with the system icon in your configuration panel. You can also use a nice utility : RedmondPath ( http://sites.google.com/site/redmondlab/path)
After that, launch a command prompt and type php -v to make sure that all is correct.