in pathauto inc, line 122 there is this code:

$translations = parse_ini_file($path .'/i18n-ascii.txt');

I just had a problem on a server where parse_ini_file was included in disabled_functions in php.ini. This has to be changed globally and cannot be changed locally. I haven't had this problem before, even though I've been using pathauto in pretty much every Drupal installation for years and on different servers. But after doing some research it seems that parse_ini_file is recommended to be in disabled_functions, so some people might run into this problem as well. I see that in 2.x-dev you don't seem to be calling this function but I still wanted to report it. I don't know my way around PHP too well but maybe you know of a quick fix for another way to include that file.

Thanks
Anja

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

The transliteration system was completely revamped in 6.x-2.x and 7.x-1.x to no longer use/require the i18n-ascii.txt system.

I think Drupal uses parse_ini elsewhere so this host may not be well suited to Drupal.

Dave Reid’s picture

Version: 6.x-1.3 » 6.x-1.x-dev

Core does not actually use parse_ini_file, although it is used by other contrib modules. Should we be replacing this with drupal_parse_info_file()?

aschiwi’s picture

I only found this function (parse_ini_file) in pathauto (and only in that one line), not in core or any of the 36 contrib module folders used in that installation. I saw it wasn't used in 6.x-2.x but thought if 1.x was gonna be around for another while it might make sense to replace the function (if there is an alternative function).

greggles’s picture

Category: support » feature
Priority: Minor » Normal

drupal_parse_info_file seems fine if it works as a drop-in replacement.

If we have to alter the i18n-ascii.txt file then I don't think we can do it.

Freso’s picture

There's a problem with PHP 5.3 not parsing the i18n-ascii.txt file over at #779832: i18n-ascii.txt isn't being read with PHP 5.3. If someone could investigate whether these two are related, that'd be awesome. :)

Dave Reid’s picture

Status: Active » Closed (duplicate)

Yep agreed. Let's mark this as a duplicate for now.

Dave Reid’s picture

Status: Closed (duplicate) » Active

Please ignore me...

greggles’s picture

Status: Active » Needs review
FileSize
749 bytes

And a patch...

Status: Needs review » Needs work

The last submitted patch, 848250_trivial_change_parse_info_file.patch, failed testing.

aschiwi’s picture

I tested the patch even though the test failed and it works fine for me. Creating a node with Umlauts in it results in correct URL aliases (e.g. from ä to ae)

AlexisWilke’s picture

Note that the transliteration module is available in D6 and has one function to be called:

  transliteration_get(...)

Wouldn't that be a better long term approach?

Thank you.
Alexis Wilke

greggles’s picture

Category: feature » bug

Yes, that is a great idea. #247758: Use Transliteration module for transliteration ;)

6.x-1.x is "closed to features" to help keep it more stable. Speaking of, changing category...

Dave Reid’s picture

Status: Needs work » Fixed

Committed #8 to CVS. Thanks everyone!
http://drupal.org/cvs?commit=395672

aschiwi’s picture

Thanks guys!

Status: Fixed » Closed (fixed)

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

Dave Reid’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

Doing some final testing with this and it appears that this breaks when using the default i18n-ascii.txt file. So I'm voting for a rollback until we can figure out a better solution.

Dave Reid’s picture

This has been rolled back with the commit in http://drupal.org/cvs?commit=404618

Dave Reid’s picture

Title: parse_ini_file to call » parse_ini_file() problems with PHP 5.3 or disallowed
Issue tags: +PHP 5.3
AlexisWilke’s picture

So... what's wrong with #11? 8-)

greggles’s picture

@AlexisWilke: see #12 :p

AlexisWilke’s picture

@greggles, yes! it says it's a great idea, what's wrong with great ideas?! 8-)

Dave Reid’s picture

Because it's already been implemented in the 6.x-2.x and 7.x-1.x versions of pathauto for a while now? If you had read the issue linked in #12 you would have seen that.

So if you want transliteration, upgrade.

AlexisWilke’s picture

My personal opinion would be to mark this as fixed and to publish 6.x-2.0 then. Don't you already have all the feature of 1.3 in 2.x?

Note that I understand what you are saying, that it is done in the other version, even better since you could just copy the code instead of re-inventing the wheel. But if you don't want to do that you could just say that 1.x is not compatible with PHP 5.3 and be done with it.

Thank you.
Alexis

greggles’s picture

6.x-2.x is not stable enough yet. It needs a few betas first to get some testers.

Alexis, really you are not reading the things we are saying which makes it extremely frustrating. We don't add features to stable branches.

Dave Reid’s picture

Priority: Critical » Normal

Downgrading back to normal.

eric.chenchao’s picture

subscribe

nvcken’s picture

I catch the same problem.
Have any solution?