Jump to content

FATAL ERROR after Update from 1.7.8.6 to 1.8


DArnaez

Recommended Posts

Hi guys. Ok this is what it happen. Trying to resolve a problem with aparently my current theme... and waiting to the vendor contact me for support. I decided to update my Prestashop to 1.8. I did a research and the best way was using the 1ClickUpdate... so I proceed to that but at the end of the process it stop and show this message:
[INTERNAL] /xxxxx/xxxxxx/mysite.com/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php line 70 - Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false

 

I can access the file using ftp but I have no idea what to change. 

After that I receive a blank page. No access even to the Admin. So I edited defines.inc.php file, and find the line define('_PS_MODE_DEV_', false); - change "false" to "true".  But now... trying to acces the admin it shows:

(1/1) FatalErrorException

Compile Error: Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false

in PDOConnection.php line 70

Link to comment
Share on other sites

Hi Thanks a lot for to reply! I'm have zero experience in coding. My big mistake was to trust in all other times that I upgrade and the process was fine. so now I did't use the backup options. No I didn't try the 8.1 version but if you say is better, please let me know where I download it. 
2) What should I do to clear the cache in VAR? I only have access to file manager from the hosting.

Here is the screen previous to update (for some reason I have the tab opened in the browser but if I refresh will turn blank.

 

image.png

Link to comment
Share on other sites

Still... don't let me in the admin.
 

FatalErrorException

Compile Error: Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed ...$fetchModeArgs): PDOStatement|false

Link to comment
Share on other sites

Auch... So my only solution is to pay ( hostgator charge me $50 for restore from backup) to restore to 5 days ago. IDK... this site is my only one using Prestashop. I'm considering seriusly to migrate to WooCommerce. Is a shame.

Link to comment
Share on other sites

If the host gives you issues why would you change the shop? Change the hoster. Learn hao to restore shops yourself.
A shop can be fairly easy installed into localhost. There is the place to play with it.

  • Like 1
Link to comment
Share on other sites

Ok... Finally I paid to the hosting provider (Hostgator) to recover the site... after claims, backs and forwards... I have the website back... with errors again. If you choose any product you will see:
 

(1/1) ContextErrorException

User Notice: escape: unsupported type: html_attr - returning unmodified string

in modifier.escape.php line 257

 

This is how all the problem start. Can you guide me to upgrade to PS 8 please?

Link to comment
Share on other sites

  On 2/19/2025 at 10:39 PM, DArnaez said:

This is how all the problem start. Can you guide me to upgrade to PS 8 please?

Expand  

First, you need to use the right version of PHP for your 1.7 PrestaShop version.

After, that, if all it'zs ok, you need to make a complete backup of your site (files and data).

And after that, you can test an upgrade on one copy of your site because it's important to test it on another installation not on your prod site.

If your hosting service doesn't give you access to the PHP 7 version, you have to change to a good hosting service, with free backup solution too.

Link to comment
Share on other sites

OK I understand... Hostgator only have PHP 8.1, 8.2, 8.3  and Inherit (no idea what is that).

Do you recommend another Hosting provider? The problem is that how can I know before to buy what PHP version are usig?  Maybe I should update to Prestashop 1.8 instead. I looking for any developer to help me with that.

Link to comment
Share on other sites

Trying to upgrade using 1-Click Upgrade it finish "THe setting have been successfully updated"  But in ERRORS section it shows:

 


[INTERNAL] /..../xxxxxx/mydomain.com/src/PrestaShopBundle/DependencyInjection/RuntimeConstEnvVarProcessor.php line 39 - Symfony\Component\DependencyInjection\Exception\EnvNotFoundException: Environment variable not found: "runtime:_PS_ALLOW_MULTI_STATEMENTS_QUERIES_". #0 /..../xxxxxx/mydomain.com/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(491): PrestaShopBundle\DependencyInjection\RuntimeConstEnvVarProcessor->getEnv('const', 'runtime:_PS_ALL...', Object(Closure)) #1 /..../xxxxxx/mydomain.com/var/cache/dev/ContainerE3rt2y6/appDevDebugProjectContainer.php(2981): Symfony\Component\DependencyInjection\Container->getEnv('const:runtime:_...') #2 /..../xxxxxx/mydomain.com/var/cache/dev/ContainerE3rt2y6/appDevDebugProjectContainer.php(3023): ContainerE3rt2y6\appDevDebugProjectContainer->getDoctrine_Dbal_DefaultConnectionService() #3 /..../xxxxxx/mydomain.com/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php(306): ContainerE3rt2y6\appDevDebugProjectContainer->getDoctrine_Orm_DefaultEntityManagerService() #4 /..../xxxxxx/mydomain.com/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ManagerRegistry.php(63): Symfony\Component\DependencyInjection\Container->get('doctrine.orm.de...') #5 /..../xxxxxx/mydomain.com/vendor/doctrine/persistence/lib/Doctrine/Persistence/AbstractManagerRegistry.php(204): Symfony\Bridge\Doctrine\ManagerRegistry->getService('doctrine.orm.de...') #6 /..../xxxxxx/mydomain.com/vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/CacheWarmer/ProxyCacheWarmer.php(53): Doctrine\Persistence\AbstractManagerRegistry->getManagers() #7 /..../xxxxxx/mydomain.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php(52): Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer->warmUp('/xxxxx/xxxxxxx...') #8 /..../xxxxxx/mydomain.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(686): Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp('/xxxx/xxxxxx...') #9 /..../xxxxxx/mydomain.com/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(135): Symfony\Component\HttpKernel\Kernel->initializeContainer() #10 /..../xxxxxx/mydomain.com/modules/autoupgrade/classes/UpgradeTools/SymfonyAdapter.php(67): Symfony\Component\HttpKernel\Kernel->boot() #11 /..../xxxxxx/mydomain.com/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php(43): PrestaShop\Module\AutoUpgrade\UpgradeTools\SymfonyAdapter->initKernel() #12 /..../xxxxxx/mydomain.com/modules/autoupgrade/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php(102): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader17->initConstants() #13 /..../xxxxxx/mydomain.com/modules/autoupgrade/classes/Task/Upgrade/UpgradeDb.php(49): PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader->doUpgrade() #14 /..../xxxxxx/mydomain.com/modules/autoupgrade/classes/Task/Runner/ChainedTasks.php(61): PrestaShop\Module\AutoUpgrade\Task\Upgrade\UpgradeDb->run() #15 /..../xxxxxx/mydomain.com/admin/autoupgrade/ajax-upgradetab.php(54): PrestaShop\Module\AutoUpgrade\Task\Runner\ChainedTasks->run() #16 {main}

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...