LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 07:54 PM   #1
gw1500se
Member
 
Registered: Mar 2004
Distribution: Mandriva 2010.0
Posts: 251

Rep: Reputation: 31
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, 02:02 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
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, 08:43 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,426

Rep: Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786
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 11:44 AM
Can you have "sudo" automatically added to each line in the CLI? Free_beer Ubuntu 7 09-29-2006 04:59 PM
php send email parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expect jamesjoy Programming 7 12-06-2005 05:33 PM
php <core dump>!!! shadow_wwp Programming 0 08-27-2004 03:58 AM
PHP Dump agallant Programming 3 06-27-2004 09:07 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:55 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