Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Problem to run file

Posted on 2016-07-21
9
Medium Priority
?
154 Views
Last Modified: 2016-07-23
Hi,
I run the file like
5j.png
but it cannot show the web-page as expected.
0
Comment
Question by:HuaMinChen
  • 5
  • 4
9 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41724176
Since you are running from the command line, the most you should expect is a text display in the terminal.  That will not launch a browser that will show you a web page.  And if the PHP command line is not installed or enabled, it may not show you anything but an error.
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 41724209
PHP command line is installed already. How to run the .php file?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41724224
This is all I have to do.

[root@dibscos6 html]# php phpinfo.php
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Author Comment

by:HuaMinChen
ID: 41724227
I'm running that in the same way like you. Why can't the .php file be displayed on browser?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41724233
That command runs the PHP program in the terminal and the web browser (Firefox) does not run in the terminal.  To run Firefox from the command line to view that page, you would have to start Firefox, not PHP.  I'll show you in the next comment.
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1500 total points
ID: 41724235
This opens Firefox to the same page.

[davidc@dibscos6 ~]$ firefox http://localhost/phpinfo.php
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 41724257
I then get this
Screenshot-1--1-.png
0
 
LVL 11

Author Comment

by:HuaMinChen
ID: 41724406
I get the current problem when issuing
firefox http://localhost/info5.php

while info5.php does exist within
/var/www/html/
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 41724534
Can you connect to any other page like index.html?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question