TYPO3 website doesn't work after changing db

ⅰ亾dé卋堺 提交于 2020-01-25 08:00:06

问题


I want to make a copy of my TYPO3 CMS 6.2.18 website - what I did so far:

  1. Copied the entire website folder (including the TYPO3 installation)
  2. Copied the entire database (with a new name)
  3. Created a new db user for the copied db
  4. Adjusted the file /typo3conf/LocalConfiguration.php accordingly to the new DB+User

Now I'm receiving following errors when calling different urls of my copied TYPO3 website:

When I try calling the "Upgrade Wizard" from inside the install tool /typo3/install (which is the only page that currently works):

#1: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/<my-domain>/typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php line 409

When I call <my-domain>/typo3

 #1: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/<my-domain>/typo3/sysext/backend/Classes/Utility/BackendUtility.php line 3022
4 count(NULL)
...
/var/www/vhosts/<my-domain>/typo3/sysext/backend/Classes/Utility/BackendUtility.php:
03020:   $signals = array();
03021:   $modData = $GLOBALS['BE_USER']->getModuleData('TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal', 'ses');
03022:   if (!count($modData)) {
03023:    return '';
03024:   }

When I call <my-domain>

#1: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/<my-domain>/typo3/sysext/core/Classes/Database/PreparedStatement.php line 582
...after calling... 
TYPO3\CMS\Core\Database\PreparedStatement::convertNamedPlaceholdersToQuestionMarks("SELECT * FROM fe_session_data WHERE hash = :hash", array, array)

What's interesting to me:
After copying the website the copy worked, only after referencing it to the copied db it showed these errors.

Anyone an idea what I could do / be looking for?
I tried deleting all cache, all tables shown in the "Cleanup" part of the install tool and all files in the typoe3temp folder already.


回答1:


So, as I have said in the comment. Probably the issue with PHP version, because of all the mentioned errors (warning actually ;) ) reflect the incompatible PHP code.

The solution is pretty easy, switch your PHP version according to TYPO3's need :)



来源:https://stackoverflow.com/questions/58923357/typo3-website-doesnt-work-after-changing-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!