Adding extension in Debug mode getting : "chmod(): operation not permitted" - php

When am adding an extension (EfontAwesome, ref: www.yiiframework.com/extension/efontawesome) to Yii I am getting "chmod(): operation not permitted"
The Call Stack looked something like this..
/opt/lampp/htdocs/yii-1.1.13/framework/utils/CFileHelper.php(133)
121 while(($file=readdir($folder))!==false)
122 {
123 if($file==='.' || $file==='..')
124 continue;
125 $path=$src.DIRECTORY_SEPARATOR.$file;
126 $isFile=is_file($path);
127 if(self::validatePath($base,$file,$isFile,$fileTypes,$exclude))
128 {
129 if($isFile)
130 {
131 copy($path,$dst.DIRECTORY_SEPARATOR.$file);
132 if(isset($options['newFileMode']))
133 chmod($dst.DIRECTORY_SEPARATOR.$file,$options['newFileMode']);
134 }
135 elseif($level)
136 self::copyDirectoryRecursive($path,$dst.DIRECTORY_SEPARATOR.$file,$base.'/'.$file,$fileTypes,$exclude,$level-1,$options);
137 }
138 }
139 closedir($folder);
140 }
141
142 /**
143 * Returns the files found under the specified directory and subdirectories.
144 * This method is mainly used by {#link findFiles}.
145 * #param string $dir the source directory
Stack Trace
#0
+ /opt/lampp/htdocs/yii-1.1.13/framework/utils/CFileHelper.php(133): chmod("/opt/lampp/htdocs/im/assets/6950b6ca/css/font-awesome.css", 438)
#1
+ /opt/lampp/htdocs/yii-1.1.13/framework/utils/CFileHelper.php(136): CFileHelper::copyDirectoryRecursive("/opt/lampp/htdocs/im/protected/extensions/EFontAwesome/assets/cs...", "/opt/lampp/htdocs/im/assets/6950b6ca/css", "/css", array(), ...)
#2
+ /opt/lampp/htdocs/yii-1.1.13/framework/utils/CFileHelper.php(63): CFileHelper::copyDirectoryRecursive("/opt/lampp/htdocs/im/protected/extensions/EFontAwesome/assets", "/opt/lampp/htdocs/im/assets/6950b6ca", "", array(), ...)
#3
+ /opt/lampp/htdocs/yii-1.1.13/framework/web/CAssetManager.php(251): CFileHelper::copyDirectory("/opt/lampp/htdocs/im/protected/extensions/EFontAwesome/assets", "/opt/lampp/htdocs/im/assets/6950b6ca", array("exclude" => array(".svn", ".gitignore"), "level" => -1, "newDirMode" => 511, "newFileMode" => 438))
#4
– /opt/lampp/htdocs/im/protected/extensions/EFontAwesome/components/EFontAwesome.php(41): CAssetManager->publish("/opt/lampp/htdocs/im/protected/extensions/EFontAwesome/assets", false, -1, true)
36 public function getAssetsUrl() {
37 if (isset($this->_assetsUrl))
38 return $this->_assetsUrl;
39 else {
40 $assetsPath = Yii::getPathOfAlias('efontawesome.assets');
41 $assetsUrl = Yii::app()->assetManager->publish($assetsPath, false, -1, YII_DEBUG);
42 return $this->_assetsUrl = $assetsUrl;
43 }
44 }
45 }
This is only happening in debug mode and not in production mode.
The directory is writable by the web process (as it can be seen to work in production mode) and this extension was working perfectly well in debug mode few days back,
A brief google search only bought up the this closed issue on github :https://github.com/yiisoft/yii/issues/1853 regarding forcedCopy and linkAssets config conflict, which was fixed in Yii-1.1.13(the version I am using), just to be safe I had also tried setting the config of both to false in the main config files like this
'assetManager' => array(
'linkAssets' => false,
'forceCopy'=>false,
),
but the issue is persisting, any ideas on how to solve this?

Related

Twig_Error_Syntax: Unknown "template_from_string" function. Function became obsolete?

I remember after composer updating I got this error, but previously it worked perfectly, and in comparing the packages versions I didn't find differences. I used it in this way in template:
{{ include(template_from_string(page.body)) }}
where "page" is entity object from controller. Current versions are:
symfony/symfony v2.8.15
twig/extensions v1.4.1
twig/twig v1.30.0
Also in config.yml:
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
form_themes:
- 'AppBundle::Form/form_override.html.twig'
Now there is in vendor/twig/twig/lib/twig/Twig/Extension/StringLoader.php visually correct file, but seems it still not working. Full stacktrace:
[1] Twig_Error_Syntax: Unknown "template_from_string" function.
at n/a
in ProjectDir\src\AppBundle/Resources/views/Page.html.twig line 22
at Twig_ExpressionParser->getFunctionNodeClass('template_from_string', '22')
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 374
at Twig_ExpressionParser->getFunctionNode('template_from_string', '22')
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 162
at Twig_ExpressionParser->parsePrimaryExpression()
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 102
at Twig_ExpressionParser->getPrimary()
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 55
at Twig_ExpressionParser->parseExpression()
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 520
at Twig_ExpressionParser->parseArguments(true)
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 373
at Twig_ExpressionParser->getFunctionNode('include', '22')
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 162
at Twig_ExpressionParser->parsePrimaryExpression()
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 102
at Twig_ExpressionParser->getPrimary()
in ProjectDir\vendor\twig\twig\lib\Twig\ExpressionParser.php line 55
at Twig_ExpressionParser->parseExpression()
in ProjectDir\vendor\twig\twig\lib\Twig\Parser.php line 147
at Twig_Parser->subparse(array(object(Twig_TokenParser_Block), 'decideBlockEnd'), true)
in ProjectDir\vendor\twig\twig\lib\Twig\TokenParser\Block.php line 40
at Twig_TokenParser_Block->parse(object(Twig_Token))
in ProjectDir\vendor\twig\twig\lib\Twig\Parser.php line 190
at Twig_Parser->subparse(null, false)
in ProjectDir\vendor\twig\twig\lib\Twig\Parser.php line 103
at Twig_Parser->parse(object(Twig_TokenStream))
in ProjectDir\app\cache\dev\classes.php line 3415
at Twig_Environment->parse(object(Twig_TokenStream))
in ProjectDir\app\cache\dev\classes.php line 3443
at Twig_Environment->compileSource(object(Twig_Source))
in ProjectDir\app\cache\dev\classes.php line 3291
at Twig_Environment->loadTemplate('AppBundle::Page.html.twig')
in ProjectDir\vendor\symfony\symfony\src\Symfony\Bridge\Twig\TwigEngine.php line 126
at Symfony\Bridge\Twig\TwigEngine->load('AppBundle::Page.html.twig')
in ProjectDir\vendor\symfony\symfony\src\Symfony\Bridge\Twig\TwigEngine.php line 50
at Symfony\Bridge\Twig\TwigEngine->render('AppBundle::Page.html.twig', array('page' => object(Page), 'ads' => array(object(VertBanner), object(VertBanner)), 'slug' => 'direktor'))
in ProjectDir\vendor\symfony\symfony\src\Symfony\Bundle\TwigBundle\TwigEngine.php line 72
at Symfony\Bundle\TwigBundle\TwigEngine->render('AppBundle::Page.html.twig', array('page' => object(Page), 'ads' => array(object(VertBanner), object(VertBanner)), 'slug' => 'direktor'))
in ProjectDir\vendor\symfony\symfony\src\Symfony\Bundle\TwigBundle\TwigEngine.php line 103
at Symfony\Bundle\TwigBundle\TwigEngine->renderResponse('AppBundle::Page.html.twig', array('page' => object(Page), 'ads' => array(object(VertBanner), object(VertBanner)), 'slug' => 'direktor'), null)
in ProjectDir\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Controller\Controller.php line 185
at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('AppBundle::Page.html.twig', array('page' => object(Page), 'ads' => array(object(VertBanner), object(VertBanner)), 'slug' => 'direktor'))
in ProjectDir\src\AppBundle\Controller\PageController.php line 35
at AppBundle\Controller\PageController->getPageAction('direktor')
in line
at call_user_func_array(array(object(PageController), 'getPageAction'), array('direktor'))
in ProjectDir\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php line 144
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
in ProjectDir\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php line 64
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
in ProjectDir\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel.php line 69
at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
in ProjectDir\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php line 185
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
in ProjectDir\web\app_dev.php line 28
at require('ProjectDir\web\app_dev.php')
in ProjectDir\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Resources\config\router_dev.php line 40
You must let the Service Container know about your Twig Extension:
# app/config/services.yml
acme.twig.extension.loader:
class: Twig_Extension_StringLoader
tags:
- { name: 'twig.extension' }
Symfony 4:
# config/services.yml
app.twig.extension.loader:
class: Twig\Extension\StringLoaderExtension
tags:
- { name: 'twig.extension' }
For symfony5 and twig3, the answer from here worked: Symfony 4: Add Twig_Extension_StringLoader
# config/services.yaml
services:
Twig\Extension\StringLoaderExtension:
As this is more easily findable in google, I'll add it here.

FOS\OAuthServerBundle unrecognized field error

In Symfony2 I'm trying to implement FOS\OAuthServerBundle, but am getting a weird error. After following the guide here and also the official guide on GitHub, I'm met with an error that says:
Unrecognized field: randomId
500 Internal Server Error - ORMException
This is a protected variable in the Client Entity/Model in FOS\OAuthServerBundle. I must be missing something simple here, but for the life of me I can not figure out what.
Has anyone else experienced a similar error to this?
This error happens when trying to go to:
http://symfony.local/app_dev.php/oauth/v2/token?grant_type=client_credentials&client_id=fd87dddb-6c29-11e4-90f3-b8ca3aa16897_fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk&client_secret=[secret redacted]
Stack trace
Doctrine\ORM\ORMException: Unrecognized field: randomId
at n/a
in /home/johnny/Development/symfonyProject/vendor/doctrine/orm/lib/Doctrine/ORM/ORMException.php line 100
at Doctrine\ORM\ORMException::unrecognizedField('randomId')
in /home/johnny/Development/symfonyProject/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 1681
at Doctrine\ORM\Persisters\BasicEntityPersister->getSelectConditionStatementColumnSQL('randomId', null)
in /home/johnny/Development/symfonyProject/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 1610
at Doctrine\ORM\Persisters\BasicEntityPersister->getSelectConditionStatementSQL('randomId', 'fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk', null)
in /home/johnny/Development/symfonyProject/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 1701
at Doctrine\ORM\Persisters\BasicEntityPersister->getSelectConditionSQL(array('id' => 'fd87dddb-6c29-11e4-90f3-b8ca3aa16897', 'randomId' => 'fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk'), null)
in /home/johnny/Development/symfonyProject/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 1115
at Doctrine\ORM\Persisters\BasicEntityPersister->getSelectSQL(array('id' => 'fd87dddb-6c29-11e4-90f3-b8ca3aa16897', 'randomId' => 'fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk'), null, '0', '1', null, null)
in /home/johnny/Development/symfonyProject/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php line 746
at Doctrine\ORM\Persisters\BasicEntityPersister->load(array('id' => 'fd87dddb-6c29-11e4-90f3-b8ca3aa16897', 'randomId' => 'fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk'), null, null, array(), '0', '1', null)
in /home/johnny/Development/symfonyProject/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php line 196
at Doctrine\ORM\EntityRepository->findOneBy(array('id' => 'fd87dddb-6c29-11e4-90f3-b8ca3aa16897', 'randomId' => 'fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk'))
in /home/johnny/Development/symfonyProject/vendor/friendsofsymfony/oauth-server-bundle/FOS/OAuthServerBundle/Entity/ClientManager.php line 55
at FOS\OAuthServerBundle\Entity\ClientManager->findClientBy(array('id' => 'fd87dddb-6c29-11e4-90f3-b8ca3aa16897', 'randomId' => 'fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk'))
in /home/johnny/Development/symfonyProject/vendor/friendsofsymfony/oauth-server-bundle/FOS/OAuthServerBundle/Model/ClientManager.php line 41
at FOS\OAuthServerBundle\Model\ClientManager->findClientByPublicId('fd87dddb-6c29-11e4-90f3-b8ca3aa16897_fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk')
in /home/johnny/Development/symfonyProject/vendor/friendsofsymfony/oauth-server-bundle/FOS/OAuthServerBundle/Storage/OAuthStorage.php line 102
at FOS\OAuthServerBundle\Storage\OAuthStorage->getClient('fd87dddb-6c29-11e4-90f3-b8ca3aa16897_fzhfyllumw0kwwgkocg80wkg8sc4ko0soww0cks4gc0ogggk')
in /home/johnny/Development/symfonyProject/vendor/friendsofsymfony/oauth2-php/lib/OAuth2/OAuth2.php line 707
at OAuth2\OAuth2->grantAccessToken(object(Request))
in /home/johnny/Development/symfonyProject/vendor/friendsofsymfony/oauth-server-bundle/FOS/OAuthServerBundle/Controller/TokenController.php line 40
at FOS\OAuthServerBundle\Controller\TokenController->tokenAction(object(Request))
in line
at call_user_func_array(array(object(TokenController), 'tokenAction'), array(object(Request)))
in /home/johnny/Development/symfonyProject/app/bootstrap.php.cache line 2976
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
in /home/johnny/Development/symfonyProject/app/bootstrap.php.cache line 2938
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
in /home/johnny/Development/symfonyProject/app/bootstrap.php.cache line 3087
at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
in /home/johnny/Development/symfonyProject/app/bootstrap.php.cache line 2337
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
in /home/johnny/Development/symfonyProject/web/app_dev.php line 18
Try the tip at the end of this section:
https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/blob/master/Resources/doc/index.md#doctrine-orm-classes
It seems someone had the same problem and solved it, just read the comments below the article which is:
"If you don't have auto_mapping activated in your doctrine configuration you need to add FOSOAuthServerBundle to your mappings in config.yml."

Symfony2 fatal error You have requested a non-existent parameter java_path

im working in SmFony Project but i got some issues when i would get access on my poject via this URL : http://localhost/oksa-depannage/web/app_dev.php/login
"OKSA-DEPANNAGE" is a project name.
So i hope that my question is clear
Errors :
in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 106
at ParameterBag->get('java_path') in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 232
at ParameterBag->resolveString('%java_path%', array()) in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 203
at ParameterBag->resolveValue('%java_path%', array()) in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 193
at ParameterBag->resolveValue(array('debug' => '%kernel.debug%', 'use_controller' => false, 'bundles' => array('OksaTemplateBundle'), 'java' => '%java_path%', 'filters' => array('cssrewrite' => null, 'yui_css' => array('jar' => '%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar'), 'yui_js' => array('jar' => '%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar'))), array()) in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag.php line 193
at ParameterBag->resolveValue(array(array('debug' => '%kernel.debug%', 'use_controller' => false, 'bundles' => array('OksaTemplateBundle'), 'java' => '%java_path%', 'filters' => array('cssrewrite' => null, 'yui_css' => array('jar' => '%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar'), 'yui_js' => array('jar' => '%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar'))), array('use_controller' => true))) in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass.php line 44
at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass.php line 39
at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Compiler\Compiler.php line 117
at Compiler->compile(object(ContainerBuilder)) in C:\wamp\www\oksa-depannage\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\ContainerBuilder.php line 619
at ContainerBuilder->compile() in C:\wamp\www\oksa-depannage\app\bootstrap.php.cache line 2491
at Kernel->initializeContainer() in C:\wamp\www\oksa-depannage\app\bootstrap.php.cache line 2270
at Kernel->boot() in C:\wamp\www\oksa-depannage\app\bootstrap.php.cache line 2301
at Kernel->handle(object(Request)) in C:\wamp\www\oksa-depannage\web\app_dev.php line 28
thanks for your helps.
Looks like symfony is trying to start the yui compressor, which is a java library.
This post has a workaround to make this situation work on windows: symfony2 assetics yui compressor on windows (path syntax)

Swift_TransportException Failed to authenticate on SMTP server with username

Hey awesome programmers!
Glad to see you all :)
This is my site... http://www.newdelhifreeads.com
I use cpanel.
This type of question has been asked but mine is a little different.
Whenever anyone tries to register on my site or try to post a free ad, the following error message results:
Swift_Transport Exception
Failed to authenticate on SMTP server with username "info#newdelhifreeads.com" using 2 possible authenticators
/home/newdelhi/public_html/protected/modules/Core/extensions/vendors/mail/vendors/swiftMailer/classes/Swift/Transport/Esmtp/AuthHandler.php(179)
167 foreach ($this->_getAuthenticatorsForAgent() as $authenticator)
168 {
169 if (in_array(strtolower($authenticator->getAuthKeyword()),
170 array_map('strtolower', $this->_esmtpParams)))
171 {
172 $count++;
173 if ($authenticator->authenticate($agent, $this->_username, $this->_password))
174 {
175 return;
176 }
177 }
178 }
179 throw new Swift_TransportException(
180 'Failed to authenticate on SMTP server with username "' .
181 $this->_username . '" using ' . $count . ' possible authenticators'
182 );
183 }
184 }
185
186 /**
187 * Not used.
188 */
189 public function getMailParams()
190 {
191 return array();
Stack Trace
#0
– /home/newdelhi/public_html/protected/modules/Core/extensions/vendors/mail/vendors/swiftMailer/classes/Swift/Transport/EsmtpTransport.php(252): Swift_Transport_Esmtp_AuthHandler->afterEhlo(Swift_SmtpTransport)
247
248 $this->_capabilities = $this->_getCapabilities($response);
249 $this->_setHandlerParams();
250 foreach ($this->_getActiveHandlers() as $handler)
251 {
252 $handler->afterEhlo($this);
253 }
254 }
255
256 /** Overridden to add Extension support */
257 protected function _doMailFromCommand($address)
#1
– /home/newdelhi/public_html/protected/modules/Core/extensions/vendors/mail/vendors/swiftMailer/classes/Swift/Transport/AbstractSmtpTransport.php(108): Swift_Transport_EsmtpTransport->_doHeloCommand()
103 catch (Swift_TransportException $e)
104 {
105 $this->_throwException($e);
106 }
107 $this->_readGreeting();
108 $this->_doHeloCommand();
109
110 if ($evt)
111 {
112 $this->_eventDispatcher->dispatchEvent($evt, 'transportStarted');
113 }
#2
– /home/newdelhi/public_html/protected/modules/Core/extensions/vendors/mail/vendors/swiftMailer/classes/Swift/Mailer.php(74): Swift_Transport_AbstractSmtpTransport->start()
69 {
70 $failedRecipients = (array) $failedRecipients;
71
72 if (!$this->_transport->isStarted())
73 {
74 $this->_transport->start();
75 }
76
77 return $this->_transport->send($message, $failedRecipients);
78 }
79
#3
+ /home/newdelhi/public_html/protected/modules/Core/extensions/vendors/mail/YiiMail.php(133): Swift_Mailer->send(Swift_Message, array())
#4
+ /home/newdelhi/public_html/protected/modules/User/services/UserService.php(311): YiiMail->send(YiiMailMessage)
#5
+ /home/newdelhi/public_html/protected/modules/Core/extensions/base/FSM.php(106): UserService->registerInFrontEnd(array("User" => array("email" => "tips4youawesome#gmail.com", "first_name" => "Naveen", "last_name" => "Gift", "verifyCode" => "uumohu"), "btnRegister" => "Register"))
#6
+ /home/newdelhi/public_html/protected/modules/Core/extensions/base/FSM.php(133): FSM::_run("User.User.registerInFrontEnd", array("User" => array("email" => "tips4youawesome#gmail.com", "first_name" => "Naveen", "last_name" => "Gift", "verifyCode" => "uumohu"), "btnRegister" => "Register"), false)
#7
+ /home/newdelhi/public_html/protected/controllers/SiteController.php(139): FSM::run("User.User.registerInFrontEnd", array("User" => array("email" => "tips4youawesome#gmail.com", "first_name" => "Naveen", "last_name" => "Gift", "verifyCode" => "uumohu"), "btnRegister" => "Register"))
#8
+ /home/newdelhi/public_html/yii-1.1.7.r3135/framework/web/actions/CInlineAction.php(50): SiteController->actionRegister()
#9
+ /home/newdelhi/public_html/yii-1.1.7.r3135/framework/web/CController.php(300): CInlineAction->runWithParams(array())
#10
+ /home/newdelhi/public_html/yii-1.1.7.r3135/framework/web/CController.php(278): CController->runAction(CInlineAction)
#11
+ /home/newdelhi/public_html/yii-1.1.7.r3135/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array())
#12
+ /home/newdelhi/public_html/yii-1.1.7.r3135/framework/web/CWebApplication.php(328): CController->run("register")
#13
+ /home/newdelhi/public_html/yii-1.1.7.r3135/framework/web/CWebApplication.php(121): CWebApplication->runController("site/register")
#14
+ /home/newdelhi/public_html/yii-1.1.7.r3135/framework/base/CApplication.php(155): CWebApplication->processRequest()
#15
+ /home/`newdelhi`/public_html/`index.php`(42): `CApplication`->run()
Could anyone please help me out with this?
It would be a great help!
Thanks.......... ;)
This might be old but somebody might get help through this. I too faced the same problem and received a mail on my gmail account stating that someone is trying to hack your account through an email client or a different site.
THen I searched and found that doing below would resolve this issue.
Go to https://accounts.google.com/UnlockCaptcha‎
and unlock your account for access through other media/sites.
UPDATE : 2015
Also, you can try this, Go to https://myaccount.google.com/security#connectedapps
At the bottom, towards right there is an option "Allow less secure apps". If it is "OFF", turn it on by sliding the button.

yii extension assistance

I'm just starting to scratch the surface in yii and am having a heck of a time getting any image slider extensions to work. I've referenced http://www.yiiframework.com/doc/guide/1.1/en/extension.use and believe my problem to be related to the initialization of the extension but am not sure. The most recent extension I'm attempting to use is http://www.yiiframework.com/extension/s3slider/.
So far I've downloaded the extension, unzipped and placed in /protected/extensions. I have two images I'm attempting to slide between located in /images. I've placed the suggested code in my /protected/views/layouts/main.php and updated the $images array as follows:
<?php
$this->widget('application.extensions.s3slider.S3Slider',
array(
'images' => array(
array('images/giveBack.png', 'Give Back'),
array('images/priceGuarantee.png', 'Price Guarantee'),
),
'width' => '420',
'height' => '300',
)
);?>
When I reload my page I get the following error:
PHP notice
Array to string conversion
/protected/extensions/s3slider/S3Slider.php(71)
59 $cssparams = array(
60 'name' => $this->name,
61 'width' => $this->width,
62 'height' => $this->height,
63 'opacity' => $this->opacity,
64 );
65 $clientScript->registerCssFile($baseUrl . '/s3Slider.css.php?data=' . urlencode(base64_encode(serialize($cssparams)))); //http_build_query($cssparams)
66
67 $clientScript->registerCoreScript('jquery');
68
69 $clientScript->registerScriptFile($baseUrl . '/s3Slider.js');
70
71 $js = "jQuery('#{$this->name}').s3Slider($options);";
72 $cs->registerScript('Yii.S3Slider' . $this->name, $js);
73 echo $this->makeImages();
74 }
75
76 }
77 ?>
My stack trace indicates:
/protected/views/layouts/main.php(60): CBaseController->widget("application.extensions.s3slider.S3Slider", array("images" => array(array("images/giveBack.png", "Give Back"), array("images/priceGuarantee.png", "Price Guarantee")), "width" => "420", "height" => "300"))
55 array('images/priceGuarantee.png', 'Price Guarantee'),
56 ),
57 'width' => '420',
58 'height' => '300',
59 )
60 );?>
61
62 <?php
63 $this->widget('zii.widgets.CBreadcrumbs', array(
64 'links'=>$this->breadcrumbs,
65 )); ?><!-- breadcrumbs -->
Any guidance on this would be much appreciated!
Thank you.
You successfully installed this extension, however there is a obvious bug in it.
Note, that at line 52 $options is declared
$options = array();
Then it is checked if not empty:
if (!empty($options)) {
$options = CJavaScript::encode($options);
}
So $options is empty, so it is not encoded to string with encode, so in:
$js = "jQuery('#{$this->name}').s3Slider($options);";
PHP shows notice about array to string conversion. Remove condition for checking if empty, and it will encode empty array and should work. Author of extension probably has notices disabled, which is bad practice. It is wise to see notices at development stage.
HINT: When you get better in yii, writing extension wrapper for jquery plugins will be snap for you.

Categories