Test PHP parsing

Source: Internet
Author: User

Verify that the configuration file is correct before starting Apache:

/usr/local/apache2/bin/apachectl-t

If there is an error, please continue to modify httpd.conf, if it is correct, then display as "Syntax OK", the command to start Apache is:

/usr/local/apache2/bin/apachectl start

To see if it starts:

[[email protected] ~]# NETSTAT-LNP |grep httpdtcp 0 0::: +:::* LISTEN 7667/htt Pd

If this line is displayed, it is started. You can also use the Curl command to simply test:

[Email protected] ~]# Curl Localhost

This is only true if it is displayed.

Test if PHP is parsed correctly:

vim/usr/local/apache2/htdocs/1.php

Write:

<?php echo "PHP parse normal";? >

After saving, continue testing:

Curl localhost/1.php

See if you can see the following information:

[[email protected] ~]# Curl localhost/1.phpphp parse normal [[email protected] ~]#

This is only true if it is displayed.

You may not be able to access the Web service when you first use it for your browser, because of the firewall. Please run the following command:

[email protected] ~]# iptables-f

This allows the system to clear the default firewall rules and release port 80.


This article from "12350027" blog, declined reprint!

Test PHP parsing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.