New answers tagged

0

Installing the php5-gd module with apt-get install php5-gd does not enable the module directly. In order to enable it, you should use the following command before restarting apache. sudo php5enmod gd sudo apache2ctl restart php5enmod stands for PHP5 Enable module. This the same command you can use for enabling Apache2 modules (a2enmod), but for PHP5 ...


1

Here's the relevant Launchpad bug: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1585614


1

I just saw this on both my 12.04 LTS servers. "sudo apt-get upgrade" caused the web server to stop. A simple "sudo service apache2 start" appears to have fixed the issue here. I similarly got an error: [Wed May 25 11:49:42 2016] [error] (9)Bad file descriptor: apr_socket_accept: (client socket) apache2: Syntax error on line 210 of ...


0

great answer con-f-use. I have one thing to add about the "dummy gmail account": This is highly recommended because you have to configure your gmail account to allow less secure applications: https://www.google.com/settings/u/0/security/lesssecureapps Otherwise you will get a "please log in using your web browser and then try again" error in your ...


1

sudo apt-get install lamp-server^ When used, it will attempt to install all of the features and configuration for LAMP. It will know and skip anything that is already there so do not worry about any overwriting of your configuration.


1

This is a really wild guess, but the include might be failing because of directory/file permissions. Make sure that the user you are running the cron job for has all rights to access the directory where cron.php file is and all the files that it opens. You might have tweaked the permissions for the webserver that runs under www-data, but you are running ...


0

For PHP 5.6 and 7.0, you are out of luck, because upstream hasn't released PHP 7.0 compatible version of mysql_ms. For PHP 5.5, I have released a package called php-mysqlnd-ms into the main PHP PPA and you should be able to install it with: sudo apt-get install php-mysqlnd-ms However I would recommend using something else for your MySQL load-balancing ...


0

As others have mentioned your cron daemon is working correctly but PHP is having problems finding the required files that cron.php requires to execute. PHP looks for these in the include paths specified by php.ini and additionally in the document root for the apache module thus why the site itself works, for the command line version of PHP this additional ...


0

Your configuration is wrong. You (or some software you have installed) have enabled something like: extension=php_mbstring.dll in the PHP configuration file, and this is wrong as php_mbstring.dll is an extension compiled for Windows operating system. The correct way is to install php-mbstring package and let it enable the mbstring extension ...


0

TL;DR Yes. Ubuntu Security Team will support whatever PHP they have in the LTS releases. They already do that for PHP 5.4 in Ubuntu 12.04 LTS. You have to count on the fact, this will not include all security issues, but only those critical enough (such as remote unauthenticated vulnerabilities).


0

You are mixing different PPAs and versions and commands in incompatible way, let's break it down: libapache2-mod-php5.6 is present in ppa:ondrej/php and this is really the PPA you want to be using phpdismod is a command for disabling PHP extensions, and not to manage Apache2 modules, you need a2dismod for that The PHP Apache2 module in ppa:ondrej/php5-5.6 ...


1

Install module bcmath sudo apt-get install php-bcmath Restart apache service eventually sudo service apache2 restart


1

Open a terminal and type: sudo apt-get remove --purge phpmyadmin or as Rinzwind noted sudo apt-get purge phpmyadmin this should (1) remove phpmyadmin and (2) remove its settings files and so on too.


0

Create a script (and chmod +x it): #!/bin/bash export DISPLAY=:0 firefox Run crontab -e and add at the bottom: * * * * * /path/to/my/script ..and it'll open Firefox every minute on your user's desktop. Figured you might also want a feature to automatically close it after some time, instead of incrementing opened windows or tabs. I would suggest ...


0

You can try using watch. watch -10 <YOUR COMMAND> This will try executing your command every 10 second in terminal.


0

If you install libapache2-mod-php7.0 in addition to libapache2-mod-php5 it will not enable itself (you should see this in {apt,dpkg}.log), so you need to disable php5 module and enable php7.0 module: a2dismod php5 a2enmod php7.0 apache2ctl restart P.S.: You should read what the packages tells you at the installation time. Running apt-get with -y is a ...


0

PHP gettext extension is compiled either as builtin module (in case of php5 packages) or included in phpX.Y-common package as dynamic extension and loaded by default (in case of new coinstallable PHP packages). There's no need to compile it yourself if you are using prepackaged PHP.


1

Fixed by purging both apache and php. Only removing php was not sufficient. I'm not sure that this is the best way to do it, but it worked: sudo service apache2 stop sudo apt-get remove --purge apache2 apache2-utils apache2-bin php* sudo apt-get autoremove And this is what I used to reinstall everything: http://askubuntu.com/a/762161/411578


1

Ubuntu 16.04 LTS comes with PHP 7.0. To install it, you need to run: apt-get install php Or rather pick a specific PHP Web SAPI, most probably you need support for Apache2: apt-get install libapache2-mod-php php Or PHP FPM apt-get install php-fpm php If you specifically need PHP 5.x, you'll need to use ppa:ondrej/php and install, f.e. PHP 5.6 for ...


0

16.04 does not have PHP 5 in the official repositories. Install a 14.04 system, or use this PPA.


0

I recently published a project that allows PHP to obtain and interact with a real Bash shell (as user: apache/www-data or root if needed). Get it here: https://github.com/merlinthemagic/MTS After downloading you would simply use the following code: //Setting the second argument in getShell(): //true will return a shell with root //false will return a shell ...


1

PHP Fatal error: require(): Failed opening required 'app/bootstrap.php' (include_path='.:/usr/share/php:/usr/share/pear') It looks like your required files cant be found and so it is throwing the error. I presume these files are in /var/www/html/sitename/app/? In this case add the following line at the beginning of your cron.php: ...


0

Without more information I can only describe general causes: php7.0-mysql package is not installed, to fix run sudo apt-get install php-mysql mysqli module got somehow disabled, to fix run phpenmod mysqli You are using different web SAPI PHP version than you have PHP CLI, f.e. you might have installed libapache2-mod-php5.6 with php7.0-cli Your Apache 2.x ...


1

The old php5-* packages are coinstallable with the new phpX.Y-* scheme, so the first thing you need to do is to install and enable new packages: Apache 2.4 You need to install new libapache2-mod-phpX.Y packages and then disable the old php5, and enable new versioned module, f.e. for PHP 5.6: sudo apt-get install libapache2-mod-php5.6 sudo phpdismod php5 ...


0

Look for the following in the Load Modules sections of your apache configuration file : LoadModule mpm_event_module modules/mod_mpm_event.so And replace it with the following module : LoadModule mpm_prefork_module modules/mod_mpm_prefork.so


0

To disable event MPM, you can do sudo a2dismod mpm_event and after that to enable prefork, you should do sudo a2enmod mpm_prefork


0

Install the Apache PHP7 module with: sudo apt install libapache2-mod-php7.0 This will install and activate the Apache PHP7 module. If you are testing a site in your user directory (accessed by http://host.example.com/~user/), you will need to specifically activate PHP in userdir-module directores. Open /etc/apache2/mods-available/php7.0.conf in an ...


0

If you experience this error that means the version of both php5-common and php5-mysql was different thus causing this error, To fix the error, Do: sudo apt-get install php5 php5-common php5-mysql Try sudo apt-get dist-update again, hope it helps you.


0

The solution is easy: sudo apt-get install php-gd php-mysql 16.04 LTS comes now with php 7.0 and the names of the whole packages including the virtual packages have changed to be now php-* or php7.0-* instead of php5-*.


0

Install LAMP server: sudo apt-get install lamp-server^ Enable userdir module: sudo a2enmod userdir Enable PHP execution in user directory: sudo nano /etc/apache2/mods-available/php7.conf (if you use PHP5, it's php5.conf) Comment this part: #<IfModule mod_userdir.c> # <Directory /home/*/public_html> # php_admin_flag ...


0

Just ran into the same error. You'll need to manually enable the mysqli php module and then restart apache: $ sudo phpenmod mysqli $ sudo service apache2 restart After that, it all worked (for me).


0

Although sudo apt-get install php5 failed sudo apt-get install php5.6 worked and now php is working.


2

Please Type in Terminal: sudo apt-get install php-mbstring php7.0-mbstring php-gettext libapache2-mod-php7.0 And than restart apache2, Type in Terminal: sudo service apache2 restart Done. This has been reported here: https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/1577482 EDITED Still missing? You need to explicitly enable the PHP mcrypt and ...


1

The new default root folder of apache is /var/www/html, thus your Source folder should read /var/www/html/PhpProject2.


0

From your log, it looks like an older version of package (which maybe unofficial ) is causing issue during installation. The answer to your question is well explained with the solution here : askubuntu: libapache-mod5-php- installation issue Follow the solution there. If problem exists please comment.


0

I think I figured it out. I started fresh and stepped thru each line of my pastebin, only using the necessary parts for PHP as FastCGI, and researched exactly how each little piece works. Then I tried many things that failed, then there was only thing left to try, and maybe this isn't the "right way", but... create a new <Directory> block in ...


1

So long as you're still within your local network, you should be able to access it via that local IP address (as you showed above), although vanilla apache installs are typically configured to only listen on port 80 not 8080. In the apache configuration you can change that port if so desired (for this and some other intro info: ...


1

You need to install libapache2-mod-php7.0 and if it doesn't enable automatically (it should) at install time, enable it with: a2enmod php7.0 If libapache2-mod-php5 is still installed, either disable it first with a2dismod php5 or uninstall with apt-get purge libapache2-mod-php5.


0

PHP packages should compile with Maria-DB just fine. Just pick the build-dep packages by hand from debian/control instead of using apt-get build-dep php5, then change the Build-Depends libmysqlclient-dev to correct development package from Maria-DB.


0

You need to install SAPI for your webserver, f.e. either libapache2-mod-php for Apache2 or php-fpm for NGINX. CLI version of PHP could be different from web SAPI. For Ubuntu 12.04 LTS you need to also add ppa:ondrej/apache2 if you intend to use Apache 2.x PHP module: sudo add-apt-repository ppa:ondrej/apache2 sudo apt-get update sudo apt-get install ...


1

I had upgraded php 5.6.11 to 5.6.21. So, in my case I had to run: sudo apt-get install php5.6-mbstring PS: How I upgraded from 5.6.11 to 5.6.21 following: sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php5.6 Reason for upgrade: zend_mm_heap corrupted during composer update.


0

Ubuntu 13.10 is not supported neither by Canonical nor by me those PHP PPAs. You have to upgrade at least to Ubuntu 14.04 LTS.


0

Patience, young Padawan, you just need to wait a tad bit longer. In the PPAs, architecture independent packages (php5-common) can be built on different architecture at different time.


0

Please follow the Ubuntu GmailPostfixFetchmail Community Documentation


0

When I used this command: update user set password=PASSWORD("mynewpassword") where User='root'; I have got the following error: ERROR 1054 (42S22): Unknown column 'password' in 'field list' I have searched for some time, and I found that we have to use authentication_string in the place of password, so I think the command should be: update user set ...


1

If you're already familair with Notepad++ I would recommend Notepadqq. sudo add-apt-repository ppa:notepadqq-team/notepadqq sudo apt-get update sudo apt-get install notepadqq


0

install php extension : sudo apt-get install php-mbstring sudo apt-get install php-gettext


0

If you want to upgrade only PHP 5.3 to 5.5 and do not want to upgrade the system, then you need to install apache 2.4 as well. sudo apt-add-repository ppa:ondrej/apache2 -y sudo add-apt-repository ppa:ondrej/php -y sudo aptitude update sudo apt-get install apache2 libapache2-mod-php5 Beware about some changes in apache 2.4 related to require grant all. ...


0

This needs to be said over and over: Don't run outdated software. PHP 5.3 has reached its end-of-life on 14 Aug 2014, that's 1 year and 8 months ago at the time of writing this answer. Using outdated end-of-life software will bring you nothing but pain and security vulnerabilities, unless you can invest a time to properly research all existing security ...


3

Use Sublime Text or Brackets. Brackets is more focussed on web development with live preview features which help a lot. you can download both of them from their website, they give .deb packages directly



Top 50 recent answers are included