If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > File not found

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-10, 14:38
kitaman kitaman is offline
Registered User
 
Join Date: Sep 2009
Location: Ontario
Posts: 526
File not found

I have a php script that runs fine on SCO 6.0.0 with Apache 1.3.37 and PHP version 5.2.3, but on SCO 5.0.7 with Apache 1.3.36 and PHP version 4.4.2
I get a file not found message whenever I try to execute the following.




output of /tmp/r5.log

/usr/lib/apache/htdocs/content/en
total 502
-rwxr-xr-x 1 root sys 298 Mar 11 09:41 r5
-rwxr-xr-x 1 root sys 298 Mar 10 16:42 r5.ksh
*************************************************
PHP Script

<?php
session_start();
include_once("../includes/header.php") ;
?>
<!-- CONTENT GOES AFTER THIS POINT -->
<?php
<!-- lines skipped -->
`pwd >/tmp/r5.log`;
`ls -l /usr/lib/apache/htdocs/content/en >>/tmp/r5.log`;

$output=`/u/web/ksh/r5.ksh $UNIQ $uniq $SORTORDER $DIRECTION NAME="$NAME"`;

<!-- $output=`./r5.ksh $UNIQ $uniq $SORTORDER $DIRECTION NAME="$NAME" REF= -->
<!-- $output=`./r5 $UNIQ $uniq $SORTORDER $DIRECTION NAME="$NAME" REF="$REF"`; ->
echo $output;

?>
<!-- ******************************** -->

*******************************
apache error_log - various versions of output=`.......

sh: ./r5.ksh: not found
sh: r5.ksh: not found
sh: /usr/lib/apache/htdocs/content/en/r5.ksh: not found
sh: content/en/r5.ksh: not found
sh: r5.ksh: not found
sh: ./r5: not found
sh: /u/web/ksh/r5.ksh: not found
~

Last edited by kitaman; 03-11-10 at 14:42.
Reply With Quote
  #2 (permalink)  
Old 03-11-10, 16:10
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,517
I'm just guessing here:

You give us the file permissions for /usr/lib/apache/htdocs/content/en where it shows k5.ksh but the directory you seem to be trying to run the program in is /u/web/ksh/r5.ksh. Do you have permission to run things here?

As an aside is it wise to have 2 variables called uniq (uniq and UNIQ).
__________________
Mike
Reply With Quote
  #3 (permalink)  
Old 03-11-10, 16:30
kitaman kitaman is offline
Registered User
 
Join Date: Sep 2009
Location: Ontario
Posts: 526
Quote:
Originally Posted by mike_bike_kite View Post
I'm just guessing here:

You give us the file permissions for /usr/lib/apache/htdocs/content/en where it shows k5.ksh but the directory you seem to be trying to run the program in is /u/web/ksh/r5.ksh. Do you have permission to run things here?

As an aside is it wise to have 2 variables called uniq (uniq and UNIQ).
I have tried various versions of this line of code, and none seem to work, I am able to read /u/web/ksh.
The commented lines are other attempts.

The rel 6.0 version has r5.ksh in content/en, and is accessed as ./r5.ksh.

UNIQ and uniq are different, the variables are case sensitive.
Reply With Quote
  #4 (permalink)  
Old 03-11-10, 16:51
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,517
Still just guessing:

Quote:
Originally Posted by kiteman
I have tried various versions of this line of code, and none seem to work, I am able to read /u/web/ksh.
This doesn't guarantee the apache can read the file though. Can you show us the permissions on the file you want to run /u/web/ksh/r5.ksh? Does the apache user have permission to read that directory and that file? Something like:
Code:
echo `ls /u/web/ksh`;
echo `head /u/web/ksh/r5.ksh`;
If that works then it might be worth seeing if the apache user can run a noddy ksh script just to check the set up of apache.
Quote:
Originally Posted by kiteman
UNIQ and uniq are different, the variables are case sensitive.
I guess if it looks confusing to me now then it will look confusing to you in 6 months time
__________________
Mike
Reply With Quote
  #5 (permalink)  
Old 03-11-10, 17:04
kitaman kitaman is offline
Registered User
 
Join Date: Sep 2009
Location: Ontario
Posts: 526
Fixed, after 4 hours.
This line works:

$output=`ksh ./r5.ksh $UNIQ............`;

Thanks,

Jack
Reply With Quote
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On