Search code examples
typo3typo3-6.2.x

class.tslib_pibase.php not found in my TYPO3 6.2.9


I want to include PHP code in my TYPO3, I found php_page_content, I installed the extension that I found here . The installation went fine, no error, then I cleared my cache. After addind a PHP content in my page enter image description here

Then I got a fatal error saying :

PHP Fatal error: require_once(): Failed opening required '/var/www/clevvermail/typo3/sysext/cms/tslib/class.tslib_pibase.php' (include_path='/var/www/my_typo3/typo3/contrib/pear/:.:/usr/share/php') in /var/www/my_typo3/typo3conf/ext/page_php_content/pi1/class.tx_pagephpcontent_pi1.php on line 30

I checked and I found no class.tslib_pibase.php in my TYPO3!!! How can I manage this ?

enter image description here

PS: I tried to use the extension Page PHP Content Element but it didn't work for me, I install and I find no PHP script in the content list to include.


Solution

  • You can find the solution here

    In your class.tx_pagephpcontent_pi1.php on line 30

    You can replace this

    require_once(PATH_tslib . 'class.tslib_pibase.php');
    

    By

    if (!class_exists('tslib_pibase')) require_once(PATH_tslib . 'class.tslib_pibase.php');
    

    This works for both Typo3 4.x and 6.2