Solved

URG: Need to write a php script which will install a package???

Posted on 2002-04-08
10
477 Views
Last Modified: 2013-11-13
Hey guys,

Heres my situation(its worse)

How can i write a PHP script that will install an RPM on the server, if possible then how do i get the
output of that, meaning if i run rpm -i package name on the command prompt, it outputs everything on
screen how do i get this output in php too???

Any bit of a light on this darkness is appreciated...


thanx

kal
0
Comment
Question by:kaldude
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 6925318
I'm not a PHP guru but you can execute an application using PHP. There are a couple of methods, one I do know.

$soutput = shell_exec('yourcommand');
eche $soutput;

The output will be sent back as a string. Helps?

CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6925319
echo not eche :-)
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6925321
If it does not work you should probably set permissions for the user accessing the machine. I have no idea how to do that :-) Except if the platform is NT.

CJ
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:kaldude
ID: 6931656
hey CJ,

Thanx for all your time and comments, doesnt seem like it works the way i want, we have agreed upon installing the rpm while installing our product, i have got a small problem with that too, i've to start and stop dhcpd service
i tried to do that but seems like permission issue, does anyone know how to make services stop and start using php???


kal
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6931964
What server is it?
0
 

Author Comment

by:kaldude
ID: 6932342
its a redhat 7.1, with the dhcp server that comes along...
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6936200
Like I said before, it has to be a security issue. I'm sorry but have no experience or knowledge on how to set that up on Linux :-( Can't help further...

CJ
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7508172

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts refunded
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7508361
/me Agree
0
 

Accepted Solution

by:
Jgould earned 0 total points
ID: 7548089
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question