View previous topic :: View next topic |
Author |
Message |
aluminumpork -
Joined: 19 May 2005 Posts: 3
|
Posted: Thu May 19, 2005 8:45 pm Post subject: Variables not transferring... |
|
|
I've been working on a collection of scripts that track, organize and sort support calls I receive at work. It then prints my end of day report of call for that date etc etc. I've been using a server available at my school, and the scripts were great. But I can't seem to get it working at on the Abyss server. The scripts themselves execute just fine, but no variables are transferring. All of the scripts utilize forms heavily, and rely on the information passed. I've tried using get and post with absolutely no success. I don't see why it would work on the schools Apache server and not this one. Same scripts, unchanged. I installed PHP 5 via the instructions provided by Aprelium.
For example of what I'm doing:
Add call page:
<form name="addcall" action="addcall.php" method="get">
<input type="text" name="callname">
<input type="submit" value="Add">
</form>
Save page:
<?php
$file = "calls.txt";
$handle=fopen($file,"w");
fwrite ($handle, "$callname");
fclose($handle);
?>
____________________________
These are -extremely- simplified versions of the scripts, but you get the general idea. It's just not passing it.
It errors out on every line that uses a transferred variable with:
Notice: Undefined variable: viewhotel in C:\Program Files\Abyss Web Server\htdocs\tsrms\viewcalls.php on line 26
Any ideas? |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Thu May 19, 2005 9:03 pm Post subject: |
|
|
Try installing PHP4 from www.php.net and see if the scripts work then. PHP5 is not fully compatable with PHP4 scripts so this could be the problem. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
 |
aluminumpork -
Joined: 19 May 2005 Posts: 3
|
Posted: Thu May 19, 2005 9:17 pm Post subject: |
|
|
PHP 4 is installed and I'm using the php.exe interpreter. |
|
Back to top |
|
 |
aluminumpork -
Joined: 19 May 2005 Posts: 3
|
Posted: Thu May 19, 2005 9:21 pm Post subject: |
|
|
Latest news: It also appears that $PHP_SELF and $HTTP_USER_AGENT don't exist or something. I tried using them and I get:
Notice: Undefined variable: HTTP_USER_AGENT in C:\Program Files\Abyss Web Server\htdocs\index.php on line 7
But all variables assigned within the same page work, like:
<?php
$test="Hello there!";
echo $hello;
?>
That works fine, so predefined variables are dead and all other outside variables are dead...
What's going on?
Here's my .conf file for anybody to take a look at:
http://208.45.122.109/abyss.conf |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu May 19, 2005 9:52 pm Post subject: |
|
|
Open your php.ini located in C:\Windows or C:\Php and edit the php.ini file.
The reason why your script does not work is because of Register Globals. :-)
Turn Register Globals on and it will work , go to my website for more easy
to follow instructions while installing PHP support , hope this info helps. :/
Sincerely , TRUSTpunk |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Thu May 19, 2005 11:38 pm Post subject: |
|
|
TRUSTpunk wrote: | Open your php.ini located in C:\Windows or C:\Php and edit the php.ini file.
The reason why your script does not work is because of Register Globals. :-)
Turn Register Globals on and it will work , go to my website for more easy
to follow instructions while installing PHP support , hope this info helps. :/
Sincerely , TRUSTpunk |
Quit beating me to it! =P _________________
 |
|
Back to top |
 |
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Fri May 20, 2005 2:28 am Post subject: |
|
|
Quote: | Quit beating me to it! =P |
I never seen someone so desperate to help another person. Im not trying to
post stuff before anyone else , I just want to get the answer to them fast. :-)
Sincerely , TRUSTpunk |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Fri May 20, 2005 6:47 pm Post subject: |
|
|
TRUSTpunk wrote: | Quote: | Quit beating me to it! =P |
I never seen someone so desperate to help another person. Im not trying to
post stuff before anyone else , I just want to get the answer to them fast. :-)
Sincerely , TRUSTpunk |
I like to try sound smart.
/me shrugs _________________
 |
|
Back to top |
 |
 |
|