View previous topic :: View next topic |
Author |
Message |
npshmear -
Joined: 07 Sep 2006 Posts: 2 Location: Florida
|
Posted: Thu Sep 07, 2006 7:10 pm Post subject: MySQL / Abyss Server Problems (Error 405) |
|
|
Hi, Sorry for this post if it has already been posted, I did look through every single post that had "MySQL" in them and found no resolution.
I have recently downloaded the newest versions of EVERYTHING Here's what I'm using:
mysql-5.0.24-win32 (MySQL Server 5.0)
Abyss Web Server X1 (version 2.3.2)
I also have Visual Studio 2005 Team Suite installed with SQLExpress, but this has not, at least to my knowledge, been the problem.
My problem is, I have the abyss web server running, pointing to a host directory for my webpage. The webpage is written in HTML/PHP. I'm assuming I have the latest PHP script because I've yet to have a problem when compiling or running any page on previous web servers (WAMP, if you're familiar). Everything ran perfectly before.
When I try to link to my database (Write/Read etc) to any data tables I receive an error that looks like this:
******************
Error 405
Method Not Allowed
******************
Now, I know everything is perfectly written, my MySQL server is running (I can see this by using Navicat (latest version). I am able to edit tables manually. I've used Wamp with NO CHANGES to my webpage files, and everything ran successfully. The problem comes when I use Abyss.
I've made sure to uninstall WAMP and EVERYTHING completely. I've reloaded software after fresh restarts. Everything SHOULD be running normally, but I feel that I need to UNBLOCK access to my database, but I am UNSURE how. Please help.
Brandon |
|
Back to top |
|
|
Tim1681 -
Joined: 17 Jan 2005 Posts: 160 Location: Bristol, CT, USA
|
Posted: Thu Sep 07, 2006 7:46 pm Post subject: |
|
|
this is usually caused by a POST method
1.) by any chance in your code for when you connect to MySQL do you have:
?
If so, change it to:
and see what happens.
2.) Make sure your database is set to read/write.
3.) Make sure you're not POSTing to a static page
4.) Make sure the page you're calling is recognized by the webserver as a 'non-static' page (MIME type).
5.) Make sure you're posting to an actual file and not a directory _________________ mysql> SELECT * FROM users WHERE clue > 0;
0 rows returned.
|
|
Back to top |
|
|
npshmear -
Joined: 07 Sep 2006 Posts: 2 Location: Florida
|
Posted: Thu Sep 07, 2006 7:53 pm Post subject: |
|
|
Hey all, Who've read and replied. I figured out the problem. I had installed the PHP correctly but I hadn't set Abyss to USE the php, basically what answered my problem was this link right here:
http://www.aprelium.com/abyssws/php.html
This allowed me to link my PHP5 to the Abyss Webserver allowing all my script to run (espically the script that read/write from MySQL Databases)
Thanks guys, but I've found the answer after hours of searching!
Brandon |
|
Back to top |
|
|
Dale2507 -
Joined: 24 Feb 2007 Posts: 3
|
Posted: Sat Feb 24, 2007 2:25 pm Post subject: Error 405 |
|
|
i've downloaded the php5 and installed it and when data is entered and submit is clicked it comes up with error 405 method not allowed. I am using 4 files to create a user account.
form.php code:
<table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form1" method="post" action="create.php">
<table width="100%" border="0" cellspacing="4" cellpadding="0">
<tr>
<td colspan="3"><strong>Create account</strong></td>
</tr>
<tr>
<td width="76">Username</td>
<td width="3">:</td>
<td width="305"><input name="username" type="text" id="username" size="30"></td>
</tr>
<tr>
<td>Firstname</td>
<td>:</td>
<td><input name="firstname" type="text" id="firstname" size="30"></td>
</tr>
<tr>
<td>Lastname</td>
<td>:</td>
<td><input name="lastname" type="text" id="lastname" size="30"></td>
</tr>
<tr>
<td>Nickname</td>
<td>:</td>
<td><input name="nickname" type="text" id="nickname" size="30"></td>
</tr>
<tr>
<td>password</td>
<td>:</td>
<td><input name="password" type="password" id="password" size="30"></td>
</tr>
<tr>
<td>E-mail</td>
<td>:</td>
<td><input name="email" type="text" id="email" size="30"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset"></td>
</tr>
</table>
</form></td>
</tr>
</table>
create.php code:
<?
include('config.php');
// table name
$tbl_name="confirm_users";
// Random confirmation code
$confirm_code=md5(uniqid(rand()));
// values sent from form
$username=$_POST['username'];
$email=$_POST['email'];
$password=$_POST['password'];
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$nickname=$_POST['nickname'];
$encrypt_mypassword=md5($mypassword);
// Insert data into database
$sql="INSERT INTO $tbl_name(confirm_code, username, password, email, firstname, lastname, nickname)VALUES('$confirm_code', '$username', '$encrypt_mypassword', '$email', '$firstname', '$lastname', '$nickname')";
$result=mysql_query($sql);
// if suceesfully inserted data into database, send confirmation link to email
if($result){
// ---------------- SEND MAIL FORM ----------------
// send e-mail to ...
$to=$email;
// Your subject
$subject="Email confirmation";
// From
$header="from: Dale Edwards <Dale2507@localhost>";
// Your message
$message="Your Comfirmation link \r\n";
$message.="Click on this link to activate your account \r\n";
$message.="http://dale2507.my-php.com/Pages/Restricted/Create/confirm.php?passkey=$confirm_code";
// send email
$sentmail = mail($to,$subject,$message,$header);
}
// if not found
else {
echo "Not found your email in our database. ";
}
// if your email succesfully sent
if($sentmail){
echo "Your Confirmation link Has Been Sent To Your Email Address. ";
}
else {
echo "Cannot send confirmation link to your e-mail address. ";
}
?>
Confirm.php code:
<?
include('config.php');
// Passkey that got from link
$passkey=$_GET['passkey'];
$tbl_name1="confirm_users";
// Retrieve data from table where row that match this passkey
$sql1="SELECT * FROM $tbl_name1 WHERE confirm_code ='$passkey'";
$result1=mysql_query($sql1);
// If successfully queried
if($result1){
// Count how many row has this passkey
$count=mysql_num_rows($result1);
// if found this passkey in our database, retrieve data from table "temp_members_db"
if($count==1){
$rows=mysql_fetch_array($result1);
$username=$rows['username'];
$email=$rows['email'];
$password=$rows['password'];
$firstname=$rows['firstname'];
$lastname=$rows['lastname'];
$nickname=$rows['nickname'];
$tbl_name2="Users";
// Insert data that retrieves from "confirm_users" into table "Users"
$sql2="INSERT INTO $tbl_name2(username, password, email, firstname, lastname, nickname)VALUES('$username', '$password', '$email', '$firstname', '$lastname', '$nickname')";
$result2=mysql_query($sql2);
}
// if not found passkey, display message "Wrong Confirmation code"
else {
echo "Confirmation code not found";
}
// if successfully moved data from table"temp_members_db" to table "registered_members" displays message "Your account has been activated" and don't forget to delete confirmation code from table "temp_members_db"
if($result2){
echo "Your account has been activated";
// Delete information of this user from table "temp_members_db" that has this passkey
$sql3="DELETE FROM $tbl_name1 WHERE confirm_code = '$passkey'";
$result3=mysql_query($sql3);
}
}
?>
and config.php code:
<?
$host="sql1.my-php.net"; // Host name
$username="my_320240"; // Mysql username
$password="(deleted for obvious reasons)"; // Mysql password
$db_name="my_320240_DB"; // Database name
//Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect to server");
mysql_select_db("$db_name")or die("cannot select DB");
?>
please can someone help me with this _________________ Dale |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Feb 26, 2007 3:12 pm Post subject: Re: Error 405 |
|
|
Dale2507,
Error 405 means that you are submitting data to a page that is not recognized as a script by the server. Have you installed PHP support correctly as described in http://www.aprelium.com/abyssws/php5win.html ? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|