dab failes with 'dab task php'

smilie

New Member
Feb 20, 2009
19
0
1
Hi,

While performing this Makefile:
Code:
BASEDIR:=$(shell dab basedir)

all: info/init_ok
        dab bootstrap
        # Install Apache2, MySQL and PHP
        dab install apache2
        dab task mysql --password=random
        dab task php
        dab install php5-mysql
        dab finalize
        mv debian-5.0-lamp_5.0-3_i386.tar.gz /var/lib/vz/template/cache/.

info/init_ok: dab.conf
        dab init
        touch $@

.PHONY: clean
clean:
        dab clean
        rm -f *~

and when getting tot the piece:
"dab task php" I get following error:

dab task php
install: libt1-5
install: php5-common
install: php5-cli
install: libjpeg62
install: php5-gd
install: apache2-mpm-prefork
install: libapache2-mod-php5
install: libgd2-xpm
install: php5
command 'vzctl exec2 90000 defenv dpkg --force-depends --force-confold --install /libt1-5_5.1.2-3_i386.deb /php5-common_5.2.6.dfsg.1-1+lenny4_i386.deb /php5-cli_5.2.6.dfsg.1-1+lenny4_i386.deb /libjpeg62_6b-14_i386.deb /php5-gd_5.2.6.dfsg.1-1+lenny4_i386.deb /apache2-mpm-prefork_2.2.9-10+lenny6_i386.deb /libapache2-mod-php5_5.2.6.dfsg.1-1+lenny4_i386.deb /libgd2-xpm_2.0.36~rc1~dfsg-3+lenny1_i386.deb /php5_5.2.6.dfsg.1-1+lenny4_all.deb' failed with exit code 1

When replacing "dab task php" with "dab install php5" same thing happens:

shn:/home/smilie/proxmox_related/dab_appliance/creation/debian-5.0-lamp# dab install php5
install: php5-common
install: apache2-mpm-prefork
install: libapache2-mod-php5
install: php5
command 'vzctl exec2 90000 defenv dpkg --force-depends --force-confold --install /php5-common_5.2.6.dfsg.1-1+lenny4_i386.deb /apache2-mpm-prefork_2.2.9-10+lenny6_i386.deb /libapache2-mod-php5_5.2.6.dfsg.1-1+lenny4_i386.deb /php5_5.2.6.dfsg.1-1+lenny4_all.deb' failed with exit code 1
command 'vzctl exec2 90000 defenv dpkg --force-depends --force-confold --install /php5-common_5.2.6.dfsg.1-1+lenny4_i386.deb /apache2-mpm-prefork_2.2.9-10+lenny6_i386.deb /libapache2-mod-php5_5.2.6.dfsg.1-1+lenny4_i386.deb /php5_5.2.6.dfsg.1-1+lenny4_all.deb' failed with exit code 1

Will now test to see if this template is gonna work...

Cheers,
Aleks
 
Hm, if I reverse orde in Makefile, it goes well :/

New Makefile:
Code:
BASEDIR:=$(shell dab basedir)

all: info/init_ok
        dab bootstrap
        # Install Apache2, MySQL and PHP
        dab task php
        dab install apache2
        dab task mysql --password=random
        dab install php5-mysql
        dab finalize
        mv debian-5.0-lamp_5.0-3_i386.tar.gz /var/lib/vz/template/cache/.

info/init_ok: dab.conf
        dab init
        touch $@

.PHONY: clean
clean:
        dab clean
        rm -f *~

So, installing PHP5 first, and then Apache2 - it works.
While, I do belive that other way around should not be a problem either...?

Maybe a dab itself that does something extra?

Cheers,
Aleks
 
And I must correct myself once more.

PHP is not operational in such template. When trying to open *.php file (browser) it offers it as download (as it can not 'parse' it through PHP).

Once logged in the VPS based on this template, I had to do this:

Code:
lamptest:/var/www# apt-get install php5
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 php5-common
Suggested packages:
  php-pear
The following packages will be REMOVED:
  apache2-mpm-worker
The following NEW packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 php5 php5-common
0 upgraded, 4 newly installed, 1 to remove and 0 not upgraded.
Need to get 3088kB of archives.
After this operation, 6320kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://security.debian.org lenny/updates/main apache2-mpm-prefork 2.2.9-10+lenny6 [237kB]
Get:2 http://security.debian.org lenny/updates/main php5-common 5.2.6.dfsg.1-1+lenny4 [365kB]
Get:3 http://security.debian.org lenny/updates/main libapache2-mod-php5 5.2.6.dfsg.1-1+lenny4 [2484kB]
Get:4 http://security.debian.org lenny/updates/main php5 5.2.6.dfsg.1-1+lenny4 [1080B]
Fetched 3088kB in 0s (3236kB/s)
dpkg: apache2-mpm-worker: dependency problems, but removing anyway as you request:
 apache2 depends on apache2-mpm-worker (>= 2.2.9-10+lenny6) | apache2-mpm-prefork (>= 2.2.9-10+lenny6) | apache2-mpm-event (>= 2.2.9-10+lenny6); however:
  Package apache2-mpm-worker is to be removed.
  Package apache2-mpm-prefork is not installed.
  Package apache2-mpm-event is not installed.
(Reading database ... 16860 files and directories currently installed.)
Removing apache2-mpm-worker ...
Stopping web server: apache2 ... waiting ..
Selecting previously deselected package apache2-mpm-prefork.
(Reading database ... 16852 files and directories currently installed.)
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.9-10+lenny6_i386.deb) ...
Selecting previously deselected package php5-common.
Unpacking php5-common (from .../php5-common_5.2.6.dfsg.1-1+lenny4_i386.deb) ...
Selecting previously deselected package libapache2-mod-php5.
Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.2.6.dfsg.1-1+lenny4_i386.deb) ...
Selecting previously deselected package php5.
Unpacking php5 (from .../php5_5.2.6.dfsg.1-1+lenny4_all.deb) ...
Setting up apache2-mpm-prefork (2.2.9-10+lenny6) ...
Starting web server: apache2.
Setting up php5-common (5.2.6.dfsg.1-1+lenny4) ...
Setting up libapache2-mod-php5 (5.2.6.dfsg.1-1+lenny4) ...

Creating config file /etc/php5/apache2/php.ini with new version
Reloading web server config: apache2.
Setting up php5 (5.2.6.dfsg.1-1+lenny4) ...
lamptest:/var/www# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting .
lamptest:/var/www#

Only after this has been done is PHP5 working properly...

I am going to adjust Makefile not to use dab task php anymore, but to do it 'manually'.

Hope this can be fixed in future releases of Dab (neat program btw ;-))

Aleks
 
Many thank for the patch. I tried it, but i failed - it still starts mountall and that fails. Did you delete /etc/init/mountall.conf?
 
Many thank for the patch. I tried it, but i failed - it still starts mountall and that fails. Did you delete /etc/init/mountall.conf?

pls remove the advertising in your signature.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!