| Subcribe via RSS


[function.main]: failed to open stream: Permission denied

March 4th, 2008 | No Comments | Posted in php by dreamluverz

Warning: … [function.main]: failed to open stream: Permission denied





Warning: main() [function.include]: Failed opening … for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in …

I wanna bear in mind that this error has something to do with file permission coz at first glance I just checked the path of the included file but looking closely it has something to do with the file permission. Changing it to 755 solved the issue. :P

And one more thing, I had this error_reporting(E_ALL && ~NOTICES); on my script and can’t see why my included file is not functioning. I’ve been looking what could be the error. Commented this error_reporting(E_ALL && ~NOTICES); kuala!!! I found the Warning msg! :P so be sure to comment this line when debugging your code or else you’ll get crazy looking for the error :P

Tags: , , ,

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: , , ,