I am in the process of setting up a local version of the Laravel Skote template (https://themeforest.net/item/skote-html-laravel-admin-dashboard-template/25548061) on a WAMP64 server on my Windows machine (following these instructions https://themesbrand.com/skote/docs/setup-laravel.html), and upon install I am I am presented with an HTTP error:
"The GET method is not supported for this route. Supported methods: HEAD."
I have found other questions related to this, but in each case the proposed answers relate to the type of request set in the Controller and code itself, and not addressing the server setup in any way.
I tested the exact install on a live test server (DigitalOcean Debian 10) and the install works absolutely fine. For this reason I believe it is a setting within WAMP itself to enable GET/POST/PUT/DELETE http methods, and not something that should need changing in any route settings in the Laravel files.
Can anyone please help on how to enable this on WAMP. Any help would be appreciated.
I don't think it's connected with your WAMP because the message about not supported GET method is from Laravel (so Apache allowed that request and then Laravel catched it [Symfony component in fact]).
Run php artisan route:list and check if the route that you want to access works for GET method.
Related
Until yesterday my Phalcon PHP application was running perfectly on PROD and today is working only on DEV and LOCAL environments... and I don't have a clue what is going on there! The codebase is exactly the same on all environments, the configs and the routes are correct as well.
For example, if I want to get to a custom defined route, like "/my-custom-route", it always gives me the error message "MyCustomRouteController handler class cannot be loaded". But the rest routes are working fine, like "/contacts" which comes from ContactsController.
As an additional information, "/my-custom-route" has been implemented through ToolsController and gearAction().
The problem appears only on PROD! On DEV and LOCAL there are no such issues which is super strange... The LIVE server is Debian with Apache. DEV server is the same (Debian/Apache), and LOCAL has Ubuntu/Apache installed. All versions are the latest ones - Phalcon Framework (3.4.5), Apache (2.4.41), PHP7 (7.0.33), MariaDB (10.1.43).
Does anyone have an idea where might be the issue?
My first guess would be a case sensitive issue. But since you're running Debian on dev as well don't think this is the issue.
Not sure what changes are done but maybe you're looking at a file being cached by opcache?
Problem solved! Turns out that it was a configuration issue. I use values from an INI file where env, site_url, api_url are defined and the site_url was set without 'www.' which caused the custom URLs to be unavailable.
TL;DR
I get a 404 (Not Found) error on calling an API method (api/auth/authenticated~GET). I only get this on my live-server, not on local and not on any other methods.
The Problem
I use Codeigniter with a Rest-Server library. I have a simple method api/auth/authenticated(GET) that returns true if the user is logged in and false if not. On the live-server this method gives me a 404 (Not Found) error. Other calls to the same api class work, for example api/auth/login(POST) works and api/auth/logout(GET) works as well.
so how is this possible?
I have tried to delete the .htaccess file, but that didn't work. It can't be a typo since it works locally. Maybe some setting in Apache? But then why do the other methods work just fine?
I would be grateful for any ideas and hints.
my app
CodeIgniter 3.0.3
CodeIgniter Rest Server
AngularJs 1.5 with ngResource for client-side
my server env
digital ocean droplet
Ubuntu 14.04
PHP 5.6.15
Apache 2.4.7
The worst problems are always the most stupid ones ...
There should be a list on my desk.
1. Check for typos (very important but was not the problem here)
Now if we are working on Windows or OSX and everything works fine and then some parts just don't work on Linux this one is very important:
2. Check filenames for case-sensitivity problems (also check the GIT config)
The Problem was still a bit harder to find. I use Git to push my live-deploybranch to my remote repository, which is then picked up by Deploybot and uploaded to my server. Git doesn't care about case sensitivity on default and files will stay like they were first added forever. Thanks to this post i could just type one command to change it.
git config core.ignorecase false
I have a problem with Symfony 2. trying the example from the book. I have written a controller but when i go to the URL specified in the route i get an error. The server can't find the page. When i run app_dev.php i get an error that the file boostrap.php.cache is missing.
searched on the internet but found nothing relevant so far. I don't know if the front-controller is already written or if that is something that still has to be done by me.
I can't get the application to run.
Found the solution. I followed the guidelines installing sf2 in netbeans. Instead of running the application as a local website i used the build-in server option wich gave me access to the cli commands. There i could use the command run server and all of my problems were gone.
after I have installed a new LAMP Server I wanted to install cakephp3 on my server. So far everything works fine. I have generated the scaffold code explained in the beginner tutorial. After the code has been successfully generated I have noticed that the standard routing is not working, so I cannot call actions from controller, for example by typing http://adress/cakephp/Users/add. Instead of a error message occurs
"The requested URL /cakephp/Bookmarks was not found on this server."
This is irritating me, because I have also a MAMP Server on my MAC with a installed cakephp application and I didnt have errors like this. Thank you.
I tried installing laravel.
I installed xampp then the composer.
I followed the documentation but when i'm installing laravel, i always get this:
http://i975.photobucket.com/albums/ae238/Mochi_Ongpin/help_zpsb8870025.png
Can someone please help me? I already tried several times but failed.
Your Laravel is already installed, it timed out in the very last thing it does, which is create the compiled classes files bootstrap/compiled.php. If this file is present, delete it (it's not really necessary) and try to use your Laravel installtion.
Why is it timing out? Not sure, but you can, later, try to execute the command manually:
php artisan optimize
EDIT:
You successfully installed a Laravel application, but there is at least one other variable in this process: a web server. Without it you cannot see that success message.
Being on Windows you probably will have to install Apache 2 or WAMP, then create a Virtual Host for your Laravel application and hit: http://localhost/ to see that message.
You can also try to use Laravel's internal PHP server:
php artisan serve
And in your browser go to
http://localhost:8000