[PHP] Configuration php.ini

As I said in my blog, it is just a place to remind me the technology that I used everyday, there will be nothing so profound but useful in daily work.

This blog will present a simple schema for the configuration of the php.ini. There are several php.ini after installed php, it is very easy to be confused.

Continue reading

Advertisements

Problem installing PEAR and solution

Today during the confirgration of my phpUnit, when I run C:\wamp\bin\php\php5.3.5>go-pear.bat

I met this problem :

C:\wamp\bin\php\php5.3.5\go-pear.bat

phar “C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar” does not have a signaturePHP Warning: require_once(phar://go-pear.phar/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.5\PEAR\go-pear.phar on line 1236

Solution :

Find this code in C:\wamp\bin\php\php5.3.5\php.ini :

[Phar]
; http://php.net/phar.readonly
;phar.readonly = On

; http://php.net/phar.require-hash
;phar.require_hash = On

;phar.cache_list =

Change it to :

[Phar]
; http://php.net/phar.readonly
;phar.readonly = On

; http://php.net/phar.require-hash
phar.require_hash = Off

;phar.cache_list =

A similar problem in stackoverflow :
http://stackoverflow.com/questions/1652941/why-am-i-receiving-an-error-when-installing-pear