標籤:windows 資料庫檔案 考試系統 資料庫系統 線上考試
原運行環境:
作業系統:Windows Server 2003
資料庫系統:MySQL Server 5.0
Web伺服器軟體:Apache2
程式設計語言:PHP
現運行環境:
作業系統:CentOS release 6.8 (Final)
資料庫系統:MySQL Server 5.5.52
Web伺服器軟體:Apache/2.2.15(Unix)
程式設計語言:PHP
遷移步驟:
1.遷移程式:首先把Windows下的考試系統exam檔案夾打成壓縮包,然後上傳到Linux伺服器的Apache下的html目錄下並進行解壓縮;命令:unrar x exam.rar
2.遷移資料庫:先把考試資料庫檔案打成壓縮包,然後上傳到Linux mysql目錄下並解壓縮;
3.找到設定檔修改資料庫口令。
運行測試:
問題1:此檔案不可寫:/var/www/html/exam/cache/label_cache/index_0_0_17_0_0_b9f50.php
解決問題1:[[email protected]]# chmod -R a+w label_cache/
問題2:前台頁面出現亂碼
解決問題2:
[[email protected]]# vi config.php
$webdb[‘admin_url‘]=‘http://117.*.*.*/exam/admin‘; #修改地址
$webdb[‘www_url‘]=‘http://117.*.*.*/exam‘;
問題3:此檔案不可寫:/var/www/html/exam/cache/adminlogin_logs.php
解決問題3:[[email protected]]# chmod -R a+w cache/
問題4:Table ‘qb_config‘ is read only
1036此檔案不可寫:/var/www/html/exam/data/config.php
解決問題4:[[email protected]]# chmod -R a+w data/
問題5:資料庫連接出錯:UPDATEqb_memberdata SETlastvist=‘1497402735‘,lastip=‘182.105.0.143‘,oltime=oltime+‘34‘ WHERE uid=‘1‘ Table ‘qb_memberdata‘ is read only 1036
解決問題5:
[[email protected] mysql]# chown -R mysql:mysql qibosofts
[[email protected] mysql]# service mysqldrestart
問題6:嚴重警告,/var/www/html/exam/upload_files此目錄不可寫,請用FTP修改其屬性為0777可寫,顯示drwxr-xr-x 7 root root 4096 6月 14 08:11 upload_files。
解決問題6:[[email protected] exam]# chmod -R 0777upload_files/
[[email protected] exam]# ll
drwxrwxrwx 7 root root 4096 6月 14 08:11 upload_files
解決所有問題,訪問正常。
本文出自 “sky9890” 部落格,請務必保留此出處http://sky9896.blog.51cto.com/2330653/1936460
線上考試系統從Windows系統遷移到Linux系統的整個過程