Sponsored Content
Top Forums Shell Programming and Scripting Cannot run Shell script in PHP Post 302165592 by sysgate on Friday 8th of February 2008 08:54:41 AM
Old 02-08-2008
I don't use php, I'm relying on perl instead, but what is the error message, and which line is problematical ? The one in red ? Can't you put some error reporting message and see what the problem is ?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Run a shell script from Perl script in Parent shell?

Hi Perl/UNIX experts, I have a problem in running a shell script from my perl script (auto.pl). I run the perl script using perl auto.pl from the shell prompt The shell script picks the files in "input" folder and procesess it. The shell script blue.sh has this code. export... (16 Replies)
Discussion started by: hifake
16 Replies

2. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: raccsdl
2 Replies

3. 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

4. Shell Programming and Scripting

Help need to make a shell script run for ffmpeg vhook watermaking in shell

i have a small problem getting a batxh shell script to run in shell this is the code the problem seems to be centered around the ffmpeg command, something maybe to do with the ' ' wrapping around the vhook part command this is a strange problem , if i take the ffmpeg command and... (1 Reply)
Discussion started by: wingchun22
1 Replies

5. 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

6. 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

7. Shell Programming and Scripting

Request to check run php in Unix shell

Hi I m running a php file in Unix shell it says php cpmmnad not found bash-3.2$ cat echo.php <? php echo"heelo world" >? bash-3.2$ php echo.php bash: php: command not found actually I want to change certain thing a in a website using php script so I m beginner and trying... (6 Replies)
Discussion started by: manigrover
6 Replies

8. 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

9. 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
FTP_FPUT(3)								 1							       FTP_FPUT(3)

ftp_fput - Uploads from an open file to the FTP server

SYNOPSIS
bool ftp_fput (resource $ftp_stream, string $remote_file, resource $handle, int $mode, [int $startpos]) DESCRIPTION
ftp_fput(3) uploads the data from a file pointer to a remote file on the FTP server. PARAMETERS
o $ftp_stream - The link identifier of the FTP connection. o $remote_file - The remote file path. o $handle - An open file pointer on the local file. Reading stops at end of file. o $mode - The transfer mode. Must be either FTP_ASCII or FTP_BINARY. o $startpos -The position in the remote file to start uploading to. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 ftp_fput(3) example <?php // open some file for reading $file = 'somefile.txt'; $fp = fopen($file, 'r'); // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // try to upload $file if (ftp_fput($conn_id, $file, $fp, FTP_ASCII)) { echo "Successfully uploaded $file "; } else { echo "There was a problem while uploading $file "; } // close the connection and the file handler ftp_close($conn_id); fclose($fp); ?> SEE ALSO
ftp_put(3), ftp_nb_fput(3), ftp_nb_put(3). PHP Documentation Group FTP_FPUT(3)
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy