PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Enforcer
New Member
New Member


Joined: Aug 19, 2006
Posts: 22
Location: Timisoara, Romania

PostPosted: Sat Aug 28, 2010 7:47 am Reply with quote Back to top

Is about db.php and mysql.php

on error, db.php will put default error messages, but not in a logic way.
If it can't connect to server, is logic it can't select db and can't check config table.
Instead to see all 3 errors even there is one, I changed db.php to show exact error only.
For this class sql_db (mysql.php) was reworked, so now is called sql_connect
and distinguish between connect and select_db.

Code:
   $db = new sql_connect($dbhost, $dbuname, $dbpass, false);
   if (@!$db->db_connect_id) {
    $mysqlErrorConnectServer = true;
  }
   else {
     if (@!$db->sql_select_db($dbname)){
     $mysqlErrorConnectDb = true;
    }
  }
  if(!$mysqlErrorConnectDb) {
     if (@!$db->sql_query('SELECT Default_Theme FROM '.$prefix.'_config WHERE 1;')) {
        $mysqlErrorConfigTableMissing = true;
     }
  }


Also removed references to db name in db select error and mysql_error() from config table missing error.
I don't want to be visible to anyone in case of error.

Other fix is URL from config error, in case user input in browser URL/index.php
then result is a invalid link to install file.
So replace
Code:
<a href="http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'INSTALLATION/installSQL.php">

with
Code:
<a href="http://'.$_SERVER['HTTP_HOST'].'/'.basename(getcwd()).'/INSTALLATION/installSQL.php">


And finally I added a new file called install.php, is just allow to access installSQL.php and setup.php from same place.
Is easier to point browser to URL/install.php than to URL/INSTALLATION/installSQL.php...

Only registered users can see links on this board!
Get registered or login to the forums!


Hope it helps.
View user's profile Send private message Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 5996

PostPosted: Mon Aug 30, 2010 9:03 pm Reply with quote Back to top

Haven't had a chance to review this, but hopefully Raven can.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum