|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help installing PEAR on localhost
I saw that the thread I posted my problem in was resolved so I'll repost here.
I'm having no luck understanding my problem. On my webhost account Pear is installed because I uploaded a script from a tutorial last night and it worked. But the same script didn't work on my localhost (using WAMP with php 5). So I started looking a little deeper into what pear is. I figured that WAMP didn't automatically install PEAR for me, but the PEAR dir did reside in c:wampphp with a go-pear.php located in it. I tried opening go-pear.php in my browser but of course it didn't work because it wasn't in my www dir. So I moved go-pear.php to my www dir and ran it in my browser. I got a few errors. I then got the idea to move the entire PEAR dir out of the php dir and into the www dir and try. I did this and it worked, and of course added the registry settings. While everything seemed successful on the go-pear.php page, I clicked down at the bottom on the 'front end installer' link or whatever its called, then got an error that says "Parse error: syntax error, unexpected T_STRING in c:wampwwwPEARindex.php on line 33" What should I do? |
|
#2
|
|||
|
|||
|
RE: Help installing PEAR on localhost
Ok, the path it is referring to add to is the environment path in the registry, right?
I'm still getting the error. |
|
#3
|
|||
|
|||
|
RE: Help installing PEAR on localhost
Ninth attempt (now sweating profusely). I cut and pasted the 'C:wampwwwpear' dir back in the 'c:wampphp' dir and ran the 'go-pear.bat' file located in the same 'php' dir. I also re-ran the 'PEAR_ENV' to re-update the registry after moving it back.
Here is what it says after running go-pear.bat, note the warning near the bottom: Welcome to go-pear! Go-pear will install the 'pear' command and all the files needed by it. This command is your tool for PEAR installation and maintenance. Go-pear also lets you download and install the PEAR packages bundled with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit. If you wish to abort, press Control-C now, or press Enter to continue: HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:: Below is a suggested file layout for your new PEAR installation. To change individual locations, type the number in front of the directory. Type 'all' to change all of them or simply press Enter to accept these locations. 1. Installation prefix : C:wampphp 2. Binaries directory : $prefix 3. PHP code directory ($php_dir) : $prefixpear 4. Documentation base directory : $php_dirdocs 5. Data base directory : $php_dirdata 6. Tests base directory : $php_dirtests 7. php.exe path : C:wampphpphp.exe 1-7, 'all' or Enter to continue: The following PEAR packages are bundled with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser, PHPUnit. Would you like to install these as well? [Y/n] : n Loading zlib: ok Using local package: PEAR.............ok Using local package: Archive_Tar......ok Using local package: Console_Getopt....ok Using local package: XML_RPC..........ok Bootstrapping: PEAR...................(local) ok Bootstrapping: Archive_Tar............(local) ok Bootstrapping: Console_Getopt.........(local) ok Extracting installer..................ok install ok: PEAR 1.3.1 install ok: Archive_Tar 1.2 install ok: Console_Getopt 1.2 install ok: XML_RPC 1.1.0 ************************************************** ******* WARNING! The include_path defined in the currently used php.ini does not contain the PEAR PHP directory you just specified: <C:wampphppear> If the specified directory is also not in the include_path used by your scripts, you will have problems getting any PEAR packages working. Current include path : .;C:php5pear Configured directory : C:wampphppear Currently used php.ini (guess) : Press Enter to continue: |
|
#4
|
|||
|
|||
|
RE: Help installing PEAR on localhost
Also note that when I pushed Enter ( Press Enter to continue: ) for the above, that I get this:
The 'pear' command is now at your service at C:wampphppear.bat ** The 'pear' command is not currently in your PATH, so you need to ** use 'C:wampphppear.bat' until you have added ** 'C:wampphp' to your PATH environment variable. Run it without parameters to see the available actions, try 'pear list' to see what packages are installed, or 'pear help' for help. For more information about PEAR, see: http://pear.php.net/faq.php http://cvs.php.net/co.php/pearweb/doc/pear_package_manager.txt?p=1 http://pear.php.net/manual/ Thanks for using go-pear! * WINDOWS ENVIRONMENT VARIABLES * For convenience, a REG file is available under C:wampphpPEAR_ENV.reg . This file creates ENV variables for the current user. Double-click this file to add it to the current user registry. Press any key to continue . . . |
|
#5
|
|||
|
|||
|
RE: Help installing PEAR on localhost
In my registry I checked and the C:WampPHP is there.
Also I cannot use the Pear.bat, and it stated that I would be able to. In my php.ini I changed c:php5PEAR to c:wampphpPEAR and still nothing. |
|
#6
|
||||
|
||||
|
RE: Help installing PEAR on localhost
OK - let me see if I understand what is going on. You are trying to install PEAR on a WAMP local machine. You however are having problems with your paths. Your long rambling comments are throwing me off ;) .
Start at the beginning. Can you get go-pear to run? when you ran it and it said you had a problem with your include path.. and it gave you that list. You don't have a php.ini file location. Quote:
look in your phpinfo page and find out what php.ini it is using... make sure you edit that file. |
|
#7
|
|||
|
|||
|
RE: Help installing PEAR on localhost
Sorry for the rambling, I'm a rambler.
So what do I add the php.ini path to? I added this path to the PEAR_ENV.reg file: "PHP_INI_PATH"="c:wampapachephp.ini" and it did nothing to help. When I try pear.bat it just flashes and closes. Is that where I am to add the path? Aside from that, I can run go-pear.bat but not pear.bat. I also cannot run go-pear.php in my browser unless it's located in my c:wampwww directory (right now it's located in c:wampphppear). That problem with only being able to run go-pear.php in my browser is originally the reason I tried it with moving my c:wampphppear directory from c:wampphp directory to the c:wampwww directory (where then I can open go-pear.php in my browser). But just to clarify I moved c:wampwwwpear back into c:wampphp where it was in the first place. |
|
#8
|
|||
|
|||
|
RE: Help installing PEAR on localhost
I got it now. I added the path to php.ini and ignored the warning and ran pear.bat from the command line.
|
|
#9
|
|||
|
|||
|
RE: Help installing PEAR on localhost
|
|
#10
|
|||
|
|||
|
RE: Help installing PEAR on localhost
Quote:
|
|
#11
|
|||
|
|||
|
RE: Help installing PEAR on localhost
There seems to be a bumper here (above), so I'll post the path I added to the php.ini file in c:windows. Actually go-pear.bat is what added the path but you don't have to use go-pear. My path is different now cause I'm using gnope's pear (it is now include_path=".;C
;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ;include_path = ".:/php/includes" ; ; Windows: "path1;path2" ;include_path = ".;c:phpincludes" ;***** Added by go-pear include_path=".;C:phppear" ;***** |
|
#12
|
|||
|
|||
|
I think this what u want "mistermachete"
Hi mistermachete ,
I think the solution what u r searching is this link : http : / / w w w . sematopia . com / ? p = 28 Cheers! |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > Help installing PEAR on localhost |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|