Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Problem to run file

Posted on 2016-07-21
9
Medium Priority
?
149 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 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
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

671 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