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
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?
Hi I am trying to install laravel on my server.This is what I did.First I installed composer and tryed running this command in cmd:
composer create-project laravel/laravel RestPHP
After running it I got this this message:
I tryed googeling about this error but could not find anything concrete regarding this error I am very new to php.
After this I tryed a more manual approach.I downloaded laravel and put it in my htdocs folder , then I tryed openning it like this:
http://localhost:8585/laravel/public/
But I got this message:
Warning: require(E:\Projects
IDE\PHPStorm\xampp\htdocs\laravel\bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in E:\Projects
IDE\PHPStorm\xampp\htdocs\laravel\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'E:\Projects
IDE\PHPStorm\xampp\htdocs\laravel\bootstrap/../vendor/autoload.php'
(include_path='.;E:\Projects IDE\PHPStorm\xampp\php\PEAR') in
E:\Projects IDE\PHPStorm\xampp\htdocs\laravel\bootstrap\autoload.php
on line 17
I have my htdocs route at:
E:\Projects IDE\PHPStorm\xampp\htdocs
Both cases seem to be some for of php configuration problem , since I have 0 knowledge of that I could not find a solution.
Could someone please provided me with a step by step solution?
UPDATE
I managed to enable socket transparency ssl and after trying to run the command I get this:
I have also installed git but I still get the same error.What can I do?
Try enabling php_sockets and open_ssl in your php ini
I am trying to get phpdoc working on netbeans but I am getting the following error
PHP Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /Applications/MAMP/bin/php/php5.4.4/bin/phpdoc on line 40
PHP Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:') in /Applications/MAMP/bin/php/php5.4.4/bin/phpdoc on line 40
When I run
pear config-show in the Terminal I get the following php_dir path
/Applications/MAMP/bin/php/php5.4.4/lib/php
I have checked that the php.ini file exits and it does under
/Applications/MAMP/bin/php/php5.4.4/lib/php/phpDocumentor/phpDocumentor/phpdoc.ini
Does anyone know what the problem can be or how to resolve it. I want to use the phpdoc using Netbeans and not have to revert to the Terminal every time I want to update my documentation.
You need to edit include_path in php.ini to add PEAR's php_dir value to it. Notice in the error message that your include_path is set to nothing but ".". As such, the only place PHP is looking for PhpDocumentor/phpDocumentor/phpdoc.inc is right there in your /Applications/MAMP/bin/php/php5.4.4/bin directory. Once you add /Applications/MAMP/bin/php/php5.4.4/lib/php to your include_path, then PHP will be able to find the phpdoc.inc file at runtime.
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 followed exactly what's in: How to use PHP_CodeSniffer with XAMPP? (no more no less)
But i encounter this error:
Warning: require_once(PEAR/Exception.php): failed to open stream: No such file or directory in C:\path\to\htdocs\php-codesniffer\CodeSniffer\Exception.php on line 17
Found out what's wrong. PEAR is not initially enabled in xampp.
include_path = ".;C:\Documents\xampp\php\PEAR"
Also consider this if your changing the include_path value in your php scripts via ini_set.