The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

I'm running SA 17.0.0.1358, PHP 5.5.9 under Ubuntu 14.04.

The following script crashes the PHP extension and I get a "502 Bad Gateway" error.

    $conn = sasql_connect( "SERVER=demo17;DBN=demo;UID=DBA;PWD=sql" );
    if( $conn ) {
        $rows = array();
        $rs = sasql_query( $conn, "SELECT * FROM Departments FOR JSON AUTO;" );
        print "QUERY WORKED";
        sasql_disconnect( $conn );
    }

If I leave out the 'FOR JSON AUTO' clause, it works fine.

Anyone else seen this?

asked 24 Feb '16, 13:57

Terry%20Wilkinson's gravatar image

Terry Wilkinson
496132036
accept rate: 50%

There has been a few fixes to the JSON AUTO code. What build are you using? If not the latest and I'd suggest that you try a more recent version. If the problem persists then please send me (using my first.lastname at sap.com) a repro and we can look at issue.

(24 Feb '16, 15:15) Mark Culp

I'm running SA 17.0.0.1358, PHP 5.5.9 under Ubuntu 14.04.

AFAIK, it is the latest Developer Edition release.

(24 Feb '16, 15:51) Terry Wilkinson
Replies hidden
1

Nothing according to JSON in the freshest Windows 17.0.0.1359 EBF, see SQL Anywhere Readmes compared toyour version - but hey, that's only one build number later...

So the Developer Edition certainly is quite fresh:)

(24 Feb '16, 16:35) Volker Barth

Yes, it's nice to see the Developer Edition being kept fresh. Not complaining there :-)

Unless I've screwed it up, the Linux version is still 17.0.0.1358.

(24 Feb '16, 17:53) Terry Wilkinson
3

FYI: I've reproduced a problem when doing a "SELECT * from <> FOR JSON AUTO" - there appears to be an issue in the dbcapi library. I will continue to investigate...

(25 Feb '16, 11:13) Mark Culp
1

We're working on a fix... in the meantime a workaround is to wrap your query as an inner block and name the result column. Example:

SELECT ( SELECT * FROM Departments FOR JSON AUTO ) as jsondata
(01 Mar '16, 08:14) Mark Culp
Replies hidden

Thanks, that worked!

(01 Mar '16, 10:24) Terry Wilkinson
showing 5 of 7 show all flat view
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×63
×60
×46
×14

question asked: 24 Feb '16, 13:57

question was seen: 299 times

last updated: 01 Mar '16, 10:24