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.
I see the above error x times in my logs after we updated to PHP 5.3
My host pointed me to the following:
modules/gmap/gmap.module:function gmap_gmap($op, &$map)
the & shouldn't be there
I removed it and everything is fine again.
Comment | File | Size | Author |
---|---|---|---|
#28 | gmap_invoke_cleanup_3.patch | 4.98 KB | vgarvardt |
#22 | gmap_invoke_cleanup_2.patch | 5.52 KB | hutch |
#11 | gmap_invoke_cleanup_1.patch | 5.82 KB | pivica |
#9 | gmap_invoke_cleanup.patch | 5 KB | bdragon |
#4 | 5_3_compat.patch | 537 bytes | kim.pepper |
Comments
Comment #1
nirad CreditAttribution: nirad commentedgetting this error too after moving my development site to a new computer that has PHP 5.3.
Comment #2
nirad CreditAttribution: nirad commentedswitched to PHP 5.2.11 and the error went away. This seems like it may be a problem with Drupal core, and not with Gmap. See: http://drupal.org/node/586228
Comment #3
kim.pepperThis isn't a problem with Drupal core, its an incorrect use of a reference parameter when its a value parameter. See #360605: PHP 5.3 Compatibility
Comment #4
kim.pepperAttaching patch.
Comment #5
amishra CreditAttribution: amishra commentedSorry newbee question...how do i apply this patch?
Comment #6
joetsuihk CreditAttribution: joetsuihk commentedthe patch may fail on php4, see http://drupal.org/node/615058#comment-2211548
Comment #7
Nardos Tessema CreditAttribution: Nardos Tessema commentedThanks a lot! It worked for me. I removed the ampersand as stated in the description and now everything is fine.
? 5_3_compat.patch
Index: gmap.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gmap/gmap.module,v
retrieving revision 1.101
diff -u -p -r1.101 gmap.module
--- gmap.module 17 Apr 2009 18:31:59 -0000 1.101
+++ gmap.module 5 Oct 2009 01:14:28 -0000
@@ -76,7 +76,7 @@ function gmap_theme() {
/**
* Implementation of hook_gmap().
*/
-function gmap_gmap($op, &$map) {
+function gmap_gmap($op, $map) {
switch ($op) {
case 'macro':
return array(
Comment #8
bdragon CreditAttribution: bdragon commented#629196: GMAP PHP 5.3 compatibility marked duplicate.
I'll write a custom _invoke function to fix it.
Comment #9
bdragon CreditAttribution: bdragon commentedHere's the "correct" way to do it.
I'd like this tested with both PHP 5.3 and PHP 5.2 before I commit it.
Comment #10
bdragon CreditAttribution: bdragon commented#684440: warning: Parameter 2 to gmap_gmap() expected to be a reference marked dupe.
Comment #11
pivica CreditAttribution: pivica commentedI have rerolled patch from #9 against latest gmap dev version. Tested on both PHP 5.2 and PHP 5.3 - its seems everything is working fine and no more 'reference' warning error for PHP 5.3.
Comment #12
ari-meetai CreditAttribution: ari-meetai commentedSame here. Tested both in PHP 5.2 & PHP 5.3
Comment #13
ragavendra_bn CreditAttribution: ragavendra_bn commentedGetting the below warnings in /admin/settings/gmap
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: parse_ini_file() has been disabled for security reasons in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 229.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 234.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
* warning: Invalid argument supplied for foreach() in /home/fashion/public_html/bandhana/sites/all/modules/gmap/gmap_markerinfo.inc on line 246.
Using PHP5.3. Should be related to PHP5.3
How to fix this?
Comment #14
joetsuihk CreditAttribution: joetsuihk commentedre #13, unrelated, "parse_ini_file() has been disabled for security reasons" in your shared hosting. contact your hosting for more info.
Comment #15
marvil07 CreditAttribution: marvil07 commented#11 Works fine, thanks!
Comment #16
spacereactor CreditAttribution: spacereactor commentedcan this patch be added to the dev please.
Comment #17
spacereactor CreditAttribution: spacereactor commentedagain can this #11 patch be added to dev, it very troublesome with each new upgrade since my hosting server is running on php 5.3
Comment #18
ansorg CreditAttribution: ansorg commentedsubscribe (waiting for this gmap fix to be able to update site to php 5.3)
thank you
Comment #19
Peng.Pif CreditAttribution: Peng.Pif commentedSubscribe.
Comment #20
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedProblem remains, unless you apply patch...
Comment #21
mikl CreditAttribution: mikl commentedPlease commit this…
Comment #22
hutch CreditAttribution: hutch commentedrerolled patch on current CVS DRUPAL-6--1, the old one did apply but not all that cleanly.
Comment #23
iva2k CreditAttribution: iva2k commented#22 tested on live site with PHP5.3. works OK, warnings gone. Please commit
Comment #24
Bobuido CreditAttribution: Bobuido commentedSubscribe
Comment #25
Anonymous (not verified) CreditAttribution: Anonymous commentedsame problem with upgrade to PHP 5.3.
maybe rather unwisely i tried #22 on gmap 6.x-1.1-rc1 (DRUPAL-6--1-0), and it worked fine except for 1 hunk, which on inspection i couldnt see any problem with, and applied manually, and it worked.
and now the error is gone, thanks!
Comment #26
michaeldhart CreditAttribution: michaeldhart commentedPatch applied to 6.x-1.1-rc1 and tested on my development server running php 5.3 and issue resolved...
Comment #27
vgarvardt CreditAttribution: vgarvardt commentedCan not apply patch from #22 to 6.x-1.1-rc1:
Comment #28
vgarvardt CreditAttribution: vgarvardt commentedI applied rejected hunk from #22 manually.
Here is updated patch that applies without any problems to 6.x-1.1-rc1.
Comment #29
mikl CreditAttribution: mikl commented@vgarvard its not supposed to apply against the release (6.x-1.1-rc1), its supposed to apply against the latest dev version. There, the patch from #22 applies cleanly.
Comment #30
vgarvardt CreditAttribution: vgarvardt commentedOk, sorry.
Comment #31
bdragon CreditAttribution: bdragon commentedFixed (I hope -- I'm a bit rusty with my tools at the moment), thanks!
http://drupal.org/cvs?commit=377296
http://drupal.org/cvs?commit=377302
http://drupal.org/cvs?commit=377304
Comment #32
spacereactor CreditAttribution: spacereactor commentedsorry to open again, but i just install gmap and i having this error
warning: Parameter 2 to gmap_gmap() expected to be a reference, value given in /home/mystie/public_html/includes/module.inc on line 483.
This only happen to my server using php 5.3 and my local test server is php 5.2 is ok
I have to manually add the patch from #22 to remove the error.
Comment #33
marvil07 CreditAttribution: marvil07 commentedspacereactor: fixed means commited to the dev version, not on the official release. please make sure you have the 1.x-dev version. maybe you can also want to read Status settings for an issue
Marking back to fixed.
Comment #34
spacereactor CreditAttribution: spacereactor commentedi using 6.x-1.x-dev of 2010-Jun-09 and having the error, that why i manually adding the #22 patch. I not using the official release.
Comment #35
rooby CreditAttribution: rooby commentedI have checked the cvs commits and the latest dev version and the fix is definitely in there already.
Dev releases only update every 12 hours so it is possible you didn't get the latest version if it was too soon after the commit.
If you download the dev version again now it should be working without having to manually patch.
Comment #36
mormmam CreditAttribution: mormmam commentedi used the #22 patch and i got no error warning!
Comment #37
rooby CreditAttribution: rooby commentedYou don't need the patch if you use the latest dev version as this has already been fixed.
Comment #38
ghousemaideen CreditAttribution: ghousemaideen commented1)I have installed the openpublish and executed well. but, i have received error given below. how to solve this error. I need brief explainations. please guide me immediatly... and,
2)How to convert the drupal database to openpublish. i need some brief explaination. pls..
3)where is Gmap folder.
warning: Parameter 2 to gmap_gmap() expected to be a reference, value given in E:\xampp\htdocs\openpublish\includes\module.inc on line 483.
Regards,
ghouse.
Comment #39
ghousemaideen CreditAttribution: ghousemaideen commented1)I have installed the openpublish and executed well. but, i have received error given below. how to solve this error. I need brief explainations. please guide me immediatly...
warning: Parameter 2 to gmap_gmap() expected to be a reference, value given in E:\xampp\htdocs\openpublish\includes\module.inc on line 483. and,
2)How to convert the drupal database to openpublish. i need some brief explaination. pls..
3)where is Gmap folder.
warning: Parameter 2 to gmap_gmap() expected to be a reference, value given in E:\xampp\htdocs\openpublish\includes\module.inc on line 483.
Regards,
ghouse.
Comment #40
rooby CreditAttribution: rooby commented@ghousemaideen:
1. I have not used openpublish and I know nothing about it.
What version of gmap are you using? To avoid the error reported in this issue you currently need to use the latest dev version 6.x-1.x-dev (you will also have to use location 6.x-3.x-dev).
2. This is the support queue for gmap, not openpublish. If you need help with openpublish I suggest using it's issue queues. If you check the openpublish issue queues and documentation you might find the information you want is already available.
3. The gmap folder is wherever you put it when you installed it. If you have access to your database use this sql to find out (or just look around your file system):
That will give you the installation information for the gmap module, which includes the patch to the module.
Comment #41
rooby CreditAttribution: rooby commentedMarked #747658: Gmaps warning as a duplicate of this issue.
Comment #43
Summit CreditAttribution: Summit commentedDid it for me also, greetings, Martijn