Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

There was a major error during installation! #122

Open
elkrari opened this issue Jun 8, 2017 · 16 comments
Open

There was a major error during installation! #122

elkrari opened this issue Jun 8, 2017 · 16 comments
Assignees
Labels
Milestone

Comments

@elkrari
Copy link

elkrari commented Jun 8, 2017

The error below appears instantly after clicking on "Start Podium installation". Yii 2.012 and PHP 7.0.15

----------------------------------ERROR MESSAGE-----------------------------------------
There was a major error during installation! Check your runtime log for details.

--------------------------------------------LOG-------------------------------------------------
POST http://localhost/myapp/podium/install/import at 2017-06-08 02:03:16 pm by 127.0.0.1

error yii\web\HttpException:404 yii\web\NotFoundHttpException: Page not found. in /var/www/html/myapp/vendor/yiisoft/yii2/web/Request.php:195
Stack trace:
#0 /var/www/html/myapp/vendor/yiisoft/yii2/web/Application.php(82): yii\web\Request->resolve()
#1 /var/www/html/myapp/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(yii\web\Request))
#2 /var/www/html/myapp/index.php(11): yii\base\Application->run()
#3 {main}

@bizley
Copy link
Owner

bizley commented Jun 8, 2017

Does this error pop at the start of installation? Can you show me your config for Podium and for UrlManager?

@elkrari
Copy link
Author

elkrari commented Jun 8, 2017

Yes, instantly after clicking on "Start Podium installation".

Below the configs...
---------Podium Config---------
'podium' => [
'class' => 'bizley\podium\Podium',
'userComponent' => 'user',
'adminId' => 1,
],
---------User Component---------
'user' => [
'identityClass' => 'app\models\User',
//'enableAutoLogin' => true,
'absoluteAuthTimeout' => 86400,
],

---------Url Manager---------
'urlManager' => [
'class' => 'yii\web\UrlManager',
'showScriptName' => false,
'enablePrettyUrl' => true,
'enableStrictParsing' => true,
'rules' => [
/* I have many customized rules */
],
],

@bizley
Copy link
Owner

bizley commented Jun 8, 2017

Actually I'm hoping for this /* I have many customized rules */ part. I'm guessing there might be one of them causing error.

@elkrari
Copy link
Author

elkrari commented Jun 8, 2017

These are the complete rules (some of them are commented):

'rules' => [
'/' => 'site/index',
'login/?' => 'site/login',
'logout/?' => 'site/logout',
'faq/?' => 'site/faq',
'terms/?' => 'site/terms',
'privacy/?' => 'site/privacy',
'account/?' => 'user/view',
'links/?'=>'page/index',
'ptcads/?'=>'advertisement/index',
'fixedads/?'=>'advertisement/fixedads',
'viewads/?'=>'advertisement/viewads',
//'cookad/?'=>'advertisement/cookad',

		        'visit/<ad:\d+>'=>'advertisement/visit',
		        
		        'payment/?<pay:\w*>'=>'user-ecurrency/payment',
		        'executepayment/?'=>'user-ecurrency/executepayment',
		        'cancelpay' => 'user-ecurrency/cancelpay',
		        'deposit' => 'user-ecurrency/deposit',
		        'withdraw' => 'user-ecurrency/withdraw',
				
		        'memberships/?'=>'membership/index',
		        'campaign/?' => 'campaign/index',
		        'clicks/?' => 'clicks/index',
		        'refsflow/?'=>'pack/index',
		        'fundsflow/?'=>'withdrawal/index',
		        'proofs/?'=>'withdrawal/proofs',
		        
				// 'forum/<controller:\w+>/<action:[\w-]+>'=> 'forum/<controller>/<action>',
				// 'forum/<controller:\w+>'=> 'forum/<controller>',
				// 'forum/?' => 'forum',
				'elkrari/?' => 'elkrari',

		        // 'register' => 'site/register',
		        //'<id:\w+>' => 'user/view'
		        '<action:\w+>' => 'user/<action>',
		        '<controller:\w+>/<action:\w+>/' => '<controller>/<action>',
		        '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
		        
		        //'request-password-reset' => 'site/request-password-reset',
		        //'reset-password' => 'site/reset-password',
		    ],

@bizley
Copy link
Owner

bizley commented Jun 8, 2017

It's because of this line:

'<controller:\w+>/<action:\w+>/' => '<controller>/<action>',

When you remove it it works fine. Or you can enter installation screen with route /podium/install/run.

I must modify Podium routing to prevent this error.

@bizley bizley self-assigned this Jun 8, 2017
@bizley bizley added the bug label Jun 8, 2017
@bizley bizley added this to the 0.8 milestone Jun 8, 2017
@elkrari
Copy link
Author

elkrari commented Jun 8, 2017

The route /podium/install/run doesn't work...

Should I comment this rule line to process to installation? The forum will work if I uncomment it later?

@bizley
Copy link
Owner

bizley commented Jun 8, 2017

Oh, this is surprise. I've just made clean installation of basic app 2.0.12 with Podium and it was fine. Are any other addresses like /site/contact working for you? How is your virtual host set?

@elkrari
Copy link
Author

elkrari commented Jun 8, 2017

Yes http://localhost/myapp/site/contact is working

My app is under apache2, which kind of details do you need to know about it?

@bizley
Copy link
Owner

bizley commented Jun 8, 2017

Virtual host setup, either in Apache configuration or .htaccess file.

@elkrari
Copy link
Author

elkrari commented Jun 8, 2017

apache2_conf.txt

.htaccess file:

Options -Indexes

RewriteRule ^([^/]+)/?$ $1


Options +FollowSymLinks
IndexIgnore */*

RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

@bizley
Copy link
Owner

bizley commented Jun 8, 2017

Does the first RewriteRule work at all? Anyway, it looks good in general and I'm not sure why http://localhost/myapp/podium/install/run doesn't work for you. Maybe try again without the previously mentioned UrlManager rule.

@elkrari
Copy link
Author

elkrari commented Jun 8, 2017

Yes, the first rule works. My App is working since many years.

I removed the previously mentioned UrlManager rule, got the same errors, even after removing the three rules

'<action:\w+>' => 'user/<action>',
'<controller:\w+>/<action:\w+>/' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',

@bizley
Copy link
Owner

bizley commented Jun 9, 2017

Can I see your whole config file? Remember to remove personal data.

@elkrari
Copy link
Author

elkrari commented Jun 9, 2017

console_php.txt
web_php.txt

Find attached config files...

@bizley
Copy link
Owner

bizley commented Jun 9, 2017

'enableStrictParsing' => true, is the reason. I must fix this in next release.

@elkrari
Copy link
Author

elkrari commented Jun 9, 2017

OK, now the forum has been installed!
Hope that this parameter will not impact my App.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants