PHP and Apache on Win 2k Profeesional

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RenoB
Forum Newbie
Posts: 7
Joined: Thu Aug 08, 2002 3:21 pm
Location: Moscow, ID USA

PHP and Apache on Win 2k Profeesional

Post 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!
RenoB
Forum Newbie
Posts: 7
Joined: Thu Aug 08, 2002 3:21 pm
Location: Moscow, ID USA

Oh yea one more thing...

Post 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.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

ok, you tried

Code: Select all

<?php phpinfo(); ?>
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?
RenoB
Forum Newbie
Posts: 7
Joined: Thu Aug 08, 2002 3:21 pm
Location: Moscow, ID USA

Yes it did

Post by RenoB »

..It posted a text entry box field then under that it had

'Array
(
)'

so wtf? :D its killing me weird problem....
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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 :D

edit: :oops: I forgot a submit-button
add a <input type="submit" /> to the form
RenoB
Forum Newbie
Posts: 7
Joined: Thu Aug 08, 2002 3:21 pm
Location: Moscow, ID USA

Ok...it didnt work

Post by RenoB »

quote: NOT Found
the requested url/post was not found on this server



now what...?

can you help?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

it's because I'm stupid and tired.
ok, I try to concentrate :D
<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?
RenoB
Forum Newbie
Posts: 7
Joined: Thu Aug 08, 2002 3:21 pm
Location: Moscow, ID USA

ok NOW it w0rx

Post by RenoB »

it returned my text entered in the field...and i installed php as sapi module
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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']?
RenoB
Forum Newbie
Posts: 7
Joined: Thu Aug 08, 2002 3:21 pm
Location: Moscow, ID USA

yes

Post by RenoB »

it covers 4.X.X
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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?
RenoB
Forum Newbie
Posts: 7
Joined: Thu Aug 08, 2002 3:21 pm
Location: Moscow, ID USA

yes thanx!

Post 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?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

then it MAY work ;)

and: even downloaded scripts may be altered....
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

and should be altered so you can still use them when register_globals is eventually turned off...

Mac
Post Reply