Last modified: 2014-02-12 23:55:27 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 T62170, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60170 - MobileFrontend Installed & Only shows a Blank Page on Mobile Devices
MobileFrontend Installed & Only shows a Blank Page on Mobile Devices
Status: RESOLVED WORKSFORME
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Bill
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-17 16:30 UTC by Bill
Modified: 2014-02-12 23:55 UTC (History)
9 users (show)

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


Attachments

Description Bill 2014-01-17 16:30:07 UTC
Hey MobileFrontend,

I hate to submit this as a "Bug" because I am sure that the system probably works fine everywhere else, just not for me.. 

Here is the situation. I have an OLD mediaWiki Site that I have rebuilt and Upgraded. So now I have an Upgraded DB with a Fresh copy of the Latest Stable Release of MediaWiki.

I have installed the MediaWiki Extension: MobileFrontend per the instructions as I understood them. Thus, I downloaded the "Snapshot" for version 1.22, I made a "MobileFrontend" folder in the Extensions folder & copied the downloaded & unzipped files in, and I place the code below at the bottom of the Localsettings.php file:

require_once "$IP/extensions/MobileFrontend/MobileFrontend.php";
$wgMFAutodetectMobileView = true;

I have added no addition configuration code. I am also under the assumption that this extension does not require any other extensions to operate.

Here are some PHP errors I found that are in possible relation to the issue at hand:
[PHP]
[16-Jan-2014 12:14:53 America/Denver] PHP Fatal error: Out of memory (allocated 5505024) (tried to allocate 262144 bytes) in /site/XXXXX.com/includes/AutoLoader.php on line 1191
[16-Jan-2014 12:11:41 America/Denver] PHP Fatal error: Call to undefined function mb_convert_encoding() in /site/XXXXX.com/includes/HtmlFormatter.php on line 66
[NGINX]
2014/01/16 17:05:47 [warn] 14031#0: *4305 a client request body is buffered to a temporary file /var/lib/nginx/tmp/client_body/0000000601, client: 69.198.41.161, server: XXXXXX.com, request: "POST /api.php HTTP/1.1", host: "betad.XXXXX.com", referrer: "http://betad.XXXXX.com/index.php?title=Category:Air_Canada&action=edit"

Here is the configuration info for my system:
 - MediaWiki 1.22 (Upgrade DB from 1.15)
 - PHP 5.3.3 (cli) (built: Feb 22 2013 02:51:11)
    - Memory Limit set to 512MB
    - Zend Engine v2.3.0
 - MySQL 5.1.69
Memcache is enabled with the following settings:
 - $wgMainCacheType = CACHE_MEMCACHED;
 - $wgParserCacheType = CACHE_MEMCACHED; # optional
 - $wgMessageCacheType = CACHE_MEMCACHED; # optional
 - $wgMemCachedServers = array( "misc-XXXXX.ajnafo.cfg.XXXX.cache.amazonaws.com:11211" );
 - $wgSessionsInMemcached = true;
 - $wgUseFileCache = false;
Installed Extensions Include:
 - MsUpload
 - googleAnalytics
 - MobileFrontend
 - WikiEditor
 - add-to-any-share-save
 - SpamBlacklist
 - AkismetKlik
 - Nuke
Nginx Settings:

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
	server_names_hash_bucket_size  128;
	client_max_body_size 16M;
	server_tokens off;
	client_body_buffer_size  1K;
	client_header_buffer_size 1k;
	large_client_header_buffers 2 1k;
	index index.php index.shtml index.html index.htm default.html default.htm;
	
	fastcgi_cache_path   /site/_nginx_cache  levels=1:2
                       keys_zone=XXX:32m
                       inactive=5m;
 
	fastcgi_cache_key "$scheme$request_method$host$request_uri";
	
	set_real_ip_from   10.0.0.0/8;
	set_real_ip_from   10.XXX.70.XX;
	real_ip_header     X-Forwarded-For;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ' 'upstream_cache_status $upstream_cache_status'
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /site/logs/nginx.access.log  main;
    
    map $http_user_agent $ignore_ua {
	    default                 0;
	    "~Pingdom.*"            1;
	    "ELB-HealthChecker/1.0" 1;
	}

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    gzip  on;
	gzip_http_version 1.1;
	gzip_vary on;
	gzip_comp_level 6;
	gzip_proxied any;
	gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
	gzip_buffers 16 8k;
	gzip_disable "MSIE [1-6]\.(?!.*SV1)";

server {
        listen       80;
        server_name  XXX.com XXX.com www.XXX.com beta.XXX.com betad.flyerguide.com stat.XXX.com;

        root   /site/XXX.com;

        access_log  /site/logs/access.XXX.log  main;
		error_log /site/logs/error.XXX.log  notice;

        # redirect server error pages to the static page /40x.html
        #
        error_page  404              /404.html;
        location = /40x.html {
            root   /usr/share/nginx/html;
        }

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
        
        location ^~ /(cache|includes|maintenance|languages|serialized|tests|images/deleted)/ {
                deny all;
        }
        
        location ^~ /(bin|docs|extensions|includes|maintenance|mw-config|resources|serialized|tests)/ {
		internal;
	}
        
        location @rewrite {
                rewrite ^/(.*)$ /index.php?title=$1&$args;
        }
        
        location / {
                try_files $uri $uri/ @rewrite;
        }
        
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                try_files $uri /index.php;
                access_log        off;
		log_not_found     off;
		expires           14d;
		add_header Pragma public;
		add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        }
        
        location = /_.gif {
                access_log        off;
		log_not_found     off;
		expires           14d;
		add_header Pragma public;
		add_header Cache-Control "public, must-revalidate, proxy-revalidate";
                empty_gif;
        }
        
        #location /dumps {
        #        root /var/www/mediawiki/local;
        #        autoindex on;
        #}

		location ~ \.php$ {
            fastcgi_pass  unix:/var/run/php-fpm/php-fpm.sock;
            fastcgi_index index.php;
            #fastcgi_cache   XXX;
	    #fastcgi_cache_valid   200 302  30m;
	    #fastcgi_cache_valid   301      1d;
	    #fastcgi_cache_valid   any      15m;
	    #fastcgi_cache_min_uses  1;
	    #fastcgi_cache_use_stale error  timeout invalid_header http_500;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include /etc/nginx/fastcgi.conf;
        }
        
	}
Comment 1 Bingle 2014-01-17 16:45:27 UTC
Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1634
Comment 2 Arthur Richards 2014-01-17 18:32:05 UTC
Hi Bill, looking briefly over your situation, I see two problems based on the PHP errors:
[16-Jan-2014 12:14:53 America/Denver] PHP Fatal error: Out of memory (allocated
5505024) (tried to allocate 262144 bytes) in
/site/XXXXX.com/includes/AutoLoader.php on line 1191

You will need to allocate more memory to PHP - 256KB is definitely not enough. I'm not sure what the right amount will be for your situation but you should play around with this configuration setting for PHP.

The other problem:
[16-Jan-2014 12:11:41 America/Denver] PHP Fatal error: Call to undefined
function mb_convert_encoding() in /site/XXXXX.com/includes/HtmlFormatter.php on
line 66

You must have PHP compiled without multibyte string support. If you can, you should either recompile PHP for multibyte string support or find a binary configured with it.
Comment 3 Jon 2014-01-17 18:40:37 UTC
Hi Bill, can you check if this fixes your problem and if so/not let us know?
Thank you!
Comment 4 Bill 2014-01-17 19:29:21 UTC
My PHP Info page shows this for memory:
memory_limit	64M	64M
I have this directive in my php.ini:
memory_limit = 64M
And this Directive in my www.conf
php_admin_value[memory_limit] = 64M

And I do not have Multibye String enabled or installed that I could find. In order o test I ran this PHP:

<?php

error_reporting(E_ALL);
ini_set('display_errors', 1);

mb_strlen("test");

 ?>

Which resulted with this error stating that there were no multi byte functions available:

Fatal error: Call to undefined function mb_strlen() in /site/flyerguide.com/testmb.php on line 6
Comment 5 Bill 2014-01-17 19:41:37 UTC
I also tried upping the limit to 512M but still not working :-\
Comment 6 Bill 2014-01-20 22:49:00 UTC
Any thoughts?
Comment 7 Biju Subhash 2014-01-22 13:49:31 UTC
Hi,
for me also have the same issue.
Comment 8 Max Semenik 2014-01-22 17:49:20 UTC
You're lacking the mbstring PHP extension, which is required for MobileFrontend (and highly recommended for MediaWiki in general).
Comment 9 Bill 2014-01-22 17:56:02 UTC
Woot.. That worked!
I was confused when Arthur said:
"You must have PHP compiled without multibyte string support."
Comment 10 Andre Klapper 2014-01-22 22:16:15 UTC
WONTFIX refers to "we are actively against fixing this" and FIXED refers to a code fix in MediaWiki. Both is not the case here. Hence setting WORKSFORME.

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


Navigation
Links