Skip to Content
PHP and MySQL® For Dummies®, 4th Edition
book

PHP and MySQL® For Dummies®, 4th Edition

by Janet Valade
December 2009
Beginner to intermediate
456 pages
9h 43m
English
For Dummies
Content preview from PHP and MySQL® For Dummies®, 4th Edition

Appendix B. Configuring PHP

This appendix assumes that you have the Web software installed.

PHP has many configuration settings that determine how it behaves. I talk about PHP settings at various places throughout the book. For instance, I talk about the PHP error settings when I explain how PHP errors work in Chapter 6. I explain the settings and when they need to be changed in context in the book.

The configuration settings are stored in a text file named php.ini. PHP looks for the file php.ini when it begins and uses the settings it finds. If PHP can't find the file, it uses a set of default settings.

All PHP settings can be changed in the php.ini file. Some settings should always be changed, and some should be changed only in specific circumstances. For example, magic quotes should always be turned off. I explain magic quotes in Chapter 6.

On your own computer, you always have access to the php.ini file and can change the settings yourself. However, a Web host isn't going to allow you access to the general php.ini file, because it controls the settings for all the users on the computer, not just for your site. So, you change any PHP settings on your Web hosting account with a different procedure:

  • A local php.ini file: Some Web hosts allow you to have a local php.ini file that controls: PHP's behavior for your Web site only. If so, you can make any needed changes in this local php.ini file.

  • An .htaccess file You can add directives to your .htaccess file that change PHP settings. Only ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

PHP 7: Real World Application Development

PHP 7: Real World Application Development

Doug Bierer, Altaf Hussain, Branko Ajzele
Mastering PHP 7

Mastering PHP 7

Branko Ajzele
Expert PHP and MySQL®

Expert PHP and MySQL®

Andrew Curioso, Ronald Bradford, Patrick Galbraith

Publisher Resources

ISBN: 9780470527580Purchase book