[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] PHP Guru needed
- Subject: Re: [cobalt-users] PHP Guru needed
- From: Richard Kurth <rkurth@xxxxxxxxxxxx>
- Date: Mon Jun 25 05:51:21 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hello Gavin,
Are you running this scripts at the command line or with a web browser
Monday, June 25, 2001, 1:30:14 PM, you wrote:
Gavin Nelmes-Crocker> Hi
Gavin Nelmes-Crocker> I'm developing a pkg for Cobalt RaQ4 that needs a short piece of php to work
Gavin Nelmes-Crocker> basically I need to take info from a form and then use the variables to edit
Gavin Nelmes-Crocker> a config file. I can get the generated line of code to work if I echo to
Gavin Nelmes-Crocker> the screen and then cut and paste that to the command line so I know I'm on
Gavin Nelmes-Crocker> the right track but when I try and send it to the system through php nothing
Gavin Nelmes-Crocker> happens.
Gavin Nelmes-Crocker> Any Help - code below
Gavin Nelmes-Crocker> <?php
Gavin Nelmes-Crocker> #check new passwords are the same and then change password for user
Gavin Nelmes-Crocker> if ($password1==$password2) {
Gavin Nelmes-Crocker> $command1 = "/usr/bin/mysqladmin -u$user_name -p$old_passwd password
Gavin Nelmes-Crocker> $password1 ";
Gavin Nelmes-Crocker> system($command1);
Gavin Nelmes-Crocker> system("exit(0)");
Gavin Nelmes-Crocker> #$location= "home/sites/home/web/phpMyAdmin";
Gavin Nelmes-Crocker> #$command2 = "/bin/sed '/$old_passwd/s/$old_passwd/$password1/w gavin'
Gavin Nelmes-Crocker> /$location/config.inc.php.master ";
Gavin Nelmes-Crocker> #system($command2);
Gavin Nelmes-Crocker> #system("exit (0)");
Gavin Nelmes-Crocker> }
Gavin Nelmes-Crocker> header ("Location: ");
?>>
Gavin Nelmes-Crocker> The commented out lines are the ones i can't get to work.
Gavin Nelmes-Crocker> Please contact me off list if you have the answer.
Gavin Nelmes-Crocker> Thanks
Gavin Nelmes-Crocker> Gavin
Gavin Nelmes-Crocker> gavin@xxxxxxxxxx
Gavin Nelmes-Crocker> ps I know it looks silly someone from cobalt asking a question like this but
Gavin Nelmes-Crocker> I'm doing this myself.
Gavin Nelmes-Crocker> _______________________________________________
Gavin Nelmes-Crocker> cobalt-users mailing list
Gavin Nelmes-Crocker> cobalt-users@xxxxxxxxxxxxxxx
Gavin Nelmes-Crocker> To Subscribe or Unsubscribe, please go to:
Gavin Nelmes-Crocker> http://list.cobalt.com/mailman/listinfo/cobalt-users
--
Best regards,
Richard
mailto:rkurth@xxxxxxxxxxxx