Forums

PHP

This topic is locked

Databases and PHP

Posted 27 Nov 2001 23:39:35
1
has voted
27 Nov 2001 23:39:35 RJ Skypala posted:
<font face='Verdana'>Hey, I just started using PHP with ultradev and I downloaded the pAKT extension but I have a problem setting up a database. My host is a unix host but I use my local server to preview the pages. Do unix hosts support microsoft access databases? Also, I have used php scripts in the past that do not use databases but have .dat files (are these databases?) If anyone can help me out or has any sites just for PHP and this stuff I would be very appreciative.

thanks in advance </font id='Verdana'>

thanks
-RJ

Replies

Replied 28 Nov 2001 11:45:53
28 Nov 2001 11:45:53 chief monkey replied:
Just my personal opinion, but Accesss is a big pile of pants.
Why would you wish to use it on a *nix box when there are some really good open source options like MySQL or PostgreSQL
Both of these will run on a windows box so that you can test locally if you wish, and chance are if your host has PHP installed they will also have MySQL



George

Everybody has got to be somewhere
Replied 28 Nov 2001 17:55:50
28 Nov 2001 17:55:50 Tim Green replied:
George is quite correct with his comments, though it must be accepted that there are times when some users have to use an Access database for one reason or another.

In reality George is correct, in that if you wish to create a more robust site, that a more robust database such as MySQL or PostGreSQL (or a number of others) are a better option.

However, to answer your question. If your Web Host has ODBC Support compiled into PHP, and if they have UnixODBC installed, then it should be quite possible to connect to an access database via a DSN.

However, if they don't have UnixODBC support then it will be fairly difficult (and really beyond the scope of this forum) to sort that issue out. If, however, you MUST have access running at all costs, it is really up to you to impress on your host provider that they need to install UnixODBC (or equivalent).

When a PHP Script creates/reads/modifies a file with a .dat extension, more often than not these are simple CSV text files. Given the dat extension to make them more identifiable.

However, if you do have access to a more powerful database (like MySQL) I would heartily suggest that you use it.

All file-based databases are going to impact on your web sites performance, as it is much slower to open a file, then read it, then close it again, than it is to query a database server.

Hope this helps

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic