I have Mobiles Tools running on a production site and it works fine but I am getting an error when cron runs. In the email report that gets sent to me when the cron job is run, I get multiple warnings.
PHP Warning: Unable to parse URL in .../sites/all/modules/mobile_tools/mobile_tools.module on line 843
PHP Warning: array_key_exists(): The second argument should be either an array or an object in .../sites/all/modules/mobile_tools/mobile_tools.module on line 844
PHP Warning: parse_url(http:///mobile): Unable to parse URL in .../sites/all/modules/mobile_tools/mobile_tools.module on line 715
PHP Warning: Unable to parse URL in .../sites/all/modules/mobile_tools/mobile_tools.module on line 718
Has anyone run into this? The dev version of site running locally works fine.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | mobile_tools_cron_warnings.patch | 464 bytes | millenniumtree |
Comments
Comment #1
deverman commentedOur cron is also not running properly when mobile tools is enabled. I didn't see this warning yet but maybe our php doesn't have those warnings enabled. Does cron not work with mobile tools? That would seem unlikely there must be someway to configure it to work? I have set "cron.php" as an exception on the mobile tool page redirection text box but this still didn't work.
Comment #2
3rdvalve commentedI ran into the same problem. The cron ran fine manually but failed if run through the server's cron handling. Putting an exception in the Mobile Tools interface did not help.
I solved the problem by configuring the cron to run with the nomobile setting (http://example.com/cron.php?nomobile=true)
Comment #3
twom commentedComment #4
ezar commentedSame here +1
Logs:
[Mon Aug 02 15:00:01 2010] [error] [client 188.40.96.138] PHP Notice: Undefined index: host in /usr/local/www/apache22/data/sites/all/modules/contrib/mobile_tools/mobile_tools.module on line 727
[Mon Aug 02 15:00:01 2010] [error] [client 188.40.96.138] PHP Notice: Undefined index: host in /usr/local/www/apache22/data/sites/all/modules/contrib/mobile_tools/mobile_tools.module on line 730
[Mon Aug 02 15:00:01 2010] [error] [client 188.40.96.138] PHP Warning: strpos() [function.strpos]: Empty delimiter in /usr/local/www/apache22/data/sites/all/modules/contrib/mobile_tools/mobile_tools.module on line 752
Regards,
eZar.
Comment #5
twom commentedThis should be fixed in the dev version by replacing the reference to $_SERVER['SERVER_NAME'] to $_SERVER['HTTP_HOST'] plus an extra check if the value is set.
Feel free to test!
Comment #7
armyofda12mnkeys commentedJust curious, is this fixed in 6.x-2.1?
I wasn't sure as it looks very recent update and it was fixed in dev on august 18th so I assumed it would be fixed in that release (not working for me so I am going to use ?nomobile=true for now).
Comment #8
millenniumtreeFixed in 6.x-2.x-dev as of the 2011-Jun-24 commit.
NOT fixed in even 6.x-2.3
I really hate having to install -dev versions on PRODUCTION sites.
Anyone who has this in 6.x-2.3 and doesn't want to use the -dev, here's a very tiny patch.
Comment #9
mherchelI'm getting the this error even after upgrading today to the latest dev version (6.x-2.x-dev from 2011-Jun-23)