| Subcribe via RSS

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]:

March 2nd, 2008 | No Comments | Posted in anything under the moonlight, php by dreamluverz

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user ‘apache’@'localhost’ (using password: NO)…



I’m having that error for using mysql_real_escape_string in one of my functions. Checked php manual and it says u need to have mysql connection to use that. :P well.. my bad…coz I’m using it in a variable before putting in a query. This is an example on how to use it anyway…


// Connect
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
OR die(mysql_error());

// Query
$query = sprintf(”SELECT * FROM users WHERE user=’%s’ AND password=’%s’”,
mysql_real_escape_string($user),
mysql_real_escape_string($password));
?>

Tags: , , ,

[function.getimagesize]:could not make seekable

February 21st, 2008 | No Comments | Posted in php by dreamluverz


I’m getting this error using the function getimagesize: [function.getimagesize]:could not make seekable

I’ve checked the path it’s right, checked if the image existed. It was. I took a closer look on the details of getimagesize on php manual for the accepted file types and it says jpg file type and mine was jpeg. MOdified it using photoshop to jpg file type and it solved my prob :)

Tags: , , , ,