Monthly Archives: February 2010

Don’t run PPTP and Squid on mission critical Linux boxes

Tweet Apparently PPTP does a lot of disk IO… and it can lock up your Linux server. *sigh* Learned the hard way. To remove these services… /etc/init.d/pptp stop /etc/init.d/cron stop update-rc.d -f pptp remove update-rc.d -f cron remove

Weird characters when parsing CSV in PHP

Tweet For some reason, if you do this PHP $csv_file = file_get_contents(site_url($file_name)); $csv_lines = explode(“n”, $csv_file); a CSV line like this Campaign Name    Ad Group Name    Component Type    … turns into a weird line like this: 377376C^@a^@m^@p^@a^@i^@g^@n ^@N… This has to do with PHP’s character encoding issues. Here’s the easier way to take care of [...]