asdf-community / asdf-php Goto Github PK
View Code? Open in Web Editor NEWPHP plugin for the asdf version manager
Home Page: https://github.com/asdf-vm/asdf
License: Apache License 2.0
PHP plugin for the asdf version manager
Home Page: https://github.com/asdf-vm/asdf
License: Apache License 2.0
Hello, and first of all, thanks for the work done so far.
There seems to be no possibility to build using asdf-php when ICU is v68 or above. Indeed, as stated here http://site.icu-project.org/download/68, the v68 ICU library doesn't define TRUE
and FALSE
, which results in the following issue (regardless of minor version installed, the 7.{0-2} cannot build), example for 7.1.33) :
/tmp/tmp.JS3ZQ5bJJH/php-src-php-7.1.33/ext/intl/timezone/timezone_class.cpp: In function ‘HashTable* TimeZone_get_debug_info(zval*, int*)’:
/tmp/tmp.JS3ZQ5bJJH/php-src-php-7.1.33/ext/intl/timezone/timezone_class.cpp:324:28: error: ‘FALSE’ was not declared in this scope
324 | tz->getOffset(now, FALSE, rawOffset, dstOffset, uec);
| ^~~~~
make: *** [Makefile:1244: ext/intl/timezone/timezone_class.lo] Error 1
make: *** Waiting for unfinished jobs....
/tmp/tmp.JS3ZQ5bJJH/php-src-php-7.1.33/ext/intl/timezone/timezone_methods.cpp: In function ‘void zif_intltz_from_date_time_zone(zend_execute_data*, zval*)’:
/tmp/tmp.JS3ZQ5bJJH/php-src-php-7.1.33/ext/intl/timezone/timezone_methods.cpp:94:64: error: ‘FALSE’ was not declared in this scope
94 | tz = timezone_convert_datetimezone(tzobj->type, tzobj, FALSE, NULL,
| ^~~~~
make: *** [Makefile:1246: ext/intl/timezone/timezone_methods.lo] Error 1
From what I could gather, the a "temporary" way to fix this would be to define the U_DEFINE_FALSE_AND_TRUE
to 1
for gcc
not to error at compile time, but I don't really know where or how it would fit with the rest of the existing code (in asdf-php), or if it even should be considered.
Any ideas / suggestions ?
I tried the install on a fresh MacOs Catalina today.
Failed at compiling with Bison:
configure: error: bison 3.0.0 or later is required to generate PHP parsers (excluded versions: none).
It's still using the system bison.
All homebrew dependencies are satisfied. I tried exporting respective PATH's but it still doesn't find the correct PKS.
The asdf-php workflow.yml DID NOT install the dependencies which might mean that the error already appears earlier..
$ asdf install php latest
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 125 100 125 0 0 357 0 --:--:-- --:--:-- --:--:-- 357
100 13.8M 0 13.8M 0 0 3708k 0 --:--:-- 0:00:03 --:--:-- 5073k
buildconf: Checking installation
buildconf: autoconf version 2.69 (ok)
buildconf: Forcing buildconf. The configure files will be regenerated.
buildconf: Cleaning cache and configure files
buildconf: Rebuilding configure
buildconf: Rebuilding main/php_config.h.in
buildconf: Run ./configure to proceed with customizing the PHP build.
configure: WARNING: unrecognized options: --with-freetype-dir, --with-icu-dir, --with-jpeg-dir, --with-png-dir, --with-libxml-dir, --with-libzip, --enable-gd-native-ttf, --enable-wddx, --enable-zip, --with-gd, --with-mysql
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-apple-darwin19.4.0
checking host system type... x86_64-apple-darwin19.4.0
checking target system type... x86_64-apple-darwin19.4.0
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether ln -s works... yes
checking for system library directory... lib
checking whether to enable runpaths... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for bison... bison
checking for bison version... 2.3
configure: error: bison 3.0.0 or later is required to generate PHP parsers (excluded versions: none).
Is it possible call make -j $(nproc)
in install script to speed php build to make good use of multi-cores,
This will save a lot of time.
Currently, installing PHP through asdf doesn't ship postgres support. Is it possible to modify the compilation from asdf without changing the entire lib of asdf-php?
The installed libs are
Array
(
[0] => Core
[1] => date
[2] => libxml
[3] => openssl
[4] => pcre
[5] => sqlite3
[6] => zlib
[7] => bcmath
[8] => calendar
[9] => ctype
[10] => curl
[11] => dba
[12] => dom
[13] => hash
[14] => fileinfo
[15] => filter
[16] => ftp
[17] => gd
[18] => gettext
[19] => SPL
[20] => iconv
[21] => intl
[22] => json
[23] => mbstring
[24] => session
[25] => standard
[26] => pcntl
[27] => mysqlnd
[28] => PDO
[29] => pdo_mysql
[30] => pdo_sqlite
[31] => Phar
[32] => posix
[33] => readline
[34] => Reflection
[35] => mysqli
[36] => shmop
[37] => SimpleXML
[38] => soap
[39] => sockets
[40] => exif
[41] => sysvmsg
[42] => sysvsem
[43] => sysvshm
[44] => tokenizer
[45] => wddx
[46] => xml
[47] => xmlreader
[48] => xmlrpc
[49] => xmlwriter
[50] => zip
)
Thanks in advance
I just started using .asdf for php on a fresh machine and needed to install wget in addition to the ones listed in the github workflow.
Trying to install the PHP 5.6.40 this error are shown.
MacOS latest version. Mojave 10.14.6.
Curl was installed from Homebrew
Using ZSH.
This is on my .zshrc
export PATH=/usr/local/opt/curl/bin:q$(brew --prefix openvpn):/sbin:$HOME/.asdf/shims:$HOME/bin:/usr/local/bin:$(brew --prefix [email protected])/bin:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH
Add the vendor/bin
directory of $COMPOSER_HOME
or ~/.config/composer/vendor/bin
to PATH. This will allow running globally installed Composer packages.
Does it make sense to add support for composer to this plugin? And also support for default global packages as per the nodejs and ruby plugins?
If you think this is worthwhile doing and are open to a PR, I'll have a stab at implementing it.
Hello, today I updated my manjaro and since then I'm getting the error:
/home/bruno/.asdf/installs/php/7.4.26/bin/php: error while loading shared libraries: libicuio.so.70: cannot open shared object file: No such file or directory
Anyone going through the same error and any north or solution?
When installing composer is always on v2, but one may need v1.
It would be great to be able to do something like COMPOSER_VERSION=1 asdf install php <version>
.
Could support for this be added?
After upgrading to Ubuntu 22:10 Lts, as of today the stable release, asdf-php has stopped working. It complains about missing library
error while loading shared libraries: libicuio.so.67: cannot open shared object file: No such file or directory
In addition the libicuio.so.67 has no candidate in the Jamy Jellyfish (LTS) repos, and has broken dependencies if it is installed via deb. Im assuming as 22:10 is probably at icu 70, which seems to new for the current build? This is mentioned in #90
As this is a very new update, I'm wondering if there is any workaround, other than installing php in my system or building the plugin from source again, with some relevant flags?
It also appears to only be an issue with this plugin.
I think this could be the same issue as #117
After installing all brew
dependencies (brew install autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip pkg-config re2c zlib
), I'm stuck at PostgreSQL check:
checking for PDO_DBLIB support via FreeTDS... no
checking for Firebird support for PDO... no
checking for MySQL support for PDO... yes
checking for MySQL UNIX socket location... no
checking for PDO includes... checking for PDO includes... /var/folders/x5/0v2t1jt94xx3k5n6v764v8qw0000gn/T/php-src-php-7.2.34/ext
checking Oracle OCI support for PDO... no
checking for ODBC v3 support for PDO... no
checking for PostgreSQL support for PDO... yes
checking for pg_config... not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
Is there a way to disable psql support by default?
I'm on macOS Monterey, with no system PHP installed.
i need to install php-curl and other extention. How to install it in different version of php?
Install the dependencies required for Debian, then run asdf install php 7.0.33 and meet with the following error:
checking for icu-config... no
checking for location of ICU headers and libraries... not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
Not sure where to go from here. 😕
I have verified asdf-php installation on Ubuntu 18.04 cloud image. I think the following packages are required autoconf bison build-essential curl gettext libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libpng-dev libpq-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config zlib1g-dev
.
And autoconf
and libssl-dev
is missing in README.md
I'm trying to compile like this:
PHP_WITHOUT_PDO_PGSQL=yes asdf install php 7.4.23
I'm also having the same issue as this, but I'm ignoring it for now. I don't need Postgres support.
Compilation fails with the following error:
Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
Fatal error: Uncaught InvalidArgumentException: RegexIterator::__construct(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /private/var/folders/5x/j_rlyqhx2hddmn_ds3pj0t0h0000gn/T/php-src-php-7.4.23/ext/phar/phar.php:1133
Stack trace:
#0 /private/var/folders/5x/j_rlyqhx2hddmn_ds3pj0t0h0000gn/T/php-src-php-7.4.23/ext/phar/phar.php(1133): RegexIterator->__construct(Object(RecursiveIteratorIterator), '/\\.svn/')
#1 /private/var/folders/5x/j_rlyqhx2hddmn_ds3pj0t0h0000gn/T/php-src-php-7.4.23/ext/phar/phar.php(1077): PharCommand::phar_add(Object(Phar), 0, '/var/folders/5x...', NULL, '/\\.svn/', Object(SplFileInfo), NULL, true)
#2 /private/var/folders/5x/j_rlyqhx2hddmn_ds3pj0t0h0000gn/T/php-src-php-7.4.23/ext/phar/phar.php(225): PharCommand->cli_cmd_run_pack(Array)
#3 /private/var/folders/5x/j_rlyqhx2hddmn_ds3pj0t0h0000gn/T/php-src-php-7.4.23/ext/phar/phar.php(2089): CLICommand->__constru in /private/var/folders/5x/j_rlyqhx2hddmn_ds3pj0t0h0000gn/T/php-src-php-7.4.23/ext/phar/phar.php on line 1133
make: *** [ext/phar/phar.phar] Error 255
make: *** Waiting for unfinished jobs....
Clearly, I can't set pcre.jit=0
because I don't have PHP installed yet, and I don't know what grant PHP permission to allocate executable memory
means.
I tried adding PHP_CONFIGURE_OPTIONS="--with-pcre-jit"
to compile command, to no avail.
I'm not sure what is causing it, I'm just hoping someone else also encountered this issue.
I've found issues searching for this error, but it seems people are having it while running some code. See also this bug, but I don't know if it applies to me.
Hi!
After installing your plugin, I install two versions of php (7 and 8).
And each version contains it's own composer!!!
But I had already composer installed globally.
Is there a way how to use system composer as a primary?
I'm trying install and getting this error:
-> % asdf install php 8.07RC1
Determining configuration options...
Downloading source code...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 124 100 124 0 0 145 0 --:--:-- --:--:-- --:--:-- 145
100 14 100 14 0 0 7 0 0:00:02 0:00:01 0:00:01 19
Extracting source code...
tar: Error opening archive: Unrecognized archive format
Anyone know what happening?
I need use php_pgsql.
Is possible install on asdf installation?
I checked the build script and ran
sudo apt-get update && sudo apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev
then
asdf install php 8.0.10
I get
/bin/bash /tmp/tmp.94nY465wXz/php-src-php-8.0.10/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/pcre/ -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/pcre/ -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/include -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/main -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10 -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/date/lib -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/mbstring/libmbfl -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/TSRM -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/Zend -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden -DZEND_SIGNALS -mshstk -DHAVE_CONFIG_H -I/tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/pcre/pcre2lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/pcre/pcre2lib/pcre2_auto_possess.c -o ext/pcre/pcre2lib/pcre2_auto_possess.lo
In file included from /tmp/tmp.94nY465wXz/php-src-php-8.0.10/main/php.h:439,
from /tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/openssl/openssl.c:27:
/tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/openssl/openssl.c: In function ‘zm_startup_openssl’:
/tmp/tmp.94nY465wXz/php-src-php-8.0.10/ext/openssl/openssl.c:1224:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
1224 | REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
an error with RSA_SSLV23_PADDING
not being defined.
I got the same for 8.0.11.
Any ideas?
There is no benefit on our side to managing this too complex shell nightmare, and it should be managed centrally if possible.
Hi, not sure if I'm doing something wrong, but trying to install just the latest version of php on my mac. It seems to install PHP (or some other version of php is preinstalled, but I don't recall it), but then fail to register it with asdf
. See below.
System details (Big Sur 11.4):
> uname -a
Darwin ehossack-computer.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
Here's the last part of my shell output:
❯ echo $CFLAGS
-I/usr/local/opt/bzip2/include -I/usr/local/opt/readline/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
❯ echo $CPPFLAGS
-I/usr/local/opt/[email protected]/include -I/usr/local/opt/zlib/include -I/usr/local/opt/zlib/include
> asdf install php latest
... (truncated)
ln -s -f phar.phar /Users/ehossack/.asdf/installs/php/8.1.0RC5/bin/phar
HTTP request sent, awaiting response... Installing PHP FPM man page: /Users/ehossack/.asdf/installs/php/8.1.0RC5/php/man/man8/
200 OK
Length: 3641841 (3.5M)
Saving to: ‘pear/install-pear-nozlib.phar’
install-pear-nozlib.phar 0%[ ] 0 --.-KB/s Installing PHP FPM status page: /Users/ehossack/.asdf/installs/php/8.1.0RC5/php/php/fpm/
install-pear-nozlib.phar 100%[====================================================================================================================================================================================================================================================================================================================================>] 3.47M 3.11MB/s in 1.1s
2021-11-06 13:20:36 (3.11 MB/s) - ‘pear/install-pear-nozlib.phar’ saved [3641841/3641841]
[PEAR] Archive_Tar - installed: 1.4.14
[PEAR] Console_Getopt - installed: 1.4.3
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util - installed: 1.4.5
warning: pear/PEAR dependency package "pear/Archive_Tar" installed version 1.4.14 is not the recommended version 1.4.4
[PEAR] PEAR - installed: 1.10.13
Wrote PEAR system config file at: /Users/ehossack/.asdf/installs/php/8.1.0RC5/pear.conf
You may want to add: /Users/ehossack/.asdf/installs/php/8.1.0RC5/lib/php to your php.ini include_path
Installing header files: /Users/ehossack/.asdf/installs/php/8.1.0RC5/include/php/
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(https://getcomposer.org/installer): Failed to open stream: No such file or directory in Command line code on line 1
Warning: hash_file(composer-setup.php): Failed to open stream: No such file or directory in Command line code on line 1
Installer corrupt
Warning: unlink(composer-setup.php): No such file or directory in Command line code on line 1
Could not open input file: composer-setup.php
> php --version 1 ✘ 6m 25s
WARNING: PHP is not recommended
PHP is included in macOS for compatibility with legacy software.
Future versions of macOS will not include PHP.
PHP 7.3.24-(to be removed in future macOS) (cli) (built: May 8 2021 09:40:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies
> asdf local php 7.3.24 1 ✘
version 7.3.24 is not installed for php
> asdf list php
No versions installed
I've been using asdf-php
for a long time, but every time my installation eventually breaks because of missing dependencies, this time I get the following error:
error while loading shared libraries: libicuio.so.69: cannot open shared object file: No such file or directory
Turns out I have libicuio.so.70 ... could dependencies be shipped/copied over an asdf-vm subdirectory in order to not break installation over time?
Docs here: https://www.php.net/manual/en/migration74.other-changes.php#migration74.other-changes.pkg-config
I was not getting the zip extension so I changed --enable-zip to --with-zip in bin/install and it worked. I saw that there where other unrecognized flags that had to do with gd among others that probably needs changing.
Using Mac (M1 Max)
...
configure.ac:1544: the top level
configure: WARNING: unrecognized options: --enable-gd-native-ttf, --enable-wddx, --enable-zip, --with-gd, --with-mysql, --with-xmlrpc
configure: error: Please reinstall the BZip2 distribution
Using following install steps:
export LIBXML_CFLAGS="$(xml2-config --cflags)"
export LIBXML_LIBS="$(xml2-config --libs)"
export SQLITE_CFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
export SQLITE_LIBS="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
export LDFLAGS="-liconv"
export PHP_CONFIGURE_OPTIONS="--with-zlib-dir=\"$(brew --prefix zlib)\" --with-bz2=\"$(brew --prefix bzip2)\" --with-readline=\"$(brew --prefix readline)\" --with-libedit=\"$(brew --prefix libedit)\" --with-tidy=\"$(brew --prefix tidy-html5)\" --with-iconv=\"$(brew --prefix libiconv)\" --with-openssl=\"/usr/local/Cellar/[email protected]/1.1.1k\" --with-curl=\"$(brew --prefix curl)\""
export PATH="$(brew --prefix bison)/bin:$(brew --prefix icu4c)/bin:$(brew --prefix icu4c)/sbin:$PATH"
asdf install php 8.1.1
Hello, how i can insall extensions to php installed via asdf?
$ asdf version
v0.7.8
macos 10.14.5
$ asdf install php 7.4
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 120 100 120 0 0 240 0 --:--:-- --:--:-- --:--:-- 240
100 14 100 14 0 0 16 0 --:--:-- --:--:-- --:--:-- 81
tar: Error opening archive: Unrecognized archive format
Any suggestions?
Tried installing 7.3.6, which is the latest stable on macOS; and I get the following error.
checking libzip... yes
checking for the location of zlib... /usr
checking for pkg-config... (cached) no
checking for libzip... not found
configure: error: Please reinstall the libzip distribution
I tried exporting the paths already, as demonstrated by Homebrew and it's still not working. Has this happened to anyone else? I know some folk where having some unrelated issues with PHP 7 already.
I am getting this error:
Fatal error: Uncaught InvalidArgumentException: RegexIterator::__construct(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /private/var/folders/rg/0z_ltnpx3fl9mtcqf9y6y5640000gp/T/php-src-php-8.0.19/ext/phar/phar.php:1133
Stack trace:
#0 /private/var/folders/rg/0z_ltnpx3fl9mtcqf9y6y5640000gp/T/php-src-php-8.0.19/ext/phar/phar.php(1133): RegexIterator->__construct(Object(RecursiveIteratorIterator), '/\\.svn/')
#1 /private/var/folders/rg/0z_ltnpx3fl9mtcqf9y6y5640000gp/T/php-src-php-8.0.19/ext/phar/phar.php(1077): PharCommand::phar_add(Object(Phar), 0, '/var/folders/rg...', NULL, '/\\.svn/', Object(SplFileInfo), NULL, true)
#2 /private/var/folders/rg/0z_ltnpx3fl9mtcqf9y6y5640000gp/T/php-src-php-8.0.19/ext/phar/phar.php(225): PharCommand->cli_cmd_run_pack(Array)
#3 /private/var/folders/rg/0z_ltnpx3fl9mtcqf9y6y5640000gp/T/php-src-php-8.0.19/ext/phar/phar.php(2089): CLICommand->__construct(19, Array)
#4 {main}
thrown in /private/var/folders/rg/0z_ltnpx3fl9mtcqf9y6y5640000gp/T/php-src-php-8.0.19/ext/phar/phar.php on line 1133
make: *** [ext/phar/phar.phar] Error 255
make: *** Waiting for unfinished jobs....
everything i've found online indicates I need to alter a php.ini setting to fix this, but i'm not sure how to do that before php is installed. Also, could it be that I simply don't have enough memory on my computer? I am runnig an M1 with 16GB RAM.
When I try to install PHP 7.4.4 on Mint 19.3, I get the following error:
(...)
Warning: copy(https://getcomposer.org/installer): failed to open stream: Connection timed out in Command line code on line 1
Warning: hash_file(composer-setup.php): failed to open stream: No such file or directory in Command line code on line 1
Installer corrupt
Warning: unlink(composer-setup.php): No such file or directory in Command line code on line 1
Could not open input file: composer-setup.php
Is there another way to install the composer or some requirement that is not defined in the README ?
Trying to install on a Mac running big sur, keep getting this error and then it exits:
/var/folders/1l/vskprns16jb09p6q1srq64th0000gp/T/php-src-php-7.4.22/ext/gd/gd.c:1140:48: error: use of undeclared identifier 'GD_FLIP_HORINZONTAL'
REGISTER_LONG_CONSTANT("IMG_FLIP_HORIZONTAL", GD_FLIP_HORINZONTAL, CONST_CS | CONST_PERSISTENT);
^
/var/folders/1l/vskprns16jb09p6q1srq64th0000gp/T/php-src-php-7.4.22/ext/gd/gd.c:1141:46: error: use of undeclared identifier 'GD_FLIP_VERTICAL'
REGISTER_LONG_CONSTANT("IMG_FLIP_VERTICAL", GD_FLIP_VERTICAL, CONST_CS | CONST_PERSISTENT);
^
/var/folders/1l/vskprns16jb09p6q1srq64th0000gp/T/php-src-php-7.4.22/ext/gd/gd.c:1142:42: error: use of undeclared identifier 'GD_FLIP_BOTH'
REGISTER_LONG_CONSTANT("IMG_FLIP_BOTH", GD_FLIP_BOTH, CONST_CS | CONST_PERSISTENT);
^
/var/folders/1l/vskprns16jb09p6q1srq64th0000gp/T/php-src-php-7.4.22/ext/gd/gd.c:4699:8: error: use of undeclared identifier 'GD_FLIP_VERTICAL'
case GD_FLIP_VERTICAL:
^
/var/folders/1l/vskprns16jb09p6q1srq64th0000gp/T/php-src-php-7.4.22/ext/gd/gd.c:4703:8: error: use of undeclared identifier 'GD_FLIP_HORINZONTAL'
case GD_FLIP_HORINZONTAL:
^
/var/folders/1l/vskprns16jb09p6q1srq64th0000gp/T/php-src-php-7.4.22/ext/gd/gd.c:4707:8: error: use of undeclared identifier 'GD_FLIP_BOTH'
case GD_FLIP_BOTH:
^
6 errors generated.
make: *** [ext/gd/gd.lo] Error 1
make: *** Waiting for unfinished jobs....
Already installed gd and the other brews recommended in the README so not sure whats wrong
I can't tell if this is an actual issue or not but I see this when installing php 7.4.7 on MacOS Catalina:
buildconf: Run ./configure to proceed with customizing the PHP build.
configure: WARNING: unrecognized options: --with-freetype-dir, --with-icu-dir, --with-jpeg-dir, --with-webp-dir, --with-png-dir, --with-libxml-dir, --with-libzip, --enable-gd-native-ttf, --enable-wddx, --enable-zip, --with-gd, --with-mysql
PHP installs fine and so far is working ok.
I have try modify the install script to add redis in php extension folder but i not have any idea if this is possible.
what do you suggest for me ?
configure: error: re2c 0.13.4 is required to generate PHP lexers.
any ideas?
How can i configure apache or nginx? I am a newbie and i am starting to learning php without xampp... someone can help me?
I had some initial trouble getting the plugin to install PHP on MacOS.
I did manage to fix it.
Here is the exact command I ran:
asdf install php 7.4.7
Here is the error:
configure: error: bison 3.0.0 or later is required to generate PHP parsers (excluded versions: none).
I went through the .github/workflows/workflow.yml file to get additional information then ran:
brew install autoconf automake bison freetype gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip pkg-config re2c zlib openssl postgresql
export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix krb5)/lib/pkgconfig:$(brew --prefix libedit)/lib/pkgconfig:$(brew --prefix libxml2)/lib/pkgconfig:$(brew --prefix openssl)/lib/pkgconfig"
export PATH="$(brew --prefix bison)/bin:$PATH"
I had to add openssl
and postgresql
(for the development headers) to the Homebrew install command because it would fail without it.
Also, I purposely didn't add the export
commands to the shell config files so that I preserve my system environment setup.
Running these command (including the additions) fixes it.
Also, I noticed a small caveat involving PHP versions 5 and under involving Bison. Where PHP versions 5 and under uses Bison 2 and PHP 7 uses Bison 3.
I don't know if they added Bison 3 compatibility to PHP versions 5 and under since then. Haven't tested it with versions 5 and under.
Where Bison 2 is for PHP versions 5 and under and PHP version 7 uses Bison 3.
This would mean that this command export PATH="$(brew --prefix bison)/bin:$PATH"
should be excluded. I believe Xcode Select supplies Bison 2 (Bison 2.3, I think). Else it can be installed via Homebrew with [email protected]
and that PATH can be exported with export PATH="$(brew --prefix [email protected])/bin:$PATH"
.
I think we should update the README.md file (and maybe the .github/workflows/workflow.yml file), adding documentation to further clarify the dependencies and installation steps for Mac.
When trying to install on Ubuntu 22.04 LTS is giving OpenSSL 3.0 error
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
uname -a
Linux Ubuntu-Juizmill 5.18.2-051802-generic #202206061451-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 6 14:57:58 UTC x86_64 x86_64 x86_64 GNU/Linux
ext/openssl/ -I/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/include -I/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/main -I/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0 -I/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/date/lib -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu -I/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/mbstring/libmbfl -I/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/mbstring/libmbfl/mbfl -I/usr/include/postgresql -I/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/TSRM -I/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/Zend -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden -DZEND_SIGNALS -c /tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/xp_ssl.c -o ext/openssl/xp_ssl.lo
In file included from /tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/main/php.h:438,
from /tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:27:
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c: In function ‘zm_startup_openssl’:
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:1219:58: error: ‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_PKCS1_PADDING’?
1219 | REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/Zend/zend_constants.h:50:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
50 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
| ^~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:1219:58: note: each undeclared identifier is reported only once for each function it appears in
1219 | REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT);
| ^~~~~~~~~~~~~~~~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/Zend/zend_constants.h:50:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
50 | #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
| ^~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c: In function ‘php_openssl_generate_private_key’:
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:3686:49: warning: ‘RSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
3686 | rsaparam = RSA_new();
| ^~~~~~~~
In file included from /tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:46:
/usr/include/openssl/rsa.h:201:28: note: declared here
201 | OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
| ^~~~~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:3688:49: warning: ‘RSA_generate_key_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
3688 | if (rsaparam == NULL || !RSA_generate_key_ex(rsaparam, req->priv_key_bits, bne, NULL)) {
| ^~
In file included from /tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:46:
/usr/include/openssl/rsa.h:260:27: note: declared here
260 | OSSL_DEPRECATEDIN_3_0 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
| ^~~~~~~~~~~~~~~~~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:3694:41: warning: ‘EVP_PKEY_assign’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
3694 | if (rsaparam && EVP_PKEY_assign_RSA(req->priv_key, rsaparam)) {
| ^~
In file included from /tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:44:
/usr/include/openssl/evp.h:1328:5: note: declared here
1328 | int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
| ^~~~~~~~~~~~~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:3705:41: warning: ‘DSA_new’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
3705 | DSA *dsaparam = DSA_new();
| ^~~
In file included from /tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:47:
/usr/include/openssl/dsa.h:125:28: note: declared here
125 | OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void);
| ^~~~~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:3706:41: warning: ‘DSA_generate_parameters_ex’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
3706 | if (dsaparam && DSA_generate_parameters_ex(dsaparam, req->priv_key_bits, NULL, 0, NULL, NULL, NULL)) {
| ^~
In file included from /tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:47:
/usr/include/openssl/dsa.h:167:27: note: declared here
167 | OSSL_DEPRECATEDIN_3_0 int DSA_generate_parameters_ex(DSA *dsa, int bits,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/tmp.44LJrPqYZj/php-src-php-8.0.0/ext/openssl/openssl.c:3707:49: warning: ‘DSA_set_method’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
3707 | DSA_set_method(dsaparam, DSA_get_default_method());
I wished to build PHP with ldap support (--with-ldap
), so I used PHP_CONFIGURE_OPTIONS="--with-ldap" asdf php install 8.0.14
.
However, after building it, it seems that curl
couldn't get HTTPS resources, turns out that OpenSSL wasn't being included during configuring PHP.
After tracing install
script, options from $(os_based_configure_options)
and $PHP_CONFIGURE_OPTIONS
are mutually exclusive, which makes PHP_CONFIGURE_OPTIONS="--with-ldap"
overwrite the default flags such as --with-openssl --with-curl --with-zlib --with-readline --with-gettext
generated by os_based_configure_options
. (install#L156-L160)
Is this the intended behavior of how PHP_CONFIGURE_OPTIONS
works? or PHP_CONFIGURE_OPTIONS
should allow us to add different flags from os_based_configure_options
?
When compiling PHP, you can enable the argon2 hashing algorithm by passing the --with-password-argon2
into the configure step.
Also argon2 needs some additional libraries, such as argon2 libargon2-0 libargon2-0-dev
(ubuntu based).
Argon2 stuff can be found here on this zend fw post https://framework.zend.com/blog/2017-08-17-php72-argon2-hash-password.html
Trying to run a legacy project. Here is what I get:
public_html master % PHP_WITHOUT_PEAR=yes asdf install php 4.3.9
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 122 0 122 0 0 156 0 --:--:-- --:--:-- --:--:-- 156
100 4811k 0 4811k 0 0 1070k 0 --:--:-- 0:00:04 --:--:-- 1410k
Forcing buildconf
mv: rename ZendEngine1 to Zend: No such file or directory
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.69 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
Running cvsclean for you.
To avoid this, install autoconf-2.13 and automake-1.5.
buildconf: libtool version 2.4.6 (ok)
make[1]: *** No rule to make target `Zend/Zend.m4', needed by `configure'. Stop.
make: *** [all] Error 2
Thanks for your work!
Hi guys, I just want to know how can I install a php version with postgres driver if it really is possible.
Thanks
This is the output:
asdf install php 7.1
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 120 100 120 0 0 285 0 --:--:-- --:--:-- --:--:-- 285
100 14 100 14 0 0 15 0 --:--:-- --:--:-- --:--:-- 31
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
It does not matter which PHP version shall be installed, happens on all of them.
Since php v7.4.2 (or v7.4.1) release I'm having trouble trying to install new versions. Somehow I also have the version 7.4.4 installed on my system, but I don't remember how I installed it, and executing any php cli command throws the error /home/lcss/.asdf/installs/php/7.4.4/bin/php: error while loading shared libraries: libicuio.so.65: cannot open shared object file: No such file or directory
, so I can't use it rigth now. This didn't happen before the 7.4.0 release, while I was using the 7.3.x version, so probably, something in computer have changed. Anyway the problem right now is find why the installation fails every single time with the same error below:
Build complete.
Don't forget to run 'make test'.
Installing PHP CLI binary: /home/lcss/.asdf/installs/php/7.4.7/bin/
Installing phpdbg binary: /home/lcss/.asdf/installs/php/7.4.7/bin/
Installing PHP FPM binary: /home/lcss/.asdf/installs/php/7.4.7/sbin/
mkdir: cannot create directory '/home/lcss/.asdf/installs/php/7.4.7/bin': File exists
Installing shared extensions: /home/lcss/.asdf/installs/php/7.4.7/lib/php/extensions/no-debug-non-zts-20190902/
Installing PHP CLI man page: /home/lcss/.asdf/installs/php/7.4.7/php/man/man1/
Installing PHP CGI binary: /home/lcss/.asdf/installs/php/7.4.7/bin/
Installing phpdbg man page: /home/lcss/.asdf/installs/php/7.4.7/php/man/man1/
Installing build environment: /home/lcss/.asdf/installs/php/7.4.7/lib/php/build/
Installing PHP FPM defconfig: /home/lcss/.asdf/installs/php/7.4.7/
Installing PHP CGI man page: /home/lcss/.asdf/installs/php/7.4.7/php/man/man1/
Installing helper programs: /home/lcss/.asdf/installs/php/7.4.7/bin/
program: phpize
Installing PHP FPM man page: /home/lcss/.asdf/installs/php/7.4.7/php/man/man8/
program: php-config
Installing PHP FPM status page: /home/lcss/.asdf/installs/php/7.4.7/php/php/fpm/
/tmp/tmp.KqmARAGi5a/php-src-php-7.4.7/build/shtool install -c ext/phar/phar.phar /home/lcss/.asdf/installs/php/7.4.7/bin
Installing man pages: /home/lcss/.asdf/installs/php/7.4.7/php/man/man1/
ln -s -f phar.phar /home/lcss/.asdf/installs/php/7.4.7/bin/phar
page: phpize.1
Installing PDO headers: /home/lcss/.asdf/installs/php/7.4.7/include/php/ext/pdo/
page: php-config.1
Installing header files: /home/lcss/.asdf/installs/php/7.4.7/include/php/
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1
Warning: hash_file(composer-setup.php): failed to open stream: No such file or directory in Command line code on line 1
Installer corrupt
Warning: unlink(composer-setup.php): No such file or directory in Command line code on line 1
Could not open input file: composer-setup.php
System info:
OS: Arch Linux x86_64
Kernel: 5.7.4-arch1-1
Shell: zsh 5.8
When I try to install PHP 7 on macOS High Sierra after following the instructions in the README, I get the following error:
$ export PHP_CONFIGURE_OPTIONS='--disable-gettext'
$ PATH="$(brew --prefix bison)/bin:$(brew --prefix icu4c)/bin:$(brew --prefix icu4c)/sbin:$PATH" PHP_CONFIGURE_OPTIONS="--with-iconv=$(brew --prefix libiconv) --with-openssl=$(brew --prefix openssl)" asdf install php 7.2.1
...
/usr/local/Cellar/icu4c/60.2/include/unicode/unistr.h:3014:7: error: delegating constructors are permitted only in C++11
UnicodeString(ConstChar16Ptr(text)) {}
^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/60.2/include/unicode/unistr.h:3076:7: error: delegating constructors are permitted only in C++11
UnicodeString(ConstChar16Ptr(text), length) {}
^~~~~~~~~~~~~
/usr/local/Cellar/icu4c/60.2/include/unicode/unistr.h:3169:7: error: delegating constructors are permitted only in C++11
UnicodeString(Char16Ptr(buffer), buffLength, buffCapacity) {}
^~~~~~~~~~~~~
12 warnings and 3 errors generated.
make: *** [ext/intl/intl_convertcpp.lo] Error 1
Any idea about what is going on?
After Googling around I could only find one related and unsolved issue: phpbrew/phpbrew#899
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.