[PHP-DB] suexec

2003-08-20 Thread Suman Aluru

could any body hlep me in this.

how to run a shell script with suexec in php.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] mount command with php in through the web

2003-08-14 Thread Suman Aluru

Hi All,
  is there any way i can run mount command with php script in the web , bcz. 
mount command run only for super user as apache user is there any way to run.
plz. help me in this regard.

Thank You,
Suman


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] hi (php-SSH)

2003-07-29 Thread Suman Aluru
could somebody tell me howto Generate the SSH key file to connect SSH
without password from php

Suman  R Aluru
-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 28, 2003 11:19 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] hi (php-SSH)


Suman Aluru wrote:

hi ,
  is there any way to write a PHP program for SSH.
I want to establish a SSH connection and work some commands in the remote
system and close the connection.


Yes, just do this (uses an SSH key file):

?php
echo Executing remote command...br /;
echo `ssh -i /path/to/key/file [EMAIL PROTECTED] ls /tmp`;
echo Done executing remote command.br /;
?

Use an SSH key file so you won't have to provide a password. I do this
all the time for system administration, works great for inter-host
communication.

--Dave


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] hi (php-SSH)

2003-07-28 Thread Suman Aluru
hi ,
  is there any way to write a PHP program for SSH.
I want to establish a SSH connection and work some commands in the remote 
system and close the connection.

Thank You.

-- 
Suman R Aluru
System Administrator
Bacterial Barcodes Inc.
8080 N.Stadium Dr.
Houston TX-77054
713.467.8500 (Off.)
832.643.9501 (Cell)

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] php doubt

2002-08-26 Thread suman

hi
i am working with php on a postgres server .so i have some doubt's.
my project is a student information management system on an apache web server 
using php and postgres as backend
my doubts are
1.i wanna insert a timestamp type into db and php doesn't have such a type so 
i use int for timestamp.is there ne better wayz 2 do this

2.i wanna store some photographs in a db.so is it better 2 
a)store the whole photograph as a large object in a db or
b)to store just the file names in db and have the photographs in a dir on the 
server.
i think b is better in terms of efficiency but i still have a doubt.
which is better?

3.are ther ne session management scripts avilable ?if so plz give me the 
pointers.i use phplib and it causes a lot of headache.
plz provide some pointers

thanks in advance

bye
suman

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] problem with login script

2002-06-13 Thread suman

hi
adding the ? ?in func.php still returns this.

my functions script is
-function 
auuser($login,$passwd)
{
global $db_server,$http_host,$db,$db_user,$db_pass,$doc_root;
   if(!( $connect=pg_pconnect(host=$db_server  dbname=$db user=$db_user 
password=$db_pass))
   {
Displayerrmsg(sprintf(internal error 
%s\n,pg_ErrorMessage($connect));
return 0;
}

$query=select passwd from login where usr='$login';
$result=pg_exec($connect,$query) or die(ERROR IN 
QUERY:$query.pg_last_error($connect) );
if (!$result)
{
Displayerrmsg(sprintf(internal error 
%s\n,pg_ErrorMessage($connect));
return 0;
}
if( ($arr=pg_fetch_array($result,0,PGSQL_BOTH))  
($passwd==$arr[passwd]  $passwd!=) )
return 1;
else
return 0;
}
-
my login.php file is
?include 'functions.php';
$user=$_POST['login'];
$passwd=$_POST['passwd'];
$result=auuser($user,$passwd);
if(!$result)
{
setcookie(cookie_passwd,$passwd);
setcookie(cookie_user,$user);
.
.
}
--
when i run these i get this error
Parse error: parse error, unexpected ';' in 
/usr/local/apache/htdocs/sims/php/functions.php on line 12

Fatal error: Call to undefined function: auuser() in 
/usr/local/apache/htdocs/sims/php/login1.php on line 8

what is the prob

suman



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] problem with login script

2002-06-12 Thread suman

hi
when i execute this script i an error
---function 

this func is in file functions.php and the func deletecookies();

auuser($login,$passwd)
{
global $db_server,$http_host,$db,$db_user,$db_pass,$doc_root;

$connect=pg_pconnect(host=$db_server  dbname=$db user=$db_user 
password=$db_pass);
if(!$connect)
{
Displayerrmsg(sprintf(internal error 
%s\n,pg_ErrorMessage($connect));
return 0;
}

$query=select passwd from login where usr='$login';
$result=pg_exec($connect,$query) or die(ERROR IN 
QUERY:$query.pg_last_error($connect) );
if (!$result)
{
Displayerrmsg(sprintf(internal error 
%s\n,pg_ErrorMessage($connect));
return 0;
}
if( ($arr=pg_fetch_array($result,0,PGSQL_BOTH))  
($passwd==$arr[passwd]  $passwd!=) )
return 1;
else
return 0;
}

this is the file login.php

?
require 'functions.php';

//deletecookies();

$user=$_POST['login'];
$passwd=$_POST['passwd'];
$result=auuser($user,$passwd);
if(!$result)
{
setcookie(cookie_passwd,$passwd);
setcookie(cookie_user,$user);
header(Location :http://$http_host/$doc_root/stuinfo.html;);
exit();
}
else
{
header(Location:http://$http_host/$doc_root/login.html;);
exit();
}
   
 
---
i get this error


function auuser($login,$passwd) { global 
$db_server,$http_host,$db,$db_user,$db_pass,$doc_root;  return 0; } if( 
($arr=pg_fetch_array($result,0,PGSQL_BOTH))  ($passwd==$arr[passwd]  
$passwd!=) ) return 1; else return 0; } function Dispalyerrmsg ( $message ) 
{ printf(
.
.
.
the same func
.
%s
\n,$message); } function deletecookies() { setcookie(cookie_user,); }
Fatal error: Call to undefined function: auuser() in 
/usr/local/apache/htdocs/sims/php/login1.php on line 35

plz help me.soprry for ong mail

bye
suman


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] problem with a small script

2002-06-10 Thread suman

hi
i can't understand whats missing here.thou i knew this ques is asked many 
times i couldn't find an ans for it.

-
  form method=get  action=stuinfo.php
  firstname:
input type=text name=fname size=15

this is te html scrript

and the php code is 

?

$fname=$_GET['fname'];
echo $fname;
?
---
but on executing this i get a blank page
what might be the error

suman


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php