I just installed wordpress with plugins, everything works find except on a 'contact me' page, where I can see an error like this.
Warning: getimagesize(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/foobar.com/wp-content/themes/foobar/backend/theme-components/cs-header/cs_functions.php on line 751
Warning: getimagesize(http://dev.foobar/wp-content/uploads/2015/11/subheader-image-jobline-1.jpg): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/foobar.com/wp-content/themes/foobar/backend/theme-components/cs-header/cs_functions.php on line 751
cs_functions.php
on line 751 is:
if (is_file($cs_upload_dir . $cs_img_name) || is_file($cs_images_dir . $cs_img_name)) {
if (ini_get('allow_url_fopen')) {
if ($header_banner_image <> '') {
$banner_image_height = getimagesize($header_banner_image);
}
}
} else if (isset($cs_upload_subdir_file) && is_file($cs_upload_dir . $cs_upload_subdir_file)) {
if (ini_get('allow_url_fopen')) {
// THIS IS LINE 751
$banner_image_height = getimagesize($header_banner_image);
}
} else {
$banner_image_height = '';
}
So, I went to /etc/php.ini
and checked allow_url_fopen
and it is set to on
allow_url_fopen = On
What is going on? and how do I fix it