I'm trying to start use selenium server with my Yii2 project.
I successfully installed selenium-server-standalone on win 10 with that command:
composer global require se/selenium-server-standalone
But when I try to start selenium-server-standalone I have error message::
sh is no internal or external
command, operable program or batch file.
There is java and selenium in my PATH, also I have a selenium-server-standalone.bat file in C:\Users\***\AppData\Roaming\Composer\vendor.
Please, tell me how can I solve this problem.
You have mentioned you are trying to run selenium server on Win10 machine and error you are facing is sh is no internal or external command, operable program or batch file.
Seems you are typing sh selenium-server-standalone.bat in your command. that is for Linux.
For windows machine, simply go to your path where batch file is located (C:\Users\***\AppData\Roaming\Composer\vendor) , type selenium-server-standalone.bat and hit enter. Selenium server will start.
Related
OS: Windows 10
yesterday I install xampp because I want to learn laravel.
everything is normal. I setup laravel and all. and I got to develop some progress.
before I went to sleep, I turn off my laptop.
in the morning, I open my project and run php artisan serve. then I got
'php' is not recognized as an internal or external command,
operable program or batch file.
I try to check my environment. I found that PHP is gone from the environment. so I add PHP (again) in the environment table.
and still, got the same error
'php' is not recognized as an internal or external command,
operable program or batch file.
so I check the path C:/xampp/php. turns out, there is no php.exe
then I run where php.exe from cmd in the directory C:/. and got
C:\>where php.exe
INFO: Could not find files for the given pattern(s).
Is there any solution so I can use PHP again?
I've been trying to connect my local files to my app using `heroku local web`, but it throws this error:
3:24:15 AM web.1 | 'vendor' is not recognized as an internal or external command,
3:24:15 AM web.1 | operable program or batch file.
[DONE] Killing all processes with signal SIGINT
3:24:15 AM web.1 Exited with exit code null
I'm sure my Procfile is there in the directory and here is the command line web: vendor/bin/heroku-php-apache2.What I'm doing wrong? What is vendor and why it's not recognizing it?
Additional info:
OS: Windows 10
buildpack: PHP
Based on the error message, it looks like you're running this in cmd.exe. Commands there often use forward slashes for options (e.g. foo /a /b) instead of dashes (e.g. foo -a -b).
I believe the slashes in your command are being interpreted as options, making vendor the command that would run.
A common pattern for using a different command local development on Windows is to create a file called Procfile.windows containing a Windows-specific command, e.g. one that uses backslashes instead of forward slashes, and then run locally as heroku local -f Procfile.windows.
But that heroku-php-apache2 binary is unlikely to run on Windows, so that will be insufficient. The getting started with PHP page is notably missing the "run the app locally" step that, for example, the Python page has.
One good option is to use Windows Subsystem for Linux to run a Linux distribution in Windows and develop there. Another might be to use something like Docker or Vagrant to run a development environment in a virtual machine.
Or, if you have PHP installed on Windows already, try using something like php -S instead of Apache:
web: php -S localhost:8000 -t main_folder/
Make sure to keep your existing Procfile as you'll want to use that on Heroku. php -S should only be used for local development.
You might also simply have better luck using PowerShell instead of cmd.exe. It is generally much better-behaved.
I would like to configure PHPStorm so that I can run Artisan commands directly from my IDE's terminal. For example php artisan key:generate. However, when I do, I receive the error 'php' is not recognized as an internal or external command.
Background:
running Windows 10 as host machine
using Docker to run my webserver (Nginx) and PHP interpreter (7.2-fpm).
I followed this tutorial.
https://www.digitalocean.com/community/tutorials/how-to-set-up-laravel-nginx-and-mysql-with-docker-compose.
One thing the tutorial didn't cover was how to set up my remote PHP CLI interpreter. For that, I followed https://www.jetbrains.com/help/phpstorm/configuring-remote-interpreters.html and can make a successful connection as it picks up the correct PHP version 7.2.21 as seen in the screenshot.
After this, I restarted my Windows 10 host machine, fired up the container, opened my IDE and tried to run php -v from the terminal but hit the error again.
I know it has something to do with my PATH environment variable being set incorrectly, or not at all but I am not sure how to point it to the container's PHP interpreter. Any help would be greatly appreciated.
EDIT
For what it is worth, I know that I can exec into the container and run PHP commands from there, but thought I might be able to do it directly from my host machine by pointing to the container's interpreter.
The terminal in PHPstorm is the same as any other terminal on your computer. It doesn't automatically connect to docker to run the php -v command. If you want to run php from PHPstorm in docker you can right click the file:
Choose run:
And select your created docker interpreter as your runtime:
If the fix button doesn't show it can be configured through:
settings > Languages & Frameworks > PHP
And then clicking on the 3 dots at the end of "CLI interpreter"
I have installed the composer also and the path is also well defined but when I type composer update then the following error appears.
'composer' is not recognized as an internal or external command,
operable program or batch file.
Path:
C:\ProgramData\ComposerSetup\bin
F:\xampp\php
C:\Users\THEE NES\AppData\Roaming\Composer\vendor\bin
You can try to run it in this way because you may not have installed it globally:
C:\ProgramData\ComposerSetup\bin\composer update
If it still doesn't work you have to restart Windows Explorer or your computer not only cmd
I'm trying to configure Heroku Local on a Windows 10 machine.
Composer, php, git, and heroku are installed fine, and my procfile look like this:
dev: vendor\bin\heroku-php-nginx -i php.conf.ini -c nginx.conf.php
but when i try to run, give me this error:
dev.1 | 'vendor\bin\heroku-php-nginx' is not recognized as an internal
dev.1 | or external command, operable program or batch file.
[DONE] Killing all processes with signal null
Exited with exit code 1
seens like windows can't run the bash file of heroku-php-nginx?
https://github.com/heroku/heroku-buildpack-php/blob/master/bin/heroku-php-nginx
What i can do?