Apache time out on PHP include() through HTTP

InteractM

Well-Known Member
Apr 2, 2013
135
1
18
cPanel Access Level
Root Administrator
I have a page with following code

PHP:
	    $protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https';
	    $host = $_SERVER['HTTP_HOST'];
		
	    include($protocol . '://' . $host . '/index.php/includes/header');
which returns time out for that part of the code. Direct access to http://www.mydomain.com/index.php/includes/header renders header properly.

Does Apache has something missing to execute properly PHP include() through HTTP?

Thanks for any tips.