RE: [PEAR] Cannot instantiate non-existent class: Error
| From: | Mark Steudel | Date: | Sun, 24 Jun 2007 08:48:32 +0000 |
| Subject: | RE: [PEAR] Cannot instantiate non-existent class: Error | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27559@lists.php.net to get a copy of this message | ||
No worries, nice to be able to help out:
once you follow the steps below you can install the
Spreadsheet_Excell_Writer as follows:
$pear install -a Spreadsheet_Excel_Writer-beta
The -a means download all dependencies. So you should see it download the
library OLE. The -beta at the end tells pear that it's ok to install a
package that is marked as beta.
An easy way to figure out the exact package name you need is to do something
like:
$pear search excel
=======================================
PACKAGE STABLE/(LATEST) LOCAL
Spreadsheet_Excel_Writer 0.9.1 (beta) 0.9.1 Package for
generating Excel spreadsheets
Structures_DataGrid_DataSource_Excel 0.1.1 (beta) DataSource driver
using Excel spreadsheets
Or go to pear.php.net and do a search.
Have fun, Mark
________________________________________
From: Tom Synnott [mailto:tom@curiousclothing.com]
Sent: Sunday, June 24, 2007 11:38 AM
To: Mark Steudel
Cc: pear-general@lists.php.net
Subject: Re: [PEAR] Cannot instantiate non-existent class: Error
Hi Mark,
Sorry to keep bothering you but if you can just give me a few more
pointers... I found an article on my server, but it says firstly it enables
PEAR and then I can install whatever custom packages I like... But not sure
what package I need to install to make the Excel Writer work...
Installing custom Pear packages
Some developers may want to install Pear packages that we have not included.
Due to the nature of grid hosting there are a few caveats involved in
getting Pear modules installed on the Grid. To install a new Pear package on
your (gs) Grid-Service:
1. Log into your (gs) via SSH as 'serveradmin'. For help with SSH please see
our KB article - (gs) Enabling SSH Access
2. To install custom Pear packages you must do a complete Pear installation
in your home directory (this is easier than it sounds). Start by telling the
global version of Pear to generate a configuration file for your home
directory:
3. /usr/local/pear/bin/pear config-create $PWD .pearrc
4. Now we'll tell the global version of Pear to install another version in
your home directory so your user can have write access:
5. /usr/local/pear/bin/pear install -o PEAR
6. Let's add the path to your new Pear installation to your bash_profile so
you won't have to type the full path anymore. Open or create a file in your
home directory named '.bash_profile' Add this line to it:
7. export PATH=$PATH:/home/####/users/.home/pear/
8. Please remember to substitute your site number for the '####' symbols.
9. Now you may install any Pear packages you like with the 'pear' command.
As an example let's install the newest Mail package:
10. pear install -o Mail
Now that Pear is installed locally you must alter your include_path so your
scripts know where to look for the new packages. There are three ways to do
this:
1. Globally: edit your custom php.ini to include the new path to pear. This
change will affect all scripts on your site. Simply add a line that reads:
2. include_path = ".:/home/####/users/.home/pear/php"
3. Please be sure to substitute your actual site number for the '####'
symbols. For more help with editing your php.ini please see our KB article -
(gs) HOWTO: edit php.ini
4. On a per directory basis - using an .htaccess file to change your
include_path for all php scripts in a single directory. This change does not
affect scripts outside of this directory. Create an .htaccess file in the
desired directory, add a line that reads:
5. php_value include_path '/home/####/users/.home/pear/php'
6. Please be sure to substitute your actual site number for the '####'
symbols. For more help with creating .htaccess files please see our KB
article - What is an .htaccess file?
7. For a single script - This change will only affect the script in which
the change is made. Edit the php script and add the following line near the
top:
8. set_include_path('/home/####/users/.home/pear/php');
9. Please be sure to substitute your actual site number for the '####'
symbols
On 24/06/2007, at 6:19 PM, Mark Steudel wrote:
Yup it looks like you need to install the Excel module.
On my host, I can install a local copy of pear like so (you need shell
access):
$ pear config-create $HOME .pearrc
$ pear config-set download_dir /home/<username>/tmp/pear/cache
$ pear config-set cache_dir /home/<username>/tmp/pear/cache
$ pear config-set temp_dir /home/<username>/tmp/pear/temp
$ pear install -o PEAR
Then in your scripts you will need to add an include path to look for pear
libraries:
ini_set(
'include_path',
ini_get( 'include_path' ) . PATH_SEPARATOR . "/home/(youruser)/pear/php"
);
Probably the easiest thing to do is to search your hosts wiki/faq/knowledge
base for how to install a local copy of PEAR
Good Luck, Mark
________________________________________
From: Tom Synnott [mailto:tom@curiousclothing.com]
Sent: Sunday, June 24, 2007 10:25 AM
To: Mark Steudel
Subject: Re: [PEAR] Cannot instantiate non-existent class: Error
Ug I think that is the problem... I found this article on my server kb...
Pear is pre-installed and available for use on (gs) Grid-Services. The path
to Pear is:
/usr/local/<php-version>/share/pear
where <php-version> is replaced by the version of php that is active on your
site. The installation directories have already been added to your
include_path so nothing special is needed to use our preinstalled Pear
modules. The list of preinstalled modules is as follows:
Package Version State
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
HTML_Template_IT 1.1 stable
Net_UserAgent_Detect 2.0.1 stable
PEAR 1.4.9 stable
Would this mean that the library I want is not on there? I can't tell if
this has what I need... I'm using the Excel_Spreadsheet_Writer...
Thanks,
Tom
On 24/06/2007, at 5:19 PM, Mark Steudel wrote:
Are all the same pear libraries installed on the new server?
-----Original Message-----
From: Tom Synnott [mailto:tom@curiousclothing.com]
Sent: Sunday, June 24, 2007 9:55 AM
To: pear-general@lists.php.net
Subject: [PEAR] Cannot instantiate non-existent class: Error
I keep getting the following error... When it was on a previous
server I didn't have the error but now I do, no directories have
changed and the file actually runs but this get's written into the
Excel file... Has anyone had this problem before? I hope so!
<b>Fatal error</b>: Cannot instantiate non-existent class:
ole_pps_file in <b>/home/19288/domains/html/admin/excel-2.0/
Workbook.php</b> on line <b>587</b><br />
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php