chuushi / CoreProtect-Lookup-Web-Interface

A flexible lookup web interface for CoreProtect 2
MIT License
50 stars 14 forks source link

SyntaxError: Unexpected token < in JSON at position 0 (Possible webserver PHP misconfiguration) #28

Closed 127p closed 3 years ago

127p commented 4 years ago

Hello,

When trying to make a search I receive the error:

SyntaxError: Unexpected token < in JSON at position 0 (Possible webserver PHP misconfiguration)

I'm using sqlite, the database is in the same folder than index.php so my config file looks like this:

'database' => [
    'server' => [
        'type'        => 'sqlite',
        'path'        => 'database.db',
        'host'        => '',
        'database'    => '',
        'username'    => '',
        'password'    => '',
        'flags'       => '',
        'prefix'      => 'co_',
        'preBlockName'=> true,
        'mapLink'     => 'https://localhost:8123/?worldname={world}&mapname=surface&zoom=3&x={x}&y={y}&z={z}'
    ],
],

I'm using XAMPP on my windows 10 computer to make the php server with the defaults settings, am I missing some configuration of php.ini?

Thanks!

chuushi commented 4 years ago

You might be missing some extensions. Check the prerequisites and see if you have those modules enabled!

guimartino commented 4 years ago

I'm facing the same issue, but using mysql I did a double check and I have PDO_MYSQL installed on my webservice and all the connection info are correct

image

At the same server I'm able to do PDO queries in the same Mysql server (using the same credentials)

What can be happening in this case? Many thanks! :)

cokeramirez commented 4 years ago

image

We also have PDO activated and have the same issue, but we are using sqlite.

Is there any other setting I should check?

chuushi commented 4 years ago

Huh, that is interesting. I'd like to narrow down the variables and test it on a setup similar to your environment. What version of PHP and webserver are you using?

127p commented 4 years ago

XAMPP 7.4.7 / PHP 7.4.7 Last version, Default install https://www.apachefriends.org/es/index.html