Cannot start FOP's server

After modify the FOP password in amportal.conf, when i go to restart amportal , its shows the following errors and it could not start op_server.pl…what would be the problem and how can i resolve it. I’m using Elastix 1.5.

[root@elastix ~]# amportal restart

: command not found line 4:
: command not found line 7:
: command not found line 10:
: command not found line 13:
: command not found line 16:
: command not found line 19:
: command not found line 22:
: command not found line 25:
: command not found line 28:
: command not found line 31:
: command not found line 34:
: command not found line 36:
: command not found line 37:
: command not found line 41:
: command not found line 44:
: command not found line 47:
: command not found line 50:
: command not found line 55:
: command not found line 61:
: command not found line 65:
: command not found line 70:
: command not found line 75:
: command not found line 91:
: command not found line 103:
: command not found line 113:
: command not found line 117:
: command not found line 122:
: command not found line 130:
: command not found line 133:
: command not found line 140:
: command not found line 150:
: command not found line 153:
: command not found line 156:
: command not found line 159:
: command not found line 164:
: command not found line 173:
: command not found line 178:
: command not found line 186:
: command not found line 189:
: command not found line 197:
: command not found line 198:
: command not found line 203:
: command not found line 207:
: command not found line 209:
: command not found line 217:

: command not found line 4:
: command not found line 7:
: command not found line 10:
: command not found line 13:
: command not found line 16:
: command not found line 19:
: command not found line 22:
: command not found line 25:
: command not found line 28:
: command not found line 31:
: command not found line 34:
: command not found line 36:
: command not found line 37:
: command not found line 41:
: command not found line 44:
: command not found line 47:
: command not found line 50:
: command not found line 55:
: command not found line 61:
: command not found line 65:
: command not found line 70:
: command not found line 75:
: command not found line 91:
: command not found line 103:
: command not found line 113:
: command not found line 117:
: command not found line 122:
: command not found line 130:
: command not found line 133:
: command not found line 140:
: command not found line 150:
: command not found line 153:
: command not found line 156:
: command not found line 159:
: command not found line 164:
: command not found line 173:
: command not found line 178:
: command not found line 186:
: command not found line 189:
: command not found line 197:
: command not found line 198:
: command not found line 203:
: command not found line 207:
: command not found line 209:
: command not found line 217:

STOPPING ASTERISK
Asterisk Stopped

STOPPING FOP SERVER
SETTING FILE PERMISSIONS
chown: cannot access /var/lib/asterisk\r': No such file or directory chmod: cannot access/var/lib/asterisk\r’: No such file or directory
chown: cannot access /var/log/asterisk\r': No such file or directory chmod: cannot access/var/log/asterisk\r’: No such file or directory
chown: cannot access /var/spool/asterisk\r': No such file or directory chmod: cannot access/var/spool/asterisk\r’: No such file or directory
chown: cannot access /var/www/html\r/admin': No such file or directory chmod: cannot access/var/www/html\r/admin’: No such file or directory
chown: cannot access /var/www/html/panel\r': No such file or directory chmod: cannot access/var/www/html/panel\r’: No such file or directory
chmod: cannot access /var/lib/asterisk\r/bin/*': No such file or directory chown: cannot access/var/lib/asterisk\r/bin/’: No such file or directory
chown: cannot access /var/lib/asterisk/bin\r/*': No such file or directory chmod: cannot access/var/lib/asterisk/agi-bin\r/
’: No such file or directory
chmod: cannot access /var/lib/asterisk/bin\r/bounce_op.sh': No such file or directory chmod: cannot access/var/www/html/panel\r/*.pl’: No such file or directory
chmod: cannot access `/var/www/html/panel\r/safe_opserver’: No such file or directory
Permissions OK

STARTING ASTERISK
Asterisk Started

STARTING FOP SERVER
usage: kill [ -s signal | -p ] [ -a ] pid …
kill -l [ signal ]


The FOP’s server (op_server.pl) could not start!
Please correct this problem

how did you modify the file? It looks like you downloaded the file to a windows system, edited it in windows editor and then uploaded it again. Windows text formatting is different from Unix/Linux (Windows puts CR LF at the end of each line and Linux only does LF). That is why it’s complaining about the directories. Note the addition of the \r at the end of all of the directory lines.

You would be much better off (and safer) using one of the editors on the system. vi, nano, jed, etc…

Thank you very much Fskrotzki. You identified the right problem. Now i removed the meta-character from amportal.conf and my FOP server is running properly.