haku Posted May 16, 2010 Share Posted May 16, 2010 I'm using Drupal, and I've been given a site to do a bit of work on. When uploading modules, Drupal automatically scans the folders in a directory for files with an extension of .info, and then lists those modules. I've uploaded some new modules, but Drupal is not seeing them. I have tracked the problem down to the specific location where the problem exists. The line in question is this: if (!file_exists($filename)) { return FALSE; } However, the file definitely exists, so I'm at a bit of a loss. As an example, I have the following directory structure: sites/all/modules/acl - acl.info sites/all/modules/about_this_node - about_this_node.info This path returns true for file_exists(): sites/all/modules/acl/acl.info But this file is returning false: sites/all/modules/about_this_node/about_this_node.info Even though the file definitely exists. Does anyone have any idea why this may be happening? Quote Link to comment Share on other sites More sharing options...
corbin Posted May 16, 2010 Share Posted May 16, 2010 I'm sure this has already occurred to you to check, but... Case sensitivity? Aside from that... Hrmmm... File permissions shouldn't be it. Is the path name too long? (I don't know what the path limit is under linux, but it's 256 chars on Windows.) I can't really think of anything else it could be. Quote Link to comment Share on other sites More sharing options...
haku Posted May 16, 2010 Author Share Posted May 16, 2010 Thanks for the thoughts. Case sensitivity is not an issue, permissions have been checked and the file is readable (644), and the path name is quite short! I'm at a loss here myself. I usually wouldn't post on an issue for something that looks to be as simple as this, but I've checked every last possible thing I can think of. Quote Link to comment Share on other sites More sharing options...
haku Posted May 16, 2010 Author Share Posted May 16, 2010 I finally figured it out. The previous server maintainer had set php safe mode to on. When php safe mode is on, if the owner of the dir where the file stands differs from the php-owner, file_exists() returns false. I had to edit the httpd.include file for the server to turn off safe mode. Since safe mode is deprecated as of php 5.3.0, I turned it off. What a headache that was! I hate taking over other people's work sometimes. Quote Link to comment Share on other sites More sharing options...
siric Posted May 16, 2010 Share Posted May 16, 2010 Good that you got it sorted. Can you mark this thread solved? Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.