Page 2 of 2

Posted: Thu Jul 10, 2003 10:07 pm
by bionicdonkey
could it be a 'register globals' problem in php.ini file??

Posted: Fri Jul 11, 2003 8:07 am
by mikeb
Hi,

A new day!

Jason

I have set up a server to work on at home after office hours - this is where I am learning php. Here is my config

Win2k sp3 (ntfs configuration)
php4.0.4
Apache 2
MySQL 4.0.13-nt

I have only dial-up at home so I can't show you my phpinfo page live.
I have run the phpinfo file locally and copied and pasted the results for you as a browseable html page. You can view it at one of my sites, here:

http://www.corkholidayhomes.com/php/myinfo.htm

*Note: this site does NOT have php istalled. I'm using it just for showing
you the code. The server in question is my local machine at home.


Here is the exact up to date code for the form page:
----------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Untitled</title>
</head>

<body>

<form name="newform" method="post" action="formaction.php">
<input type="text" name="FirstName"><br>
<input type="submit" name="submit">
</form>

</body>
</html>
----------------------------------------------------------------------------------
and here is the code for the action page (formaction.php)
----------------------------------------------------------------------------------
<html>
<head>
<title>hello</title>
</head>
<body>
<?php
echo $_POST['FirstName'];
?>
</body>
</html>
----------------------------------------------------------------------------------
My php ini file can be browsed at:
http://www.corkholidayhomes.com/php/php.txt
and my Apache config at:
http://www.corkholidayhomes.com/php/httpdconf.txt

I hope that sheds some light on the subject, and thank you all for your help
[/url]

Posted: Fri Jul 11, 2003 8:52 am
by jason
php4.0.4

That's your problem. $_POST (and the rest of the superglobals) don't exist in that version. You would be best off upgrading to the latest version 4.3.x. The new features will help out tremendously.

Posted: Fri Jul 11, 2003 12:52 pm
by mrvanjohnson
Great Catch jason!

Posted: Fri Jul 11, 2003 2:45 pm
by m3rajk
also, windows, even nt, is unstable. as good as nt is, you' be better off creating a home network and buying a cheapo second machine and putting on a real operating system... something posix compliant. red hat 9 server has php, apache and mysql as options. install them. they will be locked down correctly that way.

there's a bunch of websites you can get refurbished computers at for $200 or less. p2 through p3 speeds ranging from 200 mHz to 1 gHz (what i've seen)

unix is much more stable, and the versions it will install aer:

mysql: 11.18 dist 3.23.56 (higher than what you have and with a number of fixes and things to improve upon what you have, the next step beyond this is 4.0)

php: 4.2.2 (again, much better than what you have)

apache: 2.0.40

Posted: Sat Jul 12, 2003 5:51 am
by mikeb
Guess what? Midday Saturday here and I've just got the whole shooting match working! Thanks a million for all you help guys. I upgraded and that did the trick. I'm now on the version 5 beta (Hoping that at least for the moment I won't be doing any programming serious enough to find any bugs!). Anyhow, it's now working perfectly.

m3rajk, I take your point on the Linux issue. As it happens, I have a new machine with a dual-boot of Red Hat Linux 8/Win2k which is what I'm cutting my teeth on. I'm setting up a Linux server on another machine but I'm trying to walk before I run. My overall plan is to have a Linux server doing mail and web services etc. with my main machine running on it's current split configuration. So I've got php, Apache and MySQL to sort out on the Win2k machine and then I delve into Linux. If my IT person in work has his way we'll all be on Linux by the end of the year, have grown beards and nodding knowingly at hex dumps on our screen :wink:

cheers and again thanks for the help all. No doubt I'll be back for more!

Mike

Posted: Sat Jul 12, 2003 9:53 am
by m3rajk
you don't wanna use a split for a server. you want to have servers up as much as possible. to quote a friend from when i was working in network operations at brandeis "no computer should ever have to be rebooted...unless you're talking about windows, but that's because bill gates can't make an operating system"


remember, windows has never actually met dod security reqs. reason it's been used is they've paid more so the army has done more to find work arounds. the nsa is currently working with redhat and apache to make a linux/apache that actually does meet it, and from what i've heard, in the first 3 months they got father than microsoft EVER got. that's the rumor at any rate...

since linux is stable (unlike windows) and apache is better than iis, if you really wanna get the full feel and ot wonder if your issues are os based, you should first get used to posix .

btw: upgrade to 9. in the unix world you need to keep up with updates. it moves faster than windows because it's opensource, so intelligent people are actually patching it, the things get fixed, not changed how the holes work.

9 also has a better gui than 8 and while you get used to linux you'll need the gui.