Posted by Andrei Filonov in PHP
on Dec 27th, 2010 | 0 comments
Pretty strange issue and I had hard time to Google it up, so here you go, fellow PHP developers.
PHP script which was doing ftp_connect was failing on some installations with Segmentation Fault (core dumped) message. After quite a bit of time wasted looking for answers why, I found that problem was with the FTP host name having trailing line break. Well, that host name was coming from config and technically only developers had access to it, so looks like we assumed that variable “safe” and were not doing standard checks on special characters. To make things worse that line break is hard to...