Blog, Wordpress•
on August 12th, 2010•
The importance of QR codes is increasing, we find QR codes everywhere now. Luckily, there’s an easy way to add QR codes to websites
Tutorial Details
- Technology: Google Chart API
- Difficulty:Beginner
- Estimated Completion Time:2-3 minutes
What is QR Codes?
QR Codes are a popular type of two-dimensional bar code. You can encode URLs, contact information, etc. into a black-and-white image. A QR-Code-enabled device can take a snap of the 2D bar code and open the referenced post page in web browser automatically, if the QR codes reader installed in the mobile phone able to decode it
In this tutorial, i’ll guide you through the process of creating QR codes using Google Chart API
Simple Step
You only add link to chart type in Google Chart API, with attribute to tell the service what to produce
<img src="http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=http://pixert.com" />
You can add it to WordPress with WordPress template tag, the_permalink()
<img src="http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=<?php the_permalink(); ?>" />
I was uploading a sql statement of 108MB file to MySQL via phpMyAdmin in on WAMPSERVER. I got “Script timeout passed, if you want to finish import, please resubmit same file and import will resume”. phpMyAdmin then cancelled my upload because it reached time out again
How to solve it?
1. Edit php.ini. You can find it here C:\wamp\bin\apache\Apache2.2.11
2. Use Find tool
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
memory_limit = 8M
Change to:
post_max_size = 110M (see the sql statement filesize above)
upload_max_filesize = 110M
max_execution_time = 1000
memory_limit = 128M (based on RAM)
Save php.ini
3. Edit my.ini, find it here, C:\wamp\bin\mysql\mysql5.1.36\my.ini
4. Use Find tool
max_allowed_packet = 110M
Save my.ini
5. Restart WAMPSERVER
I upgraded WAMPSERVER in a local PC yesterday. The latest WampServer 2.0i includes Apache 2.2.11, MySQL 5.1.36 and PHP 5.3.0.
I was getting this error in the main of phpMyAdmin bundled with WAMPSERVER, The additional features for working with linked tables have been deactivated. To find out why click here
When I clicked the link, it showed this report
$cfg['Servers'][$i]['pmadb'] ... not OK
$cfg['Servers'][$i]['relation'] ... not OK [ Documentation ]
General relation features: Disabled
$cfg['Servers'][$i]['table_info'] ... not OK [ Documentation ]
Display Features: Disabled
$cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ]
$cfg['Servers'][$i]['pdf_pages'] ... not OK [ Documentation ]
Creation of PDFs: Disabled
$cfg['Servers'][$i]['column_info'] ... not OK [ Documentation ]
Displaying Column Comments: Disabled
Bookmarked SQL query: Disabled
Browser transformation: Disabled
$cfg['Servers'][$i]['history'] ... not OK [ Documentation ]
SQL history: Disabled
$cfg['Servers'][$i]['designer_coords'] ... not OK [ Documentation ]
Designer: Disabled
How to solve that errors?
1. Click Home icon in the sidebar of phpMyAdmin
2. Click Import tab
3. Browse file create_tables.sql in WAMPSERVER Installation folder. It can be found at C:\wamp\apps\phpmyadmin3.2.01\scripts\create_tables.sql. Click Go to start import
4. It creates a database name phpmyadmin
5. Click Home in the sidebar again
6. Click SQL tab
7. Enter this command in Run SQL query/queries on server box, CREATE USER ‘phpmyadmin’@'localhost’ IDENTIFIED BY ‘pmapass’;
GRANT SELECT, INSERT, UPDATE, DELETE ON phpmyadmin.* TO ‘phpmyadmin’@'localhost’; . Click Go
8. It creates user phpmyadmin for the phpmyadmin database
9. Edit config.inc.php in C:\wamp\apps\phpmyadmin3.2.01\
Add these lines to config.inc.php
/* phpMyAdmin linked table */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['controluser'] = 'phpmyadmin';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
Save config.inc.php
10. Close phpMyAdmin window in your browser
11. Open phpMyAdmin in your browser. The errors should be gone.