473,387 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

When I run a PHP script the result displays in a DOS Window instead of browser

I have both PHP and Apache installed on my Windows machine.

When I open up a PHP script file in my browser, the output goes to a
DOS Window (and the window closes immediately upon completion of the
script).

Can anyone tell me how I can get the script output to display in the
browser?

Thanks; appreciate your help.

M. McDonnell

May 26 '07 #1
4 1928
On May 26, 11:45 am, Michael <MichaelDMcDonn...@yahoo.comwrote:
I have both PHP and Apache installed on my Windows machine.

When I open up a PHP script file in my browser, the output goes to a
DOS Window (and the window closes immediately upon completion of the
script).

Can anyone tell me how I can get the script output to display in the
browser?

Thanks; appreciate your help.

M. McDonnell
Looks like I need to run in the localhost directory to make in run in
the browser, correct?

May 26 '07 #2
On 26 May 2007 11:45:31 -0700, Michael <Mi***************@yahoo.comwrote:
>I have both PHP and Apache installed on my Windows machine.

When I open up a PHP script file in my browser, the output goes to a
DOS Window (and the window closes immediately upon completion of the
script).

Can anyone tell me how I can get the script output to display in the
browser?
What are you doing, just opening the file off the filesystem? That's not how
it works - you need to configure Apache to run PHP, and access the pages
through your local Apache - most likely as http://localhost/.

Start here: http://www.php.net/manual/en/install...ws.apache2.php

... and bear in mind you want to run as an "Apache module" and not as a "CGI
binary", so pick the bits of the documentation above appropriately.
--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
May 26 '07 #3
On May 27, 1:58 am, Michael <MichaelDMcDonn...@yahoo.comwrote:
On May 26, 11:45 am, Michael <MichaelDMcDonn...@yahoo.comwrote:
I have both PHP and Apache installed on my Windows machine.
When I open up a PHP script file in my browser, the output goes to a
DOS Window (and the window closes immediately upon completion of the
script).
Can anyone tell me how I can get the script output to display in the
browser?
Thanks; appreciate your help.
M. McDonnell

Looks like I need to run in the localhost directory to make in run in
the browser, correct?
Yup, In the webroot folder(or any sub folder of it) of your web
server. For apache, webroot is 'htdocs' directory. It's worth saying
that if PHP is your first web programming language, you have to study
web server basics too.

Can't help criticizing you though. When you fall into any problem you
should first google it. And as you are new to a language which is
vastly popular, you should just try "php beginners tutorial" or "php
basic tutorial" in google. My goal is not to have a bash at you,
rather remind you that best way to learn is learning how to learn at
first. I hope it helps you. And some links for you.

http://www.php.net/tut.php
http://www.phpfreaks.com/tutorials.php
http://wamp.corephp.co.uk/
http://www.howtoforge.com/php_programming_basics

May 26 '07 #4
Michael wrote:
I have both PHP and Apache installed on my Windows machine.

When I open up a PHP script file in my browser, the output goes to a
DOS Window (and the window closes immediately upon completion of the
script).

Can anyone tell me how I can get the script output to display in the
browser?

Thanks; appreciate your help.

M. McDonnell
I'd suggest you just get XAMPP or similar and install it with "single
click" like every decent windows user is supposed to do. ;)

--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
May 26 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script :...
11
by: Wentink | last post by:
Does anybody have a simple script that let's me popup a picture from a thumbnail? The ones i found are all very very complicated and messy in the source... Thanks, Tintin
2
by: Phil | last post by:
Hello all ! I need help with this script : It's a tooltip appearing onMouseOver on a link. It works fine in IE, Opera but not Netscape 7 and Mozilla 1.5. The tooltip sticks on the top left...
5
by: fred | last post by:
I don't know if I'm doing this correctly. I have a little programming experience in python, c++ and some others but this is my first time with javascript. I'm trying have my website detect the...
25
by: moondaddy | last post by:
I have an application where users need to upload images and in my web.config file I have a setting like this: <httpRuntime maxRequestLength="512" /> Which restricts image larger than 500k from...
5
by: Homa | last post by:
Hi all, Can anyone give me some links about how to do an async web service call from aspx and display a temperary page before the web service returns? Thanks, Homa Wong
10
by: Eric Lindsay | last post by:
This may be too far off topic, however I was looking at this page http://www.hixie.ch/advocacy/xhtml about XHTML problems by Ian Hickson. It is served as text/plain, according to Firefox...
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.