so basically i was using composer on my windows installation without any problems. Suddenly i get this error on every project (installing composer.phar manually):
[RuntimeException]
Could not rename "Xampp\htdocs\symfony.dev\vendor/twig/twig/fabpot-Twig-
70fff8b" to "Users\xxx\AppData\Local\Temp/23cd0cd163431d8305983511f9
b1c2af".
I tried installing or updating on different php apps. Always the same result.
Also i tried to install composer via the windows setup which leads me to this error message:
Internal Error [ERR_LOGIC]: An internal script did not run correctly (exit code 1)
So far i couldn't get any official help. Anybody else experienced this error? Your help is appreciated... thanks a lot in advance!
When you run any command or start cmd. You have recived:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
The system cannot find the path specified.
If have, Try the following.
Open the Registry Editor, type regedit and hit Enter
Navigate to HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
and clear the values.
Related
I'm on Windows 10 x64 and today I wanted to install a new version of XAMPP. What I did was to uninstall my current one and then remove PHP from the environment variables. After that, I downloaded XAMPP as usual and installed it along with Xdebug, the same way that has worked for me during the past two years.
When I opened PhpStorm and went to set the CLI interpreter I noticed that it said "PHP version: Not installed" and "Debugger: Not installed" (although I have the PHP executable set to C:\xampp\php\php.exe).
What I did after that was to try reinstalling PhpStorm, both with my current settings and then other settings. It didn't help.
Upon checking the PHP version in the command line it does say that I have the new version installed. I am also able to do a simple echo 'hello'; and have it printed in the browser on my localhost. I'm not sure what to make of that. However, debugging inside PhpStorm does not work despite seeing on my PHPinfo that Xdebug is installed.
After googling around I don't see much that is relevant to what I'm doing. It seems like everyone who faces this issue is using a remote interpreter and a mac.
Does someone know what to do about it with my settings or have any suggestions on how to get this solved?
Setup:
Windows 10 Version 1903 for 64
xampp-windows-x64-7.4.1-0-VC15-installer
PhpStorm 2019.3.1
PHP 7.4.1
Zend Engine v3.4.0, with Xdebug v2.9.0
Error message:
Failed to parse validation script output
In my case Comodo Internet Security (CIS) was adding php.exe to blocked applications.
Unblocking it fixed the issue.
My config:
PHP 7.4.5 64 NTS
Windows 10 1909
PhpStorm 2020.1
I am creating a custom build in windows for php 7.0.4. All good when following the process in https://wiki.php.net/internals/windows/stepbystepbuild until nmake snap. When I do nmake after the building of config it was giving me some errors and exiting with error 1077. So as per the VS Documentation https://msdn.microsoft.com/en-us/library/dt309377.aspx I used /I to ignore errors and build further.
The issue is -> I am getting a x86 build instead of x64 build. Second, rather than a clear build I am getting a manifest and development source. I am not able to compile it further to .exe. The command I an using to build is simple and is configure --disable-all --enable-cli --enable-cgi --with-pgo --enable-snapshot-build . It is a simple build for just php.exe, php-cgi.exe with pgo enabled.
What am I doing wrong? Any help is welcome.
UPDATE
I found out that --with-pgo or adding any other extensions to the configure line is the culprit of the error 1077. Could this be due to lack of dependencies in the deps folder? But I still cannot explain why a X86 dist is getting into X64 folder. I at times get an error saying the inbuilt build configuration does not match the X64 folder specification. Not sure whats happening not able to replicate issues other than 1077 by enabling the extra extensions.
You may want to have a look at this https://github.com/johmue/win-php-sdk-builder github project.
The issues were of fatal error 1077 resolved by removing --with-pgo from the configure script. The build process for it (optimizing in PHP7) has different steps than what is there in the docs for normal compiling
The issue of X86 getting built instead of X64 was due to environment architecture of the cl.exe in vc developer command prompt. It was set to x86. I changed it by providing the command vcvarsall X64 and the configure command, nmake command worked creating the build for X64.
Special note of Thanks to the Windows PHP team, especially Pierre for identifying it.
I am trying to install composer on my shared host for the first time.
When I run curl -sS https://getcomposer.org/installer | php
I am getting a Composer successfully installed
User it: php composer.phar
when I run php composer.phar i am getting this warring error:
Warning: Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI
any ideas on how to fix this ? and why i am getting this error ? :(
when I run php -v i get this back
PHP 5.4.39 (cgi-fcgi) (built: Mar 25 2015 14:20:20)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
Do I need to run this using CLI version if so how would i do this ?
Any help would be nice thank you.
I resolved this by explicitly calling the version of PHP it asked for. Keep in mind that on a shared server environment there is often multiple versions of PHP running and even though you may have set up your default in your cPanel config, bash commands often resolve to another (lower) version.
First, I created a bin directory and moved composer.phar into it. Then, I added this alias to my .bash_profile and it worked like a charm:
alias composer="/usr/php/54/usr/bin/php-cli ~/bin/composer.phar"
Hope this helps!
As Composer is now available via WHM you can use this to find it:
which composer
This returned path "/opt/cpanel/composer/bin/composer" for me. If this returns nothing then disregard the rest of this answer, as Composer is not available to you at system level.
You can now use php-cli to call this with Composer's absolute path:
php-cli /opt/cpanel/composer/bin/composer install
php-cli /opt/cpanel/composer/bin/composer update
php-cli /opt/cpanel/composer/bin/composer require whatever/example
You may however need to alias php-cli if your system claims this isn't found. It very much depends how PHP has been deployed on the WHM server. You can do this by adding a user alias to the end of your ".bashrc" file as follows:
alias php-cli=/opt/cpanel/ea-php72/root/usr/bin/php
Replace ea-php72 with the release of PHP you want to use. Submit this as a command in the shell to make it available immediately, otherwise it'll become available when you open your next Bash session.
If you want to make this available with just composer alone you could create this alias again in ".bashrc":
alias composer=/opt/cpanel/ea-php72/root/usr/bin/php /opt/cpanel/composer/bin/composer
Or
php-cli $(which composer) ...
The location of the php versions installed will vary from host to host. Try finding them with:
locate /bin/php
For me this lists all php versions and I can then replace php with, for example:
/usr/bin/php71-cli
To access the command line interface version rather than the default cgi one. Then as stated by #Diggery you can create an alias.
alias composer='/usr/bin/php71-cli bin/composer.phar'
There are many suggestions on StackOverflow on how to test for a cli installation but the above is the only one that worked for me.
I have made a script to handle changes in composer/vendor. The script works with ftp-only servers, sends/removes only the changed files. Maybe someone will find it useful.
https://github.com/psad73/tune-composer
I have Windows 8 and PHP 5.5 installed on the following path:
C:\www\bin\php-5.5.13
Whenever i open CMD and type "php" it throws this:
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Users\jd>php
The system cannot find the path specified.
The system cannot find the path specified.
I have no idea why it throws it TWICE. I looked at my PATH variable, and i added php installation path into my PATH variable. I typed "php" again and i got the same error:
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Users\jd>php
The system cannot find the path specified.
The system cannot find the path specified.
But when i type "php.exe" it works...
Can anybody help me? this is driving me crazy. I tried looking for AutoRun keys in HKCU\Software\Microsoft\Command Processor\AutoRun and
HKLM\Software\Microsoft\Command Processor\AutoRun
but i found nothing
The error message triggered by Windows command prompt when a command is not found is a different one:
"php" is not recognized as an internal or external command,operable program or batch file
Thus you do have a php executable somewhere in your PATH. However, that message doesn't seem to be generated by PHP. To find out what's getting ran you can use:
where php
You say you got this:
C:\www\bin\php.bat
That's a batch file that doesn't belong to the official PHP distribution.
My system
PHP Version 5.4.0-1build1~ppa1~oneiric
Xdebug v2.2.0rc1, Copyright (c) 2002-2012, by Derick Rethans
Apache/2.2.20 (Ubuntu)
When I debug a Joomla up, coming near to the error that I wish to spot on, debugger breaks and gives me Socket Exception problem, with follownig stack trace.
Please help me, I am going crazy.
I was not able to downgrade xdebug, and I have tried on my machine with - another browser,
- another Java build,
- a new userdir for netbeans ( deleting completely the older one ,
- recreating the project putting also the netbeans directory under another path ( this because I needed to put files under www-data properties)
INFO [org.netbeans.modules.php.dbgp.DebugSession]
java.net.SocketException: Pipe interrotta
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:141)
at org.netbeans.modules.php.dbgp.packets.DbgpCommand.send(DbgpCommand.java:90)
at org.netbeans.modules.php.dbgp.DebugSession.sendCommands(DebugSession.java:211)
[catch] at org.netbeans.modules.php.dbgp.DebugSession.run(DebugSession.java:143)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
There were a few bugs in the Xdebug 2.2.0RC1 release with debugging. Those should all be fixed with yesterday's release of Xdebug 2.2.0. If you can still reproduce it, please file bug reports at http://bugs.xdebug.org.
I have tried all following:
- remove all watches ( ooops I did not have any one ! )
- use a new fresh userdir with netbeans but nothing
- upgrade xdebug to 2.2.0
- downgrade php version to 5.3.10 ( but I was not able )
- reinstall completely apache and LAMP ( but some configuration were not completely deleted, so if you want to do it, be sure of purging and configuration file of apache or php related )
At the end I did a fresh ubuntu installation, and now it works fine.
Hope error log in xdebug can improve to take in account and solve this kind of error without uninstalling all!