Using PHP to SSH

I needed the ability to fire off some ssh commands today testing out how to do sftp through php for a client. Turns out there's a bit of a layering process here. This should get you started, and going on from here will require a bit more customization. It's important to note that many sftp services do not allow you shell access. Just because you have an ssh connection, does not mean you can issue commands. And just because you can not issue commands, does not mean you can't do scp or use regular sftp commands. It's a bit of a bother.

Tags: 

Drupal 6 Bulk Redirecting Urls

Trying to do bulk redirection through the path_redirect (D6) or redirect (D7) admin is... painful. You need to enter them one at a time. Staring down a list of a couple hundred can take a full day away from you. This handy function can be run through a drush script to redirect an array of paths anywhere you like in seconds.

Tags: 

QuickBooks Application Error "Request failed with code 500: You are accessing incorrect cluster for the specified company, please double check your base URL.-11017SERVER" Resolution

Ran across an error attempting to setup a quickbooks application. After managing to get the developer account testing us authenticated, the actual request to get vendor details was failing with the error message "Request failed with code 500: You are accessing incorrect cluster for the specified company, please double check your base URL.-11017SERVER".

Tags: 

Affecting The Vary Header in Drupal 7 Cached Pages

I came up against a situation I imagine is not very unique, but is very frustrating for a client today. Thanks to updates in Google's algorithms we're adding an extra header Vary to all of our sites that run multiple themes based on user agent detection. It my case, it is the theme switching, but if you vary even for little things, it's not a bad idea to declare that variance. You not even be varying by User-Agent. But, if you hit the Drupal 7 caching layer, you're going to have a bad time.

Tags: 

Pages

Subscribe to Fragmented Thought RSS