<?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>topic Re: I have a issue with CORS in php in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89334#M26760</link>
    <description>&lt;P&gt;Follow this document and configure cors on your installation:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/tasks/enable-cors.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/tasks/enable-cors.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can also look at this post, its not with PHP though but may give some hints:&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/application-development/adf-cors-solving-strategies/bc-p/286963" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/application-development/adf-cors-solving-strategies/bc-p/286963&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Some additonal posts related to CORS:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://anshu-alfresco-one.blogspot.com/2015/08/enable-cors-in-alfresco-and-how-to-use.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://anshu-alfresco-one.blogspot.com/2015/08/enable-cors-in-alfresco-and-how-to-use.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/application-development/enabling-cors/td-p/218640" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/application-development/enabling-cors/td-p/218640&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2020 16:18:09 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2020-02-28T16:18:09Z</dc:date>
    <item>
      <title>I have a issue with CORS in php</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89333#M26759</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a issue when i consume the Alfresco APIs.&lt;/P&gt;&lt;P&gt;I have installing Alfresco Version 5.2.0 (201707).&lt;/P&gt;&lt;P&gt;I want consume the Alfresco APIs with PHP. I have a code in php i use JQUERY for that. I have used JQUERY, AJAX, AXION but&amp;nbsp;but none works. In console i have this issue. "Access to XMLHttpRequest at 'http://localhost:8080/alfresco/service/api/login.json?u=admin&amp;amp;pw=admin' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if there is an SDK for PHP. I have used some SDK for PHP but is very OLD. Also&amp;nbsp;i have added the permissions in the head and it doesn't work for me either.&lt;/P&gt;&lt;P&gt;This is my code. Is very simple!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;/P&gt;&lt;P&gt;if (isset($_SERVER['HTTP_ORIGIN'])) {&lt;BR /&gt;header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");&lt;BR /&gt;header('Access-Control-Allow-Credentials: true');&lt;BR /&gt;header('Access-Control-Max-Age: 86400');&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {&lt;BR /&gt;&lt;BR /&gt;if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))&lt;BR /&gt;header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");&lt;BR /&gt;&lt;BR /&gt;if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))&lt;BR /&gt;header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");&lt;BR /&gt;} ?&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;script type = "text/javascript"&lt;BR /&gt;src="&lt;A target="_blank" rel="noopener"&gt;https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;script type = "text/javascript" language = "javascript"&amp;gt;&lt;/P&gt;&lt;P&gt;$(document).ready(function() {&lt;BR /&gt;var surl = "http://localhost:8080/alfresco/service/api/login.json?u=admin&amp;amp;pw=admin";&lt;BR /&gt;$.ajax({&lt;BR /&gt;url: surl,&lt;BR /&gt;dataType: "json",&lt;BR /&gt;success: function (data) {&lt;BR /&gt;alert(JSON.stringify(data));&lt;BR /&gt;}&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;BR /&gt;&lt;BR /&gt;I hope someone can help me. Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 13:57:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89333#M26759</guid>
      <dc:creator>viperboys</dc:creator>
      <dc:date>2020-02-27T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with CORS in php</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89334#M26760</link>
      <description>&lt;P&gt;Follow this document and configure cors on your installation:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/tasks/enable-cors.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/tasks/enable-cors.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can also look at this post, its not with PHP though but may give some hints:&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/application-development/adf-cors-solving-strategies/bc-p/286963" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/application-development/adf-cors-solving-strategies/bc-p/286963&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Some additonal posts related to CORS:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://anshu-alfresco-one.blogspot.com/2015/08/enable-cors-in-alfresco-and-how-to-use.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://anshu-alfresco-one.blogspot.com/2015/08/enable-cors-in-alfresco-and-how-to-use.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/application-development/enabling-cors/td-p/218640" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/application-development/enabling-cors/td-p/218640&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 16:18:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89334#M26760</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-02-28T16:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with CORS in php</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89335#M26761</link>
      <description>&lt;P&gt;Hi abhinavmishra&lt;BR /&gt;&lt;BR /&gt;I was very helpful. I am very grateful.&amp;nbsp; By last. Are there any codes made with PHP that I can try with these APIs?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 15:19:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89335#M26761</guid>
      <dc:creator>viperboys</dc:creator>
      <dc:date>2020-03-02T15:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with CORS in php</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89336#M26762</link>
      <description>&lt;P&gt;Take a look at this post:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-hub/php-api-tutorials/ba-p/289770" target="_blank" rel="noopener nofollow noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-hub/php-api-tutorials/ba-p/289770&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/alfresco-php-sdk/tree/master/php-lib/source/php/api/Tutorials" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/alfresco-php-sdk/tree/master/php-lib/source/php/api/Tutorials&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/alfresco/alfresco-php-sdk" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/alfresco/alfresco-php-sdk&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Its an old post but might give you some ideas.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 16:26:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89336#M26762</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-03-02T16:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with CORS in php</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89337#M26763</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I see that many links do not work. And I have urged to install that SDK but the instructions link does not work. Do you have these links on another site working?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 17:42:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89337#M26763</guid>
      <dc:creator>viperboys</dc:creator>
      <dc:date>2020-03-02T17:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with CORS in php</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89338#M26764</link>
      <description>&lt;P&gt;Unfortunately i don't have any other info. You can take the reference from the tutorial. Or try contacting the project owner on github. Its very old project though&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 18:29:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89338#M26764</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-03-02T18:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: I have a issue with CORS in php</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89339#M26765</link>
      <description>&lt;P&gt;Ok.. Thank you very much..&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 12:58:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/i-have-a-issue-with-cors-in-php/m-p/89339#M26765</guid>
      <dc:creator>viperboys</dc:creator>
      <dc:date>2020-03-03T12:58:39Z</dc:date>
    </item>
  </channel>
</rss>

