TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

PHP

Testing PHP with Apache Server on Linux

Overview

In this tutorial, we’ll be going through the steps of testing PHP with Apache webserver.

Environment: Ubuntu Server LTS.

Linux Commands

Open command terminal prompt.

Change directory to /var/www/html/

Create a PHP file for example with the name ‘testPHP.php’ file.

$ cd /var/www/
ubuntu:/var/www$ ls
html
ubuntu:/var/www$ cd html/
ubuntu:/var/www/html$ sudo touch testPHP.php
ubuntu:/var/www/html$ sudo gedit testPHP.php

 

testing php linux

 

Test PHP file

Add the sample code to output PHP information.

<?php

phpinfo();

Test on Apache

Restart Apache webserver.  Visit the webpage URL:

http://localhost/testPHP.php

The page should display the PHP Information Apache Information.

 

PHP Information

Related Posts

Compoer Command line command

PHP /

Install Slim Framework on Windows

php download website

PHP /

Download and Install PHP on Windows

Composer Install Windows

PHP /

Composer Download on Windows

Apache conf file

PHP /

PHP 7 Configuration in Apache Server

PHP /

Popular Open Source PHP Frameworks

‹ Popular Open Source PHP Frameworks› PHP 7 Configuration in Apache Server

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version