By appSquid
Hi, team.
Long story short:
I was hosting my application in Amazon Web Services in a LEMP Instance. I then decided to move to Digital Ocean because their instances are not allowed to send emails.
My app, in the AWS instance, was able to upload photos, write to the database, and communicate with an external API.
In Digital Ocean, however, I’m not able to upload photos. In /var/log/nginx/error.log this is the output:
2020/05/18 03:28:17 [error] 10851#0: *174 FastCGI sent in stderr: "PHP message: PHP Notice: A non well formed numeric value encountered in /usr/share/nginx/html/admin/core/controller/class.upload.php on line 2667 PHP message: PHP Notice: A non well formed numeric value encountered in /usr/share/nginx/html/admin/core/controller/class.upload.php on line 2667" while reading response header from upstream, client: 181.115.109.228, server: _, request: "POST /admin/index.php?action=addproduct HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "165.227.91.80", referrer: "http://165.227.91.80/admin/index.php?view=newproduct"
You’d believe that there’s an error in class.upload.php on the line 2667, however, this is not the case. As I’m telling you, everything works as intended in AWS. /var/log/php-fpm/error.log does not show any error. This is the output:
[18-May-2020 01:39:40] NOTICE: fpm is running, pid 10826
[18-May-2020 01:39:40] NOTICE: ready to handle connections
[18-May-2020 01:39:40] NOTICE: systemd monitor interval set to 10000ms
The upload directory is /usr/share/nginx/html/admin/storage and the permissions are set to 777.
Please, help.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @appSquid,
it seems to be like the issue is related to either missing packages or different versions.
Please make sure you check the PHP versions and packages you are using in both environments. After that, if you are still experiencing the issue, can you post the exact line or right before that from the file to see if it’s something that maybe you missed?
Regards, KFSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.