I got some error messages in my error log
2011-11-18 19:47:04 - PHP Notice: Undefined index: HTTP_HOST in /home/xxxxxxx/public_html/index.php on line 179
2011-11-18 19:47:04 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxx/public_html/index.php:49) in /home/xxxxxxx/public_html/index.php on line 179
2011-11-18 19:47:04 - PHP Notice: Undefined index: HTTP_HOST in /home/xxxxxxx/public_html/system/library/currency.php on line 45
2011-11-18 19:47:04 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxx/public_html/index.php:49) in /home/xxxxxxx/public_html/system/library/currency.php on line 45
i have found this info about HTTP_HOST and daniel states the following
"HTTP_HOST is if you visit your site from an ip. set some redirect in your .htaccess."
what redirect would i put in my htaccess to stop the error ?
Best Regards
2011-11-18 19:47:04 - PHP Notice: Undefined index: HTTP_HOST in /home/xxxxxxx/public_html/index.php on line 179
2011-11-18 19:47:04 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxx/public_html/index.php:49) in /home/xxxxxxx/public_html/index.php on line 179
2011-11-18 19:47:04 - PHP Notice: Undefined index: HTTP_HOST in /home/xxxxxxx/public_html/system/library/currency.php on line 45
2011-11-18 19:47:04 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxx/public_html/index.php:49) in /home/xxxxxxx/public_html/system/library/currency.php on line 45
i have found this info about HTTP_HOST and daniel states the following
"HTTP_HOST is if you visit your site from an ip. set some redirect in your .htaccess."
what redirect would i put in my htaccess to stop the error ?
Best Regards
Last edited by i2Paq on Sat Nov 19, 2011 3:28 pm, edited 1 time in total.
Reason: Split, renamed
Reason: Split, renamed
Used our FREE search on: headers already sent?
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
i already have searched for header sent but i am still none the wiser how to stop the errors, there are no white spaces etc.i2Paq wrote:Used our FREE search on: headers already sent?
regards
After the RewriteBase line add the followingwerepair wrote:what redirect would i put in my htaccess to stop the error ?
Code: Select all
#RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
#RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
the backslashes are important in the condition line
Hi Simon,uksitebuilder wrote:After the RewriteBase line add the followingwerepair wrote:what redirect would i put in my htaccess to stop the error ?
replace www\.yoursite\.com and http://www.yoursite.com with your site's domainCode: Select all
#RewriteCond %{HTTP_HOST} !^www\.yoursite\.com #RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
the backslashes are important in the condition line
thanks for that mate, so i need to add the following and change yoursite.com to mydomain.co.uk ..... is there any back slashes seperating the .co.uk ( \.co\.uk)
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
in the condition line, escape any periods with a backslash
www\.abc\.co\.uk etc
www\.abc\.co\.uk etc
That's totally unrelated to this.
What were you doing at the time that error appeared (what page were you on etc) ?
What were you doing at the time that error appeared (what page were you on etc) ?
Very strange, I'm guessing it's a bot of some sorts
Can you check your server error log and get the IP address related to the error
You should then be able to find out who or what it is by doing a whois on the IP
Can you check your server error log and get the IP address related to the error
You should then be able to find out who or what it is by doing a whois on the IP
hi simon,uksitebuilder wrote:Very strange, I'm guessing it's a bot of some sorts
Can you check your server error log and get the IP address related to the error
You should then be able to find out who or what it is by doing a whois on the IP
thanks for the reply, i have checked the server log and there are no errors listed in the log
Best Regards
Hi,
All I can suggest is you monitor it to see if it occurs regularly or if it was just a one off.
All I can suggest is you monitor it to see if it occurs regularly or if it was just a one off.
I had a similar error. 9 times over 2-3 hours.
ie:
2012-01-30 10:18:42 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:29:57 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:35:35 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:46:52 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:52:27 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:58:04 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 11:03:41 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 11:48:16 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 12:30:57 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
[/i] is the line.
ie:
2012-01-30 10:18:42 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:29:57 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:35:35 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:46:52 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:52:27 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 10:58:04 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 11:03:41 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 11:48:16 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
2012-01-30 12:30:57 - PHP Warning: Division by zero in /xxxx/shop/system/library/pagination.php on line 32
Code: Select all
$num_pages = ceil($total / $limit);
Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/
For the record this effectively breaks multi store because it just redirects to one url. The way I posted below will redirect the ip's to main site but if you use multistore blah.com won't go to main.com. The previous way would simply make everything go to the main store.
Code: Select all
RewriteCond %{HTTP_HOST} ^192\.168\.0\.1 [OR]
RewriteCond %{HTTP_HOST} ^192\.168\.0\.2
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
uksitebuilder wrote:After the RewriteBase line add the followingwerepair wrote:what redirect would i put in my htaccess to stop the error ?
replace www\.yoursite\.com and http://www.yoursite.com with your site's domainCode: Select all
#RewriteCond %{HTTP_HOST} !^www\.yoursite\.com #RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
the backslashes are important in the condition line
https://www.lotnllc.com is your one stop shop for all your computer needs!
I have just changed the $limit value to 15. Maybe that might work?
Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/
Here is another possible fix.
http://forum.opencart.com/viewtopic.php ... 29#p351229
http://forum.opencart.com/viewtopic.php ... 29#p351229
Opencart Version 1.5.1.3
https://www.opencart.homebrewinn.com.au/shop/
Who is online
Users browsing this forum: No registered users and 5 guests