Jump to content

PHP Warning when manually adding orders from BO


Recommended Posts

Hello, 

 

Every time I manually add an order from the Back Office, I get this error in my error.log. This error appears just after I search for my product and I click on the 'Add to cart' button from the BO:

 

2015/10/30 13:23:38 [error] 5529#0: *106632 FastCGI sent in stderr: "PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/admin/mydomain.com/public_html/controllers/admin/AdminCartsController.php:477) in /home/admin/mydomain.com/public_html/classes/controller/AdminController.php on line 1787" while reading upstream, client: xx.xx.server.ip, server: mydomain.com, request: "POST /admin123/index.php?controller=AdminCarts&token=78186f7798400bf4816694357c39fc55 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com", referrer: "http://mydomain.com/admin1123/index.php?controller=AdminOrders&addorder&token=2d03183d134e3005f63eff6c3d08b75c"
 
I have PHP 5.6.14 with nGINX and running Prestashop 1.6.1.1
 
As I see the error is from line 477 in AdminCartsController.php, but I have no idea what is wrong with that line:
 
echo Tools::jsonEncode(array_merge($this->ajaxReturnVars(), array('errors' => $errors)));

I can successfully add the order with this error, but I'm not sure how it affects the site. Can anybody help?

 

Thanks

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
  On 1/7/2016 at 4:50 PM, bellini13 said:

this usually means your nginx is not properly configured, and that the proxy buffer is too small or that the timeout settings are too low.

 

Thanks for the tip. I modified the proxy setting. The error still appears in my error.log Here are my current settings for proxy buffers and timeout, how big should I put them? I think this is big enough, no?

proxy_connect_timeout   90;
proxy_send_timeout      90;
proxy_read_timeout      90;
proxy_buffers           16 512k;
proxy_buffer_size       512k;
proxy_busy_buffers_size 512k;
send_timeout                    30;
keepalive_timeout               30;
fastcgi_read_timeout            125;
fastcgi_buffers                 6 512k;
fastcgi_buffer_size             512k;
Edited by zanpo (see edit history)
Link to comment
Share on other sites

  • 11 months later...

I'm using Apache and get this error when adding orders:

[Tue Jan 17 17:36:29.117093 2017] [:error] [pid 4934] [client MyIP:53649] FastCGI: server "/usr/lib/cgi-bin/php5.fcgi" stderr: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/html/controllers/admin/AdminCartsController.php:481) in /var/www/html/classes/controller/AdminController.php on line 1791, referer: https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx[Tue'>https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx[Tue Jan 17 17:36:39.091677 2017] [:error] [pid 4763] [client MyIP:53650] FastCGI: server "/usr/lib/cgi-bin/php5.fcgi" stderr: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/html/controllers/admin/AdminCartsController.php:481) in /var/www/html/classes/controller/AdminController.php on line 1791, referer: https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx[Tue'>https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx[Tue Jan 17 17:36:45.262446 2017] [:error] [pid 4763] [client MyIP:53650] FastCGI: server "/usr/lib/cgi-bin/php5.fcgi" stderr: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/html/controllers/admin/AdminCartsController.php:481) in /var/www/html/classes/controller/AdminController.php on line 1791, referer: https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx[Tue'>https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx[Tue Jan 17 17:36:51.634516 2017] [:error] [pid 4763] [client MyIP:53650] FastCGI: server "/usr/lib/cgi-bin/php5.fcgi" stderr: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/html/controllers/admin/AdminCartsController.php:481) in /var/www/html/classes/controller/AdminController.php on line 1791, referer: https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx[Tue'>https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx[Tue Jan 17 17:37:17.574939 2017] [:error] [pid 4763] [client MyIP:53652] FastCGI: server "/usr/lib/cgi-bin/php5.fcgi" stderr: PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at /var/www/html/controllers/admin/AdminCartsController.php:367) in /var/www/html/classes/controller/AdminController.php on line 1791, referer: https://MyDomain.co.uk/admin2281/index.php?controller=AdminOrders&addorder&token=xxx

Any ideas?

Edited by n_s_simpson (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...