views:

49

answers:

1

Hi, I'm trying to setup PHP & SQLite on my mac with by following this page: http://developer.apple.com/mac/articles/internet/phpeasyway.html. The code posted on the site is supposed to be run in a command script but I don't know how to make that happen. I've tried making a bash script and an applescript but both of those give errors. Any ideas?

Thanks!

+1  A: 

The documentation has this line of code:

user_db=${user_www}/${filename}-db.sqlite3

Is the filename variable defined? Does the database exist in that location?

MPelletier
Database doesn't have to exist, sqlite tries to make it for you. But you do need to have the rights to do so. Also, try a absolute path to the database file.
Leon
Well, the database does have to exist if you're trying to run a query other than create against it.
MPelletier
To be honest I never fully understood what the big chunk of code in the first part of the documentation/tutorial was telling me to do. I just uncommented the httpd.conf file manually.To answer your question there is no database on my machine yet. When I give $user_db a path in the php file I still get the same error.
hexmex
Make sure the path is valid (directory exists, at least), and read the instructions carefully. It really looks like a good guide.
MPelletier
Thanks for your help. After reading more closely I think I don't know enough about scripting on the mac to get this thing to run.
hexmex