Solved

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

Posted on 2002-04-08
10
312 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
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
 

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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now