-
Notifications
You must be signed in to change notification settings - Fork 196
RC7: Cannot GET http://localhost:8080/ #287
Conversation
If you get the "cannot get http" error right after the ProcessTimedOutException that is normal. Composer exists after 300 seconds on some systems. Either try it without composer |
I get the error well before the timeout. Tried it without using composer, same problem. |
@kingjerod The error you're reporting is one thrown by the Symfony console when reaching the timeout. Try doing the following instead of $ php -S 0.0.0.0:8080 -t public public/index.php This has the benefit of sending the error log to the console, which may help us diagnose. The next thing to point out is that if you do a minimal install, there is no middleware present to handle the request, which means you'll get a 404 every time, until you add some routes and middleware. Have you done so? |
Ah, did not know that about the minimal install. Added a route and it works fine (on the skeleton). I'll have to figure out why my standalone still doesn't work, I have a route there but still get a 404. Tried running it from Windows with PHP CLI like I am with the skeleton, I don't see any errors. This is all the code (from standalone docs):
I'll keep poking at it. |
It looks like it comes from not having the 'routes' key set in the config. I was able to simplify the skeleton to this:
If you delete the line where it sets 'routes' => [], it will throw a 404. I've been trying to figure out why this happens in the code, but am still trying to understand how everything is connected. |
@kingjerod There's a problem with the standalone quickstart: starting with RC6, we now require you to pipe the routing and dispatch middleware; however, we didn't update the standalone quickstart to reflect that. I'm going to get it updated shortly. |
@kingjerod I've turned this issue into a pull request, and the patch demonstrates piping the routing and dispatch middleware; please review! |
Looks good, tested and it works. 👍 |
I've tried both the standalone setup and the skeleton and I get this same error when trying to load up a page using RC7 (have not tried any other release candidates).
For the skeleton, I've done minimal setup with FastRoute, Zend ServiceManager, no templates, no error handler. This is Windows, PHP version 5.6.12, composer version 1.0-dev (ae14e0f)
I get this error (not right away, well after the page loads the error):
For the standalone setup, same thing, FastRoute, Zend Service manager. I followed the QuickStart Standalone usage in the docs. This is running in a Vagrant Ubuntu box, PHP version 5.6.13, composer version 1.0-dev (f1aa65). I see the same error, "Cannot GET http://....."