Giter Site home page Giter Site logo

php's People

Contributors

deepdiver1975 avatar dpakach avatar individual-it avatar micbar avatar patrickjahns avatar phil-davis avatar tboerger avatar wkloucek avatar xoxys avatar

Watchers

 avatar  avatar  avatar

php's Issues

CI fails for PHP 5.6 and 8.0

PHP 8.0
https://drone.owncloud.com/owncloud-ci/php/516/25/2

PHP Warning:  foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249
Warning: foreach() argument must be of type array|object, null given in PEAR/Command.php on line 249
Warning: foreach() argument must be of type array|object, null given in PEAR/Command.php on line 249
XML Extension not found
The command '/bin/sh -c ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include &&   echo "instantclient,/usr/lib/oracle/12.2/client64/lib" | pecl install oci8-3.0.0' returned a non-zero code: 1
exit status 1

PHP 5.6
https://drone.owncloud.com/owncloud-ci/php/516/4/2

PHP Warning:  Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249
Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 249
PHP Warning:  Invalid argument supplied for foreach() in /usr/share/php/PEAR/Command.php on line 249
XML Extension not found
The command '/bin/sh -c ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include &&   echo "instantclient,/usr/lib/oracle/12.2/client64/lib" | pecl install oci8-2.0.12' returned a non-zero code: 1
exit status 1

Images for php7.0-php7.3 are no longer building

          Looks like some old-version PHP has "gone away" in conjunction with whatever Ubuntu we are trying to install it on...

We should be able to just remove all that. We do not need PHP 7.3 or earlier in any CI any more.

And I think that if we remove the old PHP build pipelines, the existing docker images for those versions will remain being published as-they-are. Is that correct @xoxys ?

Originally posted by @phil-davis in #164 (comment)

PHP 7.4

Today PHP 7.4.0 was released.

It will be easy to test with PHP 7.4 if there is an image here with PHP 7.4

PHP7.2 and memcached causing segmentation fault

We've seen in some PRs in owncloud/core that php7.2 + memcached can cause segmentation faults.

For now in #32 memcached has been removed.

While debugging @crrodriguez has shared, that this issue happens when php shuts down and unloads the module - this might be circumvented by setting

export ZEND_DONT_UNLOAD_MODULES=1

add xdebug

the containers provide a great environment for running ownCloud - however, it limits the possibility for debugging currently.

XDEBUG is a great extension for debugging php code - I would like to add it again, and provide instructions on how to easily use the containers + xdebug + phpstorm for debugging

As we also run these containers in our ci pipeline - I can imagine, that we provide drone exec with some helpers to ease the debugging of some parts

Build is failing

The PHP 7.4 image is based on:

FROM owncloud/ubuntu:18.04-amd64

It looks like that was last updated-published on 2022-06-21 https://drone.owncloud.com/owncloud-docker/ubuntu/244/14/4

I tried to re-run the current CI for owncloud-ci/php : https://drone.owncloud.com/owncloud-ci/php/555/19/2

That gets the recently-released PHP 7.4.30, which is what I hoped to see - good.

But we are back to the Oracle client errors that we have had in the past:

Step 13/19 : RUN ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include &&   echo "instantclient,/usr/lib/oracle/12.2/client64/lib" | pecl install oci8-2.2.0
 ---> Running in 8e8930250951
PHP Warning:  foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249
PHP Warning:  foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249
...
Warning: Trying to access array offset on value of type null in Role.php on line 250
Warning: Trying to access array offset on value of type null in Role.php on line 251
...
PHP Warning:  Undefined array key "installable" in /usr/share/php/PEAR/Installer/Role.php on line 139
...
XML Extension not found
PHP Warning:  foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249
The command '/bin/sh -c ln -s /usr/include/oracle/12.2/client64 /usr/lib/oracle/12.2/client64/include &&   echo "instantclient,/usr/lib/oracle/12.2/client64/lib" | pecl install oci8-2.2.0' returned a non-zero code: 1
exit status 1

Needs investigation of each pipeline (Ubuntu+PHP combination) to see what is failing, and what needs to be tweaked.

Newer php-ast version

PHP-AST from the sury packages in the containers is still 0.1.6 - and no new version will soon be available.
This causes issues with phan and moving phan forward to the 2.x branch, as it requires later versions

[phan:19] php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan --config-file .phan/config.php --require-config-exists
[phan:20] ERROR: Phan 2.x requires php-ast 1.0.1+ because it depends on AST version 70. php-ast 0.1.6 is installed.

As per https://github.com/nikic/php-ast#installation - recommendation would be to use pecl and built ast for the installed version in the containers directly

Libsmbclient is not included in owncloud-ci:7.2

In the WND CI improvements we can see:

In app.php line 1172:
                                                                               
  App "External Storage: Windows Network Drives" cannot be installed because   
  the following dependencies are not fulfilled: The library libsmbclient is n  
  ot available. 

owncloud-ci/php:7.1 has this modules:

$php -m

[PHP Modules]
apc
apcu
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
intl
json
ldap
libsmbclient
libxml
mbstring
memcached
msgpack
mysqli
mysqlnd
oci8
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
smbclient
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

owncloud-ci/php:7.2 has these ones:

$php -m

[PHP Modules]
apc
apcu
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
oci8
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Module smbclient is present in 7.1 but missing in 7.2.

When building the image locally I see the module included so perhaps it just needs to rebuild the docker hub image.

Not sure if this can be related: oerdnj/deb.sury.org#815

Missing memcached in PHP 7.3 container

Following on from issue #89
https://drone.owncloud.com/owncloud/core/14078/97
https://drone.owncloud.com/owncloud/core/14078/103

 ------ ----------------------------------------------------------------------- 
  Line   lib/private/Memcache/Memcached.php                                     
 ------ ----------------------------------------------------------------------- 
  41     Property OC\Memcache\Memcached::$cache has unknown class Memcached as  
         its type.                                                              
  48     Instantiated class Memcached not found.                                
51 Access to constant OPT_CONNECT_TIMEOUT on an unknown class Memcached. 

from PR to test phan and phpstan on PHP 7.3 owncloud/core#33987

@DeepDiver1975 I guess it wants a memcached extension also.

add php7.3 image

PHP7.3 is in RC phase - it would be great to add it as soon as possible to be out with ownCloud 11

First try is in branch 7.3 - however the following extensions still triggers installation of 7.2 base packages

Thus they have been removed for the time being

Monthly or quarterly rebuild

This morning I restarted the drone merge CI: https://drone.owncloud.com/owncloud-ci/php/466

It passed, which is a good thing.

I restarted it because new patch releases of PHP 8.0.1 and 7.4.x were released on 2021-01-07. The re-run of the merge CI docker publishes new releases of the docker images https://registry.hub.docker.com/r/owncloudci/php/tags?page=1&ordering=last_updated - those should now have PHP 8.0.1, but I just pulled docker pull owncloudci/php:8.0 and it seems to only have

# php --version
PHP 8.0.0 (cli) (built: Nov 27 2020 12:26:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.0, Copyright (c), by Zend Technologies

Similarly, there is PHP 7.4.13 only in the rebuilt docker. But I see that my local Ubuntu 18.04 and 20.04 only have that patch release also - so maybe something upstream has not become available yet.

Anyway, the point of this issue is that I think we should "regularly" rebuild the PHP images to have the latest patch releases of PHP.

If we setup drone to automatically run a "monthly" job, then it will happen automatically. But then if the CI publishes the release, but something is broken in it (that the CI did not detect), other CI that uses it will suddenly break, and people will find it difficult to remember "last night was the monthly docker PHP update". They will fluff around looking for why the CI suddenly broke.

But if we run it manually, like I did this morning, then we will forget to do it.

Catch-22.

Dependency management in this repo / decommision of old software versions used

echo "deb https://deb.nodesource.com/node_8.x bionic main" | tee /etc/apt/sources.list.d/node.list && \

It seems we use an old node version in all of those images (beginning with php 7.0 - before we used node 6 than we switched to 8 2 years ago) - this is a big mess - as this node version is no longer supported by nodejs

See here: https://en.wikipedia.org/wiki/Node.js#Releases

echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \

Furthermore we use an old version of yarn (called yarn classic now) which is still supported, but regarding their webpage shall be decommissioned at any point in future and they "kindly" ask to migrate to yarn2.

See here: https://yarnpkg.com/getting-started/migration#why-should-you-migrate

How to address those issues? Where do we have dependencies from this container in our builds, that use node 8 (explicitly) and don't work with e.g. node 14 (LTS)?
Furthermore where is yarn used and can we migrate the yarn files to yarn2?

We should generally think of dropping every image not using php 7.4 or newer as all other PHP versions are outdated. Regarding this, we would get rid of Ubuntu 16.04 (outdated) and Ubuntu 18.04 (soon outdated) as well and could move to the new base image 20.04(LTS) everywhere.

Furthermore, we tried (should try) to stop using ondrej-repos for php, as they are fully managed by a single-point-of-failure and lead to several real-world-problems in the past, like ondrej starting to build his own version of openssl inside the php repo. That lead to a big mindboggling on our instances - and we should not implement the same in our docker images.

LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php && \

I know this is a big issue - there might be an outcome of multiple PRs but I guess this is a general maintenance issue here - not just a single versioning problem. We should start a workforce to address those problems.

I don't know, but to me it looks like we should have a monthly maintenance round where things like this are addressed, issues opened and tasks are generated and distributed, to get rid of those issues. This affects most of the other repos in owncloud-ci as well - where versioning seems to be a bit off.

(this topic was brought up by @mmattel during depend-a-bot checks for our repos)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.