|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2013-02-08 16:02 UTC] php dot net at dzubak dot sk
 Description: ------------ I wanted to vote for comment, but i recieved this nice red X icon. So i investigated and i found error in Chrome console: XMLHttpRequest cannot load http://www.php.net/manual/vote-note.php? id=13494&page=function.setlocale&vote=up. Origin http://php.net is not allowed by Access-Control-Allow-Origin. So, I was using *php.net* domain, but there is this Origin thing blocking AJAX request from domains other than *WWW.php.net*. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 20:00:01 2025 UTC | 
'I had to keep the javascript relative to the host being used' yeah, the problem is that we set a <base href="{$_SERVER['BASE_HREF']}" /> explicitly, where the BASE_HREF is set from the primary domain of the specific mirror being used, so if a mirror is visited on non-primary host (which is perfectly normal, like with our without www, or us.php.net vs us1.php.net) the actual host and the host set via the base href will be different. I think for now it would be safe to use the $_SERVER['HTTP_HOST'] and on the long run we should move everything to relative urls anyway.