Errors

Am trying to connect a web form to a mysql database created in cpanel but have the following errors:

Warning: include(config.inc.php) [function.include]: failed to open stream: No such file or directory in /home/warranty/public_html/database/processor.php on line 7

Warning: include(config.inc.php) [function.include]: failed to open stream: No such file or directory in /home/warranty/public_html/database/processor.php on line 7

Warning: include() [function.include]: Failed opening ‘config.inc.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/warranty/public_html/database/processor.php on line 7

Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘warranty’@‘localhost’ (using password: NO) in /home/warranty/public_html/database/processor.php on line 8
Could not connect to database: Access denied for user ‘warranty’@‘localhost’ (using password: NO)

Any help would be gratefully recieved for a newbie

As it is stated in the warning message, program can not locate file config.inc.php
Make sure this file is uploaded to the appropriate directory (check file processor.php line #7 to find out path to config.inc.php)

Thanks

Where can I find this file I cant seem to see it in cpanel

Thanks

Are you using cPanel’s File manager? You need to locate this file first:
/home/warranty/public_html/database/processor.php

Then, open it in text editor, and check what is the path to the file config.inc.php at line #7.

<?php $file_db=1; is all that in the config.php file I have redone a database http://warrantyregistration-bomag.co.uk/test/form.html I have a new error [b]Warning[/b]: mysql_connect() [function.mysql-connect]: Access denied for user 'warranty'@'localhost' (using password: NO) in [b]/home/warranty/public_html/test/processor.php[/b] on line [b]6[/b] Could not connect to database: Access denied for user 'warranty'@'localhost' (using password: NO)

I think your config file is corrupted, try to re-upload it again. At least there must be closing php tag ?>
(but probably also database settings i.e. db name, user name, host, password)

[ul][li] Hosting company says the following

You have to create your database connection string

How do I do that[/li][/ul]

You need to check your config file, to make sure it contain correct database info (db name, user name, password and host).
Is this open source script, or custom programming?

Hi

The form is created with PHP form creator and the database from the cpanel my mysql from my hosting co

Thanks for your help

So, did you check the content of your config file? Is the database info properly set in this config file?

Sponsor our Newsletter | Privacy Policy | Terms of Service