Drupal กับ .htaccess

Install drupal เสร็จ เข้าไปแก้ไข config ของ Theme แล้วมี error ประมาณว่า
* warning: fopen(sites/default/files/.htaccess) [function.fopen]: failed to open stream: Permission denied in /var/www/jack/includes/file.inc on line 129.
* Security warning: Couldn’t write .htaccess file. Please create a .htaccess file in your sites/default/files directory which contains the following lines:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks
ทั้งที่ สร้างไฟล์ .htaccess และให้สิทธิแล้ว แต่ก็ไม่หาย
วิธีแก้คือ ให้เปลี่ยน permission ของ directory files ให้เป็น 777 ซะ

PHP: วิธีกำหนดค่า register_globals

การกำหนดค่า register_globals สามารถทำได้ 2 วิธีคือ กำหนดที่ไฟล์ php.ini หรือที่ไฟล์ .htaccess

วิธีที่ 1: แก้ไขไฟล์ php.ini

  • เปิดไฟล์ c:\WINDOWS\php.ini
  • ค้นหาคำว่า register_globals แล้วกำหนดให้เป็น Off ดังนี้ register_globals=off

วิธีที่ 2: แก้ไขไฟล์ .htaccess

  • สร้างไฟล์ .htaccess ที่ htdocs
  • พิมพ์ php_value register_globals 0