Login Form
Posted: Tue Apr 17, 2007 4:12 am
Hi
I am writing a login page using php in linux. I am getting a problem.
Problem Description:
I have C file which checks user name and password & returns value
When I execute C file it gives proper/required output.
I am using the executable of this file in a shell script. My shell script is log_in.sh following is its content.
This Shell script Iam using in login-test.php file. My
login-test.php file content is
When I execute it in command prompt, it gives proper/required output.
But When I run this file in web browser the result is wrong i.e. it is displaying
5
But I want 10 on the browser.
Regards,
Parshuram K.
I am writing a login page using php in linux. I am getting a problem.
Problem Description:
I have C file which checks user name and password & returns value
When I execute C file it gives proper/required output.
I am using the executable of this file in a shell script. My shell script is log_in.sh following is its content.
Code: Select all
[root@locuzhpc Programs]# cat log_in.sh
uname=$1
passwd=$2
/var/www/html/Locuz/Programs/ULogin $uname $passwd
RET=$?
echo $RETlogin-test.php file content is
Code: Select all
[root@locuzhpc PHP]# cat login-test.php
<?php
system("sh /var/www/html/Locuz/Programs/log_in.sh root root123");
#echo "$output\n";
?>When I execute it in command prompt, it gives proper/required output.
Code: Select all
[root@locuzhpc PHP]# php login-test.php
Content-type: text/html
X-Powered-By: PHP/4.3.9
10But When I run this file in web browser the result is wrong i.e. it is displaying
5
But I want 10 on the browser.
Regards,
Parshuram K.