Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17395

Re: Problem between PHP and JavaScript with json

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.php
Subject Re: Problem between PHP and JavaScript with json
Date Tue, 2 May 2017 17:40:21 +0200
Organization solani.org
Lines 32
Message-ID <oea98u$7ca$1@solani.org> (permalink)
References <oea1nl$rh4$1@shakotay.alphanet.ch> <oea36s$2ku$1@solani.org> <oea8h6$9hp$1@shakotay.alphanet.ch>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Trace solani.org 1493739614 7562 eJwFwYEBACAEBMCVSP8YR8n+I3QHo/L6JrgxmOVHO9JzwWAeHdplnNss1TyLXpIt9gr1xD4H/hCh (2 May 2017 15:40:14 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 2 May 2017 15:40:14 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1
Content-Language de-DE
X-NNTP-Posting-Host eJwNyMEBwCAIA8CVGoSA4yDC/iPYe54tguVKo9rYaAK5S3BByGG3r1uFjjj3vy8IFZnITsfsBxvGESQ=
X-User-ID eJwNyskBwDAIA7CVOA0dB6dh/xFavZUOxalAInJzcdtWY9gTcfrhUvyVcru8XGFDa3bsb2nkByi1EbU=
Cancel-Lock sha1:x17FdjmocLCELYYMZ0hJ86fYLPI=
In-Reply-To <oea8h6$9hp$1@shakotay.alphanet.ch>
Xref csiph.com comp.lang.php:17395

Show key headers only | View raw


On 02.05.2017 at 17:27, Une Bévue wrote:

> Le 02/05/2017 à 15:56, Christoph M. Becker a écrit :
>
>> Well, what happens if you request this URI from the browser directly?
>> Don't you get the raw JSON then?
> 
> Yes, of course, i get :
> {"text":"html { \n  background: transparent
> url(http:\/\/mbp.local\/global\/backgrounds\/cerveaulent_recadre.png)
> no-repeat center center fixed;background-size:
> cover;}","background":"transparent
> url(http:\/\/mbp.local\/global\/backgrounds\/cerveaulent_recadre.png)
> no-repeat center center
> fixed","background-image":"url(http:\/\/mbp.local\/global\/backgrounds\/cerveaulent_recadre.png)","backgroundSize":"cover"}
> 
> 
> even using :
> $ wget http://mbp.local/php/background-json.php
> 
> i get the same, the first character being "{" and the last one "}"
> 
> the reason why i don't understand the error message (about the same
> using "Firefox Developer Edition" or "Safari Techical Preview")...

Have you checked the response in a hex editor?  I wouldn't be surprised
if it starts with

  EF BB BF

-- 
Christoph M. Becker

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-02 15:31 +0200
  Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-02 15:56 +0200
    Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-02 17:27 +0200
      Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-02 17:40 +0200
        Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-02 19:03 +0200
          Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-02 19:17 +0200
          Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-02 19:35 +0200
            Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-03 07:11 +0200
              Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-03 13:37 +0200
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-03 17:35 +0200
                Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-05 10:24 +0200
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-05 10:44 +0200
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-05 09:48 -0400
                Re: Problem between PHP and JavaScript with json Richard Yates <richard@yatesguitar.com> - 2017-05-05 07:05 -0700
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-05 12:15 -0400
                Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-16 00:01 +0200
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-15 20:49 -0400
                Re: Problem between PHP and JavaScript with json Richard Yates <richard@yatesguitar.com> - 2017-05-16 21:26 -0700
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-17 10:07 -0400
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-06 07:08 +0200
                Re: Problem between PHP and JavaScript with json "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-05-05 15:57 +0200
                Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-05 17:20 +0200
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-06 07:11 +0200
                Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-06 11:50 +0200
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-06 17:04 +0200
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-07 11:27 +0200
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-07 07:41 -0400
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-07 16:57 +0200
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-07 17:03 +0200
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-07 13:45 -0400
                Re: Problem between PHP and JavaScript with json Une Bévue <unbewusst.sein@fai.invalid> - 2017-05-08 07:48 +0200
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-08 07:59 -0400
                Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-06 19:54 +0200
                Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-07 15:52 +0200
                Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-07 16:15 +0200
                Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-07 15:59 +0200
                Re: Problem between PHP and JavaScript with json Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-05-07 16:16 +0200
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-07 13:46 -0400
                Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-07 21:05 +0200
                Re: Problem between PHP and JavaScript with json Jerry Stuckle <jstucklex@attglobal.net> - 2017-05-07 15:33 -0400
                Re: Problem between PHP and JavaScript with json Luuk <luuk@invalid.lan> - 2017-05-07 22:05 +0200

csiph-web