phpMyAdmin SQL Statement error import.php: Missing parameter: import_type, import.php: Missing parameter: format

This problem and it’s solutions have been well documented.  Unfortunately, none of those solutions worked for me.

Problem / Possible Symptoms

  • Search doesn’t work or returns no results
  • SQL statements and imports produce an error that says something like “import.php: Missing parameter: import_type,  import.php: Missing parameter: format”
  • In framed mode, the “main” frame gets confused and frames open in their own tabs

Solutions

  • Most of the known solutions are here: http://wiki.phpmyadmin.net/pma/FAQ_2.8
  • My solution: do not use subdomain “www” in browser when accessing phpMyAdmin (instead of http://www.dlcware.com/phpMyAdmin/ I used http://dlcware.com/phpMyAdmin)

This might be a no-brainer to some of you but it had me stumped forever.  Hopefully this can help someone as ignorant as me.

 

SAP Crystal Reports Install Error 1066: could not access network location \ASP.NET Client files

I Googled around and read several solutions.  The answer for me was found at: http://jbickford.com/2011/02/16/crystal-reports-runtime-64-bit-error-1606/

I had already thought to run with extended priveleges.  However the right-click menu on the msi file did not have a “run as administrator” option. 

The solution was to run a shell (cmd.exe) as an administrator and then execute the msi from the command line.

Thanks to jbickford.

Enable SSH / SFTP option for WordPress Upgrades and Plugin Installs

If you have a server that does not support FTP and want to use the WordPress Auto-Update features you’ll need to do a few extra things to get it all working.

Out-of-the-box WordPress offers something called “FTPS”.  I have no idea what FTPS is.  But my brain, expecting to see “SFTP” went temporarily dyslexic and chose to see what it wanted to see, “SFTP”.

I tried to append the port number 22 to the url (because wordpress complained it couldn’t connect to FTPS on port 21).  That didn’t work.  And I thought to myself “why in the hell is WordPress trying to do SSH over port 21!?” without realizing it was in fact using FTPS.

Once I finally realized that it said “FTPS” and not “SFTP” I could finally start Googling for the correct solution.

It turns out that WordPress does indeed offer a SSH/SFTP option.  However, in order for it to be enabled, you need to install the SSH2 PECL extension for PHP.

Here is a step-by-step guide for CentOS6 running Apache 2 and PHP 5.3

  1. # yum install gcc php-devel php-pear libssh2 libssh2-devel
  2. # pecl install ssh2 channel://pecl.php.net/ssh2-0.11.3
  3. When it asks for the ssh2 prefix, accept the default (by pressing <enter>)
  4. # touch /etc/php.d/ssh2.ini
  5. # echo extension=ssh2.so > /etc/php.d/ssh2.ini
  6. # service httpd restart
  7. Now when you try to update wordpress or install a plugin, you’ll see a new option for SSH2

Note: If you’re not using CentOS or Yum you can achieve the same with your package manager or by downloading libssh2 and compiling it on your machine.  (I’m not sure what the libssh2-devel has that lbssh2 does not have.  But I do know that you need the -devel version for the PECL extension to work.).  Once you have libssh2, you just instal the PECL extension.

I have never been able to use the WordPress auto-update and install features before as all of my servers have a strict no-ftp rule.  Now that I am finally able to use it, I cannot believe I waited so long to figure this out.  It saves so much time and hassle; I should have fixed it long ago.  Hopefully it’ll help you.

 

References:

  • http://blog.dynamichosting.biz/2011/01/10/installing-ssh2-extension-for-php-on-centos-5/
  • php.net/manual/en/book.ssh2.php
  • http://stackoverflow.com/questions/561024/install-pecl-ssh2-extension-for-php

AZ PHP Usergroup February 2012 – Object Oriented PHP – An Acedemic Discussion

I had the privilege of speaking at the February 2012 edition of the Arizona PHP Usergroup at Walt’s TV.  I decided to discuss Object Oriented Development in general, as well as relative to PHP.

I have spoken in public many times.  But I have never had the opportunity to review my performance on video.  This time, I had that privelege horror.  I had three major issues with the discussion

  1. I speak too fast
  2. I make several inaccurate statements
  3. I am unnecessarily over-dramatic at time

I tried to edit the video to trim out the fat.  I think I succeeded in that.  However, some splices are choppy and/or otherwise sloppy.

In addition to my shortcomings, the recording is not very good at all.  I chose to present with my back to the camera.  Enjoy looking at my bald head for an hour.

Anyways, aside from all of that, I think there is some useful information in here for the PHP developer.  We talk a lot about design patterns, OO, and OO for PHP.

I tried to annotate mistakes.  Feel free to add further corrections in the comments.  I know I noticed at least one or two additional mistakes that I failed to annotate.

Without further ado:

http://www.dlcware.com/Resources/Videos/OOPhpPresMed.wmv

Sorry I couldn’t embed it with YouTube or something.

www.youtube.com/watch?v=id91EWRyCeo

My First AZ Php Usergroup Conference

I just had a blast meeting with the AZ PHP group at one of their monthly conferences.  I felt comfortable and welcome, despite telling at least two terrible jokes, and feel like I have a new information resource at my disposal.  I encourage any PHP developers in the Phx area to check it out.  They have meetings monthly at Walt’s TV in Tempe.  AzPhp.org

MAY UPDATE: AZ PHP Meetings are now held at the Microsoft Store at Scottsdale Fashion Square

MySql: Unknown table engine ‘InnoDB’‏

     At MajorCommand.com, one of the sites I am responsible for, we recently took our mySql instance and put it on its own server instead of sharing the server with Apache (and several other things) as we had been previously.  The migration went quite smooth and we turned the “on” switch with no major issues.  After the switch, I decided to look at the my.cnf config file, which I had tuned for the previous one-server setup, to see if it could be better optimized for the new setup.  I was excited when I found an example config that shipped with mysql named “my-innodb-heavy-4G.cnf”.  The new database server is indeed a 4Gb (memory) machine.  And the main databases on this server do make extremely heavy use of InnoDb.  So, I figured this would be a great starting point.
     First, I reviewed the my-innodb-heavy-4G.cnf file to ensure there were no crazy settings in there and that integral, non-performance related, things like file paths were setup correctly.  I felt comfortable with the config.  After taking a backup of my.cnf, I replaced it with the new config file.  I restarted mysql and I was happy that it came back up.  I immediately started looking at performance monitors to see what I could notice.
     What I did not do was go to www.majorcommand.com to see if it still worked.  Of course with Murphy’s law and all, it did not.  After a bit I noted no load at all and decided something was wrong.  So I went to the site and sure enough it was down.  I looked at the Apache log and saw the following never-before-seen error message:
Unknown table engine 'InnoDB'‏.
I immediate thought “oh shit, I probably left in the skip-innodb directive,” although I also wondered how that could have possibly been in a sample config file with InnoDb in it’s title!  None-the-less, it seemed the most likely answer.  I looked at the config file and there was the skip-innodb directive, happily commented out as it should be.
     I Googled around a bit and found one other likely cause: if your InnoDb log files are corrupt this error will occur.  You need to delete and recreate your InnoDb log files to fix it.  However, I did not even try this because I knew my log files were not corrupt.  After the failed attempt with the config file update, I replaced my previous config file and InnoDb again worked just fine; Therefore, the InnoDb logs had to be fine.  I was stumped.
     I just stared at the config file, hoping the answer would jump out at me.  I was convinced it was something in the config file, based on the simple fact that with one config file everything worked fine and with the other it did not.
BOOM!  It hit me.
     I see a directive called “log-bin=mysql-bin” and I read the comment above it which starts out tellingly:
Enable binary logging
I thought to myself, “if it is looking for a binary log and finds an ascii one instead, it will surely consider that corrupt as well.”  When the config was previously set to use ascii logging, the file was not corrupt.  If it is set to binary, then for all intents and purposes the log file is corrupted.
     I gave it a whirl.  I commented out the log-bin line completely and also commented out the next, obviously related, directive called “binlog_format”.  I restarted mysqld and innodb tables now load perfectly.
Problem
Can’t load Innodb tables in mySql due to “Unknown table engine” error
Possible Causes (and/or)
  1. You have the skip-innodb directive set in your my.cnf file
  2. Your innodb log files are corrupt (/var/lib/mysql/ib_logfile*)
  3. Your innodb log files had been previsouly stored in ascii, and now you’re trying to use them in binary because of the log-bin directive in my.cnf (or the other way around: your log files are binary and my.cnf is set to ascii by the omission of the log-bin directive)
Cause #3 is the topic of this blog entry, is not easily found on Google (I couldn’t find it anywhere) and it was the source of my particular issue.
Solutions (to the above causes, respectively)
  1. Comment out or remove the skip-innodb directive in my.cnf
  2. Delete your InnoDb log files and recreate them, as detailed here by the poster name HoKe (this is the post that clued me in to looking at the log directives): http://www.turnkeylinux.org/forum/support/20090111/drupal-6-problem-enable-innodb#comment-131
  3. Comment out or delete the log-bin directive in my.cnf (or add the directive, if your log files are store din binary already)
I hope this helps someone.

MajorCommand.com is public!

A while back I started a series on game server development.  While that series is not finished and perhaps never will be, I am proud to announce that the game which was it’s subject, is now online and open to the public.

The concept of “casual” gaming takes a minute for most people to get used to.  You only spend a few minutes per day on a game.  But it is very fun and while it started as just another project that my firm was hired for, it ended up being something I am quite excited about.

www.majorcommand.com

If you want to play against me, my name there is “evan”.  Creative, I know.