ปกติใช้ code นี้มานาน น่าจะเป็น php 5.2.6 แต่นี่ host ที่ทำตอนนี้เปลี่ยนเป็น php 5.4 เลย error เพียบเลย
ตาม code ด้านล่างนี้ที่ใช้มานาน
ไฟล์ signin.php<?php
ob_start();
session_start();
require_once "../connectdb.php";
$sql = "select * from configwebsite where useradmin = '$_POST[useradmin]' and passadmin = '$_POST[passadmin]'";
$dbquery = mysql_query($sql);
$num_rows = mysql_num_rows($dbquery);
$rowLogin = mysql_fetch_array($dbquery);
if($num_rows == 1){
$_SESSION['useradmin'] = $rowLogin['useradmin'];
echo "<meta http-equiv='refresh' content='0;URL=system.php'>";
}else{
echo "<meta http-equiv='Content-Type' content='text/html; charset=tis-620' />";
echo "<script language='javascript'>alert('invalid username & password');</script>";
echo "<meta http-equiv='refresh' content='0;URL=index.php'>";
}
?>
พอ Login จากฟอร์มมาเจอไฟล์ signin.php จะเจอ Error ด้านล่างนี้
Warning: session_start(): open(/tmp/sess_078a4af92cdaa27de911a3f939e2b2ed, O_RDWR) failed: Permission denied (13) in /home/bestdrea/domains/xxxx.com/public_html/admin/signin.php on line 3
Warning: Unknown: open(/tmp/sess_078a4af92cdaa27de911a3f939e2b2ed, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
ช่วยแนะนำให้ทีครับ ต้องแก้ยังไง
ขอบคุณครับ