I am trying to run a php project on UBuntu . It has an install script which creates the mysql database. When i try to run the script i am getting the following errors:
Warning: fopen(dbinfo.php): failed to open stream: Permission denied in /opt/lampp/htdocs/project/install.php on line 12
Warning: fwrite() expects parameter 1 to be resource, boolean given in /opt/lampp/htdocs/project/install.php on line 19
Warning: fclose() expects parameter 1 to be resource, boolean given in /opt/lampp/htdocs/project/install.php on line 20
Warning: include(dbinfo.php): failed to open stream: No such file or directory in /opt/lampp/htdocs/project/install.php on line 21
Warning: include(): Failed opening 'dbinfo.php' for inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/project/install.php on line 21
Notice: Undefined variable: host in /opt/lampp/htdocs/project/install.php on line 23
Notice: Undefined variable: user in /opt/lampp/htdocs/project/install.php on line 23
Notice: Undefined variable: password in /opt/lampp/htdocs/project/install.php on line 23
Notice: Undefined variable: database in /opt/lampp/htdocs/project/install.php on line 25
Notice: Undefined variable: database in /opt/lampp/htdocs/project/install.php on line 26
Error connecting to database.
I know these errors are due to Permission denial.But i don't know how to resolve this.It seems the script does not have permission to edit or create a databse.I am new to Ubuntu and cannot get a stand of the problem.Sorry for the bad english.