2017-02-17 67 views
1

Такая же проблема при установке последней версии Prestashop на моем сервере. Так, как рекомендовал @Agnes Том, я изменил файл define.inc.php и это подмигнули ошибки показывая вверх:Установка 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

Это бросает ошибку, говоря, что не может найти или написать «/ вар/php_sessions /» У вас есть полный доступ к серверу? Если да, то проверьте, что папка существует, и если пользователь или веб-сервер имеет права на запись в него, или изменения в php.ini

session.save_path = "/var/php_sessions" 

Чтобы что-то вроде:

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

Снова, должен быть существующей папкой с разрешениями на чтение/запись для пользователя или веб-сервера (это зависит, если вы запустите веб-сервер как собственный пользователь или пользователь учетной записи).

Если это общий ресурс, вы можете связаться с вашим провайдером хостинга. Некоторые из них позволяют вам иметь 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 для меня, спасибо –