From your backoffice, you can download the sources of an app in order to manually compile them with XCode (iOS apps) or Android Studio (Android apps). But sometimes, it does not work.

Here are few tips in order to help you sort this issue out.

Note: In this article we assume you have the root credentials to access to your server. If you do not have these root credentials, you won’t be able to proceed (ask them to your hosting provider).

When you click on the Download button, it stays on the app sheet and nothing happens:

That means Zip is not installed on your server or PHP can’t use it because the exec() function is not enabled on your server.
In order to fix this issue, you have to install Zip and/or enable the exec() function in order to meet the Siberian requirements.
You can ask your hosting provider to give you a hand if needed.
 
 

When you click on the Download button, a blank page or a “Page not found” message appears:

This issue comes from the memory_limit setting of your PHP configuration: This setting sets the maximum amount of memory that a script is allowed to allocate. And in your case, the script to download the sources can’t allocate enough memory. In order to fix this, you will have to change this setting.

  • Connect to your server with your SSH root access (it must be the root access, you won’t be able to change the setting with a user access).
  • Then type the following command to locate the main php.ini configuration file on your server: php -i | grep php.ini
  • Capture du 2015-10-16 16:33:31
    The path of the php.ini file is indicated after the “Loaded Configuration File =>” sentence. We are naming it FILE_PATH for the next commands.

  • Copy the path of the file (in this example it is /etc/php.ini but it can be anything, depending on your configuration.) then open it by typing the following command (replace FILE_PATH by your own php.ini file path. In this example it is nano /etc/php.ini for instance): nano FILE_PATH
  • Note: If your server doesn’t know the nano command, you have to install it:

    • For Debian/ubuntu operating systems: apt-get install nano
    • For CentOS/Fedora operating systems: yum install nano
  • Now we need to search for the memory_limit setting: press the “CTRL” and “w” keyboard keys at the same time. It opened a search bar at the bottom of the window.
  • Type: memory_limit then press the Enter/Return keyboard key. It directly brings you to the memory_limit setting.
  • Capture du 2015-11-20 17:57:30

  • Replace the value you have (here it is 8M for instance) by 128M.
  • Once the modification is done, press the “CTRL” and “o” keyboard keys at the same time. This will ask you the name of the file you want to save: just press the Enter/Return keyboard key to save with the same file name.
  • Now the file is saved, just press the “CTRL” and “x” keyboard keys to exit.
  • Finally, you have to restart your webserver (we presume here that your server meets the Siberian requirements and uses the Apache webserver):
    service apache2 restart
    or
    service httpd restart
  • If everything went well, no error messages appeared. ;-)
  • Now, go to your Siberian install folder: cd YOURPATH
  • (Warning: change YOURPATH by your own absolute path from the root of your server to your Siberian install folder. For instance, if your subdomain is my.subdomain.com, the path to the Siberian install folder could be /var/www/vhosts/my.subdomain.com. Keep in mind that yours could be different, you have to find the correct path first.)

  • Open the .htaccess file by typing the following command: nano .htaccess
  • Follow the same process as you just did with the php.ini file in order to change the value of the memory_limit setting (Note: If the file is empty that means you did not open the proper .htaccess file because you are not in your Siberian install folder).
  • Once the modification is done and the file is saved, you can now close the SSH connection by typing exit

Now you should be able to download the sources of your app.

 

Did You Find This Article Helpful?

Yes - 1 visitors found this post helpful
No - 1 visitors found this post was not helpful