Dear Folks:

I just downloaded and installed Drupal 5.2, unzipped it, installed the database, and ran the install script. After this I get a strange error message as below for each of the core modules when I go to Administer/Site Building/Modules.

warning: parse_ini_file(modules/aggregator/aggregator.info) [function.parse-ini-file]: failed to open stream: No such file or directory in /var/www/html/drupal/includes/module.inc on line 195.
# warning: parse_ini_file(modules/block/block.info) [function.parse-ini-file]: failed to open stream: No such file or directory in /var/www/html/drupal/includes/module.inc on line 195.
# warning: parse_ini_file(modules/blog/blog.info) [function.parse-ini-file]: failed to open stream: No such file or directory in /var/www/html/drupal/includes/module.inc on line 195.
# warning: parse_ini_file(modules/blogapi/blogapi.info) [function.parse-ini-file]: failed to open stream: No such file or directory in /var/www/html/drupal/includes/module.inc on line 195.

There is a similar message for every module, and beneath these error messages, there are check boxes for each module, but nothing beside the check boxes other than empty space.

An ls -al shows these modules are all there in /modules
ls -al
total 124
drwxr-xr-x 31 27743 27744 4096 Jul 26 15:25 .
drwxr-xr-x 10 root root 4096 Aug 3 12:15 ..
drwxr-xr-x 2 27743 27744 4096 Jul 26 15:25 aggregator
drwxr-xr-x 2 27743 27744 4096 Jul 26 15:25 block
drwxr-xr-x 2 27743 27744 4096 Jul 26 15:25 blog
drwxr-xr-x 2 27743 27744 4096 Jul 26 15:25 blogapi
drwxr-xr-x 2 27743 27744 4096 Jul 26 15:25 book

and module.inc is in /includes:
ls -al module.inc
-rw-r--r-- 1 27743 27744 13416 Jul 20 20:54 module.inc

I checked the permissions for all directories - all 755, and all files - 644. I have also tried renaming .htaccess

What could be the problem here?

Ralph

Comments

rj.seward’s picture

I am running this under Fedora 6 with PHP Version 5.1.6. SELinux is disabled.

Ralph

SadhooKlay’s picture

I have a similar problem
http://drupal.org/node/172660

The body of the message, my configuration, and the commentary-error log.
SELinux disabled...

Please help me!

wavesailor’s picture

Hi,

I've got the same problem but under windows ... anyone got any ideas .. I'm pulling my hair out.

Thanks

jj

oeln’s picture

I've got this issue, too, but with IIS 5.1/PHP 5.2.5/Drupal 5.3. I guess what I find interesting is that while the error indicates the file or directory is non-existent, it's identified with line 195 in includes/modules.inc, which is inside a conditional if loop:

194: if (file_exists($filename)) {
195: $info = parse_ini_file($filename);

I'd think it wouldn't even be trying to parse_ini_file() if file_exists() weren't true, but then why an error indicating the file doesn't exist? ;/

- oeln

theshz’s picture

I ran into the same problem, for me the solution was to add ".:" to the include_path in php.ini

estahn’s picture

Hi,

I fixed this issue as followed:

194: if (file_exists($filename)) {
195:   $info = parse_ini_file(dirname(__FILE__) . '/../'.$filename);

Regards
Enrico

luketsimmons’s picture

This happened to my first subdirectory drupal site (I normally install drupal at root of a domain/subdomain). My site had a htaccess at root level which was rewriting the include path directive for php for a specific includes folder. I fixed this by adding a php.ini directive to the .htaccess in my drupal directory. So the top level site isn't affected either.

This is similar to what theshz said but the change is in the drupal htaccess and not the server php.ini.

In .htaccess (mine is v5.7), the part after the subdirectories rewrite base apache configuration, I have added my php_value (this was copied from old syntax, so I'm sure there may be better way of writing a php_value, but this works) directly after, though I think it can go anywhere in the htaccess.

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  RewriteBase /directories

  # We manually reset the include path for this directory (our drupal directory)
  php_value include_path "."

This will set our php include path for our drupal install to this directory and not to elsewhere in the site as specified in the htaccess at root level.

Luke

ternto333’s picture

I was getting the same error, but none of the above solutions fixed my problem. I fixed the problem when I deleted the parentheses in the description field.
description = Adds ability to search files on the server located in given directory(s)

manObject’s picture

I have encountered this problem in two distinct ways (so far only two!). The first is with WampServer on Windows - a simple matter of module php_parsekit not being enabled by default. The second is with the .htaccess file. I suspected the file was corrupted somewhere, so I simply replaced it with a 'clean' version from a fresh Drupal install, the only modification required being with the path to the 'Error 404' doc. This also cured the problem.