QR Code Generator

Recently I just need to use yiiframework.com/extension/qr-code-generator

It seems to be extremely easy to use - as stay in its Readme file in my [color="#006400"]view[/color]

code I just need to add this line of codes


<?php $this->widget('application.extensions.qrcode.QRCodeGenerator',array(

    'data' => 'have a nice day',

    'subfolderVar' => true,

    'matrixPointSize' => 5,

)) ?>

And so I did. Just after done my [color="#006400"]view[/color] gives just:

[b][size="4"]Error 500

does not exists.[/size][/b]

I know it is a kind of “server” error… I’m using xampp on Windows…

anyhow only this lines of code did it :( No idea why ???

Can anyone help me to handle this case ???

solved ;) hope will help anyone newbie ;)

in my case I just chcnged patch in QRCodeGenerator.php


if (!isset($this->fileUrl)){

            $this->fileUrl = Yii::app()->baseUrl . '/images';

        }



And set sub-folder use to false:


<?php $this->widget('application.extensions.qrcode.QRCodeGenerator',array(

    'data' => 'have a nice day',

    'subfolderVar' => false,

    'matrixPointSize' => 4,

)) ?>

This doesn’t seem to solve the problem in my case. It’s still showing Error 500.

Create an "Upload" folder. This will solve this problem.

I met the same problem"Error 500"

You need to change the path in QRCodeGenerator.php

$this->filePath

change this path according to your folder

It’s more easy to include the ‘filePath’ param in the widget constructor.

You don’t nedd modify the QRCodeGenerator.php code:




<?php $this->widget('application.extensions.qrcode.QRCodeGenerator',array(

    'data' => 'have a nice day',

    'filePath'=>YiiBase::getPathOfAlias('webroot.images'), //or any folder on your server with public access

    'subfolderVar' => false,

    'matrixPointSize' => 4,

)) ?>



Thanks a lot. It did help.

Recently I just need to use yiiframework.com/extension/qr-code-generator

It seems to be extremely easy to use - as stay in its Readme file in my view

code I just need to add this line of codes

<?php $this->widget(‘application.extensions.qrcode.QRCodeGenerator’,array(

'data' =&gt; 'have a nice day',


'subfolderVar' =&gt; true,


'matrixPointSize' =&gt; 5,

)) ?>

And so I did. Just after done my view gives just:

Fatal Error

Cannot redeclare class QRcode in /phpqrcode/qrencode.php on line 156

Can you help me to fix this issue.

Thanks in advance

Class ‘YiiBase’ not found

I am getting this error can any body help me to solve this error???..

thank you in advance…