Solved

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

Posted on 2002-04-08
10
450 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# code editing and collaboration 3 113
VB.NET 2008 Publish Error 2 27
Scheduled Tasks Tweak 5 30
Non admin needs to install programs 17 32
This is an explanation of a simple data model to help parse a JSON feed
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 …

773 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