elflacodepr Posted January 9, 2009 Share Posted January 9, 2009 Hello all, I'm writing a very basic CMS script, but when it executes I get the following errors: Warning: include(/website/library/config.php) [function.include]: failed to open stream: No such file or directory in C:\Users\admin\Documents\My Folder\PortableAPPS\xampp\xampp\htdocs\website\content_add.php on line 6 Warning: include() [function.include]: Failed opening '/website/library/config.php' for inclusion (include_path='.;C:\Users\admin\Documents\My Folder\PortableAPPS\xampp\xampp\php\pear\') in C:\Users\admin\Documents\My Folder\PortableAPPS\xampp\xampp\htdocs\website\content_add.php on line 6 Warning: include(/website/library/open.php) [function.include]: failed to open stream: No such file or directory in C:\Users\admin\Documents\My Folder\PortableAPPS\xampp\xampp\htdocs\website\content_add.php on line 7 Warning: include() [function.include]: Failed opening '/website/library/open.php' for inclusion (include_path='.;C:\Users\admin\Documents\My Folder\PortableAPPS\xampp\xampp\php\pear\') in C:\Users\GER\Documents\My Folder\PortableAPPS\xampp\xampp\htdocs\website\content_add.php on line 7 Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Users\admin\Documents\My Folder\PortableAPPS\xampp\xampp\htdocs\website\content_add.php on line 17 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\Users\admin\Documents\My Folder\PortableAPPS\xampp\xampp\htdocs\website\content_add.php on line 17 Access denied for user 'ODBC'@'localhost' (using password: NO) I've tried all kind of ways, such as direct link to file and nothing can be fixed! I also noted that this happens with all applications I write. ??? This is the script: <?php if(isset($_POST['save'])) { include '/website/library/config.php'; include '/website/library/open.php'; //Blog title and content $title = $_POST['title']; $content = $_POST['content']; $read_more = $_POST['read_more']; //Writing content and title to DB $sql = "INSERT INTO content (title, read_more, content, date_time) VALUES ('.$title', '.$read_more', '.$content', now())" or die(mysql_error()); $query = mysql_query($sql) or die(mysql_error()); include '/website/library/closedb.php'; } ?> <html> <body> <form method="post"> <table width="700" border="0" cellpadding="2" cellspacing="1" align="center"> <tr> <td width="100">Title</td> <td><input name="word" type="text"></td> </tr> <tr> <td width="100">Read More</td> <td><input name="read_more" type="text"></td> <tr> </tr> <tr> <td width="100">Content</td> <td><input name="content" type="text"></td> </tr> <tr> <td colspan="2" align="center"><input name="save" type="submit" value="Add!"></td> </tr> </table> </form> </body> </html> Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/140220-solved-include-error-when-script-executes/ Share on other sites More sharing options...
nuttycoder Posted January 9, 2009 Share Posted January 9, 2009 Warning: include(/website/library/config.php) [function.include]: failed to open stream: No such file or directory in C:\Users\admin\Documents\My Folder\PortableAPPS\xampp\xampp\htdocs\website\content_add.php on line 6 this means the config file cannot be found check your paths to the file. Link to comment https://forums.phpfreaks.com/topic/140220-solved-include-error-when-script-executes/#findComment-733703 Share on other sites More sharing options...
elflacodepr Posted January 9, 2009 Author Share Posted January 9, 2009 the files are all in place, thanks for help anyways I just found and error in the files that open and manage DB Link to comment https://forums.phpfreaks.com/topic/140220-solved-include-error-when-script-executes/#findComment-733705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.