
I have been running Ubuntu for over a decade. Always did Internet upgrades. But the last one, to 12.04 broke my PHP and the only solution I have found is to do a clean install. I have /home on a separate drive so I expect that this is not a big deal. But I think a few of you might be able to offer a tips. The system will be a desktop and also a LAMP server. I plan to install the desktop and then add the AMP. I will back up the databases using mysqldump, save the Apache .conf files as well as fstab. Anything else I should consider? Thanks -- Stephen

On 11/06/15 06:51 PM, Stephen wrote:
I have been running Ubuntu for over a decade. Always did Internet upgrades.
But the last one, to 12.04 broke my PHP and the only solution I have found is to do a clean install.
I have /home on a separate drive so I expect that this is not a big deal. But I think a few of you might be able to offer a tips.
The system will be a desktop and also a LAMP server. I plan to install the desktop and then add the AMP.
I will back up the databases using mysqldump, save the Apache .conf files as well as fstab.
Anything else I should consider? Thanks
You could use a configuration management system to declare what the final state of the machine should be once you've finished. I've been learning SaltStack <http://docs.saltstack.com> over the last couple of days and I'm quite impressed. I'm using a masterless minion setup due to the fact that the machines that I'm deploying are intended to run behind a firewall with no access to the Internet. Here is a resource I found useful: <http://eon01.com/blog/using-saltstack-to-automate-vagrant-provisioning/>. You don't have to use Vagrant but you might want to once you see how easy it is to go from deploying your VM locally on VirtualBox to deploying to an Amazon EC2 instance, for example. -- Regards, Clifford Ilkay +1 647-778-8696

On 15-06-11 06:51 PM, Stephen wrote:
But the last one, to 12.04 broke my PHP and the only solution I have found is to do a clean install.
That might be a simple way to try and fix things but I wouldn't think it should be the only way. You don't say in which way it is broken. You could downgrade PHP, remove all packages that have anything to do with PHP and reinstall from your distros PHP package, or you could remove all existing PHP packages and install a version you built from source. Another thing is whether the problem is simply a configuration error in Apache. You can run some tests on PHP using 'php -a' at a command line to run it interactively and see if it appears to be functional or not. -- Cheers! Kevin. http://www.ve3syb.ca/ |"Nerds make the shiny things that distract Owner of Elecraft K2 #2172 | the mouth-breathers, and that's why we're | powerful!" #include <disclaimer/favourite> | --Chris Hardwick

On 15-06-11 08:15 PM, Kevin Cozens wrote:
On 15-06-11 06:51 PM, Stephen wrote:
But the last one, to 12.04 broke my PHP and the only solution I have found is to do a clean install.
That might be a simple way to try and fix things but I wouldn't think it should be the only way.
You don't say in which way it is broken. You could downgrade PHP, remove all packages that have anything to do with PHP and reinstall from your distros PHP package, or you could remove all existing PHP packages and install a version you built from source.
Another thing is whether the problem is simply a configuration error in Apache. You can run some tests on PHP using 'php -a' at a command line to run it interactively and see if it appears to be functional or not.
I have tried many things. The problem comes when trying to install libapache2-mod-php5 I get this error: dpkg: error processing package libapache2-mod-php5 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: libapache2-mod-php5 E: Sub-process /usr/bin/dpkg returned an error code (1) Using Google I see others have had this problem, but I have not found a solution. I have followed suggestions like these (using sudo): apt-get -f install apt-get clean all apt-get update apt-get -f install Then try: apt-get install libapache2-mod-php5 I get the error above. Follows is the term.log: Selecting previously unselected package php5-json. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 315763 files and directories currently installed.) Preparing to unpack .../php5-json_1.3.2-2build1_amd64.deb ... Unpacking php5-json (1.3.2-2build1) ... Selecting previously unselected package php5-common. Preparing to unpack .../php5-common_5.5.9+dfsg-1ubuntu4.9_amd64.deb ... Unpacking php5-common (5.5.9+dfsg-1ubuntu4.9) ... Selecting previously unselected package php5-cli. Preparing to unpack .../php5-cli_5.5.9+dfsg-1ubuntu4.9_amd64.deb ... Unpacking php5-cli (5.5.9+dfsg-1ubuntu4.9) ... Selecting previously unselected package php5-readline. Preparing to unpack .../php5-readline_5.5.9+dfsg-1ubuntu4.9_amd64.deb ... Unpacking php5-readline (5.5.9+dfsg-1ubuntu4.9) ... Selecting previously unselected package libapache2-mod-php5. Preparing to unpack .../libapache2-mod-php5_5.5.9+dfsg-1ubuntu4.9_amd64.deb ... Unpacking libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.9) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up php5-json (1.3.2-2build1) ... php5_invoke: Enable module json for cli SAPI php5_invoke: Enable module json for apache2 SAPI Setting up php5-common (5.5.9+dfsg-1ubuntu4.9) ... php5_invoke: Enable module pdo for cli SAPI php5_invoke: Enable module pdo for apache2 SAPI php5_invoke: Enable module opcache for cli SAPI php5_invoke: Enable module opcache for apache2 SAPI Setting up php5-cli (5.5.9+dfsg-1ubuntu4.9) ... update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode php5_invoke opcache: already enabled for cli SAPI php5_invoke pdo: already enabled for cli SAPI php5_invoke json: already enabled for cli SAPI Setting up php5-readline (5.5.9+dfsg-1ubuntu4.9) ... php5_invoke: Enable module readline for cli SAPI php5_invoke: Enable module readline for apache2 SAPI Setting up libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.9) ... php5_invoke opcache: already enabled for apache2 SAPI php5_invoke readline: already enabled for apache2 SAPI php5_invoke pdo: already enabled for apache2 SAPI php5_invoke json: already enabled for apache2 SAPI dpkg: error processing package libapache2-mod-php5 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: libapache2-mod-php5 -- Stephen

I suggest you run post-install script directly and see what is happening there: sh -x /var/lib/dpkg/info/libapache2-mod-php5.postinst Tim On 2015-06-11 20:23, Stephen wrote:
On 15-06-11 08:15 PM, Kevin Cozens wrote:
On 15-06-11 06:51 PM, Stephen wrote:
But the last one, to 12.04 broke my PHP and the only solution I have found is to do a clean install.
That might be a simple way to try and fix things but I wouldn't think it should be the only way.
You don't say in which way it is broken. You could downgrade PHP, remove all packages that have anything to do with PHP and reinstall from your distros PHP package, or you could remove all existing PHP packages and install a version you built from source.
Another thing is whether the problem is simply a configuration error in Apache. You can run some tests on PHP using 'php -a' at a command line to run it interactively and see if it appears to be functional or not.
I have tried many things. The problem comes when trying to install libapache2-mod-php5
I get this error:
dpkg: error processing package libapache2-mod-php5 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: libapache2-mod-php5 E: Sub-process /usr/bin/dpkg returned an error code (1)
Using Google I see others have had this problem, but I have not found a solution.
I have followed suggestions like these (using sudo):
apt-get -f install apt-get clean all apt-get update
apt-get -f install
Then try:
apt-get install libapache2-mod-php5
I get the error above.
Follows is the term.log:
Selecting previously unselected package php5-json. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 315763 files and directories currently installed.) Preparing to unpack .../php5-json_1.3.2-2build1_amd64.deb ... Unpacking php5-json (1.3.2-2build1) ... Selecting previously unselected package php5-common. Preparing to unpack .../php5-common_5.5.9+dfsg-1ubuntu4.9_amd64.deb ... Unpacking php5-common (5.5.9+dfsg-1ubuntu4.9) ... Selecting previously unselected package php5-cli. Preparing to unpack .../php5-cli_5.5.9+dfsg-1ubuntu4.9_amd64.deb ... Unpacking php5-cli (5.5.9+dfsg-1ubuntu4.9) ... Selecting previously unselected package php5-readline. Preparing to unpack .../php5-readline_5.5.9+dfsg-1ubuntu4.9_amd64.deb ... Unpacking php5-readline (5.5.9+dfsg-1ubuntu4.9) ... Selecting previously unselected package libapache2-mod-php5. Preparing to unpack .../libapache2-mod-php5_5.5.9+dfsg-1ubuntu4.9_amd64.deb ... Unpacking libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.9) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up php5-json (1.3.2-2build1) ... php5_invoke: Enable module json for cli SAPI php5_invoke: Enable module json for apache2 SAPI Setting up php5-common (5.5.9+dfsg-1ubuntu4.9) ... php5_invoke: Enable module pdo for cli SAPI php5_invoke: Enable module pdo for apache2 SAPI php5_invoke: Enable module opcache for cli SAPI php5_invoke: Enable module opcache for apache2 SAPI Setting up php5-cli (5.5.9+dfsg-1ubuntu4.9) ... update-alternatives: using /usr/bin/php5 to provide /usr/bin/php (php) in auto mode php5_invoke opcache: already enabled for cli SAPI php5_invoke pdo: already enabled for cli SAPI php5_invoke json: already enabled for cli SAPI Setting up php5-readline (5.5.9+dfsg-1ubuntu4.9) ... php5_invoke: Enable module readline for cli SAPI php5_invoke: Enable module readline for apache2 SAPI Setting up libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.9) ... php5_invoke opcache: already enabled for apache2 SAPI php5_invoke readline: already enabled for apache2 SAPI php5_invoke pdo: already enabled for apache2 SAPI php5_invoke json: already enabled for apache2 SAPI dpkg: error processing package libapache2-mod-php5 (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: libapache2-mod-php5

On 15-06-11 08:39 PM, Tim Sattarov wrote:
I suggest you run post-install script directly and see what is happening there:
sh -x /var/lib/dpkg/info/libapache2-mod-php5.postinst
Thank you for the suggestion. This is the result: $ sudo /var/lib/dpkg/info/libapache2-mod-php5.postinst [sudo] password for stephen: no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory You must invoke apache2-maintscript-helper with an unmodified environment when sourcing it -- Stephen

On 2015-06-11 20:46, Stephen wrote:
Thank you for the suggestion. This is the result:
$ sudo /var/lib/dpkg/info/libapache2-mod-php5.postinst [sudo] password for stephen: no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory You must invoke apache2-maintscript-helper with an unmodified environment when sourcing it
I have the same result on my Debian box, when run without parameters. but this one ends with 'exit 0': sh -x /var/lib/dpkg/info/libapache2-mod-php5.postinst configure (note I run in it debug mode with "sh -x") If it still have non zero exit from that script and you believe that your system is fine, you can put exit 0 in the beginning of that file (after shebang) and run dpkg --configure -a to fix unconfigured packages Tim

On 15-06-11 08:57 PM, Tim Sattarov wrote:
On 2015-06-11 20:46, Stephen wrote:
Thank you for the suggestion. This is the result:
$ sudo /var/lib/dpkg/info/libapache2-mod-php5.postinst [sudo] password for stephen: no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory You must invoke apache2-maintscript-helper with an unmodified environment when sourcing it
I have the same result on my Debian box, when run without parameters.
but this one ends with 'exit 0': sh -x /var/lib/dpkg/info/libapache2-mod-php5.postinst configure
I tried that and I get + return 1 + exit 1 At the beginning I get: no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory Which I am concerned about. -- Stephen

On 2015-06-11 21:06, Stephen wrote:
I tried that and I get
+ return 1 + exit 1
At the beginning I get:
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
Which I am concerned about.
Will that help ? http://ubuntuforums.org/showthread.php?t=2258606

On Thu, Jun 11, 2015 at 8:46 PM, Stephen <stephen-d@rogers.com> wrote: On 15-06-11 08:39 PM, Tim Sattarov wrote: I suggest you run post-install script directly and see what is happening there:
sh -x /var/lib/dpkg/info/libapache2-mod-php5.postinst
Thank you for the suggestion. This is the result: $ sudo /var/lib/dpkg/info/libapache2-mod-php5.postinst [sudo] password for stephen: no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory You must invoke apache2-maintscript-helper with an unmodified environment when sourcing it
Stephen, when I Googled "no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory" this came up: http://askubuntu.com/questions/477002/loadparm-c4864-leaking-memory Hope it helps. Thanks - Aruna
-- Stephen --- Talk Mailing List talk@gtalug.org http://gtalug.org/mailman/listinfo/talk

On Thu, 11 Jun 2015 18:51:37 -0400 Stephen <stephen-d@rogers.com> wrote:
I have been running Ubuntu for over a decade. Always did Internet upgrades.
But the last one, to 12.04 broke my PHP and the only solution I have found is to do a clean install.
I have /home on a separate drive so I expect that this is not a big deal. But I think a few of you might be able to offer a tips.
The system will be a desktop and also a LAMP server. I plan to install the desktop and then add the AMP.
I will back up the databases using mysqldump, save the Apache .conf files as well as fstab.
Anything else I should consider? Thanks
-- Stephen
Stephen, This is how I upgrade my Fedora machines. Everything on /home stays intact because I don't reformat it. I can switch to Ubuntu if I want. I don't have application data on my root partition. If I did, I would back it up regularly, and before doing a re-install. My /etc directory is backed up weekly, automatically. I document my install procedure. I post this on my website to encourage other Linux users, but my original purpose was to be able to it again, later. -- Howard Gibson hgibson@eol.ca howard.gibson@teledyneoptech.com jhowardgibson@gmail.com http://home.eol.ca/~hgibson

I'm currently using docker and having the lamp in a virtual machine and database in another. Another virtual machine that's attached to database for storage so I can change versions and scale up as needed OpenPGP KeyID: 1666B6A1 http://xxw.ca/email-public-key/ Email: littlebear@xxw.ca On Jun 11, 2015 6:51 PM, "Stephen" <stephen-d@rogers.com> wrote:
I have been running Ubuntu for over a decade. Always did Internet upgrades.
But the last one, to 12.04 broke my PHP and the only solution I have found is to do a clean install.
I have /home on a separate drive so I expect that this is not a big deal. But I think a few of you might be able to offer a tips.
The system will be a desktop and also a LAMP server. I plan to install the desktop and then add the AMP.
I will back up the databases using mysqldump, save the Apache .conf files as well as fstab.
Anything else I should consider? Thanks
-- Stephen --- Talk Mailing List talk@gtalug.org http://gtalug.org/mailman/listinfo/talk

On 11/06/15 06:51 PM, Stephen wrote:
I have been running Ubuntu for over a decade. Always did Internet upgrades.
But the last one, to 12.04 broke my PHP and the only solution I have found is to do a clean install.
I'm with the others -- the problem should be fixable. I've dealt with some messy upgrade problems at times, but I've *never* had to do a clean install. A problem with one package should be fixable, even if the fix is tricky...
[...] I think a few of you might be able to offer a tips.
The system will be a desktop and also a LAMP server. I plan to install the desktop and then add the AMP.
I will back up the databases using mysqldump, save the Apache .conf files as well as fstab.
Anything else I should consider? Thanks
For what it's worth on backups... - I'm a fan of automysqlbackup (in the Ubuntu and Debian repositories) for MySQL backups, which is a wrapper script for mysqldump that compresses, rotates, saves daily/weekly/monthly versions, notifies on error, etc. - For filesystem backups, rsnapshot is pretty great for incremental, versioned backups Other packages I often install on a clean Ubuntu/Debian server: - logwatch: log analyser - fail2ban: ban hosts that cause multiple authentication errors - munin: gathers graphs for performance monitoring
participants (8)
-
Aruna Hewapathirane
-
Blaise Alleyne
-
Clifford Ilkay
-
Howard Gibson
-
Kevin Cozens
-
Little Bear
-
Stephen
-
Tim Sattarov