Windows + Xampp + CakePHP - Composer throws error on update - cakephp

I am trying to create a local development environment on a Windows machine using Xampp. Xampp has been setup correctly and I am able to access localhost, locahost/phpmyadmin and a virtual host I created domain.local. This Virtual Host is a CakePHP application that I had been running on a Linux Box (nginx). I use that code to setup the site, but when I try to run
php composer.phar update
to have composer download all dependencies, I get the following error:
Fatal error: Class 'Cake\Composer\Installer\PluginInstaller' not found in
phar://C:/Users/admin/Documents/Sites/domain.local/website/composer.phar/src/Composer/Plugin/PluginManager.php
on line 244
I have tried a bunch of things without success.
Also to note php composer.phar self-update, runs without issue.
Not sure what to do at this point. Any help is appreciated.

After more tryouts, I finally decided to delete the vendor folder and surprisingly it fixed my issue. Composer downloaded all dependencies and everything works as expected.

Related

How can I install cakephp2 in 2022?

can anyone tell me how can I install cakephp 2 in 2022 I tried many ways to install it I also have its zip file which I extract it and when I tried to run it it shows.
Fatal Error
Error: Cannot use 'String' as class name as it is reserved
File: E:\xampp\htdocs\cakephp2.3\lib\Cake\Utility\String.php
Line: 27
Notice: If you want to customize this error message, create app\View\Errors\fatal_error.ctp
CakePHP 2 needs php5
since Version 2.8 you can use php70
php71 is possible but you need to install mcrypt seperatly.
Its possible to run a CakePHP 2.8 on php72 with some core hacks. But i wouldn't recommend this.
I got my answer we can download its zip file from github and copy its file in htdocs folder and run it without an issue. By the way I downloaded cakephp 2.10. and it is also running in xampp with php version 8. If in your system it is not running then try to use xampp with php version 7.

GAE: Cannot get the System Java Compiler. Please use a JDK, not a JRE

When trying to deploy my application to the Google App Engine server I get the following error:
Cannot get the System Java Compiler. Please use a JDK, not a JRE.
All solutions I've seen for this involve editing an eclipse configuration file, but I'm not using eclipse. I'm executing appcfg.cmd from the dos prompt. I have a jdk installed and my JAVA_HOME is pointing to it:
c:\program files\java\jdk1.6.0_43
Obviously appcfg.cmd is not looking at JAVA_HOME. It must be getting the JDK location from somewhere else.
Any ideas?
As noted in the comments: Make sure the JDK is FIRST in your PATH.
I had the same issue with appengine sdk 1.8.1 and sts 3.6.4.
I tried adding vm properties to sts.ini file, added %JAVA_HOME% to the beginning of the path variable. But nothing was working as I kept getting the same error.
Cannot get the System Java Compiler. Please use a JDK, not a JRE
Then I found the issue was with Windows\system32\java* file. The appengine was reading the java from Windows\system32.
There were three files.
java.exe
javaw.exe
javaws.exe
I replaced these files from JAVA JDK home as they were from JAVA JRE home during installation. After that, I restarted my sts and everything worked fine as I am able to deploy without issue.

deploying gae to development server stopped working

I'm working through a test GAE Java project which was working fine but I decided to look at adding GWT to the same project. I then decided to stick with the GAE stuff I was learning and decided to remove GWT. The problem is I can't now deploy to the development server as it gives the following in the Eclipse console pane. Anyone know please how I can reset appropriate settings to how my project had them originally?
terminated test [Web Application] C:\Program
Files\Java\jdk1.6.0_37\bin\javaw.exe Usage:
[options]
Options: --help, -h Show this help message and exit.
--server=SERVER The server to use to determine the latest -s SERVER SDK version. --address=ADDRESS The address of the interface on the local machine -a ADDRESS
to bind to (or 0.0.0.0 for all interfaces). --port=PORT
The port number to bind to on the local machine. -p PORT
--sdk_root=DIR Overrides where the SDK is located. --disable_update_check Disable the check for newer SDK versions. --generated_dir=DIR Set the directory where generated files are created. --jvm_flag=FLAG Pass FLAG as a JVM argument. May
be repeated to
supply multiple flags.
I seem to have found my own answer through setting up a new dummy gae project and having a poke around, found that the 'Run As' > 'Run Configurations...' > '(x)= Arguments' > 'Program arguments' had an additional port defined prior to the rest of the argument beginning '--port=8888'. I removed the mention of '-codeServerPort 9997 ' and it now deploys to dev server and appears to be working as before.
eg
new dummy project: --port=8888 "C:\Users\tech1\SSD Storage\Eclipse Projects\workspace\dummy\war"
project that wouldn't deploy to dev server: -codeServerPort 9997 --port=8888 "C:\Users\tech1\SSD Storage\Eclipse Projects\workspace\test\war"
I faced the same issue and you know what, Workaround is just pretty simple.
I created one new appengine project with only one jsp in WAR and 'Run As' > 'Run Configurations...' >Server Tab -> Unchecked then checked Run Built-In server and then checked Automatically select any port.
Server started ..on some fishy 25334 port..i stopped that using red button on Console Terminal.
then i changed it back to 8888 and WHOA project Ran.... :)
Then i did the same with old project. deleted this new one and all is working as expected.

unable to deploy after upgrading to 1.7.4

I upgraded today to GAE 1.7.4 and on trying to deploy I see following error:
Preparing to deploy:
Created staging directory at: 'C:\Users\VSKUMA~1.ST-\AppData\Local\Temp\appcfg4811921061542689032.tmp'
Scanning for jsp files.
Compiling jsp files.
java.lang.RuntimeException: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
I already have JDK pointing in the build path and this all was working fine till GAE 1.7.3
I cannot uninstall the existing GREs for some reasons.
For me at least, forcing Eclipse to use a different vm itself worked. Add, for example:
-vm
C:\Program Files\Java\<jdk1.6.0_38>\bin\javaw.exe
to the first two lines* of the eclipse.ini file and restart Eclipse.
*Thanks to Andre
finally i uninstalled jre manually and this only helped me to get through this
Yes #Vik, i had this problem when updating to GAE 1.7.3 and the solution to the problem is to reinstall the JRE... but! if you are working with Eclipse, and this doesn´t work either, try reintalling the whole IDE. (i had to do so, and it worked for me ¬¬ )

Problem installing Google App Engine from MSI

I downloaded Python and installed it, and when I go download GoogleAppEngine_1.2.0.msi and try to install it and I get this error:
This installation package could not be
opened. Contact the application
vendor to verify that this is a valid
Windows Installer package.
Am I forgetting something? I am assuming this is pretty simple.
I had the same error. The file downloaded by IE was about 190k and would not run. The file ought to be 2.7M. Firefox downloads correctly. Also IE will download correctly if you select RUN instead of SAVE. That is my experience and I now have the SDK installed. I hope this helps you.
Download it again and try to install the newly downloaded file. Maybe the file was damaged during download or not completely downloaded which can both happen sometimes.
If this does not help and the same error message appears you could control the checksum which should be
5ea87b8ed3011a5f55a9135c96abe96b6a6fd48b
for this file.
When you are sure that the downloaded file is ok, check if the version of your operating system is supported.
Maybe installing the Windows installer could help?
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=5a58b56f-60b6-4412-95b9-54d056d6f9f4
If not, try out on another machine or inside a virtual machine.

Resources