Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
scorpious
Worker
Worker



Joined: Dec 03, 2005
Posts: 153

PostPosted: Mon Jun 04, 2012 8:57 am Reply with quote

Hi All

I have a test site with fresh install of Rn2.5, I am upgradeing from Rn2.4

Everything seams ok my custom modules and blocks I have changed the coding to work with the new $db->sql_query to which I found on here:

http://www.ravenphpscripts.com/postp128408.html

I have now problems with NukeTreasury when I try and enter through the admin I get HTTP 500, where can I find any information on the following :

mysql_select_db
mysql_fetch_assoc
mysql_pconnect

so I can correct them to work with the new db layer coding.

Cheers Scorp
 
View user's profile Send private message
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Mon Jun 04, 2012 10:18 am Reply with quote

I think you have an very old version of NukeTreasury. I use Guardians's version. Its called CA Treasury from code-authors.com.
[ Only registered users can see links on this board! Get registered or login! ] [ Only registered users can see links on this board! Get registered or login! ]

But in his version is the ipnppd.php not used. mysql_pconnect calls the database host, user, pw etc. This is a include from old php nuke versions and its not more needed in RN. Look in a current module inside RN25 and you can see, how it works.

for example - this not more needed:
Code:
require_once('../../../config.php');


$hostname_ipnppd = $dbhost;
$database_ipnppd = $dbname;
$username_ipnppd = $dbuname;
$password_ipnppd = $dbpass;

$board_config = array();
global $ipnppd;

$ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd);
if( $ipnppd )
{


mysql_select_db:
Code:
$query = $db->sql_query('SELECT id FROM ' . $prefix . '_table');

or
Code:
$query = 'SELECT id FROM ' . $prefix . '_table';

$value = $db->sql_query($query);

mysql_fetch_assoc:
Code:
$row2 = $db->sql_fetchrow($set2, SQL_ASSOC);


but i have no idea, how it works in your old version...
 
View user's profile Send private message
Palbin
Site Admin



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

PostPosted: Mon Jun 04, 2012 5:35 pm Reply with quote

scorpious, if you are seeing mysql_pconnect and mysql_select_db that means it is establishing it own connection and currently not using the DB layer.

If I was righting a new module I would not do it this way, but there is not necessarily anything wrong with it.

If you are looking to convert it to use the db layer you do not need to worry about mysql_select_db or mysql_pconnect. As suggested previously sql_fetchrow() should be fine to replace mysql_fetch_assoc .

_________________
"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
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

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 ©