Datasheet

Setting What It Does
file_uploads Enables Web site visitors to upload files to your server.
upload_max_filesize Sets the limit for how large an uploaded file may be, in MB.
mysql.allow_persistent Determines whether or not a persistent connection can be
established with the MySQL server.
mysql.max_persistent Sets the limit of how many persistent connections are allowed.
For no limit, set this to -1.
mysql.max_links Sets the limit of how many total links are allowed (persistent and
non-persistent together). For no limit, set this to -1.
session.save_path Determines where session information will be stored on your
computer. You must specify a valid path, such as
c:\php\sess\
tmp
or c:\tmp if you are using Windows. You must also create
this directory beforehand, because PHP will not set this up for
you.
Numerous other variables in your file can be altered, but we encourage you to work with the defaults
until you feel more comfortable with PHP and your Web site setup. Changing these defaults can raise
functionality, security, and performance issues, adversely affecting your site.
Configuring PHP5 to Use MySQL
Pre-PHP5, MySQL support was included in PHP installation by default. With the release of PHP5, you
now have to specifically enable this.
If you are using Unix, you most likely built PHP with MySQL during installation. If you are using
Windows, however, in order for your PHP and MySQL to play nice with each other, you will need to
make two changes to your
php.ini file. Open the file using your text editor (such as Notepad). Locate
the following lines:
; Directory in which the loadable extensions (modules) reside.
extension_dir = “./”
Change the last line to
extension_dir = “c:\php\ext”
The next change involves locating and “uncommenting” the following line:
;extension=php_mysql.dll
Simply remove the semicolon at the beginning of the line to uncomment it.
You will also need to copy the file
libmysql.dll from your c:\php directory into your
c:\windows\system32 or c:\winnt\system32 directory.
16
Chapter 1
04_579665 ch01.qxd 12/30/04 8:09 PM Page 16