Solved

Problem to run file

Posted on 2016-07-21
9
115 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 83

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 10

Author Comment

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

Expert Comment

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

[root@dibscos6 html]# php phpinfo.php
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 10

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 83

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 83

Accepted Solution

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

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

Author Comment

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

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 83

Expert Comment

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

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses four methods for overlaying images in a container on a web page
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

770 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