0

after hours of googleing, i've decided to write my problem here:

I simply wanna use the SQLite library in PHP. But i am getting this error here:

Fatal error: Uncaught Error: Call to undefined function sqlite_open() 

Then I have followed this instructions here:

How to enable the PDO driver for sqlite3 in php?

but then I recognized that .dll extensions are not compatible with Linux Distributions or MAC OSX Systems.

Then I have found this here:

How do I enable Sqlite3 in OS X 10.5.8 with PHP?

and i have tried this here:

- intalling MacPorts 
- $ sudo port install php5-sqlite
- $ sudo port uninstall php5
- $ sudo port install php5 +apache2 +sqlite

without success.

So what i have found out is that sqlite is already installed in OSX High Sierra, but PHP could not find my sqlite distribution for some reason

and additionaly really strange is that my phpinf() gives me this here

SQLITE was alreayd found

But why then my sqlite_open() functions was not found?

I am really confused, becasue the function is not deprecated.

http://php.net/manual/en/function.sqlite-open.php

please could anyone give me a lil hint here...

Thank you so much!

greets

EDIT: i am using the 7.17 PHP Version

WEBGONDEL UG
  • 147
  • 1
  • 2
  • 12
  • I don't use MacPorts (because IMHO **homebrew** is infinitely better), however, I think you can run `port contents php5` and it will tell you where it has installed it. If it is in `/opt/local/bin/php5` then make sure you actually run `/opt/local/bin/php5 -i | grep -i sql` to check the installed modules. Or edit your `PATH` so that it finds the MacPorts `PHP` before any others. – Mark Setchell Feb 22 '18 at 10:21
  • Not sure why you say you are using v7.17 PHP when you appear to have installed v5... – Mark Setchell Feb 22 '18 at 11:16
  • thx for your help! I have now a newer PHP version 7.2.2 and installed also brew >> its really better thx for the hint... so now i have checked the modules and at the moment there is now installed sqlite module – WEBGONDEL UG Feb 22 '18 at 11:45
  • i have enabled all relevant sqlite extension lines in the php.ini and uncommented all lines in the php.ini and no changes... – WEBGONDEL UG Feb 22 '18 at 11:54

0 Answers0