PHPBrew - Install php 5.3.2 with openSSL on Ubuntu 18.04 - php

I am trying to install PHP 5.3.2 on Ubuntu 18.04 using PHPBrew. I have no trouble with installing it without OpenSSL but when I want to install OpenSSL I get several errors.
My first attempt was to just use +openssl but then I got a lot of errors from OpenSSL. Then I installed OpenSSL 0.9.8 and used it as +openssl=/usr/local/openssl/ and now I get the following error:
configure: error: Cannot find OpenSSL's libraries
I have no idea what libraries it can't find. I already fixed the missing evp.h file by making a symbolic link in /usr/local/openssl to /usr/local/openssl/include/openssl/evp.h.
Edit: Haven't found a fix yet, just went with the version without OpenSSL.

Related

How to uninstall PHP 7.3 after build-from-source using Homebrew on Mac OS 11

I need to run a php application that was built on php 7.3. Now that php 7.3 is no longer supported, I was unable to install using homebrew without including the --build-from-source option. I went ahead and attempted to build php 7.3 from source While trying to install and I encountered an error that terminated the build process:
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
make: *** [ext/phar/phar.phar] Bus error: 10
make: *** Waiting for unfinished jobs....
I've researched the error and found that this may have to do with the fact that I am installing on a Mac with an Apple M1 chip. I'd like to uninstall it now, upgrade the application to a supported version of php, and then run it. I tried running brew uninstall php and then install home-brew's default php, but the binary that was created by the first attempt is taking precedence over the latter php 8.0 version I installed.
My question is, is deleting the binaries located at /usr/bin/ enough to completely remove the unsupported version of php from my system? I searched the tar for an uninstall target but no luck.
I just want to clean it out of my system and start over. I don't imagine that there is a php 7.3 version that works with my Apple M1 chip.
Thanks much

How to install PHP using asdf

I am trying to install PHP using asdf on Ubuntu 20.04 LTS without success. While installing, it generates many errors regarding missing packages in the main installation like the absence of re2c, bison, libcurl, etc... I succeeded in install all these packages but now when I try to install PHP through asdf I am getting the following error:
checking for PQprepare in -lpq... no
configure: error: Unable to build the PDO PostgreSQL driver: a newer libpq is required
Anyone can help me to fix this problem?
PS.: I have PHP 7.4.3 installed in my system. I installed it through apt command.

Trouble installing mssql extensions for PHP

We're using a MSSQL db at work and I want to be able to write PHP scripts that fetches data directly from the db to my local MAMP environment. I've tried installing pdo_sqlsrv and sqlsrv using Homebrew and I've tried compiling the extensions on my own using PECL commands, but in both cases it has ended unsuccessfully with the error message:
fatal error: 'sql.h' file not found
I've been googling this problem all day and can't seem to find a solution that I can get to work/understand. I'd be grateful for any help or hints.
Computer: Macbook Pro 2018 (macOS 10.13.6)
Local environment: MAMP PRO 4.5 (PHP version: 7.2.1)
I found the solution here: https://github.com/Microsoft/msphpsql/issues/198
I was missing tools provided by unixodbc, so:
brew install unixodbc
...provided the .h file(s) I was missing. The PECL installer was then able to locate the required libraries. In case it wouldn't have worked, I would have tried:
sudo CXXFLAGS="-I/usr/local/opt/unixodbc/include" LDFLAGS="-L/usr/local/lib" pecl install pdo_sqlsrv
sudo CXXFLAGS="-I/usr/local/opt/unixodbc/include" LDFLAGS="-L/usr/local/lib" pecl install sqlsrv
...as suggested in the link.

Installing mcrypt on mac php 7.1.16

I need to set up a magento site locally but during installation I'm getting the error 'PHP extension "mcrypt" must be loaded.' I then checked for the extension by doing php -m and noted the extension isn't there.
I then tried to install it with brew install php71-mcrypt which didn't work so I tried brew install mcrypt #php71-mcrypt but I'm getting the error 'Error: No available formula with the name "#php71-mcrypt"'.
Anybody know how to get this installed or how to bypass the error for the magento installation?
In case it helps anybody else I solved the issue by using a different php version for mamp!

gnupg for PHP on OSX

I'm trying to set up gnupg for use in PHP on my mac.
I have tried following the directions found at the following links:
http://measure9.varkel.net/2013/10/building-gnupg-for-php-5-5-on-osx/
Install PHP gnupg using PECL on MAC/MAMP 10.8.4
What I seem to be running into with both is this message:
checking for gpgme_check_version in -lgpgme... no
configure: error: wrong gpgme lib version or lib not found
I see this when executing the './configure' command.
I have installed gpgme using Homebrew.
I'm a bit stuck as I've tried everything I can come up with and haven't had any luck.
I am running PHP 5.6.7 on OSX 10.10.2 using MAMP Pro.
Thank you in advance for any help you can provide.
EDIT:
My original question was unclear, so I'll try again.
I am trying to install gnupg for use in PHP in my dev environment, which is a macbook using MAMP.
I fist installed gpgme and gnpug using Homebrew, both with no issues.
Then I attempted to install gnupg using pecl via the following command
sudo pecl install gnupg
And I end up with this error message
configure: error: wrong gpgme lib version or lib not found
ERROR: `/private/tmp/pear/install/gnupg/configure' failed
I have tried editing my path with no success, adding usr/local/include and usr/local/lib, where gpgme.h and libgpgme.a files can be found. I see no change in the error message.
EDIT 2:
I believe that gpgme is being installed correctly and pecl is able to find it. I install it using the following command
brew install gpgme
If I then run the pecl command to install gnupg, I get the error message above.
Now, if I execute the brew command to uninstall gpgme
brew uninstall gpgme
I see the following error message when trying to install gnupg with pecl
configure: error: Please reinstall the gpgme distribution
ERROR: `/private/tmp/pear/temp/gnupg/configure' failed
which seems to indicate that the library is installing and being found, but it's an incorrect version.
I am unable to find any information on what version is required for pecl to install gnupg.
EDIT 3:
Looking at the terminal a little more, I see that it's failing to find a specific function (gpgme_check_version) in the lib file.
checking for gpgme_check_version in -lgpgme... no
configure: error: wrong gpgme lib version or lib not found
ERROR: `/private/tmp/pear/temp/gnupg/configure' failed
I'm not entirely sure what happened, but I believe my installation of autoconf was somehow compromised.
What ended up solving my problem was using brew to uninstall autoconf and gpgme, then using brew to reinstall both packages.

Categories