- OpenX Community Forums
![]() ![]() |
Jul 29 2009, 06:34 PM
Post
#1
|
|
|
Beginner ![]() Group: Members Posts: 4 Joined: 29-July 09 From: USA Member No.: 29,608 |
OpenX 2.8.1
PHP 5.3.0 MySQL 5.1.32-log CentOS 5.2 / Apache/2.2.11 (Unix) Login type: admin Dear OpenX Team / Community, With last month's release of PHP 5.3.0 the PHP team also made available a list of recently deprecated functions: http://php.net/manual/en/migration53.deprecated.php After some research on my part, it appears OpenX is no longer compatible with PHP 5.3+. What are the current efforts being done to support this new release, if any? A quick audit of the OpenX files bumped up against the PHP 5.3.0 deprecated functions list better illustrates this point:
Kind Regards, Mike NOTE: This audit was done on an already installed system. I have not confirmed whether any deprecated references exist in any of the install/setup files. |
|
|
|
Jul 31 2009, 02:16 PM
Post
#2
|
|
|
Mentor ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 7,442 Joined: 17-June 08 From: Poland Member No.: 21,806 |
Hi pixelchutes,
Welcome to the OpenX community forums! Thank you for the information. I will provide you with a feedback once I get some information from our developers regarding the issue. |
|
|
|
Jul 31 2009, 02:19 PM
Post
#3
|
|
|
Beginner ![]() Group: Members Posts: 4 Joined: 29-July 09 From: USA Member No.: 29,608 |
Thank you, Michael. I look forward to hearing from you and am happy to help in anyway that I can. Best of luck to the devs!
|
|
|
|
Jul 31 2009, 03:06 PM
Post
#4
|
|
|
Mentor ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 7,442 Joined: 17-June 08 From: Poland Member No.: 21,806 |
Hi,
All the compatibility issues are going to be fixed in the next OpenX 2.8.2 release. |
|
|
|
Aug 4 2009, 12:20 PM
Post
#5
|
|
![]() Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: OpenX Consultants Posts: 1,606 Joined: 8-May 01 From: Ferrara, Italy Member No.: 1 |
I think I didn't understand what this was about and misled Michal: apologies for that.
The functions you listed are deprecated in PHP 5.3 for future removal: they're perfectly legal and working in 5.3 even though they won't liekly be in PHP 5.4 and/or PHP 6. What does that mean for OpenX? That 2.8.1 is fully compatible with the latest and greter stable PHP version currently available, but potentially won't run on the next major PHP version. However, by the time 5.4 is ready, I'm pretty sure OpenX won't be using those functions anymore. |
|
|
|
Aug 4 2009, 02:12 PM
Post
#6
|
|
|
Beginner ![]() Group: Members Posts: 4 Joined: 29-July 09 From: USA Member No.: 29,608 |
I think I didn't understand what this was about and misled Michal: apologies for that. The functions you listed are deprecated in PHP 5.3 for future removal: they're perfectly legal and working in 5.3 even though they won't liekly be in PHP 5.4 and/or PHP 6. What does that mean for OpenX? That 2.8.1 is fully compatible with the latest and greter stable PHP version currently available, but potentially won't run on the next major PHP version. However, by the time 5.4 is ready, I'm pretty sure OpenX won't be using those functions anymore. @Matteo, Thank you for this clarification! I am sorry to have mislead anyone. So, the functions themselves still exist (for now) and it would only be an issue if the new E_DEPRECATED error level was being used in error_reporting(), is that correct? (We have been using this new error mode in some of our other PHP code and therefore have been seeing errors related to these soon to be obsolete functions.) I am glad to find out that these functions are still valid for PHP 5.3, I apologize for my misunderstanding. As for OpenX 2.8.1, have you successfully tested on an instance of PHP 5.3.0? |
|
|
|
Aug 4 2009, 02:56 PM
Post
#7
|
|
![]() Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: OpenX Consultants Posts: 1,606 Joined: 8-May 01 From: Ferrara, Italy Member No.: 1 |
Thank you for this clarification! I am sorry to have mislead anyone. So, the functions themselves still exist (for now) and it would only be an issue if the new E_DEPRECATED error level was being used in error_reporting(), is that correct? (We have been using this new error mode in some of our other PHP code and therefore have been seeing errors related to these soon to be obsolete functions.) I am glad to find out that these functions are still valid for PHP 5.3, I apologize for my misunderstanding. As for OpenX 2.8.1, have you successfully tested on an instance of PHP 5.3.0? The deprecated functions exist in PHP 5.3.x. The E_DEPRECATED messages are just a warning to PHP developers to make them aware that they are using something that will cease to exist in future versions of PHP. OpenX 2.8.1+ is masking E_DEPRECATED warnings and not showing them, plus has a number of other fixes that allow it to smoothly work with PHP 5.3 (e.g. a getHostName function used in previous versions was renamed to avoid clashing with the newly added core PHP function). PHP 5.3 is also used (along with older versions) in our continuous integration setup. |
|
|
|
May 31 2010, 08:10 AM
Post
#8
|
|
|
Beginner ![]() Group: Members Posts: 6 Joined: 25-March 08 Member No.: 20,742 |
Original poster kinda asked the wrong questions.
functions of interest are those: get_class clearstatcache call_user_func usort natsort uasort uksort array_flip array_unique As mentioned in "Backward Incompatible Changes" http://www.php.net/manual/en/migration53.incompatible.php Also not very clear which version of 3rd party libs are used. ZF , PEAR etc. The very least I see some calls to clearstatcache in PEAR lib(unsure if at all in use of course in openx) that might lead to trouble. So question is again is openx officially working on php5.3 or this is some ad hoc tesing by couple of devs or something? Cheers |
|
|
|
Jun 7 2010, 02:48 PM
Post
#9
|
|
|
Beginner ![]() Group: Members Posts: 4 Joined: 7-June 10 Member No.: 122,091 |
System config:
OpenX v2.8.5: Apache 2.2.15, PHP 5.3.2 , MySQL 5.1.46-log Alot of problems, campagins-*.php, etc. files are delivered for download, for the moment I see nothing in the logs, now I've started a line by line debugging... It seems to be some incompatibility with PEAR(?)... |
|
|
|
Jun 7 2010, 03:07 PM
Post
#10
|
|
|
Beginner ![]() Group: Members Posts: 6 Joined: 25-March 08 Member No.: 20,742 |
System config: OpenX v2.8.5: Apache 2.2.15, PHP 5.3.2 , MySQL 5.1.46-log Alot of problems, campagins-*.php, etc. files are delivered for download, for the moment I see nothing in the logs, now I've started a line by line debugging... It seems to be some incompatibility with PEAR(?)... More like misconfigured apache on your side..this can hardly be due to PHP 5.3 |
|
|
|
Jun 8 2010, 07:51 AM
Post
#11
|
|
|
Beginner ![]() Group: Members Posts: 4 Joined: 7-June 10 Member No.: 122,091 |
No, the server is running 60+ hosts, none of them has this problem. Anyway, it looks that for some reason it dies when trying to add elements to array. For example in campaign-banners.php:
QUOTE // Display navigation $aOtherAdvertisers = Admin_DA::getAdvertisers(array('agency_id' => $agencyId)); $aOtherCampaigns = Admin_DA::getPlacements(array('advertiser_id' => $clientid)); $oHeaderModel = buildHeaderModel($aEntities); phpAds_PageHeader(null, $oHeaderModel); .... //TODO do we need to filter out system entities here, or will the DAO do that? $aAdvertiserMap = array(); foreach ($aAdvertisers as $clientid => $aClient) { $aAdvertiserMap[$clientid] = array('name' => $aClient['clientname'], 'url' => "advertiser-campaigns.php?clientid=".$clientid); } The problematic parts in bold. |
|
|
|
Jun 8 2010, 10:09 AM
Post
#12
|
|
|
Beginner ![]() Group: Members Posts: 6 Joined: 25-March 08 Member No.: 20,742 |
can you paste some url from openx system that leads to this. I don't experience any such behavior yet.
Also paste the vhost used for openx. I also assume you're using 2.8.5 version currently Cheers |
|
|
|
Jun 8 2010, 10:12 AM
Post
#13
|
|
|
Beginner ![]() Group: Members Posts: 4 Joined: 7-June 10 Member No.: 122,091 |
Server access in PM.
|
|
|
|
Jun 8 2010, 01:09 PM
Post
#14
|
|
|
Beginner ![]() Group: Members Posts: 4 Joined: 7-June 10 Member No.: 122,091 |
I FOUND THE BUG!!!!
In /lib/max/SqlBuilder.php Line: 904 That break; should not be there: Instead of: default: $aLimitations[] = "$columnName = $value"; break; } Should be: default: $aLimitations[] = "$columnName = $value"; } (UPDATE: Eventually it sould be semicolon as well, like this: default; $aLimitations[] = "$columnName = $value"; break; } ) |
|
|
|
![]() ![]() |