Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help w/ exec();

Status
Not open for further replies.

admoore

IS-IT--Management
Joined
May 17, 2002
Messages
224
Location
US
I have a bash script which calls several awk routines that prepare certain data for input into a MySQL database.

I am attempting to automate the process using PHP and the exec(); function; but, so far, I can't get PHP to execute the bash script. I am only guessing here but perhaps it is an ownership issue? The file executes fine from command line- is executable and ownership is set to 'nobody'.

TIA for any suggestions, I am a little lost here...

-Allen
 
FWIW, I am generating the following errors:
Code:
Arrayrm: cannot unlink `/usr/local/httpd/htdocs/lost_calls/import/fixed_list.txt': Permission denied
touch: creating `/samba_share/lost_data_import/fixed_list.txt': Permission denied
/usr/local/httpd/htdocs/lost_calls/awk_bash/fix_files.bash: /samba_share/lost_data_import/fixed_list.txt: Permission denied
/usr/local/httpd/htdocs/lost_calls/awk_bash/fix_files.bash: /samba_share/lost_data_import/fixed_list.txt: Permission denied

Again thanks for any suggestions

-A
 
It sounds like a permission problem to me.

How are you running the PHP script? Via a web server? From the command-line?



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top