I tried to install pear
WAMPserver 2.1
OS : win 7
steps I followed from following link
http://chadash.tumblr.com/post/1515528654/how-to-install-php5-pear-lib-on-windows-7
I get a copy of go-pear.phar from http://pear.php.net/go-pear.phar url.
Following is the output
Are you installing a system-wide PEAR or a local copy?
(system|local) [system] : system
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 base ($prefix) : C:\wamp\bin\php\php5.3.3
2. Temporary directory for processing : C:\wamp\bin\php\php5.3.3\tmp
3. Temporary directory for downloads : C:\wamp\bin\php\php5.3.3\tmp
4. Binaries directory : C:\wamp\bin\php\php5.3.3
5. PHP code directory ($php_dir) : C:\wamp\bin\php\php5.3.3\pea
r
6. Documentation directory : C:\wamp\bin\php\php5.3.3\doc
s
7. Data directory : C:\wamp\bin\php\php5.3.3\dat
a
8. User-modifiable configuration files directory : C:\wamp\bin\php\php5.3.3\cfg
9. Public Web Files directory : C:\wamp\bin\php\php5.3.3\www
10. Tests directory : C:\wamp\bin\php\php5.3.3\tes
ts
11. Name of configuration file : C:\Windows\pear.ini
12. Path to CLI php.exe : .
1-12, 'all' or Enter to continue:
'".\php.exe"' is not recognized as an internal or external command,
operable program or batch file.
*WARNING*
We found php.exe under ., it uses an unknown SAPI. PEAR commandline
tool has not been tested with it, if you have a CLI (or CGI) php.exe available,
we strongly recommend using it.
Beginning install...
Configuration written to C:\Windows\pear.ini...
Initialized registry...
Preparing to install...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/Archive_Tar-1.3.7.tar...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/Console_Getopt-1.3.0.tar...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/PEAR-1.9.3.tar...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/Structures_Graph-1.0.4.tar...
installing phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pear.phar/PEAR/go-pear-tarbal
ls/XML_Util-1.2.1.tar...
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \Archive_Tar-1.3.7\Archive\Tar.php does not exist
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \Console_Getopt-1.3.0\Console\Getopt.php does not exist
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \Structures_Graph-1.0.4\docs\html\media\banner.css does not exist
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \XML_Util-1.2.1\examples\example.php does not exist
PHP Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/
go-pear.phar/System.php on line 302
Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.3/PEAR/go-pe
ar.phar/System.php on line 302
ERROR: file \PEAR-1.9.3\OS\Guess.php does not exist
** WARNING! Old version found at C:\wamp\bin\php\php5.3.3, please remove it or b
e sure to use the new c:\wamp\bin\php\php5.3.3\pear.bat command
The 'pear' command is now at your service at c:\wamp\bin\php\php5.3.3\pear.bat
** The 'pear' command is not currently in your PATH, so you need to
** use 'c:\wamp\bin\php\php5.3.3\pear.bat' until you have added
** 'C:\wamp\bin\php\php5.3.3' 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://pear.php.net/manual/
Thanks for using go-pear!
* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under C:\wamp\bin\php\php5.3.3PEAR_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 . . .
C:\wamp\bin\php\php5.3.3>
pear command is still not recognized by the system.
*WARNING*
We found php.exe under ., it uses an unknown SAPI. PEAR commandline
tool has not been tested with it, if you have a CLI (or CGI) php.exe available,
we strongly recommend using it.
There are no such message the author receive. I updated the environmental var and php is running as cli.
Please help.
Regards,
12. Path to CLI php.exe : .
1-12, 'all' or Enter to continue:
'".\php.exe"' is not recognized as an internal or external command,
operable program or batch file.
You need to specify the full path to the php.exe file, including php.exe. "." alone is not sufficient.
Here's an answer for the same thing but installing in XAMPP: Error installing go-pear.phar in Windows 10 with XAMPP
When you're prompted with
1-12, 'all' or Enter to continue:
I think you need to enter
12
Then a pop up browser appears, allowing you to select the folder where php.exe is in your WAMP installation (do a search in Windows if you're not sure), then continue the PEAR installation.
Related
I try to load PHP from console (in windows) and when I run phpinfo.php the line
Loaded Configuration File => (none)
but when I run this pagin in web browser I see it:
Loaded Configuration File C:\MAMP\conf\php5.6.28\php.ini
My problem appear when I try to install symfony
Warning: readfile(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: readfile(https://symfony.com/installer): failed to open stream: Invalid argument in Command line code on line 1
I can't able to download this file from console, can anyone help me please?
I cannot run the composer command. I'm using windows cmd.
Inside C:\ProgramData\ComposerSetup\bin, I can do php composer.phar and it works.
But if do composer or composer.bat, I get this :
PHP Warning: Phar::mapPhar(/cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar): failed to open stream: No such file or directory in /cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar on line 23
PHP Fatal error: Uncaught exception 'PharException' with message 'unable to open phar for reading "/cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar"' in /cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar:23
Stack trace:
#0 /cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar(23): Phar::mapPhar('composer.phar')
#1 {main}
thrown in /cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar on line 23
What's wrong ?
I'm using the cygwin php in my path (cygwin/bin).
It works if I use a new php installation. But I want to keep "cygwin/bin" in my path.
I found it !
Removing "c:\cygwin64\bin" in the path.
Adding new php installation in path : "c:\php"
Adding new system variable : "CYGWIN_HOME", with value c:\cygwin64.
This way, using windows cmd, composer will use the php in the path ("c:\php").
And using cygwin, composer will use the php in "cygwin\bin" (because of the CYGWIN_HOME variable).
I've been trying to use a few PEAR packages for a few hours now to no avail. PEAR itself is functioning, and I believe I set all of the configuration variables correctly, but when I try to run any of my packages from the command line, I get PHP errors telling me the required file wasn't found. For example, with phpdoc:
$ phpdoc
PHP Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
PHP Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:/Applications/MAMP/bin/php5.2/lib/php') in /Applications/MAMP/htdocs/pear/bin/phpdoc on line 40
I tried manually editing the files, inserting the absolute path to the files, but when I correct one require error a new one just comes up.
This is my pear.conf:
#PEAR_Config 0.9
a:15:{s:10:"__channels";a:2:{s:12:"pecl.php.net";a:0:{}s:5:"__uri";a:0:{}}s:15:"preferred_state";s:6:"stable";s:8:"temp_dir";s:35:"/Applications/MAMP/htdocs/pear/temp";s:7:"bin_dir";s:34:"/Applications/MAMP/htdocs/pear/bin";s:7:"php_dir";s:35:"/Applications/MAMP/htdocs/pear/PEAR";s:7:"doc_dir";s:40:"/Applications/MAMP/htdocs/pear/PEAR/docs";s:8:"data_dir";s:40:"/Applications/MAMP/htdocs/pear/PEAR/data";s:8:"test_dir";s:41:"/Applications/MAMP/htdocs/pear/PEAR/tests";s:9:"cache_dir";s:41:"/Applications/MAMP/htdocs/pear/PEAR/cache";s:9:"cache_ttl";i:300;s:12:"download_dir";s:44:"/Applications/MAMP/htdocs/pear/temp/download";s:10:"http_proxy";s:0:"";s:7:"ext_dir";s:74:"/Applications/MAMP/bin/php5.2/lib/php/extensions/no-debug-non-zts-20050922";s:7:"php_bin";s:37:"/Applications/MAMP/bin/php5.2/bin/php";s:10:"sig_keydir";s:39:"/Applications/MAMP/conf/php5.2/pearkeys";}
I'm using MAMP PRO v1.9.5 on Mac OS 10.7.5 with PHP v5.2.17. Also, I installed the packages with the PEAR web interface package manager. If any further information is required, please let me know and I'll post it.
Make sure that the include path contains the folder where PEAR installs php class files. Check your include_path ini setting. It should look like:
include_path=".:PEAR_CLASSES_PATH"
where PEAR_CLASSES_PATH is the pear class path
I just leased a dedicated windows server with Plesk 10.4 installed. I assumed that php, etc would all be configured and that I could prot my sites over with no isses...
Turns out the default image didn't have pear installed...I believe i need pear so include statements work in php...so I used go-pear.bat to install it...
However, I'm still getting an error when including (you can follow the path to see the file exists)
Warning: include(Connections/SamConnection.php) [function.include]: failed to open stream: Operation not permitted in C:\Inetpub\vhosts\80stunes.com\httpdocs\index.php on line 3
Warning: include() [function.include]: Failed opening 'Connections/SamConnection.php' for inclusion (include_path='.;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\PEAR;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5;./includes;./pear') in C:\Inetpub\vhosts\80stunes.com\httpdocs\index.php on line 3
Any ideas on what I have done wrong? I can run pear commands from a command prompt when accessing my pleskphp5 directory
Sounds like you may have open_basedir enabled.
I am trying to install PEAR for use with PHP. As i read on the installation instructions at http://pear.php.net/manual/en/installation.getting.php
, I am supposed to run the file go-pear.bat which I have in my C:\wamp\bin\php\php5.3.0 directory. According to all the installation guides I have read, it should install and ask me a series of installation questions, but I am receiving the following error:
phar "C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar" does not have a signature
PHP Warning: require_once(phar://go-pear.par/index.php): failed to open stream: phar error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236
Warning: require_once(phar://go-pear.par/index.php): failed to open stream: phar error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236
Press any key to continue...
I'm not sure why I am receiving this error. I just installed the new Wampserver recently.
Maybe this is what you are looking for.
Here are the steps:
1) Locate the "php.ini" file. In my
case, I found it at this path:
C:\wamp\bin\php\php5.3.0\php.ini
Don't use the WAMP system tray icon to
edit this file. It didn't work when I
tried - you have to manually locate
it.
2) Find the following line, in bold:
;
http://php.net/phar.require-hash;phar.require_hash
= On ; http://php.net/phar.require-hash
;phar.require_hash = On
3) Uncomment the ";phar.require_hash =
On" line by removing the semi-colon.
4) Change "On" to "Off".
; http://php.net/phar.require-hash
phar.require_hash = Off
5) Save the file.
After I performed those steps,
"go-pear.bat" began working normally
again.
you should be able to start it without editing php.ini using :
PATH/TO/php.exe -d phar.require_hash=0 PATH/TO/go-pear.phar