[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] PHP Guru needed



Hi

I'm developing a pkg for Cobalt RaQ4 that needs a short piece of php to work
basically I need to take info from a form and then use the variables to edit
a config file.  I can get the generated line of code to work if I echo to
the screen and then cut and paste that to the command line so I know I'm on
the right track but when I try and send it to the system through php nothing
happens.

Any Help - code below

<?php

#check new passwords are the same and then change password for user
if ($password1==$password2) {
$command1 = "/usr/bin/mysqladmin -u$user_name -p$old_passwd password
$password1 ";
system($command1);
system("exit(0)");
#$location= "home/sites/home/web/phpMyAdmin";
#$command2 = "/bin/sed '/$old_passwd/s/$old_passwd/$password1/w gavin'
/$location/config.inc.php.master ";
#system($command2);
#system("exit (0)");
}
header ("Location: ");
?>

The commented out lines are the ones i can't get to work.

Please contact me off list if you have the answer.

Thanks

Gavin
gavin@xxxxxxxxxx

ps I know it looks silly someone from cobalt asking a question like this but
I'm doing this myself.