I have XAMPP 5.6.3 installed on Windows 32bits (PHP Version 5.6.3), and I want to install PHPUnit.
I followed the instruction in the official site of PHPUnit :
https://phpunit.de/manual/current/en/installation.html#installation.phar.windows
but when I run this line phpunit --version in the command line, I get this message :
'php' is not recognized as an internal or external command, operable program or batch file.
how can I solve this problem ?
The problem was that PHP is not included in my PATH.
So I followed this solution :
Windows button + Pause
List item
Advanced System Settings
Environment Variables
append PHP installation dir to the PATH variable.
Related
This question has been asked before, but the fixes don't work for me. I am running Windows 10 with WSL (Debian) and I am unable to run a QT program because of the error
texconv: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
I found a post which discusses the same problem. I've tried tolos' and Envek's solutions, but they don't work for me. For me the file is under /usr/lib/x86_64-linux-gnu/ like tolos' was. I also sudo-ed the strip and recompiled the qt program (If that even matters), but it still doesn't work.
If it matters, my kernel version (checked with uname -r) is 4.4.0-18362-Microsoft and I have no issues running this qt program on my other PC that uses WSL Ubuntu. And I installed the qt stuff with this command: sudo apt-get install qt5-default qtbase5-dev
I had an image that I would run using docker run and which would successfully launch KStars -- an application that uses this libQt5core.so.5.
If I ran the very same image on a Kubernetes cluster then I would get an error message when launching KStars like libQt5Core.so.5: cannot open shared object file: No such file or directory or some such.
Putting this strip command into the Dockerfile and rebuilding the image allowed the application to load successfully in both environments.
sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
I got it working in the end. I upgraded from WSLv1 to WSLv2 and that solved it. Not sure why, but it must have been a WSLv1 Debian bug
I'm having a problem with the Heroku CLI.
I was following the Heroku tutorial for Node.js.
I installed the Heroku CLI and checked that node --version, npm --version and git --version were at the latest version available.
I then run the command "heroku login" from git bash, but after inserting the email it complained about permissions so I re run git bash in administrator mode and everything seemed fine, I got to the part where you do "heroku create" it started downloading something but then I had a warning about not using git bash for "create" but to opt for powershell or cmd.
So I switched to cmd.exe with admin privileges but now the "heroku" command does nothing:
"$ heroku
The system cannot find the path specified."
The error seems related to my os, I checked my Windows Environment Variables and the path to heroku's exe is correctly set up (in fact it worked a bit earlier) to "C:\Program Files\Heroku\bin".
So I don't know how to use heroku at this point or what can I do to fix this error.
How do I install/setup Drupal Console on Windows 7? In the video by the author, the environment used is Linux.
I tried to install it on Windows 7, but I wasn't able to use it to generate a module code.
You can download the drupal console either using Git Bash
$curl https://drupalconsole.com/installer -L -o drupal
Or using windows command prompt
c:\>php -r "readfile('https://drupalconsole.com/installer');" > drupal
After downloading this file, place it beside php.exe file within your php folder (not project folder), restart your terminal/cmd-prompt and type
$drupal
to get started.
Besides downloading Drupal Console .phar file, you can also install Drupal Console using composer on windows.
First Download and install composer in your system.
Then on your windows command prompt or git terminal
$composer global require drupal/console:#stable
Create a file called drupal.bat
#php "%~dp0drupal.phar" %*
Here's the full list of steps I took:
php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
added installation location to the global PATH
created a drupal.bat file in the same directory as drupal.phar. drupal.bat contains: #php "%~dp0drupal.phar" %*
Now you can call >drupal from any location. I would upvote #Nate's answer, but this is a new account.
Open Git bash (or any terminal with curl capability)
Run curl https://drupalconsole.com/installer -L -o drupal.phar
Create file drupal.bat with content #php "%~dp0drupal.phar" %*
Copy both files (drupal.phar and drupal.bat) into C:\WINDOWS
Open new Command prompt window then try typing drupal list.
This steps assume:
Your PHP is on Path environment variables and you can run php --version.
You have Git for Windows installed.
you can install drupal console using composer
open the command line on windows then go to :
cd /path/to/drupal8.dev
now you can install drupal console :
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader
after that you installed drupal console you can use it from drupal root directory where composer.json exist as follow:
vendor/bin/drupal <the_command>
you should replace <the_command> with one of the drupal console commands. you can see complete list of the commands here: drupal console commands
Find a php.exe
Add this path to the environnement variable path
from terminal run
php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
i then use php-storm IDE :
file/settings/command line
add tool based on symfony console
fill php path and drupal.phar path
console is now set
tools/run command
drupal list
if you have php and composer all setup
make sure you're in your drupal root folder..open powershell (anyother cli) and do '
composer require drupal/console
'after this add.
'C:\<path to your drupalwebsite root folder>\vendor\bin'
to your paths Environment variables
and you have composer installed: Remember to install and add composer to path variables for every local drupal installation.
After having successfully installed and updated all vendors in my project folder for Sylius i tried running this code :
app/console sylius:install --fixtures
I get this error :
PHP Fatal error: Class 'ResourceBundle' not found in C:\wamp\www\sylius\vendor\
symfony\symfony\src\Symfony\Component\Locale\Locale.php on line 51
Then i tried all possible solutions given here
Installed intl extension in php (working successfully).Then ran this command
php build-data.php 'your ICU version'
On running the above command i get this:
'which' is not recognized as an internal or external command,
operable program or batch file.
The command "svn" is not installed
I want to know if there is another workaround to this issue.
Please help and thanks in advance.
P.S. - No SVN runs on my system. And i'm using icu*46.dll
Anyone came across this??
This error relates to be PHP intl-extension. Make sure it is enabled and you have the LATEST version.
quick test:
<?php
var_dump(extension_loaded('intl'));
Make sure your PHP folder is correctly registered in your %PATH% environment variable.
Control Panel - System - Advanced - ...
Without that, the ICU dlls are not loaded by PHP as Apache module - no error message is displayed, but the extension is not enabled.
Check aswell from phpinfo() ! not with ...
php -m
... or ( windows = findstr, linux/cygwin = grep )
php -i | findstr intl
check that the extension is enabled in your php.ini ( dont know WAMP's extenion path so adjust it please )
extension=php_intl.dll
As i can see you are on Windows and using WAMP you will have to get a precompiled version of the extension.
The packages on http://windows.php.net/download/ all contain the php_intl.dll in the ext folder.
Make sure that the ICU is compiled with the same version of MSVC that PHP is.
You run into problems if the ICU was compiled with VC10 and PHP was with VC9.
Although php -m and php -i detect the INTL it wouldn't show up in phpinfo().
I installed express-generator but when I write in CMD (express --view=ejs astronomy) it gives me this error: 'express' is not recognized as an internal or external command,
operable program or batch file.
I did with express-generator couple projects before I installed anaconda python 3.7.4
First, have a look at this: how-to-ask It will help you to use Stack Overflow more effectively.
I think you have not installed express globally!
to install it globally, try the following.
npm install -g express
Also, if express is not in your PATH you have to add the full path to run it in cmd:
\myproject\node_modules\.bin\express.cmd
(Usually is not recognized as an internal or external command happens because the system couldn't find it in the path variable!)
Hope this helps!
Good Luck!!