vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   XML Parsing Error: xml processing instruction not at start of external entity (https://vborg.vbsupport.ru/showthread.php?t=325785)

Scandal 11-19-2017 12:51 PM

XML Parsing Error: xml processing instruction not at start of external entity
 
When we click Edit button of any post (so the Quick Edit form should displayed), I get this error on the browser's console:
Quote:

XML Parsing Error: xml processing instruction not at start of external entity
Location: http://www.xxxxx.xx/ajax.php?do=quickedit&p=438
Row number 2, Column 1:
... the Quick Edit form is not appearing the the progress bar displayed permanently. :(

- I have try to disable hooks, but the problem still appears.
- I have this row on config.php: ini_set("display_errors", false); so I don't think it is a fatal error/ warning by PHP which brokes the xml normal syntax.
- I have informed that this appear starts after the move of the site to another server.
- We use vB3.8.4

Any idea to take a look? :)

Dave 11-19-2017 02:03 PM

Is there anything in your PHP error logs that could indicate something goes wrong?
Pretty sure this is caused by a fatal PHP error.

Scandal 11-19-2017 04:09 PM

Well, I found the reason of this issue, but I don't know how to fix it.

Exact the same site on a localhost testing board works perfectly, but on the live server ANY html page/ ajax call etc, has a useless empty line as line #1.
For normal html pages, there is no reason for the browser to retun an error, but when we're talking about an ajax call, this empty line at the top of the response, breaks the xml parsing from the browser.

So it seems it is a server/ PHP/ Apache setting that applies this empty line.

Any idea how to fix it?

Dave 11-19-2017 04:24 PM

Have you tried to disable all hooks to make sure it's not a plugin issue?

Scandal 11-19-2017 04:28 PM

Yes, as I have noticed on the first post:
Quote:

- I have try to disable hooks, but the problem still appears.
The exact copy of the site is installed on my locahost where the problem does not exists.

Dave 11-19-2017 05:41 PM

My guess is that your /includes/config.php file has the BOM issue.
Open the file and re-save it as encoding UTF-8 without BOM.

Scandal 11-19-2017 06:26 PM

Thanks Dave!! Your post inspired me to take a better look @ config.php.

The issue was that we were talking about a vB3.8.4 with a config.php of version vB3.6.8!

It seems the admins were upgrade all the time the vBulletin with not touching the config.php.
Maybe was it or maybe cause the file was some enters and spaces from the lots times of editing all these years.

I just replace the config.php with clean a vB3.8.7 ++ applied again the information.

All good, thank you very much :)


All times are GMT. The time now is 05:36 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01189 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete