简体   繁体   中英

PEAR error + Open Server and Opencart project

I have a project based on Opencart 3+ version on my OpenServer. Then i try to load my project i have some errors.

Notice: unserialize(): Error at offset 0 of 5 bytes in C:\OpenServer\domains\depotop\admin\index.php on line 46

Notice: unserialize(): Error at offset 0 of 22 bytes in C:\OpenServer\domains\depotop\admin\index.php on line 46

Notice: unserialize(): Error at offset 0 of 9 bytes in C:\OpenServer\domains\depotop\admin\index.php on line 46

Notice: unserialize(): Error at offset 0 of 9 bytes in C:\OpenServer\domains\depotop\admin\index.php on line 46

Notice: unserialize(): Error at offset 0 of 29 bytes in C:\OpenServer\domains\depotop\admin\index.php on line 46
Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in C:\OpenServer\domains\depotop\system\library\session.php on line 7
Warning: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time in C:\OpenServer\domains\depotop\system\library\session.php on line 8
Warning: session_set_cookie_params(): Cannot change session cookie parameters when headers already sent in C:\OpenServer\domains\depotop\system\library\session.php on line 10
Warning: session_start(): Cannot start session when headers already sent in C:\OpenServer\domains\depotop\system\library\session.php on line 11
Notice: Undefined index: filename in C:\OpenServer\domains\depotop\admin\index.php on line 123
Notice: Error: Could not load language ! in C:\OpenServer\domains\depotop\system\library\language.php on line 43
Warning: Cannot modify header information - headers already sent by (output started at C:\OpenServer\domains\depotop\admin\index.php:46) in C:\OpenServer\domains\depotop\system\library\currency.php on line 52
Warning: unlink(c:/OpenServer/domains/depotop/system/cache/cache_c21f969b5f03d33d43e04f8f136e7682_7f24d9fc4140045241b3f97bcf36bf03): No such file or directory in C:\OpenServer\domains\depotop\vendor\pear\cache_lite\Cache\Lite.php on line 608
Warning: include_once(PEAR.php): failed to open stream: No such file or directory in C:\OpenServer\domains\depotop\vendor\pear\cache_lite\Cache\Lite.php on line 567
Warning: include_once(): Failed opening 'PEAR.php' for inclusion (include_path='C:\OpenServer\domains\depotop\vendor/pear/cache_lite;.') in C:\OpenServer\domains\depotop\vendor\pear\cache_lite\Cache\Lite.php on line 567
Fatal error: Uncaught Error: Class 'PEAR' not found in C:\OpenServer\domains\depotop\vendor\pear\cache_lite\Cache\Lite.php:568 
Stack trace: 
#0 C:\OpenServer\domains\depotop\vendor\pear\cache_lite\Cache\Lite.php(609): Cache_Lite->raiseError() 
#1 C:\OpenServer\domains\depotop\vendor\pear\cache_lite\Cache\Lite.php(459): Cache_Lite->_unlink() 
#2 C:\OpenServer\domains\depotop\admin\model\localisation\currency.php(170): Cache_Lite->remove() 
#3 C:\OpenServer\domains\depotop\admin\controller\common\login.php(89): ModelLocalisationCurrency->updateCurrencies() 
#4 C:\OpenServer\domains\depotop\system\engine\front.php(42): ControllerCommonLogin->index() 
#5 C:\OpenServer\domains\depotop\system\engine\front.php(29): Front->execute() 
#6 C:\OpenServer\domains\depotop\admin\index.php(160): Front->dispatch() 
#7 {main} thrown in C:\OpenServer\domains\depotop\vendor\pear\cache_lite\Cache\Lite.php on line 568

Pear on my server, 7.4 php version

# pear list
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE          VERSION STATE
Archive_Tar      1.4.9   stable
Console_Getopt   1.4.3   stable
PEAR             1.10.12 stable
Structures_Graph 1.1.1   stable
XML_Util         1.4.5   stable

Why "Fatal error: Uncaught Error: Class 'PEAR' not found in", how i can fix that?

This error occurs beacuse the file PEAR.php is not found in the given directory. You just include this file. Have you checked, if the file PEAR.php is really in the given path you use with include_once('Pear.php') ?

The solution to your problem: Just give the right path to the include function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM