codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.39k stars 1.9k forks source link

mysqli_sql_exception. error if there are spaces in my user folder name #6904

Closed DCreati closed 1 year ago

DCreati commented 2 years ago

PHP Version

8.1

CodeIgniter4 Version

4.2.10

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

MySQL 8.0.31

What happened?

SELECT * FROM 'settings' WHERE 'context' IS NULL
SELECT GET_LOCK('41c409f5e688a472d5fec9021721b373', 300) AS ci_session_lock
SELECT 'data' FROM 'C:\Users\Martin' 'Dovey\Documents\ppj\writable\session' WHERE 'id' = '373rcak46gc9mvvfv9b536jd5gcfsc58' AND 'ip_address' = '::1' 

this query generated this error:

0 C:\Users\Martin Dovey\Documents\ppj\vendor\codeigniter4\codeigniter4\system\Database\MySQLi\Connection.php(292): mysqli->query()

the problem is that my user folder contains spaces and this prevents the application from executing the code correctly.

Steps to Reproduce

the error reported by app when i start it

Expected Output

the folder "Martin Dovey" is considered as unique and not separate

Anything else?

No response

kenjis commented 2 years ago

Please provide steps how to reproduce.

Do you have the table named C:\Users\Martin Dovey? Why do you use such a strange table name?

paulbalandan commented 2 years ago

Why are you using a file path as the table name? WRITABLE . 'session' should only be used for session if you are using the file handler. Otherwise, you must set the correct database table name.

paulbalandan commented 2 years ago

This looks like a misuse.

paulbalandan commented 1 year ago

No further info provided.