My old Project use Laravel 5.4.17 It can work in server normally.But new Project use Laravel 5.5.4 It can't work when route in root/public " mydomain.com/root/public is currently unable to handle this request.
HTTP ERROR 500". Is it a problem with the version of php? Because current php version is 5.6.23. Laravel 5.5 require php 7.0? Do you think I'm right?
I hope, You already do this.
You should change those public facing permissions to 644.
Change the Storage folder permission to 777.
Check the logs.
Make sure you configured nginx properly and then restart nginx.
Should you be sure the APP_KEY is in the .env file.
You should run php artisan config:clear after any changes to .env.
For Laravel 5.5 you need following server requirement
The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine, so it's highly recommended that you use Homestead as your local Laravel development environment.
However, if you are not using Homestead, you will need to make sure your server meets the following requirements:
PHP >= 7.0.0
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ref:
https://laravel.com/docs/5.5#server-requirements
I had the same issue on Laravel 8, turns out the problem arose from interrupting a composer update process.
If you are in the same situation, just run composer update, that should fix it.
I faced this problem too many times, the solution was to run #composer install and/or #composer update to update the composer dependencies packages, or you might even lost the .htaccess file during moving/copying the files in the live server
For Laravel 8 in docker, you might want to change the permission of your storage folder.
sudo chmod -R 777 storage
I use Manjaro Linux. I installed Apache, MySQL, Php, PhpMyAdmin separately (not using lampp)
this issue "localhost is currently unable to handle this request" appears because we have to enable display_error in the php configuration located at
/etc/php/php.ini
switch display error to on
display_errors = On
and
display_startup_errors = On
then restart apache server
sudo systemctl server restarting httpd
then information about the error will appear in your browser
Related
I am trying to make composer install in my Symfony 4 project with Sonata Admin Bundle. But still getting this error and it drives me mad. I can't find any information :/ do you have any adivces or answer?
Thank you :)
I assume you're using XAMP or similar on Windows OS because you have a C:/[..] path in the error message.
You need to enable the PHP gd extension (used for image processing) to get rid of the error.
Gd not installed
Search for your php.ini configuration file, look for "extension=gd2" and uncomment it.
The path for XAMP is <xampp_dir>/php/php.ini.
Eventually there are multiple php.ini files i.e. one for the PHP CLI and another one used by your webserver. Enable the extension in all of them.
Restart your webserver (likely apache) afterwards.
I am trying upload my laravel project to vps linux ubuntu 16.04 hosting.
I installed apache2, php7.2, mariadb-server. and also tested with apache2 by adding some index.php with phpinfo(); content everything working fine.
now I cloned my laravel project to /var/www/ folder and changed my laravel.conf and enabled it. but now when i open the ip addresss in browser i get this error mentioned in title. i tested by putting some echo statements in my index.php file the code is breaking at
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
and I dont get any network log to check if server is sending any error code also.
tried to search in internet for many solution and i tried everything but no result. so any one who used laravel in vps please advice how to go about.
Hi everyone thanks for viewing my question
What i did was?
I reinstalled ubuntu 16.04 in my vps so that every data was deleted.
And started with installing everything freshly this type i did not install php7.2 but i installed php only by default it installed php7.0 for me.
With this I installed laravel project from composer and it downloaded laravel 5.5 for me and when i changed .env-example to .env and run php artisan key:generate it started working for me. only i had to do chmod -R 777 /var/www/html/project/storage
Now I cloned my laravel project from github and did composer update but it said php7.1 is required as my laravel project was 5.6 version.
I again installed software-properties-common and add-apt-respository ppa:ondrej/php and php7.1 and composer update.
after installing packages I changed .env-example to .env and run key:generate and also i changed conf file and reload server with new conf enabled. But this time again same issue is arising as stated in the question.
Again I installed new laravel project with newly installed php7.1 and this time it downloaded laravel 5.6 key was generated automatically and i changed conf file and reload apache2. again the issue is same as stated in question.
Now i am deciding it could be some issue with php7.1 installation and laravel 5.6 project in ubuntu 16.04. and i have to downgrade myself to laravel 5.5 and then upload my project.
Laravel 5.6 demands php7.1 and it gives some cypher related error with php7.0 this i remember and presenting it for your info.
Please check whether Laravel index.php is inside the public folder & please check your apache vhost is configured properly.
I have a system build with Laravel 5.5 and it needs PHP version 7.
I have deployed the project to site ground server, updated PHP version using PHP version but when I ran php -v command via putty it is showing me PHP version 5. I don't know what going on.
I shall be thankful if someone tell me that what is the proper way of updating PHP version?
I have also tried AddHandler application/x-httpd-php70s .php in my .htaccess files but got nothing fruitful
You can change the PHP CLI version through SSH. After connecting through SSH type cd ~ and then find .bash_profile file. Open the .bash_profile file with nano or vi which you would like to use and enter this line:
alias php=/usr/local/php72/bin/php-cli
and save the file. After that run command:
source .bash_profile
And your PHP CLI version has been changed. To confirm the PHP version type php -v and it will show you the version which you just changed.
P.S: In my case, I want to change the PHP CLI version to PHP 7.2 so I use php72 in alias php=/usr/local/php72/bin/php-cli. You can change it to any other version which you need.
So there's no problem if you see PHP5 using command line and PHP7 using php file with phpinfo();. Your hosting provider allows you to choose from several PHP version. You can select PHP7 e.g. using .htaccess but it doesn't have to change PHP CLI version. So when you set PHP7 in .htaccess file it serves your website using PHP7, but CLI is still v5.
By the way, this type of question should be asked on superuser I think.
I'm beginer with Symfony2 Framework and php. I have started doing a SF2 tutorial and i stopped on setting up the project. I can't install Composer from SF official page on Windows 8, when i choose a php.exe from my php file and click install, then i see following error:
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
I'm working with WebServ 2.1. I have added to php.ini DEVELOPMENT following code
extension_dir = C:\WebServ\php\ext
extension=php_openssl.dll
C:\WebServ\php\ext is a path to folder with extension files and it contain php_openssl.dll.
It still doesn't work. Do anybody knows how to fix it?
Print phpinfo() and make sure SSL is present there.
Don't forget to restart the webserver after editing php.ini
I have a problem with instaling composer for laravel framework:
I have this error:
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
I try everything I find on net - change php.ini, instal via CMD but nothing work...
I really dont understand what can be a problem here. Please help.
Here is a image of what I try:
You have the wrong PHP Version.
Personally, I wouldn't bother to fix it. Use Homestead to create a virtual ubuntu instance. Everything will be up and running in minutes