PHP Configuration Error
Moderator: General Moderators
PHP Configuration Error
Can someone tell me what setting I need to change in my PHP.INI file to get this error to go away? http://ronnie.vonetwork.com/index2.php? If you visit my current website at http://www.ronniewilliams.net/index2.php you will see that error isnt there but I dont have access to the PHP.INI file there so I cant see how its set. I need to know what setting to change at the vonetwork site to get this error to go away.
in this case you don't wanna touch the error reporting level. why? they turn it most if not allt he way off for security.
this is a simple matter.
my guess is you have an include for functions, and other stuff.
you have a function in that particular page
so you include the file twice. wanna get around it?
adjust your includes like this:
a: include two files elsewhere, just the variables and not the functins in a page's functions
b:
make an include file that includes the two files that you include elsewhere and only include variables in functions in a page.
in either of those cases split the functions and ariables.
you see the issue is simple: you're declaring a function twice and if you plan on using the second version then you need to be warned because you'll only be using the first.
i had that same issue when i modularized the site i'm working on. i did the latter since i now have two variables files
this is a simple matter.
my guess is you have an include for functions, and other stuff.
you have a function in that particular page
so you include the file twice. wanna get around it?
adjust your includes like this:
a: include two files elsewhere, just the variables and not the functins in a page's functions
b:
make an include file that includes the two files that you include elsewhere and only include variables in functions in a page.
in either of those cases split the functions and ariables.
you see the issue is simple: you're declaring a function twice and if you plan on using the second version then you need to be warned because you'll only be using the first.
i had that same issue when i modularized the site i'm working on. i did the latter since i now have two variables files
You could post the 116th line in the class_poll.php file, and we'll see what that gives us...
I'm thinking that the poll-file uses the $_GET enviroment to get pollvalues (uhmmm sounded wierd) and it cant grasp the fact that the ? at the end of the URI isn't have to mean anything...
Don't think you should touch them ini file for various reasons...
I'm thinking that the poll-file uses the $_GET enviroment to get pollvalues (uhmmm sounded wierd) and it cant grasp the fact that the ? at the end of the URI isn't have to mean anything...
Don't think you should touch them ini file for various reasons...
Code in Question
Here is the code in question:
Line 116 is the last function set_max_bar_length. This is a pre-written code so I dont know how to modify it to make it work to my needs. I dont understand why it works on my current web host but not on the new webhost im going to.
Code: Select all
function set_max_bar_length($max_bar_length='') {
if ($max_bar_length && $max_bar_length>0) {
$this->pollvars['img_length'] = $max_bar_length;
return true;
} else {
return false;
}
}
function set_max_bar_height($max_bar_height='') {
if ($max_bar_height && $max_bar_height>0) {
$this->pollvars['img_height'] = $max_bar_height;
return true;
} else {
return false;
}
}
function get_poll_tpl($tpl) {
$filename = "$this->include_path/templates/$this->template_set/$tpl.html";
if (file_exists("$filename")) {
$fd = fopen ($filename, "r");
$template = fread ($fd, filesize ($filename));
fclose ($fd);
$template = ereg_replace(""", """, $template);
return $template;
} else {
return false;
}
}
function set_max_bar_length($max_bar_length='') {
if ($max_bar_length && $max_bar_length>0) {
$this->pollvars['img_length'] = $max_bar_length;
}
return $this->pollvars['img_length'];
}- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
follow up
the only code that was changed was the file that contains my database settings. other than that all was left the same as on the web host where the script is working fine. the script that is working fine has PHP 4.2.2 while the version that isnt working has 4.3.3.. any changes in the versions of PHP that might affect this?
Re: Code in Question
i removed some of your code.... notice anything????ronni_e wrote:Here is the code in question:Line 116 is the last function set_max_bar_length. This is a pre-written code so I dont know how to modify it to make it work to my needs. I dont understand why it works on my current web host but not on the new webhost im going to.Code: Select all
function set_max_bar_length($max_bar_length='') { if ($max_bar_length && $max_bar_length>0) { $this->pollvarsї'img_length'] = $max_bar_length; return true; } else { return false; } } function set_max_bar_length($max_bar_length='') { if ($max_bar_length && $max_bar_length>0) { $this->pollvarsї'img_length'] = $max_bar_length; } return $this->pollvarsї'img_length']; }
note: i was wrong with why you were getting the error but not what it was. if i'm not mistaken they are identical. try removing one. it should still work perfectly
removed one
I removed one like you said.. it now displays.. however try to place a vote.. http://ronnie.vonetwork.com/index2.php