Instagram-php-scraper: CHMOD 777 - Which directory?

Created on 13 Sep 2018  路  7Comments  路  Source: postaddictme/instagram-php-scraper

Please, explain, I don't know, which directory I should edit to:

Fatal error: Uncaught phpFastCacheExceptionsphpFastCacheDriverException: PLEASE CREATE OR CHMOD /cache/testsite.ru/Files - 0777 OR ANY WRITABLE PERMISSION!

Very strange path! :((

bug wontfix

Most helpful comment

Hi! This is not a bug! To solve this problem, you need to give 777 to the 'cache' folder. This folder will be created automatically by the script. Parameter 3 in method withCredentials() is responsible for the location in which "cache" directory will be created, feel free to change it. To change permissions try something like

sudo chmod -R 777 cache

All 7 comments

I've found out that there is phpfastcache module error. There must be full path with variable in examples like that:

$instagram = InstagramScraperInstagram::withCredentials('login, 'password', dirname(__FILE__).'/cache');

Can confirm that this was indeed the issue. Had the same and solved the same way.

I'm still suffering the issue.
$instagram = \InstagramScraper\Instagram::withCredentials('login, 'password', dirname(FILE).'/cache'); doesn't work for me. Any progress on it? @raiym

Hi! This is not a bug! To solve this problem, you need to give 777 to the 'cache' folder. This folder will be created automatically by the script. Parameter 3 in method withCredentials() is responsible for the location in which "cache" directory will be created, feel free to change it. To change permissions try something like

sudo chmod -R 777 cache

Another way is to add the user "www-data" to the group in order not to give full access to the folder.

I'm still suffering the issue.
$instagram = \InstagramScraper\Instagram::withCredentials('login, 'password', dirname(FILE).'/cache'); doesn't work for me. Any progress on it? @raiym

Hi!
Try to use one of magic constants: __DIR__ or dirname(__FILE__):

$instagram = \InstagramScraper\Instagram::withCredentials('login, 'password', __DIR__ .'/cache');

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tripoli96 picture Tripoli96  路  5Comments

waffle9012 picture waffle9012  路  6Comments

manchdev picture manchdev  路  9Comments

limminho picture limminho  路  8Comments

moh6mmad picture moh6mmad  路  3Comments