If you are trying to use file_get_contents for fetching data from url’s, you might sometime need to define a timeout value. While it would seem as there is no obvious way, thanks to this comment on the manual page for file_get_contents, there is a pretty simple way.
// create the context
$arContext['http']['timeout'] = 3;
$context = stream_context_create($arContext);
// Fetch data
$url_data = file_get_contents('http://example.com', 0, $context);
There are other options too which can be seen here – http://www.php.net/manual/en/context.http.php
If you are trying to install Maia or any other port which depends upon p5-Mail-SPF-Query, and your server already has p5-Mail-SPF installed, you will not be allowed to do so as both install files at the same location. You would be receiving errors like:
===> p5-Mail-SPF-Query-1.999.1 conflicts with installed package(s):
According to this post at FreeBSD forums, p5-Mail-SPF should be preferred. An easy way to do is to edit the Makefile of the port (in my case it’s Maia) to replace the dependency line. Edit /usr/ports/security/maia/Makefile (replace path based on your port) in your favorite editor and search for
and replace it with
That should be it unless you have some other conflicts in your package.