Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rookie in need of help...

Status
Not open for further replies.

parallon

MIS
Dec 27, 2002
103
US
Hey there all. Sorry for the jouvenile questions. I am new to php (very new), and I am trying to set up a test site on my local computer. I downloaded one ot the preconfigured packages that includes PHP5, MySQL, and Apache. I ran the setup, but am not sure if there is anything else that I need to do. I downloaded a little customer feedback script, and every time I hit the submit button, I get a 'Open''Save''Cancel' dialog box. If I select open, Dreamweaver is trying to open the php file. I have never set up the site feature in Dreamweaver, but I am not sure if that is the problem. Any help would be greatly appreciated.

Thank you in advance,

Parallon

"I used to think that the more that you knew, the farther you would go, then I realized that the more that you know, the more they use you."

-Me
 
1. Are you actually running on your webserver or does your address bar in your browser say something like:

c:\\my directory\feedback.html ?


JR
As a wise man once said: To build the house you need the stone.
Back to the Basics!
 
1. Make sure apache is running. I assume you are using a Windows install - look in the Task Manager (Ctrl+Alt+Del ->Task Manager ->Processes) if Apache is running.
2. Make sure you use IE or Mozilla, <opinion>or best Firfox </opinion> and connect to
 
And if localhost does not work because of settings in IE use the ip where you installed it on. Default for windows is
JR
As a wise man once said: To build the house you need the stone.
Back to the Basics!
 
Thank you all for all of your comments. To be honest with you, I just have the all the files set up in a folder on my desktop. To test it, I am just opening the index.html file and going from there. Am I doing this the wrong way?

Thanks,

Parallon

&quot;I used to think that the more that you knew, the farther you would go, then I realized that the more that you know, the more they use you.&quot;

-Me
 
the only way PHP works is if the files (with the extension .php, etc) are passed to the php precompiler. this task is accomplished by the web server (Apache, or IIS or whatever).

when a client asks for a page from a server, if the server is correctly configured, he will see the compiled page (as resulted from the php precompiler). therefore you will need to ask the server for that page. this is usually done (when the client is on the same machine as the server) using localhost/page.php

have you configured IIS/Apache with PHP?

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
As posted previously:
If you installed the package according to the instructions Apache should be running. You can check that out they way described in my first post.

The PHP files must reside inside the DOCUMENTROOT as defined in the Apache ini file httpd.conf -> look how it is set. Open httpd.conf and search for DocumentRoot.
In order for Apache to do what DaZZleD described above you need to have the file within the reach of the Apache server.
 
for all tools you need and very easy to setup.

Read instructions well.

Once you have set up your PhP engine, MySQL, Apache start by trying a simple test page:

Code:
<?php
phpinfo();
?>

Please anyone correct me if the test code is wrong, cause it is too long ago!

Make sure you find out (documentation or Apache /bin/conf.??? files) where you should be saving your PhP files.

I believe it is by default in the Apache/docs dir, but changed this so long ago, I can remeber.

Have fun! Cause that is what this is! (and serious programming)

JR
As a wise man once said: To build the house you need the stone.
Back to the Basics!
 
Well, I have definately made some progress, but now I am getting this error when I click on submit on the form:

Warning: Server Error in c:\ibserver\ on line 93


Warning: Cannot add header information - headers already sent by (output started at c:\ibserver\ in c:\ibserver\ on line 94


Here is the code on line 93 and 94:


Line 93: mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.02" );

Line 94: header( "Location: $thankyouurl" );


Thank you,

Parallon




&quot;I used to think that the more that you knew, the farther you would go, then I realized that the more that you know, the more they use you.&quot;

-Me
 
Are you sending any kind of
Code:
header("Location:blabla")
Or any other kind of headers

in your script?

If so this can not be done after outputting anyting else has been outputted to your browser.

Header info must always be the first thing to output.
So line 94 I spotted your header, replace this by
echo "Thank you"; if this should be reading "thank you" on the browser or else let us know what your intensions are.

JR
As a wise man once said: To build the house you need the stone.
Back to the Basics!
 
I want to thank you all for your great effort. There must have been something wrong with that script, but I found another one and it works good. I am now learning to redesign my own form and tie it to the php file.

Thanks again!!!

Parallon

&quot;I used to think that the more that you knew, the farther you would go, then I realized that the more that you know, the more they use you.&quot;

-Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top