Forum Moderators: coopster
I am using cPanel and I can see no way how to do this. Of course if I look at the config.php it is empty. Can anyone tell me how to change this setting?
David
According to the description of loginwa it is very simple easy and can be set up quick. If this is true then it makes me feel dumb for having this much trouble with it! Any suggestions as to what I might be doing wrong?
Also according to the instructions that came with loginwa it is very simple and easy to install and configure but I am having a very difficult time and as far as I can tell I followed the steps but when I try to log into the admin area it will not allow me.
When I created the MySQL db I named it but it shows differently than what I named it. That is I type in "name" but it shows as "account_name" however I tried entering it both ways in the install.php but it didnt make any difference
Here are the directions:
Un-pack all files from "loginwa_v1.zip" and download them onto your FTP-Server.
-> Change the writing rights for the file "config.php" to "chmode 666"
-> Open the file "install.php" and enter your access-data to your MySQL-Server.
DB Name: Database name.
DB User: User name for the access to your MySQL database.
DB Password: Password for the access to your MySQL database.
DB Host: MySQL Hostname.
-> Site setting
Site Name: Name of your page.
The Path to loginwa_v1: Enter the host-name to the
loginwa_v1 files, e.g. "http://www.mysite.com/loginwa_v1 (but without "/" at the end).
-> Admin setting:
Username: Enter an admin-user name for the access to the admin-area.
Password: Enter the admin password for the access to the admin-area.
Email: Enter the admin email-address.
-> After having successfully installed the programm, delete the files "install.php" and
"uninstall.php" from your server.
-> Log-in to the admin-area.
Another thing is their talking about "path". Usually when I see path I think of server path /home/user (C:\something on windows systems) and so on, but not about system URL, like www.domain.name
But this is pure guessing from my side.
Database name that you should use is of type accountname_databasename.
Ok here is one entry that is in the install.php
if(empty($hostdb)){
$msg=" Error:DB Host is missing.";
$fontc=$red;
}
I am supposed to enter the host name here. But I am not sure exactly where to put it. I was putting it between the " " but I am now thinking that I was incorrect. Do you know where I am supposed to enter the info in this?
David
<?php
$msg="Please fill the following fields completely:";
$tabform=true;
$tabend=false;
$red="#ff0000";
$black="#000000";
$fontc=$black;
$chmodmsg_error="config.php is not writeable , set config.php to chmod 666 ";
$log="<a href='admin/log_in.php'>login</a>";
$filename="config.php";
if($setup){
if(empty($namedb)){
$msg="Error:DB Name is missing.";
$fontc=$red;
}
if(empty($hostdb)){
$msg=" Error:DB Host is missing.";
$fontc=$red;
}
if(empty($userdb)){
$msg="Error: DB user is missing.";
$fontc=$red;
}
if(empty($passdb)){
$msg="Error: DB password is missing.";
$fontc=$red;
}
if(empty($namesite)){
$msg="Error: Site Name is missing.";
$fontc=$red;
}
if(empty($sitepath)){
$msg="Error: The Path is missing.";
$fontc=$red;
}
if(empty($nameuser)){
$msg="Error: Admin name is missing.";
$fontc=$red;
}
if(empty($passwd)){
$msg="Error: Admin password is missing.";
$fontc=$red;
}
if(empty($aemail)){
$msg="Error: Admin Email s missing.";
$fontc=$red;
}
else if(($userdb) AND ($namedb) AND ($passdb) AND($hostdb) AND($sitepath) AND($namesite) AND($passwd) AND($aemail) AND($nameuser)){
$t_user="\$dbuser = \"$userdb\";";
$t_name= "\$dbname = \"$namedb\";";
$t_pass="\$dbpass = \"$passdb\";";
$t_host="\$dbhost = \"$hostdb\";";
$s_host="\$host = \"$sitepath\";";
$a_site="\$mysite = \"$namesite\";";
$a_email="\$adminmail = \"$aemail\";";
$a_name=$nameuser;
$a_pass=$passwd;
$begin="<?php";
$end="?>";
if(!(is_writeable($filename))){
$msg=$chmodmsg_error;
$fontc=$red;
}else{
$datei=fopen($filename,"w");
}
}
if($datei){
$save=fputs($datei,"$begin\n$t_user\n$t_name\n$t_pass\n$t_host\n$s_host\n$a_site\n$a_email\n$end\n");
}
if($save){
fclose($datei);
$tabform=false;
$tabend=true;
$SuccMsg="the variables were saved to the File config.php, now click". " Create tables "."to install the tables";
}
}
if($create){
include("connect.php");
$create_table_admin=" CREATE TABLE loginwa_admin("
."adminid int(32) NOT NULL auto_increment,"
."adminname varchar(40) NOT NULL,"
."adminpass varchar(20) NOT NULL,"
."PRIMARY KEY (adminid))";
$admin_result=mysql_query($create_table_admin);
$create_table_usr="CREATE TABLE loginwa_user("
."userid int(32) NOT NULL auto_increment,"
."username varchar(20) NOT NULL,"
."fname varchar(40) NOT NULL,"
."lname varchar(40) NOT NULL,"
."passwd varchar(20) NOT NULL,"
."email varchar(150) NOT NULL,"
."fcode bigint(20) NOT NULL,"
."nl char(3) NOT NULL,"
."adddate date NOT NULL,"
."ustatus int(3) NOT NULL,"
."PRIMARY KEY (userid))";
$usr_result=mysql_query($create_table_usr);
if(($usr_result) && ($admin_result) ){
$sql_admin=mysql_query("INSERT INTO loginwa_admin(adminid,adminname,adminpass) VALUES('','$name_admin','$passwd_admin')");
$tabform=false;
$tabend=false;
$SuccMsg="CONGRATULATION loginwa_v1 was installted on Your Server successfuly\nNow you can"."$log"." into Admin-area.";
}else{
$tabform=false;
$tabend=false;
$SuccMsg="ERROR ";
}
}
?>
<html>
<head>
<title>loginwa_v.1 installation </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Stil1 {color: #FF0000}
-->
</style>
</head>
<body>
<table width="500" cellspacing="0" cellpadding="0" align="center">
<tr>
<th width="600" height="90" align="center" valign="top" scope="col"> </th>
</tr>
<tr>
<th scope="col"><table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="#0072BC">
<tr>
<th scope="col">
<?php if($tabform){?>
<form action="<?php echo"$PHP_SELF";?>" method="post"> <table width="500">
<tr bgcolor="#0072BC">
<th colspan="2" scope="col"><font color="<?php echo"$fontc"?>"><?php echo"$msg";?></font></th>
</tr>
<tr bgcolor="#0072BC">
<th colspan="2" scope="col">Data Base setting </th>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>DB Name<span class="Stil1">*</span> : </strong></td>
<td width="350" align="left" valign="top"><input name="namedb" type="text" size="32" value="<?php echo"$namedb";?>" ></td>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>DB Host<span class="Stil1">*</span>:</strong></td>
<td width="350" align="left" valign="top"><input name="hostdb" type="text" value="localhost" size="32"></td>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>DB User<span class="Stil1">*</span> :</strong></td>
<td width="350" align="left" valign="top"><input name="userdb" type="text" size="32" value="<?php echo"$userdb";?>"></td>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>DB Password<span class="Stil1">*</span> :</strong></td>
<td width="350" align="left" valign="top"><input name="passdb" type="text" size="32" value="<?php echo"$passdb";?>" ></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr align="center" bgcolor="#0072BC">
<td colspan="2"><strong> Site setting </strong></td>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>Site Name<span class="Stil1">*</span> :</strong></td>
<td width="350" align="left" valign="top"><input name="namesite" type="text" value="mysite.com" size="32"></td>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>Path to loginwa_v1<span class="Stil1">*</span> :</strong></td>
<td width="350" align="left" valign="top"><input name="sitepath" type="text" value="http://www.mysite.com/loginwa_v1" size="32"> </td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr align="center" bgcolor="#0072BC">
<td colspan="2"><strong>Admin setting </strong></td>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>userame<span class="Stil1">*</span> :</strong></td>
<td width="350" align="left" valign="top"><input name="nameuser" type="text" size="32" value="<?php echo"$nameuser"?>"></td>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>password</strong><strong><span class="Stil1">*</span></strong>:</td>
<td width="350" align="left" valign="top"><input name="passwd" type="text" size="32" value="<?php echo"$passwd"?>"></td>
</tr>
<tr>
<td width="150" align="right" valign="top"><strong>Email<span class="Stil1">*</span>:</strong></td>
<td width="350" align="left" valign="top"><input name="aemail" type="text" value="admin@mysite.com" size="32"></td>
</tr>
<tr align="center">
<td colspan="2"><input name="setup" type="submit" value="install">
</td>
</tr>
</table>
</form>
<?php }?></th>
</tr>
</table></th>
</tr>
<tr>
<th scope="col">
<table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="#0072BC">
<tr>
<th scope="col">
<form action="<?php echo"$PHP_SELF";?>" method="post">
<input name="passwd_admin" type="hidden" value="<?php echo"$a_pass ";?>">
<input name="name_admin" type="hidden" value="<?php echo"$a_name";?>">
<table width="500">
<tr>
<th align="center" scope="col"><?php echo"$SuccMsg";?></th>
</tr>
<?php if($tabend){?>
<tr>
<td align="center"><input name="create" type="submit" value="Create Tables"></td>
</tr>
<?php }?>
</table>
</form></th>
</tr>
</table>
</th>
</tr>
</table>
</body>
</html>
-> Un-pack all files from "loginwa_v1.zip" and download them onto your FTP-Server.
-> Change the writing rights for the file "config.php" to "chmode 666"
-> Open the file "install.php" and enter your access-data to your MySQL-Server.
DB Name: Database name.
DB User: User name for the access to your MySQL database.
DB Password: Password for the access to your MySQL database.
DB Host: MySQL Hostname.
-> Site setting
Site Name: Name of your page.
The Path to loginwa_v1: Enter the host-name to the
loginwa_v1 files, e.g. "http://www.mysite.com/loginwa_v1 (but without "/" at the end).
-> Admin setting:
Username: Enter an admin-user name for the access to the admin-area.
Password: Enter the admin password for the access to the admin-area.
Email: Enter the admin email-address.
-> After having successfully installed the programm, delete the files "install.php" and
"uninstall.php" from your server.
If you are seeing this mesage "config.php is not writeable , set config.php to chmod 666" produced by these lines
if(!(is_writeable($filename))){
$msg=$chmodmsg_error;
$fontc=$red;
}else{
$datei=fopen($filename,"w");
}
then the script cannot access the file config.php.
Please check if the file really has permissions
rwxrwxrwx (777) or rw-rw-rw- (666).
Check also if the install.php and config.php are in the same folder. If not, the folders on the way to config.php should also have execute permissions.
It still says $chmodmsg_error="config.php is not writeable , set config.php to chmod 666 "; near the top of the file but I dont think that is actually an error message.
When the instructions say:
-> Change the writing rights for the file "config.php" to "chmode 666"
-> Open the file "install.php" and enter your access-data to your MySQL-Server.
DB Name: Database name.
DB User: User name for the access to your MySQL database.
DB Password: Password for the access to your MySQL database.
DB Host: MySQL Hostname.
-> Site setting
Site Name: Name of your page.
The Path to loginwa_v1: Enter the host-name to the
loginwa_v1 files, e.g. "http://www.mysite.com/loginwa_v1 (but without "/" at the end).
Where do I enter the access data in the the install.config? I think that might really be my problem. I just dont know where in the install file that I am supposed to enter the data and the instructions seem unclear on that.
Thanks again I appreciate your efforts on this!
David