LunarPages空间500错误原因及解决办法

BlueHost优惠码 Hostinger主机优惠RAKsmart美国服务器活动

我们在使用LunarPages空间时,有时在安装程序时可能经常出现500错误这一般是由于服务器内部出现的错误引起的,那么导致500错误原因有哪些呢?又该如何解决呢?下面来说说500错误常见原因及解决办法?
1、上传的文件权限设置不正确,如某些文件夹或文件权限是777或666,如果是这种情况,可能需要更改它们属性为755或644。我们可以通过控制面板中的文件管理器或者使用FTP客户端软件进行权限设置。
2、查看.htaccess文件参数设置是否正确,在.htaccess文件中不能包含php_values和php_flags,否则会出现500错误,需要移动到php.ini文件中,最后在.htaccess文件中添加”suPHP_ConfigPath/home/username/public_html”语句。
3、数据库参数是否正确,如果使用Access数据库,可以查看连接路径以及ODBC驱动程序有没有设置正确,如果使用MYSQL数据库,查看数据库是否正确连接,当然可以借助web.config文件显示详细错误信息。
4、程序自身错误,出现500错误,有可能是程序自身编写错误,因此我们必须对程序进行检查,确保程序代码完整性和正确性。
5、其它未知错误,如果按照上述方法设置后,仍然不能解决出现的问题,可以查看错误日志上出现的具体错误或者联系官方客服检查。
以下是LunarPages官方关于500错误的回复内容:
Hello!
At Lunarpages, our servers are setup to use suPHP to parse php pages as CGI instead of an Apache module. If you are running a PHP-based script on your site and are receiving a 500 and/or 404 errors on your pages, it is likely you have one or more of the following occurring:
1. The permissions on some of the folders or files are 777 or 666. If this is the case, change them to either 755 or 644 in Cpanel’s File Manager (or using your local FTP client).
2. The files and/or folders are not owned by you. Certain applications having been run under php as an apache module may have files owned by the apache user of nobody. An indication that you don’t own the files would be if you are unable to change their file permissions. To correct this, please provide your username or domain name, and provide the location of the folder or files that need to have your ownership.
3. Your .htaccess file has php_values or php_flags in it. This causes a 500 Internal server error when attempting to execute the script. The php_values and php_flags will need to be removed from your .htaccess file (please make a backup of the .htaccess by copying its contents and saving it on your desktop as htaccess.txt). Take the contents removed from .htaccess and place it into a file you create called php.ini. Remember to remove the php_flag and php_value part before the directives as php.ini files do not require those in front of the values. You can always make the changes and ask us if the changed files are correct. Because php.ini values are not shared across directories, you would need a separate php.ini file in each folder that has .htaccess or that requires the php_values or php_flags. In order to avoid doing this, you can place a line in the .htaccess file in your public_html folder to have all values in your public_html php.ini to be shared across all folder. This line would be the following: suPHP_ConfigPath /home/username/public_html.
Please let us know if you have any questions or require further assistance. Daniel McCall Lunarpages Support support@lunarpages.com.
以上就是Lunarpages空间常见500错误原因及解决办法,仅供广大新站长朋友参考,更多知识,可以访问美国主机侦探进行交流学习。

(本文由美国主机侦探原创,转载请注明!)

微信扫码加好友进群

主机优惠码及时掌握

QQ群号:164393063

主机优惠发布与交流

温馨提示:

1、本站部分图片来源于互联网,如有侵权请联系删除。QQ:800013301

2、本文评论没有专人回复,如果您有问题请到美国主机侦探论坛提问!

3、美国主机侦探免费为您提供美国主机购买咨询。

返回顶部