Comments (12)
removed dependency of symfony, can you update the library and test it ?
from datatables.
Seems something that related to :
https://www.w3.org/International/questions/qa-byte-order-mark.en#problems
You can try saving the files without BOM (remove bom)
https://www.w3.org/International/questions/qa-byte-order-mark.en#remove
from datatables.
I recreated the files on my namecheap shared hosting (php 5.6) via cpanel and copy pasted my code.
I am getting different error this time
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/crafctuz/ossamarafique.com/datatable/vendor/ozdemir/datatables/src/Datatables.php on line 68
Please review it here :
https://www.ossamarafique.com/datatable/index.php
https://www.ossamarafique.com/datatable/ajax.php
from datatables.
After changing php version to 7.3 error is changed
Fatal error: Uncaught PDOException: could not find driver in /home/crafctuz/ossamarafique.com/datatable/vendor/ozdemir/datatables/src/DB/MySQL.php:45 Stack trace: #0 /home/crafctuz/ossamarafique.com/datatable/vendor/ozdemir/datatables/src/DB/MySQL.php(45): PDO->__construct('mysql:host=loca...', 'crafctuz_test', 'crafctuz_test') #1 /home/crafctuz/ossamarafique.com/datatable/vendor/ozdemir/datatables/src/Datatables.php(59): Ozdemir\Datatables\DB\MySQL->connect() #2 /home/crafctuz/ossamarafique.com/datatable/ajax.php(29): Ozdemir\Datatables\Datatables->__construct(Object(Ozdemir\Datatables\DB\MySQL)) #3 {main} thrown in /home/crafctuz/ossamarafique.com/datatable/vendor/ozdemir/datatables/src/DB/MySQL.php on line 45
from datatables.
Now after changing PHP version to 7.1 Errors are gone but the same problem again
{"draw":0,"recordsTotal":2,"recordsFiltered":2,"data":[["1","admin"],["2","user"]]}HTTP/1.0 200 OK
Cache-Control: no-cache, private
Content-Type: application/json
Date: Fri, 11 Jan 2019 15:16:40 GMT
{"draw":0,"recordsTotal":2,"recordsFiltered":2,"data":[["1","admin"],["2","user"]]}
from datatables.
Now, PHP version is 7.3 and I enabled pdo_mysql.
Problem is same, it is showing the headers.
https://www.ossamarafique.com/datatable/ajax.php
from datatables.
This problem looks similar to
https://stackoverflow.com/questions/14405916/displaying-cache-headers
https://stackoverflow.com/questions/20075235/symfony-ajax-response-but-with-headers-http-1-0-200-ok-cache-control-no-cache
from datatables.
Couldn't reproduce the error. Sorry.
Can you try
echo json_encode( $dt->generate()->toArray() );
from datatables.
I think this is something related to webserver settings
Can you check nginx setup or .htaccess file if you are using apache.
from datatables.
I already used above thing, But the default method was not working that's why I opened the issue.
My .htaccess code ::
#turn on url rewriting
RewriteEngine on
#remove the need for .php extention
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
ErrorDocument 404 /404-error.php
ErrorDocument 403 /assets/pages/403.php
But it has nothing to do with that header output.
from datatables.
This error is showing on my both local server and NameCheap shared hosting.
from datatables.
Its working now, Thank you! 👍
from datatables.
Related Issues (20)
- Large Table Count HOT 2
- Mysql table with dashes in name causes error HOT 15
- Filters HOT 3
- How to include in project without Composer
- Which method adds optional parameters to the row? HOT 1
- Multiple value coloumn order HOT 2
- Add support for Embedded DataTable from Editor HOT 1
- Conditional where clauses for PhalconAdapter HOT 1
- MySQL error on special column names HOT 5
- addIndexColumn / DT_RowIndex
- Laravel adapter does not work with PostgreSQL
- PhalconAdapter not working
- Export to Excel feature HOT 1
- datatable: data with function, doesn't work sort HOT 1
- Problem when using sql server in codeigniter 4 adapter HOT 2
- data as array are forbidden HOT 1
- Skip Total Records HOT 2
- edit all columns HOT 5
- weird error with the sorting of multiple columns HOT 1
- Mysql PDO HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datatables.