Testing working using phpinfo()

Let’s install Apache, PHP, and MySQL under a Unix environment. First, you need to
decide which extra modules you will load under the trio. Because some of the examples
covered in this book use a secure server for web transactions, you should install an SSLenabled
server.
For purposes of this book, the PHP configuration is more or less the default setup but
also covers ways to enable the gd2 library under PHP.
The gd2 library is just one of the many libraries available for PHP.We included this
installation step so that you can get an idea of what is required to enable extra libraries
within PHP. Compiling most Unix programs follows a similar process.
You usually need to recompile PHP after installing a new library, so if you know
what you need in advance, you can install all required libraries on your machine and
then begin to compile the PHP module.
Here, we describe installation on an SuSE Linux server, but the description is generic
enough to apply to other Unix servers.
Start by gathering the required files for the installation.You need these items:
n Apache (http://httpd.apache.org/)—The web server
n OpenSSL (http://www.openssl.org/)—Open source toolkit that implements the
Secure Sockets Layer
n MySQL (http://www.mysql.com/)—The relational database
n PHP (http://www.php.net/)—The server-side scripting language
n ftp://ftp.uu.net/graphics/jpeg/—The JPEG library, needed for PDFlib and gd
n http://www.libpng.org/pub/png/libpng.html—The PNG library, needed for gd
n http://www.zlib.net/—The zlib library, needed for the PNG library, above
n http://www.libtiff.org/—The TIFF library, needed for PDFlib
n ftp://ftp.cac.washington.edu/imap/—The IMAP c client, needed for IMAP


Is PHP  Working?
Now you can test for PHP support. Create a file named test.php with the following
code in it.The file needs to be located in document root path, which should be set up,
by default, to /usr/local/apache/htdocs. Note that this path depends on the directory
prefix that you chose initially. However, you could change this in the httpd.conf file:
<?php phpinfo(); ?>
Related Posts:
  • Static Methods-PHP  PHP supports declaring methods as static. Whatthis means is that your static methods are part of the  class and are not bound to any specific object instance and  its properties. Therefore, $this isn’t acce… Read More
  • Query Strings Query string data is very easy for the user to alter, because it ’ s visible and editable within the browser ’ s address bar. Therefore, query strings should be used only in situations where sending incorrect data won ’ t co… Read More
  • PHP-script-Related Variables PHP-script Related Variables PHP automatically creates variables for all the data it receives in an HTTP request. This can include GET data, POST data, cookie data, and environment variables. The variables are e… Read More
  • What is SQL Injection? SQL Injection is the hacking technique which attempts to pass SQL commands (statements) through a web application for execution by the backend database. it can be prevented by mysql_real_escape_string() function of PHP. … Read More
  • How register the variables into a session? session_register ($session_var) function. (adsbygoogle = window.adsbygoogle || []).push({}); … Read More
  • Passing References to Your Own Functions php By passing a reference to a variable as an argument to a function, rather than the variable itself, you passthe argument by reference , rather than by value. This means that the function can now alter the originalvalue, rath… Read More
  • configuring PHP-impact security The primary mechanism for configuring PHP is the php.inifile. As the master file, this provides you with control over all configuration settings. Entries generally take the format:setting= value Be sure to read the comment… Read More
  • Testing working using phpinfo() Let’s install Apache, PHP, and MySQL under a Unix environment. First, you need todecide which extra modules you will load under the trio. Because some of the examplescovered in this book use a secure server for web transacti… Read More
  • php.ini Basics After you have compiled or installed PHP, you can still change its behavior with the php.ini file. On Linux/UNIX systems, the default location for this file is /usr/local/php/lib or the lib subdirectory of the PHP installati… Read More
  • Top PHP Interview Questions with Answers For Job   What is PHP?     PHP is a server side scripting language  used for web development applications.     Php is the powerful tool for making dynamic website.     Many … Read More
  • PHP INTERFACES Class inheritanceenables you to describe a parent-child relationshipbetween classes. For example, you might have a base class  Shapefrom which both Squareand Circlederive. However,  you might often want to add a… Read More
  • php tutorial-for beginners PHP Functions | PHP Interview Questions,PHP tutorial,seo-tips,seo tutorial,N... PHP Sessions | PHP Interview Questions,PHP tutorial,seo-tips,seo tutorial,Ne... Cookies Ver… Read More
  • difference between include and require? Answer: It"s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt theexecution of the script. If the file is not found by include(), a warning will be issued, but execution wi… Read More
  • What are “GET” and “POST”? GET: we are submitting a form to login.php, when we do submit or similar action, values are sent through visible query string (notice ./login.php?username=…&password=… as URL when executing the script login.php) and i… Read More
  • find the number of parameters passed into function in PHP? func_num_args() function returns the number of parameters/arguments passed to a function in PHP. … Read More