<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: How to get server messages in PHP Api? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837022#M4867865</link>
    <description>&lt;P&gt;Chris, I wonder whether the PHP API (which presumably is based on the SA C API, which offers the &lt;A href="https://help.sap.com/docs/SAP_SQL_Anywhere/b86b137c54474b11b955a4d16358b208/3bf6a9c06c5f1014b7ffe7b6eaccffab.html"&gt;sqlany_register_callback() function&lt;/A&gt;) does support/offer those callbacks, too?&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2024 02:42:45 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2024-01-09T02:42:45Z</dc:date>
    <item>
      <title>How to get server messages in PHP Api?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaq-p/13837020</link>
      <description>&lt;P&gt;Hello, I have a PHP Api which executes various procedures in a Sql Anywhere 17 database. In some of the procedures "messages" are output via the "messsage" function. Is there a way to read these messages in PHP and display them in the frontend? I use the SqlAnywhere PHP extension.&lt;/P&gt;
&lt;P&gt;I have already tried to solve it via the system procedure "sa_server_messages()" but unfortunately it is not possible to recognize which connection/user triggered the message. &lt;/P&gt;
&lt;P&gt;P.s. I don't want to change the procedures with the messages because they are also used in a desktop application.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 08:47:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaq-p/13837020</guid>
      <dc:creator>former_SQLA_member1694966</dc:creator>
      <dc:date>2024-01-08T08:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to get server messages in PHP Api?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837021#M4867864</link>
      <description>&lt;P&gt;The procedure sa_server_messages only applies to messages written to the server console.  &lt;/P&gt;
&lt;P&gt;It sounds like you want &lt;STRONG&gt;message ... to client&lt;/STRONG&gt;. This is available in embedded SQL and ODBC requiring a message callback to be registered.&lt;/P&gt;
&lt;P&gt;For more information, see &lt;A href="https://help.sap.com/docs/SAP_SQL_Anywhere/93079d4ba8e44920ae63ffb4def91f5b/3be51a926c5f10148fd9c9c9884dde68.html?q=message"&gt;MESSAGE STATEMENT&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 11:58:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837021#M4867864</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2024-01-08T11:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get server messages in PHP Api?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837022#M4867865</link>
      <description>&lt;P&gt;Chris, I wonder whether the PHP API (which presumably is based on the SA C API, which offers the &lt;A href="https://help.sap.com/docs/SAP_SQL_Anywhere/b86b137c54474b11b955a4d16358b208/3bf6a9c06c5f1014b7ffe7b6eaccffab.html"&gt;sqlany_register_callback() function&lt;/A&gt;) does support/offer those callbacks, too?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 02:42:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837022#M4867865</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2024-01-09T02:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get server messages in PHP Api?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837023#M4867866</link>
      <description>&lt;P&gt;Based on the PHP driver source in %sqlany17%\\SDK\\PHP, I am not able to find any invocations of sqlany_register_callback in the PHP driver implementation.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 09:42:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837023#M4867866</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2024-01-09T09:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get server messages in PHP Api?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837024#M4867867</link>
      <description>&lt;P&gt;Chris, so it is not possible to get these messages via PHP cause its not implemented in the driver right. Any ideas how i can provide those messages for users in a web application? Maybe i should add the message(s) as a result set to the procedure.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 02:17:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837024#M4867867</guid>
      <dc:creator>former_SQLA_member1694966</dc:creator>
      <dc:date>2024-01-12T02:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get server messages in PHP Api?</title>
      <link>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837025#M4867868</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;so it is not possible to get these messages via PHP cause its not implemented in the driver right.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;Well, technically&lt;/STRONG&gt; the driver's source code is available in the SQL Anywhere installation (see Chris's comment), so in case you are familiar with C and PHP programming, you might be able to enhance the driver to add an according callback facility. My knowledge of PHP is rather limited, so I can't tell whether this is doable and how difficult this would be - AFAIK, PHP itself does support callback functions, and the underlying SQL Anywhere C API does provide that according sqlany_register_callback with type CALLBACK_MESSAGE, so there should be chances it will work.&lt;/P&gt;
&lt;P&gt;That being said, it is probably way easier to enhance your stored procedures with according result sets...&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 04:15:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-to-get-server-messages-in-php-api/qaa-p/13837025#M4867868</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2024-01-12T04:15:47Z</dc:date>
    </item>
  </channel>
</rss>

