-1

I am trying to make use of the following php application: open source Cyanogenmod OTA Server Alternative - updated link -

i opened an account with a free php hosting service and copied the project files to public_html folder

when i request the site i get this error:

<br />
<b>Warning</b>: require(vendor/autoload.php): failed to open stream: No such file or directory in <b>/home/imamromh/public_html/index.php</b> on line <b>25</b>
<br />
<br />
<b>Warning</b>: require(vendor/autoload.php): failed to open stream: No such file or directory in <b>/home/imamromh/public_html/index.php</b> on line <b>25</b>
<br />
<br />
<b>Fatal error</b>: require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/imamromh/public_html/index.php</b> on line <b>25</b>
<br />
Osama
  • 325
  • 3
  • 14
  • Did you follow the installation tutorial? It doesn't say "copy the project files to `public_html`", it describes how to use composer to build the project. – CherryDT May 23 '16 at 11:12

2 Answers2

1

I think the link to the repo you shared is incorrect. But the error you are getting is a common issue.

You need to use composer to set this up, but since you are using a free host like host-ed, I doubt you have access to command line.

To understand what is happening here, the error you are getting is because you do not have the required libraries which are needed to run this. Composer helps in installing these libraries (vendor/autoload.php is a part of all this) I am not going into the details so that you don't get confused.

So alternatively find a host which gives you access to command line. Use this to get 10$ on digitalocean, enough for 2 months of hosting. https://m.do.co/c/22764aaa6bbf

Setup a LAMP server https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu

simply execute the following instruction and your current problem will be solved.

cd /var/www/ && composer create-project julianxhokaxhiu/cyanogenmod-ota CyanogenModOTA
Netham
  • 1,168
  • 6
  • 16
0

Did you read the readme?

How to run

Clone this repo or download it
cd to the directory where you cloned this repo
npm install
Open node index.js and edit the OtaHost variable with your url.
node index.js
Enjoy!
Bartłomiej Wach
  • 1,968
  • 1
  • 11
  • 17
  • my apologies, the link i provided was for the unit test application for the server, i updated the link to the actual php api server code – Osama May 23 '16 at 10:47