OK here's a fun one, after much reading about the reason I couldn't get files to upload via http(s) for a client (my good lady's audio typing website) there are tips aplenty on StackOverflow and others telling you to reset the FcgidMaxRequestLen parameter in the mod_fcgi module block in both vhost.conf and the fcgid.conf, which I duly did.
(side point) I may as well mention at this point, the server we purchase from 1&1 Internet is a Plesk Control Panel which is fine until you want to do major customisation. In the past if you made changes to the core php.ini or vhost.conf file you would find it was overwritten each time a Plesk update was implemented or for whatever reason re-compiled. Latter versions of Plesk have made it easier to manage this by placing safe copies of localised conf files in a new system sub-folder, but still a pain when you don't know where to look!
Older versions of Plesk = /var/www/vhosts/{your-domain}/etc
Plesk 11+ = var/www/vhosts/system{your-domain}
But this is an aside and largely only confined to php.ini changes.
Our local php.ini file which seemed to pickup the changes which were identified within it when running the phpinfo() command showed the custom settings
set into the php environment
So, with these settings in place we proceeded to attempt to upload sound files. No luck, and didn't even get errors so were completely in the dark.
We got an nginx error was identified as a PHP framework issue and that was fixed during which we set the log files to be in the root of the vhost file which, on Plesk 11 + looks like this
So, each upload then started throwing a common line based on a configuration entry which looked like this:
[warn] [client ip address] mod_fcgid: HTTP request length 134220467 (so far) exceeds MaxRequestLen (134217728), referer: name of script running the upload
OK so did more googling and found lots of results for newer builds of apache running with a low limit of 128K per upload, so duly followed these and updated the:
/etc/httpd/conf.d/fcgid.conf and added the recommended lines:
MaxRequestLen 2147483648
FcgidMaxRequestInMem 2147483648
Which covers the earlier version of fastcgi with the MaxRequestLen entry and newer modules with the FcgidMaxRequestInMem entry, both of which were set to around 2Gb.
Did the same with the vhost.conf file located in /var/www/vhosts/system/domain-name/
adding the following block:
<IfModule mod_fcgid.c>
MaxRequestLen 2147483648
FcgidMaxRequestLen 2147483648
</IfModule>
again covering both sets of bases by declaring the values to be in excess of the limit in the error.
Nothing, still getting the upload error with the same old:
[warn] [client ip address] mod_fcgid: HTTP request length 134220467 (so far) exceeds MaxRequestLen (134217728), referer: name of script running the upload
OK so what the hell is going on here? I'm restarting apache and even the nginx and psa services to make sure it's bringing the new configurations online.
Back to the php.ini file, showed the localised settings were all working fine.
Time to get to grips with grep - seeing that the value we were all the same I ran a grep command to see where within the main system settings there was an occurance of this value:
grep -r "134217728" /etc/ which will recursively search for all occurances of the phrase "134217728" in all files.
Lo and behold!
I see a new entry which is located in /etc/httpd/conf/plesk.conf.d/ip_default/ called
domain-name.conf (e.g. abc.com.conf)
Opening this I see that there are two lines within the conf file which read:
<IfModule mod_fcgid.c>
FcgidInitialEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/transcription.1stclass.uk.com/etc/php.ini
FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
FcgidMaxRequestLen 134217728
</IfModule>
and a second and apparently duplicate entry:
<IfModule mod_fcgid.c>
FcgidInitialEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/transcription.1stclass.uk.com/etc/php.ini
FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
FcgidMaxRequestLen 134217728
</IfModule>
Modifying the red text entries to be 2147483648 and restarting apache
service httpd restart enabled us to upload large files.
So, lesson learned, if you are using Parallels Plesk Control Panel and need to change a commonly used entry, do yourself a favour and use grep to locate localised (or Plesk controlled) versions of module configurations - it's better than ploughing through 100s of Google searches (none of which suggested this at all!!)
Happy Grepping!
1st Class Media is a Midlothian-based web development company, 8 miles South of Edinburgh in Scotland, UK. We like to share ideas, technical or otherwise which can be of use to others or pique the interest of people similarly minded
Monday, 26 January 2015
Sunday, 11 January 2015
Freight Forwarding and Logistics - another shameless client promotion!
OK, Here we go with another shameless self-promotion for a client for whom we are doing management of ad marketing and promotion.
T ward is a company of some standing in the shipping world, having been around the business for over 100 years they provide a wealth of knowledge for freight forwarding and logistics for numerous clients around the world. Being a complete luddite and also nosy in the same measure I felt a little out of my depth when it came to knowing what made freight forwarding a service at all! With Callum and Nigel's help I was suddenly propelled into the complex and hitherto completely unknown world of international shipping and logistics.
When you imagine these monstrous cargo ships coming in from China or Japan you think, "ok one of those gazillion containers probably contains my next TV" but the scope of the shipping exercise is massive and I ended up applauding the Freight Forwarding guys as they deal with numerous elements which comprise the whole process of logistics as well, including:
In summary, if you are looking to ship cargo worldwide, then get in touch with a reputable, experienced and knowledgeable agent such as t ward shipping, they really do know what it's all about, and heaven knows, it's a lot!!
T ward is a company of some standing in the shipping world, having been around the business for over 100 years they provide a wealth of knowledge for freight forwarding and logistics for numerous clients around the world. Being a complete luddite and also nosy in the same measure I felt a little out of my depth when it came to knowing what made freight forwarding a service at all! With Callum and Nigel's help I was suddenly propelled into the complex and hitherto completely unknown world of international shipping and logistics.
When you imagine these monstrous cargo ships coming in from China or Japan you think, "ok one of those gazillion containers probably contains my next TV" but the scope of the shipping exercise is massive and I ended up applauding the Freight Forwarding guys as they deal with numerous elements which comprise the whole process of logistics as well, including:
- Customs clearance
- Haulage and Transportation
- Storage
- Payment of duty
- Freight and related expenses
In summary, if you are looking to ship cargo worldwide, then get in touch with a reputable, experienced and knowledgeable agent such as t ward shipping, they really do know what it's all about, and heaven knows, it's a lot!!
Thursday, 20 November 2014
Sports Retail Management - client branded clothing website
We recently developed a new website for Sports Retail Management, a garment supply company who brand up clothes for all sorts of clients. This was a fun project (note the lack of "air quotes" it was quite a challenge, but one things we passed onto them was a lesson learned from days of yore...
This website is a brand new one for us, working closely with the client we created a combination site which has a public element to it coupled with a fully functional client extranet. The client Sports Retail Management, came to us with a simple remit, allow our local authority clients to log onto the website under their own account and create garment orders. "Is that it?" Well, kind of... It then transpired that some clients have some discounts afforded to them based on the level of purchasing they do.....ok, that's not a problem. Oh and each garment can have several colours and sizes. Yeah that's fine. Except that some sizes have different pricing models.
OK so this project started to look a little more complicated than initially envisaged so we started to look at how the system would work in the hands of the user, we started with a skeleton of the functional elements and imagined (note that) what features might be useful for the Authority users.
Side note: we pride ourselves on (mostly) listening to our clients regarding what they want and adding value to the systems we develop to make them as intuitive and user-friendly as we can. One of the things we have learned is one, don't overthink something - brainstorming something is useful but only come to conclusions if you are sure the end-user will see and use the value of your efforts. A number of times I've seen projects (which we have inherited) with loads of bells and whistles, so many if them in fact that you can't get to grips with the underlying functional purpose of the project. A developer who can see the actual value (rather than perceived value) and then apply this into functionality is worth their weight in gold, every time.
So, back to the story, we sat down with the end user and asked them what they would use. This was an eye opener - it's all too common to hear our client ask for this and that, without really knowing what their client would see as the priority feature.
In this case there was a large degree of overlap, with one or two things which the client in particular wanted which were not mentioned at all during the development specification phase.
So a lesson learned, not in an accusing manger it's just that sometimes you would be best advised speaking with the end user as the client, like you, will only imagine what can be the best features for a site which is heavily used by clients.
There endeth the lesson...
This website is a brand new one for us, working closely with the client we created a combination site which has a public element to it coupled with a fully functional client extranet. The client Sports Retail Management, came to us with a simple remit, allow our local authority clients to log onto the website under their own account and create garment orders. "Is that it?" Well, kind of... It then transpired that some clients have some discounts afforded to them based on the level of purchasing they do.....ok, that's not a problem. Oh and each garment can have several colours and sizes. Yeah that's fine. Except that some sizes have different pricing models.
OK so this project started to look a little more complicated than initially envisaged so we started to look at how the system would work in the hands of the user, we started with a skeleton of the functional elements and imagined (note that) what features might be useful for the Authority users.
Side note: we pride ourselves on (mostly) listening to our clients regarding what they want and adding value to the systems we develop to make them as intuitive and user-friendly as we can. One of the things we have learned is one, don't overthink something - brainstorming something is useful but only come to conclusions if you are sure the end-user will see and use the value of your efforts. A number of times I've seen projects (which we have inherited) with loads of bells and whistles, so many if them in fact that you can't get to grips with the underlying functional purpose of the project. A developer who can see the actual value (rather than perceived value) and then apply this into functionality is worth their weight in gold, every time.
So, back to the story, we sat down with the end user and asked them what they would use. This was an eye opener - it's all too common to hear our client ask for this and that, without really knowing what their client would see as the priority feature.
In this case there was a large degree of overlap, with one or two things which the client in particular wanted which were not mentioned at all during the development specification phase.
So a lesson learned, not in an accusing manger it's just that sometimes you would be best advised speaking with the end user as the client, like you, will only imagine what can be the best features for a site which is heavily used by clients.
There endeth the lesson...
Subscribe to:
Posts (Atom)