Jump to content

Recommended Posts

Posted

Hello

I use armbian on my odroidc2

on the devic is lamp, for a mysql and php server. 

Now i tried to install composer. 

The installation works great, but i can't use any scripts from vendor folder.

 

The directory of my php file:

/var/www/html/terminal/includes/helpers/my_php_file.php

 

the code in my php file

require_once(__DIR__ . '/vendor/autoload.php');

The code means the vendor directory has this path: /var/www/html/terminal/includes/helpers/vendor/autoload.php

 

But thats not correct. I searched and found the correct path of composer

it's:

/home/user/vendor/

 

So i tried to make a folder-shortcut in my www/html/ folder, but i can't use it because permission denied.

Next idea:

i fix the code in my php file

include '../../../../../../home/odroid/vendor/autoload.php';

now it would be found, but i get the same error:

Warning: include(../../../../../../home/odroid/vendor/autoload.php): Failed to open stream: Permission denied in /var/www/html/terminal/includes/helpers/backup_DB.php on line 26

 

what's the correct way to youe composer with autoload.php and something more?

<

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines