Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

Installing PEAR packages creates a php5.6.15 directory (3 replies)

$
0
0
This is a Window 7 64bit system.

I have WAMP 3.0.4 32bit installed

I originally installed 32bit from the file wampserver3_x86_apache2.4.17_mysql5.7.9_php5.6.15.exe

I was having virtual host problems with that version so I un-installed it and installed from wampserver3.0.4_x86_apache2.4.18_mysql5.7.11_php5.6.19-7.0.4.exe

Once I had that working, I downloaded the go-pear.phar file (PEAR install) and put it in the \php\php5.1.19 directory and ran it in a command prompt window to install PEAR - php go-pear.phar

It said it found an old copy of PEAR so I ran pear upgrade pear

It finished without any warnings or errors.

Then I installed a PEAR package, the name doesn't matter, I've tried other packages and the problem I'm having occurs with all of them.

The problem is, to me at least, strange -

PHP is installed in \php\php5.6.19 and that is where I put the go-pear.phar and where I run it from as CLI.

When I run pear install xxxxxx - xxxxxx can be anything, even the name of a non-existent package, it creates a new PHP directory under \php.

The name is php5.1.15 and it contains what looks like part of the PEAR files. If the package installed without errors or warnings, the package files will be in a subdirectory of the \php\php5.6.15\pear directory. The name of the subdirectory will be the package name. Thus Text_Highlighter was installed in \php\php5.6.15\pear\Text

As I said above, even if the package does not exist at pear.php.net, the php5.6.15 is created.

I wrote code to use the package and got it working as I wanted it. I merely "required" the package files in my PHP. I moved it to php\php5.6.19\pear\Text and was able to use it from there.

PEAR is simply a repository of packages and an update manager. To use PEAR packages, you don't need to actually installed PEAR, you can simply download the package file manually.

The question is: Why is pear install creating the php5.6.15 directory?

I searched the Windows Registry for the string 5.6.19, there were matches but they had nothing to do with PHP or PEAR.

I did a global file search of all files on the HDD for files containing the same string, 5.6.15 and the only matches were for things unrelated to PHP or PEAR.

My Environment variable PATH contains the directory \wamp32\bin\php\php5.6.19 - the correct directory.

There are Enviroment variables for the PEAR directories, here are the .reg statements that created them:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Environment]
"PHP_PEAR_SYSCONF_DIR"="C:\\wamp32\\bin\\php\\php5.6.19"
"PHP_PEAR_INSTALL_DIR"="C:\\wamp32\\bin\\php\\php5.6.19\\pear"
"PHP_PEAR_DOC_DIR"="C:\\wamp32\\bin\\php\\php5.6.19\\docs"
"PHP_PEAR_BIN_DIR"="C:\\wamp32\\bin\\php\\php5.6.19"
"PHP_PEAR_DATA_DIR"="C:\\wamp32\\bin\\php\\php5.6.19\\data"
"PHP_PEAR_PHP_BIN"="C:\\wamp32\\bin\\php\\php5.6.19\\.\\php.exe"
"PHP_PEAR_TEST_DIR"="C:\\wamp32\\bin\\php\\php5.6.19\\tests"

The only thing I could find , anywhere, which related to php5.6.15 was the actual installation file- wampserver3_x86_apache2.4.17_mysql5.7.9_php5.6.15.exe. It has php5.6.15 in its name. I deleted that file and the problem still exists.

So, why is "pear install xxxxx" creating a php5.6.15 directory?

How do I get it to install packages in the \php\php5.6.19\pear directory.

Does anyone have any ideas???

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>