Weird hex code on top of document

Author Message

Gabriel Finkelstein

Wednesday 30 July 2008 4:31:19 pm

Hi!
I'm getting some weird hexadecimals on top of the destination page whenever I try to use eZHTTPTool::sendHTTPRequest.
I run it like:

eZHTTPTool::sendHTTPRequest("http://mywebsite.com/foo")

And at the very beginning of the result page (before any HTML code) I get a random hexadecimal of length 4. Some examples:
b2af
b2b0
b2b5
b2b3

If I change the URL to some other website:

eZHTTPTool::sendHTTPRequest("http://google.com")

I don't get any hexadecimals.

But if I change it to any other ez publish website, for example:

eZHTTPTool::sendHTTPRequest("http://ez.no")

I get the same kind of hexadecimals on top of the ez.no website (look at the screenshot)
http://img291.imageshack.us/img291/1558/clipboard01vv0.png
(of course, there's no css styles, since they're included with a relative path)

Does anyone have any clue about what's going on?

PS: I'm running this code inside a custom action

Nicolas Lescure

Thursday 31 July 2008 2:03:14 am

Hi,

I had the same problem with eZ 3.9. I didn't solve it. It depends of the servers.

If you want to get the html of a distant website, I think you should use PHP methods, such as "file_get_contents". If you want to send post parameters, have a look on CURL.

Gabriel Finkelstein

Thursday 31 July 2008 1:59:46 pm

It didn't occure to me to use CURL. It worked fine. Thanks!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:12:41
Script start
Timing: Jan 18 2025 19:12:41
Module start 'layout'
Timing: Jan 18 2025 19:12:41
Module start 'content'
Timing: Jan 18 2025 19:12:42
Module end 'content'
Timing: Jan 18 2025 19:12:42
Script end

Main resources:

Total runtime0.7920 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.9219152.6250
Module start 'layout' 0.00600.0025 740.546939.4609
Module start 'content' 0.00850.7817 780.0078515.7188
Module end 'content' 0.79020.0017 1,295.726612.1563
Script end 0.7919  1,307.8828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4631160.0002
Check MTime0.00140.1778160.0001
Mysql Total
Database connection0.00100.131810.0010
Mysqli_queries0.733692.6240570.0129
Looping result0.00080.0972550.0000
Template Total0.759495.920.3797
Template load0.00230.289720.0011
Template processing0.757195.594020.3785
Template load and register function0.00020.021610.0002
states
state_id_array0.00080.098510.0008
state_identifier_array0.00130.159720.0006
Override
Cache load0.00190.2410310.0001
Sytem overhead
Fetch class attribute can translate value0.00080.107220.0004
Fetch class attribute name0.00220.278550.0004
XML
Image XML parsing0.00220.273520.0011
class_abstraction
Instantiating content class attribute0.00000.001760.0000
General
dbfile0.00250.3144220.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs