Connecting Tech Pros Worldwide Forums | Help | Site Map

Web Template PHP Error's - Scripts listed inside

Newbie
 
Join Date: Aug 2007
Location: London
Posts: 7
#1: Aug 21 '07
Hi everyone: D,
I recently purchased a very smart and ‘expensive’ template from [REMOVED --pbmods].

You have to install it on your site etc putting in your mysql details, e-mail address, license key etc. So far everything went to plan. Installed perfect. But now it’s running I am getting a list of these messages on my site (www.illuminati-gaming.co.uk):

Brace yourself:

Quote:
Notice: Use of undefined constant host - assumed 'host' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 7

Notice: Use of undefined constant user - assumed 'user' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 8

Notice: Use of undefined constant pass - assumed 'pass' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 9

Notice: Use of undefined constant db - assumed 'db' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 10

Notice: Use of undefined constant host - assumed 'host' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 7

Notice: Use of undefined constant user - assumed 'user' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 8

Notice: Use of undefined constant pass - assumed 'pass' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 9

Notice: Use of undefined constant db - assumed 'db' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/db.inc.php on line 10

Notice: Use of undefined constant login - assumed 'login' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant index - assumed 'index' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant news - assumed 'news' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant roster - assumed 'roster' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant links - assumed 'links' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant leagues - assumed 'leagues' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant matches - assumed 'matches' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant faq - assumed 'faq' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant sponsors - assumed 'sponsors' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant downloads - assumed 'downloads' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant settings - assumed 'settings' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant changepass - assumed 'changepass' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant admins - assumed 'admins' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Use of undefined constant config - assumed 'config' in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/config.inc.php on line 0

Notice: Undefined index: uniqueid in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php on line 0

Warning: Cannot modify header information - headers already sent by (output started at /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php:0) in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php on line 0
This is a major pain in the back side as its plastered everywhere. Could someone please aid me and point me in the way of fixing this problem. Helping me get my template running the way it should be: D

PHP info can be found on my site under this link: www.illuminati-gaming.co.uk/phpinfo.php
Hosting company: [REMOVED-ajaxrand]


Copy of php code taken from db.inc.php (I have masked passwords etc with ****)

[PHP]<?php
// Setup Database Connection Variables.
// Make Sure Database Exists.
// And User Information is Correct.

$dbinfo = array();
$dbinfo[host] = "mysql11.streamline.net";
$dbinfo[user] = "********";
$dbinfo[pass] = "********";
$dbinfo[db] = "********";
if ($dbinfo) {
$connection = @mysql_connect ($dbinfo[host], $dbinfo[user], $dbinfo[pass]);
if ($connection) {
@mysql_select_db ($dbinfo[db]);
} else {
echo "Unable to connect to database";
exit;
}
} else {
echo "You need to setup your mysql information";
}

$license="*************";

?>[/PHP]

Copy of adminsm/config.inc.php

[PHP]<?php //00393
// Copyright Surreal-Media - www.Surreal-Media.com -
if(!extension_loaded('ionCube Loader'))
{
$__oc=strtolower(substr(php_uname(),0,3));
$__ln='/ioncube/ioncube_loader_'.
$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win') ?'.dll':'.so');
$__oid=$__id=realpath(ini_get('extension_dir'));
$__here=dirname(__FILE__);
if(strlen($__id)>1&&$__id[1]==':')
{
$__id=str_replace('\\','/',substr($__id,2));
$__here=str_replace('\\','/',substr($__here,2));
}
$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);
while($__i--)
{
if($__rd[$__i]=='/')
{
$__lp=substr($__rd,0,$__i).$__ln;
if(file_exists($__oid.$__lp))
{
$__ln=$__lp;
break;
}
}
}
@dl($__ln);
}
else{
die('The file '.__FILE__." is corrupted.\n");
}
if(function_exists('_il_exec'))
{
return _il_exec();
}
echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the site administrator.');exit(199);
?>
4+oV5CZ1k0sAAG4YHtGjBW5GTGO2+uPXoo7HNk5Qny5/6J3SggNXbPPPRE5qy9W60OhUjzcTEh9D
nq8Dps3yDvAHyJsByyCJ41hbHwfT5isHR2T/NkrJ5+C430MZXmljIF7M6liIvLLH1mwM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q4kjRpEyLennszoJTyraW vI
ifZuM+s2tCMnKrcnx6Kjq3J49ocTDWV+W2pH3GswDwBwsNOLaS bYVmxvPH33QQSPTSpG8EL9U48x
qasGaLWJsM1V3M/6IfQ5Lsuutq58ys3qZrzsDCaQIhMwnotraZFUiBMV+lzvggLyX J/MLCKJBFtP
AqzllOcFzvkSCnkSGWUnsAIDUH9AoZ5+AV6bgQ7ayGvV92f8BZ ysyKdwAuDKqa2tEs92tipae+1Y
K7Z4IYIDUJHTM2DJ/n2Sy0Mz8/jV01ZhFnK9cNRdDJrepMJKTgdaysRnO8Fe8289xUzXdQrk0n5e
m57UjVV8SLqG7NwnSENwAQgVJYv2CW8LWM6SG8ucTn8HbuMdom InI+0vYljGISMajX3yTszScmxC
J+fZ8ztFcMLoTLJERBnujlnkwUg08UKv6o3t/oRgwUgFIdOfGrZMxwPhafz59OCoGzR5YZFH2N6I
M0IBrfSxNqcOkIsZFOYfeDMlSVdJdoDfEFD7XMz6qy7YwXBeLs w7ekrN4yzW//CzTUnnaN/OwRUx
wW8Yd47o/gz7JqcSdY6Mi98FRi+oGqseY5YiftrR5I3eaFXtK99okkMDepf WcuuvH5+3bpR4nCpk
e891NOe9N7cVc27gUB8THwW/qggag6Br+Ce5ZVZbPBAXtdhHrmreUccZrUrKrL9D8HLweHVopq Qt
26ABknvWw3a=[/PHP]

If you require any more information to help find the problem I am willing to do so, please either e-mail me or reply on here.

Many thanks for taking your time out to read this topic and post, I look forward to hearing from you.

jx2 jx2 is offline
Familiar Sight
 
Join Date: Feb 2007
Location: Bristol UK
Posts: 227
#2: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


well, i have to ask - is everything working properly?
are you an administrator of the server or is it hosted server?

if every thing works properly and you can change php.ini
you can find this line in php.ini(php configuration file):

error_reporting = E_ALL

and change to :
error_reporting = E_ALL & ~E_NOTICE

that will get rid of the text you see on the screen but it wont get rid of potencial error in your code

unfortunatly we cant help you with the code as it seems to be protected ( pbmods will tell you more about it :-)

this notice is rised when variable is not defined (it used before its given any value) sometimes programmer are to lazy to define it and let it be as it is(that means zero)
well you can also try to define them if you know what they are for

of course its might be something wrong with your configuration

well i didnt help much ...i know

regards
jx2
jx2 jx2 is offline
Familiar Sight
 
Join Date: Feb 2007
Location: Bristol UK
Posts: 227
#3: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


i overlooked one thing do you see those @
[php]<?php
// Setup Database Connection Variables.
// Make Sure Database Exists.
// And User Information is Correct.

$dbinfo = array();
$dbinfo[host] = "mysql11.streamline.net";
$dbinfo[user] = "********";
$dbinfo[pass] = "********";
$dbinfo[db] = "********";
if ($dbinfo) {


//====================here ===============================
$connection = @mysql_connect ($dbinfo[host], $dbinfo[user], $dbinfo[pass]);
if ($connection) {

//===================== and here ===========================
@mysql_select_db ($dbinfo[db]);
} else {
echo "Unable to connect to database";
exit;
}
} else {
echo "You need to setup your mysql information";
}

$license="*************";

?>[/php]
you can try to remove them and youll see what happen
(more errors might show - that might let you know whats wrong)

@ - adding it in front of the function hides errors (adding it its bad - we wanna know if there is any error)

regards #jx2
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#4: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Heya, priestyuk. Welcome to TSDN!

You're getting these warnings because none of the array indexes are quoted.

For example:
Expand|Select|Wrap|Line Numbers
  1.  $dbinfo[host] =     "mysql11.streamline.net";
  2.  
What's happening here is that PHP is looking for a constant named 'host' before it decides that you really meant to use the literal 'host'.

To get rid of these warnings, you'll need to quote all your array indexes.

For example:
Expand|Select|Wrap|Line Numbers
  1.  $dbinfo['host'] =     "mysql11.streamline.net";
  2.  
jx2 jx2 is offline
Familiar Sight
 
Join Date: Feb 2007
Location: Bristol UK
Posts: 227
#5: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Quote:

Originally Posted by pbmods

You're getting these warnings because none of the array indexes are quoted.

For example:

Expand|Select|Wrap|Line Numbers
  1.  $dbinfo[host] =     "mysql11.streamline.net";
  2.  

pbmods - you rock man :-)
how could i overlooked that? ;-)
Newbie
 
Join Date: Aug 2007
Location: London
Posts: 7
#6: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


JX2 & PB Mod's thanks for your help so far. I done what you said to do and edited the fields on db.inc.php and that worked great. Can you advise on the next error's given. If you need me to post php scripts that are giving the errors I can.

I await your answer's knowble one :D

PS I dont have access to php.ini as it is locked by hosts :S

I have posted /adminsm/config.inc.php already but I can post others if needs be.
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#7: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Heya, Priestyuk.

Quote:

Originally Posted by priestyuk

Notice: Undefined index: uniqueid in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php on line 0

Warning: Cannot modify header information - headers already sent by (output started at /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php:0) in /home/fhlinux165/i/illuminati-gaming.co.uk/user/htdocs/adminsm/req/func.inc.php on line 0

You're talking about these ones, right?

The second one will go away as soon as you fix the first one.

We'll have to look at func.inc.php, but I'd rather not look at the whole thing; that would just flood the page. Instead, I'd like to see where this 'uniqueid' index is in that file.
Newbie
 
Join Date: Aug 2007
Location: London
Posts: 7
#8: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


'uniqueid' index is in that file.

--------------------------------------------------------------------------------

Please can you elabrate :)
Newbie
 
Join Date: Aug 2007
Location: London
Posts: 7
#9: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


I have attached func.inc.php (compressed) for you to look at :)
Attached Files
File Type: zip func.inc.zip (23.2 KB, 11 views)
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#10: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Heya, Priestyuk.

Quote:

Originally Posted by priestyuk

'uniqueid' index is in that file.

--------------------------------------------------------------------------------

Please can you elabrate :)

I'm guessing that func.inc.php is at least a few hundred lines long, which is TMI in its purest form. Search for 'uniqueid' in that file and post back where it occurs so that we can look at it in context.

What's going on is somewhere in func.inc.php, a function is trying to access the 'uniqueid' index of an array, but in that array, there is no element with that index.

E.g.,
Expand|Select|Wrap|Line Numbers
  1. if($array['uniqueid']) {
Once we find it, there should be a simple fix for it.
Newbie
 
Join Date: Aug 2007
Location: London
Posts: 7
#11: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Quote:

Originally Posted by pbmods

Heya, Priestyuk.



I'm guessing that func.inc.php is at least a few hundred lines long, which is TMI in its purest form. Search for 'uniqueid' in that file and post back where it occurs so that we can look at it in context.

What's going on is somewhere in func.inc.php, a function is trying to access the 'uniqueid' index of an array, but in that array, there is no element with that index.

E.g.,

Expand|Select|Wrap|Line Numbers
  1. if($array['uniqueid']) {
Once we find it, there should be a simple fix for it.

I dont understand im really sorry see above your post I have attached func.inc.php

Thanks for your speedy help your are jesus of php :D
jx2 jx2 is offline
Familiar Sight
 
Join Date: Feb 2007
Location: Bristol UK
Posts: 227
#12: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Quote:

Originally Posted by priestyuk

I dont understand im really sorry see above your post I have attached func.inc.php

Thanks for your speedy help your are jesus of php :D

well im afraid we cant help you (at least not me) the Code is protected

pbmods? can we see code somehow?
however i dont see errors on your page there are only notices
try to use (at the beginning of your script(s) )
Expand|Select|Wrap|Line Numbers
  1. error_reporting(E_ALL ^ E_NOTICE);
  2.  
it shoud get rid of the bad staff from your page test everything afterwards
you might be lucky ..
if you are not ...well ...

jx2
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#13: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Yeah. That's been encoded. There's no getting at it.

Ah well. As JX2 noted, you can simply tell PHP to ignore those notices.
Newbie
 
Join Date: Aug 2007
Location: London
Posts: 7
#14: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


What can I ask my host provider and what shall I ask the template maker to make this template run as smooth as possible?

Thanks again
jx2 jx2 is offline
Familiar Sight
 
Join Date: Feb 2007
Location: Bristol UK
Posts: 227
#15: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Quote:
...You have to install it on your site etc putting in your mysql details, e-mail address, license key etc.
well this make me think that you didnt setup everything what is needed in mysql setup ... try to setup those values you get noticed about...

Quote:

Originally Posted by priestyuk

What can I ask my host provider and what shall I ask the template maker to make this template run as smooth as possible?

Thanks again

host provider can change the error reporting level or you can do it yourself as i mentioned above by using error_reporting() fuction(but that not necesserly solve your problem

template maker will know (i hope) whats that about (they also might have some FAQ on their website)

regards
jx2
jx2 jx2 is offline
Familiar Sight
 
Join Date: Feb 2007
Location: Bristol UK
Posts: 227
#16: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Quote:
Last edited by pbmods : Today at 09:37 PM. Reason: Added CODE tags. JX2, I'm shocked!
sorry i thought one line is allright without them...

will you forgive me?
Newbie
 
Join Date: Aug 2007
Location: London
Posts: 7
#17: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


I installed everything correctly, he had to activate it. Ive been in contact with the maker and he said he hasnt seen anything like this before :S But since I've edited db.inc.php like you said and that worked, I think his php scripts need editing tbh, what do you think I should inform him saying on the areas that he should work on for me?

I dont think its down to my host as this will just mask the errors that are trying to run hiddin'

Thanks for your time so far :)
pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#18: Aug 21 '07

re: Web Template PHP Error's - Scripts listed inside


Heya, Priestyuk.

Tell him to add these lines to the top of his code:
Expand|Select|Wrap|Line Numbers
  1. ini_set('display_errors', 1);
  2. error_reporting(E_ALL);
  3.  
Reply