Last modified: 2014-02-12 23:55:23 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36388, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34388 - Blank page after activating MobileFrontend
Blank page after activating MobileFrontend
Status: VERIFIED INVALID
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-14 09:17 UTC by Uwe Kaminski
Modified: 2014-02-12 23:55 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Uwe Kaminski 2012-02-14 09:17:53 UTC
I'm using Mediawiki 1.18.1 on a Debian 5 and FastCGI.

I installed the MaobileFrontend Extension by adding this line of code into the LocalSettings.php:

require_once("$IP/extensions/MobileFrontend/MobileFrontend.php");

After this I always getting a blank screen if I try to open a wiki page in a browser. It does not play a role if it's a mobile browser or a Desktop browser like Firefox.

Looking at the HTML sources of the generated page (in the same browser) is showing also a blank page.

Do you have any hint for me how to investigate this problem further? 

Thanks Uwe
Comment 1 Antoine "hashar" Musso (WMF) 2012-02-14 09:34:28 UTC
Blank page means there has been a server side error. Please have a look at your web server error log which should contains hints :)
Comment 2 Uwe Kaminski 2012-02-14 10:19:37 UTC
Thanks. The error.log contains this entry if MobileFrontend is active:

[Mon Feb 13 18:41:48 2012] [error] [client 88.128.4.213] FastCGI: server "/srv/www/fcgi/n9wiki.de/php5/php-fcgi-starter" stderr: ALERT - maximum execution depth reached - script terminated (attacker '88.128.4.213', file '/srv/www/n9wiki.de/http/index.php')

There seems to be no other information in the other error logs (e.g.: php-error.log) I checked.
Comment 3 Uwe Kaminski 2012-02-14 10:20:26 UTC
I suggest to raise the importance of this bug as it makes the whole installation unusable.
Comment 4 Patrick Reilly 2012-02-14 10:43:47 UTC
(In reply to comment #3)
> I suggest to raise the importance of this bug as it makes the whole
> installation unusable.

Do you have memcached installed and activated with your mediawiki installation?

If you don't you need to change the WURFL configuration.

Change this section of the wurfl-config.xml file located in
/extensions/MobileFrontend/library/resources/wurfl-config.xml:
    <persistence>
        <provider>file</provider>
        <params>dir=/tmp/wurfl</params>
    </persistence>
Comment 5 Antoine "hashar" Musso (WMF) 2012-02-14 10:44:04 UTC
You server has a suhosin.executor.max_depth value which is too low for that extension. The default is 0 (aka disabled) according to http://www.hardened-php.net/suhosin/configuration.html#suhosin.executor.max_depth

So you should raise that value wherever it could be set (probably /etc/php.ini ).


Marking bug as worksforme since it seems to be a local issue. Please reopen if the above hint does not solve the issue for you :-]
Comment 6 Patrick Reilly 2012-02-14 10:49:28 UTC
(In reply to comment #2)
> Thanks. The error.log contains this entry if MobileFrontend is active:
> 
> [Mon Feb 13 18:41:48 2012] [error] [client 88.128.4.213] FastCGI: server
> "/srv/www/fcgi/n9wiki.de/php5/php-fcgi-starter" stderr: ALERT - maximum
> execution depth reached - script terminated (attacker '88.128.4.213', file
> '/srv/www/n9wiki.de/http/index.php')

You also you can disable Hardened-PHP / Suhosin or change:
suhosin.executor.max_depth
One possible solution is to set these values in a .htaccess file:

php_value suhosin.executor.max_depth 0
php_flag suhosin.simulation On

- The first one deactivates the maximum execution depth.
- The second one sets Suhosin to simulation mode (not needed)

> 
> There seems to be no other information in the other error logs (e.g.:
> php-error.log) I checked.
Comment 7 Uwe Kaminski 2012-02-14 17:35:41 UTC
(In reply to comment #5)
> You server has a suhosin.executor.max_depth value which is too low for that
> extension. The default is 0 (aka disabled) according to
> http://www.hardened-php.net/suhosin/configuration.html#suhosin.executor.max_depth
> 
> So you should raise that value wherever it could be set (probably /etc/php.ini
> ).
> 
> 
> Marking bug as worksforme since it seems to be a local issue. Please reopen if
> the above hint does not solve the issue for you :-]

The file was located in /etc/php5/cgi/php.ini

It contains:
---
extension=suhosin.so
[suhosin]
suhosin.simulation="Off"
suhosin.log.syslog=511
suhosin.log.syslog.facility=9
suhosin.log.syslog.priority=5
suhosin.executor.max_depth=50
suhosin.executor.func.blacklist="system,exec,passthru,proc_open,shell_exec"
suhosin.executor.disable_eval="Off"
suhosin.session.encrypt="On"
suhosin.post.max_vars=1000
suhosin.request.max_vars=1000
---
I tried the values:
suhosin.executor.max_depth=50
suhosin.executor.max_depth=500
suhosin.executor.max_depth=0

but every time I did I got the same error as described:
> [Mon Feb 13 18:41:48 2012] [error] [client 88.128.4.213] FastCGI: server
> "/srv/www/fcgi/n9wiki.de/php5/php-fcgi-starter" stderr: ALERT - maximum
> execution depth reached - script terminated (attacker '88.128.4.213', file
> '/srv/www/n9wiki.de/http/index.php')

Hence reopening this bug.
Comment 8 Uwe Kaminski 2012-02-14 17:45:24 UTC
(In reply to comment #6)
> (In reply to comment #2)
> > Thanks. The error.log contains this entry if MobileFrontend is active:
> > 
> > [Mon Feb 13 18:41:48 2012] [error] [client 88.128.4.213] FastCGI: server
> > "/srv/www/fcgi/n9wiki.de/php5/php-fcgi-starter" stderr: ALERT - maximum
> > execution depth reached - script terminated (attacker '88.128.4.213', file
> > '/srv/www/n9wiki.de/http/index.php')
> 
> You also you can disable Hardened-PHP / Suhosin or change:
> suhosin.executor.max_depth
> One possible solution is to set these values in a .htaccess file:
> 
> php_value suhosin.executor.max_depth 0
> php_flag suhosin.simulation On
> 
> - The first one deactivates the maximum execution depth.
> - The second one sets Suhosin to simulation mode (not needed)

I created a .htaccess in the directory containing the LocalSetting.php

The only entries in this .htaccess file where the both lines from above. The result was an internal server error.

Then I tried both lines above one separately and got this error in the log:

[Tue Feb 14 18:29:30 2012] [error] [client 88.128.153.176] FastCGI: server "/srv/www/fcgi/n9wiki.de/php5/php-fcgi-starter" stderr: ALERT - maximum execution depth reached - script terminated (attacker '88.128.153.176', file '/srv/www/n9wiki.de/http/index.php')
[Tue Feb 14 18:40:50 2012] [alert] [client 88.128.153.176] /srv/www/n9wiki.de/http/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Tue Feb 14 18:41:31 2012] [alert] [client 88.128.153.176] /srv/www/n9wiki.de/http/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration
[Tue Feb 14 18:41:44 2012] [error] [client 88.128.153.176] FastCGI: server "/srv/www/fcgi/n9wiki.de/php5/php-fcgi-starter" stderr: ALERT - maximum execution depth reached - script terminated (attacker '88.128.153.176', file '/srv/www/n9wiki.de/http/extensions/MobileFrontend/library/WURFL/Handlers/KDDIHandler.php', line 45)
Comment 9 Max Semenik 2012-02-15 17:39:10 UTC
Re-closing, this is not a Suhosin support forum.
Comment 10 Uwe Kaminski 2012-02-15 19:16:16 UTC
Ok, so this extension does not work and you assume it's a suhosin issue. What makes you sure regarding this? Did you read all the comments? IMHO a bug should be closed if it's sure that something out of reach causes the error.

In this case all we have is an assumption so I would like to see this bug reopened.
Comment 11 Max Semenik 2012-02-15 19:49:47 UTC
Yes, I've read everything. The error is generated by Suhosin and absolutely certainly not by PHP/MediaWiki.
Comment 12 Uwe Kaminski 2012-02-16 08:46:54 UTC
You are right, thanks. I did not know that I had to restart apache every time I changed the php.ini

Now I'm facing other problems but that's an other story (see Bug 34437 )
Comment 13 Antoine "hashar" Musso (WMF) 2012-02-16 08:56:07 UTC
(In reply to comment #12)
> You are right, thanks. I did not know that I had to restart apache every time I
> changed the php.ini

Ooops forgot to ask you to do that :-)

It is great to know that this issue is solved for you. Enjoy your MediaWiki installation.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links