In distribution package 7.14, the locale.admin.inc file has a control code somewhere that can't be correctly interpreted under a windows environment and leads to an Apache HTTP server error :

'szAppName : httpd.exe szAppVer : 2.2.21.0 szModName : php5ts.dll szModVer : 5.3.9.0 offset : 000a3b02'.

The file as it is, is perfectly interpreted under a Unix environment.
A quick and immediate temporary fix is to open the file with wordpad and save it.

Could the package distribution be fixed. Thanks.

Comments

felubra’s picture

I'm reporting same problem here. After a fresh install of Drupal 7.14 on Windows 7, the Apache Server crashes if I request the url admin/config/regional/language .

Thanks for the solution @Devline. It works!

kitikonti’s picture

I had also the same problem after updating from Drupal 7.12 to 7.14 on Windows 7.
Server crash on admin/config/regional/language/* url`s
and on admin/config/regional/translate/* url`s

@Devline solution works, thx!

adam.hammouda’s picture

Just wanted to chime in and mention that the issue is even more ridiculous than this. It's actually a PHP bug which triggers when an include/require'd file is of a certain size.

See e.g.:

https://bugs.php.net/bug.php?id=48034
https://bugs.php.net/bug.php?id=50982

For a few relevant PHP issues. This occurs when processing files with sizes that are exact multiples of 4096 bytes and causes PHP to segfault (!).

The reason your wordpad solution works is because wordpad re-formats the line feeds in the file from \n (unix style) to \r\n (windows style) upon save - which changes the files size from the problematic value of 53248 (exactly 52 KB). To verify this - you can simply edit the modules/locale/locale.admin.inc file and add or remove a character anywhere in the file. It will now work properly.

Please note that this bug appears to have been fixed in PHP 5.3.14 - so you might want to consider updating (I'm guessing this issue will be commonly run into by people running WAMP which is not up to 5.3.14 yet).

webchick’s picture

Issue tags: +Novice

That. Is utterly amazing. Nice sleuthing.

Seems like we could resolve this fairly easily by just slightly adjusting one or more of the comments in locale.inc. For example, changing:

 * Get list of all predefined and custom countries.

to:

 * Get a list of all predefined and custom countries.

Tagging as a novice issue.

AbelT’s picture

Hi,

I updated my Drupal installation to 7.14, and after that, I tried to install multilanguage capabilities.
After some proofs trying to work correctly with translated contents, multilanguage blocks, etc,
it started to appear the known message error of restarted conection.

I looked for the solution and I found this solution about edit locale.admin.inc file changing the file size.
I've done it wiht NotePad++, but it doesn't work. Is there any step I've skipped?

Thanks!

kspal’s picture

It worked for me - thanks for the tip! But that's truly surprising. Who spoke about unit test, continuous integration and the like?

magiainformatica’s picture

thanks this worked for me.
The saved file has line terminated with crlf (0D0A) instead of lf (0A) ..!!!!

damien tournoud’s picture

Status: Active » Closed (works as designed)

This is a PHP bug, that is getting fixed. Nothing we have to do on our end.

AbelT’s picture

Uuups!
It finally worked too! It seemed cleaning cache didn't worked inmedately when I did. Next day it was running ok.

www.make-me-a-website.net’s picture

Version: 7.14 » 7.15

I know this bug come from php.
But I think it should be "fixed" in drupal anyway.
Wamp current version crash on this and make develloper all around the world lose great amount of time (I among them), this bug is hurting drupal and a fix would be completely neutral.

csander’s picture

The solution above did not work for me.

Could there be something else causing the problem?

How would I find out what version of PHP my server is using?

rtrapmonf’s picture

With PHP 5.3.9, doing the above with WordPad fixed this. With Notepad ++, it didn't. Truly fascinating and a mighty relief to finally get shot of this hassle on so many D7 projects. (BTW it was never a problem on D6 projects in a Windows environment.)

JSCSJSCS’s picture

I think I had the same problem, but with a file n the 7.x-1.1 version of the Print module. If I used Git to clone my repo that included this module and its files, then it would crash. If I used WinCSP to copy the file from the production site, it would work. I guess WinCSP was changing the files size in the transfer, so it would work. It took me hours to find out what file was causing the issue. But I never figured out why until I stumbled on this thread. Ultimately, I just upgraded to the latest version of the module, which probably had a different file size. I use WAMP, which is not easy to upgrade and get to work correctly.

TarekStar’s picture

I think the solution on some cases is just to enable the Locale module from Modules