LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-01-2008, 06:54 PM   #1
gw1500se
Member
 
Registered: Mar 2004
Distribution: Mandriva 2010.0
Posts: 220

Rep: Reputation: 30
PHP-CLI, expect, dump and sudo problem


I am trying to write a web based backup control mechanism for my operators. I am having good success except with the 'dump' command itself. I am using 'expect' to control the responses to 'dump' and I am using PHP-CLI to fork the dump command so an auto refresh web page will display the progress.

The problem is that I need to run the command as 'apache' which of course controls the web pages. I put the Apache user in the 'sudoers' file so it can run the command. So far all is normal. I can run everything from the command line as root so I know all the scripts are working. Where I am having the problem is when the Apache user launches the expect script. The 'dump' command starts fine and gets to Pass I. After running that pass briefly (it may be trying to start pass II but never puts that message out) it simply terminates. I have searched every log I could find but there are no error messages anywhere. Does anyone have any ideas why this might be happening or at least where or what I can do to get some kind of reason for the termination? Thanks.
 
Old 03-05-2008, 01:02 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,174
Blog Entries: 4

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 03-05-2008, 07:43 PM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,232

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
Show us the code
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Adding users with PHP (pass php variables to Expect script) Jayla Programming 1 10-20-2006 10:44 AM
Can you have "sudo" automatically added to each line in the CLI? Free_beer Ubuntu 7 09-29-2006 03:59 PM
php send email parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expect jamesjoy Programming 7 12-06-2005 04:33 PM
php <core dump>!!! shadow_wwp Programming 0 08-27-2004 02:58 AM
PHP Dump agallant Programming 3 06-27-2004 08:07 AM


All times are GMT -5. The time now is 01:59 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration