LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 04-24-2009, 11:17 AM   #1
nui
LQ Newbie
 
Registered: Jul 2005
Posts: 10

Rep: Reputation: 0
Can not use exec of php function to start/stop service


Dear All,

I try use exec of php function to start/stop squid service on RHEL5 but it does not work. I test same php script on RHEL4 and it work. Please suggest me why RHEL4 work but RHEL5 not work?

Thank you for your help.

Nui
 
Old 04-24-2009, 03:47 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by nui View Post
Dear All,

I try use exec of php function to start/stop squid service on RHEL5 but it does not work. I test same php script on RHEL4 and it work. Please suggest me why RHEL4 work but RHEL5 not work?

Thank you for your help.

Nui
Probably a permissions issue, but that's a guess. You don't give any actual error(s), samples of the script, or describe how the two systems are different, so it's hard to say.
 
Old 04-25-2009, 10:19 AM   #3
nui
LQ Newbie
 
Registered: Jul 2005
Posts: 10

Original Poster
Rep: Reputation: 0
No errer in /var/log/messages

I try to check the error message but I do not found. Do you have any idea for debug it? Please suggest me.

Thank you for your help.

Nui
 
Old 04-25-2009, 10:43 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by nui View Post
I try to check the error message but I do not found. Do you have any idea for debug it? Please suggest me.

Thank you for your help.

Nui
I did "suggest you" before. Give error(s), sample of the script, and what the differences are between the systems.

This is a program that you wrote...you're the one that has the knowledge to debug it. Check permissions on the file, and make sure the user that's running it, has permissions to run the startup/shutdown script. Run the script from the command-line, and see if it generates an error.

Without any error messages, or any details about your systems, there's nothing we can do. Saying "it doesn't work", doesn't give us anything to go on.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
service start/stop command stalls..... CaptainInsane Fedora 2 01-20-2007 04:03 PM
php exec() function in chrooted apache clau_bolson Linux - Software 2 12-21-2005 08:29 AM
PHP / VideoLAN / Fedora Core Question - how can I get the PHP "exec" function to work gtrawoger Linux - Software 3 12-21-2005 06:51 AM
start/stop service on the fly zchoyt Linux - Software 3 04-14-2005 03:30 AM
Help php exec, system function for compile javac or java antony_csf Programming 0 06-15-2004 01:45 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration