Page tree
Skip to end of metadata
Go to start of metadata

This page is for common issues happening on the phpFox Mobile apps and our solutions

ISSUE 1: After installing RESTful API and Mobile API apps, we download and use phpFox Mobile Apps to log in our site but have error "Ops. Can not login"

Causes and Solutions

If you are using Apache server, perhaps the HTTP:Authorization header is disabled on your server. It is necessary to inform that our mobile apps use OAuth2 Authorization to authenticate mobile apps and server API to improve security. The OAuth2 requires HTTP:Authorization header  and SSL to be enabled.

To check this, you can create a file name info.php in the root folder of your site with the content:


Execute the file at:

In the loaded page, search for value: HTTP_AUTHORIZATION or REDIRECT_HTTP_AUTHORIZATION. If it returns nothing like below:


You should do the following:

  • Support SSL on your phpFox site
  • Enable HTTP:Authorization header
    • You can contact your hosting provider for help. Or add following rules in .htaccess  to hotfix the issue by yourself
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

IF Apache is configured to use Virtual Hosts, adding above rules to .htaccess will not work.

Insteadthis configuration must be added directly to Apache's configuration: 

# ... 
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 
# ... 

IF your server is using Apache with CGI and mod_suexec, Apache may strip the custom header including  HTTP_AUTHORIZATION.

In this case, you can change to another PHP handler such as suPHP, LSAPI, etc.

In case you followed our solution but the issue still happens, please feel free to submit tickets in our Client Area in order for us to help take further investigation.


  • No labels