View previous topic :: View next topic |
Author |
Message |
certus -
Joined: 12 Jun 2005 Posts: 24 Location: www.certuspersonality.com
|
Posted: Fri Jun 17, 2005 6:12 am Post subject: "Undefiened Variable" |
|
|
Installed Abyss and PHP Installer 4.3.11, both for Windows XP.
Tried to run the website that I have on my online server host. On my local computer I have a mirror of the folder tree that I have on the online server.
The operation from the loacalhost works ok as far as loading html files is concerned. If I run html pages that include a form, whose data are to be posted to the executable php-file, I receive the error message "Undefinable Variable", which refers to the keyed-in information from the form.
On the surface this looks as if there was no data keyed in or the keyed-in data is not recognized by the php file.
To be on the safe side, in the Abyss Server Console, Configure, Scripting Parameters, Script Path I have added in /*.php, /*.inc, /*.txt as the extensions used in the folder tree. *.inc files are called in (included in) by the excutable php file.
Did I forget to configure something?
Online, all programs work fine.
Herward |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
|
Back to top |
|
 |
certus -
Joined: 12 Jun 2005 Posts: 24 Location: www.certuspersonality.com
|
Posted: Fri Jun 17, 2005 1:55 pm Post subject: |
|
|
Followed the two links given above. They describe situations different to mine.
In my case, the php excecutable file is not executed at all, because the key-in data are not seen, or not recognized.
?
Herward |
|
Back to top |
|
 |
admin Site Admin
Joined: 03 Mar 2002 Posts: 1332
|
Posted: Fri Jun 17, 2005 2:55 pm Post subject: |
|
|
certus,
What is the exact error message you get? How do you know that the PHP is executed or not? |
|
Back to top |
|
 |
certus -
Joined: 12 Jun 2005 Posts: 24 Location: www.certuspersonality.com
|
Posted: Fri Jun 17, 2005 3:48 pm Post subject: |
|
|
The error messages come from within the php excecutable file. I provided the error messages there in case thgat some key-in data is incorrect.
This tells me that the php executable file is called upon, but the key-in variables are not recognized.
These variables are simply a date or a name.
Herward |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Fri Jun 17, 2005 9:35 pm Post subject: |
|
|
certus wrote: | The error messages come from within the php excecutable file. I provided the error messages there in case thgat some key-in data is incorrect.
This tells me that the php executable file is called upon, but the key-in variables are not recognized.
These variables are simply a date or a name.
Herward |
Can we see the script? _________________
 |
|
Back to top |
 |
 |
certus -
Joined: 12 Jun 2005 Posts: 24 Location: www.certuspersonality.com
|
Posted: Sat Jun 18, 2005 4:02 am Post subject: |
|
|
The executable php file (totchgr.php3) in this program called Chalgrow is written as an html file with php insertions.
The insertions are
A)
<?php
include("sumfunctcomptxt.inc");
include("startfunctchgr.inc");
include("abvariabcomptxt.inc");
include("afunctcomptxt.inc");
?>
B)
<?php print("$byeara"); ?>
<?php print("$bmontha"); ?>
<?php print("$bdaya"); ?>
<?php print("$analyzedgivennamea"); ?>
<?php print("$analyzedsurnamea"); ?>
$byeara, $bmontha, $bdaya, $analyzedgivennamea, $analyzedsurnamea come in from the key-in data form.
In A) above, the file startfunctchgr.inc contains the error messages which I see when I run Abyss/PHP:
<?php
/* Check Input */
$char_pattern = "[a-z#@]+";
if ( (eregi($char_pattern, $analyzedgivennamea) == 0) )
{
reportErrors("Analyzed Given-Name(s) shows invalid characters, or no characters inserted");
}
if (!empty($analyzedsurnamea))
{
if ( (eregi($char_pattern, $analyzedsurnamea) == 0) )
{
reportErrors("Invalid Analyzed Surname.");
}
}
!isset($bdaya) || !is_integer($bdaya + 0) || $bdaya < 1 || $bdaya > 31 ? reportErrors("Invalid Birth Day.") : 0;
!isset($bmontha) || !is_integer($bmontha + 0) || $bmontha < 1 || $bmontha > 12 ? reportErrors("Invalid Birth Month.") : 0;
!isset($byeara) || !is_integer($byeara + 0) || $byeara <= 0 || $byeara > 9999 ? reportErrors("Invalid Birth Year.") : 0;
!checkdate($bmontha, $bdaya, $byeara) ? reportErrors("Invalid Birth Date.") : 0;
?>
The error message I receive is "Analyzed Given-Name(s) shows invalid characters, or no characters inserted", and the php file (totchgr.php3) is not executed.
Herward |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Jun 18, 2005 11:42 am Post subject: |
|
|
certus,
Are you sure that turning register_globals to on in php.ini does not solve the problem? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
certus -
Joined: 12 Jun 2005 Posts: 24 Location: www.certuspersonality.com
|
Posted: Sat Jun 18, 2005 1:59 pm Post subject: |
|
|
Followed this suggestion:
"Are you sure that turning register_globals to on in php.ini does not solve the problem?"
Result: php execution works (except for one program).
However, preceding the proper result page there is a whole plethora of error messages, like
Undefined Variable, Undefined Offset, Use of Undefined Constant Key.
So I changed those lines in php.ini in Windows acording to the suggestions in:
Posted: Fri Jun 17, 2005 12:48 pm Post subject: Re: "Undefiened Variable" Reply with quote
certus,
This is a classical issue with PHP configuration: see http://www.aprelium.com/forum/viewtopic.php?t=6316 and http://www.aprelium.com/forum/viewtopic.php?t=85 .
Unfortunately, this did not take the plethora away.
What is left is: How do I get rid of these error messages displays?
Herward |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Sat Jun 18, 2005 8:11 pm Post subject: |
|
|
certus wrote: | Followed this suggestion:
"Are you sure that turning register_globals to on in php.ini does not solve the problem?"
Result: php execution works (except for one program).
However, preceding the proper result page there is a whole plethora of error messages, like
Undefined Variable, Undefined Offset, Use of Undefined Constant Key.
So I changed those lines in php.ini in Windows acording to the suggestions in:
Posted: Fri Jun 17, 2005 12:48 pm Post subject: Re: "Undefiened Variable" Reply with quote
certus,
This is a classical issue with PHP configuration: see http://www.aprelium.com/forum/viewtopic.php?t=6316 and http://www.aprelium.com/forum/viewtopic.php?t=85 .
Unfortunately, this did not take the plethora away.
What is left is: How do I get rid of these error messages displays?
Herward |
Do you mean notices? (They say "Notice: ...".) _________________
 |
|
Back to top |
 |
 |
certus -
Joined: 12 Jun 2005 Posts: 24 Location: www.certuspersonality.com
|
Posted: Sun Jun 19, 2005 4:24 am Post subject: |
|
|
What do you refer to with "Do you mean notices? (They say "Notice: ...".)" ?
I didn't use the word 'notice' or 'notices'.
Herward |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Sun Jun 19, 2005 4:29 am Post subject: |
|
|
certus wrote: | What do you refer to with "Do you mean notices? (They say "Notice: ...".)" ?
I didn't use the word 'notice' or 'notices'.
Herward |
As far as I thought Undefined Variable appeared as a notice =/
I was asking if they sais "Notice: ..." or not... _________________
 |
|
Back to top |
 |
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Jun 19, 2005 12:46 pm Post subject: |
|
|
certus,
Can you please send to support@aprelium.com your php.ini file and an example of the error messages you get from PHP. Please do not forget to add a reference to this forum message to your email. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
roganty -
Joined: 08 Jun 2004 Posts: 357 Location: Bristol, UK
|
Posted: Sun Jun 19, 2005 4:09 pm Post subject: Re: "Undefiened Variable" |
|
|
certus wrote: | To be on the safe side, in the Abyss Server Console, Configure, Scripting Parameters, Script Path I have added in /*.php, /*.inc, /*.txt as the extensions used in the folder tree. *.inc files are called in (included in) by the excutable php file. |
i thought you didn't need to include the leading "/" at the start.
certus wrote: | The executable php file (totchgr.php3) in this program called Chalgrow is written as an html file with php insertions.
...
The error message I receive is "Analyzed Given-Name(s) shows invalid characters, or no characters inserted", and the php file (totchgr.php3) is not executed. |
is the .php3 extension included in the extensions list that you provided above.
(Abyss Server Console->Configure->Scripting Parameters->Script Path) _________________ Anthony R
Roganty | Links-Links.co.uk |
|
Back to top |
|
 |
certus -
Joined: 12 Jun 2005 Posts: 24 Location: www.certuspersonality.com
|
Posted: Mon Jun 20, 2005 6:21 am Post subject: |
|
|
To Monkey Nation: The word is 'Notice'.
To aprelium: Sent you the lot.
To roganty: "/", I just followed the examples given in the help file.
Also, php3 is included in the Script Path.[/quote] |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Mon Jun 20, 2005 12:21 pm Post subject: |
|
|
certus wrote: | To Monkey Nation: The word is 'Notice'. |
Are you having a go at my spelling or telling me they are notices? =S _________________
 |
|
Back to top |
 |
 |
certus -
Joined: 12 Jun 2005 Posts: 24 Location: www.certuspersonality.com
|
Posted: Mon Jun 20, 2005 1:39 pm Post subject: |
|
|
No, nothing funny.
The error messages all start with the word Notice.
Herward |
|
Back to top |
|
 |
|