Installing PEAR on Windows 7 - php

Ok guys, I've been trying to do this for 3 days. I downloaded php5 and tried unsuscessfully to install pear, it installed but would just give me a return on the cli when i tried to install a package.
So I deleted the php5 folder and all the enviornemnt variables.
I put in a php7 folder and tried downloading the go-pear.phar file using curl, and updated the enviornment variables. Now when I run the "php go-pear.phar" command it gets stuck in an infinite loop and I have to press cntrl-c to exit. it says ERROR where you should press enter.
I don't know if the previous version of php is throwing off the install, is there anything besides the enviornment variables? A bin directory?? Should I just get a mac and blow this laptop?

The answer was to do a manual install. If anyone does this and gets an error that the pear install dir is wrong, just search the bat file for "pear" and you'll see where they added it to the %prefix%
https://nikic.github.io/2011/12/03/Manually-installing-PEAR-on-Windows.html
that was a bitch!

Related

No releases available for package "pecl.php.net/mongodb"

I want to use mongodb in laravel project. so I tried to install mongodb driver for php by running this command pecl install mongodb on cmd but I got this answer
No releases available for package "pecl.php.net/mongodb"
install failed
what should I do?
If you are on a windows machine, go to the official pecl website:
https://pecl.php.net/package/mongodb
then click on the DLL link for your version of choice.
On next page scroll down and download the one matching your PHP version.
Then you should extract the zip file and copy the php_mongodb.dll to your php/ext dir. Then open your php.ini and add the following line:
extension=php_mongodb.dll
This happened to me because for some minutes, the PECL repositories were not accessible. The error was happening both on CI an my local (both on Linux) and after some minutes, it got fixed without any action from my side.
I was also facing the same problem. You can just write the following line in your command line(This will work on Mac):
$ sudo pecl install mongodb

Can't open PHP, dyld: Library not loaded

I am aware there are many other questions related to this error, but I have tried all the answers and nothing worked.
Full error
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /usr/local/opt/php#7.1/bin/php
Reason: image not found
Abort trap: 6
When did the error occur?
Right after updating Ruby to 2.6.3 via RVM.
Whenever I enter "php" into the terminal the error appears.
Steps taken
Basic steps: Restart Macbook, opened new terminal window.
Uninstall/Reinstall: Node, Openssl, libpng, Ruby
Update/Upgrade: brew
Unlinked/Linked: libidn, autoconf
Given myself all rights via chown -R /usr/local
OpenSSL: $ sudo rm /usr/bin/openssl, brew reinstall openssl#1.1
Brew cleanup
Reinstalled PHP
Versions
Mac OS Mojave 10.14.6
PHP 7.4
Ruby 2.6.3p62
RVM 1.29.9
When running Brew Doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/opt/local/bin/python2.7-config
/opt/local/bin/curl-config
/opt/local/bin/ncursesw6-config
/opt/local/bin/pcre-config
/opt/local/bin/ncurses6-config
/opt/local/bin/pcap-config
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
(here it posts all the /usr/local/include/node files, but the list exceeds character limitations)
Any ideas on how to solve this error?
I had similar issue which I fixed this way:
brew reinstall php
I will answer my own question for others who might run into a similar issue
After having uninstalled and reinstalled every single keg of brew I found the following solution:
Uninstall PHP
Run brew cleanup
Check your /usr/local/opt folder for any folders named php
Delete the folder (in my case it was called 'php#7.1')
Open a new terminal window
Run 'brew search php' in the terminal and make sure no php keg is installed.
Simply type 'php -v' in the terminal. For me this showed a version number, indicating that php was (at one point) installed without brew. You can choose to uninstall this version or update it to the newest version.
Conclusion
In my case I believe it was simply that PHP 7.1 was already installed and I installed a 2nd version (7.4) via brew.
The error 'Referenced from: /usr/local/opt/php#7.1/bin/php' was obviously searching for something in this folder and after deleted it, the error stopped.
In my case, i had multiple version of php installed on my macOs, which was later remedies with laradock.
Primary problem:
❯ php -v
dyld[62395]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicuio.70.dylib
Referenced from: <31116583-6CB3-3C7B-AD46-52FF1431267E> /opt/homebrew/Cellar/php#7.4/7.4.30/bin/php
Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicuio.70.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicuio.70.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicuio.70.dylib' (no such file), '/usr/local/lib/libicuio.70.dylib' (no such file), '/usr/lib/libicuio.70.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/icu4c/72.1/lib/libicuio.70.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/72.1/lib/libicuio.70.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/72.1/lib/libicuio.70.dylib' (no such file), '/usr/local/lib/libicuio.70.dylib' (no such file), '/usr/lib/libicuio.70.dylib' (no such file, not in dyld cache)
Also tried
❯ brew uninstall php
Warning: Calling plist_options is deprecated! Use service.require_root instead.
Please report this issue to the mongodb/brew tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/opt/homebrew/Library/Taps/mongodb/homebrew-brew/Formula/mongodb-community.rb:55
As indicated "Referenced from" a php version was still installed after mutliple attempts of brew uninstall php
Solution:
rm -rf /opt/homebrew/etc/php
After above brew install php without a problem.
Hope this helps.

PHP Libsodium Installing Latest Library Failing, Linux Newb

I installed PHP extension libsodium via PECL on Linux, and everything seemed fine as I started to test the functions, but I've noticed that some functions are working and others are not.
For example, when I call sodium_crypto_generichash and sodium_crypto_secretbox i get no errors, but when i call sodium_crypto_pwhash I get an error in PHP saying sodium_crypto_pwhash is not a function.
I'm new to PHP and Linux but I'm thinking this means my PHP library is out of date. When I call
var_dump([
SODIUM_LIBRARY_MAJOR_VERSION,
SODIUM_LIBRARY_MINOR_VERSION,
SODIUM_LIBRARY_VERSION
]);
I get
array(3){[0]=>int(9)[1]=>int(1)[2]=>string(5)"1.0.8"}
And I see at https://github.com/jedisct1/libsodium/releases the latest release is 1.0.16
So I would like to install the latest library. As I'm new to Linux I'm trying to do this in the terminal and I don't know what to do. these are the steps I followed to this point, starting from my home directory
wget https://github.com/jedisct1/libsodium/releases/download/1.0.16/libsodium-1.0.16.tar.gz (downloads the file ok)
tar -xvzf libsodium-1.0.16.tar.gz (unzips the file ok, creates libsodium-1.0.16 directory)
cd libsodium-1.0.16 directory
Now what?
Any help would be appreciated.

how to set develop environment for zend framework 1.11.11 in netbeans 7.1.1 using wamp?

hey guys I need your help for setting environment for zendframe work ? I have installed my netbeans in D: drive under D:/program files/netbeans. and the zend framework is under D: drive. and my wamp package is installed under c:/wamp. now what i need is to configure these all for my development?
I searched google, stackoverflow and every blog i could for the whole day. but all that I got is a error given below.
'"php.exe"' is not recognized as an internal or external command,
operable program or batch file.
tell me how can I solve this ? what should I do ? Do I need to set all these under one roof or I need to upgrade my PHP version ???
Yes My config is written below.
WAMP Server 2.0c with PHP 5.2.6, MySQL 5.0.51b, Apache 2.2.8.
Netbeans 7.1.1 and Zend framework 1.11.11
Add php.exe to your environment variable PATH. If you add the directory where php.exe is installed to your PATH environment variable (you may need to log out for it to take effect), it should work.
See this tutorial
You may actually specify the path to PHP interpreter within Netbeans, in Options - PHP - General tab.
Perhaps you should set up the include_path as well to make Zend modules (at least autoloading one) recognizable.
Update to a more up-to-date version of PHP first.
Then, ensure that PHP is on your environment PATH variable. You can look up on google how to do that.
You'll have to install phpunit too after you get that setup. WAMP might come with it but I doubt it. Usually this is easy if you have pear. You can get the pear commands from the phpunit site.
If you don't have pear you'll have to install that. Download a 'go-pear.phar' file that is appropriate to you. You usually install it by running php go-pear.phar' and then you can use pear it install phpunit.
You can then call it a day OR you can continue setting up Netbeans to automatically use phpunit.
If you don't setup netbeans then you'll have to just use phpunit on the command line.
After the pear phpunit install just run phpunit on the command line and you should get some sort of 'help' output.
Edit : Step by step details.
I'm going to assume you have xdebug, php, netbeans installed from your comments. It seems like your only issue is installing phpunit.
Here goes.
Open up a command prompt
Open a browser window.
In your browser go to http://pear.php.net/go-pear
Save the text file that comes up into the directory php is installed in.
Go to the php directory php is installed in via the cd command on the terminal.
Type in the command php go-pear.phar
Follow the installation instructions for pear and pick the options that make the most sense. I just install everything in the php directory so php and pear live in the same place.
After pear is installed type in the following commands ( from the phpunit install website : http://www.phpunit.de/manual/current/en/installation.html ) You might have to use sudo here, if you're on windows maybe not.
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
9 Run phpunit -h on the command line and you should get some help message. If you're on windows you might have to open up a new command line prompt before you try this.

EasyPHP 5.3.9 - can't run php from windows console

I decided to upgrade my easyphp server, and after installing found that I can't run php from console anymore, for some reason when tried to install pear, I get an error box. The program can't start because php5.dll is missing from your computer. Try reinstalling the program to fix this problem.
Try uninstalling easyphp completely and delete all remaning files after uninstalling, sometimes they don't get deleted all, so you have to do it manually, then reinstall it and see if that works

Categories