PHP Upload File Through REST: Using HTTP POST JSON data Return Blank Page
If you are:
- Using REST API (XML RPC Hybrid, a.k.a. calling URL)
- Submit a large volumn of data (e.g. 10MB) through JSON base64 string
- Submit using HTTP POST to a URL
- Get a blank page (no return) after submit
- No error log
Check these 3 things:
In your php.ini:
- upload_file_size has big enough value. e.g. 10MB or 15MB
- post_max_size has big enough value. e.g. 10MB or 15MB
- memory_limit has big enough value. e.g. 128MB
If you just changed the first two and still get blank page when you upload, chances are you have already exhausted your memory. Raise your memory so as to make the page load.
It is particularly useful if you are using mobile service (iPhone, Android) to upload image to server using base64.
Hope it helps someone.
Comments