Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0RC3

Bug #12693 Class OLE_PPS not found in /usr/share/pear/OLE/PPS/File.php on line 32
Submitted: 2007-12-14 20:59 UTC
From: ajos2 Assigned: schmidt
Status: Closed Package: OLE (version 0.6.0)
PHP Version: 5.1.6 OS: redhat
Roadmaps: (Not assigned)    
Subscription  


 [2007-12-14 20:59 UTC] ajos2 (Antony OSullivan)
Description: ------------ Just downloaded Pear from scratch... and I am getting this error: Class OLE_PPS not found in /usr/share/pear/OLE/PPS/File.php on line 32

Comments

 [2007-12-17 16:57 UTC] schmidt (Christian Schmidt)
Could you please supply the code that generates this error? Are you sure that /usr/share/pear is in your include path? Does /usr/share/pear/OLE/PPS.php exist in your filesystem?
 [2007-12-17 17:07 UTC] mike27cubes (Mike Hickey)
I am getting the same problem. Here is the error I get and the bottom of a call stack. /usr/local/share/pear is most definitely in my path so that's not the problem. The code that generates this problem for me is require_once 'OLE/PPS.php'; Fatal error: Class 'OLE_PPS' not found in /usr/local/share/pear/OLE/PPS/File.php on line 32 5 - require_once('/usr/local/share/pear/OLE/PPS.php') - ../Loyalty2007.class.php:72 6 - require_once('/usr/local/share/pear/OLE.php') - ../PPS.php:24 7 - require_once('/usr/local/share/pear/OLE/PPS/File.php') - ../OLE.php:34
 [2007-12-17 18:44 UTC] mike27cubes (Mike Hickey)
It seems the problem is in the order the files are required and classes declared. I submitted a patch that moves the require_once call for OLE.php below the declaration of the OLE_PPS class. I'm sure there are other solutions for the problem, hopefully this helps to point you in the right direction.
 [2007-12-17 18:50 UTC] ajos2 (Antony OSullivan)
I am getting the error when using: Spreadsheet/Excel/Writer.php My system is: [root@www ~]# pear -V ===================== PEAR Version: 1.7.0RC1 PHP Version: 5.1.6 Zend Engine Version: 2.1.0 Running on: Linux www.sonicbadger.com 2.6.20-1.3002.fc6xen #1 SMP Mon Aug 13 14:21:09 EDT 2007 i686 [root@www ~]# set | grep -i pear ================================ path (/usr/lib/qt-3.3/bin /usr/kerberos/sbin /usr/kerberos/bin /usr/share/pear /usr/local/sbin /usr/local/bin /sbin /bin /usr/sbin /usr/bin /usr/X11R6/bin) [root@www ~]# find /usr/share/pear/OLE -type f -exec /bin/ls -al {} \; ====================================================================== -rw-r--r-- 1 root root 3542 Dec 16 03:30 /usr/share/pear/OLE/PPS/File.php -rw-r--r-- 1 root root 17398 Dec 16 03:30 /usr/share/pear/OLE/PPS/Root.php -rw-r--r-- 1 root root 6594 Dec 16 03:30 /usr/share/pear/OLE/PPS.php
 [2007-12-17 21:59 UTC] schmidt (Christian Schmidt)
Instead of moving the require_once call to the bottom of the file, I moved it inside the function where OLE_PPS_File and OLE_PPS_Root are used for the first and only time. I think this is the usual pattern in PEAR. Do you mind testing my fix before I release the package? You can install it directly using this command: pear upgrade http://serber.chsc.dk/~chsc/OLE-0.6.1RC1.tgz
 [2007-12-17 22:30 UTC] mike27cubes (Mike Hickey)
Your fix works perfectly. Thanks
 [2007-12-18 00:05 UTC] ajos2 (Antony OSullivan)
Party on down! It is working and I am spreadsheeting again! Thanks very much-o... Ajos1
 [2007-12-18 21:02 UTC] schmidt (Christian Schmidt)
I have now released a package containing the fix (it hasn't changed from the RC that I linked to). Thanks for reporting, analyzing and testing :-)