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

igorfelcam's avatar

Problems with hosting the site.

Hi!

I'm trying to host my site developed in Laravel 5.3, however I'm having problems. When accessing the site returns the error "ErrorException in Filesystem.php line 111: File_put_contents (/home/u702431365/public_html/storage/framework/views/9c48bc448abc36f38999ed4f119ff7b244f96034.php): failed to open stream: Disk quota exceeded. "

I've already tried to give 777 permission to the directory.

I can not identify the source of the problem. can you help me?

PHP: 7 Laravel: 5.3 Apache: 2.4

0 likes
8 replies
jlrdw's avatar

Try 755 for permissions

1 like
goatshark's avatar

@IGORFELCAM What OS are you using? What output do you get from the quota (or quota -v) command? You might have quotaon and quotaoff commands available to you depending on OS and installed packages.

Also, I'm glad to see @jlrdw suggesting 755 for permissions. I see a ton (a ton, a ton) of people just throwing 777 at anything that squeaks about permissions. Generically speaking, there should very rarely be an actual need for 777 on anything, anywhere.

1 like
Snapey's avatar

for a start, DO NOT JUST UPLOAD YOUR WHOLE SITE TO public_html

Yes, I am shouting because your site will be hijacked before you get up for breakfast.

you should upload your site to /home/u702431365/ and then copy your public folder into public_html

next, make sure that /home/u702431365/storage is writeable.

If your host does not allow you to set it up this way switch hosts immediately.

1 like
igorfelcam's avatar

@Jlrdw, I checked with 755 and got the same return.

@Goatshark, The hosting server is Linux and none of the commands worked.

@Snapey, I've corrected how to put the files on the server, thanks for the tip, the site is in /home/u702431365/ and the public folder is in public_html.

My files .htaccess They are like:

/home/u702431365/.htaccess:

RewriteEngine On

RewriteCond %{REQUEST_URI} !^public RewriteRule ^(.*)$ public/$1 [L]

======================================================= /home/u702431365/public_html/public/.htaccess:

Options -MultiViews

RewriteEngine On

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

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

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Now appear the message: "ErrorException in Filesystem.php line 111: file_put_contents(/home/u702431365/storage/framework/views/aeab52eab09d59c6873f3a8ee4cd17e7d124efde.php): failed to open stream: Disk quota exceeded"

Snapey's avatar

Put the contents of your public folder in public_html ... not the public folder itself.

.htaccess should be in public_html also (as it was in public)

So the only difference from your local development is that public is renamed public_html

So it seems you still have problems writing to the storage folder. Again, check the permissions.

igorfelcam's avatar

@Snapey, Thanks for the help, just added something else in the error message. I'm going to review my permissions and return here.

ErrorException in Filesystem.php line 111: file_put_contents(/home/u702431365/storage/framework/views/2e47fcac19c440deb4adad3947592166395144f8.php): failed to open stream: Disk quota exceeded (View: /home/u702431365/resources/views/master-page.blade.php)

Snapey's avatar

How much space does your hosting provide give you?

Anything written to Laravel log file?

Does the file mentioned actually exist in the storage/views folder? (This is where Laravel caches the files after being through Blade)

On your master-page is there anything that could be looping over and over?

igorfelcam's avatar

Not ... Correct all disagreements apparently, but my server provides space for 20000 files and exceeded this limit. I've already contacted the server to free up more space. I think it's just that now. I post again here to get a response from the server. Thank you very much.

Please or to participate in this conversation.