zeeshan_haider000 Posted March 15, 2009 Share Posted March 15, 2009 Hi there, For some reasons i am getting this error: Warning: getnohayreciter(config.php) [function.getnohayreciter]: failed to open stream: No such file or directory in /homepages/46/d272861742/htdocs/i.com/sitev2/functions.php on line 30 Warning: getnohayreciter() [function.include]: Failed opening 'config.php' for inclusion (include_path='.:/usr/lib/php') in /homepages/46/d272861742/htdocs/i.com/sitev2/functions.php on line 30 Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /homepages/46/d272861742/htdocs/i.com/sitev2/functions.php on line 33 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /homepages/46/d272861742/htdocs/i.com/sitev2/functions.php on line 33 Error with the query : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) And this is line 30 + 33: function GetNohayReciter($cat){ include_once('config.php'); $query = "SELECT * FROM nohay WHERE Cat='".$cat."' ORDER BY Name"; $result = mysql_query($query) or die ("<h1>Error with the query</h1>:\n".mysql_error()); What am i doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/149531-solved-failed-opening-configphp-for-inclusion/ Share on other sites More sharing options...
Cory94bailly Posted March 15, 2009 Share Posted March 15, 2009 Do you even have a config.php? If you do, make sure it's readable/executable. Don't worry about the mysql stuff for now, it's only because the mysql info is in config.php Quote Link to comment https://forums.phpfreaks.com/topic/149531-solved-failed-opening-configphp-for-inclusion/#findComment-785303 Share on other sites More sharing options...
Rodis Posted March 15, 2009 Share Posted March 15, 2009 whats your code whe know the lines now but the error isn't neceserely is in that particular line. Need more info Quote Link to comment https://forums.phpfreaks.com/topic/149531-solved-failed-opening-configphp-for-inclusion/#findComment-785313 Share on other sites More sharing options...
zeeshan_haider000 Posted March 15, 2009 Author Share Posted March 15, 2009 Nevermind guys, i found what i was doing wrong, it was some other code that wasn't right... Thanks for responses... Quote Link to comment https://forums.phpfreaks.com/topic/149531-solved-failed-opening-configphp-for-inclusion/#findComment-785415 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.