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

PHP 5.3 generates slew of errors #845

Closed
anonymous-matomo-user opened this issue Jul 1, 2009 · 8 comments
Closed

PHP 5.3 generates slew of errors #845

anonymous-matomo-user opened this issue Jul 1, 2009 · 8 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Milestone

Comments

@anonymous-matomo-user
Copy link

Under PHP 5.3 the ereg() method has been deprecated, and a number of other features are changed.

The attached diff allows Piwik to install and run under 5.3. It primarily fixes the deprecated issues in the code, BUT NOT in the Unit Tests: these currently generate a range of warnings about depracation.

Therefore this diff is a starting point, and SHOULD BE CHECKED since in some places it is not immediately obvious that the ereg -> preg replacement is trivial.

In theory, the diff is backwards-compatible, but I've only tested under 5.3, so am unsure about this.

Note too that I've not changed the ereg calls in

libs/PclZip/pclzip.lib.php
libs/UserAgentParser/UserAgentParser.php

Since these are libraries, I have left them, and they don't appear to cause a problem on my instance yet (which I've only just installed and started playing with).

@anonymous-matomo-user
Copy link
Author

Attachment: Patch to get Piwik running under PHP 5.3
php53_patch.txt

@robocoder
Copy link
Contributor

craigmj: thanks for the patch. I've extended the changes to libs and tests, and reviewed/applied fixes for the other backward incompatibilities and deprecated functions (e.g., split and magic methods).

Notes:

@robocoder
Copy link
Contributor

(In [1287]) fixes #845 - php 5.3 backward incompatibilities and deprecated functionality;
quick fixes #851 - unit tests; also fix redirect error in Installation when deleting existing tables

@mattab
Copy link
Member

mattab commented Jul 6, 2009

craigmj & vipsoft, good stuff - Piwik has been fast to be 5.3 compatible.

@mattab
Copy link
Member

mattab commented Jul 6, 2009

by the way, vipsoft, please let me know when you think it is best to release 0.4.2 to address these changes.

@robocoder
Copy link
Contributor

(In [1293]) refs #845 - update simpletest (from 1.0.1beta to 1.0.1);
apply changes for php 5.3 (i.e., deprecated functionality);
change ordering of unit tests (all_tests.php)

@robocoder
Copy link
Contributor

re-opening: regression with php 5.2.x; all_tests.php broken in trunk

@robocoder
Copy link
Contributor

Not a regression.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Projects
None yet
Development

No branches or pull requests

3 participants