Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi Guys,
a small recommendation: I think you should place a note in the documentation (and on the project homepage) that this module requires php 5. I know that skilled developers should check that (and have access to php 5 regardless) but it did take me an hour or two of exploring to figure this out. It could save people in the future.
Just a thought.
Thanks for the awesome toolset!
Comments
Comment #1
zzolo CreditAttribution: zzolo commentedHey, I'm curious as to what specific functions or calls make this dependent on PHP 5, apt94jesse.
Changing title and category.
Comment #2
apt94jesse CreditAttribution: apt94jesse commentedHa, well, I didn't look at that specifically. I just know that I got all sorts of errors and alerts when I had it on my php 4 server. When I installed the module on a drupal site that was on a server with php 5, everything was hunky dory.
Looking back at the older installation (older as in last week), I received the following error when trying to add a preset:
Parse error: syntax error, unexpected '=', expecting ')' in /home/ ... /modules/openlayers/includes/openlayers.render.inc on line 23
Line 23 contains the following
I know JUST enough php to muck around in there, and I know that the "&$map" looks a little fishy for what I'm used to. I've never seen a & in front of a variable before, though obviously it's a legit use since the module works great on php 5. Taking the & out there and on several subsequent lines got rid of the error, however the module never worked on the php 4 server.
There was also a very generic error in the views style plugin. Whenever I selected 'openlayer' as the style for a view, I got a popup alert saying "An error occurred at url/admin/build/views/ajax/display/adsf/default/style_plugin."
SO, my assumption was that these were caused by php version issues.
Comment #3
phayes CreditAttribution: phayes commentedI've made openlayers require php 5.2: http://drupal.org/cvs?commit=268582 and http://drupal.org/cvs?commit=268590
Why PHP 5.2 and not 5.1? Well, according to the GoPHP5 project (http://gophp5.org/):
PHP 5.0.x had a number of problems with stability and performance. Much of the feature set wasn't fully nailed down yet either, and tools such as SPL and PDO didn't work right until PHP 5.1. Many developers and web hosts shied away from PHP 5 because of it's unfortunately rocky beginnings. Fortunately, PHP 5.0 is not very widely used.
PHP 5.1 was much more stable and reliable, but it also had some issues with performance. It's a viable platform, however, and many projects already require it.
PHP 5 has really come into its own with PHP 5.2, however. It adds a number of important features to the core system that we feel are important to target. Most importantly:
Comment #4
phayes CreditAttribution: phayes commentedI'f you guys are ok with 5.2 instead of 5.1 please mark as fixed.
Comment #5
apt94jesse CreditAttribution: apt94jesse commentedThat all looks good to me. I would recommend there be a small note on the project page similar to other modules that have php version requirements, but that's an opinion and not, in my mind, a necessity.
Otherwise, I'm marking as "Fixed" since there's at least a short discussion now in case people search the issues as I did :)