简体   繁体   English

在共享的cpanel托管上安装Laravel 5

[英]Installing Laravel 5 on shared cpanel hosting

I followed This tutorial for installing Laravel 5 on a shared cpanel hosting. 我按照教程在共享的cpanel托管上安装Laravel 5。 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 webmaster@naxon.co.il to inform them of the time this error occurred, and the actions you performed just before this error. 请通过webmaster@naxon.co.il与服务器管理员联系,以通知他们该错误发生的时间以及您在此错误发生之前执行的操作。

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. 此外,尝试使用ErrorDocument处理请求时遇到500内部服务器错误错误。 Apache/2.4.18 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at naxon.co.il Port 80 naxon.co.il端口80上的Apache / 2.4.18(Unix)OpenSSL / 1.0.1e-fips mod_bwlimited / 1.4服务器

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 [2016年4月9日00:36:06] [错误] [客户端*] Application.cpp:256中的SoftException:文件“ /home/naxond/laravel/public/index.php”可由组写入

[Sat Apr 09 00:36:06 2016] [error] [client *] Premature end of script headers: index.php [2016年4月9日星期六00:36:06] [错误] [客户端*]脚本头的结尾过早:index.php

Any ideas? 有任何想法吗?

Change the file permissions from ' 0664 ' to ' 0644 '. 将文件权限从“ 0664 ”更改为“ 0644 ”。 It's complaining because that file (or folder) is writable by group and needs corrected to more secure permissions. 抱怨是因为该文件(或文件夹)可以按组写入,并且需要更正以获取更安全的权限。

Before upload your project, you must to be sure that the server match the following requirements: 在上传项目之前,必须确保服务器符合以下要求:

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

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. 无法加载没有安装Mbstring PHP扩展的动态库'/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_mbstring.dll'。

  • 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 无法加载动态库'/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll,您没有OpenSSL PHP扩展名

and so on. 等等。

You can check all the laravel requirements in their documentation. 您可以在其文档中查看所有laravel要求。

Laravel 5 DOC Laravel 5文档

Anyway, you can try to install the libraries if you have full access to the server. 无论如何,如果您具有对服务器的完全访问权限,则可以尝试安装库。

Regards! 问候!

将public / index.php文件权限从0664更改为0644

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM