CakePHP: command cake server hangs on xampp - cakephp

I have a basic XAMPP install on windows 10, and I've installed cakePHP, with no errors.
When I run bin/cake server in the xampp terminal, it tells me it's started on localhost:8765, and that I can press CTRL-C to return. It hangs here, shell goes unresponsive, and trying to hit localhost:8765 in the browser hangs indefinitely.
I can view the apache page at localhost:80, with no issue. Any help would be greatly appreciated.

Im almost definetly sure, that you have debugging turned on somewhere, and PHP script hangs on first line. Do you have any IDE opened during that procedure? If so, close it, restart php server and try again. It should work now.
I had similar WTFs working with PHPStorm, that unwanted debugging sessions was paused on "script first line" exposing behavior you have described.

Related

Transform Classes With Dex For Debug is making Windows crash

I'm building a React Native app. Everything was working fine but now when I try to run on Android it gets to the task :app:transformClassesWithDexForDebug, it hangs for 30-60 seconds and then Windows shuts down.
I tried to setup multidex as mentioned here: https://stackoverflow.com/a/56875424 but the result is the same.
I'm not getting any error message, the computer just shuts down abruptly and I have to turn it on again.
Any advice is much appreciated.
In the end, it was two problems mixed:
I was using the new Windows Terminal which is still in beta so I guess the shutdown problem was something to do with it, because I changed to normal good ol' cmd and the shutdown problem disappeared.
The actual error in the compilation process was actually the setup of multidex. I was not extending the MultiDexApplication class.
Thank you all.

Neo4j usually crashes when I close ssh connection

I am using Neo4j in my graduation project.Everything works fine in neo4j database.But, I have problem about the crashing database.I tried to fix that problem in the following segment of command:
/var/lib/neo4j/bin/neo4j console
When I run this command neo4j is working fine but when I close ssh connection, It will crash again.How can I fix that problem?
Thanks, Kind regards
Use bin/neo4j start to start it in the background
Actually you should install it as a service on your system. Something like
sudo bin/neo4j install
Then it keeps running after you started it until you stop it again.

Make netbeans use virtual box guest installation of phpunit

We use netbean's phpunit / unit testing plugins for all our testing. We used to use xampp and point netbeans at our our .bat file from the xampp installation. We recently started using vagrant and are now running our dev environment in virtual box. I would like to make netbeans use the installation of phpunit within the virtual machine. This would save us from having to have both installed. Is this even possible? Netbeans seems to want a file location and I am stumped as to how I can go about doing this.
[EDIT] I've created a custom batch file that uses vbox guestconrols to forward the commands to the VMs installation of phpunit. I am going to then point netbeans at my custom .bat file. My problem is, now, that guestcontrols doesn't seem to be forwarding --bootstrap. It seems to be trying to take it and use it, rather than forward it along. The docs say that all the additional arguments will just be passed on, but that doesn't seem to be the case. Here is what I am using in my my_phpunit.bat :
[my_phpunit.bat]
#echo off
if "%VBoxManage%" == "" set VBoxManage=C:\Program Files\Oracle\VirtualBox\VBoxManage.exe
"%VBoxManage%" "--nologo" "guestcontrol" "<my_vm_name>" "execute" "--image" "/usr/bin/php5" "/usr/bin/phpunit" "--verbose" "--username" "<user>" "--password" "<pass>" "--wait-stdout" "--wait-stderr" "CustomNetbeansTestSuite" "<path/to/test/suite>" "--bootstrap" "<path/to/bootstrap>" %7
I am almost there, as running the bat file without the bootstrap option at the end takes me to the unit test. I am getting exceptions because of some autoloader issues(no bootstrap), but if I can figure out a better way to forward these command line arguments to
[EDIT 2]
I think I've finally solved this, but I need to get some issues with my guest OS in order. Once I've been able to test it a bit more, I'll post the final solution. I solved the Vbox guest control issue by adding "--" before I actually sent the parameters that should be forwarded. It said to do so in the docs, but it wasn't entirely clear to me at first.
I just wanted to update that I never actually got the .bat file to work. I think I got pretty close, but I was hung up on some linux CLI output that I couldn't suppress. The .bat file that I ended up with was:
# .bat example
https://pastebin.com/BX1xnL3q
I ended up moving to PhpStorm and everything worked out of the box. So, if you're still using netbeans, you can try and give that a shot. Maybe someone with more unix / linux experience can fix the issues I was having. I feel I was like 99% there with it.

Database connection leak when terminating (Not stopping) tomcat on eclipse

It was as hard to write a good title for this issue as it was to search the web for it.
I have a lot of projects, some are in maintenance (they have been productive for years) and others in active development. This is an important fact because the problem happens on all projects on my computer and not on others.
The problem is that I run all web projects on tomcat and they all have database connections. I always used the "Terminate" button in favor of the "Stop" button to restart or stop tomcat from eclipse.
For those who dont know, the terminate button is the red button that stops the app from the log console or the debug console, while the stop button is the same red button but on the servers console.
It is a lot faster to stop the servers from the terminate button rather then the stop button, the problem is that ever since I upgraded to Helios my database connections no longer closed when terminating the servers... they do when stopping them normally.
Well no need to say that I discovered this because the database servers (Oracle, MySQL and SQLServer) started giving "Too many connections" errors.
This is a huge head scratcher for me since code has nothing to do with this issue, different types of database management in different projects have the same problem, only on my machine! Yes I havee tried this on other computers and the problem does not occur.
I have tried everything I could think of short from formatting...
Upgraded to Indigo
Reinstalled Galileo (even downloaded a fresh copy)
Reinstalled and tried different databases
Tried different versions of Tomcat (6 and 7)
I am starting to think it might not be an IDE problem and it just happened to start when I upgraded eclipse.
ANY suggestions are welcome!
When you stop Tomcat using that red button, Tomcat is actually requested to stop itself. If some SQL statement of your webapplication is blocked, then Tomcat will not stop. This probably causes the connection leak.
Why would an SQL statement block? This typically happens if another database user updates or deletes the same record that your application is trying to update/modify.
However, in my case Eclipse shows a popup after about 30 seconds to warn that Tomcat did not stop itself. The popup asks whether Tomcat should then be terminated (which should terminate even while the blocked connectione exists).

ld.exe: cannot open output file ... : Permission denied

I recently installed CodeBlocks with mingw32 on Windows 7 Ultimate 32bit in order to dust off my c skills, but this problem has me somewhat stumped.
I decided to fire off a short Fibonacci generator to make sure my setup was working, but I ran into a hurdle.
The program compiles, links and whatnot like a charm and I get a corresponding executable which runs as expected.
The problems occur if I try to compile again, then I get the following:
c:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: cannot open output file bin\Debug\Fibonacci.exe: Permission denied
I can't even edit the permissions of the generated executable.
I've checked the usual suspects:
Executable is verily not running.
Path to executable is read/writable to mingw32 (otherwise it wouldn't be able to build in the first place)
I'm not running cygwin in any shape or form.
And now for the funny bit: Usually after a few minutes, any executables generated by mingw32 which are displaying this Access Denied behaviour will automatically vanish without any intervention from me.
I've googled this somewhat, but most of the other results were either vague or inapplicable.
I wonder whether there is some Windows 7 security setting playing havoc with my .exe's, but I'm not that knowledgeable about Win 7 as to know where to begin searching.
Any one have any ideas?
I had exactly the same problem right after switching off some (in my opinion unneccessary) Windows services. It turned out that when I switched ON again the "Application Experience" everything resumed working fine.
May be you simply have to turn on this service? To switch ON Application Experience:
Click the Windows start buttonn.
In the box labeled "Search programs and files" type services.msc and click the search button. A new window with title "Services" opens.
Right click on "Application Experience" line and select "Properties" from popup menu.
Change Startup type to "Automatic (delayed start)".
Restart computer.
Application Experiences should prevent the problem in the future.
Your program is still running. You have to kill it by closing the command line window.
If you press control alt delete, task manager, process`s (kill the ones that match your filename).
If you think the executable is locked by a process, try Process Explorer from SysInternals. In the File/handle, enter Fibonacci.exe and you should see who holds the file.
If it is not enough, you can use Process Monitor (from SysInternals, again) to follow the activity of all processes on your system on Fibonacci.exe.
With a little bit of analysis (call stacks), you'll may find out why the access to the file is denied and what make it disappear.
Problem Cause :
The process of the current program is still running without interuption.
(This is the reason why you haven't got this issue after a restart)
The fix is simple :
Go to cmd and type the command taskkill -im process_name.exe -f
Eg:
taskkill -im demo.exe -f
here,
demo - is my program name
The Best solution is go to console in eclipse IDE and click the red button to terminate the program.
You will see the your program is running and output can be seen there. :) !!
I had the same behaviour, and fixed it by running Code::Blocks as administrator.
Open task manager -> Processes -> Click on .exe (Fibonacci.exe) -> End Process
if it doesn't work
Close eclipse IDE (or whatever IDE you use) and repeat step 1.
I had a similar problem. Using a freeware utility called Unlocker (version 1.9.2), I found that my antivirus software (Panda free) had left a hanging lock on the executable file even though it didn't detect any threat. Unlocker was able to unlock it.
Got the same issue. Read this. Disabled the antivirus software (mcaffee). Et voila
Confirmed by the antivirus log:
Blocked by Access Protection rule d:\mingw64\x86_64-w64-mingw32\bin\ld.exe d:\workspace\cpp\bar\foo.exe User-defined Rules:ctx3 Action blocked : Create
It may be your Antivirus Software.
In my case Malwarebytes was holding a handle on my program's executable:
Using Process Explorer to close the handle, or just disabling antivirus for a bit work just fine.
i experienced a similar issue. Bitdefender automatically quarantined each exe-file i created by MinGW g++. Instead of the full exe-file i found a file with a weird extension 'qzquar'
testAutoPtr1.exe.48352.gzquar
When i opened quarantined items in Bitdefender i found my exe-file quarantined there.
I got this error when using the Atom editor and mingw (through a package called gpp-compiler) for C++. Closing the open console window fixed my issue.

Resources