ERPNext Conference 2019* Blog

Unable to receive PHP form value in ERPNext Doc


I want to store one PHP form data into ERPNext doc .
I tried FrappeClient-PHP API, But got error.
The error is “Cookie file not writable:cookie.txt”.

I tried with Curl, but no success. I am stuck with it. Can anyone give me any suggestion on that ?
Any help will be appreciated .


The issue is the permissions on your machine where the PHP script is running from.

You have to first determine which user the script is running from (it is from apache, the command line, by user apache, by user www-data, by vhost user…)

Then you need to make sure the directory where the script is running from has the correct file permissions and ownership.

As an example, you may find that you set the system up and therefore the directory and files are owned by you, or root. When apache runs, it is running ad user www-data, which had no permission to create the file in the directory tree.

Providing more information that you did will help others help you.