I have made an application using Laravel 4.2 . It works well on Wamp, But when I uploaded it onto a shared host, it only displayed a blank page. I followed all the advice given in the following links but it still isn't working.
Uploading Laravel Project onto Web Server
Avoid public folder of laravel and open directly the root in web server
I just realized that laravel 4.2 requires php 5.4 or greater, but my host uses php 5.3.28. Can this be the cause of the problem? if not, then what is the reason I get only blank page?
Yes - using Laravel without the required version of PHP will absolutely give you problems. You'll have to either upgrade your webserver or ask your host if it is possible for them to upgrade or enable a newer version of PHP for you.
Regrettably, when theres an error in PHP code there's only a blank page.
Try putting this in there
error_reporting(E_ALL);
Give permissions to storage folder. chmod -R 0777 app/storage
run command
php artisan key:generate
problem solved in my case
Related
I'm a bit fresh to Laravel. I installed it via composer in the xampp/htdocs file. I installed the latest version 5.6.
The install works with no errors, and the file structure is as it should be.
When I run the php artisan serve command from inside the folder, it deletes the server.php file and therefore outputs the error:
This site can’t be reached.
localhost refused to connect.
So I thought why not just add a new file inside and it will work... Well, trying to add new file shows that I do not have permissions to add files to this folder.
I tried a new install a few times, but the situation is always the same.
Has anybody else encountered this problem?
So I realised it was some kind of server problem... well, removed the antivirus, chanhed my firewall settings and everithing works as it should.
My advice to avoid this in the future is to start creating Laravel applications in a folder inside of your My Documents folder in Windows or using /home/{your-username}/projects directory in Unix environments.
What likely happened is xampp has certain permissions that don't play nice with what you need in Laravel.
I have a whole project with database, everything is working here.
Project with database
I would like to run website so I can see changes I have made.
Im using XAMPP. My configs for VirtualHost hosts and http-vghosts.conf
I have tried this https://youtu.be/iXYCnYRalaw?t=2m13s ->> from [2:13] to [4:22]
using XAMPP, but still cant run it.
Can you give me any advice or steps how to make website run on my PC? [ofcourse just for me (VirtualHost)].
Editor using: Atom
My PC spec
If running laravel appliation inside XAMPP htdocs folder is really necessary, then could you provide some kind of error, simply telling "it doesn't work" doesn't help at all.
One thing you can try is to open command prompt inside laravel folder and run
php artisan serve
This will open local server that runs current project in:
http://127.0.0.1:8000
Also, checking laravel minimum requirements is something you should check out. 5.5 requires PHP 7 and you didnt tell what XAMPP version you are running.
I am pretty new in Laravel and I am finding the following problem.
I have put my application in this folder:
C:\xampp\htdocs\HotelRegistration\
Starting it via the statment:
php artisan serve
it is correctly started here: http://127.0.0.1:8000
For some reason I need to run it with XAMPP Apache server instead the one provided by php artisan serve
So I started Apache from XAMPP but trying to open:
http://127.0.0.1:80/HotelRegistration/
but so the application can't start and I obtain the list of directory and file contained in this folder.
Why? What is wrong? What am I missing? Maybe something related to virtual host? How can I fix this issue?
Tnx
php artisan serve creates a web server that shows the public folder of your app.
As a good practice, you should setup your hosting to show that public folder while hidding the rest of the program from unwanted visitors.
Check this links about it:
https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e
https://deployer.org/blog/how-to-deploy-laravel
For development, that isn't too much of a trouble.
You can use the below to run your application. But it can fail to load the basic css file.
http://localhost/HotelRegistration/public/
Hope its help you.
Solved by myself,
I create a virtual host in Apache and using this URL works
I'm developing a laravel 5.1 application which is working absolutely fine on my localhost. But when I deploy it to GoDaddy's shared hosting, it gives a blank white page on opening the domain.
I have followed this tutorial to upload to the server.
http://www.nickmarriotti.com/blog/deploying-laravel-5-project-to-godaddy
How can I resolve this error problem? Any help will be appreciated.
Thanks
Kindly check the file permissions. Generally this issue comes when file permissions are not as it should be. Better call the GoDaddy customer care and they will run a quick check and will tell you if there is any problem with file permissions.
Also, GoDaddy Server, I mean CPanel by default supports a lower PHP Version. Where as New versions of laravel requires PHP >= 5.5.9. Kindly tell GoDaddy guys to upgrade your Server PHP version.
Follow these two steps and you should be fine.
This is one of the most common installation errors caused by invalid permissions. Please login via ssh to your server and run this command to fix it.
chmod -R 777 LARAVEL/storage
Here LARAVEL is the path to your laravel installation in Laravel 5.*, while as for Laravel 4.*, LARAVEL will be path/to/laravel/app, as storage resides inside app directory in Laravel 4.* installations.
I installed Symfony2 on Windows 8.1. The files are stored under IIS in wwwroot.
Everything runs very well when I use the internal built-in PHP server. I can access the site through localhost:8000/app_dev.php.
When I try to access the site straight through localhost (localhost/test_project/web/app.php), I can get to the site, but it doesn't update with my changes even after I close the browser and completely reload the site. I have the same problem on the internal PHP server when I try localhost:8000/app.php - my changes aren't there.
Questions:
1. Why are my app and app_dev showing different content?
2. How can I set up Symfony to run on IIS and not need the internal server?
Because app.php uses cached files and you need to clear framework cache to see your changes. It is production version of your web.
php app/console cache:clear --env=prod --no-debug
localhost/test_project/web/app_dev.php
Please look at official Symfony documentation for explanation.