Jump to content

Error installing DB for estore


labrat407

Recommended Posts

Hi one and all,

I am hoping that I can get some help or insight to an installation issue.

I am looking to install an older estore script on my host, and when I run the setup I get the following after entering the information for the DB and user accounts.

 

Here is the code:

<html>
<head>
<style type="text/css">
body {font-family: arial}
</style></head>

<body bgcolor='#CCCCFF'>

<?php


$title="<?php \n //This page contains the database settings for your website \n";
$file = fopen( "includes/db.conf.php", "w" );
fwrite( $file, $title );
$setings="$" ."db_username='" .$_POST['username'] ."';\n";
$setings.="$" ."db_password='" .$_POST['password'] ."';\n";
$setings.="$" ."db_server='localhost';\n";
$setings.="$" ."db_type='mysql';\n";
$setings.="$" ."db_db='" .$_POST['database'] ."';\n";
$setings.="$" ."admin='" .$_POST['adusername'] ."';\n";
$setings.="$" ."adpass='" .$_POST['adpassword'] ."';\n";

fwrite( $file, $setings );
fwrite( $file, "?>" );

print "Database parameters set.  Press Continue <br><br>";

echo "<form action='dbsetup.php' method=post>";
echo "<input type='hidden' name='username' value='$_POST[adusername]'>";
echo "<input type='hidden' name='password' value='$_POST[adpassword]'>";
echo "<input type='submit' name='submit' value='Continue'>";
?>

</body>
</html>

 

And the errors that come up:

 

 

 

Warning: fopen(includes/db.conf.php) [function.fopen]: failed to open stream: Permission denied in /home/xxx/public_html/xxx.com/dbsettings.php on line 13

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/xxx/public_html/xxx.com/dbsettings.php on line 14

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/xxx/public_html/xxx.com/dbsettings.php on line 23

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/xxx/public_html/xxx.com/dbsettings.php on line 24

Database parameters set. Press Continue

 

My host is up to date on PHP and SQL Etc., But I am not sure if the code needs to be updated. I have a little code knowledge mostly simple web design tweaking. I am willing to learn but not sure where to start diagnosing the issue.

Any help would be appreciated.

Thanks

Link to comment
Share on other sites

Hi one and all,

I am hoping that I can get some help or insight to an installation issue.

I am looking to install an older estore script on my host, and when I run the setup I get the following after entering the information for the DB and user accounts.

 

Here is the code:

<html>
<head>
<style type="text/css">
body {font-family: arial}
</style></head>

<body bgcolor='#CCCCFF'>

<?php


$title="<?php \n //This page contains the database settings for your website \n";
$file = fopen( "includes/db.conf.php", "w" );
fwrite( $file, $title );
$setings="$" ."db_username='" .$_POST['username'] ."';\n";
$setings.="$" ."db_password='" .$_POST['password'] ."';\n";
$setings.="$" ."db_server='localhost';\n";
$setings.="$" ."db_type='mysql';\n";
$setings.="$" ."db_db='" .$_POST['database'] ."';\n";
$setings.="$" ."admin='" .$_POST['adusername'] ."';\n";
$setings.="$" ."adpass='" .$_POST['adpassword'] ."';\n";

fwrite( $file, $setings );
fwrite( $file, "?>" );

print "Database parameters set.  Press Continue <br><br>";

echo "<form action='dbsetup.php' method=post>";
echo "<input type='hidden' name='username' value='$_POST[adusername]'>";
echo "<input type='hidden' name='password' value='$_POST[adpassword]'>";
echo "<input type='submit' name='submit' value='Continue'>";
?>

</body>
</html>

 

And the errors that come up:

 

 

 

Warning: fopen(includes/db.conf.php) [function.fopen]: failed to open stream: Permission denied in /home/xxx/public_html/xxx.com/dbsettings.php on line 13

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/xxx/public_html/xxx.com/dbsettings.php on line 14

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/xxx/public_html/xxx.com/dbsettings.php on line 23

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/xxx/public_html/xxx.com/dbsettings.php on line 24

Database parameters set. Press Continue

 

My host is up to date on PHP and SQL Etc., But I am not sure if the code needs to be updated. I have a little code knowledge mostly simple web design tweaking. I am willing to learn but not sure where to start diagnosing the issue.

Any help would be appreciated.

Thanks

 

HI , you need to set the write permission to that file db.conf.php. On your ftp client, right click and change permission to 666.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.