How to Handle Uploading Really Large Files in PHP
PHP has some default limits that do not work out of the box when you want to work with uploading very large files.
So there are a few configuration changes you have to make to the defaults that come with PHP. These are defined in you php.ini file.
The...
Written by Sean Behan on 09/20/2018
Change the Default Controller Name in Rails Functional Tests
Rails will infer the controller you want to test from the class name of the test case. For example...
class PeopleControllerTest < ActionController::TestCase
end
will test the app/controllers/people_controller.rb.
To change this is trivial. Us...
Written by Sean Behan on 10/23/2013
How To Increase or Change the File Upload Size in the PHP ini file for Wordpress
You need to find which configuration ini file has been loaded by PHP. The easiest way to do this is to run the phpinfo() function from the command line.
php -r "phpinfo(); " | grep -i "loaded configuration file"
You should see something like...
Written by Sean Behan on 08/24/2013
Deploying Wordpress on Heroku
> This post is out of date - Heroku officially supports PHP now w/ buildpacks
Heroku runs
Apache version 2.2.22
PHP version 5.3.10
Deploying Wordpress to Heroku requires that you throw the Wordpress source into a Git repository. So download th...
Written by Sean Behan on 03/02/2017
How to Add Additional Sub Directories to the Default Rails Test:Unit File Structure
# Edit Rakefile in project root
#
# Add a new rake test task... E.g., rake test:lib, below everything else in that file...
# Alternatively, add a task in lib/tasks/ directory and plop in the same code
namespace :test do
desc "Test lib source"
...
Written by Sean Behan on 06/17/2012
How to Copy and Paste to/from the Global Register with Tmux on Mac OS X
Using the system clipboard with tmux on OS X is broken. I really like tmux but having copy and paste is kind of important for me. Here is my attempt to get it back with a simple bash script until I find something better. The approach is to take a named pi...
Written by Sean Behan on 06/17/2012
Deploying to Dreamhost
Remember to include the host declaration in the database.yml file when you deploy to Dreamhost. Dreamhost does not use "localhost" which is typically the default setting when using the mysql adapter and developing locally or even on a small site.
At lea...
Written by Sean Behan on 06/17/2012
Using sendmail to send mail on ubuntu box
I normally install postfix for my MTA. However, I've never really used sendmail so I'd decide to give it a whirl for a new application I'm working on. I don't use it for anything but handling the mail that the application needs to send out, like new user ...
Written by Sean Behan on 06/17/2012
Postfix, ActionMailer and OpenSSL Fix on Ubuntu
If you run into problems using ActionMailer > 2.2, Postfix and OpenSSL while sending mail from your application, try changing the following:
vim /etc/postfix/main.cf
Change
smtpd_use_tls=yes
to
smtpd_use_tls=no
OpenSSL support with Postfix does ...
Written by Sean Behan on 06/17/2012
Sample Rails Database Config for MySQL
Sample Ruby on Rails database config file for connecting to mysql.
production:
adapter: mysql
encoding: utf8
reconnect: false
database: db_production
pool: 5
username: db_user
password: db_password
#socket: /tmp/mysql.sock #this may vary
...
Written by Sean Behan on 06/17/2012