Solved

New install problem.

Posted on 2002-04-14
8
183 Views
Last Modified: 2008-02-20
I am running Windows 2000 and have installed IIS, MySQL and PHP.

I am now going thru a tutorial on PHP. The first program (the infamous 'Hello World') works, however, the second program returns an error.

The program is:

<html>
<body>
<?php
phpinfo();
?>
</body>
</html>

and the error is:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

I am assuming I need to do something with the install.
0
Comment
Question by:GaryZ
[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
  • 4
  • 4
8 Comments
 
LVL 5

Expert Comment

by:andriv
ID: 6940848
Did you save it as a .php?

Are you typing the correct file name?

This is the only reasons that I can think of besides the IIS Web server not being active.
0
 

Author Comment

by:GaryZ
ID: 6941774
Yes to all. I uploaded it to a server, and it ran OK.
0
 
LVL 5

Expert Comment

by:andriv
ID: 6942131
You said it ran OK, does that mean the problem is solved.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:GaryZ
ID: 6942254
Sorry, I meant the program ran ok when I uploaded it to my host server, but I get the error locally. Since it runs on the host server I will be using I have to assume it is coded correctly.
0
 
LVL 5

Accepted Solution

by:
andriv earned 100 total points
ID: 6942300
Does you host server require a different extension, for example .php4? If so, make sure you are using .php locally.

Also, you say the other script "hello world" did work locally, is that correct?

If yes to all of the above try:

<?
echo phpinfo();
?>

0
 

Author Comment

by:GaryZ
ID: 6942896
Got me. Just tried it again and it is working, maybe the reboot did it.

An additional question. On the host server I cannot get to the command line, so I have to create the database and add tables from script. Do you know a good site to learn this?

The tutorial I have only gives directions on how to do this from a command line.

Thanks
0
 
LVL 5

Expert Comment

by:andriv
ID: 6942923
What are you using to get the command line and what hosting company are you using.

If you want to create tables within your script you use the same mysql commands except your query will create a table:

$dbconnect = mysql_connect("host","user","password");

$mysql_select_db("dbName",$dbconnect);

$Query = "Create table tableName (prodid int(10) not null auto_increment,next field,next field)";

mysql_query($Query);
0
 

Author Comment

by:GaryZ
ID: 6942949
Thanks. I'll give that a try.

The person I am writting this for is on bright.net



0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

752 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