Open elkrari opened 7 years ago
Does this error pop at the start of installation? Can you show me your config for Podium and for UrlManager?
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 /
],
],
Actually I'm hoping for this / I have many customized rules / part. I'm guessing there might be one of them causing error.
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',
],
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.
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?
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?
Yes http://localhost/myapp/site/contact is working
My app is under apache2, which kind of details do you need to know about it?
Virtual host setup, either in Apache configuration or .htaccess file.
.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
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.
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>',
Can I see your whole config file? Remember to remove personal data.
Find attached config files...
'enableStrictParsing' => true,
is the reason. I must fix this in next release.
OK, now the forum has been installed! Hope that this parameter will not impact my App.
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}