Package .deb files using PHP5

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mofolo
Forum Newbie
Posts: 7
Joined: Mon Dec 07, 2009 8:35 am

Package .deb files using PHP5

Post by mofolo »

Is there a way to run:

Code: Select all

dpkg -b [dir]
In php 5?

Everytime I run

Code: Select all

system("dpkg -b [dir]",$collect);
$collect returns: 127;

What am i doing wrong?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Package .deb files using PHP5

Post by Weirdan »

127 is 'command not found':

Code: Select all

 
weirdan@virtual-debian:~$ lkjsdfk
bash: lkjsdfk: command not found
weirdan@virtual-debian:~$ echo $?
127
 
Try using absolute path to dpkg binary.
Post Reply