Jump to content

ERREUR 500 après avoir rempli le bloc de personnalisation


Recommended Posts

Bonjour,

sur la page de cet article : https://www.ronin-sports.com/personnalisation-broderies-marquages-a-facon/218-broderie-sur-ceinture.html

quand je suis un simple visiteur et que je souhaite enregistrer mon inscription (tout en bas de la page ....) j'ai le message d'erreur 500

Par contre j'ai refais la même chose en étant un client et cela fonctionne normalement.

 

Comment résoudre ce problème ?

 

Merci

Link to comment
Share on other sites

Bonsoir,

merci pour votre retour, le mode debug n'a rien changé

sur le fichier error.log

j'ai ça mais je n'y comprends rien :((

[Tue Nov 30 13:42:05 2021] [-:notice] [pid 301] mod_bw : Version 0.92 - Initialized [0 Confs]
[Tue Nov 30 13:42:05 2021] [mpm_worker:notice] [pid 301] AH00292: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Nov 30 13:42:05 2021] [core:notice] [pid 301] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 30 13:42:05 2021] [mpm_worker:warn] [pid 301] AH00291: long lost child came home! (pid 934)
[Tue Nov 30 13:47:08 2021] [mpm_worker:notice] [pid 301] AH00297: SIGUSR1 received.  Doing graceful restart
[Tue Nov 30 13:47:09 2021] [-:notice] [pid 301] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Tue Nov 30 13:47:09 2021] [-:notice] [pid 301] mod_bw : Version 0.92 - Initialized [0 Confs]
[Tue Nov 30 13:47:09 2021] [mpm_worker:notice] [pid 301] AH00292: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Nov 30 13:47:09 2021] [core:notice] [pid 301] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 30 13:47:09 2021] [mpm_worker:warn] [pid 301] AH00291: long lost child came home! (pid 1187)
[Tue Nov 30 13:53:07 2021] [mpm_worker:notice] [pid 301] AH00297: SIGUSR1 received.  Doing graceful restart
[Tue Nov 30 13:53:08 2021] [-:notice] [pid 301] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Tue Nov 30 13:53:08 2021] [-:notice] [pid 301] mod_bw : Version 0.92 - Initialized [0 Confs]
[Tue Nov 30 13:53:08 2021] [mpm_worker:notice] [pid 301] AH00292: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Nov 30 13:53:08 2021] [core:notice] [pid 301] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 30 13:53:08 2021] [mpm_worker:warn] [pid 301] AH00291: long lost child came home! (pid 1474)
[Tue Nov 30 13:55:05 2021] [mpm_worker:notice] [pid 301] AH00297: SIGUSR1 received.  Doing graceful restart
[Tue Nov 30 13:55:06 2021] [-:notice] [pid 301] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Tue Nov 30 13:55:06 2021] [-:notice] [pid 301] mod_bw : Version 0.92 - Initialized [0 Confs]
[Tue Nov 30 13:55:06 2021] [mpm_worker:notice] [pid 301] AH00292: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Nov 30 13:55:06 2021] [core:notice] [pid 301] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 30 13:55:06 2021] [mpm_worker:warn] [pid 301] AH00291: long lost child came home! (pid 1704)
[Tue Nov 30 14:00:07 2021] [mpm_worker:notice] [pid 301] AH00297: SIGUSR1 received.  Doing graceful restart
[Tue Nov 30 14:00:08 2021] [-:notice] [pid 301] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Tue Nov 30 14:00:08 2021] [-:notice] [pid 301] mod_bw : Version 0.92 - Initialized [0 Confs]
[Tue Nov 30 14:00:08 2021] [mpm_worker:notice] [pid 301] AH00292: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Nov 30 14:00:08 2021] [core:notice] [pid 301] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 30 14:00:08 2021] [mpm_worker:warn] [pid 301] AH00291: long lost child came home! (pid 1864)
[Tue Nov 30 16:01:07 2021] [mpm_worker:notice] [pid 301] AH00297: SIGUSR1 received.  Doing graceful restart
[Tue Nov 30 16:01:08 2021] [-:notice] [pid 301] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Tue Nov 30 16:01:08 2021] [-:notice] [pid 301] mod_bw : Version 0.92 - Initialized [0 Confs]
[Tue Nov 30 16:01:08 2021] [mpm_worker:notice] [pid 301] AH00292: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Nov 30 16:01:08 2021] [core:notice] [pid 301] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 30 16:01:08 2021] [mpm_worker:warn] [pid 301] AH00291: long lost child came home! (pid 2088)
[Tue Nov 30 16:43:15 2021] [mpm_worker:notice] [pid 301] AH00297: SIGUSR1 received.  Doing graceful restart
[Tue Nov 30 16:43:16 2021] [-:notice] [pid 301] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Tue Nov 30 16:43:16 2021] [-:notice] [pid 301] mod_bw : Version 0.92 - Initialized [0 Confs]
[Tue Nov 30 16:43:16 2021] [mpm_worker:notice] [pid 301] AH00292: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Nov 30 16:43:16 2021] [core:notice] [pid 301] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 30 16:43:16 2021] [mpm_worker:warn] [pid 301] AH00291: long lost child came home! (pid 7359)
[Tue Nov 30 18:01:43 2021] [mpm_worker:error] [pid 301] AH00287: server is within MinSpareThreads of MaxRequestWorkers, consider raising the MaxRequestWorkers setting
[Tue Nov 30 18:02:05 2021] [mpm_worker:notice] [pid 301] AH00297: SIGUSR1 received.  Doing graceful restart
[Tue Nov 30 18:02:05 2021] [-:notice] [pid 301] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)
[Tue Nov 30 18:02:05 2021] [-:notice] [pid 301] mod_bw : Version 0.92 - Initialized [0 Confs]
[Tue Nov 30 18:02:05 2021] [mpm_worker:notice] [pid 301] AH00292: Apache/2.4.38 (Debian) OpenSSL/1.1.1d mod_fcgid/2.3.9 configured -- resuming normal operations
[Tue Nov 30 18:02:05 2021] [core:notice] [pid 301] AH00094: Command line: '/usr/sbin/apache2'
[Tue Nov 30 18:02:05 2021] [mpm_worker:warn] [pid 301] AH00291: long lost child came home! (pid 9180)

 

Link to comment
Share on other sites

j'ai trouvé ceci dans le mode debug

Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /home/www/ronin-sports.com/classes/Rijndael.php on line 124
Warning: Cannot modify header information - headers already sent by (output started at /home/www/ronin-sports.com/Adapter/Adapter_EntityMapper.php:84) in /home/www/ronin-sports.com/classes/controller/FrontController.php on line 1000

Warning: Cannot modify header information - headers already sent by (output started at /home/www/ronin-sports.com/Adapter/Adapter_EntityMapper.php:84) in /home/www/ronin-sports.com/classes/controller/FrontController.php on line 1001

Warning: count(): Parameter must be an array or an object that implements Countable in /home/www/ronin-sports.com/controllers/front/ProductController.php on line 254

Warning: count(): Parameter must be an array or an object that implements Countable in /home/www/ronin-sports.com/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code on line 30

Link to comment
Share on other sites

Hum... alors 1.6.1.24 vous ne devriez pas avoir l'erreur.

Redescendez en PHP 7.1 MAXIMUM

Pour Rijndael key, allez là: https://shop.devcustom.net/gen.php

Et vérifiez que votre fichier /classes/Rijndael.php est bien identique à celui-ci:

<?php
/*
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2018 PrestaShop SA
*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*/

class RijndaelCore
{
    protected $_key;
    protected $_iv;

    public function __construct($key, $iv)
    {
        $this->_key = $key;
        $this->_iv = base64_decode($iv);
    }

    /**
     * Base64 is not required, but it is be more compact than urlencode
     *
     * @param string $plaintext
     * @return bool|string
     */
    public function encrypt($plaintext)
    {
        if (strlen($plaintext) >= 1048576) {
            return false;
        }

        $cipherText = null;
        if (function_exists('openssl_encrypt') && version_compare(phpversion(), '5.3.3', '>=')) {
            $cipherText = openssl_encrypt($plaintext, 'AES-128-CBC', $this->_key, OPENSSL_RAW_DATA, $this->_iv);
        } elseif (function_exists('mcrypt_encrypt')) {
            $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
            $iv = mcrypt_create_iv($ivSize, MCRYPT_RAND);
            $blockSize = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
            $pad = $blockSize - (strlen($plaintext) % $blockSize);

            $cipherText = mcrypt_encrypt(
                MCRYPT_RIJNDAEL_128,
                $this->_key,
                $plaintext . str_repeat(chr($pad), $pad),
                MCRYPT_MODE_CBC,
                $iv
            );
            $cipherText = $iv.$cipherText;
        } else {
            throw new RuntimeException('Either Mcrypt or OpenSSL extension is required to run Prestashop');
        }

        return $this->generateHmac($cipherText) . ':' . base64_encode($cipherText);
    }

    public function decrypt($cipherText)
    {
        $data = explode(':', $cipherText);
        if (count($data) != 2) {
            return false;
        }

        list($hmac, $encrypted) = $data;

        $encrypted = base64_decode($encrypted);
        $newHmac = $this->generateHmac($encrypted);
        if ($hmac !== $newHmac) {
            return false;
        }

        $output = null;
        if (function_exists('openssl_decrypt') && version_compare(phpversion(), '5.3.3', '>=')) {
            $output = openssl_decrypt($encrypted, 'AES-128-CBC', $this->_key, OPENSSL_RAW_DATA, $this->_iv);
        } elseif (function_exists('mcrypt_decrypt')) {
            $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
            $ivDec = substr($encrypted, 0, $ivSize);
            $encrypted = substr($encrypted, $ivSize);
            $output = mcrypt_decrypt(
                MCRYPT_RIJNDAEL_128,
                $this->_key,
                $encrypted,
                MCRYPT_MODE_CBC,
                $ivDec
            );
            $pad = ord($output[strlen($output) - 1]);
            $output = substr($output, 0, -$pad);
        } else {
            throw new RuntimeException('Either Mcrypt or OpenSSL extension is required to run Prestashop');
        }

        return $output;
    }

    /**
     * Generate Hmac
     *
     * @param string $encrypted
     *
     * @return string
     */
    protected function generateHmac($encrypted)
    {
        $seed = !defined('MCRYPT_RIJNDAEL_128')?'':MCRYPT_RIJNDAEL_128;
        $macKey = $this->generateKeygenS2k('sha256', $this->_key, $this->_iv, 32);
        return hash_hmac(
            'sha256',
            $this->_iv . $seed . $encrypted,
            $macKey
        );
    }

    /**
     * Alternative to mhash_keygen_s2k for security reason
     * and php compatibilities.
     *
     * @param string  $hash
     * @param string  $password
     * @param string  $salt
     * @param integer $bytes
     *
     * @return string
     */
    protected function generateKeygenS2k($hash, $password, $salt, $bytes)
    {
        $result = '';
        foreach (range(0, ceil($bytes / strlen(hash($hash, null, true))) - 1) as $i) {
            $result .= hash(
                $hash,
                str_repeat("\0", $i) . str_pad(substr($salt, 0, 8), 8, "\0", STR_PAD_RIGHT) . $password,
                true
            );
        }

        return substr(
            $result,
            0,
            intval($bytes)
        );
    }
}

 

Link to comment
Share on other sites

On 11/30/2021 at 7:31 PM, golgote13 said:

le mode debug n'a rien changé

J'ai l'impression (dites moi si je me trompe) que les erreurs que tu nous partage sont juste des warning qui apparaissent sur toutes les pages lorsque rinjdael est mal configuré.

Avec le mode débug activé, il faut que tu re-test de cliquer sur Enregistrer la personnalisation. Si tu vois encore une erreur 500, c'est que le mode débug n'est pas bien activé (probablement le cache à vider). Après avoir vidé le cache, persévère jusqu'à voir un descriptif de l'erreur plutôt que la page Erreur 500.

Ensuite tu devrais voir s'afficher des ERRORS plutôt que des WARNINGS.

Link to comment
Share on other sites

  • 3 weeks later...

Bonsoir,

en fait je viens de remarquer qu'un simple visiteur s'il enregistre son inscription, cela le mène vers un message d'erreur.

Cependant, si la personne est connecté à son compte, tout fonctionne...

Pourriez-vous m'éclairer ?

 

Bon bout d'an !!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...