Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build mysql as shared extension for PHP 5.5 and 5.6 #29

Closed
wants to merge 1 commit into from
Closed

Build mysql as shared extension for PHP 5.5 and 5.6 #29

wants to merge 1 commit into from

Conversation

thaJeztah
Copy link
Contributor

Updated Dockerfiles for PHP 5.5 and 5.6 to build mysql as a shared extension and not enable it by default.
The mysql extension is deprecated since PHP 5.5 and using it is discouraged.

Users requiring the mysql extension can still enable it by adding extension=mysql.so to their php.ini, which should be added to the README because this breaks backwards compatibility with previous versions of this image.

closes #28

@yosifkit
Copy link
Member

Sounds reasonable to me.

@tianon
Copy link
Member

tianon commented Nov 3, 2014

Is the ,/usr bit documented somewhere so we can read about why that's the correct value we should be using here? 😄

@md5
Copy link
Contributor

md5 commented Nov 3, 2014

It seems like it should be ,/usr/local.

@thaJeztah
Copy link
Contributor Author

@tianon good question, think I picked it from the php internals book, but haven't checked what the best path would be there.

I think picking a path could be important because (if this gets merged), future extensions should probably set the same path as well.

@thaJeztah
Copy link
Contributor Author

@md5 just checked; when building with ,/usr, the extension is put here;

/usr/local/lib/php/extensions/no-debug-non-zts-20131226/mysql.so

possibly, using the ,/usr is not even required, because php should use the globally defined 'extension-dir'. I will check what the result is when leaving it out and let you know.

@thaJeztah
Copy link
Contributor Author

hm.. getting some gpg errors, first build;

gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key 90D90EC1 from hkp server pgp.mit.edu
gpg: requesting key 7267B52D from hkp server pgp.mit.edu

then;

gpg --verify php.tar.bz2.asc
gpg: Signature made Thu Oct 16 08:17:09 2014 UTC using RSA key ID 90D90EC1
gpg: Good signature from "Julien Pauli <[email protected]>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 0BD7 8B5F 9750 0D45 0838  F95D FE85 7D9A 90D9 0EC1

Are these safe to ignore?

@tianon
Copy link
Member

tianon commented Nov 3, 2014

Yes, those are normal.

Updated Dockerfiles for PHP 5.5 and 5.6 to build mysql as a shared
extension and disable it by default.

The mysql extension is deprecated since PHP 5.5 and using it is
discouraged. Users requiring the mysql extension can still enable it
by adding;

extension=mysql.so

to their php.ini, which should be added to the README because this
breaks backwards compatibility with previous versions of this image.

After building, the mysql extension can be found here;

/usr/local/lib/php/extensions/no-debug-non-zts-20131226/mysql.so

closes #28
@thaJeztah
Copy link
Contributor Author

Rebased the PR and removed the ,/usr.

Turns out that if the ,/usr is omitted, the global --extension-dir is used and the
shared extension is in the same location.

Just rebuilt the 5.6-apache Dockerfile to test after the rebase and afaics, it works correctly. (5.5-apache was tested before rebase)

PTAL, @tianon @yosifkit

@yosifkit
Copy link
Member

yosifkit commented Nov 3, 2014

LGTM

@thaJeztah
Copy link
Contributor Author

Still needs the docs change in the README, perhaps this could be included in the changes you're working on wrt php.ini.

@tianon
Copy link
Member

tianon commented Nov 13, 2014

So, this should be covered now by just adding something like this to the Dockerfile of a project that needs mysql:

RUN docker-php-ext-install mysql

I know mysqli definitely works (see docker-library/wordpress#26).

@thaJeztah
Copy link
Contributor Author

Yes, I've seen a lot of progress going on (sorry to be quiet a bit), quite a new approach. I haven't had the time yet to test the new system, but I think that will cover this.

I'll close the PR, thanks for an excellent job!

@thaJeztah thaJeztah closed this Nov 13, 2014
@thaJeztah thaJeztah deleted the 28-deprecate-mysql branch November 22, 2014 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--with-mysql deprecated in php 5.6
4 participants