Setup and basic uses
Elsewhere [ edit ]
PHP, originally Personal Home Page, is an incredibly powerful and easy to use scripting language. Ideal for server-side database applications, it has started to eclipse Java as the defacto standard for web application development.
Check /var/log/httpd/error_log Indeed even static HTML pages with quiet errors may have messages here that can be helpful.
# cd /etc # diff php.ini 728c728 < post_max_size = 2M --- > post_max_size = 1G 879c879 < upload_max_filesize = 10M --- > upload_max_filesize = 1G # service httpd restart
Sessions / Cookies [ edit ]
Sessions (i.e. Session ID's) and Cookies are tied to a specific browser on a specific computer. A session always evaporates when a web browser quits/restarts. Sessions are stored on server, and browsers are not able to directly detect if server side session are being used. Cookies are stored with browser, but are triggered by response from server to create them. A cookie evaporates when a browser quits if the cookie omits setting an expiration date or the browser is configured to ignore cookies. Typically cookies are used for sites that require usernames and passwords, but remember them and skip asking on subsequent visits from the same web browser. Other uses are minor preference settings for how a site should present itself (time zone, geographic, shopping carts, ...). If a password needs to be part of a cookie, best to ensure only https pages are allowed to interact with password cookie.
Cookies eventually expire. So cookies really only provide convenience for short term use (e.g. a few months). Eventually a cookie will expire and the user will have to provide their information again. Therefore, cookies are a way to make a site more convenient for frequent users, but any critical information that must persist over time must be stored in a server side database to ensure it doesn't suddenly vanish one day.