Planet phpMyAdmin

July 07, 2015

Madhura Jayaratne

phpMyAdmin work during thirty eighth and thirty ninth weeks

I had to take two days off on the thirty ninth week of work. So, here I am combining it with the previous week to report what I have been up to. Continuing from the last couple of weeks we saw a decline in the number of bugs reported, indicating that the releases are much stable.

Due to the above reason I spent more time on feature requests and general coding improvements. I went on to clean the feature request tracker by investigating the feature requests and implementing them when they made sense. Here are the features implemented during the week.

Feature requests implemented
#689  Column privileges and update
#812  Store export definitions for reuse
#1531 Cant use external config file
#1552 CSV import: Allow "Columns escaped with" to be optional
#1561 Being able to use multiple servers at the same time when using cookie auth
Get default_fk_check_value on demand rather than checking the value in every script
Remove configuration storage data related to a user upon deleting the user
Upgrade CodeMirror to version 5.4.0

Additionally, following feature requests were investigated

Feature requests investigated
#757  Dropdown for special SQL like SUM, AVG and GROUP BY
#1270 Allow specifying mime types and transformations in queries
#1390 Export tables list must be ordered by constraints
#1682 Add quick action features

From the general coding improvements front, following were done.

General code improvements
OOP improvements in navigation panel
Match export parameters with the names of corresponding config values
Fix JavaScript variable scope error reported by Codacy

Even though reported in low numbers, following bugs were fixed and investigated.

Bugs fixed
#4916 Autocomplete either doesn't function at all or auto completes the original table name when joining multiple aliased tables
#4963 Improve/restore non-unique index row editing
#4966 MySQL errors are not shown when DebugSQL is enabled
#4967 Field named '0' is not recognized
#4969 Autoload from prefs_storage not behaving properly
Show build query dialog in full screen view also
Missing selected/entered values when editing active options in visual query builder
Remove character set from create_tables_drizzle.sql

Bugs investigated
#4964 New version using older files
#4968 Combine create / alter table statements
#4972 Bug when processing binary data

by Madhura ( at July 07, 2015 02:40 PM

July 06, 2015

Deven Bansod

GSoC 2015 : Weekly Report #8 : RFE #1163 & some corrections

Week #8 Task(s) completed: None Tasks worked upon: RFE #1163 : PMA not using SET NAMES on using custom charset/ collation Scheduled Deadline: 19th July Completed on: NA Details: 1. The RFE#1163 suggests that we should use SET NAMES instead of SET CHARSET while using custom collation/ charset. We were undecided last week about the […]

by Deven Bansod at July 06, 2015 06:29 AM

July 05, 2015

Dan Ungureanu

Week 6

During this week I continued replacing code that was related to the old parsing library. The new library suffered a lot of changes too. Some of the most important are: implemented a builder, improved lots of statements, the library takes into consideration the SQL mode in some operations, lots of fixes, improved the documentation and the code coverage is now over 98%.

One of the most important tasks accomplished this week is that I finished refactoring sql.lib.php, DisplayResults.class.php, Table.class.php and a huge part of the code related to export.

I hope that the next week I will finish refactoring the old code and fix as many bugs as possible.

To see my progress, you can check out my library repository or the pull request I submit for phpMyAdmin.

July 05, 2015 12:00 AM

July 01, 2015

Zhang Hao

The OOP & refactor project weekly report 7

During the last week I finished my work on the dependency injection container and a helper for the template system. Also, the mid-term evaluation was submitted. I am grateful of being one of the PMA developers :-)

Files Covered In This Week

  • libraries/ArrayHelper.class.php
  • libraries/
  • libraries/di/*

Outcomes In This Week

The helper for template system & Refactor
In order to refactor, I created this helper to simplify branching and accessing array elements. By using PMA\Util\get, it enable us access an array using dot notation. Here is an example:

require_once 'libraries/util.lib.php';
use PMA\Util;
$test = array('a' => array('b' => array('c')));
echo Util\get($test, 'a.b');

It will print the result below:


If the specified path or the value not exist, it will return a default value. The default value can be set as the third parameter of the function. It’s set to null by default.

Dependency Injection Container
First I implemented the container using closures, but phpunit failed so that I can only implement a new one in class form. The dependency container is mainly use to free us from passing plenty of parameters to construct classes.

When we use the container, we can just set up some global parameters like $GLOBAL['dbi'] and $GLOBAL['url_query'] in it. We can also register services or factories (Container::factory and Container::service). After we finish setting up dependencies, we can construct the class by calling Container::get and pass the rest of user-specified parameters for the class. We don’t need to worry about the long-long parameter list, since the container will resolve by itself.

What Will I Do Next

In the following 1 weeks, I will work on refining the Table class and TableSearch class.

by jasondaurus at July 01, 2015 02:42 PM

June 29, 2015

Deven Bansod

GSoC 2015 : Weekly Report #7 : RFE #1163 & some corrections

Week #7 Task(s) completed: None Tasks worked upon: RFE #1163 : PMA not using SET NAMES on using custom charset/ collation RFE #1060 : Designer settings like ‘Angular/ Direct Links’, ‘Snap to Grid’ etc. should be remembered Scheduled Deadline: 19th July Completed on: NA Details: 1. The RFE#1163 suggests that we should use SET NAMES […]

by Deven Bansod at June 29, 2015 05:41 AM

June 28, 2015

Dan Ungureanu

Week 5

During this week I paid a lot of attention to understanding the old code so I would not create any new bugs by mistake and I got the chance to find a few new ones (or had no knowledge of them previously).

Since most bugs are caused by edge cases that the old parser cannot handle I decided that the best approach to fixing them is to continue implementing the new library. This week the sql-parser library suffered quite a few changes and I got the chance to see how it behaves in real situations. It still lacks some functionality (e.g. query builder and query formatter) which are needed, but those are planed to be written later. For now, I implemented temporary methods that, given the conditions, seem to work as expected.

One of the most difficult parts was the code from sql.lib.php which has a high complexity, mixing some logic with view code and not being very consistent.

My task for the next two weeks is to refactor code related to the SQL library. I will definitely have to work more on sql.lib.php, being one of the key components of phpMyAdmin.

To see my progress, you can check out my library repository or the pull request I submit for phpMyAdmin.

June 28, 2015 12:00 AM

June 23, 2015

Zhang Hao

The OOP & refactor project weekly report 6

In this week I succeed in decomposing tbl_columns_definition.lib.php, and designed a structure for controller classes. Also, I have done some optimization on the GIS_Visualization.class.php. Now I am working to take logic-controlling codes out from table related scripts (tbl_*.php) to form table controllers.

Files Covered In This Week

  • tbl_columns_definition.lib.php (Decomposed)
  • GIS_Visualization.class.php
  • libraries/controllers

Outcomes In This Week

Decomposing tbl_columns_definition.lib.php
I have decomposed the PMA_getHtmlForColumnAttributes by taking its logic into a new template named “columns_definition/column_attributes”. In this template it handles the generation of $content_cells. Also, other functions that related to PMA_getHtmlForColumnAttributes was converted to templates.

Designing the Controller class
I’d like to introduce a general controller system for PMA, which was designed to handle most of logic in the program. The controller classes was designed with following structure:

Dependency Injection Container

The structure has multiple layers, in each layer it can provide some utility functions or variables that could be accessed in the lower layer. So far I created a Controller class as the base class for any other controllers and it provides $dbi and $response for general usages. And I’d like to create a $request object that helps handling $_REQUEST variable in the future of work.

Also, as the structure diagram shows, I’d like to have a dependency injection container in the future, but it’s likely to become too complex at this moment. So I’m considering whether we could have a better solution for dependency injection.

Last but not least, we should remember that the controllers should be put in libraries/controllers directory and PMA\Controllers namespace. I suggest that we should use namespaces and directories following PSR-4 rules in our future works.

The Problems We Are Facing

Test against the tbl_gis_visualization.php
Today I’ve converted the tbl_gis_visualization.php to the controller form I mentioned above. But I’m not so familiar with GIS data and I can’t find out how to test against the work. Any advice for that are welcomed.

Cleaning up messy structures
Some of codes in our code base is not so friendly :-(
We can see undefined variables (defined in somewhere we would never knows), codes that inline includes and $GLOBALS reference anywhere. We need a better way to clean up them, or it would slow down the refactor process.

A Template Helper
When I was working on I found that it was directly include in many places. But I couldn’t create template this script because there are too much logic handling codes in it. I think we can create a template helper class only holds static helper functions so that we can easily create template for such kind of scripts.

What Will I Do Next

In this week I will finish constructing Table controllers. A commit with some new controllers will be available soon.

by jasondaurus at June 23, 2015 06:07 PM

Madhura Jayaratne

phpMyAdmin work during thirty seventh week

This was a four day work week since I was on leave on Friday, 19th June.

The highlight of the week was the improvements to the Visual Query Builder. This included a number of bug fixes and improvements to the look and feel. VQB probably did not reach to the users very well, otherwise we should have got more bug reports relating to the issues fixed.

To the latter part of the week, I also engaged in fixing issues reported by Codacy (

* Code improvements
Various UI improvements to the visual query builder
Fix issues reported by Codacy

As usual I also engaged in regular bug fixes during the week. Highlight among the bugs fixed was  bug #4795. This requested phpMyAdmin to join two or more tables in Query Builder by using other tables that have not been included in the query. This was more of the feature request IMO.

Following are the bugs fixed and investigated during the week.

Bugs fixed
#4795 Query builder: missing joint for the intermediary table
#4955 Clicking on the navi logo does not always work (partial fix)
#4956 Trying to build query in visual builder throws JS error
#4958 Designer Javascript error with specially crafted table name
#4960 Table creation results in GET request with missing server parameter that invalidates the session
#4961 Javascript error when Designer is opened
#4962 insert by foreign key scrolls page to top
Visual builder: Generated query has extraneous comma at the end of group by clause
Visual builder: Add missing backquotes
Visual builder: Reset state variables on page teardown

Bugs investigated
#4959 Navigation pane mouseover oddity with specially crafted database/table names

by Madhura ( at June 23, 2015 07:02 AM

June 22, 2015

Deven Bansod

GSoC 2015 : Weekly Report #6 : RFE #342 & RFE#1060

Week #6 Task(s) completed:  RFE #342 : One file per table/ One file per Database while exporting a database/ server RFE #1060 : Designer settings like ‘Angular/ Direct Links’, ‘Snap to Grid’ etc. should be remembered Tasks worked upon: None Scheduled Deadline: 12th July Completed on: NA Details: 1. The RFE#342 suggests that we provide an option […]

by Deven Bansod at June 22, 2015 03:40 AM

June 21, 2015

Dan Ungureanu

Week 4

Unfortunately this week was slow and I did not get to do very much. Now, that I am done with school, I am going to have more time to work on phpMyAdmin.

Some of the things I did this week(end): added multiple contexts and implemented them into phpMyAdmin along with a mechanism which switches the context according to the version of the database server, edited the way keywords were handled, removed the tokens array from parser’s output (it was redundant), fixed tests, completely refactored routine methods.

My task for the upcoming week is to implement new features and fix bugs, but I’ll continue replacing calls to the old library as well.

To see my progress, you can check out my library repository or the pull request I submit for phpMyAdmin.

June 21, 2015 12:00 AM

June 15, 2015

Madhura Jayaratne

phpMyAdmin work during thirty sixth week

The highlight of the my work during the week is the general improvements work carried out. 'Query' page of the database level was improved during the week ( This included, introducing aliases and sort ordering. Additionally I worked on porting the Metro theme to the future 4.5.0 release (, so we will have an additional theme by the time new version is released.

* General improvements
Improvements to the QBE page
Porting Metro theme for future version 4.5
UI improvements to the print view and table operations page
Minor performance improvements in the navigation panel
Update sample config file

After 9 bug fix releases from the 4.4 branch, the rate at which the bugs are being reported has slowed down indicating that it's quite stable. However, on the other hand, a number of new issues could be observed mostly introduced by the ongoing GSoC work carried out targeting the 4.5 release. Following are the bugs fixed during the week. As mentioned earlier, most of them were fixed in QA_4_5 branch.

* Bugs fixed
#4510 QBE generates wrong query
#4946 When hide table structure actions is false, action should be in a row
#4947 Editing a view gives errors
#4950 Issues in database selection for replication
#4951 Trying to save chart as image crashes the browser
#4953 can't drag sql.gz file onto import input
#4954 Warnings on query results refresh
#4956 Trying to build query in visual builder throws JS error
Empty column list in display order drop down in table search
Fix notice on undefined variable 'col_extra'

Additionally, following issues were investigated.

* Bugs investigated
#4948 explain is broken in latest version
#4926 Browsing tables chokes on 30k tables in DB
#4959 Navigation pane mouseover oddity with specially crafted database/table names

by Madhura ( at June 15, 2015 10:35 AM

Deven Bansod

GSoC 2015 : Weekly Report #5 : RFE #1594 & RFE#1060

Week #5 Task(s) completed: RFE #1594 : More plain English config words Tasks worked upon: RFE #1060 : Designer settings like ‘Angular/ Direct Links’, ‘Snap to Grid’ etc. should be remembered Scheduled Deadline: 28th  June, 2015 Completed on: 12th June, 2015 Details: 1. We have config options for Default Tabs that the navigation links and icons link to. […]

by Deven Bansod at June 15, 2015 03:03 AM

June 14, 2015

Dan Ungureanu

Week 3

This week I started implementing the parsing library in phpMyAdmin. For now, my task is to implement the library and partially refactor code that is related to the old usage of the library.

So far, I replaced some of the helper functions that were defined in the old parser. I replaced PMA_SQP_isKeyword(), PMA_SQP_getAliasesFromQuery() and PMA_RTN_parseAllParameters(). The $PMA_SQPdata_forbidden_word array has been replaced to the array that holds all forbidden words from the Context class which and will benefit from multiple contexts when finished.

The library have seen some improvements as well: implemented some utilities (that replace old functions of the phpMyAdmin parser), changed tests’ format, has better parser for fields and data types, etc.

My task for the upcoming week is to finish replacing all calls to the old parsing library and remove it completely. This week, I have two last exams and as soon as I am done, I am going to have more free time to work on phpMyAdmin.

To see my progress, you can check out my library repository or the pull request I submit for phpMyAdmin.

June 14, 2015 12:00 AM

June 13, 2015

Zhang Hao

The OOP & refactor project weekly report 5

In this week I started the second phase of my work — OOPing table related scripts. I’d like to create a basic MVC structure for table related scripts. Before diving into the MVC structure, in this week I was decomposing tbl_*.lib.php for the convenience of the future work.

Files Covered In This Week

  • gis_data_editor.php
  • tbl_gis_visualization.php
  • GIS_Visualization.class.php
  • tbl_columns_definitions_form.lib.php
  • central_columns.lib.php
  • normalization.lib.php
  • Table.class.php
  • tbl_indexes.lib.php

Outcomes In This Week

The new GIS_Visualization class
First I found that the effect of the GIS_Visualization class is to convert raw data into diagrams and images. So I used Factory Pattern on it, and replace the constructor with a new private constructor. When we need to use this class, we can just use it in this way:

require_once 'libraries/gis/GIS_Visualization.class.php';
PMA_GIS_Visualization::get($sql_query, $options, $row, $pos, $data = null);

Notice: The $sql_query is the SQL using to fetch raw data from database, and the $row and $pos is the same as function PMA_GIS_modifyQuery($sql_query, $visualizationSettings, $rows = null, $pos = null) before. When we specify $data field in the constructor, other parameters except $options make no effect.

Some tbl_*.lib.php scripts decomposed
I am going to create a TableController to handle logic just I mentioned before, so I decomposed them and move these logics into corresponding tbl_*.php for convenience. Logic processing codes can be easily extracted from tbl_*.php when I started to create the TableController class with these logics represented as methods.

Somethings about the tbl_columns_definition_form.lib.php
Now there is only one functions PMA_getHtmlForColumnAttributes left in the tbl_columns_definition_form.lib.php. After I figure out ways to elimate it, I will create a new PR.

What Will I Do Next

Now I have almost finished decomposing tbl_*.lib.php scripts. In next few days I will create a TableController class for handling logic processing and communicate with the Table class to fetch data. The TableController class should available at June.18th.

by jasondaurus at June 13, 2015 07:47 AM

June 11, 2015

Michal Čihař

Improved social presence for Weblate

Up to recently, the only social presence for Weblate was my personal Twitter account. It's time to change that.

You can now follow news and information about Weblate on Twitter, Facebook or Google+.

Filed under: English phpMyAdmin SUSE Weblate | 0 comments

by Michal Čihař ( at June 11, 2015 10:00 AM

June 08, 2015

Deven Bansod

GSoC 2015 : Weekly Report #4 : RFE #701, #RFE1359 & RFE#726

Week #4 Task(s) completed: RFE #701 : Print View using CSS RFE #1359 : Ctrl Navigation in JS Grid Editor Tasks worked upon: RFE #726 : Batch change Column collations Scheduled Deadline: 21st  June, 2015 Completed on: 2nd June, 2015 Details: 1. The description about RFE #701 can be found here (my previous post) [0]. 2. The RFE#1359 mentions […]

by Deven Bansod at June 08, 2015 06:35 AM

Smita Kumari

GSoC'15 week 2: upgrade to cakephp 3.0

Week two of my GSoC project is over. So, this post is to list the accomplishment of week 2 and what I'll be working in week 3.
This week, I continued the last week work of upgrading error reporting server to use cakephp 3.0. This week, I upgraded report view page, sourceforge authentication, ticketing management and stats page. I also set up new Migrations plugin, for which all the "upgrade to cakephp 3.0" work started. Migrations plugin for cakephp 3.0 is having different directory structure and work flow than previous version so I needed to set it up from scratch. For existing system, we'll need to first create initial migration that create snapshot for existing database schema, and then other migrations for new changes can be run.
Only thing that is left is setting up phpUnit. Which I'll be doing in the 3rd week week in addition to improving performance of stats page. Also, right now related reports functionality is broken a bit so I'll fix that as well.
Before starting my 3rd week work, I think we should first try merge and setup new system on main server, just to be sure there's no other issues awaiting :-).

If you want to try out the upgraded system, You can clone/download source code from this branch. Here I'm listing quick steps,  which should help in setting up. I'm not sure this is complete list of steps needed so let me know If I'm missing something or you are having some issues setting up.

1. clone the repo
2. install mbstring (required for cake 3.0)
3. install intl extension: sudo apt-get install php5-intl //(required for cake 3.0)
4. cd application_root_dir (directory inside src, config etc directories resides)
5. mkdir tmp;
6. mkdir logs;
7. ......... set permissions for tmp and logs directory ...............
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1`
setfacl -R -m u:${HTTPDUSER}:rwx tmp
setfacl -R -d -m u:${HTTPDUSER}:rwx tmp
setfacl -R -m u:${HTTPDUSER}:rwx logs
setfacl -R -d -m u:${HTTPDUSER}:rwx logs

8. rename config/app_example.php to config/app.php.
9. rename config/oauth_example.php to config/oauth.php

10. Change database settings in config/app.php
11. update github and sourceforge credentials in config/oauth.php
......For existing systems: update and run migrations  .........
sudo bin/cake migrations mark_migrated 20150607191654
sudo bin/cake migrations migrate

............For new system: just run migration........
sudo bin/cake migrations migrate

by Smita Kumari ( at June 08, 2015 06:02 AM

June 07, 2015

Madhura Jayaratne

phpMyAdmin work during thirty fifth week

The bug fixes carried out during the week was mostly on the master branch and most of them were due to the ongoing developments by GSoC students. Additionally a couple of bugs on the stable branch reported by the users were fixed. Following are the bugs fixed during the week.

Bugs fixed
#4932 Drizzle version numbers
#4936 utf8mb4 fields show only ????s for 4-byte Unicode characters after import
#4937 Custom export with backquotes off is not working
#4939 Connection input field not hidden when adding a new table
#4940 Notices in GIS visualization page
#4941 Table structure multi submit is broken
#4942 Export to gzip saves plain text under Chrome

Moreover, following bugs were investigated

Bugs investigated
#4933 INSERT validation issues with MySQL functions
#4935 Eliminate remaining occurences of eval() in phpMyAdmin to make it work on machines where eval() is disabled

On the new features front, rfe #1634 was discussed during the last IRC meeting and received the green light to be implemented. This rfe requested not to group items in the navigation panel when there is only a single group and no other items or groups in a particular sub tree.

Bug #4934 reported the shift + click to apply selected function to all rows in insert/edit page was not functioning in some browsers. Since shift + click event was non standard on browsers we decided to remove the feature altogether. This was also carried out during the week.

Feature requests implemented
#1634 Don't group tables in tree if the result has only one group
#1677 Support spatial indexes in table create form
Remove support for Shift + Click on function name to apply to all rows in insert/edit page

During the latter part of the week, I engaged in analyzing the performance issues and fixing them. This was based on the profiling carried out earlier using xdebug. I attended to table browse, insert and edit pages since they showed highest performance deterioration competed to 3.x series.

General coding improvements
Fix coding styles violations reported by PHPCS
Performance improvements for table browse, insert and edit pages

by Madhura ( at June 07, 2015 05:53 PM

Dan Ungureanu

Week 2

Today is the last day of the second week of Google Summer of Code. My task for this week was to continue working on the parser and the analyzer. Since last week, I got to rewrite a few parts of the library that required improvements, wrote unit tests that account for more than 90% of the code, wrote more explicit documentation, made sure that my code follows the PSR-2 standard, implemented new statement types (CREATE FUNCTION, RENAME, REPLACE, etc).

For the next two weeks, I planned to make use of the library I wrote during the past weeks in phpMyAdmin and refactor the code that uses it.

If you want to check out the code I wrote during the past weeks, you can find it in its repository here.

NOTE: The last commit is still “Initial commit” because I amended my last commit and did a force push.

June 07, 2015 12:00 AM

June 04, 2015

Michal Čihař

python-gammu 2.3

New version of python-gammu has been released yesterday.

The most important change is that it changes license to GNU GPL version 2 or later. This is only cosmetic change and mostly affects only Python code as the C side can not really be changed due to Gammu license.

Full list of changes:

  • License changed tp GPL version 2 or later.
  • Documentation improvements.

Filed under: English Gammu python-gammu Wammu | 0 comments

by Michal Čihař ( at June 04, 2015 10:00 AM

June 03, 2015

Madhura Jayaratne

phpMyAdmin work during thirty fourth week

This week was more a of quieter week where I focused mostly on bug fixes.

Bug #4872 was on navigation and main panel not reloading after a related change. Trying to fix this bug I realized that the related code was quite scattered and some parts outdated when ajax was introduced. The related code segments seemed quite brittle. Even though the bug was fixed these sections would benefit from refactoring.

Following are the bugs fixed during the week.

Bugs fixed
#4872 Drop table doesn't remove the table name from navigation bar
#4905 Sorting by an alias
#4920 Relation view doesn't list fields of table in other database
#4921 Textarea rows settings ignored Features > Text fields
#4923 Limits table comments to 60 characters
#4927 "Disable foreign key" doesn't work with a single query SQL file
#4929 Edit view structure doesn't load the algorithm
#4930 Database copy doesn't work for tables with more than one FULLTEXT index
#4931 False error before entering reCAPTCHA

Among the bugs that were investigated, bug #4926 reported how browsing tables chokes with a database having 30k tables. Configuration 'DisableIS' did not help either. I personally think that such a big number of tables is a corner case.

Bugs investigated
#4925 Multi table 'Empty'/'Drop' doesn't work
#4926 Browsing tables chokes on 30k tables in DB

Feature requests received little attention during the week and following are the ones implemented.

Feature requests implemented
#1672 MIME types should be lower case
Add a configuration to display/hide the comment column in db structure page

#1672 seems to be broken again in master, probably due to ongoing templating and I plan to fix it today.

P.S: This was a four day week; I was on leave on 26th May

by Madhura ( at June 03, 2015 07:57 AM

June 01, 2015

Smita Kumari

GSoC'15 week 1: perpormance improvement and cakephp upgrade

My first week of GSoC'15 project is over now. I'm gonna list down here what all did I accomplish during the last week and what I'm planning for the week starting today.
I started my project with performance improvement of error reporting server as I mentioned in my last blog and as per project timeline. phpMyAdmin's error reporting server uses cakePHP framework.
In first 2 days I was able to improve performance (page loading time) of reports landing page, report view page, incident view page and notifications page. For this to achieve, i needed to change some existing queries and remove some queries which were being executed but not used. That was because cakePhp associations was not being used properly. I also needed to add indexes on two tables, incidents(report_id) and notifications(developer_id, report_id). Here is Pull request for the same. It was just an awesome feeling to be able to use our error reporting server instantly fast, and I wanted it to go live as soon as possible so that other team members can try it.
But there were more to it before changes could be pushed to server. As per discussions on the PR, index creation on server needed to be done using schema migration plugin of CakePHP. We were using cakephp 2.x, so I had a look at schema migration but then realized to add index on a column using migration plugin of cakephp 2.x, we first need to drop the column and then create that column with index definition. so in this case we can't run the migration on production, as we will end up losing data for the column on which we are creating index. My mentor, Michal suggested to use migrations plugin of newer version of CakePHP which is 3.0 where creating migration file for adding indexes are easier, just a command away.
So now, my task was to upgrade our project from CakePHP 2.x to CakePhp 3.0. This sounded a easy task but came out to be very difficult one. CakePHP 3.0 has changed heavily compared to 2.x. I'm working on upgradation since then and I needed to change to almost every line of code. It's almost complete rewrite of the code. Till now, I am able to get reports landing page, developer login and notifications page work properly in CakePHP 3.0 framework. I have pushed the changes in a new branch.
I think, it'll take this week as well to complete the upgradation. Hopefully, at the end of this week we should be able to see the upgraded and improved error reporting server on production.
See you next week!

by Smita Kumari ( at June 01, 2015 07:23 AM

Deven Bansod

GSoC 2015 : Weekly Report #3 : RFE #701 & RFE#726

Week #3 Task(s) completed: None Task(s) worked upon: RFE #701 : ‘Print View’ using CSS. (Near completion) RFE #726 : Batch changing collation of each column in a table (Decision phase) Scheduled Deadline: 21st  June, 2015 Completed on: NA Details: 1. The RFE#701 mentions that we should rewrite the ‘Print View’ feature using pure CSS. CSS(Cascading Stylesheets) (esp. CSS3) has […]

by Deven Bansod at June 01, 2015 02:57 AM

May 31, 2015

Dan Ungureanu

Initial commit.

During this first week of Google Summer of Code I have been working on the SQL parsing library that I have to complete before continuing my work on phpMyAdmin.

Recently, I published the code I have been writing for the past weeks under a repository on my GitHub account. I decided to implement SELECT, INSERT, DELETE, UPDATE and CREATE TABLE statements first because they are some of the most used statements and analyzing their syntax helped me a lot when I sketched the first prototype.

What is interesting about these queries is that their syntax differs so much that it helped me find a balance between abstraction and performance that will help me to easily adapt current code base to implement other types of statements.

For the next week, I planned on finishing implementing the parsers for most statement types, which will let me continue my work on phpMyAdmin and start implementing it.

If you want to check out the code I wrote during the past weeks, you can find it in its repository here.

May 31, 2015 12:00 AM

May 30, 2015

Zhang Hao

The OOP & refactor project weekly report 4

Hello, in this week I have finished my works on templates of table related scripts. They are covered in PR 1700.

Files Covered In This Week

  • TableSearch.class.php
  • tbl_columns_definitions_form.lib.php
  • tbl_gis_visualization.lib.php
  • tbl_indexes.lib.php
  • tbl_relation.lib.php

Outcomes In This Week

Templates for table related scripts
Firstly, the tbl_indexes.lib.php and tbl_gis_visualization.lib.php is the two easiest for me. The most challenging script is the TableSearch.class.php, since HTML generation functions are usually reference to private helper functions and member variables by using $this. To solve this problem, I took out HTMLs from these helper functions and integrate them into where there were referenced before. Further, I kept contents from some of these function as common templates. By templating on table related scripts, it will be easier for me to move on in the next phase of work.

The Problem I am Facing

There are so many assertion on HTML tags in unit test. For example, the following code will fail the test below but it just work fine in our browser:

<form method="post"
class="create_table _form ajax lockpage">

The unit test code:

$this->assertContains('<form method="post" action="tbl_create.php" '
. 'class="create_table _form ajax lockpage">', $result);

Maybe we could use a more effective way to test front-end components (templates, pages, etc) in the future, though I haven’t figure out how to achieve this goal yet.
Could you give me some suggestions about this?

What will I Do Next

Since I have two final examations in the next week, I will leave from work temporarily until June 5th. By the moment I will start working on creating preliminary classes of table related scripts.

by jasondaurus at May 30, 2015 06:56 PM

May 27, 2015

Madhura Jayaratne

phpMyAdmin work during thirty third week

Similar to the last week I spent most of the time working on bug fixes. Additionally I spent more time on general code improvements during the week. It was mostly the bugs that led to these code improvements, i.e. while fixing bugs I went on to do some related improvements. The list of bugs fixed during the week is as follows.

Bugs fixed
#4910 Insane slow
#4911 Lock page icon is not shown after fresh reload
#4912 "Highlight pointer" and "Row marker" doesn't work properly
#4913 GROUP_CONCAT is shown as GROUPBY_CONCAT in the autocomplete in SQL Query editor
#4917 Changing time with datetime picker gives JS error
#4918 Date field popup dialog position bug
Allow accessing visual query builder when pmadb is not configured
Browse foreigners window goes out of the window

Additionally the following bugs were investigated during the week.

Bugs investigated
#4914 Navigation pane highlighting issue when in database view
#4916 Autocomplete either doesn't function at all or auto completes the original table name when joining multiple aliased tables

Bugs #4913 and #4916 were infact CodeMirror bugs and I sent pull requests to the upstream project fixing these bugs. When CodeMirror 5.3 was released with a fix for #4913 I upgraded CodeMirror to this new version. This needed some effort as CodeMirror had not been updated for some time. Moreover, custom style affecting CodeMirror was in tangle with library's CSS and this is now resolved. The same bugs also led to refactoring code segments related to syntax highlighted SQL editors across phpMyAdmin. Moreover, bug #4910 led to improve routines, triggers and event fetching code to adhere to DisableIS directive.

General coding improvements
Improve JavaScript codes related to the query chart page
Improve routines, triggers and event fetching code to adhere to DisableIS directive
Upgrade CodeMirror to version 5.3.0
Refactor code segments related to syntax highlighted SQL editors across phpMyAdmin

Following feature requests were also implemented during the period.

Feature requests implemented
#1242 Work with --skip-grant-tables
#1619 Show databases as list instead of as dropdown when no database is selected - update
#1671 Directly show table comments in structure view

by Madhura ( at May 27, 2015 10:51 AM

May 25, 2015

Deven Bansod

GSoC 2015 : Weekly Report #2 : RFE #657 & RFE#946

Week #2 Task(s) completed: RFE #657 : Alter privileges when renaming database/ tables/ fields etc. RFE #946 : Warn before changing collations Scheduled Deadline: 7th  June, 2015 Completed on: 23rd May, 2015 Details: 1. The RFE#657 mentions that we should provide an option to ‘Alter Privileges’ while renaming the database / table/ fields/ procedures etc. MySQL, on its own, does not adjust […]

by Deven Bansod at May 25, 2015 03:29 AM

May 22, 2015

Zhang Hao

The OOP & refactor project weekly report 3

During this week I updated the template system by changing its support extension to “.phtml”. Also, I have templated some scripts.

Files Covered In This Week

  • Template.class.php
  • tbl_indexes.lib.php
  • scripts/update-po
  • tbl_printview.lib.php

Outcomes In This Week

Change template extension to “.phtml”
After thinking about conversations involved in the PR 1642, I decided to change the template extension to “.phtml” since it’s clearer to show these files are used to render but not being executed. Using “.phtml” as extension has no security risk because everyone can access phpMyAdmin’s source code anywhere.
Further, I have changed a tranlation related script (scripts.update-po) to let it include template scripts.

Add tests for Template class
The problem of lack of tests for the Template class was solved.

Complete templates for db designer module
Templates on db designer was completed. Now it should be clearer!

Template for tbl_indexes.lib.php, tbl_printview.lib.php
In recent two days I complete tests on the tbl_indexes.lib.php and tbl_printview.lib.php. Their template correspond to index_form.phtml and printview directory in the templates folder respectively. Once I complete the template scripts for tbl_column_definitions.lib.php, then I will open a pull request.

What will I Do Next

I will continue working on templates of table related scripts next week.

by jasondaurus at May 22, 2015 10:46 AM

Michal Čihař

Weblate 2.3

Weblate 2.3 has been released today. It comes with better features for project owners, better file formats support and more configuration options for users.

Full list of changes for 2.3:

  • Dropped support for Django 1.6 and South migrations.
  • Support for adding new translations when using Java Property files
  • Allow to accept suggestion without editing.
  • Improved support for Google OAuth2.
  • Added support for Microsoft .resx files.
  • Tuned default robots.txt to disallow big crawling of translations.
  • Simplified workflow for accepting suggestions.
  • Added project owners who always receive important notifications.
  • Allow to disable editing of monolingual template.
  • More detailed repository status view.
  • Direct link for editing template when changing translation.
  • Allow to add more permissions to project owners.
  • Allow to show secondary language in zen mode.
  • Support for hiding source string in favor of secondary language.

You can find more information about Weblate on, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user.

Weblate is also being used as official translating service for phpMyAdmin, Gammu, Weblate itself and other projects.

If you are free software project which would like to use Weblate, I'm happy to help you with set up or even host Weblate for you.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far!

PS: The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.

Filed under: English phpMyAdmin SUSE Weblate | 0 comments

by Michal Čihař ( at May 22, 2015 08:00 AM

May 21, 2015

Michal Čihař

Translating Sphinx documentation

Few days ago, I've started writing Odorik module to manipulate with API of one Czech mobile network operator. As usual, the code comes with documentation written in English. Given that vast majority of users are Czech, it sounds useful to have in Czech language as well.

The documentation itself is written in Sphinx and built using Read the Docs. Using those to translate the documentation is quite easy.

First step is to add necessary configuration to the Sphinx project as described in their Internationalization Quick Guide. It's matter of few configuration directives and invoking of sphinx-intl and the result can be like this commit.

Once the code in repository is ready, you can start building translated documentation on the Read the docs. There is nice guide for that as well. All you need to do is to create another project, set it's language and link it from master project as translation.

The last step is to find some translators to actually translate the document. For me the obvious choice was using Weblate, so the translation is now on Hosted Weblate. The mass import of several po files can be done by import_project management command.

And thanks to all these you can now read Czech documentation for python Odorik module.

Filed under: Coding English Odorik Weblate | 0 comments

by Michal Čihař ( at May 21, 2015 04:00 PM

May 20, 2015

Michal Čihař

Odorik modul 0.4

Dnes jsem vydal novou verzi Python modulu Odorik. Přidává spoustu užitečných vlastností pro zjištění stavu účtu.

Jako bonus k tomuto vydání je dokumentace přeložená do češtiny za použití Weblate.

Filed under: Coding Czech Odorik | 0 comments

by Michal Čihař ( at May 20, 2015 04:00 PM

Smita Kumari

GSoC'15 - awaiting another summer with phpMyAdmin

Yay! another year of Google summer of code project and again with phpMyAdmin :-). First, I would like to thank all the awesome phpMyAdmin mentors for accepting my project proposal and giving me yet another opportunity to work on a GSoC project.
Last summer, it was an awesome time working on automated normalization and central list of columns features of phpMyAdmin with help of Marc, he had been amazing mentor and really learnt a lot from him.

This time my project is to improve the Error reporting server of phpMyAdmin in terms of performance, scalibility, ease of use and functionality. Error reporting server is used to collect and manage the error reports submitted by users. I hope to make it usable. I am awaiting a fun filled coding summer ahead under the guidance of my this year mentor Michal Čihař.

Keep checking out this space for my this year GSoC project progress, those might be boring read but will try make it a bit informative! :-)

by Smita Kumari ( at May 20, 2015 03:47 PM

May 18, 2015

Michal Čihař

Python modul pro Odorik

Pokud náhodou použáváte operátora Odorik, mohl by se vám hodit můj nový modul pro Python. Dokonce ani nemusíte umět Python, dá se použít i přímo z příkazové řádky.

Funkčnost je zatím velmi jednoduchá, ale čase určitě přibudou další užitečné funkce (nebojte se mi nahlásit nápady).

Zjištění zůstatku na účtu:

$ odorik balance
balance: 123.45

Zjištění aktuálního využití dat:

$ odorik mobile-data --phone 00420789123456
bytes_total: 111593707
bytes_down: 87039672
bytes_up: 24554035
price: 0

Odeslání SMS zprávy:

$ odorik send-sms 00420789123456 "Ahoj, jak se mas?"

Více příkadů naleznete v dokumentaci.

Filed under: Coding Czech Odorik | 0 comments

by Michal Čihař ( at May 18, 2015 04:00 PM

Deven Bansod

GSoC 2015 : Weekly Report #1 : RFE #1485

Hi, as I had posted here, I have been selected for GSoC 2015 with phpMyAdmin and will be working on project ‘Feature Request Project Enhancments’ mentored by Isaac Bennetch. The official GSoC 2015 timeline suggests that the project coding-up period starts on 25th May, but I had started to work on project on 6th May, […]

by Deven Bansod at May 18, 2015 08:08 AM

Madhura Jayaratne

phpMyAdmin work during thirty second week

The main highlight of the week was the two security issues handled during the week. I was after some time a security issue was reported and in fact there was only on security issue reported prior to these in 2015. As the security coordinator I handle communicating with reporters, obtaining CVE IDs, preparing security announcements and part of the fixing as well. We had to port the changes to 4.0, 4.2, 4.3 and 4.4 since all these series are supported for security fixes. The issues were,

Security issues
#4899 CSRF in setup
#4900 Man-In-the-Middle - Github API

The usual bug fixing continued during the week. An old bug, #4367 Import status infinite loop, received attention and was fixed sine it was reported to be still present in the current stable version. Moreover, a couple of bugs related to designer was fixed.

Bugs fixed
#4367 Import status infinite loop
#4512 ForceSSL Redirect Check
#4898 JS error after selecting a field and press Enter
#4902 Designer: Loading does not work
#4904 Setup: Overview > Display does not work
#4906 Designer: pages from all databases
Escape database and table names for partition maintenance

Feature request #1242 Work with --skip-grant-tables, was investigated and this seems to work for most part in the current master branch. Additionally, following feature requests were fixed,

Feature requests implemented
#1668 Procedures window shift-click should select multiple rows
#1669 Designer: "Sticky" menu option
Allow truncating partitions in partition maintenance

Feature requests investigated
#1242 Work with --skip-grant-tables

Improvements were done to the code segments related to partition maintenance. Further, filter_input s were removed from code since they bypass token check, posing a security threat.

Code improvements
Improve partition maintenance functionality
Quit using filter_input since they bypass token check

by Madhura ( at May 18, 2015 02:44 AM

phpMyAdmin work during thirty first week

I am sorry this post comes quite late, almost a week after the thirty first week has ended. I thought of combining this with the next week report but later decided to have separate posts for each week to be able to track work done during individual weeks.

Again, bug fixes were the predominant operation during the week and some of these bugs were reported by myself. So, following are the bugs fixed during the period.

Bugs fixed
#4885 Some icons are above the overlay of jQuery dialogs
#4886 Clicking on external links in advisor rules give JS error
#4887 Name column excluded from quick filters in central columns
#4888 Filter in central columns does not work in other languages
#4890 'window.webkitStorageInfo' & 'webkitIndexedDB' is deprecated
#4891 CSV Import ignores "Replace table data with file" checkbox
#4892 Undefined variable: unique_conditions
#4894 Deleting without confirmation
#4896 Non-styled error page when following results link

I also engaged in implementing new features. 
MariaDB website offers a service to analyze the output of 'Explain' queries. So, as requested in rfe #1413, phpMyAdmin now allows to post the output of 'Explain' queries to this service and get a better understanding. The new link is shown when you click on 'Explain SQL' link is clicked. I also added multi submit operations to the routines, triggers and events pages. With this the user is able to export and delete muple rte items.

Feature requests implemented
#1413 Explain analyzer
UI improvements to the `Processes' page
Multi submits for RTE pages
Use CodeMirror editor in query

Feature requests investigated
#548  Cross-tablulation/pivot table
#1451 HTML5 input tag enhancements

I investigated a quite old rfe #548 which requested for a pivot table functionality in phpMyAdmin. I found a couple of interesting third party pivot table libraries that operate on JavaScript level which can be integrated with phpMyAdmin. However, these libraries would not be able to handle large datasets and break the purpose of a pivot table. Moreover, since there are quite a lot of applications that does this work now a days we thought this is out of scope for phpMyAdmin.

by Madhura ( at May 18, 2015 01:54 AM

May 14, 2015

Zhang Hao

The OOP & refactor project weekly report 2

Hello everyone, one week soon come to an end, and here is my weekly report on what did I do in the last week. During last week, I was working on the Template class and try to fix the test problems in the PR 1642.

Files Covered In This Week

  • PMA_SystemDatabase_test.php
  • PMA_DatabaseInterface_test.php
  • Template.class.php

Outcomes In This Week

Introduce trim($string) to Template class
public static function trim($string)
public function render($data = array(), $trim = true)

I implemented a trim method for Template class because I found Javascript often reference value of HTML tags. Sometimes there may have some whitespaces in these tag values (Perhaps, for better readability of template codes), then we cannot get correct value of that tag by using $().html() in Javascript.
The trim method is default applied to all templates after it gets rendered. If you don’t want it be trimed, you can simply set the boolean field $trim in render method to false.
The trim method is designed to be static, so it can also be used as an utility for trim spaces in HTML pages.

Fix on PR 1642
Firstly I feel so sorry for taking so long to fix the problem of the pull request. I over estimated my knowledge on the phpunit test framework, eventually I have to spend a lot of more time to learn how to use it again.
Tests involve functions originally in tbl_views.lib.php was moved from PMA_tbl_views_lib_test.php to PMA_SystemDatabase_test.php and PMA_DatabaseInterface_test.php.

What will I Do Next

In next few days I will submit my works on template of the Designer Module. Also, I will post a new blog on dependency calculation on TableSearch.class.php.
The major job in next week will be starting template on table related scripts.

by jasondaurus at May 14, 2015 08:05 PM

May 12, 2015

Michal Čihař

python-gammu 2.2

After recent porting python-gammu to Python 3, it was quite obvious to me that new release will have some problems. Fortunately they have proven to be rather cosmetic and no big bugs were found so far.

Anyway it's time to push the minor fixes to the users, so here comes python-gammu 2.2. As you can see, the changes are pretty small, but given that I don't expect much development in the future, it's good to release them early.

Filed under: English Gammu python-gammu SUSE Wammu | 0 comments

by Michal Čihař ( at May 12, 2015 10:00 AM

May 07, 2015

Zhang Hao

The OOP & refactor project weekly report 1

After a whole week of work, I have almost finished the job of first phase — calculate dependencies. Firstly I used automated tools like doxygen and phpstorm to determine where the functions is called. Then I can decide how to refactor it.

Files covered in this week

  • tbl_chart.lib.php
  • tbl_indexes.lib.php
  • tbl_relation.lib.php
  • tbl_printview.lib.php
  • tbl_gis_visualization.lib.php
  • tbl_columns_definition_form.lib.php
  • Table.class.php

But the works on tbl_relation.lib.php and Table.class.php are not finished yet. Also the TableSearch.class.php will be covered in less than 2 days.

Outcomes in this week


Function to get html for displaying table chart


Function to get the name and type of the columns of a table

Function to handle the creation or edit of an index

Function to get the sql query for index creation or edit

Function to prepare the form values for index

Function to get the number of fields for the form

Function to get form parameters

Function to get html for displaying the index form


Get table related parameters from $_REQUEST object

Get header cells for showing table

Function for moving, load all available column names

Get row data for regenerating previous when error occurred

Get submit properties for regenerating previous when error occurred

An error happened with previous inputs, so we will restore the data * to embed it once again in this form

Get form parameters for old column


Returns a modified query iwht only the label column and spatical columns

Formats a visualization for the GIS query results

Generate visualization for GIS query results and save it to a file

Notes on Table.class.php

I suggest that PMA_Table should be created by PMA_DatabaseInterface::getTable($db, $table) and the PMA_DatabaseInterface objecct should be injected as a parameter in constructor. And there will be some changes for the class:
These functions are used to handle errors or messages in an array, but we can use a throw statement for that

  • getLastError
  • getLastMessage

These functions are not used, so we can remove them:

  • set
  • get

These functions are static methods, and we needs to make them a member function

  • isView
  • isUpdatableView
  • analyzeStructure
  • isMerge
  • getStatusInfo
  • countRecords

These functions are not table related actions. They are UI related actions, therefore I’d like to move them into other classes (maybe PMA\Template?)

  • getUiProp
  • setUiProp
  • removeUiProp

The public $cache property should be moved into PMA_DatabaseInterface.

That’s all for this week! I will fix issues mentioned by my mentor in the PR 1642 as soon as possible.

by jasondaurus at May 07, 2015 08:24 PM

May 06, 2015

Michal Čihař

This was Sri Lanka

We've spent beautiful weeks on Sri Lanka in January and February. On the way we've seen many different places - ancient cities, mountains, natural parks or beaches. Here comes selection of photos which I like most.

Filed under: English Photography Travelling | 0 comments

by Michal Čihař ( at May 06, 2015 10:00 AM

May 02, 2015

Zhang Hao

Details on the “OOP and refactoring” project

As it mentioned in the phpMyAdmin GSoC 2015 idea list, the project is majorly about refactoring the code base to object-oriented. But I’d like to take one more step. I am going to build a basic template system first, which is helpful for our refactoring process.

Simple template system

As the HTML response are treated as PHP strings now, it’s pretty horrible to maintain such a long-long string variable. We can never know whether the HTML in it is correct or not until we execute it. So our first task is to build a basic template system. It is not necessary to apply the template system to the whole phpMyAdmin project immediately, but we can use it to manage codes that we needed to refactor this time easily.

You can see the template branch in my fork for more detail:

It create a PMA_template method in libraries/template.lib.php and I’ve applied this feature to the designer module. Here is the commit information:

The designer module should be much “clearer” now.

It should be noticed that the template system is isolated from phpMyAdmin current codebase. That is, the introduction of template system is painless and it just makes it easier for us to refactor codes. After refactoring, the HTML strings should be moved out from the Table related scripts and form template scripts.

Object-oriented design and refactoring

Currently our logical functions are separated in files with “.lib” and “.class” postfixes. But most of these files are poor designed and needs to be refactored. As the idea list specified, the project is pretty huge and it’s open-ended. So I’d like to separate the task into three steps:

Build a source code dependency graph for files involved in the refactoring project
It’s worthwhile to make a detailed plan before we start working. That is, for this project, we need to build a source dependency graph with details of functions we needs to refactor. A source dependency graph should contains the following things:

  1. Dependencies of the function
  2. Callers of the function
  3. Classification of the function
  4. A brief description on the function

Since the project is so huge that we can hardly handle all of files in this project, we should control our scope in Table related functionalities in the project. During this duration, we will also create template scripts to extract HTML strings from php codes.

Packaging the relative functions into classes

After we building the source code dependency graph, we can safely move the functions into classes. We can apply some object-oriented design pattern in this step, but it just only a little. Actually, all we need to do in this step is just putting the functions into the related classes, just like the way figured out in the Table class:

We can reserve some procedural features in this step for convenience.

Refining classes

After the classes have been built, we need to refine them with some OO design patterns. For the Table class we have talked above, we can package the $db and $table parameters into the class as private members for re-usability. And the ways to refactor the class structures is depended on the features of specified class.

To make a class well-designed, we can apply following few steps for each class:

  1. Encapsulate relative variables to keep the API concise
  2. Pick redundant parameters in member functions and make them be private members
  3. Extract duplicated pieces of code and put them into member functions

But when we refining these classes, we should always remember that it’s important to keep the code base simple and clean. So we must not over-design these classes. Basically I think the factory pattern is good enough for our project this time.


  1. A simple template system
  2. A source dependency graph for relative files
  3. Well-designed, and OOPed classes

by jasondaurus at May 02, 2015 04:37 PM

May 01, 2015

Madhura Jayaratne

phpMyAdmin work during thirtieth week

The highlight of this week was the coding style improvements I undertook. During the last upgrade to the CheckStyle rules, there were couple of new rules added and these had increased the number of style violations. Moreover, day to day coding had introduced new violations and the violation count was 800+. I spent pretty much two days fixing these issue and the following graph shows the improvements to the code.

I also worked on improving the Designer during the week. While working on this I found a number of issues with the designer and went on to report them and eventually fix them. The list of bugs fixed during the week consists mostly of these bugs. Following bugs were fixed/investigated during the week.

Bugs fixed
#4878 Column list of central columns is not cleared
#4879 Exit full screen in Designer does not change the button text
#4880 Designer icons missing when using original theme
#4881 jQuery dialogs in Designer are not displayed in full screen
#4883 Search function breaks when searching for certain combinations of backslashes and slashes
Fix resize icon in Designer
Fix inconsistent icons

Bugs investigated
#4872 Drop table doesn't remove the table name from navigation bar
#4874 Username like john_smith is split to two names in dropdown list

I also worked on a couple of feature requests during the week. One of them was on supporting MariaDB virtual columns. However this was postponed as our current parser was unable to recognize virtual column syntax and this was vital for extracting column details. This will hopefully be implemented during the summer when one of the GSoC students attend to the parser. See

With the implementation of feature request #1380, the SQL editor support parametrized queries. Now you can simply copy paste queries from your code and bind parameters before query execution. Additionally, towards the end of the week I went on to improve the original theme. The jQuery dialogs in original theme always looked alien to me and with the latest style changes they are in better harmony.

Feature requests implemented
#1380 Support for Parameters with raw SQL
Improve table maintenance page
jQuery-ui style updates for original theme

Feature requests investigated
#1517 Support for virtual/persistent columns
#1628 need "display binary as hex/string" option in Settings UI
#1633 User Preferences reset should clear the value in pma__userconfig

by Madhura ( at May 01, 2015 01:15 PM

April 28, 2015

Madhura Jayaratne

phpMyAdmin work during twenty eighth and twenty ninth weeks

Here I am combining the work done during two week into a single blog post. Since GSoC rush was somewhat over I started attending to bugs again. However, I was on leave on 16th April to celebrate Sinhala new year.

Following are the bugs attended during the two weeks.

Bugs fixed
#4207 json_encode error , because strftime return string is not utf8 in Windows 8.1 Chinese version
#4794 Server error viewing table content
#4849 Functions accessed from navigation do not load on ajax dialog
#4850 Relation view on 1920
#4851 PHP errors in login dialogue
#4853 Relation view between 1600 and 1780 px
#4859 Don't scroll (to bottom) when editing multiple rows
#4862 Misaligned Inline edit field
#4866 Limit column dragging in index edit dialog
#4869 Drop column action not asking to confirm
#4870 Inconsistency in 'Ignore' checkbox in insert page
$meta->decimals is not available for mysql extension
Fix issues related to number of decimal places in time

Bugs investigated
#3270 Revoking privileges when you lack 'ALL PRIVILEGES' yourself
#3481 Designer relations in IE 8
#3588 X-WebKit-CSP Header breaks Safari 5.1
#4510 QBE generates wrong query
#4795 Query builder: missing joint for the intermediary table
#4854 "Error: Token mismatch" when using multiple servers in parallel
#4856 Error with PMA_DisplayResults->getTable()
#4858 issues with SQL autocomplete
#4871 Error on creating table

Similar to earlier weeks, I also attended to a set of feature requests. Among feature requests implemented, notables ones are the transformation for IPv6 addresses and support for CHECKSUM TABLE operation. Transformation for IPv6 was implemented as both output and input transformation.

I also worked on schema import from mysql workbench output files. Work on this is still underway.

Feature requests implemented
#433  Import/export of meta data (relations, MIME, etc.)
#1639 Add grouping to stored procedures in the navigation tree
#1655 Support IPv6 browser transformation
#1656 Edit vs Change
#1661 Support checksum table
Input transformation - ip to binary
Icon for columns with indexes / identify keys in structure snapshots
Option groups for 'With selected' dropdown in database structure page
Set maximum length for fields based on mysql name sizes

Feature requests investigated
#862  Group dbs/tables by regexp
#913  Import schema from Mysql Workbench
#1657 Single-line vs multi-line edit fields
#1659 Display the CREATE TABLE statement like HeidiSQL

Moreover, I did a couple of code improvements.

Coding improvements
Properly identify types in doc comments

by Madhura ( at April 28, 2015 06:16 AM

Deven Bansod

Project Details : Feature Request Project Enhancements

Hi, as I posted earlier, my project ‘GSoC 2015 Feature Request Enhancements‘ got selected with phpMyAdmin in Google Summer of Code, 2015. This are some details about the project : Project Details The project aims to provide some added functionality to the users in the above mentioned areas. The project involves implementing these RFEs over […]

by Deven Bansod at April 28, 2015 03:19 AM

Selected for GSoC 2015 with phpMyAdmin

Hi all, The list of accepted projects for Google Summer of Code, 2015 [0] was published yesterday (i.e.) 27th April, 2015. My project ‘GSoC 2015 Feature Request Enhancements’ submitted to phpMyAdmin[1] has been selected. Seeing my name up there and recieving the mail regarding my selection was one of the happiest moments of my life. […]

by Deven Bansod at April 28, 2015 03:11 AM

April 27, 2015

Dan Ungureanu

Hello, world!

Hello, world!

I am one of the participants in this year’s Google Summer of Code. During this summer, I will be working with the phpMyAdmin team to rewrite the SQL parser that is used in analyzing queries. My project’s title is “Parser and Analyzer Rewrite” and as the name suggests, the purpose of it is to rewrite a better SQL parser and analyzer that will be implemented in phpMyAdmin by the end of the summer. During this summer, Marc Delisle, who is one of the maintainers of phpMyAdmin and my mentor, is going to review my work.

To get a better idea of what my project consists, you can read the abstract of my proposal that can be found on Google Melange website here and a copy of my entire proposal, which can be found here. I hope it will serve well any students that are planning to participate in GSoC next years.

April 27, 2015 12:00 AM

April 15, 2015

Michal Čihař

Packaging python-gammu

After Monday release of separate Gammu and python-gammu, the obvious task was to get the new package to distributions.

First I've started with Debian packages, what was quite easy as from quite complex CMake + Python package it is now purely CMake and it was mostly about removing stuff. Soon the updated Gammu package was uploaded to experimental. Once having that ready, I've also update the backports for Ubuntu and these are available in Gammu PPA. Creating new python-gammu package was a bit harder as this is the first Python 3 compatible package I've created, but it's now ready and sitting in the NEW queue.

While working on python-gammu package, I've realized that some of the data used in testsuite are missing in the tarball. While not being critical, this is definitely not nice, so I've decided to release python-gammu 2.1 today. It also includes fixes for some corner cases found by coverity.

For openSUSE the packaging was quite easy as well, stripping out unneeded parts of Gammu package went smoothly and it's now in hardware project, SR to Factory is pending. With python-gammu it turned out to be much harder as the testsuite had failed there with some strange error coming out of libdbi. After looking deeper into it, the problem is in new return type available in Git snapshot openSUSE is shipping. Fortunately producing fix was quite easy, so next Gammu upstream will handle that properly and package in hardware project is already patched. You can now use python-python-gammu from devel:languages:python and SR to Factory is pending as well.

Filed under: Debian English Gammu python-gammu SUSE Wammu | 0 comments

by Michal Čihař ( at April 15, 2015 10:00 AM

April 14, 2015

Michal Čihař

Hacking Gammu

I've spent first day of SUSE Hackweek on Gammu. There are quite many tasks to be done and I wanted to complete at least some of them.

First I started with the website. I did not really like the old layout and aggressive colors and while touching it's code it's good idea to make the website work well in mobile devices. I've started with conversion to Bootstrap and It turned out to be quite easy task. The next step was making the pages simpler as in many places there was too much information hidden in sidebar. While doing content cleanup, I've removed some features which really don't make much sense these days (such as mirror selection). Anyway read more in the news entry on the site itself.

Second big task was to add support for Python 3 in python-gammu. It seems that world is finally slowly moving towards Python 3 and people started to request python-gammu to be available there as well. The porting itself took quite some time, but I've mostly completed it before Hackweek. Yesterday, there was just some time spent on polishing and releasing standalone python-gammu and Gammu without python bindings. Now you can build python-gammu using distutils or install it using pip install python-gammu.

Filed under: English Gammu python-gammu SUSE Wammu | 0 comments

by Michal Čihař ( at April 14, 2015 06:30 AM

April 10, 2015

Madhura Jayaratne

phpMyAdmin work during twenty seventh week

During the week I attended both bug fixes as well as feature requests. To the latter part of the week I also attended some coding style improvements.

Among the bugs that were fixed, fixing output buffering was interesting. Since, I wasn't very familiar with the output buffering used in phpMyAdmin this was a good learning experience for me as well. Here, the issues was to use output buffering for CSS and JS. I modified the PMA_OutputBuffering class to accommodate output buffering for CSS, static and dynamic JS.

Here are the list of bugs fixed and investigated during the week.

Bugs fixed
#4829 Create procedure via SQL Editor not more possible
#4833 CSS and Javascript are not compressed
#4841 Status page: Mislukte pogingen per uur value is incorrect
#4848 Trigger sql with delimiters maxes out cpu resources
MIME Transformation link fixed

Bugs investigated
#4757 Error: Token mismatch
#4787 If mysql server default timezone is not set(by default), Phpmyadmin export wrong timestamp and timezone combination
#4847 Some query take very long time

The ability to export metadata was implemented as requested in  RFE #1632. These metadata are the data in configuration storage related to databases or tables being exported. With this one would be able to do a complete export and see the full state reinstated. Additionally the ability to copy multiple rows were implemented. 

The feature requests for the week were

Feature requests implemented
#1632 Importing and exporting pMA meta-data
#1643 No SQL query for loading data
#1646 Metro theme design update
#1650 Support a default page in designer
#1651 Allow copying mutiple rows
#1653 New data validation feature and datetime type

Feature requests investigated
#1645 MIME Transformation Imagelink and link - repairs and idea
#1648 Metro theme - table background style
#1654 After login session expires, restore navigation pane

Previously the designer loaded the first designer page for the database. Now it looks for page by the name of the database to load as default and falls back to old behavior in the absence of such a page.

Coding style improvements
No longer use global variables in schema export plugins

by Madhura ( at April 10, 2015 04:39 PM

April 05, 2015

Madhura Jayaratne

phpMyAdmin work during twenty sixth week

During this week I was back to bug fixing. This is mainly because the GSoC application deadline has passed and the pull request rush from potential GSoC students have declined. So I had a look at the bug tracker and did some cleaning up and fixing. Here are the bugs fixed during the week.

Bugs fixed
#3292 Incoherent backup generated
#4067 Import Resume at breakpoint failure
#4754 pMA DB not detected properly
#4821 Timed-out import fails to restart when file represented
#4825 Datepicker missing when changing number of rows on Insert page
#4828 JavaScript is loaded in wrong order
#4831 Recaptcha API v2
#4832 Sorting distinct values result loses links
#4834 Do not attach token to css requests to improve caching
#4835 PMA_hideShowConnection not called after submit_num_fields
#4836 server warning after moving from console to Direct clicks

Apparently, allowing users to resubmit import files when import fails due to timeout has been broken for some time. Now that it is fixed user is presented a link to click when the import hits timeout and this link takes the user to import interface to resubmit the file with parameters carrying the details of where to restart the import from.

Additionally following bugs were investigated.

Bugs investigated
#3689 Variable 'character_set_client' can't be set
#4827 TEXT formatting doesn't work after editing
#4826 Two inline edit windows
#4829 Create procedure via SQL Editor not more possible 

Feature requests received relatively less attention during this week. I started working on supporting .xz compression. I did most of the work and a pull request for the same is was submitted. However, I had a hard time installing and configuring xz compression im my environment and wasted almost half a day trying. So I have to get someone else's help to test my PR.

Feature requests implemented
#1621 Add support for xz compression
#1635 Have ZeroConf create phpmyadmin DB if possible

Feature requests investigated
#862  Group dbs/tables by regexp
#1633 User Preferences reset should clear the value in pma__userconfig

by Madhura ( at April 05, 2015 04:53 PM

April 02, 2015

Michal Čihař

GSoC 2015 applications for phpMyAdmin

As usual, I look at the application stats for phpMyAdmin just after student application period of Google Summer of Code is over.

First of all we got way more proposals than in last years, but also number of bogus proposals went up (you can see them as ignored in the chart).

Same as in past years, people leave the submission to the last moment, even though we encourage them to submit early so that they can adjust the application based on our feedback. But still we got more than half of the proposals in last three days.

Number of applications over time

Anyway we're just working on evaluation and will finalize it in upcoming days. Of course you will know the results from Google on April 27th.

PS: You can compare to our 2014, 2013 and 2012 numbers.

Filed under: English phpMyAdmin SUSE | 0 comments

by Michal Čihař ( at April 02, 2015 04:00 AM

April 01, 2015

Madhura Jayaratne

phpMyAdmin work during twenty fifth week

During the week I attended to a mix of feature requests and bug fixes. Following are the feature requests implemented and investigated.

Feature requests implemented
#354  PDF schema sort options
#933  Manage multiple variable in bookmarked query
#947  Show edit/delete also when there is calculated column
#1619 Show databases as list instead of as dropdown when no database is selected

Feature requests investigated
#942 Table flush for NDB

With rfe #933, phpMyAdmin now support multiple variables in bookmarked queries. The placeholders should be in the format [VARIABLEN] where N is the index of the variable. For backward compatibility [VARIABLE] is considered  equal to [VARIABLE1] for backward compatibility.

Another long awaited feature was the ability to edit/delete columns when there is a calculated column. Earlier even though a primary or a unique key was present in the results set, the presence of a column with a function applied removed the ability to delete, edit and inline edit the row. Now this is supported and inline editing is not allowed for the function column.

Additionally following bugs were fixed during the week.

Bugs fixed
#4781 "Requery" bookmark from console does not work
#4805 Inline edit broken when using functions in query
#4814 MySQL 5.7.6 and Databases
#4815 Infinite calls to index.php
#4819 Request URI too large
Use 'server' parameter in console to work in multi server environments
Missing tooltip in monitor
Missing sort icons in monitor

Additionally, I took a couple of hours to fix some of the Scrutinizer error reported.

Code improvements
Fix code style errors reported by Scrutinizer

by Madhura ( at April 01, 2015 07:48 AM

March 27, 2015

Michal Čihař

Porting python-gammu to Python 3

Over the time I started to get more and more requests to have python-gammu working with Python 3. Of course this request makes sense, but I somehow failed to find time for that.

Also for quite some time python-gammu has been distributed together with Gammu sources. This was another struggle to overcome when supporting Python 3 as in many cases users will want to build the module for both Python 2 and 3 (at least most distributions will want to do so) and with current CMake based build system this did not seem to be easy to achieve.

So I've decided it's time to split python module out of the library. The reasons for having that together are no longer valid (libGammu has quite stable API these days) and having standard module which can be installed by pip is a nice thing.

Once the code has been put into separate git module, I've slowly progressed on porting to Python 3. Most of the problems were on the C side of the code, where Python really does not make it easy to support both Python 2 and 3. So the code ended up with many #ifdefs, but I see no other way. While doing these changes, many points in the API were fixed to accept unicode stings in Python 2 as well.

Anyway, today we have first successful build of python-gammu working on both Python 2 and 3. I'm afraid there is still some bug leading to occasional segfaults on Travis, but not reproducible locally. But hopefully this will be fixed in upcoming weeks and we can release separate python-gammu module again.

Filed under: English Gammu python-gammu Wammu | 0 comments

by Michal Čihař ( at March 27, 2015 05:00 PM

Spring is here

Finally winter seems to be over and it's time to take out camera and make some pictures. Out of many areas where you can see spring snowflakes, we've chosen area Čtvrtě near Mcely, village which is less famous, but still very nice.

Filed under: English Photography Travelling | 0 comments

by Michal Čihař ( at March 27, 2015 05:00 AM

March 25, 2015

Madhura Jayaratne

phpMyAdmin work during twenty fourth week

The highlight of the week was updating metro theme to be compatible with upcoming phpMyAdmin version 4.4. The decision to have an alternative theme was made at this months online team meeting and metro theme was selected for this upgrade since most people preferred it and it happened to be color blind friendly.

My approach to update the theme was to basically go through all the commits related to styling changes since 2013 (when metro theme was up to date). This was to make sure that no layout styling goes unnoticed. However, this was quite time consuming. I also went on to style some of the jQuery dialogs, so they are in harmony with the rest of the application. All the commits related to the theme upgrade can be found at

Even though metro theme had its sprite generated most of its original icons were missing. So I decomposed the sprite image to get the individual icons. However, when regenerating sprites with all the images a part of sprites looked washed out. I am attending to this issue right now.

During the latter part of the week I also attended to some bugs. Here are the bugs that were fixed.

Bugs fixed
#4802 Changelog page is not working
#4804 Undefined Index after export schema
#4806 Unable to work with two different databases in two tabs
#4810 Broken find and replace
#4812 Issues with index dialog while creating a table
Fix missing title for MySQL documentation

Moreover, following feature request related to specifying indexes while creating table was implemented. Meantime I went on to clean up the code related to this feature.

Feature requests implemented
#1626 Display/edit index name

by Madhura ( at March 25, 2015 03:13 PM

March 18, 2015

Madhura Jayaratne

phpMyAdmin work during the twenty second and twenty third weeks

I was on leave on the first three days of the twenty second week. So here I am combining the work done on the rest of the twenty second week and twenty third week into a single blog post. 

During the two week I attended to bugs, new features, unit testing as well as to general coding improvements. Following are the bugs fixed during the period.

Bugs fixed
#4758 Firefox with auth_type to http with multiple server doesn't work anymore
#4779 PMA_Util::parseEnumSetValues fails on enums with UTF-8 values
#4789 Views aren't dropped when copying a database
#4790 DROP TABLE/VIEW IF EXISTS are not tracked
#4791 Zoom search: js error
Compatibility with central columns of version 4.4

Bug #4789  was figured out while attending to a feature request related to tracking and bug #4758 arose from another fix from infamous 'Token mismatch' problem.

Following are the feature requests I worked on during the period. Pagination for GIS visualization was necessary as visualizing all the data from the table made the browser unresponsive when there were lot of data.

Feature requests investigated
#900 Add one option to disable SQL_CALC_FOUND_ROWS
#1300 tracking changes of store proc, triggers, events

Feature requests implemented
#1306 add lock tables, disable keys options
Pagination for GIS visualization

During the period I attended to a number of improvements in the central columns page. I changed how the 'extra' column is handled and now it stores value as a comma separated value which is readily compatible with data from older version. I also rewrote most of the unit test related to central columns and attended to fix UI inconsistencies I detected on the page.

Unit testing
Rewrite unit tests related to central columns

Code improvements
Improve `extra` value handling in central columns
UI improvements to central columns page
Being able to use multiple servers at the same time when using cookie auth
Metro theme upgrade to be compatible with 4.4 

While looking into a feature request regarding the ability to use multiple servers simultaneously I figure out we need to have initialization vectors per server and added it. This was later ported to QA_4_4 branch. At the online team meeting it was decided to update metro theme to be compatible with the upcoming version 4.4 and I started working on that. I am continuing this work to the next week.

by Madhura ( at March 18, 2015 02:38 AM

March 13, 2015

Deven Bansod

RFEs and Bugs!

Hi all, As I stated in my previous post, I started to contribute to phpMyAdmin from last few weeks. And these last weeks have been quite eventful and wonderful. The basic way to contribute to majority of the open-source projects is to take a cue for the project developers and start with some basic bugs […]

by Deven Bansod at March 13, 2015 12:03 PM

March 07, 2015

Deven Bansod

phpMyAdmin – A new Beginning in Open Source Contributions!

Hi all, I am back after a long time once again. After a series of bug fixes for WordPress Meta, I have recently started to contribute to phpMyAdmin project. I will continue contributing to WordPress as well but for now, I am excited about phpMyAdmin. phpMyAdmin provides a web interface to MySQL and is widely […]

by Deven Bansod at March 07, 2015 01:43 PM

March 02, 2015

Michal Čihař

Gammu 1.35.0

Gammu 1.35.0 has been just released. This is just bugfix release to fix some major issues introduced in 1.34.0.

Full list of changes:

  • Fixed encoding of UTF-8 for higher code points.
  • Improved provided udev rules.
  • Fixed possible lock while getting network status in SMSD.
  • Various localization updates.

You can download it from

I will not make any promises for future releases (if there will be any) as the tool is not really in active development.

Filed under: English Gammu Wammu | 0 comments

by Michal Čihař ( at March 02, 2015 05:00 PM

February 27, 2015

Madhura Jayaratne

phpMyAdmin work during the twenty first week

Continuing from the previous week I focused more on feature requests. However this did not prevent me from fixing couple of bugs. Most of these bugs were noticed while I was doing something in phpMyAdmin and fixed them immediately. So following are the bugs fixed during the week.

Bugs fixed
#4760 Cannot re-import settings from local storage
#4767 Drizzle: undefined index in
#4777 Some images are missing in Designer for original theme
#4778 SQL error when database list is sorted by additional columns
#4780 Notice when timestamp column does not have default value

From the feature requests implemented rfe #501 regarding the SSL grant option when creating users was due for a long time. Now you can require that the user connect with SSL or specifically X509 or even more specifically with other options. 

Feature requests implemented
#501  Support for SSL GRANT option
#1207 Export users associated with a specific schema/database
#1327 Hide 'Add user' link if user does not have privileges
#1441 Add regexp match when using AllowArbitraryServer
Change tracking activation status from db level tracking page
More default transformations for pmadb

Feature requests investigated
#1182 Use Hex/WKT for Geometry Export columns

Meanwhile, I also worked on some JS coding style improvements.

Code improvements
JS code style improvements

by Madhura ( at February 27, 2015 05:20 PM