0
votes

I followed This tutorial for installing Laravel 5 on a shared cpanel hosting. Everything went smooth, but I get an error when I open my website:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.4.18 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at naxon.co.il Port 80

This is how my log file looks like:

[Sat Apr 09 00:36:06 2016] [error] [client *] SoftException in Application.cpp:256: File "/home/naxond/laravel/public/index.php" is writeable by group

[Sat Apr 09 00:36:06 2016] [error] [client *] Premature end of script headers: index.php

Any ideas?

3
Check the server's PHP version on the server! You also need to install php_mbstring.dll exstension, which can only be done by re-installing or upgrading. This can only be done by a sys-admin.Ashley Wrench
Unix path, but .dll extension. What the hell? Also, did you read the message at all before posting here?Mjh
@AshleyWrench triple lol. What about php_mbstring.dll... message it's very, very clear. SoftException in Application.cpp:256: File "/home/naxond/laravel/public/index.php" is writeable by groupabkrim
@abkrim he edited his question after I made that comment...perhaps you should look at the edit log.Ashley Wrench
response__> /home/naxond/laravel/public/index.php Your apache+PHP it's on mode SuPHP or fcgi, and your file are worng permission. Must be 644 or 640 or 440... chmod 640 /home/naxond/laravel/public/index.php...it's possible there're more file with same problemsabkrim

3 Answers

4
votes

Change the file permissions from '0664' to '0644'. It's complaining because that file (or folder) is writable by group and needs corrected to more secure permissions.

2
votes

Before upload your project, you must to be sure that the server match the following requirements:

  • PHP >= 5.5.9
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension

As you can see in your logs, all the erros are related with the server requirements:

  • Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_mbstring.dll' you don't have Mbstring PHP Extension installed.

  • Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll, you don't have OpenSSL PHP Extension

and so on.

You can check all the laravel requirements in their documentation.

Laravel 5 DOC

Anyway, you can try to install the libraries if you have full access to the server.

Regards!

1
votes

Change public/index.php file permissions from 0664 to 0644