From the course: PHP: Accessing Databases with PDO and MySQLi
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Setting SQLite permissions - PHP Tutorial
From the course: PHP: Accessing Databases with PDO and MySQLi
Setting SQLite permissions
On Mac OS 10 and Linux, you need to change the permissions on the SQLite data file, so that the web server can write to it as well as read. No changes are necessary on Windows. Making the change on Mac OS 10 is very easy. After copying the exercise files to a folder inside your testing server route, open the SQL Lite folder. Then select oophp.db, and press Cmd+I to bring up an Info pane. At the bottom right of the Info pane is a little padlock icon, click that, and enter your Mac administrator password when prompted. If necessary, expand sharing and permissions and then set everyone, set the privilege from read only to read and write. And then click the padlock icon again. That will lock the setting and close the Info pane. And that's all there is to it. On Linux, you can make the changes using the CHMod command in a terminal window. The setting depend on how your system is set up. But if in doubt CHMod OOPHP.DB to 666.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.