New answers tagged

0

Run the following commands: sudo apt-get update sudo apt-get install --reinstall php7.0-common If that doesn't work, run the following commands: mkdir PHP cd PHP apt-get download php7.0-common ar -xvf * tar -xvf dat* sudo mv ./usr/lib/php/7.0/php.ini-production /usr/lib/php/7.0/php.ini-production sudo apt-get -f install


0

You can also run "apt install php-dev" first before running "pecl install xdebug". This installs the appropriate dev tools for php7. The answer above is more of a work-around getting a php5 set of dev tools to work with php7.


0

I just had the same problem, and found this link very helpful: https://ubuntuforums.org/showthread.php?t=1610270 In a nutshell, open the /etc/sudoers file in your favorite editor and find this line: root ALL=(ALL) ALL Add a new line just below it like so: root ALL=(ALL) ALL user.name ALL=NOPASSWD: /path_to_your_program_bin_file So to run ...


0

ftp_pasv($conn_id, true); is the solution for my issue


0

This seems to be a permission problem. The directory /var/www/html is most likely owned by root: mirek@testsrv-ubuntu:/var/www/html$ ls -al total 24 drwxr-xr-x 3 root root 4096 dec 23 2015 . drwxr-xr-x 3 root root 4096 dec 22 2015 .. -rw-r--r-- 1 root root 11510 dec 22 2015 index.html The user running PHP must be allowed to write in that ...


0

you can use below command for install ssh2 sudo pecl channel-update pecl.php.net sudo apt-get install libssh2-1-dev sudo pecl install -a ssh2-0.12 echo 'extension=ssh2.so' | sudo tee /etc/php5/mods-available/ssh2.ini > /dev/null sudo php5enmod ssh2


3

Instead of hard-coded sequences, you should use a library such as PHP Ncurses which will be more likely to work on more terminal types The example from ncurses_color_set: <?php ncurses_init(); // If the terminal supports colors, initialize and set active color if (ncurses_has_colors()) { ncurses_start_color(); ncurses_init_pair(1, ...


2

Now you can use 24-bit true color in terminal in Ubuntu 16.04 The foreground escape sequence is ^[38;2;<red>;<green>;<blue>m The background escape sequence is ^[48;2;<red>;<green>;<blue>m <red> <green> <blue> range from 0 to 255 inclusive. The escape sequence ^[0m returns output to default. See RGB ...


6

This is certainly possible using ANSI escape codes: <?php echo "\033[31m some colored text \033[0m some white text \n"; ?> will output "some colored text" in red and "some white text" in white (unless you chose different default colours for your terminal). The characters \033 indicate the start of an escape code. [31m is the colour red. [0m ...


0

Having the same issue in Debian Jessie. Will report back if I find a solution. In the mean time you can manually start the services to achieve the desired result. Example: sudo /etc/init.d/memcached stop memcached -d -m 64 -l 127.0.0.1 -p 11211 -u memcache memcached -d -m 64 -l 127.0.0.2 -p 11211 -u memcache Update 1: Aha! There is a bug in Debian: ...


3

php5-mcrypt (MCrypt module for php5) has been updated to php7.0-mcrypt (libmcrypt module for PHP) in Ubuntu 16.04. The command sudo apt-get install lamp-server^ in Ubuntu 16.04 searches the package list files for all Task: fields and gets all with lamp-server, among them is php7.0. Then it installs those packages the standard way with sudo apt-get install ...


0

You can use XAMPP Linux.You can download any version of xampp linux from the below mentioned official xampp site. https://www.apachefriends.org/download.html Enter downloaded file location using terminal. First give certain permission for the downloaded binary file. (Assume that i downloaded 64 bit binary package.) sudo chmod a+x xampp-linux-x64-5.6.23-0-...


0

You can use XAMPP Linux.You can download any version of xampp linux from the below mentioned official xampp site. https://www.apachefriends.org/download.html Enter downloaded file location using terminal. First give certain permission for the downloaded binary file. (Assume that i downloaded 64 bit binary package.) sudo chmod a+x xampp-linux-x64-5.6.23-0-...


-2

PHP 7.0 (and 5.6) on Ubuntu try this http://lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu


1

The principle behind the www-data user is that it is an unprivileged user. When you run a daemon (background program like a web server), for security purposes it is good for it to drop privileges after starting, so that it spends the rest of its time with the lowest privileges possible. In the past the nobody account was often used for this purpose. The ...


2

Under no circumstances permit your web server to run commands with sudo. Not even hyper-specific commands. This is a huge security risk. A web server should not be given permissions to access sudo commands, which then permit root access for commands. Especially when given nopasswd form of sudo, should your web server be breached, any command run by a ...


1

The first line of .htaccess should be RewriteEngine on and not RewriteEnergie on. :)


0

Installing libapache2-mod-php should fix it. Then, you can purge your installation and, if you want a simple installer which rarely fails, use the script provided by apachefriends. https://www.apachefriends.org/index.html


2

I would suggest you change your vhost to name based: Replace the IP address with *:443 and add ssl certificates set the server name to your alias minus the www. add a second vhost for http which only redirects to https This should allow you to use vtiger from the local network and from the outside world and has added security through https. Now let's ...


0

I had to downgrade from PHP 7 to PHP 5.6, so I was following: How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04? and applying general "naming convention" from that article I've tried: sudo apt-get install -y php5.6-curl and it worked for me. PS don't forget to run: sudo systemctl restart apache2 afterwards.


0

Don't tell Ubuntu anything. Instead, install into a different directory than where Ubuntu package management operates. This is what /usr/local and /opt are for. Use them!


0

location ~ [^/]\.php(/|$) { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.0-fpm.sock; } this will parse all all .php files in the URI, plus paths starting or ending with '/'.


0

I just answer a question like this, not the same but for 2 xampp installations(differents) on same machine. How to install multiple versions of XAMPP?


0

I just tried this: user@mybox:~$ lxc launch ubuntu:16.04 test mybox:~$ lxc exec test /bin/bash root@test:~# apt install php7.0-fpm php7.0-curl root@test:~# php7.0 -i | grep -i curl /etc/php/7.0/cli/conf.d/20-curl.ini, curl cURL support => enabled cURL Information => 7.47.0 make sure there is a symlink from /etc/php/7.0/*/conf.d/20-curl.ini to /etc/...


-1

Symlink /etc/nginx/sites-available/phpmyadmin to /etc/nginx/sites-enabled/phpmyadmin & restart nginx This is because that is supposed to be done to make virtualhost works.


0

Ubuntu 12.04 LTS will run PHP 5.6 or even PHP 7.0 just fine if you use PHP PPA from ppa:ondrej/php. The user scripts will have to be updated though as there were some changes between PHP 5.3 and 5.4. Update guides are available directly at the PHP website. NOTE: I'll update with more direct links when I get to computer. Meanwhile just search here on AU for ...


0

For Ubuntu 16.04, PHP7 is now the default official upstream version. apt install php Here's a handy guide for setting up a LAMP stack on 16.04.


1

We found that a 3rd party web app was managing it's own session files and failing garbage collection. Once we deleted some very old folders of them, the issues disappeared.


0

Fixed running to instance of mysql or apache by default is not possible because the first one will use the default ports and the second one can't run properly because the ports are in use. – Mic0 find out How do I start/stop mysql server? stop it via terminal and restart via ampps worked fine for me. sudo /etc/init.d/mysql stop [sudo] password di ...


2

i think you know that you will have to keep track of security fixes and bugs for your LAMP Setup then. Apt would kind of do this for you implicitly. Well how far did you get then? There should be documentation for each part of your setup like here for php: http://php.net/manual/en/install.unix.php Learning how to gain knowledge by yourself is imo the most ...


0

Install git-daemon-sysvinit first. sudo apt-get install git-daemon-sysvinit Then install php5-curl. git-daemon-sysvinit replaces git-daemon-run. (They are alternatives for each other.) git-daemon-run doesn't actually work anymore on Ubuntu 15.04 and up, from my experience, and from what I have read. At least, not without special handling. (https://bugs....


0

This depends whether you are adventurous enough. If you understand the error, it means your PHP has some old class constructors. OLD Php Class Constructor Class myclassname { function myclassname() { //This is a constructor } New Php Class Constructor Class myclassname { function __construct() { //this is the new constructor ...


1

You also have to install libapache2-mod-php (or libapache2-mod-php7.0 if you have PHP7) and restart Apache if this doesn't happen during the module install.


2

Just save it to a file. If you are running your script by using something like this in /etc/rc.local: /path/to/script Change that to: /path/to/script > /tmp/script.out 2>/tmp/script.err That will create the two files /tmp/script.out and /tmp/script.err which will contain the script's output and error messages respectively.


0

Try the following two commands: sudo pear channel-discover pear.pearplex.net sudo pear install pearplex/PHPExcel


2

Ok finding in a lot of blogs and aswer, the obviously answer is add suffix in php, then for install php5.6 or before add this. sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get upgrade sudo apt-get install php7.0 # for PHP 7.0 sudo apt-get install php5.6 # for PHP 5.6 sudo apt-get install php5.5 # for PHP 5.5 later of this you ...


0

Run the following command: sudo update-alternatives --config php


1

It is not recommended run a webserver on root user. If you want advice move to services like amazon ecs, google cloud, where you can easily start again a new server and get support, or online help. Or at least a provider that has cpanel. This is not a thing to do by hand, contact your provider support and ask how to reset an account. (backup your database ...


0

Since you didn't choose an answer, maybe the problem is still open and it is similar to mine (PHP is not working - therefore phpmyadmin doesn't work). I upgraded from 15.10 to 16.04 yesterday and also got PHP7 (instead of 5) in the process. localhost worked for me, but the public_html directory in my home directory didn't. Problem was the upgrade of PHP (...


3

Below are the steps to be followed to install composer globally: 1. Before installing Composer, make sure our server has all dependencies installed. 1st, update the package manager cache by running: $ sudo apt-get update 2. Now, let's install the dependencies. We'll need curl => to download Composer php5-cli => installing and running it git => used ...


0

It's entirely possible that I am misunderstanding you entirely but if what you are looking for is available for Xenial (16.04) in the PPA you reference, it can be found listed here. To enable GD-support configure PHP --with-gd[=DIR] , where DIR is the GD base install directory. To use the recommended bundled version of the GD library (which was first ...


0

To answer the question if there's a particular reason for it, yes there is ;) You can interface Apache with PHP in several ways (mod_php, cgi, fcgi, scgi, php-fpm, cli ...). And you can use multiple of those server APIs (SAPIs) on the same machine in parallel and decide by site / vhost which to use (considering issues like performance, security or ...


1

You need to install php dom extension. sudo apt-get install php-xml But since you are still using php5.6... sudo apt-get install php5.6-xml ..will do the trick.


1

You have multiple installations of PHP on your system but only one has a command-line interpreter at /usr/bin/php. You need to install the php7.0-cli package to replace it with the version from the package repositories. You don't need it to process PHP web pages through a web server, but without it you cannot run the php program. If you still have multiple ...


0

Instead of using xampp i would recommend to install the ApachePHPMySql thingy in ubuntu. https://help.ubuntu.com/community/ApacheMySQLPHP EDIT: The ubuntu phpmyadmin documentation is found here: https://help.ubuntu.com/lts/serverguide/phpmyadmin.html


0

You should be able to fix your problem by running the following commands sudo apt-get install libapache2-mod-php7.0 sudo a2dismod php* sudo a2enmod php7.0 sudo apache2ctl restart After adding Ondrej's repository, installing PHP 7 may not be enough as you will also need to install and enable Apache's PHP module for the version of PHP you need. This may be ...


1

Use dpkg-statoverride to change the user and group for /var/log/nginx as the change is most likely happen in postinst script on every package update.


0

You need to change your database password in app/config/parameters.yml file, to match the actual database password for your application. It appears that current parameters are the default ones (user "root" with empty password)


0

It's fine in gedit 3.20.2. This maybe help you http://www.omgubuntu.co.uk/2016/06/install-gedit-3-10-ubuntu-16-04-lts


1

If you use Ondřej Surý's PHP PPA you can install bcmath with either sudo apt install php5.6-bcmath sudo apt install php7.0-bcmath sudo apt install php-bcmath There are instructions on the PPA page on how to add this source to Ubuntu.



Top 50 recent answers are included