Page 1 of 1
PHP and Apache on Win 2k Profeesional
Posted: Thu Aug 08, 2002 3:21 pm
by RenoB
Ok,
I made a simple login script and installed newsPHP after following the directions to install php 4.2.2 on a win32 Apache machine. For some reason, it will not execute the scripts. I click 'Submit' and it just clears the fields again not executing at all. I referred to my php script book and carefully checked the code to make sure i was coding my login script properly, and I was...so what is up? Is it a chmod thing? If so, how do I chmod stuff from my own machine that my webserver (Apache 1.3.26) is on? Please help with these problems I am having...I am soo frustrated...thanx!
Oh yea one more thing...
Posted: Thu Aug 08, 2002 3:30 pm
by RenoB
I can't seem to get apache to parse cgi scripts either, which by default, it should do...just a note if that helps with my php issues. I can parse and view php web pages...for somereason the sripts will not work and i am stumpped.
Posted: Thu Aug 08, 2002 3:38 pm
by volka
ok, you tried
as script on your apache and you saw the php credits?
next test may be
Code: Select all
<html><body>
<form action="POST">
<input type="text" name="testfield" />
</form>
<pre>
<?php print_r($_REQUEST); ?>
</pre>
</body></html>
does this print the content of the last text you submitted?
Yes it did
Posted: Thu Aug 08, 2002 3:43 pm
by RenoB
..It posted a text entry box field then under that it had
'Array
(
)'
so wtf?

its killing me weird problem....
Posted: Thu Aug 08, 2002 3:46 pm
by volka
does this print the content of the last text you submitted?
have you typed something into the text box and submitted it? does it print out now the content of the text field you submitted?
If not you have a severe problem
edit:

I forgot a submit-button
add a <input type="submit" /> to the form
Ok...it didnt work
Posted: Thu Aug 08, 2002 3:49 pm
by RenoB
quote: NOT Found
the requested url/post was not found on this server
now what...?
can you help?
Posted: Thu Aug 08, 2002 3:51 pm
by volka
it's because I'm stupid and tired.
ok, I try to concentrate

<form action="POST"> should be <form method="POST">
by the way (saving some posts): Do you have installed php as cgi or as module to apache?
ok NOW it w0rx
Posted: Thu Aug 08, 2002 3:54 pm
by RenoB
it returned my text entered in the field...and i installed php as sapi module
Posted: Thu Aug 08, 2002 4:00 pm
by volka
ok.
I assume you're using a session to maintain user login data and your php.ini contains session.save_handler = files and session.save_path = <path> is not too badly malformed (

)
next thing: have you read the sticky posts?
does your php-book refer to php-version < 4.1 and is using $test instead of $_POST['test']?
yes
Posted: Thu Aug 08, 2002 4:02 pm
by RenoB
it covers 4.X.X
Posted: Thu Aug 08, 2002 4:05 pm
by volka
the change started on version 4.1 and has more radical impact since 4.2.
please read this thread . does it cover your problem?
yes thanx!
Posted: Thu Aug 08, 2002 4:12 pm
by RenoB
so if i turned that stuff to on in php.ini would it then work?
because some of the scripts are dl-ed programs, so changing the php syntax may not work
What do you think?
Posted: Thu Aug 08, 2002 4:35 pm
by volka
then it MAY work
and: even downloaded scripts may be altered....
Posted: Fri Aug 09, 2002 1:54 am
by twigletmac
and should be altered so you can still use them when register_globals is eventually turned off...
Mac