App Services PHP Cannot set Cookies

2021-11-10T14:48:43.303+00:00

I am getting to know app services, have setup a simple php app with custom domain and db access - all good. BUT PHP cannot set a cookie - what do I need to do to make this work? Same code sets cookies om my local dev env.

Thanks.

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
237 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,931 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,636 Reputation points Microsoft Employee
    2021-11-20T12:20:55.357+00:00

    @I cannot create a managed database - why? Cookies are actually set in the browser when a response contains the Set-Cookie. So as long as your PHP code is setting the header, the browser should store the cookie.

    Ensure you are setting the right domain attribute, if you are passing one.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.