I've copied the ZendGdata folder into the sheetnode folder, but cannot figure out what the correct path should be in the configuration page. My understanding is that it should be "ZendGdata/library/" but this gives an error "The path you entered does not point to a valid location." Am I misunderstanding something? Many thanks.

Comments

infojunkie’s picture

Assigned: Unassigned » infojunkie

You need to give the full path. So on my machine, I entered: /var/www/d6/sites/all/modules/sheetnode/ZendGdata-1.7.8/library.

thebeepseal’s picture

OK, thanks, the config page has accepted the full path, BUT, when I try to import a Google spreadsheet I get a white screen on http://www.wales-lichens.org.uk/apprentices/node/add/googlesheet and back on the home page a similar message to that I had with sheetnode install regarding socialcalc.inc - so:

warning: main() [function.main]: open_basedir restriction in effect. File(/socialcalc.inc) is not within the allowed path(s): (/var/www/vhosts/wales-lichens.org.uk/httpdocs:/tmp) in /var/www/vhosts/wales-lichens.org.uk/httpdocs/apprentices/sites/all/modules/sheetnode/sheetnode_google.import.inc on line 4.
warning: main(socialcalc.inc) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/wales-lichens.org.uk/httpdocs/apprentices/sites/all/modules/sheetnode/sheetnode_google.import.inc on line 4.

infojunkie’s picture

And we don't know what fixed this message last time around!

If you have control over your host's php.ini, you might want to try to comment out the open_basedir directive altogether. Your hosting provider might also be able to turn it off for you.

Can you tell me which version of PHP you're running? I found many, many reports of issues concerning the open_basedir directive, and each PHP version has its idiosyncrasies.

thebeepseal’s picture

No.

It gets stranger - open_basedir is not set (i.e. its already commented out) in my php.ini.

I'm running PHP 5.0.4

Cheers
Alan

infojunkie’s picture

Are you sure the php.ini you're looking at is the one that's being used? You can make sure by calling phpinfo() and checking the reported settings.

avpaderno’s picture

The open_dir directive is surely active, otherwise you would not get a "open_basedir restriction in effect" error message.

thebeepseal’s picture

Yes, I checked with phpinfo() and that reports the path as /etc/php.ini - open_basedir is definitely commented out in this. I've searched the whole server and there is also a php.ini in /usr/local/psa/admin/conf/ but this also has open_basedir turned off. I'm baffled.

thebeepseal’s picture

Some other setting somewhere else has got to be overriding php.ini surely? But what, where?

avpaderno’s picture

Did you also verify that the safe_mode directive is not enabled as well?

thebeepseal’s picture

safe_mode is actually set to ON. Is that a problem?

infojunkie’s picture

According to http://www.php.net/manual/en/ini.sect.safe-mode.php: "This directive [open_basedir] is NOT affected by whether Safe Mode is turned On or Off. " It won't hurt to turn it off though.

open_basedir can also be changed in the Apache configuration, e.g.: php_value open_basedir /home/user/public_html.

thebeepseal’s picture

I'm still wrestling (when I find time).

There is nothing relevant in my Apache config file.

I noticed a posting from 2007 - http://drupal.org/node/120538 - which seems to address this issue. Howvere, I tried changing:

require_once('socialcalc.inc');

TO

include_once(drupal_get_path('module', 'socialcalc') .'socialcalc.inc');

along the line suggested, but to no avail.

It does seem to be an issue that has come up several times before (not just with Sheetnode) but no clear solution seems to have been found.

thebeepseal’s picture

... BUT (doing it properly) this does seem to work (so far and touch wood):

include_once(drupal_get_path('module', 'sheetnode') .'/socialcalc.inc');

thebeepseal’s picture

.. and I'm confusing issues here - this relates to my original problem with the main sheetnode module. I still have to sort out the Google spreadsheet import.

thebeepseal’s picture

.. and I've just found making the same code substitution in sheetnode_google.import.inc seems to solve that problem too.

infojunkie’s picture

Status: Active » Fixed

Thanks Alan for your feedback. I updated the module to include the path as you wrote it here.

thebeepseal’s picture

That's excellent - thanks very much (and you're very welcome).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.