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

mysqli_stmt_get_result incompatible with recommended config #53

Closed
dleehr opened this issue Oct 9, 2014 · 7 comments
Closed

mysqli_stmt_get_result incompatible with recommended config #53

dleehr opened this issue Oct 9, 2014 · 7 comments

Comments

@dleehr
Copy link
Member

dleehr commented Oct 9, 2014

Not sure how to phrase this as an issue, but it complicates the installation issues #13 and conflicts with the recommended config in the wiki installation documentation.

The install doc recommends PHP 5.3. Recent changes to address SQL injection #17 have added calls to mysqli_stmt_get_result. This function exists in PHP 5.3 but only with the MySQL native driver (mysqlnd), which is not the default in 5.3.

mysqlnd became the default in PHP 5.4 (CentOS 7), so the official CentOS 5 and 6 packages aren't compatible with this change. There are third-party packages to get PHP 5.3 with mysqlnd, but I'm hesitant to start installing them.

Is there a recommendation on where to get a necessary version of php - I saw previous references to XAMPP but it's not mentioned in the installation documentation anymore.

@jimallman
Copy link
Collaborator

In the most recent server migration, I've abandoned XAMPP in favor of conventional yum packages under CentOS. After considering the options, I chose to use the Remi yum repository and its packages for php (which include support for mysqlnd). Remi depends on EPEL, so this makes both available under CentOS 5.x:

rpm -Uvh http://ftp.osuosl.org/pub/fedora-epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

Note that the Remi repository is disabled by default, since it can interfere with same-named packages in the base repos when using yum update, etc. So I enable it as needed for each package:

yum --enablerepo=remi install php-common php-mysqlnd

@dleehr
Copy link
Member Author

dleehr commented Nov 7, 2014

I think Mark Sutton mentioned php 5.3 was in use on the server, so we'll need to make sure this solution works for him too. (part of #56)

@dleehr
Copy link
Member Author

dleehr commented Nov 10, 2014

Thanks for the details about additional packages. I used EPEL and IUS to get PHP 5.4 with mysqlnd installed, with some guidance here:
http://www.rackspace.com/knowledge_center/article/install-epel-and-additional-repositories-on-centos-and-red-hat.

IUS came out of rackspace and there is a mirror at Duke. Also, the package names are designed not to conflict with existing CentOS packages.

@dleehr
Copy link
Member Author

dleehr commented Nov 18, 2014

I updated the wiki about the PHP 5.4 requirement, with links to remi and ius.

@dleehr dleehr closed this as completed Nov 18, 2014
@jimallman
Copy link
Collaborator

IUS came out of rackspace and there is a mirror at Duke. Also, the package names are designed not to conflict with existing CentOS packages.

Ah, good to know. The Remi packages (with name collisions) require a certain... vigilance. 😬

jimallman added a commit that referenced this issue Jan 26, 2015
These statements are equivalent and do not require the problematic mysqlnd
driver. All changes were confined to the results in the Advanced Search page
(simple text search, min/max age filter, and geological time filter).
Tested on fossils.ibang.com.

Addresses issues #53 and #74.
@jimallman
Copy link
Collaborator

The latest code (as of 28d6fb4) should no longer require mysqlnd.

@dleehr
Copy link
Member Author

dleehr commented Jan 26, 2015

Also live on NESCent-hosted server.

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

No branches or pull requests

2 participants