Ticket #1873 (closed defect: fixed)

Opened 13 months ago

Last modified 2 months ago

Ctrl\M in genereated .htacess

Reported by: Purodha Owned by: aoneil
Priority: critical Milestone: 2.3.0-rc1*
Component: CMS - Installer Version:
Severity: medium effort / impact Keywords: easy
Cc: Hours:

Description

The .htaccess file generated under debian GNU/Linux with the cgi version of php 5.2.5 contains several carriage return characters at line ends. While this may be fine for windows, it is usually not for *nix systems. Note: some lines do not have them. They appear as "^M" (without quotes) in my editor, vim. Here is a copy taken from my vim screen when it opened the .htaccess created with silverstripe-v2.1.1 freshly downloaded an hour ago:

### SILVERSTRIPE START ###

RewriteEngine On^M

^M


RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ ^M

^M

Rewrite!Cond %{REQUEST_URI} ^(.*)$^M

RewriteCond %{REQUEST_FILENAME} !-f^M

RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]

### SILVERSTRIPE END ###

Change History

Changed 10 months ago by sminnee

  • keywords easy added

I expect that this is because of line endings in the install.php file.

Changed 10 months ago by sminnee

  • priority changed from critical to medium
  • milestone set to 2.2.3 feature-lock

Changed 9 months ago by simon_w

This could probably be fixed by running all PHP files in the tarballs through dos2unix

Changed 2 months ago by ischommer

  • priority changed from medium to critical
  • milestone 2.2.3* deleted

Changed 2 months ago by sminnee

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 2.3.0

Batch-executed dos2unix on all PHP files, and commited the changes in r63112, r63113, r63114, r63115, r63116

That should fix this.

Note: See TracTickets for help on using tickets.