PECL install failed - php

after upgrading from PHP5.2.6 to php 5.3. it seams, I also have to reinstall the PHP memcache-module.
So I downloaded the newest version of memcache (3.0.6) and followed this documentation:
http://www.php.net/manual/en/install.pecl.pear.php
pecl install memcache
Which results in the following error-message:
No releases available for package "pecl.php.net/memcache"
install failed
what's going on here? By the way: the server is not connected to the Internet, but that shouldn't be a problem, right?!

To answer my own question an for rising the intellectual horizon of #OZ_ and #martswite
an offline-installation of an pecl extension works like the following way:
1.) download the extension from http://pecl.php.net/packages.php
2.) there you get an .tgz file
3.) install the file:
pear install memcache-3.0.6.tgz

PECL modules are (by default, and most of the time) downloaded from a non-local repository.
Therefore you will need some form of internet connection to download it.
Alternatively you can upload the pecl package from your machine to a location on the servers local file system and install it from there, or compile from source.

To me this error was caused due to php without support for ssl.
Enable openssl or recompile with openssl built int.
Check php support in a Linux host run
php -i | grep openssl
Should print a line with openssl if support enabled.

Related

Unable to find the socket transport "ssl" pecl packages are unreachable

I'm trying to use pecl, but everytime I got this error message. I don't have xampp. I don't have any apache, I'm using only the built in php server. So I don't have xampp directory, it's only C:\php for me. Now I edited the php.ini file, I removed the semicolon from the extension openssl, but it's still erroring. Do I have to download any OpenSSL directory? I tried, but it's only a git repository, what needs a lot of other applications to run... I don't know if I really need to download Embarcadero C++, and MinGV? That seems too complicated to me... I wanted to use some packages, like php memcache, and oci, but for that I had to install pear (it was NOT included in php), then install pecl, then I have to install these C++ apps, and MinGV to run OpenSSL to be able to download pecl packages? No way...
Windows 10 64x
PHP 8.0.12
Have you tried to install OpenSSL windows client?
Please install OpenSSL and set php.ini by
OPENSSL_CONF=LOCATION_OF_SSL_INSTALL\bin\openssl.cfg

Php curl installed yet composer says its not

I am trying to get composer running solely for the purpose of updating my cc merchants files (since they are incompetent enough to make this the only way for downloading the api source)
I have an error from composer saying
Problem 1
- The requested PHP extension ext-curl * is missing from your system. Install or enable PHP's curl extension.
I have curl installed (responds in cmd) and and enabled the extension in the php.ini files i have found. What am I missing?
I have curl installed (responds in cmd) and and enabled the extension in the php.ini files i have found. What am I missing?
Hmm, it seems your are guessing around where the correct php.ini is in order to enable the PHP extension curl, right?
These steps might help you:
Please run php --ini on the CLI to find the php.ini to edit (Loaded Configuration File).
Then edit that php.ini and enable the PHP Extension curl.
Test, that curl is available: php --ri curl (the command prints the extension configuration).
Then run composer on the CLI again.
Curl and php5 curl extension is a different application.
If you are using ubuntu / debian based unix, you can install it with apt-get install php5-curl.
If after installing php5-curl it still doesn't works, it's possible the extension still not enabled. You can enabled it by using command php5enmod curl.

How do I install php-cgi? I tried MacPort, Package and everything else but none works

I am trying to install php-cgi on my macbook (Yosemite 10.9.3) because the PhpStorm IDE keeps coming back to me "php-cgi not found" when i try to open things in browser. I tried to use a newer version of php interpreter because the current version is 5.4. But I can only find the packages in the php.net site but I have no clue how to install it. I also tried to download homebrew but again have no clue how to start there. I tried to use MacPort to install a fastcgi by using this line:
sudo port install php5 +fastcgi
But it returns this:
---> Dependencies to be installed: autoconf213 gawk gettext expat libiconv ncurses readline m4 perl5 perl5.16 gdbm bzip2 gsed libtool libxml2 xz zlib mhash pcre libedit pkgconfig
---> Fetching archive for expat
---> Attempting to fetch expat-2.1.0_0.darwin_13.x86_64.tbz2 from http://packages.macports.org/expat
---> Attempting to fetch expat-2.1.0_0.darwin_13.x86_64.tbz2.rmd160 from http://packages.macports.org/expat
---> Installing expat #2.1.0_0
---> Activating expat #2.1.0_0
Error: org.macports.activate for port expat returned: Image error: /opt/local/bin/xmlwf already exists and does not belong to a registered port. Unable to activate port expat. Use 'port -f activate expat' to force the activation.
Error: Failed to install expat
Please see the log file for port expat for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_expat/expat/main.log
Error: The following dependencies were not installed: autoconf213 gawk gettext expat libiconv ncurses readline m4 perl5 perl5.16 gdbm bzip2 gsed libtool libxml2 xz zlib mhash pcre libedit pkgconfig
To report a bug, follow the instructions in the guide:http://guide.macports.org/#project.tickets
Error: Processing of port php5 failed
I run a self-update with the MacPort already (version 2.3.0). Can anyone help out? Thank you so much!
P.S. For PhpStorm, I am forced to use the built-in web server when i try to view the code in the browser. If anyone got a way to do that without their built-in server, that would be great too. I have a zend server installed already.
P.S. I am using NetBeans now. But I guess it is good to make sure I get things like this settled while I am working on other things.
It took me a few tries to get PhpStorm setup with MacPorts. These are the basic steps:
sudo port install php53 php53-cgi
This should create /opt/local/bin/php53 and php-cgi53, so next:
cd /opt/local/bin
ln -s php53 php
ln -s php-cgi53 php-cgi
Then register the PHP Interpreter with PHP Home set to /opt/local/bin and it should detect it and "Open in Browser" correctly.
For PhpStorm, I am forced to use the built-in web server when i try to view the code in the browser. If anyone got a way to do that without their built-in server, that would be great too. I have a zend server installed already.
You are NOT forced in any way.
Just configure Deployment entry (Preferences | Deployment) and mark it as Default for this project. The URL defined there will be used when previewing pages from PhpStorm.
Without deployment entry the built-in web server is used by default.

OAuth PHP for Windows?

I'm running XAMPP on windows and trying to install Oauth into PHP. I already tried running "pecl install oauth" but it gave me error. i don't have a compiler to compile the OAuth 1.10 into .dll, and really don't have the time to learn how to compile it.
the link for the pecl package is here: http://pecl.php.net/package/oauth/1.1.0
EDIT after running 'pecl install oauth' the error i get is this:
WARNING: php_bin C:\XAMPP\xampp\php\php.exe appears to have a suffix \php.exe,
but config variable php_suffix does not match.
ERROR: The DSP oauth.dsp does not exist.
thanks!
This is usually do to incompatibility between the oAuth version and PHP. You can get the latest oAuth library precompiled from the windows.php.net site:
http://windows.php.net/downloads/pecl/releases/oauth/
Also don't forget to add the extension to your php.ini and restart Apache afterwards.
Install APC on Windows:
PECL is used for downloading and
compiling extensions, but Windows
machines generally don't have what is
required to compile these, instead try
looking for and downloading a
pre-compiled .dll.

How to add Solr PECL extension into lampp (xampp) stack

Is it possible to add PECL extensions into a lampp stack? If so, how can it be done?
I am specifically interested in http://www.php.net/manual/en/book.solr.php extension.
EDIT: when installing this extension using:
/opt/lampp/bin/pecl install -f solr
everything seams to go as it should except at the end:
checking for cURL support... yes, shared
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
ERROR: `/tmp/pear/temp/solr/configure --enable-solr=yes --enable-solr-debug=no --with-curl=/opt/lampp/bin --with-libxml-dir=/usr' failed
From what I understand this should mean that it simply needs to find the correct curl location which I specify in the install when it asks as 'opt/lampp/bin'
Does this mean that it can't be done without recompiling php using a different curl package? Is this even possible with a lampp stack or do I have to now build my own?
Any ideas?
see PHP: Installation of PECL extensions.
Also take a look at the requirements of the SOLR extension module: http://docs.php.net/solr.requirements

Categories