Jump to content

Mchl

Staff Alumni
  • Posts

    8,466
  • Joined

  • Last visited

About Mchl

  • Birthday 03/11/1982

Contact Methods

  • Website URL
    http://www.flingbits.com

Profile Information

  • Gender
    Male
  • Location
    High Memory Area

Mchl's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. There is no $u_name property in this object. Maybe you want something like this: class register{ //Setting up Variables, you can add more, for example EMAIL. private $_username; private $_password; //Giving the variables values function __construct($u_name, $p_word) { $this->_username = $u_name; $this->_password = $p_word; } public function getUsername() { return $this->_username; } } //then echo $reg->getUsername();
  2. key_buffer_size = 64M Start by increasing that to 512MB-1024M, see what's the effect on your performance (might improve database, but impact negatively on other services) table_cache = 100M ???? do you have 100 million tables in your databse? http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_table_cache key_buffer = 16M what's that? documentation doesn't mention such variable sort_buffer_size See here for some tips: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_sort_buffer_size read_buffer_size Again, this is something you must consider yourself http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_net_buffer_length myisam_sort_buffer_size This is only used when creating/altering or repairing tables (table indexes specifically). Shoudln't affect normal operation Also consider enabling query cache http://dev.mysql.com/doc/refman/5.1/en/query-cache-configuration.html
  3. We've had issues with OpenID before. When logged in through OpenID I was not logged in on main site (and could not log in there).
  4. Ad 2) How difficult would it be to set up non-public clone of the site? It could use same database, but have separate application files.
  5. Use date function to get current hour. Then you can use different banner when hout is between 6PM and 6AM (night) and different when it's between 6AM and 6PM <?php $h = date('H'); if($h >= 6 && $h < 18) { echo 'display daytime banner'; } else { echo 'display nighttime banner'; }
  6. This is pretty much what BBCode tutorial would cover with the small addition that contents of tags should be passed to highlight_string() function
  7. Sorry,but until you actually have measured that over several hundreds page loads, I'll remain unconvinced.
  8. First of all, how do you know some videos are chosen more often than others? Do you have something that counts that and analyzes the frequncies?
  9. Not really. More like this: class myMySQLiAccess extends mysqli { public function __construct($host = null, $username = null, $passwd = null, $dbname = null, $port = null, $socket = null) { parent::__construct($host, $username, $passwd, $dbname, $port, $socket); } } if you want to hardcode your access credentials (not really a good idea) it would look like this class myMySQLiAccess extends mysqli { public function __construct($host = null, $username = null, $passwd = null, $dbname = null, $port = null, $socket = null) { parent::__construct('localhost', 'root', 'password', 'mydatabase'); } } $con = new myMySQLiAccess(); closing is done like this $con->close(); but in most cases you can safely let PHP close the connection for you (it does it automatically when script ends, or when the scope of $con is destroyed)
  10. When you use OO interface of mysqli you do $connection = new mysqli(..); so with more connections you do $connection1 = new mysqli(...); $connection2 = new mysqli(...); where $connection1 and $connection2 are MySQLi objects, that 'know' which connection to use.
  11. Unless your DBA tells you otherwise, don't use it.
  12. Regarding "File does not begin with '%PDF-'. issue: try opening the pdf in notepad and seeing what it starts with. It's likely a PHP's error message.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.