0

OK, absolute CakePHP noob here, be patient.

I managed to install CakePHP 3.4.9 (latest) onto my webserver (online - shared host), by using the Softaculous software installer that came as part of the host's cPanel.

I now would like to install the AdminLTE theme for CakePHP (see here), but it seems this is only possible if done via Composer. Composer, if I understand this correctly, is an offline dependency manager that is run via command-line (eg. MS-Dos) and supposed to help install plugins for offline applications that sit in a development framework such as XAMPP.

Since my website is not available offline (yet), and I have no SSH access to my webhost, how would I go about installing composer on my webserver?

Thank you for any advice

4
  • to use composer you do not need to run your page in a webserver (ie. XAMPP) you only need a running composer binary: getcomposer.org/doc/00-intro.md then you can download your project from your hoster, install the theme and reupload all changed files Commented Jul 3, 2017 at 11:40
  • I understand that, but my question is how can I install composer on my online webserver and then run the command-line to download dependencies into CakePHP? Commented Jul 3, 2017 at 11:42
  • CakePHP is a framework, not a finished app, and I guess that developing applications on-line is not a common scenario (how exactly do you write your code?). You can probably write a web script that runs Composer for you (in the end, it's nothing but PHP code) but I'm not sure it's worth the effort (plus it may not work, if your hosting service applies further restrictions). Commented Jul 3, 2017 at 12:31
  • I see your point. My problem here merely is that I want to be able to run composer from wherever I am from my online webserver instead of being limited to my local XAMPP server. Anyway, I guess there is no real way around developing in XAMPP and the pushing the latest build to the server. Commented Jul 3, 2017 at 12:48

1 Answer 1

1

There is no way to run composer without ssh access. If the security of the webserver is weak, run composer via php

<?php shell_exec('php composer.phar install')?>

Other options are:

  1. Run composer locally and then zip your local Cakephp install directory and export via FTP and then unzip it on production server.
  2. Drag and drop your cakephp install directory to your web folder on production server.
  3. Host your website from home using Duckdns, or Cloudflare etc.
  4. Move to Dedicated hosting Digital Ocean, AWS etc
Sign up to request clarification or add additional context in comments.

3 Comments

I moved over to another webhost where I have SSH access. How would I go about installing Composer?
this references the installation on a windows PC / XAMPP Server... What I am looking for is to install Composer onto an online webserver
@Armitage2k Please check the link again. The "Windows Installer" title only refers to the first section, everything else are platform-agnostic instructions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.