Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
bugsTHoR
Involved
Involved



Joined: Apr 05, 2006
Posts: 263

PostPosted: Mon Apr 19, 2010 11:21 am Reply with quote

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&amp;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) 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Mon Apr 19, 2010 11:51 am Reply with quote

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?
 
View user's profile Send private message Visit poster's website
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Mon Apr 19, 2010 3:12 pm Reply with quote

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. 
View user's profile Send private message
bugsTHoR







PostPosted: Tue Apr 20, 2010 5:30 am Reply with quote

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 
fkelly







PostPosted: Tue Apr 20, 2010 8:07 am Reply with quote

If you literally have 'table.php' and you include 'tables.php' that would explain the error.
 
bugsTHoR







PostPosted: Tue Apr 20, 2010 9:50 am Reply with quote

TYPO

IT IS tables.php
 
Palbin







PostPosted: Tue Apr 20, 2010 10:04 am Reply with quote

There are not other errors in your log before the fatal error?
 
fkelly







PostPosted: Tue Apr 20, 2010 10:08 am Reply with quote

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.
 
bugsTHoR







PostPosted: Wed Apr 21, 2010 6:45 am Reply with quote

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
 
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Wed Apr 21, 2010 11:00 am Reply with quote

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! 
View user's profile Send private message Send e-mail Visit poster's website
bugsTHoR







PostPosted: Wed Apr 21, 2010 11:24 am Reply with quote

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
 
bugsTHoR







PostPosted: Wed Apr 21, 2010 11:40 am Reply with quote

just noticed the /MSIE/ forward slashes worked a treat thanks nuken
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Wed Apr 21, 2010 4:20 pm Reply with quote

Code:
$title2 = ereg_replace("_", " ", $title);


I replace this code with

Code:
$title2 = preg_match(/"_/", " ", $title);


Am I correct? Shocked

When I can regexp when I have symbols like that?
 
View user's profile Send private message
nuken







PostPosted: Wed Apr 21, 2010 5:00 pm Reply with quote

Your delimiters // would go inside the quotes like so "/_/" and ereg_replace is replaced with preg_replace.
 
nuken







PostPosted: Wed Apr 21, 2010 5:03 pm Reply with quote

Here is a good walkthrough on migration

http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in-php-53/
 
hicuxunicorniobestbuildpc







PostPosted: Wed Apr 21, 2010 5:10 pm Reply with quote

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. Very Happy


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
 
bugsTHoR







PostPosted: Thu Apr 22, 2010 5:12 am Reply with quote

just the cup of enlightenment i wanted thanks

easy reference
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©