pear installation

Problems with the Windows version of XAMPP, questions, comments, and anything related.

pear installation

Postby shrg18 » 18. October 2007 17:15

XAMPP version 1.6.4, windows XP

in c:\xampp\php\PEAR\, there are many folders of pear packages, but cannot tell whether they are installed.

I ran command line prompt:

C:\XAMPP\PHP\pear list

it showed:

C:\XAMPP\PHP>pear list

Notice: unserialize(): Error at offset 112 of 354 bytes in Config.php on line 1003 ERROR: The default config file is not a valid config file or is corrupted.


then I ran command line prompt:

C:\XAMPP\PHP\go-pear.bat

after a question list which I pressed Enter, it showed:

Notice: unserialize(): Error at offset 112 of 354 bytes in phar://go-pear.phar/P
EAR/Config.php on line 1007

Fatal error: Call to undefined method PEAR_Error::set() in phar://go-pear.phar/PEAR/Start.php on line 263
Press any key to continue . . .


I have read the other topic "vista pear". In that topic, there is a list of should-be-there files:

pear.bat
pear.ini
peardev.bat
pear-installed-pkg.txt

pear-installall.php
pear-list.txt

but in this version 1.6.4 and in verion 1.6.3a, the last two files are found missing.

I also read XAMPP document for windows, could not find whether PEAR packages are installed or how to install them.

on the book I am following, practical php and mysql by Jono Bacon, it says when using xampp, pear packages are readily installed (page 427-428).

please advice
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8

Postby Wiedmann » 18. October 2007 17:37

but cannot tell whether they are installed.

Each package which is listed in "pear-installed-pkg.txt" is installed and ready for use.

I ran command line prompt: C:\XAMPP\PHP\pear list

You can't really run the PEAR command in XAMPP. (That's an old bug and no one is interested in fixing this...)

then I ran command line prompt: C:\XAMPP\PHP\go-pear.bat

This command installs a fresh PEAR if no other PEAR is preinstalled.

Thus:
If the preinstalled packages are all you need, be happy and use them.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby shrg18 » 18. October 2007 23:48

the pear packages are readily installed.

thank you
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8

Postby shrg18 » 19. October 2007 00:04

how to install pear packages to a shared domain website?

though it is nothing to do with xampp, but I have trouble to install pear packages to the website, nor could find a proper solution.
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8

Postby Wiedmann » 19. October 2007 00:54

how to install pear packages to a shared domain website?

Installation of a local PEAR copy on a shared host
http://pear.php.net/manual/en/installation.shared.php

That's the official way.

The easy way:
Jst copy your local PEAR directory with FTP to the shared host and set the correct "include_path" with ini_set() at the top of your scripts.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby shrg18 » 19. October 2007 06:00

ini_set('include_path', '/inc');

it works.

1.upload the entire /PEAR/ folder to the shared host. (I placed it in the root directory)
2. in config.php, add:
ini_set('include_path', '../PEAR');

3. it works.

the reference links:
http://ca.php.net/manual/en/function.ini-set.php
http://ca.php.net/manual/en/function.se ... e-path.php

thanks, it is very helpful.
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8

Postby Wiedmann » 19. October 2007 06:12

2. in config.php, add:
ini_set('include_path', '../PEAR');

2 remarks:

- You should use a absolute path to pear and not a relative one.
- The first path in the include_path should be the current driectory (".").
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby shrg18 » 23. October 2007 03:07

hi Wiedman,

regarding your remarks, could you show me an example of absolute path in a shared host?

I ran a few combinations such as

ini_set('include_path', '.; public_html/PEAR/');

but didn't go through.

My website host is moving my account from one server to another over the weekend, still having trouble with the new account.
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8

Postby Wiedmann » 23. October 2007 03:27

could you show me an example of absolute path in a shared host?

An absolute path is allways an absolute path. If you are on a shared host, root server, Linux or Windows:
/foo/bar/PEAR
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby shrg18 » 03. November 2007 21:42

An absolute path is allways an absolute path. If you are on a shared host, root server, Linux or Windows:
/foo/bar/PEAR


thanks.

because there are some server problems these days, I have not tested it yet. my account in the shared host has been moved to a new server, ever since the move, the firewall keeps blocking FTP, sometimes even blocking opening pages.

the behavior is weired, sometimes it blocks, sometimes it doesn't, cannot figure out what the problem is. I could never open their service ticket links sent to me in emails.

the same thing happened when I first started this shared hosting program, but it disappeared by itself after 1-2 weeks. now it comes back again.

this is on the XP windows; on Vista, it is ok. of course, there is nothing to do with xampp. xampp runs perfect on both xp and vista.
shrg18
 
Posts: 43
Joined: 16. August 2007 13:59
Location: windsor, on, canada
Operating System: windows 8


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 71 guests