I apologise for opening yet another thread on this subject, but none of the dozens I've read seem to have reached a definite conclusion or solution.

I have Image module v 1.197.2.6 working perfectly on one Drupal 5 site, http://threadscape.co.uk so clearly it can be done. That was a clean install. My problem is that I have now spent 4 days trying to achieve an upgrade from Drupal 4.7 ->5.10 with Image module 5.x-1.9 (or 5.x-1-dev, I've tried both). I am completely stuck. Image noides show up (titles, description, sizes etc, but no images at all . Everything else works, just no images. As there are nearly 1,000 of then, this is a big problem.

Things to note:

  • I'm doing a test upgrade as per the handbook, into a copy of my site at /test - subdomained as http://test.tonysleep.co.uk .Everything (modules, themes) was disabled, old Drupal and module files etc deleted and the cache tables emptied (repeatedly) prior to upgrade (and since)
  • As soon as I enabled Image module it claimed to be rebuilding files even before I had a chance to run update.php. However it appears not to have touched the files, all of which retain their upload dates
  • Files method is set to private, have tried clean URL's (which I use) and not
  • Default paths are set correctly, Upload is configured, Access permissions all OK. Files and files/images have 777 permissions. Image files are 645, but I've also tried 775 and 777.
  • Images are referenced in the page HTML<img src="http://test.tonysleep.co.uk/system/files/images/reflection_v2_3.jpg" alt="Reflection 01" title="Reflection 01" class="image image-preview " width="510" height="520" /> That is correct: the file really is in files/images
  • If I try and upload a new image, it and a thumbnail are correctly created in files/images/temp - but no preview appears.
  • Non image files (eg zips, PDF's) can still be downloaded OK from their location in 'files', which makes me think it's not a core module issue but Image
  • Paths in the files table 'filepaths' are all of the format 'images, except for those uploaded via Image Assist which are 'files/images'. This is the same on the properly functioning D5 site Threadscape.co.uk
  • htaccess is standard and seems to work fine with other modules
  • I've been through all this twice, as I wanted to make sure I hadn't made some dumb mistake. The second time I made notes of what I did.

I am completely baffled and seem doomed to be stuck on 4.7 forever! There seems to be something broken in the 4.7->5 upgrade. If anyone has the slightest inkling what else to try, or needs more info please help. .

Comments

halftone’s picture

Further info :

I should have said :

  • all missing images appear in Watchdog as 'page not found', despite correct paths
  • If I try and edit an existing image node where the image is missing or I go to either admin/settings/image or node/add/image I get the following Watchdog logged php errorrealpath() [<a href='function.realpath'>function.realpath</a>]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/halftone:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/halftone/public_html/test/includes/file.inc on line 286.
halftone’s picture

Some seaching suggests this realpath / open_basedir restriction stuff is likely the cause of no images, and is part of my hosting co's configuration (shared server reseller a/c @ www.clook.co.uk )

However, this is apparently very commonly done with shared hosts. There are no issues with my other Drupal 5 site (earlier versions of Drupal 5 & Image) nor my 4.7 site, both hosted on the same Clook reseller account. Has something changed in Drupal or Image?

Can this be overridden in settings.php? I don't have access to php.ini. Safe Mode is OFF, btw. (see http://tonysleep.co.uk/phpinfo.php for full config).

http://drupal.org/node/212653 refers to a similar issue with the Asset module which they have patched around.

Sorry, this is beyond my limited abilities. Can anything be done?

halftone’s picture

http://drupal.org/node/161948 also seems utterly relevant "I have found the problem: in php5.ini upload_tmp_dir was not set, so it defaulted to the system directory, which was outside of the open_basedir hierarchy. I set it to the same directory as the site's temp and Images, imagefields and attachments all work again. :-)"

upload_tmp_dir is not set on my server but I don't have access to php.ini. I'll see if anything be done via settings.php or htaccess. But anyhow, if this is a problem, shouldn't image module allow for it?

halftone’s picture

Status: Active » Closed (duplicate)

Closing this thread. I've now figured out it's a duplicate of the issue at http://drupal.org/node/184489 and I will continue there.