0

I am developing a web application in Laravel 5. I created the project in a local machine at my workplace and it runs just fine. But when i run the machine in another windows machine, it gives me an error The localhost page isn’t working with HTTP ERROR 500 as a server internal error.

I have also tried to look at the laravel.log file and found an exception Call to undefined function site_url() but don't know how to fix this.

Any idea on how to work around this is much appreciated.

2
  • 1
    check server log file. Commented Jan 22, 2017 at 8:24
  • I am not sure of my answer, but do you have load your helper ? $this->load->helper('url'); Commented Jan 22, 2017 at 9:04

4 Answers 4

2

This error is coming because you forgot to start laravel service.

If you wish to run your project on http://localhost:8000 Try with the following command :

php arisan serve 

If you wish to choose specific port then try with the following command :

php artisan serve --port={port number} 

Happy Coding :)

Sign up to request clarification or add additional context in comments.

Comments

1

If you run local server by php artisan serve it will give url localhost:8000 by default and will run only in your machine to run in another machine of LAN you need to first find Local IP by ipconfig suppose you get this (192.168.2.10) then use this command.

 `php artisan serve --host 192.168.2.10` 

this will give url 192.168.2.10:8000 and can be access from any LAN connected machine.

3 Comments

I create the project in one of my local machines in xampp stack,and when i run it in another local machine in xampp,it gives me that error
Ok try to generate another key php artisan key:generate and clear view and cache. php artisan config:clear
I just tried your work around,the error is still there
1

In case none of this was working for you, there may be a more sinister explanation.

In our case, someone who shall go unnamed accidentally deleted the public/index.php file, and committed that to git! So taboo I didn't even think to look. This will stop ANYTHING in your site from running, including logging, but the server will go ahead, so there is nothing to go on, just a 500 error with no response or preview.

Again, seems ridiculous, but it was SO ridiculous who would even look for it?

1 Comment

Although this is more a comment it might be indeed a possibility for OP to explore. In this case OP should reply here let let others know if it worked or not because this cannot be tested by others than OP self.
0

please change your php version. you need to install php 7.2 version for laravel 5.6 version.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.