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.
Related
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
I need to use PHP pthreads on Mac OS High Sierra, but Homebrew is no longer supporting downloads of PHP --with-thread-safety.
How do I get and install a thread safe version of PHP for Mac OS, Php v7.1.16 without homebrew?
If it is going to have to be some sort of manual install - does anyone have step by step directions for the mac or know where I can get instructions?
I have been looking on the internet for instructions for 5 hours now. I'm tired and can't believe that no one has any posted info on this.
I was able to get PHP 7.2.5 installed on Mac OS HighSierra with ZTS/Thread safety by using phpbrew.
Install Steps I took:
Downloaded phpbrew from http://phpbrew.github.io/phpbrew/ and installed with their directions. Please note at the end of the installation, they give you further instructions for setting up your ~/.bashrc to load phpbrew, look for them at the terminal.
Once you have phpbrew running you are ready to install php with zts by using the command below (of course you can install all of the extensions that you like by checking the installation for extension instruction)
phpbrew install php-7.2.5 +openssl='/usr/local/opt/openssl/' -- --enable-maintainer-zts --with-curl=/usr/local/
It is important to have openssl and curl already installed before installing php and you must point to their location on your computer at the install line as I have done above. You can add all the extensions you need, but you must have the openssl and curl because I had a ton of problems with installation without them. But you could try omitting.
For those of you who are using PHP ZTS so that you can go on to install pthreads --ONLY PHP 7.2 and above works with Krakjoes pthread-master which you can download and follow the installation at https://github.com/krakjoe/pthreads
I followed the instructions outlined here:
Install PHP Internationalization extension (Intl) on XAMPP on Mac
Ran sudo pecl install intl
selected the correct files from the Cellar
then this error happened:
/private/tmp/pear/temp/intl/intl_error.h:24:10: fatal error:
'ext/standard/php_smart_str.h' file not found
include
^ 1 error generated. make: *** [php_intl.lo] Error 1 ERROR: `make' failed
No matter, did some research and found out that PHP 7.0.8 deprecated php.smart_str.h to php.smart_string.h
So given my scant knowledge of C++ I copied smart_string.h to smart_str.h and renamed all the headers from STRING to string.....
re-ran pecl -no luck....more errors......without knowing where the .c files are and remaking php (not really interested in going that far) since anyway I'm using XAMPP so that ended that option.
I have php 5.5 on my mac, deep in the usr/local/bin folder
so next step was to get pecl to use those files and generate an intl.so file....
Did that....I have the intl.so file so put it in the 'extensions' folder in XAMPP (for reference: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012)
Ran php and came up with this error:
Warning: PHP Startup: Unable to load dynamic library
'/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/intl.so'
- dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/intl.so,
9): Symbol not found: _zval_used_for_init Referenced from:
/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/intl.so
Expected in: flat namespace in
/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20151012/intl.so
in Unknown on line 0
I imagine it has to do with different versions?
In any case I can't get pecl to install intl without a make error in PHP 7.0.8 on XAMPP. There is no documentation on this and you'd think that if you deprecate a header.h file you'd update all extensions?
Install intl.so in PHP 7 seems impossible?
After a lot of research I was finally able to resolve this. Detailed steps here:
before you begin, check which php path is set. it should be /Applications/XAMPP/xamppfiles/bin/php. If not you can change it by PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}". more detail here
Overall idea is to build the intl-extension from PHP source code on your own. Before you begin make sure you have installed Xcode. Also, install the latest version of autoconf. this might help:
brew install autoconf
Next download the version of PHP you use in XAMPP from php.net. I am using 7.1.18. This version worked for me: php-7.1.31, I’m guessing if you follow the steps it might work for 7.0 or 7.2 as well. Do let me know if it does or doesnt, I’ll update this post. Do not use PHP 7.3 for Magento 2.3.0, it is not supported.
Extract the tar.gz file using (I extracted it inside ~/Downloads/ folder )
tar -xzvf php-7.1.31.tar.gz
cd into the extracted folder
cd php-7.1.31
change to subfolder ext/intl
cd ext/intl/
Run these commands to build the extension
/Applications/XAMPP/bin/phpize
./configure --enable-intl --with-php-config=/Applications/XAMPP/bin/php-config --with-icu-dir=/Applications/XAMPP/xamppfiles/
make
sudo make install
you can now delete all files you downloaded and also the extracted folders.
Open /Applications/XAMPP/xamppfiles/etc/php.ini , and add extension=intl.so
Restart your Apache using XAMPP GUI and it should work.
So far, it seems that extension intl.so for php is bundled with php
and should be compiled with php (intl --enabled). XAMPP does not support this (as of Oct 2016), MAMP does. I do not know about other distros. However, if you're willing to recompile PHP 7, it's worth it just to do that and enable it during compiling.
So....I ran with MAMP. Then I decided that I would simply install apache 2.4 and php 7 and Mysql without the stack and the junk that comes with MAMP or XAMPP and everything works like a charm... so if you need to use CakePHP or intl support etc... just drop XAMPP/MAMP and go with a standard install. I used homebrew (MacOS) and everything is working fine.
Update: As regards Windows, XAMPP does not default it, but you can add the module (dll) in php.ini and works like a charm
The error means that XAMPP doesn't have PHP compiled with intl. You may try:
pecl install intl
but probably it won't work as well.
See: PHP Bug #72879 Pecl install intl make error with PHP 7.0.8.
As for the workaround, try installing memcached extension instead of memcache, e.g.
pecl install memcached
Note: It also requires libmemcached package/library to be installed beforehand. For macOS, install via: brew install libmemcached.
If you wanna try without homebrew, with native apache and php, look at my aswer here: https://stackoverflow.com/a/55131868/3692846
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.
I'm trying to install the PHP intl extension on Mac 10.6 "Snow Leopard" using the following command:
sudo pecl install intl
...but getting the following errors:
running: phpize
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
ERROR: `phpize' failed
I am using the bundles Apache server with PHP 5.3.4.
Does anyone know how to install the intl extension?
Have you thought about using MAMP instead? It generally works better than Apple's bundled packages.
I've installed Zend Server CE and everything works 100%.
I removed Zend Server CE later on, and used this instead:
http://php-osx.liip.ch/ which is specifically built for Mac OSX 10.6, and Symfony2 in mind.
This worked better for me in the end, as I'm a Netbeans user, this means I can use xdebug bundled with the liip distribution.
I found it a bit cumbersome getting xdebug installed on Zend Server CE, and also, the liip PHP installation doesn't install an additional Apache and MySQL, it uses what is already included with the OS.
Try installing autoconf
brew install autoconf
Regards
This might be an old post, but for me, I found the easiest option was to install PHP using the liip service (http://php-osx.liip.ch/). Using one simple command, it installed the latest version of PHP, configured it with the existing apache server installed on my mac all along with the intl extension. A number of hours frustration solved in a couple of minutes!