I'm facing a strange problem with my wordpress multisite installation. I have a couple of domains on the same server and depending on which domain I use to access the same file, I get different results.
When I need to access Wordpress Core from pages outside the usual structure, I use the following code:
require_once("../../wp-config.php");
$wp->init(); $wp->parse_request(); $wp->query_posts();
$wp->register_globals(); $wp->send_headers();
echo "test hello";
The execution of this code works fine with all domains but when using some specific domains, 4 blank lines are added to the top of my page.
So on domain name 1, the source code looks like this:
1. test hello
While on another domain, the source code looks like this:
1.
2.
3.
4.
5. test hello
This is exactly the same code, exactly the same file but called from a different domain name.
I have checked the encoding of wp-config.php and it is in UTF8 without BOM while other WP core files are in ASCII. I have tried to convert all other WP Core files in UTF8 without BOM but then I get the 4 lines on all my domains. If I convert wp-config back to ASCII, I still get 4 lines on some domains.
All domains are using the same database, the only difference is the theme used. They are all using different themes but I don't know how this would be related.
I also see the 4 empty lines in Wordpress admin on some domains but not on others.
I'm puzzled :(
Do you have any idea of what it going on? It doesn't prevent pages from being executed but it creates white space on top of every concerned sites (3 out of 15). I have tried reinstalled the current WP version but it didn't solve the issue.
Do you have any idea?
Thanks
Laurent