Closed agriirga closed 7 years ago
Any error returned on you dev tools? Might be an issue on the server config where url params are encoded twice.
there is no error returned by server (it returns 200 for all request), but when i'm trying to search on server the query params like this.
query result :
But on my local pc , it return query like this :
Did PHP 7.1.5 support for Datatables 6.0 ? Or maybe i should downgrade my PHP version ?
How about the inputs? I am using PHP 7.1 on the demo app so I guess it's not the problem.
Might be related to this: https://github.com/yajra/laravel-datatables/issues/1086
inputs are empty....
i've tried to rewrite rule like above, but nothing changes ..
it has been solved SIr,
We forgot to set cgi extension and mcrypt in our web server (nginx) cgi.fix_pathinfo=0; phpenmod mcrypt;
Thanks so much !!
I am using php7.2 I set the cgi.fix_pathinfo=0 & php-mcrypt is not supported in v7.2 have the same problem all laravel datatable functionality is stopped without any error
Ok i solve the problem it's all within nginx config so i will share both old and new nginx config old
server {
listen 80;
listen [::]:80 ipv6only=on default_server;
root /var/www/example/public;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
new
server {
listen 80;
listen [::]:80;
root /var/www/example/public;
index index.php index.html index.htm;
server_name cardeliver.net;
location / {
try_files $uri $uri/ /index.php?$query_string;
proxy_read_timeout 180;
}
client_max_body_size 100000m;
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
proxy_read_timeout 180;
fastcgi_read_timeout 180;
}
}
For me, change on this line only make it works. note the ? (question mark) after index.php
try_files $uri $uri/ /index.php?$query_string;
i have implement yajra-datatables on my projects and works fine on my local development but when i'm deploy on my production server, all functionality in datatables doesn't work (such as : sort, search, and pagination). In my production server, Datatables display all data from database table (for example in my attachment : data from tools table, with 335 rows) .
My Sample Code
System details
My Local Development : Laravel 5.3 PHP 7.0.9 Yajra Datatables 6.0 MySQL
Here's my productionserver environment : PHP 7.1.5 Ubuntu 16.04.2 Yajra Datatables 6.0 Laravel 5.3
Attachment
last rows from my datatables: