Solved

Problem to run file

Posted on 2016-07-21
9
130 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: 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 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

751 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