yii2 mpdf on distributed file system and with loadbalancer, giving error "Unable to create output file: /path_to_file"

Web Tips Q & ACategory: Krajee Yii2 Extensionsyii2 mpdf on distributed file system and with loadbalancer, giving error "Unable to create output file: /path_to_file"
yash.khuthia asked 5 months ago

Hi, 
on our staging server with single node and no load-balancer, it is working flawless. but on production environment having distributed nodes and load-balancer, we are getting the error while creating pdf stating
“Unable to create output file: /var/www/path_to_file”

  • the file path we are providing is absolute path, as searched and accepted answers on StackOverflow.
  • folder permissions are 777

not able to understand the issue. can suggest any help?

yash.khuthia replied 5 months ago

not fixed but a work around, changed the path from /var/www/path_to_file to /tmp/file_name.php

and it worked.. i think user access permission issue might have been there.
but yet unable to understand even after giving permission 777 it failed.
would be happy to have any suggestion.

Thanks.

yash.khuthia replied 5 months ago

not fixed but a work around, changed the path from /var/www/path_to_file to /tmp/file_name.php

and it worked.. i think user access permission issue might have been there.
but yet unable to understand even after giving permission 777 it failed.
would be happy to have any suggestion.

Thanks.

Login or register to contribute or comment.

Login   Register