0

I do Dropbox-API

it needs to access the Dropbox-SDK..

Here is the error shown in browser.

Warning: require_once(dropbox-sdk/Dropbox/autoload.php): failed to open stream: Permission denied in /home/albert/public_html/test/search.php on line 11

Fatal error: require_once(): Failed opening required 'dropbox-sdk/Dropbox/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/albert/public_html/test/search.php on line 11

I have been researching about it and try to chmod all the files, also chown all.. but it still show the same error..

Can anyone help? Thx

Community
  • 1
  • 1
AlbertSamuel
  • 584
  • 10
  • 33
  • 1
    are you sure that autoload.php file has 777 permission ? did you change the permission using chmod -R ? – Rudy Lee Nov 25 '13 at 05:55
  • Yes.. I am sure about it.. – AlbertSamuel Nov 25 '13 at 06:06
  • 2
    Whatever it is that you are doing, `chmod 777` is the wrong thing to do. You should revert this change ASAP, or in the worst case reinstall your system. Think about it; you are granting the whole world unrestricted **write** access to code you are going to be executing!? – tripleee Nov 25 '13 at 06:14
  • Thx for your advise.. i will gladly change it to 755.. Thx.. – AlbertSamuel Nov 25 '13 at 06:22

2 Answers2

2

Check your include path for it may be that you have to change it or include/require the autoload file using its full path.

Matteo Tassinari
  • 18,121
  • 8
  • 60
  • 81
1

Is dropbox-sdk/Dropbox/autoload.php under . or /usr/share/php or /usr/share/pear, if not, that is your problem - your include path is incorrect, or your installation path for Dropbox was placed in the wrong place

Noam Rathaus
  • 5,405
  • 2
  • 28
  • 37
  • Its under . I am sure i don't write the wrong path.. Because if i do, the error will be file not found.. – AlbertSamuel Nov 25 '13 at 23:54
  • Is the path /home/albert/public_html/test/dropbox-sdk/Dropbox/ allows to execute code? i.e. does Apache allows this path to run PHP code? – Noam Rathaus Nov 26 '13 at 06:24
  • yes, its path allows execute code, but i dont know the rest.. How to check if Apache allows this path to run PHP or not? thx – AlbertSamuel Nov 27 '13 at 11:59
  • Just access the path from the browser, something like http://yoursite/~albert/test/dropbox-sdk/Dropbox/somephpfile.php should not return any error of execution – Noam Rathaus Nov 27 '13 at 12:01
  • it says 403 forbidden, `You don't have permission to access /albert/test/dropbox-sdk/Dropbox/Client.php on this server. Apache/2.4.6 (Ubuntu) Server at localhost Port 80` What should i do? – AlbertSamuel Nov 28 '13 at 02:55
  • Allow access, are you the admin if the web server? if not, you need to contact him – Noam Rathaus Nov 28 '13 at 07:05