Malkoms Posted March 30, 2020 Share Posted March 30, 2020 (edited) Bonjour, J'ai transféré un prestashop sur un nouvel hébergeur. Et là hyper bizarre, les pages ne sont pas interprétées mais affichées "brutes", c'est à dire que l'on voit le code !!! Exemple avec la page d’accueil du panneau d'amin : <?php /** * 2007-2019 PrestaShop and Contributors * * 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: * https://opensource.org/licenses/OSL-3.0 * 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 https://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ use Symfony\Component\Debug\Debug; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\HttpKernelInterface; $timer_start = microtime(true); if (!defined('_PS_ADMIN_DIR_')) { define('_PS_ADMIN_DIR_', __DIR__); } if (!defined('PS_ADMIN_DIR')) { define('PS_ADMIN_DIR', _PS_ADMIN_DIR_); } require _PS_ADMIN_DIR_.'/../config/config.inc.php'; //small test to clear cache after upgrade if (Configuration::get('PS_UPGRADE_CLEAR_CACHE')) { header('Cache-Control: max-age=0, must-revalidate'); header('Expires: Mon, 06 Jun 1985 06:06:00 GMT+1'); Configuration::updateValue('PS_UPGRADE_CLEAR_CACHE', 0); } // For retrocompatibility with "tab" parameter if (!isset($_GET['controller']) && isset($_GET['tab'])) { $_GET['controller'] = strtolower($_GET['tab']); } if (!isset($_POST['controller']) && isset($_POST['tab'])) { $_POST['controller'] = strtolower($_POST['tab']); } if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { $_REQUEST['controller'] = strtolower($_REQUEST['tab']); } // Enable APC for autoloading to improve performance. // You should change the ApcClassLoader first argument to a unique prefix // in order to prevent cache key conflicts with other applications // also using APC. /* $apcLoader = new ApcClassLoader(sha1(__FILE__), $loader); $loader->unregister(); $apcLoader->register(true); */ if (_PS_MODE_DEV_) { Debug::enable(); } require_once __DIR__.'/../app/AppKernel.php'; $kernel = new AppKernel(_PS_MODE_DEV_?'dev':'prod', _PS_MODE_DEV_); if (PHP_VERSION_ID < 70000) { $kernel->loadClassCache(); } //$kernel = new AppCache($kernel); // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter //Request::enableHttpMethodParameterOverride(); $request = Request::createFromGlobals(); Request::setTrustedProxies([], Request::HEADER_X_FORWARDED_ALL); try { require_once __DIR__.'/../autoload.php'; $response = $kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, false); $response->send(); $kernel->terminate($request, $response); } catch (NotFoundHttpException $exception) { define('ADMIN_LEGACY_CONTEXT', true); // correct Apache charset (except if it's too late) if (!headers_sent()) { header('Content-Type: text/html; charset=utf-8'); } // Prepare and trigger LEGACY admin dispatcher Dispatcher::getInstance()->dispatch(); } Une idée ?? Edited April 1, 2020 by Malkoms (see edit history) Link to comment Share on other sites More sharing options...
doekia Posted March 30, 2020 Share Posted March 30, 2020 Activer PHP sur votre hébergement 1 Link to comment Share on other sites More sharing options...
Malkoms Posted March 31, 2020 Author Share Posted March 31, 2020 Ok j'ai oublié de préciser : le PHP est actif j'ai un WP qui tourne que le même hébergement et pas de souci. Link to comment Share on other sites More sharing options...
doekia Posted March 31, 2020 Share Posted March 31, 2020 (edited) si tu vois le code, c'est que le php n'est pas actif. Quoique tu en penses Edited March 31, 2020 by doekia (see edit history) Link to comment Share on other sites More sharing options...
Malkoms Posted March 31, 2020 Author Share Posted March 31, 2020 (edited) A moins que je ne me trompe malgré mes 2 ans d'xp de dév, l'activation du PHP est complète sur un serveur quand elle est faite, il ne peut donc pas y avoir une partie du serveur sans le PHP actif et une autre avec le PHP actif. A noter par ailleurs que j'ai testé ce prestshop sur un autre serveur de test de ma société, qui comporte actuellement 10 projets en cours de notre agence (tous en PHP) et que j'ai eu le même souci. J'en déduit donc que le souci vient du prestashop et non du serveur. Une autre idée ? PS : Peut être souhaites tu que je poste mon PHP info ? Edited March 31, 2020 by Malkoms (see edit history) Link to comment Share on other sites More sharing options...
coeos.pro Posted March 31, 2020 Share Posted March 31, 2020 c'est quoi l'url du site ? Link to comment Share on other sites More sharing options...
doekia Posted March 31, 2020 Share Posted March 31, 2020 il y a une heure, Malkoms a dit : A moins que je ne me trompe malgré mes 2 ans d'xp de dév, l'activation du PHP est complète sur un serveur quand elle est faite, il ne peut donc pas y avoir une partie du serveur sans le PHP actif et une autre avec le PHP actif. Tu te trompes. Le php est activé par handler qui peut être activé/désactivé par répertoire/fichier. Le seul cas dans lequel on voit le source d'un php c'est lorsque le moteur php n'est pas actif pour ce fichier Link to comment Share on other sites More sharing options...
Malkoms Posted April 1, 2020 Author Share Posted April 1, 2020 16 hours ago, doekia said: Tu te trompes. Le php est activé par handler qui peut être activé/désactivé par répertoire/fichier. Le seul cas dans lequel on voit le source d'un php c'est lorsque le moteur php n'est pas actif pour ce fichier Ok je comprends ton point de vue et j'ai appris quelque chose. Merci. Néanmoins, afin de faire un test, j'ai installé dans le même serveur et le même répertoire un prestahop tout neuf et vierge.... or il fonctionne parfaitement... Comment cela est-il possible ? Link to comment Share on other sites More sharing options...
doekia Posted April 1, 2020 Share Posted April 1, 2020 Il ne reste alors que le cas d'un .htacces violent ou de fichier vérolé mais sans le source exact (pastebin, dropbox, zip) difficile de trancher Link to comment Share on other sites More sharing options...
Malkoms Posted April 1, 2020 Author Share Posted April 1, 2020 Eh bien tu as raison, j'ai trouvé il y a 1h environ et grâce à toi qui m'a parlé de "handler".... Effectivement j'avais un Addhandler dans le htaccess qui avait une config particulière dû à l'ancien hébergeur Je te remercie grandement Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now