Although phantomjs has a disk-cache option that works when running via command line, when I use php-phantomjs no disk caching is created.
Is there any specific setting I should set on PHP or Apache so that php-phantomjs uses disk-cache?
Think I found out how to answer my own question:
$HOME/.qws is writable by that user.$HOME enviroment variable on PHP script:$apacheUserData = posix_getpwuid(posix_getuid());
putenv('HOME='.$apacheUserData['dir']);With the above steps phantomjs binary running from PHP knows how to find Apache's user dir and is also able to write to $HOME/.qws.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With