2017-02-17 125 views
1

在我的服務器上安裝最新的Prestashop時遇到同樣的問題。因此,作爲@Agnes湯姆建議,我改變了define.inc.php文件,這是顯示了錯誤it's:服務器上的Prestashop安裝提供內部服務器錯誤500

Warning: session_start(): open(/var/php_sessions/sess_b3c24487f16e9dcc7ebe9b0897bee69f, O_RDWR) failed: No such file or directory (2) 
in /hermes/bosnaweb14a/b1900/ipw.danarostocom/public_html/zumashoes/install/classes/session.php on line 47 Notice: Use of undefined constant _NEW_COOKIE_KEY_ - assumed '_NEW_COOKIE_KEY_' 
in /hermes/bosnaweb14a/b1900/ipw.danarostocom/public_html/zumashoes/classes/Cookie.php on line 79 Fatal error: Uncaught exception 'Defuse\Crypto\Exception\BadFormatException' with message 'Encoding::hexToBin() input is not a hex string.' 
in /hermes/bosnaweb14a/b1900/ipw.danarostocom/public_html/zumashoes/vendor/defuse/php-encryption/src/Encoding.php:65 Stack trace: 
#0 /hermes/bosnaweb14a/b1900/ipw.danarostocom/public_html/zumashoes/vendor/defuse/php-encryption/src/Encoding.php(164): Defuse\Crypto\Encoding::hexToBin('_NEW_COOKIE_KEY...') 
#1 /hermes/bosnaweb14a/b1900/ipw.danarostocom/public_html/zumashoes/vendor/defuse/php-encryption/src/Key.php(38): Defuse\Crypto\Encoding::loadBytesFromChecksummedAsciiSafeString('\xDE\xF0\x00\x00', '_NEW_COOKIE_KEY...') 
#2 /hermes/bosnaweb14a/b1900/ipw.danarostocom/public_html/zumashoes/classes/PhpEncryptionEngine.php(112): Defuse\Crypto\Key::loadFromAsciiSafeString('_NEW_COOKIE_KEY...') 
#3 /hermes/bosnaweb14a/b1900/ipw.danarostocom/public_html/zumashoes/classes/PhpEncryptionEngine.php(46): PhpEncryptionEngineCore::loadFromAsciiSafeString('_NEW_COOKIE_KEY...') 
#4 /hermes/bosnaweb14a/b1 in /hermes/bosnaweb14a/b1900/ipw.danarostocom/public_html/zumashoes/vendor/defuse/php-encryption/src/Encoding.php on line 65 
Warning: Unknown: open(/var/php_sessions/sess_b3c24487f16e9dcc7ebe9b0897bee69f, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 
Warning: Unknown: Failed to write session data (files). 
Please verify that the current setting of session.save_path is correct (/var/php_sessions) in Unknown on line 0 

也許有人幫助我知道如何解決這個錯誤?

謝謝您的時間

回答

0

它拋出一個錯誤,它無法找到或寫入「在/ var/php_sessions /」 你有完全訪問服務器? 如果是這樣,則檢查該文件夾存在,如果用戶或Web服務器具有寫權限,或改變在php.ini

session.save_path = "/var/php_sessions" 

喜歡的東西:

session.save_path = "/home/user/sessions" 

再次,必須是一個對用戶或Web服務器具有讀/寫權限的現有文件夾(這取決於您是以自己的用戶身份還是以帳戶用戶身份運行Web服務器)。

如果這是一個共享的對話框,您最好聯繫您的託管服務提供商。有些允許你在你的主機根目錄下有一個php.ini,你可以用它來改變session.save_path,其他人忽略它。

+0

謝謝@sadlyblue,我與您的反饋聯繫到託管管理員,他們修復了一切。所以現在它工作正常。 – estorde

0
How to recognize the Error 500 

First, we need to go over the different ways you might see this error message on your computer. There are different forms of this message because each host/server is allowed to customize the way it’s displayed. Here are some common ways you might see this error. 

「500 Internal Server Error」 
「HTTP 500 – Internal Server Error」 
「Internal Server Error」 
「HTTP 500 Internal Error」 
「500 Error」 
「HTTP Error 500″ 
Most times you will see this message accompanied by various forms of this classic ambiguous line 
「The server encountered an unexpected condition that prevented it from fulfilling the request by the client」 

It’s important to note that this error can be shown on any browser and any operating system (sorry, but switching to the new Mac Pro will not solve this problem) Here is a screenshot of one of the ways this error might be displayed on your browser. 

Internal error server 

What is the 500 Error? 

Put simply, the 500 error is the Web servers way of saying 「Something went wrong but I can’t tell you what, sorry.」 This is what we call a 「server-side」 error. That means that there is something wrong with the server who is hosting the website. It is an extremely general error usually caused by configuration issues with the websites programming, PHP or system permissions. 

How Can I Troubleshoot? 

Don’t fret; although this error message is absurdly vague, you still have ways to find more information. Web servers are almost always configured to hide specific error messages. If your PrestaShop store is suffering from this debilitating error, you can turn on PrestaShop’s Error Reporting from FTP or your hosting’s CPanel to get more details. 

There are two ways to turn on Error Reporting in PrestaShop depending on what version you have. 

For PrestaShop v1.4 through v1.5.2 

Open config/config.inc.php 
On or around line 29 you will find this line 
@ini_set('display_errors', 'off'); 
Change that line to read 
@ini_set('display_errors', 'on'); 
For PrestaShop v1.5.3+ 

Open config/defines.inc.php 
On or around line 28 you will find this line 
define('_PS_MODE_DEV_', false); 
Change that line to read 
define('_PS_MODE_DEV_', true); 
Once you enable error reporting through your FTP or CPanel, you can navigate back to your PrestaShop’s front or back office and reproduce the error or issue you are having. For example, if you are not able to access your website because of the 500 error, you will need to turn on error reporting and refresh the page(s) that had the error. There will be additional information that you can use to investigate the problem. 

Investigating the Error 

Once you have the additional information, there are some standard ways to further investigate the error. First, let’s go over some the most common ways this problem is caused. Once we find the cause of this error, it is much easier to solve. 

Permissions: Many times you will find that the permission setting on one of your folders is set incorrectly. It could be a simple fix as switching a file/folder permission from 777 to 755 or vice versa. In most cases permission sets of 777 are extremely unsafe and can allow even an amateur hacker to access your files and put malicious code in it. Make sure to check with your hosting provider for specific information about permissions set as some servers have different regulations. 

Incorrectly configured .htaccess: Oftentimes you will receive an internal server error when the htaccess file is configured incorrectly. For PrestaShop purposes, the main culprits of the htaccess errors are 「URL Rewrite」 settings or Friendly URL enabling. The htaccess syntax is very strict so even one wrong character or command will cause the server to return an Internal Error 500. Make a backup of your htaccess and regenerate the htaccess file either through the back office or by toggling the Enable Friendly URL option. 

Server timeout: Every server has their own timeout setting, which sets the time that any given script can run. If the function or script crosses that limit, you will receive an error 500. The most common scripts in PrestaShop that can take too long to load are CSV Imports, backups, translation loading, import/exports and thumbnail regeneration. Many times the server limit is 30 seconds, which is not long enough to run these scripts. You should contact your hosting provider and inquire about changing the limit, at least temporarily. 

Now, if the problem is not solved by investigating these common causes, you should also take a look at the Apache and PHP Error logs. These are provided by your hosting provider but sometimes you will need to contact them directly in order to have access to these log files. 
+0

謝謝@amit 1984關於500錯誤的詳細解釋。 – estorde

+0

它幫助然後爲我添加UP RATE,謝謝 –