Have you installed all composer dependencies etc?
Error when hosting a Laravel site
im already have VPS server, when try to upload all my file, configuring anything inside it. and load the page, its just download the index.php ('without the extension of .php) how could this happen? all public of laravel its put inside the public_html, i see the server.php path folder is just public, do i need to change the server.php or anything? please fix it for me
Seems likely that PHP is not executing on the VPS. Make sure that PHP is installed, and your web server is configured to use it.
@squibby i guess not, how to installed it? i mean from localhost or in the vps server?because i use windows and the server it hold by my Lecture, he busy to talk
@tykus the VPS server already have php 7.0
Is the PHP module loaded on the web server? Does any PHP execute via web request?
whats that mean sir sorry? @tykus
Can you confirm that a PHP script will execute over a web request (even separately from Laravel)?
Make a temporary test file inside your public directory (public/test.php) and add some very basic php inside, e.g.
<?php
phpinfo();
Then hit that file directly http://domain.tld/test.php and see if the script executes.
the script isn't execute sir, it download the test.php. what happen ?:(
That tells me you are probably using Apache and it is not configured to use php and serve php pages.
yeah im using apache, how to serve the php sir? i dont have much knowledge about hosting
I think you're about to either
- Read lots on how to be an unix administrator (google things like the linux distro you are using, and php on apache / php on nginx if you end up going that way)
- Find someone with the knowledge to install the right things and set them up for you
- Use a service that does it all for you, like https://forge.laravel.com
The administrator is being held by muly lecture sir, i dont know how to deal with with this, in the php editor i already setup the eaphp7
use serverpilot.io it is free and they will setup your whole server with the best config
i just want to publish my site sir, not the server, this VPS is own by my College, this error dont make me mad but this is my first step to be a web developer
Not to be rude, but the first step to become a web developer should be to make sure you have the correct tools to work with and, if you don't have them, either get them or get someone to get them for you. All of us are developers here, but only some of us know a few bits and pieces on server management. Everybody else uses things like Homestead, Valet or Forge.
What you need is a working server. If your VPS was provided to you by your college or lecturer, go back to them and tell them your servet isn't set up properly. If your lecturer is 'too busy' to answer your question: Im sorry but what on earth are you doing there then? He gets paid to teach you. Answering questions is what he does, or at least should do.
So there you have it. The problems you run in to are none to be solved by us, they need to be resolved by the person who manages your server. And unless that person should be you as part of your tuition, you should direct your questions at them.
a little question sir, where the composer should be install?
On both, your server and local machine
Please or to participate in this conversation.