problems with apache server and php

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

fuey
New php-forum User
New php-forum User
Posts: 4
Joined: Wed Jan 01, 2003 8:38 am
Location: Finland
Contact:

problems with apache server and php

Postby fuey » Wed Jan 01, 2003 8:56 am

I just installed PHP 4.03 and Apache 1.3.27 to my windows nt system. And suprise suprise I came up with a problem.

I was following a tutorial I found from the internet how to tell a form to print its result to php page. this is the tutorial http://hotwired.lycos.com/webmonkey/01/ ... rogramming

and this is the result http://www.hulagrrl.com/webmonkey/badwords_form.html

well it works when I upload it to my internet server but when I try to use it in my computer server(apache) it doesn't display the words I gave in the form(you'll know what I mean when you check out the link)

and top of all when I make a simple php page that prints a text to the browser it works alright in my own computer server. I just don't get it why the form thing doesn't work.

please if anyone have any idea about this problem and how to solve it I'd be very gratefull!!!

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Wed Jan 01, 2003 11:58 pm

might be...

1) you are upload files in binary mode
2) try to use $_GET $_POST arrays (in new versions of php register_globals=off as default)
3) show me you script may be thare are some errors.

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: problems with apache server and php

Postby WiZARD » Fri Jan 03, 2003 2:39 am

Hi!
In some situation i'm too have error.
try reinstall you Apache and PHP, but before do next:
run your script and in output page see code of result, if you see somthing like that:

Code: Select all

<html>
<title></title>
<body></body>
</html>


You server run thiw error - server start php too but parsing not worked. Dont warry about this it's simple bug of Billy Gates Windows.
:wink:

fuey
New php-forum User
New php-forum User
Posts: 4
Joined: Wed Jan 01, 2003 8:38 am
Location: Finland
Contact:

Postby fuey » Fri Jan 03, 2003 6:32 am

Okie Dokie.
1.Hmm I'm so new in this thing that I don't even know what means loading them in the binary mode?
2.I might have an idea what your saying.. I'll try to find more info how to use the $_GET $_POST arrays
3.I don't think it's about the script because it is copied straight from the example they had in the links abowe.

Wizard.
Here is the result page code:

Code: Select all

<html>
<head>
<title>Perv!</title>

</head>

<body bgcolor="#FFFFFF" text="#000000">

<p>
Hi
<p>
You like the word <b>  !?! </b>

<p>You oughta be ashamed of yourself!

</body>
</html>


It just simply doesn't print the words I write in the text box.

Here are the html and php pages.
form.html

Code: Select all

<html>
<head>
<title>My Form</title>
</head>
<body>

<form action="bad_words.php" method=post>

My name is:
<br> <input type="text" name="YourName">

<p> My favorite dirty word is:
<br> <input type="text" name="FavoriteWord">
<p>

<input type="submit" name="submit" value="Enter My Data!">
</form>

</body>
</html>


bad_words.php

Code: Select all

<html>
<head>
<title>Perv!</title>

</head>

<body bgcolor="#FFFFFF" text="#000000">

<p>
Hi <?php

print ("$YourName");
?>

<p>
You like the word <b> <?php print $FavoriteWord; ?> !?! </b>

<p>You oughta be ashamed of yourself!

</body>
</html>


Let me know if you figure something out!
Thanks a lot!

fuey
New php-forum User
New php-forum User
Posts: 4
Joined: Wed Jan 01, 2003 8:38 am
Location: Finland
Contact:

Postby fuey » Fri Jan 03, 2003 9:35 am

hey I found out something interesting. When I use the method get in the form action part it prints this:
http://fuey/tests/bad_words.php?YourNam ... My+Data%21

into the browsers url part. but why it does not print it to the "html" part of the browser?

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Postby WiZARD » Sun Jan 05, 2003 6:57 am

globals=on
cannot sand variables to the next page

fuey
New php-forum User
New php-forum User
Posts: 4
Joined: Wed Jan 01, 2003 8:38 am
Location: Finland
Contact:

Postby fuey » Fri Jan 10, 2003 2:41 pm

Not really folowing yet. What do you mean " globals=on"???
I'd be stoked to solve this problem!
thanks!

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Postby WiZARD » Sat Jan 11, 2003 6:20 am

Sorry, i'm was a drunked.... 8O


Return to “PHP Installation”

Who is online

Users browsing this forum: No registered users and 1 guest