vladgh / VladGh.com-LEMP

Latest NginX, MySQL, PHP (with APC and Suhosin)
http://vladgh.com/blog/install-nginx-and-php-php-fpm-mysql-and-apc
Apache License 2.0
160 stars 41 forks source link

sed -e extra characters after command #38

Closed ellisio closed 11 years ago

ellisio commented 11 years ago

Hey,

I was tailing the install log to see what comes through on the PHP install for something I'm working on at work. I noticed this line shoot by during the "Setting up PHP..." bit.

sed: -e expression #1, char 25: extra characters after command

The only two sed commands are right after that echo.

TIMEZONE=$([ -f /etc/timezone ] && cat /etc/timezone | sed "s/\//\\\\\//g")
sed -i "/s^\;date\.timezone.*$/date\.timezone = \"${TIMEZONE}\" /g" /etc/php5/php.ini & progress

However, the error is from -e. Is this error related to either one of these sed calls? I would assume the TIMEZONE one is to blame, but that doesn't have 25 characters in it...

Just thought I'd point this out as I'm not exactly sure where to start debugging this one.

Regards, Andrew

vladgh commented 11 years ago

I suspect this https://github.com/vladgh/VladGh.com-LEMP/blob/master/install_files/php.sh#L45 to be the culprit. According to my tests it should work, unless you use weird characters in the DESTINATION_DIR variable.

Another thing you might check is that your OPTIONS file is Unix LF style. If you use it in DOS CRLF, it will append extra new line characters to the DESTINATION_DIR='/opt' line and throw the aforesaid error.

Let me know if this is the case.

vladgh commented 11 years ago

Any update on this?