Sadly, your suggestion results in same issue I am having.
Seems EXEOut will not work with standard PDO / SQLite. Have tested my code on WAMPP and live server and works without issue. Will not work with EXEOut. Either some type of path issue or EXEOut does not work with PDO.
Try to check the value of $dbname
with echo $_SERVER['DOCUMENT_ROOT'].'/db2/salespage.sqlite3';
Also try to move to a folder without spaces in its name to see if this could be the reason.
So I have to assume @gdgsupport there is not a solution? Something is certainly wrong when I can use the same code (except for path of course) on XAMPP, PHPDesktop, live server and just tried using phpbrowserbox. All work flawless with exception of EXEOut.
Guess it it is back to using good ole backup plan; nodejs hacked with php:(
We tested new PDO('sqlite:'.path); and it works fine. Indeed, the \ slash could be problematic: PHP knows how to deal with different \ and / for paths. But SQLite may have a different behavior.
Using SQLite on ExeOutput is possible, it’s tricky to understand and I think the documentation should be made clearer. The following steps helped me.
Check the “Use an absolute path for the virtual Data subfolder”
In the text field, replace “X:Data” with the full path to where your SQLite file is e.g
“C:\Users\My Computer\project\my_app\db_folder” ensure this is where your SQLite file is. likely inside your db folder inside your project app folder e.g. “my_app\db_folder\user_db.sqlite3” so it can be bundled into your EXE file.
In your PHP file, make your connection as below:
dbname = $_SERVER[‘DOCUMENT_ROOT’].’\user_db.sqlite3’;
$conndb = new PDO(“sqlite:$dbname”);
$conndb->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);