tags:

views:

155

answers:

2

hi i am using pear spreadsheet in my project. its working fine on the localhost but on the remote server its throwing a fatal error...

Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/worm/Pear_packages/Spreadsheet/Excel/Writer.php on line 34

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='/var/worminc/application/../library:.:/usr/share/php:/usr/share/pear') in /var/www/worm/Pear_packages/Spreadsheet/Excel/Writer.php on line 34

Have installed PEAR using go-pear,i also did set_include_path in my index file, then i get

Warning:Zend_Loader::include_once(OLE/PPS.php) [zend-loader.include-once]: failed to open stream: No such file or dir in /var/worminc/library/Zend/Loader.php online 83

Warning: Zend_Loader::include_once() [function.include]: Failed opening 'OLE/PPS.php' for inclusion (include_path='/var/worminc/application/../library:/var/www/worm/Pear_packages/PEAR/PEAR:.:/usr/share/php:/usr/share/pear') in /var/worminc/library/Zend/Loader.php on line 83 Fatal error: Class 'OLE_PPS' not found in /var/www/worm/Pear_packages/OLE/PPS/File.php on line 32

can anyone say whats happening?

+1  A: 

That is most likely that:

  • You have not uploaded/installed the pear package or
  • You are not specifying the correct path

More Info:

http://pear.php.net/manual/en/installation.getting.php

Sarfraz
Have installed PEAR using go-pear, did set_include_pathWarning: Zend_Loader::include_once(OLE/PPS.php) [zend-loader.include-once]: failed to open stream: No such file or dir in /var/worminc/library/Zend/Loader.php online 83Warning: Zend_Loader::include_once() [function.include]: Failed opening 'OLE/PPS.php' for inclusion (include_path='/var/worminc/application/../library:/var/www/worm/Pear_packages/PEAR/PEAR:.:/usr/share/php:/usr/share/pear') in /var/worminc/library/Zend/Loader.php on line 83Fatal error: Class 'OLE_PPS' not found in /var/www/worm/Pear_packages/OLE/PPS/File.php on line 32
A: 

The one solution I found when I encountered this problem was to place the PEAR.php and PEAR5.php in the root folder of the website. PEAR has files available on their website for manual installation which you can use for that.

Another way would be to change the include_path of your php.ini so that it searches the file on the location you have placed them in. Which would take some more work and which I haven't tried that yet since I didn't want to spend time on it.

Jurgen
the best thing to do here is to alter the include_path of your php.ini (or use ini_set in your code) so that it uses the Spreadsheet_Excel_Writer files that were installed via pear. $pear list Spreadsheet_Excel_WriterWill show you where those files were installed to.
kguest