Magento - grid view doesn't work - php

I have a problem with Grid View in Magento ver. 1.9.3.0.
When I'm trying to change the layout from list to grid view nothing happen.
http://alcosense.co.uk/alcosense/mode/list.html and try to change to grid.
I'm using NGINX + FastCGI and in the Nginx logs I can see this (spaced for readability):
682128 FastCGI sent in stderr:
"PHP message: PHP Fatal error: Call to a member function getReviewsCount() on a non-object in
/var/www/alcosense/public_html/app/code/core/Mage/Review/Block/Helper.php on line 67"
while reading response header from upstream,
client: 109.235.151.138,
server: www.alcosense.co.uk,
request: "GET /ajax/layered-navigation/catalog/category/view/id/3/requested-url/alcosense/mode/grid.html HTTP/1.1",
upstream: "fastcgi://unix:/var/run/php-fpm-alcosense.sock:",
host: "alcosense.co.uk",
referrer: "http://alcosense.co.uk/alcosense/mode/grid.html";;;
When I put this link http://alcosense.co.uk/alcosense/mode/grid.html works but just shows just only 2 products...
I don't even know where to start to fix it.

Related

PHP-FPM with NGINX - Error log missing line breaks after update

I'm working on a update for a old system whose versions are PHP7.1, NGINX 1.10.1 on an old Ubuntu 14.04.4.
The apps logs were displayed like this:
2022/03/10 07:05:40 [error] 23694#23694: *89040 FastCGI sent in stderr: "PHP message: .
PHP message: ..................................................[ Developer Version ]
PHP message: .
PHP message: Started GET / (1.2.3.4:34210)
PHP message: Parameters = []
PHP message: Resource Selected: ControllerName
PHP message: Session started: [123 , (**anon**)]
PHP message: Response = {"class":"HtmlResponse","code":200}" while reading response header from upstream, client: 1.2.3.4, server: oldserver.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "4.3.2.1"
However, after upgrading to Ubuntu 20.04.4, PHP 8.0.16 and Nginx 1.18.0 all my logs are clumped together without the line breaks, like this:
2022/03/10 07:49:17 [error] 44423#44423: *1 FastCGI sent in stderr: "PHP message: .PHP message: ..................................................[ Developer Version ]PHP message: .PHP message: Started GET /url-name (1.2.3.4:58262)PHP message: Parameters = []PHP message: Resource Selected: ControllerName message: Session started: [abc123 , (**anon**)]PHP message: Response = {"class":"HtmlResponse","code":200}" while reading response header from upstream, client: 1.2.3.4, server: servername.com, request: "GET /url-name HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm.sock:", host: "servername.com"
The logs are created on dispatch.php file like this:
$logger->error('.');
$logger->error('..................................................[ Developer Version ]');
$logger->error('.');
And the $logger class basically calls the error_log method
error_log($pf.$msg);
Does anyone know to resolve this? Help appreciated, please
Just add new line
error_log( $pf . $msg . "\n");

PHP Internal Server error on Nginx replacewildcardsinredirecturl()

I was installing a script that require ionCube loaders on a Ubuntu 16.04 with PHP5.6 and Nginx. ionCube Loaders appear to be working according to phpinfo page.
http://tutt2.com/phpinfo.php
Although majority of pages are working, I'm getting a 500 Internal Server Error on page which is supposed to redirect to a third party page. This is the page that is giving the error.
http://tutt2.com/base.php?c=7&key=c98f46504d315fb435212cc15093d045&test=true
As you can see it's not redirecting. And this is what I see on NGINX error log.
2017/08/26 04:45:26 [error] 16801#16801: *767 FastCGI sent in stderr: "PHP Fatal error: Call to undefined function replacewildcardsinredirecturl() in /home/tutt2/public_html/basecode.php on line 0" while reading response header from upstream, client: 113.59.210.222, server: tutt2.com, request: "GET /base.php?c=7&key=c98f46504d315fb435212cc15093d045&test=true HTTP/1.1", upstream: "fastcgi://unix:/var/php-nginx/15023718282643.sock/socket:", host: "tutt2.com", referrer: "http://tutt2.com/direct-and-landing-campaign.php?id=7"
I'm not sure what replacewildcardsinredirecturl() is. I've looked in basecode.php but it doesn't help since it's encrypted. Hope someone can point me to right direction.
Thanks in advance.

Internal Error 500 with nginx and PHP GeoIP Module

I am trying to look up the country associated with an external IP (not the visitor) in a PHP script. I have installed the module. When I run nginx -V, --with-geoip-module appears in the list, and I have the GeoIP.dat file in /usr/share/GeoIP/ on my server. I also have the path to the GeoIP files in my nginx.conf:
geoip_country /usr/share/GeoIP/GeoIP.dat; # the country IP database
Here's the code I am using to test:
<?php
echo geoip_country_code_by_name('69.84.125.113');
?>
This is returning the following error:
PHP message: PHP Fatal error: Call to undefined function geoip_open() in /usr/share/nginx/html/geoip.php on line 7" while reading response header from upstream, client: 69.84.125.113, server: localhost, request: "GET /geoip.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "mydomain.com"
Please help, I've been struggling with this all day!!
I think you need to include it first.
include ("include/geoip.inc");

Suddenly error with wordpress only with nginx (Uncaught SyntaxError: Unexpected end of input)

I've installed Wordpress on my VPS and is run smoothly with apache2. But recently , I recognized that it consume too much RAM (~600MB for 7-8 session) so I decided to change to Nginx. After changing for few days, it's working fine, without any problem but suddenly yesterday, the Admin Page layout was destroyed. I looked into the console log and found out this problem: Uncaught SyntaxError: Unexpected end of input, the file was wp-admin/load-scripts.php.
You can access to the file directory as
http://vietnammechkey.com/wp-admin/load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,json2&ver=3.8.2
The file will be longer if I use Apache2 and it will be sorter if I use nginx
Note: The Wordpress working perfectly on Apache2.
This is a fairly old question, and I guess by now you must have figured it out by yourself. I just came across the same issue. In my case, it was caused by bad permissions. Excerpt from my /var/log/nginx/error.log:
2015/03/13 16:07:18 [crit] 21806#0: *276 open()
"/var/lib/nginx/fastcgi/2/03/0000000032" failed (13: Permission denied)
while reading upstream, client: 81.253.76.64, server: yoga-maragata.fr, request:
"GET /wp-includes/js/tinymce/wp-tinymce.php?c=1&ver=4107-20150118 HTTP/1.1",
upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.yoga-maragata.fr",
referrer: "http://www.yoga-maragata.fr/wp-admin/post.php?post=7&action=edit"
It was obviously a permission issue, and as it happens, I had just changed the nginx user setting in /etc/nginx/nginx.conf. Reverting to www-data solved the issue.

Does PHP 5.5 work with MongoDB driver?

I've just installed PHP 5.5 and I am no longer able to use MongoClient and I'm getting frustrated trying to figure out why.
This doesn't work:
$m = new MongoClient("mongodb://workplz.com");
My nginx error log shows:
2013/07/05 10:40:16 [error] 4163#0: *698 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'MongoClient' not found in /blah/test.php on line 2" while reading response header from upstream, client: 123.123.123.123, server: blah, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/freecookies.sock:", host: "blah"
I do have extension=mongo.so in my php.ini.
When I do phpinfo() it shows under Mongo Version 1.4.1
Extra info:
PHP Version 5.5.0-1ubuntu2~precise1
nginx/1.4.1
Edit
When I try to execute it from php-cli I get the same thing:
PHP Fatal error: Class 'MongoClient' not found in /blah/test.php on line 2
Double check your php.ini, you're probably using the wrong one. There are several for different ways to invoke PHP.

Categories