Jump to content

PHP unit testing '$_SERVER['HTTP_HOST']' Problem while hitting via command promt


Recommended Posts

pls help me..

i am new to PHP unit testing concept. i just wrote a PHP unit test case for a login module in ZEND frame work. for that we have to see the result via command promt. but in some places of zend frame work we are using '$_SERVER['HTTP_HOST']' to get server host name but it can get only by hitting via browser so while am hitting via command promt it will give error message lik this(given below)

 

Generating code coverage report, this may take a moment.PHP Notice:  Undefined index:  HTTP_HOST in /opt/coolstack/apache2/htdocs/LPS/application/bootstrap/Bootstrap.php on line 147

 

Notice: Undefined index:  HTTP_HOST in /opt/coolstack/apache2/htdocs/LPS/application/bootstrap/Bootstrap.php on line 147

PHP Notice:  Undefined index:  HTTP_HOST in /opt/coolstack/apache2/htdocs/LPS/application/bootstrap/Bootstrap.php on line 197

 

Notice: Undefined index:  HTTP_HOST in /opt/coolstack/apache2/htdocs/LPS/application/bootstrap/Bootstrap.php on line 197

PHP Notice:  Undefined index:  HTTP_HOST in /opt/coolstack/apache2/htdocs/LPS/library/Zaah/Controller/Plugin/Ssl.php on line 79

 

Notice: Undefined index:  HTTP_HOST in /opt/coolstack/apache2/htdocs/LPS/library/Zaah/Controller/Plugin/Ssl.php on line 79

 

i cant give server host name at all the places. so please help me how to solve this problem....

 

thanks

Yogesh

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.