PHP and MS Access

A

Anonymous

Guest
Hi Eric,

It's probably possible to connect to Access, but you are the first person I've come across trying to do it.
Please consider converting your access database to MySQL and then you can easily do what you want.
Access wasn't designed to be used with PHP / Web Apps...
 
Have you checked that the ODBC extension in PHP is loaded? ( have a look at https://www.sitepoint.com/using-an-access-database-with-php/ ).
 
The other thing which may happen with files is the file permissions. When you run things interactively - you will of course be using your current users permissions, run as a background process (like PHP) and this may run as a different user. As a first thing - try setting file permissions for anyone to read/write and see if that helps.
 
It's not about the user that is running the web page, it's about the user that the PHP process is running as. After all, we are both using this forum to make posts - it doesn't mean we have access to do anything with the database directly.
So (on Linux) I log in as 'nigel:nigel', but if I ran a PHP web page, it would be run in a process owned by 'www-data:www-data'. So if I can access a file and change it, it doesn't mean that the PHP web page can do the same. I have to make sure that any files that the web service needs to be able to modify are either owned by www-data or at least the permissions means they can be modified by this user.
 
Back
Top