Long query strings get cut off when using Apache with Suhosin module enabled

November 27th, 2009

Sometimes your query string can get veeeeery long due to having a big number of $_GET parameters in it. And what you might have noticed that sometimes your long query strings get cut off so not all the $_GET parameters that you put in it appear in the browser’s address bar. “What’s up with that ?” … you may think.

There could be a number of reasons and one of them is the topic of this post. Suhosin - an Apache module that put all sorts of checks and traps into your server functionality to catch nasty attempts to exploit the site. Sometimes, though, it may cause unwanted effects like the one described in the subject. If you are experiencing the symptoms described in the first paragraph check your server installation and, specifically, Suhosin module. By default, Suhosin is set to only allow query strings with no more than 200 parameters. So, if it is longer, it will get shortened to that set length. If you require longer than that query strings, you can change Suhosin’s settings in your php.ini. Look for the following lines:


suhosin.post.max_vars = 200
suhosin.request.max_vars = 200

… and change the numbers to higher ones. Easy.

Just a little notice though: make sure that you are using $_GET for getting, not for posting. Instead, maybe your better solution would be to use $_POST instead of $_GET.

TinyMCE’s plugin ImageManager hangs when loading assets

November 20th, 2009

Ok! There can be many reason for this but here is one not so obvious one: you might have a mod_security2 installed on your server and hooked up to the apache installation, which causes troubles. So try disabling it by adding:



SecRuleEngine Off

to your /etc/httd/conf/httpd.conf file (restart the server after this of course).

If you are running under CPanel/WHM, you might want to change apache template /var/cpanel/templates/apache2/vhost.default - this will make sure that when a new virtual host is added to the server it will inherit the settings above and allow TinyMCE to work without having to change /etc/httd/conf/httpd.conf file again.

Disable “update” nag screen… for Windows XP users

November 13th, 2009

This will be useful for you if you are still using Windows XP and don’t like it how sometimes after installing an update the system tells you to restart now or later. If you choose later, it will keep reminding you to restart by showing “nice” popups in the bottom right corner of your desktop. And if you happen to be typing up an important document that you unfortunately forgot to save, chances are that you accidently activate the restart procedure by pressing a Spacebar or an Enter key (when the “Restart Now” popup comes up) are pretty possible. What will you end up with ? Correct…losing your document and probably getting really angry followed by a pretty strong urge to scream (and maybe later cry).

What you can do to temporarily avoid the possibility of losing your stuff is disable the nag screen.

There is not much to it - it’s just a one line command that you need to execute from the Start / Run window:

sc stop wuauserv

This essentially stops a “Windows Update / AutoUpdate”. Part of its responsibility is to remind you to restart the computer upon successful system update.

You can of course place this command into a batch file and place it on your desktop to simplify the usage. Of course recommendation to restart after update is there for a reason and you should always restart when the system demands it. However, there will be some days when you would not want to restart and this is when the script (shown above) will kick some bearings!

Flash Uploader drops the session in Internet Explorer

November 6th, 2009

Recently, we deployed a project that was using a multiple file uploader Flash component (that we used before for other projects successfully). To our surprise, it behaved abnormally and, in brief, it could be described as the following:

Every time a flash component was used to upload files it would drop the session (in IE 6 & 7) and consequently log out an already logged in user.

After making sure that all session related code was OK we started digging further - server configuration. Eventually, we narrowed down the cause of the problem and without hesitation annihilated the bugger.

It was Suhosin PHP module that dedicated servers with CPanel usually have installed for maintaining their security. Since it was the first project on this server to use flash uploader (and other servers have different configuration) it was the first time when we experienced the session issue.

Now…to cut story short and to give you what you actually want from the article…

The fix that did the trick was as follows:

  1. disable suhosin.session.cryptua setting in php.ini

    suhosin.session.cryptua = Off

  2. Add the following (if not there already) to php.ini

    suhosin.session.encrypt = Off

  3. Restart apache

    We use CentOS: service httpd restart

Anton “The Russian” Zaroutski Lands at Simply

September 28th, 2009
The Russan :-)

Okay apologies to Anton, but we didn’t know if he was going to be any good, turns out he is a gun, so……welcome to Anton the “The Russian” (quickly nicknamed by Donna) Zaroutski. Yes he was Russian once upon a time but was quickly “Australianised” by his beautiful Australian wife and now resides in Sunny Blacktown - we reckon you don’t get any more Aussie than that (Dan and Dom having spent years there themselves ought to know).

Anton is the latest full time member of the Simply team (probably a good fighter from living in Blacktown - just kidding) and has really fit in well to our team culture after two weeks I heard myself saying that Russian is more simply than me (Dan).

Anton has about 10 years programming experience and has already injected many fantastic new ideas and methodologies at Simply.

A truly lovely bloke, very funny and professional to boot. Check this guy out on the wireframes, we love it!

Prior to joining Simply Anton was the Lead Web Developer at Border Crossing Media – a young international company based in Edinburgh, Scotland. The primary goal was to develop a Border Crossing TV Platform that would allow video content owners to easily upload, manage, backup and add video streaming capabilities to their existing. While at BCM, Anton developed an in-house extension of the Symfony PHP framework, created a PHP interface for ffmpeg to streamline video encoding and integrated Border Crossing TV platform into Amazon Web Services cloud to allow easy scaling and failsafe solutions.

Cool tools for image resizing

September 21st, 2009

A very common requests we get at Simply is regarding the resizing/editing of images before uploading them to the CMS or the email marketing tool.

Anton has added an easy to use tool to the Simply site that will hopefully help you along the way.

Go to http://tools.simply.com.au/

Have fun, its pretty easy, upload the image then use the icons above it to edit in any way you see fit. Any questions you know you can just give us a call.

Another great tool (Charlie eluded to in an earlier post )for editing images that is also free for most features can be found at http://www.picnik.com/

Join up for free and try it out.

Getting a handle on workplace compliance

September 26th, 2008

Got a lot of paper flying around? Lots of people scratching their heads saying I didn’t know, I wasn’t told or can you train me? Yep, like most fast growing companies you are approaching a point or already at the point where compliance safety and training can no longer be handled in an adhoc manor… ahhh bring back the old days of when we were small and the lunches were long eh!

Business Control was originally developed for NCSS, a hardware maintenance company with 100 employees & 100 agents australia wide, dealing with multiple vendors like HP, Sony, Apple, all with their own rules and regulations that must be followed. Communicating this to the service providers nationally was darn near impossible the old way and there was certainly no visibility on who was up to date. “Not good enough” say the big boys.

Enter Simply with Business Contol!

Business Control is a compliance and elearning solution that provides managers with a true gauge of the employee’s understanding of policies and business procedures. It allows managers to identify areas of risk and act/train/communicate online -  proactively, before problems occur.

Business Control provides:

  • centralised company documents on the internet or company intranet. Automating the effective distribution of policy and business procedure documentation to users inboxes
  • a record of receipt and consumption per employee
  • a score of their understanding of the policies
  • assurance that all employees read policies within the time frame set
  • measurement & understanding by means of an online multiple choice exams
  • grades and records employee’s exam scores then reports them back to management
  • email alerts to management of exceptions or employee failure to comply.

For a self paced demo go to - www.businesscontrol.com.au

Adding Google Maps to your Website!

September 26th, 2008

By now, you would have probably heard great (and some bad) things about Google maps and the Street View Application. Not only is it a handy tool to find locations anywhere in the world, you can find sites where they’ve taken it to the next level, such as agent locations (TABMA Member Search) to providing detailed directions to your office for clients from any location (Our contact us page).

Make sure you have a Google Account, you’ll need one to get a Maps API key, and your API key will be connected to your Google Account. Next, get a Google Maps API that lets you ‘embed’ Google Maps in your own web pages. A Maps API key is valid for a single “directory” on your web server.

There is no limit on the number of page views you may generate per day using the Maps API till 500,000 page views per day and the Maps API does not include advertising.

Looking for examples of the maps in action? The example source code on the Examples Page on the Google Maps website, as well as the Econym Google Maps API Tutorial should give you in the right direction.

For trouble shooting issues, check out our Google Maps API discussion group, or have a look at the online documentation (more for people with a grasp on JavaScript programming and object-oriented programming concepts).

Happy Google Mapping!

online workflow tools

September 26th, 2008

here’s a good selection of online tools to help streamline your web-productivity.

web browser - firefox 3.0
word processor & document management - adobe buzzword
image editing - picnik
file sharing - drop.io
presentation - Sliderocket
survery and polls - PollDaddy
embedded video streaming - Vimeo or youtube
embedded documents - scribd
screen sharing & collaboration - adobe connectnow

any more? feel free to add them in the comments.

Slattery Auctions - Vendor Interface

September 25th, 2008

Slattery Auctions Australia is an independently owned Australian company specialising in the valuation and auction market. Their clients are considered to be blue chip, a number of large banks, finance companies, government agencies and liquidators.

Simply where engaged in order to stream line the communications between Slattery’s staff and these clients, known as vendors, so that the management of auction stock (consignments) was moved from a paper and phone based system online to the “vendor interface”.

The vendor interface is a secure login website that allows Slatterys vendors to do the following:

  • Search and view all consignments that are in stock
  • Allocate consignments to auctions
  • View consignment History
  • Approve Slattery’s valuation price as the reserve
  • Approve any referral sales
  • Easily contact Slattery’s about a consignment
  • Arrange and manage consignment pickup requests
  • View all remittance advises after sales
  • View sales by month
  • View a pre sales report (vehicles assigned to next auction)
  • View a post sales report (results from completed auctions)
  • Vehicle price search (historical sales prices in the system)

The system was built and enhanced over a period of 6 months and has help Slatterys reduce the time and overheads involved in managing the auction process from pickup to sale.

http://www.slatteryauctions.com.au