Mchl
-
Posts
8,466 -
Joined
-
Last visited
Posts posted by Mchl
-
-
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
-
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).
-
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.
-
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'; }
-
This is pretty much what BBCode tutorial would cover with the small addition that contents of
tags should be passed to highlight_string() function
-
-
I've never come across something like this :/
-
Hi,thanks
I know some play more often because i refreshed the page many times to see the results and out of a bank of about 25 videos, the same 3 re-played over way too many times, bad random.
Sorry,but until you actually have measured that over several hundreds page loads, I'll remain unconvinced.
-
Do you get this every time, or only once in a while?
-
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?
-
Would this do the same?
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)
-
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.
-
Unless your DBA tells you otherwise, don't use it.
-
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.
-
1. compare both php.ini files.
2. post actual error messages
-
MD5
in MySQL Help
No problem.
Take special attention to mysql_real_escape_string function. It's there to protect you against SQL injections. Learn how to use it, and use it.
-
MD5
in MySQL Help
Did I tell you to use $_POST['mypassword']? I guess not. The field in your form has name="password" so you need to use $_POST['password']
<?php //connct to database... $password = md5($_POST['password']); $username = mysql_real_escape_string($_POST['username']); $email= mysql_real_escape_string($_POST['email']); mysql_query("INSERT INTO members (username, password, email) VALUES ('$username', '$password', '$email')");
-
MD5
in MySQL Help
[edit]
Gah... too sleepy
$wagwoord = md5("password"); //this is what I added
should be
$wagwoord = md5($_POST['password']); //this is what I added
also make sure a field in database is able to store at least 32 characters (that's how long MD5 hashes are)
-
-
Which version of Windows is that?
Do you have administrative privileges?
Did you delete all XAMPP folders before installing WampServer?
Is WampServer's icon in system tray white or yellow/red?
If it's yellow - are you using Skype?
-
There are two things wrong with this query.
1. Something is wrong before FROM messages ... - maybe a column missing, or an extra comma (,).
2. Should be WHERE id IS NULL
-
One thing PHP lacks is a formal specification of the language. There only is a Zend's implementation, which must be taken as a point of reference by anyone who would like to create their own interpreter. Since this implementation in turns hasn't got a roadmap, or a set of goals to achieve, it's always a moving target.
-
Also PHP-MSSQL, PHP-Postgres, PHP-Oracle, PHP-SQLite...
No... I can't really see it coming.
Just try to decide, if the issue is more on scripting side, or on database side. As a rule of thumb, if your question concerns PHP code, you should ask it in PHP section (even if there's also MySQL involved)
-
You might have been thinking about transactions (available for InnoDB engine), where you can execute a query, but need to COMMIT it if you want the changes to actually take place, or can ROLLBACK it when something's not right.
http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-transactions.html
any idea on whats going wrong calling this property?
in PHP Coding Help
Posted
There is no $u_name property in this object.
Maybe you want something like this: