QR Code Generator


(Riventel) #1

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 ???


(Riventel) #2

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,

)) ?>


(Tintintiamzon) #3

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


(Girishpadia) #4

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


(Faafadff) #5

I met the same problem"Error 500"


(Kautil) #6

You need to change the path in QRCodeGenerator.php

$this->filePath

change this path according to your folder


(Isidoro) #7

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,

)) ?>




(Makaveil4202) #8

Thanks a lot. It did help.


(Gowtham Hariram) #9

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


(Roopa R Rc) #10

Class ‘YiiBase’ not found

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

thank you in advance…