New answers tagged

0

There are some log rotate options that might help. See copytruncate in http://www.linuxcommand.org/man_pages/logrotate8.html This will create a copy and truncate the original file. Therefore, the log file doesn't have to be closed and it's held open by your php script. Some log statements might get dropped between the copy and truncate operation.


0

Giving the mount point of your SD card partition the correct ownership should do the trick. If you want the user who mounted the SD card to still have ownership permissions, you could change the group of /media/user/name/ and all of the files and folders it contains to www-data with: chgrp -R www-data /media/user1/Núbia Ensure that all of those files and ...


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 ...


0

Solved: From upgrading si Operation sistem... from 15.04 version to 15.10 version stable of ubuntu... it overwrite all services os i have modified and up alll services pre required form software added... one of it is Lampp from Xamp stack...


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.


0

I was not using the right controller.....


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.


0

There is a bug at the moment with php5-mcrypt module placing 'mcrypt.ini' in the wrong folder. Workaround is making symbolic links. So, one of my first attempts to do that - was incorrect. And I didn't notice, that others didn't pass. As far as I've figured that - I've removed symlinks with commands: sudo unlink /etc/php5/apache2/conf.d/20-mcrypt.ini sudo ...


0

I was having the same problem, I tried to get joomla running by installing the basic LAMP packages just after my upgrade to 16.04 when this started happening. Could not install any packages and could not remove libapache2-mod-php5 Removing libapache2-mod-php5 ERROR: Module php5 does not exist! After some googleing and head scratching I guessed that ...


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


0

Try to check your nginx's www.conf file and make sure the socket path is correct and socket file is present at that location while these services are running. ie, /var/run/php/php7.0-fpm.sock or /dev/shm/php-fpm-www.sock try to start php-fpm from init.d /etc/init.d/php-7.0.0-fpm start and check your php.ini file also add the following to the end of ...


0

It is available from ppa:ondrej/php. apt-get install php5.6-gd will install GD for PHP 5.6


-1

This might work for you. Note that sudo is used two times here. sudo curl -sS https://getcomposer.org/installer | sudo php


-1

You are missing the php7.0-mysql package. So you should install the php7.0-mysql package. PS: Why are you downvoting this? It has solved OP's problem.


0

According to my system, the package name is libapache2-mod-php7.0. Try sudo apt install libapache2-mod-php7.0 to install that package. That said, you should not need that package to get the phpinfo() function working in a PHP script.


0

As of Ubuntu 15.10 (wily) you can install Composer from the Ubuntu Apt package repository: apt-get install composer In Ubuntu 15.10 and 16.04 this package contains a pre-1.0 beta version of Composer, but don’t worry — it is very stable (Composer 1.0 was released in April 2016, but it was widely used way before then).


0

PHP 5.4 security support has ended on 3. September 2015. You should upgrade your script the latest supported PHP version. At the time of writing this, the recommended version is at least PHP 5.6 that will be supported until 31. December 2018. Running unsupported version of PHP is strongly discouraged as the obsolete version have or will have security ...


0

Use the following set of command to add PPA for PHP 5.4 in your Ubuntu system and install PHP 5.4 sudo apt-get install python-software-properties sudo add-apt-repository ppa:ondrej/php5-oldstable sudo apt-get update sudo apt-get install -y php5 To check the installed version, just type: php -v Source : How to Install PHP 5.4 or PHP 5.5 or PHP 5.6 on ...


0

This just happened to me again, along with the php pages appearing as plain text, rather than processing. I had not use the webserver apache for some time on the computer and meanwhile ubuntu updated like two more versions. Now it is $ cat /etc/issue Ubuntu 16.04 LTS So the php worked after like so: $ sudo apt-get install lamp-server^ $ sudo a2enmod ...


0

Run sudo apt-get install phpmyadmin php-mbstring php-gettext sudo service apache2 restart http://www.dailytechnoblog.com/how-to-resolve-phpmyadmin-error-the-mbstring-extension-is-missing-please-check-your-php-configuration/


0

You tagged 16.04. Assuming you're running 16.04, the php in the repository is v7. Try this instead. sudo apt-get -y build-dep php7.0 php7-mcrypt


0

I had not mentioned that I also had simple-vhost and ssl enabled, the latter of which kills lighty completely. after disabling any module, apparently force-reload does not seem to really work. I guess that there is a cleaner way, but rebooting was the only thing that worked for me today. just wonder why, in the previous attempts, html files did work but not ...


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-...


0

These are the steps I had to take to install Laravel 5 on Ubuntu Server 16.04 after a fresh upgrade First I had to completely remove all of PHP, so as Mohammad Barhoush stated: sudo apt-get -y purge php.* Then I reinstalled PHP with: sudo apt install php libapache2-mod-php sudo apt install php-cli sudo apt install php-mysql After reinstalling PHP ...


0

you can fix the problem by installing this pure php apcu compatibility-file: from https://github.com/SegFaulty/php-apcu-bc this will emulate the apcu_* function with the apc_* function (and vice versa)


0

sudo apt-get install php5.5-bcmath worked for me.


-1

Just disable the suPHP mode in apache2, by typing this command on terminal: sudo a2dismod suphp If you want to enable it again: sudo a2enmod suphp


0

I solved this by changing the sessions directory to /var/lib/php/sessions in /etc/hhvm/php.ini. And then also hardcoding the variables in the sessionclean script /usr/lib/php5/sessionclean #!/bin/sh -e SAPIS="apache2:apache2\napache2filter:apache2\ncgi:php5\nfpm:php5-fpm\n" # Iterate through all web SAPIs ( proc_names="" printf "$SAPIS" | \ while IFS=: ...


0

Upgrading to Ubuntu 16.04 updates automatically you php to php7 version , you are just missing php7-pdo extension sudo apt-get install php7-pdo then restart your web server should fix your issues.


0

To fix your problem you need to install the packages for php7.0 so your install command would be: sudo apt-get install php-pear php-dev php-json libpcre3-dev php-apcu


0

Ubuntu 16.04 comes with php7. So unless you've gone out of the way to install php5, you're trying to add a module in the wrong version. Try... apt-get install php7.0-intl


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


0

On Ubuntu 14 Only this line is needed sudo apt-add-repository ppa:ondrej/php5-5.6 Then sudo apt-get install php5 This will trigger the PPA upgrade system


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



Top 50 recent answers are included