Major issues changing from PHP 5.2.11 to PHP 3
We just tried to set up a test site for our new Drupal page. The server had PHP 5.3 but I'd developed the site under PHP 5.2.11. No big deal we thought. We were wrong. We suddenly had PHP failures all over the place, and not simply warnings, but errors that caused modules to stop working. Here are some:
warning: Attempt to modify property of non-object in /sitefolders/sites/all/modules/drupal_contrib/calendar/includes/calendar_plugin_display_page.inc on line 47.warning: Parameter 1 to slate_fieldset() expected to be a reference, value given in /sitefolders/includes/theme.inc on line 617.warning: Parameter 1 to theme_vertical_tabs() expected to be a reference, value given in /sitefolders/includes/theme.inc on line 617.warning: array_map(): Argument #2 should be an array in /sitefolders/modules/system/system.module on line 1015.warning: array_keys() expects parameter 1 to be array, null given in /sitefolders/includes/theme.inc on line 1771.warning: Invalid argument supplied for foreach() in /sitefolders/includes/theme.inc on line 1771.
Affected modules include Date, Admin, Vertical Tabs and who knows what else. Module maintainers seem to be behind the curve on this one, possible core too. It would seem that much of Drupal is not ready for the brave new world. You can find hacks to fix some of these, but it really is not good practice and is unsustainable and iffy at best.
So... have any of you had to deal with this and found a good solution? Is there some big-picture thing I'm missing, some magic bullet? Any tips or suggestions?
Best,
Grant


Ical feed
There are many more issues
There are many more issues with 5.3.x than you have here. For now, 5.3 is off limits for drupal. 5.3 has so many changes... many of the things that was to be php 6.0 ended up 5.3, like namespaces and the replacement of libmysql. http://php.net/releases/5_3_0.php
For what it's worth, Drupal
For what it's worth, Drupal 6.14 fully supports PHP 5.3 (see http://drupal.org/requirements). Are you running 6.14? I'd follow issues with the contrib modules that are broken under 5.3: it'd be good if they supported the same things core does.
It's all in the contrib modules, or so it seems
Thanks folks. I am running Drupal 6.14, but each module is going to have to catch up as well.
I found this discussion, essentially the discussion that resulted in Drupal 6.14 being ready for PHP 5.3. It seems the goal of some was to make a change that would also fix contributed modules as well, but that clearly did not happen. Interestingly, the Drupal community was working on this issue almost 6 months before PHP 5.3 was released, so kudos to the community. Even so, looks like I'm going to have to annoy my sysadmin and set up the site on PHP 5.2.11... even though 5.3 comes pre-installed on Leopard.... and we'll be using it for our other site. Kinda blows.
Grant
You mean snow leopard... Easy
You mean snow leopard... Easy fix. Have him install one of the packages from http://www.entropy.ch/software/macosx/php/ and have your drupal vhost entry use the older version. I pounded my head into the screen for an entire day before I made the connection between 5.3 being default in SL as I updated my workstation day1. Hope this saves you some pain.
i did a write up on this...
using macports: http://drewish.com/content/2009/09/drupal_6_on_snow_leopard
I tried to post another reply
I tried to post another reply on your blog but it looks like comments are off, but you need to make sure that OS X's php is out of the way. To do this completely you need to rename php, phpize and php-config from /usr/bin to something like php53, phpize53 etc. I was trying to build some php extensions manually and with pecl and either way it kept finding the php, phpize and php-config that were first on the path and using those, so the compiled extensions would not load with php 5.2.X that I was using with MacPorts.
It doesn't look like Grant is
It doesn't look like Grant is on Mac, but for anyone who does local development and who is, MAMP also works well here. I had been running sites on the native Apache until 10.6, when it jumped to PHP 5.3. And for Drupal 5.x sites, I still need an alternative since only 6.14 is 5.3-approved.
Thanks very much
Thanks for all the good information folks. I passed it all on to our sysadmin (also a half-time PHP coder and AJAX fundi). We are indeed on MAMP, with Snow Leopard, which comes with PHP 5.3 (or you might call it "almost 6" since it does include many new elements more commonly associated with major releases). Drupal is only very recently ready for PHP 5.3, just the latest release of 6.x really, but only for core and that is not going to be enough for most sites, since we all use contributed modules all the time, and many of these do indeed break. Further, it looks like the changes needed for Drupal 6.14 to be ready for PHP 5.3 were non-trivial and very time consuming. I'd not be surprised to find out that an issue or two were missed. So who knows how long it will be until contributed modules catch up?
MAMP has many issues. As drewish said in the post he linked to, "I also want to make it clear that I am familiar with MAMP but would rather punch myself myself in the face than use it." This is not something I've heard said about LAMP, or even WAMP. While LAMP is super simple to set up (with some limitations), MAMP can be a gigantic pain. For this reason (based on current and previous experiences with this and another internal MAMP site), after trying some of what was suggested here, and other things, our sysadmin has called BS on MAMP. He is currently building us an Ubuntu Linux server, and our live site is going to be LAMP with PHP 5.2.11. As a huge supporter of open source, it's about time we went the Linux route, if you ask me, so maybe this will be a positive to come out of all this kerfuffle.
Grant
I'm not clear if you're
I'm not clear if you're referring to MAMP the product (http://mamp.info) or MAMP the platform as in Mac/Apache/MySQL/PHP. I was referring to the product, which can be set to work with either PHP 5.3 or 5.2. It's a good alternative to the 10.6 stock Apache/PHP.
As for MAMP the platform, I have seen similar performance issues. I just don't think the disk I/O is there as compared to Linux or FreeBSD. I don't have a lot of evidence to back it up in a broad sense, but I have spent a lot of time on the Boost module in the past as a result of poor performance on a beefy Mac server as compared to a tinier Linux development server.
MAMP as in a mac with apache,
MAMP as in a mac with apache, php and mysql or http://www.mamp.info/ ? Two very different things Justin was talking about the former, I'm fairly sure.
As to the former, here are the really simple steps to getting drupal working on a SL install.
DL the entropy.ch 5.2.x package.
Lots of flexibility for dev
Sorry. I was indeed talking
Sorry. I was indeed talking about MAMP as in Mac/Apache/MySQL/PHP. Sorry for the confusion. Hrm, and an interesting confusion at that.
Grant
why the hate for MAMP the product?
Seems like a handful of folks don't hold MAMP the product in high regard. Just wondering why? I've been using it for years through several flavors of OS X, and aside from a bit of a pain to upgrade, with no problems.
Lev Tsypin
Also, keep in mind php 5.2
Also, keep in mind php 5.2 branch is still receiving updates. 5.2.10 and 5.2.11 have both been released since the introduction of 5.3. So while 5.3 is technically the latest feature release, 5.2.XX is still very much up to date and safe to use.
(this is hard to remember after doing Drupal for long enough as it's pretty common for old branches to be abandoned for newer ones, with many modules)
macports default is php5
Important note, 1.8 macports under leopard by default installs 5.3 when you select php5. So, this isn't necessarily a snow leopard only issue.