keneso
keneso

Reputation: 311

transfer yii site to new server

Premise: I am not a coder.

I would like to move my site which has been made using yii (not by me) to another host. Before going on with the domain transfer I want to make sure it'll work fine, so I made a copy of all directories and files, I first tried to test it on my local pc (wamp environment), and all I get is the list of directories and files, thinking the problem was with my setup I uploaded all in a subdirectory on live site, and here again all I get is the list of directories and files.

I created a database, and imported the database, and then edited ../common/config/main-local.php like this:

'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=newdb',
'username' => 'newdb_username',
'password' => 'new_db_psw',
'charset' => 'utf8',
],

In the requirements.php these are the warnings:

PDO SQLite extension Warning All DB-related classes Required for SQLite database. PDO PostgreSQL extension Warning All DB-related classes Required for PostgreSQL database. Memcache extension Warning MemCache APC extension Warning ApcCache Expose PHP Warning Security reasons "expose_php" should be disabled at php.ini

What am I missing, what else do I need to change?

Thank you

=========

EDIT 10 sep 2015

I had to go back to php 5.4.32 as 5.5.18 created problems with the main site.

New error log:

[09-Sep-2015 22:51:24 Europe/London] 32767
[09-Sep-2015 22:51:24 Europe/London] PHP Fatal error: Uncaught exception 'yii\base\InvalidParamException' with message 'The directory does not exist: /var/chroot/home/content/20/5481254/html/frontend/' in /home/user4563/public_html/prova/vendor/yiisoft/yii2/base/Module.php:224
Stack trace:
#0 /home/user4563/public_html/prova/vendor/yiisoft/yii2/base/Application.php(358): yii\base\Module->setBasePath('/var/chroot/hom...')
#1 /home/user4563/public_html/prova/vendor/yiisoft/yii2/base/Application.php(223): yii\base\Application->setBasePath('/var/chroot/hom...')
#2 /home/user4563/public_html/prova/vendor/yiisoft/yii2/base/Application.php(202): yii\base\Application->preInit(Array)
#3 /home/user4563/public_html/prova/frontend/web/index.php(29): yii\base\Application->__construct(Array)
#4 {main}
thrown in /home/user4563/public_html/prova/vendor/yiisoft/yii2/base/Module.php on line 224

I guess I need to edit some path somewhere, but where??

Upvotes: 1

Views: 2250

Answers (1)

devOp
devOp

Reputation: 3170

As long you don't use PDO SQLite, PDO PostgreSQL, Memcache and APCcache in your yii application this should not be a problem. "What you don't use you don't need". You use mysql and for mysql there's no warning so there's no db issue.

The only thing you should do is to disable "expose_php" in the php.ini

EDIT: Also remember that yii2 needs at least php 5.4. See the documentation at http://www.yiiframework.com/doc-2.0/guide-intro-yii.html#requirements-and-prerequisites

Upvotes: 0

Related Questions