2

Zencart网站迁移后,需要改动的配置文件

Posted by 晴云孤魂 on 2012 年 03 月 11 日 in Program Development, web development |

1.提示连接数据库失败.(首先确认数据库名/用户名/密码/连接地址是否正确)

修改2个configure.php中的数据库配置(地址/用户/密码)

/home/ctoserver/public_html/includes/configure.php

/home/ctoserver/public_html/admin/includes/configure.php

同时修改configure.php的权限:chmod 444 configure.php

如:

// define our database connection
define(‘DB_TYPE’, ‘mysql’);
define(‘DB_PREFIX’, ”);
define(‘DB_SERVER’, ‘localhost’); –数据库连接地址,一般均为localhost
define(‘DB_SERVER_USERNAME’, ‘ctoserver’); –数据库用户名
define(‘DB_SERVER_PASSWORD’, ‘test’); –数据库密码
define(‘DB_DATABASE’, ‘ctoserver’); –数据库名
define(‘USE_PCONNECT’, ‘false’);
define(‘STORE_SESSIONS’, ‘db’);

2,修改了数据库连接之后(确认正确无误),访问的时候跳转到安装提示页面.

修改2个configure.php的网站程序存放相对路径:

如:(注意:public_html必须要带/ ,如…./public_html/,否则报500错误等….)

/home/ctoserver/public_html/includes/configure.php

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define(‘DIR_FS_CATALOG’, ‘/home/ctoserver/public_html/’);

// ie: /path/to/your/webspace/public_html/zen/cache — leave no trailing slash
define(‘SQL_CACHE_METHOD’, ‘none’);
define(‘DIR_FS_SQL_CACHE’, ‘/home/ctoserver/public_html/cache’);

/home/ctoserver/public_html/admin/includes/configure.php
// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define(‘DIR_FS_ADMIN’, ‘/home/ctoserver/public_html/admin/’);
define(‘DIR_FS_CATALOG’, ‘/home/ctoserver/public_html/’);

// ie: /path/to/your/webspace/public_html/zen/cache — leave no trailing slash
define(‘SQL_CACHE_METHOD’, ‘none’);
define(‘DIR_FS_SQL_CACHE’, ‘/home/ctoserver/public_html/cache’);

如果以上2样都修改了,还是有报500错..或者其他,则需检查几个配置文件:index.php、.htaccess、configure.php 。

一般可以通过查阅apache error日志,分析问题所在。

标签:

2 Comments

发表评论

电子邮件地址不会被公开。 必填项已用*标注

使用腾讯微博登陆

Copyright © 2011-2017 晴云孤魂's Blog All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.2.2, from BuyNowShop.com.

普人特福的博客cnzz&51la for wordpress,cnzz for wordpress,51la for wordpress