HHVM and Apache

Hi all, I read that microweber goes better with hhvm instead of php, so i'm trying to set up a machine with Debian Jessie, mysql, apache and hhvm with FastCGI.
Seems to be ok, put a simple php test page on the docroot (/var/www/html) and it loads, so by composer I have created the project, which is in /var/www/html/MyProject, but when I try http://my-server/MyProject, ther's only a blank page, here the /var/log/hhvm/error.log


\nFatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/html/MyProject/storage/logs/laravel-2016-01-13.log" could not be opened: Permission denied' in /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87\nStack trace:\n#0 /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(88): Monolog\\Handler\\StreamHandler->write()\n#1 /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\\Handler\\RotatingFileHandler->write()\n#2 /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Logger.php(323): Monolog\\Handler\\AbstractProcessingHandler->handle()\n#3 /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Logger.php(602): Monolog\\Logger->addRecord()\n#4 /var/www/html/MyProject/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(47): Monolog\\Logger->error()\n#5 /var/www/html/MyProject/app/Exceptions/Handler.php(27): Illuminate\\Foundation\\Exceptions\\Handler->report()\n#6 /var/www/html/MyProject/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(236): App\\Exceptions\\Handler->report()\n#7 /var/www/html/MyProject/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(88): Illuminate\\Foundation\\Http\\Kernel->reportException()\n#8 /var/www/html/MyProject/index.php(72): Illuminate\\Foundation\\Http\\Kernel->handle()\n#9 {main}
Exception handler threw an object exception: exception 'UnexpectedValueException' with message 'The stream or file "/var/www/html/MyProject/storage/logs/laravel-2016-01-13.log" could not be opened: Permission denied' in /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87\nStack trace:\n#0 /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(88): Monolog\\Handler\\StreamHandler->write()\n#1 /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\\Handler\\RotatingFileHandler->write()\n#2 /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Logger.php(323): Monolog\\Handler\\AbstractProcessingHandler->handle()\n#3 /var/www/html/MyProject/vendor/monolog/monolog/src/Monolog/Logger.php(602): Monolog\\Logger->addRecord()\n#4 /var/www/html/MyProject/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(47): Monolog\\Logger->error()\n#5 /var/www/html/MyProject/app/Exceptions/Handler.php(27): Illuminate\\Foundation\\Exceptions\\Handler->report()\n#6 /var/www/html/MyProject/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(73): App\\Exceptions\\Handler->report()\n#7 (): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleException()\n#8 {main}

Does anyone know how to set up apache + HHVM and permission?

Thanks in advance
Peter Ivanov 4 years ago

Hi you must have write permissions on your /var/www/html/MyProject folder


If you are have uploaded the files are root you must change the file ownership for example to user `www-data`

As from this answer http://superuser.com/a/646070


you must do

sudo chown -R www-data:www-data /var/www
sudo chmod -R 770 /var/www

You must be logged in to reply on this thread


Sign Up
Gloria Rotolo