- 論壇徽章:
- 0
|
打算將動易網站管理系統(tǒng)移植到PHP環(huán)境中,尋尋覓覓了很多PHP內容管理網站,發(fā)現(xiàn)網上有動易轉PHPCMS的代碼,所以就拿定注意用PHPCMS的在google上找到一轉換程序,動手做來還成功了,現(xiàn)將此次轉換的經驗與教訓總結如下:
1.在http://www.otand.com/html/php/cms/20080605/2852.html下載完美動易2006 Sp6 SiteWeaver CMS6.5 Access MSSQL轉 PHPCMS 2007 SP6程序解壓縮備用,請不要下載PHPCMS官網的轉換程序,因其有很多錯誤,還是完美的好。
2.先在windows下調試,求方便直接下載的PHPCMS集成包, http://soft.phpcms.cn/2008/0116/soft_138.html,一鍵安裝后直接可以用。
(后在linux下證實,直接將MYSQL數(shù)據(jù)庫復制過去是可行的)
將完美轉換程序解壓后,找到里面的config.php,因我以前用的是ACCESS數(shù)據(jù)庫,所以這里將ACCESS以外的MSSQL全部注釋掉,例如:
// 訪問 訪問數(shù)據(jù)庫類型 數(shù)據(jù)庫類型支持Access,MsSQL 請選擇數(shù)據(jù)庫類型并認真填寫下列信息
$_CONFIG['db_type'] = 'Access';
//$_CONFIG['db_type'] = 'MsSQL';
// 訪問 MsSQL 的主機名,如果是本機為localhost
//$_CONFIG['db_sql_host'] = 'localhost';
// 訪問 MsSQL 的數(shù)據(jù)庫名
//$_CONFIG['db_sql_name'] = 'powereasy';
// 訪問 MsSQL 的用戶名
//$_CONFIG['db_sql_user'] = 'powereasy';
// 訪問 MsSQL 的密碼
//$_CONFIG['db_sql_pass'] = 'powereasy5598';
//是否使用持久連接
//$_CONFIG['db_pconnect'] = '1';
然后將ACCESS數(shù)據(jù)庫放在D盤根目錄下,例如:
// 訪問 access 數(shù)據(jù)庫文件名,絕對地址: D:\改成D:/
$_CONFIG['access_mdb'] = 'd:/danweishujuku.mdb';
//紅字地方是自己數(shù)據(jù)庫名稱
// 訪問 access 數(shù)據(jù)庫文件的用戶名,一般默認為空
$_CONFIG['access_uid'] = '';
// 訪問 access 數(shù)據(jù)庫文件的密碼,一般默認為空
$_CONFIG['access_pwd'] = '';
// PE 數(shù)據(jù)表前綴 一般不需要修改
$_CONFIG['access_tablepre'] = 'PE_';
// 每次需要轉換的數(shù)據(jù)量,如果您的服務器比較慢,請將這個值調小
$CONFIG['rpp'] = '1000';
?>
僅僅更改這兩項。
然后將整個解壓后的包放在網站根目錄下,我這里是phproot所以直接放PHProot下即可。
比較笨的我,剛開始是這么做的,人家readme上是這么寫的“將本程序解壓到PHPCMS根目錄”我呢,沒有把一整包放在根目錄下,而是把一堆文件拷到了PHPROOT下,這樣肯定會覆蓋原有的INDEX.PHP啊,我又把原index.php做了個備份,然后運行之,然后會有錯誤提示若干:
Warning: include_once(../include/common.inc.php) [function.include-once]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\index.php on line 14
Warning: include_once() [function.include]: Failed opening '../include/common.inc.php' for inclusion (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\index.php on line 14
Warning: include_once(PHPCMS_ROOT/config.inc.php) [function.include-once]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\index.php on line 15
Warning: include_once() [function.include]: Failed opening 'PHPCMS_ROOT/config.inc.php' for inclusion (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\index.php on line 15
Warning: include_once(PHPCMS_ROOT/include/cache.func.php) [function.include-once]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\index.php on line 16
Warning: include_once() [function.include]: Failed opening 'PHPCMS_ROOT/include/cache.func.php' for inclusion (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\index.php on line 16
Warning: include_once(PHPCMS_ROOT/admin/include/global.func.php) [function.include-once]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\index.php on line 17
Warning: include_once() [function.include]: Failed opening 'PHPCMS_ROOT/admin/include/global.func.php' for inclusion (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\index.php on line 17
Access Denied
這些東西說明找不到某個文件,看了轉換程序的index.php原來在這里
第14行的include_once(PHPCMS."/include/common.inc.php");
而PHPCMS.的定義是“..”這樣的話直接就出了phproot這個目錄了,所以會提示找不到文件
有兩個方法可以解決:
1:將index.php文件的include_once(PHPCMS."/include/common.inc.php");的(PHPCMS."/include/common.inc.php");改為include_once("include/common.inc.php");
然后再運行http://127.0.0.1/index.php
2:解壓轉換程序后更改config.php文件,然后將整個包拷到網站根目錄下例如:
http://127.0.0.1/完美動易2006 Sp6 SW6.5 Access MSSQL轉 PHPCMS 2007 SP6 /index.php
第二種是最簡單的,定義好自己數(shù)據(jù)庫后運行下即可,省去了尋找問題的時間。
轉換完后登陸后臺,此時切記切記要更新全部緩存否則當管理頻道--重建目錄時會提示如下錯誤:
Warning: require(D:/PC_webserver/phproot/languages//phpcms.lang.php) [function.require]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\include\common.inc.php on line 28
Fatal error: require() [function.require]: Failed opening required 'D:/PC_webserver/phproot/languages//phpcms.lang.php' (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\include\common.inc.php on line 28
非常要命的錯誤。。。!出現(xiàn)后刷新頁面整個后臺都無法登陸了。。
刷新后的錯誤提示:
Warning: require(D:/PC_webserver/phproot/languages//phpcms.lang.php) [function.require]: failed to open stream: No such file or directory in D:\PC_webserver\phproot\include\common.inc.php on line 28
Fatal error: require() [function.require]: Failed opening required 'D:/PC_webserver/phproot/languages//phpcms.lang.php' (include_path='.;C:\php5\pear') in D:\PC_webserver\phproot\include\common.inc.php on line 28
此時只有重新安裝PHPCMS了!
再強調一下:轉換完后登陸后臺首先是更新緩存。。。! jinscan 2008.11.17
jinscan 2008.11.19翻看自己帖子時發(fā)現(xiàn)有一小小錯誤,稍作更改,不好意思。
[ 本帖最后由 jinscan 于 2008-11-19 08:10 編輯 ] |
評分
-
查看全部評分
|