Laravel: The GET method is not supported for this route. Supported methods: HEAD.
error:
The GET method is not supported for this route. Supported methods: HEAD.
solution:
php artisan route:clear
error:
The GET method is not supported for this route. Supported methods: HEAD.
solution:
php artisan route:clear
Target class controller does not exist – Laravel 8
https://stackoverflow.com/questions/63807930/target-class-controller-does-not-exist-laravel-8
https://stackoverflow.com/questions/44839648/no-application-encryption-key-has-been-specified
php artisan key:generate
get Laravel version:
php artisan --version
file_put_contents(C:\…………\storage\framework/sessions/……..): failed to open stream: No such file or directory LINK
php artisan config:clear
php artisan cache:clear
Run this command:
composer install –ignore-platform-reqs
or
composer update –ignore-platform-reqs
Unable to set session.save_handler in my code
https://stackoverflow.com/questions/55785829/unable-to-set-session-save-handler-in-my-code
ini_set(‘session.save_handler’, ‘user’);
As I see in php.ini, the default value is “files”. I try to change the value to files, but it’s the same. Until PHP 7.1, everything works fine, but on PHP 7.2 and PHP 7.3, I have this problem. I really can’t understand why this function not working. It doesn’t return any error, just a blank page with code 200 (not 500 as server error).
Use session_set_save_handler () function will save the session to the MySQL database
https://titanwolf.org/Network/Articles/Article?AID=daf5234f-55bb-499f-8b51-c1ca969d85c8
Setting session_set_save_handler for one page only
https://stackoverflow.com/questions/39149806/setting-session-set-save-handler-for-one-page-only
session_set_save_handler
http://www.hackingwithphp.com/10/3/7/files-vs-databases
FileSessionHandler:
https://docs.w3cub.com/php/function.session-set-save-handler
As of PHP 5.4 you can revert to the default session handler by instantiating the SessionHandler class directly:
https://stackoverflow.com/questions/21376892/how-to-unset-session-save-handler
Add “GD Library with JPG support” extension on Docker
http://code.visitanyplace.com/add-gd-library-with-jpg-support-extension-on-docker/
Troubles with Docker + PHP7 + GD resulting in “Call to undefined function imagecreatefromjpeg()”:
https://stackoverflow.com/questions/47292221/troubles-with-docker-php7-gd-resulting-in-call-to-undefined-function-imagec
Under docker error Call to undefined function Intervention\Image\Gd\imagecreatefromjpeg:
https://laracasts.com/discuss/channels/general-discussion/under-docker-error-call-to-undefined-function-interventionimagegdimagecreatefromjpeg
refresh container with new extension (In dockerfile)
docker-compose up -d –build
–build Build images before starting containers.
-d, –detach Detached mode: Run containers in the background,
print new container names.
https://docs.docker.com/compose/reference/up/
How to remove docker images: https://linuxhint.com/removing_docker_images/
LIst image:
docker image ls
Remove image by id:
docker image rm 4bb46517cac3
FOR /F “tokens=*” %%G IN (‘DIR /B /AD /S *.git*’) DO RMDIR /S /Q “%%G”
Dockerfile
###########################################
FROM php:5.4-apache
RUN a2enmod rewrite
RUN docker-php-ext-install pdo pdo_mysql && docker-php-ext-enable pdo_mysql
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN apt-get update && apt-get upgrade -y
RUN echo “file_uploads = On\n” \
“memory_limit = 1000M\n” \
“upload_max_filesize = 1000M\n” \
“post_max_size = 1000M\n” \
“max_execution_time = 9000\n” \
> /usr/local/etc/php/conf.d/uploads.ini
CMD [“apachectl”, “-D”, “FOREGROUND”]
EXPOSE 80
###########################################
docker-compose.yml
###########################################
version: “3.8”
services:
web:
build:
context: .
dockerfile: Dockerfile
#image: “php:5.4-apache”
container_name: test_phpserver
restart: ‘always’
volumes:
– .:/var/www/html
ports:
– ’80:80′
###########################################
test.php
?php
echo “hello world”;
##############
Browser:
http://localhost/test.php