Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
pureliving
Worker
Worker


Joined: Dec 01, 2008
Posts: 180

PostPosted: Tue Feb 03, 2009 5:39 pm Reply with quote

Could someone please advise me to a solution.

I have installed nuke treasury2006 v1.1.1, of which i found supposedly suitable for raven2.3, but whilst all the database tables installed correctly, and the module and block activated to all visitors, it seems that when i click upon the donations module under site navigation that all is correctly working, but when i click upon treasury under admin, all i get is a blank white page.

This makes me think how come the module appears to be working, but the admin is not.

I therefore wondered if anyone could kindly help me in a way that i could correct this please.

Thank you sincerely.
xx
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Tue Feb 03, 2009 10:13 pm Reply with quote

A white page usually indicates an error. Please enable error reporting and check your error logs

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Wed Feb 04, 2009 12:24 am Reply with quote

Also, it's only suitable for RN v2.3 if you've followed these instructions : Only registered users can see links on this board! Get registered or login!

But the preferred way is: Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
pureliving
PostPosted: Wed Feb 04, 2009 6:12 pm Reply with quote

Thanks raven, same issue as usual.
Same old, same old.

Trust me not realising only 1 file out of all had a bit of dbi structure, and couple sql_query db calls that required modifying.

Anyway thanks for the nudge in the right direction, made me look more thoroughly.

speedtype Groovy
 
Raven
PostPosted: Wed Feb 04, 2009 10:44 pm Reply with quote

That's okay. Got stung with that one myself just recently. Overlooking the obvious is one of my strengths killing me


Last edited by Raven on Thu Feb 05, 2009 11:08 pm; edited 1 time in total 
pureliving
PostPosted: Thu Feb 05, 2009 8:00 pm Reply with quote

One more question though.
As i am new to this and self taught, i have spent alot of time recently testing my abilities with the database conversions, with only a few perfect results, such as the treasury module discussed above, but what i have noticed is there seems to be quite a few more complications with the conversions not discussed in palbin, and which i do thinks would be nice to see in a new updated sticky topic.

For instance,
A new one i have been stung with is codes such as:
Code:


$sql="select * from yp_region order by 1";
    $result = mysql_query($sql);
    while($busarray = mysql_fetch_array($result)) {
      echo "<option value=\"$busarray[regionid]\"";
      if ($busaddarray[region] == $busarray[regionid]) {echo "selected";}
      echo ">$busarray[regionname]</option>";
    }


and

Code:


  $result = mysql_query($sql);
  $insertid = mysql_insert_id();
  $errno=mysql_errno();
  $errmsg=mysql_error();
  if ($debugstat or $errno <> 0) {
    echo "sql=$sql<br>result=";
    echo "$result<br>";
    echo "Error:$errno : $errmsg<BR>";
  }


Would every instance of mysql, whether with options such as insert_id, require changing to the same as others, for example, with the $db-> structure, thereby moving 'my', or would you suggest there to be a better secure way of organising instances, such as the above quotes?

xx Bless xx

Question
 
evaders99
PostPosted: Thu Feb 05, 2009 8:14 pm Reply with quote

The abstraction I can find is
Code:


mysql_insert_id -> $db->sql_nextid


There is no abstraction for mysql_errno
It is returned as a part of sql_error

Code:


$err = $db->sql_error();
$errormsg = $err['message'];
$errno = $err['code'];


Hope that helps
 
pureliving
PostPosted: Thu Feb 05, 2009 8:21 pm Reply with quote

Thank you evaders, i will have a deeper look into that, and see what progress can become.

''who are we without friends a? what makes a person wise is having wise people at their side.''

Respect to All.
 
pureliving
PostPosted: Thu Feb 05, 2009 8:25 pm Reply with quote

I have to add this one for you all, as i can't resist.

I Love Raven, but most of all i love the community, because raven is what i call united.
Thanks to everyone, we are what we are today; progressing to betterment.

Keep Up Good Work Everyone.
 
pureliving
PostPosted: Fri Feb 06, 2009 10:24 am Reply with quote

Big issue i can not comprehend.
I have spent a week now trying to restructure a module i found, receiving same errors as above, but both admin and module showing blank.

I have though added all instances where $db-> i presume is required, although blank pages are still shown, i wondered would there be a fault with the global prefix, for instance, as i see no db; call in any of the globals:

for example,
Code:


global $PHP_SELF, $yp5commandline,$bid, $sitename;

or
Code:


global $PHP_SELF,$yp5commandline,$configarray; #$bgcolor1, $bgcolor2, $bgcolor3, $textcolor1, $textcolor2, $sitename;


I don't quite understand this $php_self part, or configarray, as its not something i'v seen in other modules i have analysed, would i need to alter the globals or add db; in it at all?
 
Palbin
Site Admin


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

PostPosted: Fri Feb 06, 2009 11:51 am Reply with quote

I'm not sure where these globals are coming from, but typically you would need
$db, $prefix, $user_prefix when ever you are doing DB stuff.

_________________
"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
evaders99
PostPosted: Fri Feb 06, 2009 8:07 pm Reply with quote

I don't understand what the # (pound sign) is doing. It isn't one of the comment marks used in PHP that I'm aware of.
 
Raven
PostPosted: Fri Feb 06, 2009 8:10 pm Reply with quote

evaders99, I think it's just a typo.
 
pureliving
PostPosted: Fri Feb 06, 2009 8:54 pm Reply with quote

I'll be honest with you the module i found is called Yellow pages, and as it seems above there to be confusion, just as i thought myself.

The scripts themself, do seem quite different from what i usual see, well here's the website i got it from, although i can not exactly remember the exact extension:
Only registered users can see links on this board! Get registered or login!

I don't suppose you could find this and look into this, or would you like me to email you the download, if so PM me please, as your analysis would sincerely help me and others once posted as a raven module, if allowed.

Your time is much appreciated.

xx Bless xx
 
pureliving
PostPosted: Sat Feb 07, 2009 3:13 pm Reply with quote

Raven and Guardian i have PM u, whereas if others in the topic would like to take an analysis for yourself, please PM your email address, i therefore can forward you the module.

This is very much appreciated and any help of solutions would be highly sent with much gratitude.

xx Bless xx


Last edited by pureliving on Sat Feb 07, 2009 4:07 pm; edited 1 time in total 
Raven
PostPosted: Sat Feb 07, 2009 3:32 pm Reply with quote

pureliving, I have deleted the code you posted because it exceeds the maximum allowed and got truncated anyway. Our practice is to post a link to the code with a .txt extension. Then anyone who needs it can just d/l it from your site or wherever you direct it. Thanks! (Just edit you above post and add the link)
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Sat Feb 07, 2009 3:47 pm Reply with quote

Thats a commercial script which is extremely old and didn't work for me when I tried it several years ago, so I'm not convinced fixing the SQL problems will even leave you with a usable script.
If you post a link to the txt file though as Raven suggested, I'll take a look for you though.
 
View user's profile Send private message Send e-mail
pureliving
PostPosted: Sun Feb 08, 2009 9:23 am Reply with quote

Still a blank issue with admin, but module under site navigation is working, for another module i am testing upon.

At first both module and admin were blank, i then added all $db-> to the sql_query within all files, and changed the $dbi global; with success the module now works, but admin does not. Why? is still in question for me, so i wondered if anyone could advise me, would there be a better way of writing the following, that would possibly include the db call.

For instance,

Quote:

$unval_count = mysql_result($count_result,0,0);

or

$num_rows_per_order = mysql_result($count_result,0,0);


would i just take out 'my' and include $db-> as i original thought this would work without change, but as the admin still does not work, i am presuming these calls may require modification also.

your i advise i would really appreciate.

xx Bless xx
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

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 ©