EDIT : the pbm is not that I used space in the password after all, so I changed the description
While trying to configure xampp, I ran into an error : fatal: unknown configuration directive 'function' on line 44 of '/opt/lampp/etc/proftpd.conf'
- first, I downloaded and installed xampp
- then, I ran the command
sudo lampp restart
and it worked - third, I ran
sudo lampp security
, and I created some passwords - I tried the command
sudo lampp restart
again, but this time i got the error message
the file in /opt/lampp/etc/proftpd.conf
:
40 # daemon gets the password "xampp"
41 # commented out by xampp security
42 #UserPassword daemon 2TgxE8g184G9c
43 UserPassword daemon <?
44 function make_seed() {
45 list($usec, $sec) = explode(' ', microtime());
46 return (float) $sec + ((float) $usec * 100000);
47 }
48 srand(make_seed());
49 $random=rand();
50 $chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./";
51 $salt=substr($chars,$random % 64,1).substr($chars,($random/64)%64,1);
52 $pass=$argv[1];
53 $crypted = crypt($pass,$salt);
54 echo $crypted."
55 ";
56 ?>
if I comment all these lines, xampp starts and I can go to the web page localhost/phpmyadmin/, and there I wanted to change my password for a new one without single quotes, but it says I’m not allowed :
MySQL said: Documentation
#1131 - You are using MariaDB as an anonymous user and anonymous users are not allowed to modify user settings
also, my password is in clear in this file /opt/lampp/phpmyadmin :
38 /**
39 * phpMyAdmin configuration storage settings.
40 */
41
42 /* User used to manipulate with storage */
43 // $cfg['Servers'][$i]['controlhost'] = '';
44 // $cfg['Servers'][$i]['controlport'] = '';
45 $cfg['Servers'][$i]['controluser'] = 'pma';
46 # commented out by xampp security
47 #$cfg['Servers'][$i]['controlpass'] = '';
48 $cfg['Servers'][$i]['controlpass'] = 'password_here';
I don’t know how to solve that.
I tried uninstalling everything and start all over again, but it didn’t fix it (I did it so i was certain of what I did).
2
Answers
I changed the "proftpd.conf" file with the following code:
what you actualy did for
sudo lampp security
it just generating this below little boilerplate about hash and salt, that passed in$LAMP_DIR/etc/proftpd.conf
that’s fine. just because your xampp php not compiled hash automaticaly to you, you can move for next step by adding
php
keyword afterUserPassword $ftpuser <?
kind like below:dont forget in
$pass=$argv[1];
just change with$pass="your password here";
then run them with your php interpreter
/opt/lampp/bin/php /opt/lampp/etc/proftpd.conf
and viola
you’ve got your new passwd
UserPassword $ftpuser dAN1WkV7r2TsU
or you can just assign plain password with
UserPassword $ftpuser "plain_pw_here"