0

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 Answer 1

1

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?

Sign up to request clarification or add additional context in comments.

5 Comments

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.
Well, the database does have to exist if you're trying to run a query other than create against it.
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.
Make sure the path is valid (directory exists, at least), and read the instructions carefully. It really looks like a good guide.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.