Call shell script from php not run ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Call shell script from php not run ?
# 1  
Old 11-19-2007
Call shell script from php not run ?

Hi.

I write a shell script for import data to oracle using sql loader.

I set permission 755 or 777 for that script. I can run that script in the consol okay.

When I call it from PHP using system command. I got return value 126 this value when don't have permission right ?

I check step by step and dicover this line fail : /home/oracle/app/oracle/product/11.1.0/db_2/bin/sqlldr testing/testing@orcl control=$1 bad=$2 log=$3 discard=$4 data=$5 direct=TRUE.

Can anyone help me. this is urgent. Thanks so much.
# 2  
Old 11-19-2007
I suspect that you have to manage your environment variables from within your script.
Doing that should ease your pain.

Fella's, didn't the forum have a similar issue with a script returning "value 126" for someone else in the past month?
# 3  
Old 11-19-2007
Found it, not quite the same, though similar...

Cron - Not working properly
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

2. Shell Programming and Scripting

php file unable to run shell script with arguments

echo $result=exec("./permit.sh".$_FILES); pls suggest some other method to run shell script in php .:wall::mad: (0 Replies)
Discussion started by: upvan111
0 Replies

3. Shell Programming and Scripting

Dry run php script from shell

Is it possible to dry run a php script without actually executing it? Say I need to test the output of a php file to see if it matches a pattern. I need to run this on all php files on the server. But I fear if there are php files that make modifications, sends out mail etc, that should not happen.... (1 Reply)
Discussion started by: anilcliff
1 Replies

4. Shell Programming and Scripting

call another shell script and pass parameters to that shell script

Hi, I basically have 2 shell scripts. One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system. Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn. ... (2 Replies)
Discussion started by: sunrexstar
2 Replies

5. Shell Programming and Scripting

howto run remotely call function from within script

Hi I have the following script : #!/bin/ksh #################### Function macAddressFinder ######################## macAddressFinder() { `ifconfig -a > ipInterfaces` `cat ipInterfaces` } ####################################################################### # # print... (2 Replies)
Discussion started by: presul
2 Replies

6. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies

7. Shell Programming and Scripting

General Q: how to run/schedule a php script from cron jobs maybe via bash from shell?

Status quo is, within a web application, which is coded completely in php (not by me, I dont know php), I have to fill out several fields, and execute it manually by clicking the "go" button in my browser, several times a day. Thats because: The script itself pulls data (textfiles) from a... (3 Replies)
Discussion started by: lowmaster
3 Replies

8. UNIX for Dummies Questions & Answers

Shell Script to Auto Run PHP Script

Hello All! I am looking to build a monitoring script. The script should always run as a system service of some type and should always check that a PHP script is running. Maybe there is a way to assign a PHP script to a certain PID so that the monitor script that check for the PID in top... (4 Replies)
Discussion started by: elDeuce
4 Replies

9. Shell Programming and Scripting

Cannot run Shell script in PHP

Hello, I have written a code for uploading a file onto the server.The code is as follows: <? if ($_POST == "Upload File") { if( move_uploaded_file ($_FILES ,$target) ) { $tmpsrc = $_FILES ; echo... (2 Replies)
Discussion started by: michrods
2 Replies
Login or Register to Ask a Question