Reputation: 1155
I'm running wampserver and can't seem to use php files in the CLI. Supposedly there are two modes of running php, CGI and CLI. I can't figure out how to enable CLI since I don't see php-cli.exe in /wamp/bin/php/php5.2.6. When I try and execute php scripts they wont run. Does anyone know how to get the CLI running php scripts using wampserver 2?
Im basically trying to call a bake.php script to open a cake console.
Upvotes: 4
Views: 12805
Reputation: 2429
If your having a problem with environmental variables, here is some steps to fix it:
Example: C:\wamp\bin\php\php5.2.9-2;C:\wamp\www\cake\cake\console;
NOTE: You will have to change the paths to match yours, also make sure you have ; seperating each path
Upvotes: 5
Reputation: 81
Here is something that could help : http://www.devtrench.com/php-command-line-cli-tips/
Important points :
If you’ve installed php before, and reinstall it : make sure what version of php you are using from the command line by checking out your environment variables in windows
Make sure you are using the right php.ini file
Upvotes: 1
Reputation: 57815
You should have a file php.exe, which is the CLI version. So you can do
php.exe -f phpfile.php
to run a file using the command line.
Upvotes: 7