Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ryank30's avatar

Connection was reset

Hi,

I have downloaded the laravel and installed it using composer. I loaded it on my local machine using xampp. It worked fine. I uploaded the files to my server. I can only see the index page where you see "Laravel 5". When I accessed "/auth/login", the browser showed me the message below:

"The connection was reset The connection to the server was reset while the page was loading. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web."

I have researched about this on google. Some people said that I will have to turn off XCache. Some people said turn off "opcache" by putting some lines of codes in .htaccess

Could you help me resolve this issue? My guess is that it's because my server is a shared hosting. Do you think it's true?

Thanks in advance

0 likes
11 replies
bashy's avatar

Depends on your hosting but normally if it's shared, it's in a log folder or just in the root of FTP/file manager.

Check PHP and web server logs (apache/nginx etc)

ryank30's avatar

@bashy Some poeple say that I will have to put the lines of code in .htaccess like below:

"php_flag xcache.cacher Off php_flag xcache.size 0 php_flag xcache.stat Off"

But I don't know where to put it. In the .htaccess I have codes below:

" Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

"

I put the lines of code at the very first before the tag "" starts. It gives me an error. Could you help me where to put them?

Thanks.

bashy's avatar

Just put those at the very top, before anything.

Not sure if those are the reason but worth a try.

ryank30's avatar

@bashy I get Internal server error as soon as I put them at the very top. Please see my code below:

php_flag xcache.cacher Off php_flag xcache.size 0 php_flag xcache.stat Off Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

bashy's avatar

Format your htaccess content on the forums properly, can't see the syntax of the top part.

ryank30's avatar

This forum text editor automatically cuts off my codes even though I pasted it correctly. Anyway, I just put those lines of codes at the very top and test it on my local machine. It worked fine. I think it's something to do with the server I am using. I should try again after upgrading it to a VPS.

Thanks for your help @bashy

bashy's avatar

Yeah you just have to use 3x ` or ~ at the start and end of your code. Could well be the setup of PHP, most likely.

ryank30's avatar

What's 3x ` or ~? If you don't mind, could you show me the code that I can use in the .htaccess then?

Thanks

McK's avatar

Hi,

I had similar problem with dashboard access and it was due to incorrect blade comments in my views, {-- --} especially on multiple lines and while wrapping HTML blocks can trigger sometimes this problem, I was using MAPPRO with PHP 5.5.9 and after removing them all seems to work ok again

Hope this helps someone

also mentioned here: https://github.com/laravel/framework/issues/7905

Please or to participate in this conversation.