Hot answers tagged

3

Three quick steps Add your user to the www-data group sudo usermod -a -G www-data username Change the owner of /var/www sudo chown -R username:www-data /var/www Change the permissions recursively on /var/www sudo chmod -R 644 /var/www NB: Replace username in the commands with your username.


2

Most likely the path for php isn't in the $PATH environment variable used for shell_exec when you are running it from the web server. Use the full path for the php command, like shell_exec (/usr/bin/php test.php) You can use the which command on the command prompt to find the full path for php which php


1

Meanwhile, my solution (bandage) is done within PHP, but I realise that it may not be the most proper or elegant one. <?php function log_record($str, $file_name) { $n = 0; while ($n < 10) { if (is_readable($file_name)) { file_put_contents($file_name, str_pad($_SERVER["REMOTE_ADDR"], 15, ' ', STR_PAD_RIGHT).' ['.date("Y-m-d ...


1

Based on this blog article, if you specify INSTALL_ROOT the PHP apache module will try to install in that directory. INSTALL_ROOT=/the/dir/path/to/install/in make install The other thing you might want to try adding this option to your ./configure of php-src: --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-...


1

The d refers to directories (folders). Your index.php file is not a directory, it is a file. Therefore, you should not see the d.


1

It is likely that an older libpcre3 is installed and satisfies the dependency in the php7.0 package, but only the newer library package provides pcre_jit_stack_free. If this is the case, do an apt-get install libpcre3, and you’re good to go. Ref.: https://github.com/oerdnj/deb.sury.org/issues/372


1

It looks like there's something wrong with your PHP version. Try this: # sudo apt-get update # sudo apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7



Only top voted, non community-wiki answers of a minimum length are eligible