Running Yii 1.1.16 website and having problems

Hello to everyone reading this message. I am originally an ASP.net developer, but recently I have started to do PHP and I like it so far.
I have a website for a client that is running Yii 1.1.16 on a previous server, and now they asked me to host it on a new server, it is a Shopping Cart (not a well-known brand), most of the website pages are running ok, there is a good connection to the dB, but some functions not performing, such as when Adding new user in Admin page where the application needs to send email, the error SMTP error could not authenticate. object(CExceptionEvent)#

The page will ask me to exit or wait

So mainly there is something wrong with SMTP connection, even though I have checked …/protected/Config/local.php and all mail info are correct

I also uploaded the dB completely, no tables are missing, but the application keeps saying there is table missing such as tbl_Notification.

If you can guide me on how to read the error log from the server, and also any possible SMTP error reasons, I have checked the forum topics but no use.

Thank you in advance.
Luai

Hello, first of all

  • are you sure, that SMTP is working correctly, can you test it from other source than your yii app?
  • double check, that all the db tables really exists (in some kind of adminer)

When that’s all right, if it’s possible, you can just use var_dump($config) with die() or anything similar on $config after the final version of $config is composed and before it’s used in the app. Then double check your response from var_dump for SMTP params and also DB connection params.

You can also try to delete db cache (Yii::app()->db->schema->refresh(); or with console command) and/or other caches of the app and see if it helps.

Thank you for your quick response, I will do all this and hope it work

Hi,
I hope you can still help.
I tried all possible modifications, it seems there is SMTP host connection problem. The web application is working fine except there is an error when sending an email. Can I upgrade from yii 1.1.16 to the newest version and save time? if yes how can I do that if there is a link please?

Thank you,
Luai

Hi,
it’s not an easy thing to upgrape Yii 1.1.16 to the current Version 2 - you’ll finde some Informatios here, but it’s a lot of work: https://www.yiiframework.com/doc/guide/2.0/en/intro-upgrade-from-v1

Did you check the SMPT Connection outside the Application? Maybe with an E-Mail Client? Are you using Sendmail or just the plain PHP mail() Command to send E-Mails?

Hi
Thank you again.
I am using PHP mail, I am not sure what I should change in the PHP.ini file. I did check the SMTP connection outside the application, I even tried several SMTP connections I use on my outlook.

I contacted the guy who did all of this code, he said it will not work on a shared host, and that it should be VPS. How true is that and how can I make it work on a shared host, he mentioned “Redis” but I did not understand what shall I do.

Regards,
Luai

Hi,
try to send from this server a simple E-Mail with the php command

mail();

If that works, it should also work with yii, then you have to find the code line wich is sending the mail. what is written there?

Hello again.
I need help please.

the application log files have the following error:-

[error] [exception.CException] exception ‘CException’ with message ‘Property “User. password” is not defined.’ in D:\xampp\htdocs\yii-1.1.16\framework\base\CComponent.php:130
Stack trace:
#0 D:\xampp\htdocs\yii-1.1.16\framework\db\ar\CActiveRecord.php(145): CComponent->__get(’ password’)
#1 D:\xampp\htdocs\yii-1.1.16\framework\validators\CRequiredValidator.php(58): CActiveRecord->__get(’ password’)
#2 D:\xampp\htdocs\yii-1.1.16\framework\validators\CValidator.php(201): CRequiredValidator->validateAttribute(Object(User), ’ password’)
#3 D:\xampp\htdocs\yii-1.1.16\framework\base\CModel.php(159): CValidator->validate(Object(User), NULL)
#4 D:\xampp\htdocs\yii-1.1.16\framework\db\ar\CActiveRecord.php(808): CModel->validate(NULL)
#5 D:\xampp\htdocs\rz\protected\modules\admin\controllers\UserController.php(360): CActiveRecord->save()
#6 D:\xampp\htdocs\yii-1.1.16\framework\web\actions\CInlineAction.php(49): UserController->actionCreate()
#7 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(308): CInlineAction->runWithParams(Array)
#8 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction))
#9 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilter.php(40): CFilterChain->run()
#10 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain))
#11 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain))
#12 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain))
#13 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(291): CFilterChain->run()
#14 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#15 D:\xampp\htdocs\yii-1.1.16\framework\web\CWebApplication.php(282): CController->run(‘create’)
#16 D:\xampp\htdocs\yii-1.1.16\framework\web\CWebApplication.php(141): CWebApplication->runController(‘admin/user/crea…’)
#17 D:\xampp\htdocs\yii-1.1.16\framework\base\CApplication.php(184): CWebApplication->processRequest()
#18 D:\xampp\htdocs\rz\index.php(22): CApplication->run()
#19 {main}

What does that mean, and what is the password referring to.

Thanks in advance.
Luai

Hello,
I solved my sending email problem by change the code in MailHelper.PHP and re-installing the extension + changing the SMTP configurations.

Now I have a new issue related to REDIS and PHP extension for Redis. I have no idea how to install redis extension on shared hosting

Regards,