More on Linux

(We marked visited pages blue)
  • How to drop Influxdb series using tags
  • FTP vs SFTP and How are they different ?
  • How to use Tcpdump with examples for administrators
  • How to install and Setup CurlFTPFS
  • How to use Find Command in Linux with examples
  • How to use SED command to delete lines in Linux
  • How to Find All The Files Owned By a Particular User or Group in Linux
  • How to SCP an entire folder in Linux
  • How to check all the Linux ports that are opened in Centos / RedHat
  • How to Setup Linux CentOS and Oracle VirtualBox on a Windows Machine
  • How can you create a Group in Linux
  • How to install Ubuntu Linux from USB Stick on Windows 7
  • What is Rsync and how to use it ? With Examples
  • What are Linux Directory Structure main components
  • How to format a new volume in Linux as ext4 or ext3
  • How Linux File Systems Ext2 , Ext3 , Ext4 work ?
  • Describing Linux fstab filesystem table file
  • Simple steps to Disable the firewall in Linux Centos 7
  • How to connect to an EC2 instance with non ec2-user
  • Setup and Enable EPEL Repository for RHEL and CentOS versions 7.* and 6.*
  • How to change your Linux CentOS Server timezone
  • How to Setup SSH Keys for your Linux Box
  • How To Restart Httpd or Apache2 Server in Linux
  • Manage SWAP space Settings in Linux
  • How To Add Swap to Linux Box
  • How To Add and Grant Sudo Privileges to Users in Linux RedHat/CentOS
  • How to Install and Configure SSH on CentOS Linux
  • Why should you learn bash programming?
  • How to install PIP on Linux CentOS
  • Using AWK Scripts
  • How cool is Linux AWK
  • What are the Linux FSTAB and MTAB files
  • How to Remove a Swap File in Linux
  • How do I Compress a Whole Linux/UNIX Folder
  • Fix for WARNING REMOTE HOST IDENTIFICATION HAS CHANGED!
  • Fix for AWS EC2 instance stuck in Initializing state
  • How To install Git on Linux CentOS 7
  • How to install Perl 5.16 on CentOS 6 from source
  • How to Count the number of column in a csv file
  • Add a string to the end of each line in Linux
  • Fix for lazy ssh connection
  • How to append or write to a remote file in Linux
  • Split file in Linux before a string occurs
  • Cum se schimbă numele de utilizator în Linux
  • Como mudar o nome de usuário no Linux
  • How to change user name in Linux
  • How to do SCP from remote to local
  • Cum se putem dezactiva SELinux
  • Cum se face SCP de la o mașină remote
  • Como fazer SCP de local remoto
  • Tutoriais Linux
  • How to Manage Linux Users expiration or aging settings
  • Dealing with Zombie Process on Linux
  • Linux
  • 4 - Linux Permissions
  • 9 - Linux Echo command
  • 8 - Managing Linux Users
  • 7 - Working with Files in Linux
  • 6 - Linux navigation tree  
  • 5 - Object management in Linux
  • 22 - Understand the Crontab format in Linux
  • 21 - Make SSHD start at boot time
  • 20 - How to disable SeLinux in Linux
  • 19 - Change Linux Hostname Redhat / CentOS / Fedora
  • 18 - How to Setup password-less connection via ssh in Linux
  • 17 - Ubuntu installation step by step
  • How to work with Linux Cron and Crontab utilities
  • 13 - Linux I/O Redirection
  • 12 - Linux Processes Control
  • 11 - Customizing the Linux Prompt
  • 10 - Linux Groups
  • RAID LEVEL 5
  • Learn About the Raid Levels in detail
  • What is RAID LEVEL 4
  • What is RAID LEVEL 2
  • What is RAID LEVEL 0
  • How to Setup password-less connection via ssh in Linux
  • How to Disable SeaLinux
  • How To Change Linux Hostname Redhat/CentOS/Fedora
  • 3 - Object Names in Linux
  • 2 - Linux Basic command
  • What is the Linux terminal or shell
  • How to install and configure PHP on a Windows machine

    PHP remains the most widespread and popular server-side programming language on the web. It is installed by most web hosts, has a simple learning curve, close ties with the MySQL database, and an excellent collection of libraries to cut your development time. PHP may not be perfect, but it should certainly be considered for your next web application. Both Yahoo and Facebook use it with great success.

    Why Install PHP Locally?

    Installing PHP on your development PC allows you to safely create and test a web application without affecting the data or systems on your live website. This article describes PHP installation as a module within the Windows version of Apache 2.2. Mac and Linux users will probably have it installed already.

    All-in-One packages

    There are some excellent all-in-one Windows distributions that contain Apache, PHP, MySQL and other applications in a single installation file, e.g. XAMPP (including a Mac version), WampServer and Web.Developer. There is nothing wrong with using these packages, although manually installing Apache and PHP will help you learn more about the system and its configuration options.

    The PHP Installer

    Although an installer is available from php.net, I would recommend the manual installation if you already have a web server configured and running.

    Manual Installation

    Manual installation offers several benefits:
    • backing up, reinstalling, or moving the web server can be achieved in seconds
    • you have more control over PHP and Apache configuration.

    Step 1: download the files

    Download the latest PHP 5 ZIP package from www.php.net/downloads.php As always, virus scan the file and check its MD5 checksum using a tool such as fsum.

    Step 2: extract the files

    We will install the PHP files to C:php, so create that folder and extract the contents of the ZIP file into it. PHP can be installed anywhere on your system, but you will need to change the paths referenced in the following steps.

    Step 3: configure php.ini

    Copy C:phpphp.ini-recommended to C:phpphp.ini. There are several lines you will need to change in a text editor (use search to find the current setting). Define the extension directory:
    extension_dir = "C:phpext"
    Enable extensions. This will depend on the libraries you want to use, but the following extensions should be suitable for the majority of applications (remove the semi-colon comment):
    extension=php_curl.dll
    extension=php_gd2.dll
    extension=php_mbstring.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    extension=php_pdo.dll
    extension=php_pdo_mysql.dll
    extension=php_xmlrpc.dll
    If you want to send emails using the PHP mail() function, enter the details of an SMTP server (your ISP’s server should be suitable):
    [mail function]
    ; For Win32 only.
    SMTP = mail.myisp.com
    smtp_port = 25
    
    ; For Win32 only.
    sendmail_from = my@emailaddress.com

    Step 4: add C:php to the path environment variable

    To ensure Windows can find PHP, you need to change the path environment variable. From the Control Panel, choose System, (then “Advanced system settings” in Vista), select the “Advanced” tab, and click the “Environment Variables” button. Scroll down the System variables list and click on “Path” followed by the “Edit” button. Enter “;C:php” to the end of the Variable value line (remember the semi-colon). PHP path environment variable Now OK your way out. You might need to reboot at this stage.

    Step 5: configure PHP as an Apache module

    Ensure Apache is not running (use “net stop Apache2.2” from the command line) and open its confhttpd.conf configuration file in an editor. The following lines should be changed: Line 239, add index.php as a default file name:
    DirectoryIndex index.php index.html
    At the bottom of the file, add the following lines (change the PHP file locations if necessary):
    # PHP5 module
    LoadModule php5_module "c:/php/php5apache2_2.dll"
    AddType application/x-httpd-php .php
    PHPIniDir "C:/php"
    Save the configuration file and test it from the command line (Start Run cmd):
    <code class="dos language-undefined">
    cd Apache2bin 
    httpd -t

    Step 6: test a PHP file

    Create a file named index.php in Apache’s web page root (either htdocs or D:WebPages) and add this code:
    <code class="php language-undefined">
    <?php phpinfo(); ;
    Ensure Apache has started successfully, open a web browser and enter the address http://localhost/. If all goes well, a “PHP version” page should appear showing all the configuration settings. </p>


    Leave a comment or a question in the comment area bellow if you fell like


    Be a sport and

    Search

    Loading... Please wait

    Subscribe to our Newsletter

    Be a sport and

    x