jfdutcher Posted July 21, 2006 Share Posted July 21, 2006 I installed from the zip download to C:\PHP.I uncommented the extension entry for the SQLite dll in php.ini.I tried two versions of the extension-dir value...the original which was "./"and replaced it with "C:\PHP\ext\" (which is where the SQLite dll seems to be).When a brief "testSQLite.php" is run ....it does start up and 'print' literals that I have insideappear.... until the first call to open or create a SQLite DB is made...then everything stops thereand the 'Done' literal appears at the bottom left of the screen.Before when I foolishly installed just with the Windows 'installer' download...PHP at leaststated that the requested function could not be found when I ran the SQLite test script;Now ...... nothing ?? Quote Link to comment https://forums.phpfreaks.com/topic/15245-enabling-sqlite-in-php-514/ Share on other sites More sharing options...
Joe Haley Posted July 22, 2006 Share Posted July 22, 2006 have you done a phpinfo(); to see if the extension is actually working?p.s: i don't claim to be an expert here, or even understand allot of it, but my extension-dir is set to 'C:\php\ext' (without the final trailing slash) and it works. Quote Link to comment https://forums.phpfreaks.com/topic/15245-enabling-sqlite-in-php-514/#findComment-62072 Share on other sites More sharing options...
jfdutcher Posted July 25, 2006 Author Share Posted July 25, 2006 Yes, phpinfo.php works fine.I changed my extention-dir to "c:\php\ext" .....but it made no difference.I placed php_pdo.dll, php_pdo_sqlite.dll and php_sqlite.dll in the PHP folderas one input person suggested (they are already in the 'ext' folder....this hadno effect.I'm hoping I can download SQLite independently of PHP and still work with it.Thanks...... John Quote Link to comment https://forums.phpfreaks.com/topic/15245-enabling-sqlite-in-php-514/#findComment-63702 Share on other sites More sharing options...
wildteen88 Posted July 26, 2006 Share Posted July 26, 2006 When you make changes to the php.ini or move any files around within the PHP folder, you must restart the server.Also move any php_*.dll files back into the ext folder. And just move the php.ini to the WINDOWS folder. Restart your server. Is PHP now reading the correct php.ini. Also it is a good idea to add the your PHP folder to the WINDOWS PATH variable. To do this do the following:First goto Start > Control Panel (make sure its set to classic view) > System > Advanced TabNow click the Environment Variables button. Look for the Path variable within the System Variables window, scroll down if needed. Select it and press the Edit button. When the Edit System Variable window appears, immediatly press the End key on your keyboard, dont delete anything that is selected. Now add a semi-colon if there isnt one already to the left of the curser. Now type in C:\php;Click OK to close the Edit System Variable Window. Click OK to close the System Variables Window, Click OK to close the System Properties window. Now restart your PC in order for the new path variable to become available. Now PHP should be able to access its own folder, therefor you dont need to move any files around. Quote Link to comment https://forums.phpfreaks.com/topic/15245-enabling-sqlite-in-php-514/#findComment-63991 Share on other sites More sharing options...
jfdutcher Posted July 26, 2006 Author Share Posted July 26, 2006 I've done it all, to no avail... Here's the key pieces of php.ini: (now in c:\windows); Directory in which the loadable extensions (modules) reside.extension_dir = "C:\PHP\ext" .........extension=php_pdo_sqlite.dll <--- some users observed these had to be 'last' in the seriesextension=php_sqlite.dllHere's the autoexec.bat 'path' : (in c:\windows\command\edb - (it's a Win ME OS))@ECHO OFFpath=c:\windows;c:\windows\command;c:\php\hibinv.execall \checksr.batIF "%config%"=="QUICK" GOTO QUICK etc. etc. .....Here's the 'test' script used on various 'sites'....the 1st (2) 'prints' 'work' - the script stops at thefirst call to SQLite....no other output:#!c:\php\php-cgi.exe<?php//create tableprint "Came to script"; <------ this worksprint " "; <------ this works if(file_exists("test.db")) { $weNeedToCreateTheDatabase = false;} else { $weNeedToCreateTheDatabase = true; }print ($weNeedToCreateTheDatabase); <------ this works//create or open database$db = sqlite_open("test.db") or die("failed to open/create the database");print ($weNeedToCreateTheDatabase); <-----this doesn't happen//create tableif($weNeedToCreateTheDatabase) { sqlite_query($db, "CREATE TABLE Members(FirstName,LastName)");}//add infosqlite_query($db,"INSERT INTO Members VALUES ('Jim', 'Rockerton')");//get info$dt = sqlite_query($db, "SELECT * FROM Members");while ($row = sqlite_fetch_array($dt)) {echo "row: $row[FirstName] $row[LastName]<br/>";}//close databasesqlite_close($db);?> Quote Link to comment https://forums.phpfreaks.com/topic/15245-enabling-sqlite-in-php-514/#findComment-64389 Share on other sites More sharing options...
jfdutcher Posted July 27, 2006 Author Share Posted July 27, 2006 Many thanks to all........success at last.I had set the PATH by editing the autoexec.bat file. This 'took' but had no effect on the'ENVIRONMENT' data that phpinfo displays.The suggested tabs in the very helpful 'super guru' notes couldn't quite be followed as the'tabs' cited were not all present. I found a site that detailed Win ME PATH setting in particular(it was for Java SDK...but non-the-less). This allowed success in actually changing the PATHthat is apparently supplied to PHP (I gather it is not 'autoexec.bat'). Adding 'super guru's' suggestedc:\php to 'that' PATH .....finally let SQLite's testScript complete. Quote Link to comment https://forums.phpfreaks.com/topic/15245-enabling-sqlite-in-php-514/#findComment-64402 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.