Author |
Message |
bugsTHoR
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/568e5f374449c41c190ed.gif)
Joined: Apr 05, 2006
Posts: 263
|
Posted:
Mon Apr 19, 2010 11:21 am |
|
hi
i updated my xampp with 2.40.1 (xampp version .1.7.3)
and fixed a slight problem with a theme table
but now i am geting this error / this is from line 724 to 732 in Mainfile
Fatal error: Call to undefined function OpenTable() in C:\xampp\htdocs\bugs1942\mainfile.php on line 727
Code: CloseTable();
echo '<br />';
} elseif ($view == 1) {
OpenTable();
echo '<center><font class="option" color="'.$textcolor2.'"><b>'.$title.'</b></font></center><br />'."\n"
.'<div class="content">'.$content.'</div>'."\n";
if (is_admin($admin)) {
echo '<br /><br /><center><font class="content">[ '._MVIEWALL.' - '.$remain.' - <a href="'.$admin_file.'.php?op=editmsg&mid='.$mid.'">'._EDIT.'</a> ]</font></center>';
}
|
|
_________________ LUV RAVEN DISTROBUTION BEBE
Clanthemes.com are great (free advertisements for now until i get to 20,000 posts LoL) |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
Former Moderator in Good Standing
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Mon Apr 19, 2010 11:51 am |
|
It is not entirely clear from your note what "slight problem with a theme table" you are referring to. The OpenTable() function is defined in individual themes and the error you are seeing would indicate that theme.php for your theme isn't working properly or maybe not even being called. What theme are you using? Does the same problem happen if you switch themes? What did you do to fix the problem you saw? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Mon Apr 19, 2010 3:12 pm |
|
bugsTHoR, as fkelly alluded to there appears to be a problem with your theme.php. Can you post the contents of it? |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bugsTHoR
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 20, 2010 5:30 am |
|
i did post a reply after fkelly waht happened to it *scratches head*
my table.php
[NOTE REMOVED THEME.PHP CODE AT THE CODERS REQUEST] |
Last edited by bugsTHoR on Thu Apr 22, 2010 6:55 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 20, 2010 8:07 am |
|
If you literally have 'table.php' and you include 'tables.php' that would explain the error. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bugsTHoR
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 20, 2010 9:50 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 20, 2010 10:04 am |
|
There are not other errors in your log before the fatal error? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
fkelly
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Apr 20, 2010 10:08 am |
|
Well, what we know then is that the function OpenTable() is not defined by the time that mainfile calls it. I'm not sure why you have those stristr security checks at the top of the programs. Take a look at the NukeNews theme that comes with your distribution ... it uses a similar arrangement of a theme.php including a tables.php. You could model yours after that.
I'd make sure error reporting is turned all the way up ... display errors is on and you are doing E^ALL ... many threads here on that. Then I might stick an echo right into the top of tables.php to say something like echo 'got to tables.php ' and then maybe an echo before and after the include of tables.php. If you don't get the echoes back it would indicate that maybe there is an error in theme or tables php. It almost has to be some kind of PHP syntactical error you are seeing to keep OpenTables from being available to mainfile. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bugsTHoR
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Apr 21, 2010 6:45 am |
|
ok seems Xampp 1.7.3 did`nt like so i went back to version 1.6.8
this is now what i get and yes i have added the E^DEPRECATED the rnconfig.php
so it now looks like this ^E_ALL^E_NOTICE^DEPRECATED; ignore any bad spelling i have check already. lol
so why would it still show about the ereg i changed it to this which i found was the replacment for it.
Code:
Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in C:\xampp\htdocs\bugs1942\mainfile.php on line 70
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\bugs1942\rnconfig.php on line 268
|
but the warning or notices still show |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Wed Apr 21, 2010 11:00 am |
|
In mainfile.php on line 70
Code:
if (ereg('MSIE', $_SERVER['HTTP_USER_AGENT'])) {
|
should become
Code:
if (preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT'])) {
|
and line 268 in rnconfig.php can just be commented out or removed. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bugsTHoR
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Apr 21, 2010 11:24 am |
|
thanks nuken got rid of the line coming from mainfile
but if you notice in my post above yours i have done preg_match but the warning still shows !! which is strange, to be honest i can still use it as a test for my new graphics so from that point of view alls good
thanks for the help guys |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bugsTHoR
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Apr 21, 2010 11:40 am |
|
just noticed the /MSIE/ forward slashes worked a treat thanks nuken |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/5ed231554a8492e2e09da.gif)
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Wed Apr 21, 2010 4:20 pm |
|
Code:$title2 = ereg_replace("_", " ", $title);
|
I replace this code with
Code:$title2 = preg_match(/"_/", " ", $title);
|
Am I correct?
When I can regexp when I have symbols like that? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Apr 21, 2010 5:00 pm |
|
Your delimiters // would go inside the quotes like so "/_/" and ereg_replace is replaced with preg_replace. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Apr 21, 2010 5:03 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Apr 21, 2010 5:10 pm |
|
Thank you very much Nuke. I guess I missed the table
For all of you who are working to replace all deprecate errors. Here I give you the table.
Code:■call_user_method() (use call_user_func() instead)
■call_user_method_array() (use call_user_func_array() instead)
■define_syslog_variables()
■dl()
■ereg() (use preg_match() instead)
■ereg_replace() (use preg_replace() instead)
■eregi() (use preg_match() with the 'i' modifier instead)
■eregi_replace() (use preg_replace() with the 'i' modifier instead)
■set_magic_quotes_runtime() and its alias, magic_quotes_runtime()
■session_register() (use the $_SESSION superglobal instead)
■session_unregister() (use the $_SESSION superglobal instead)
■session_is_registered() (use the $_SESSION superglobal instead)
■set_socket_blocking() (use stream_set_blocking() instead)
■split() (use preg_split() instead)
■spliti() (use preg_split() with the 'i' modifier instead)
■sql_regcase()
■mysql_db_query() (use mysql_select_db() and mysql_query() instead)
■mysql_escape_string() (use mysql_real_escape_string() instead)
■Passing locale category names as strings is now deprecated. Use the LC_* family of constants instead.
■The is_dst parameter to mktime(). Use the new timezone handling functions instead.
|
Nuken, I spent lots of hours learning about this issue. I guess I got the basic in order to solve any deprecated errors.
The correct way
Code:$title2 = ereg_replace("_", " ", $title);
|
Replace with
Code:$title2 = preg_replace("/_/", " ", $title);
|
This is a better understanding. I will make a better table but follow this schema for now
![Image Image](http://i42.tinypic.com/24lk32w.jpg) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bugsTHoR
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Apr 22, 2010 5:12 am |
|
just the cup of enlightenment i wanted thanks
easy reference |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|