The error is:
Cannot run program "C:\Users\Shahzaib
Imtiaz\PhpstormProjects\CodeCept\composer.json" (in directory
"C:\Users\Shahzaib Imtiaz\PhpstormProjects\CodeCept"):
CreateProcess error=193, %1 is not a valid Win32 application –
Is there any solution for that?
A little bit late, but...
This issue could be a part of an incorrect composer command-line tools settings in the PHPStorm (or there was no configurations for that for your project).
Possible cause:
PHPStorm calls an incorrect startup file.
Incorrect composer installation on Windows.
In Windows PHPStorm doesn't recognize the composer.phar file correctly
In Windows in PHPStorm it's usually calling the composer.phar instead of calling the composer.bat file to run the specific command and an error occurs.
Solution:
One of the possible solutions:
1. I suggest you to install (or check your current installation) composer with the special windows installer
2. Check Windows system Path variable and there must to be the basic path to the folder, where composer were installed:
(for me it is C:\ProgramData\ComposerSetup\bin)
3. Go to your PHPStorm settings (press Shift+Alt+S)
4. Go to Tools -> Command Line Tool Support -> Press Add button
5. Select the "Tool based on Symfony Console" and press OK button:
6. Add an alias to composer (I am usually using composer or c aliases e.t.c)
7. Set the correct path to your php interpreter (in my case it is C:\xampp\php\php.exe )
8. Set the path to your (global i suppose) bin composer folder (in my case it is C:\ProgramData\ComposerSetup\bin\composer.bat) and you must to select a composer.bat file (NOT the composer.phar file) and press Ok.
9. Go to Tools -> Run Command (or press Ctrl+Shift+X) and run the command you wanted.
Hope it will help to someone!
Related
Bear with me - I'm learning as I go, and this is all new to me. I've set up Docksal on Mac OSX, and added an existing site. I've also got Xdebug installed. In order to use it, it appears I need an IDE. I've installed Aptana (no budget for pay services).
I'm trying to figure out how to set up the debugging within Aptana. I see old instructions from 2013 and older. They get me into the general area, of adding a PHP interpreter. But I'm stumped from here.
I don't know what to put in the Name and executable path (if I'm even in the right place for this) when I search for PHP.exe, nothing comes up. When I search for php.ini, I just find files sitting in unrelated Acquia Dev Desktop projects.
I may have accidentally managed to answer my own question.
In terminal, I first typed php --ini , but this gave me (none).
Next I tried sudo find / -type f -name php.ini
After entering the system password, I get three results:
/usr/local/etc/php/5.6/php.ini
/usr/local/etc/php/7.1/php.ini
/usr/local/php5-7.1.10-20171002-090111/lib/php.ini
Next, for the .exe file path, I typed which php
This gave me /usr/bin/php
So, within Aptana Studio 3, I went to Preferences. In the sidebar file tree I navigated to Aptana Studio > Editors > PHP > PHP Interpreters. Click the "Add" button. (This is where I got to, before realizing I couldn't find those files.
from the results above, I added my info:
In executable path, I placed: /usr/bin/php
In PHP.ini files, I placed: /usr/local/etc/php/7.1/php.ini
Press save, and that part "seems" to be solved. Here's hoping it works. I see errors in the bottom pane of Aptana when viewing a php file - so that's promising.
I'm trying to install composer, but it showing an error message. I'm using Windows 8.1, and download composer Windows Installer from https://getcomposer.org/download/.
The command interpreter did not run correctly:
C:\Windows\system32\cmd.exe
The system cannot find the file specified
The cmd file is existing on C:\Windows\System32\cmd.exe. And it run normally
I strongly suggest posting questions regarding the windows installer # https://github.com/composer/windows-setup/issues
The maintainer of our windows installer binary can answer most questions and is very friendly and helpful :-)
1- Open cmd.exe ( administrator mode ).
2- Write this command sfc /scannow (My be take long time for scanning).
2- Re-install composer.
I'm trying to create a php documentation on my local XAMPP host (on Windows 7) with phpDocumentor.phar (v2.). It gives me (after parsing all the files) this error:
Unable to find the dot command of the GraphViz package. Is GraphViz correctly installed and present in your path?
I searched a lot, but nothing helps. What does 'path' means? If I open a command box at any location I can start the dot.exe (which gives me no output but waiting prompt). In my environment path variable the bin folders is added. GraphViz is installed correct in Program Files and runs standalone.
What could I do or check?
In order to get GraphViz running properly with a Windows based phpdoc installation, just put the GraphViz program directory (c:\some\path\graphviz\release\bin) to the Windows Path system variable.
In order to do this, follow these steps (Win7, please provide your OS version if this doesn't apply to your situation):
From the desktop, right-click My Computer and click Properties.
In the System Properties window, click on the Advanced tab.
In the Advanced section, click the Environment Variables button.
In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button.
Different directories are separated with a semicolon:
C:\Program Files;C:\Winnt;C:\Winnt\System32
It will most likely look a bit different in your enviroment, so please just take this for an example. Just add the GraphViz Path at the end like this:
C:\Program Files;C:\Winnt;C:\Winnt\System32;C:\somefolder\graphviz\release\bin
I'm not too sure if you have to reboot your system after changing this value. You had to do this in the old days of Win2k, and I just don't know if this still applies to modern Windows versions. It surely doesn't hurt!
After this, phpdoc should be able to find the dot command.
The steps to resolve this error are:
download Windows Packages from
https://graphviz.gitlab.io/_pages/Download/Download_windows.html
Just install it
add c:\Program Files\Graphviz*\dot.exe or c:\Program Files (x86)\Graphviz*\dot.exe to your environment variable PATH
run phpdoc
Re-start your machine & run phpdoc (if still shows the same error message)
I'm trying to install behat on a Windows Virtual Machine, but I'm getting stuck with the windows command prompt. Here is what I did:
Installed xampp
Installed Composer for windows
Donwloaded behat using the git method (other methods do not
work for me) to C:\behat so that
C:\behat\bin\behat.bat and C:\behat\bin\behat both exist
open windowns control panel
search for "environment"
click "edit the system environment variables"
system and security > edit the system environment variables: add the the end of PATH "C:\behat\bin"
At this point I expect to be able to type in behat anywhere on my system using the command prompt as administrator, because the "bin" directory containing "behat.bat" is contained in the PATH, but typing in "behat" gives me "Could not open input file #bin_dir#\behatcd". typeing in behat.bat does not work either
I have never used Windows before so, this is probably obvious but I'm just not getting it.
Any advice greatly appreciated, thanks.
Albert
try typing
php behat
windows doesn't know behat is a php file and you need to tell it what to execute it with
Here you can find the step by step guide to install Behat on windows machine. openguider
I've installed ruby and the sass gem on a Win 7 Enterprise box. I've had issues throughout the process, and had to download the gems and install them from local to avoid other issues.
gem install --local sass-3.1.19.gem
I'm trying sass --watch styles.sass:styles.css but I get the standard sass isn't recognised error from the command line.
I'm really new to ruby so I could well have missed a step.
Thanks in advance
In order to run commands without specifying full path, you need to have the path to the program in you PATH variable.
So if your program is located in C:\Programs\rubygems\gem\sass you'll need to add C:\Programs\rubygems\gem\ to PATH.
The process of adding a folder to PATH for the Windows command line prompt is described here.
For Windows Powershell, please check Setting Windows PowerShell path variable here on SO.
After installing sass with NPM you got this:
npm install -g sass
file:///C:/Users/yourName/AppData/Roaming/npm/sass ->
C:/Users/Administrador/AppData/Roaming/npm/node_modules/sass/sass.js
You can create the path. Go to environment variables - > system variables -> path -> Edith , and include file:///C:/Users/yourName/AppData/Roaming/npm/sass. Then, Accept everything. and it's done.
Yes, putting the path to my ruby bin did indeed solve this.
My Computer --> right click, Properties --> Advanced system settings (left hand column) --> Environment variables --> find Path in the bottom list, highlight and edit --> include ;c:\path-to-ruby\bin at the end --> OK back out through the windows.
Thanks!
If you using Windows 10 v1607 (latest update as March 2017), you need to follow following steps:
Right-click on start menu & select System
Click on Advanced System Settings (left hand column)
Click on Environment variables button
In top section, select Path (or PATH), then click on Edit button
Inside opened window, click on New button
In selected input area, type (for ex.) C:\Ruby22-x64\bin\ (its must be path to ruby's bin folder)
Click OK, twice
Re-open Command-Prompt, now sass is ready to watch and compile your sass files.
If you have Node installed use the node terminal instead of the windows/VSCode terminal.
Search for the Node terminal on the windows search tool placed on the right side of the windows start button.