Server error! Error 500

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sinkingfish
Forum Newbie
Posts: 4
Joined: Fri Jun 29, 2007 3:07 am

Server error! Error 500

Post by sinkingfish »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Could anyone shed some light on this, I'm going to be posting a textarea back to an SQL update to a MS SQL DB. I'm falling at this hurdel though.

The textare is populated from a text field in the database, and im attempting to call the same page when the user submits. When i try and submit using "post" i get this server 500 error, but when i use "get" it works with the string concatenated onto the url. Does anyone have any ideas?

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>First Edit Attempt</title>
</head>

<body>

<p>
  <?php include('dbconn.inc.php'); ?>
</p>
<p>&nbsp;</p>

<?php

	$query = "select * from projects where projectid = 1";
	$result = mssql_query($query);
	$numRows = mssql_num_rows($result);
	
	while ($row = mssql_fetch_array($result))
	{
			$projectdescription = $row["projectdescription"];
	?>
	
<form id="myForm" name="myForm" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
  <label>Project Description
  <textarea name="textarea" cols="50" rows="10"><?php echo $projectdescription?></textarea>
  </label>
  <p>
    <label>
    <input type="submit" name="Submit" value="Submit Changes" />
    </label>
  </p>
  <p>&nbsp;</p>
</form>
<?php
}
?>
<p>&nbsp; </p>
<?php
mssql_close($dbhandle);	
?>
</body>
</html>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

What webserver do you use? IIS, Apache, ... ?
sinkingfish
Forum Newbie
Posts: 4
Joined: Fri Jun 29, 2007 3:07 am

Post by sinkingfish »

apache,

I'm testing locally on windows xp pro with xampp installed.

Thanks
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Is there something in the file logs/error.log that might related to the problem?
sinkingfish
Forum Newbie
Posts: 4
Joined: Fri Jun 29, 2007 3:07 am

Post by sinkingfish »

these are the errors from the last 2 days

[Thu Jun 28 12:01:01 2007] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Thu Jun 28 12:01:01 2007] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Thu Jun 28 12:01:02 2007] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Thu Jun 28 12:01:02 2007] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Thu Jun 28 12:01:12 2007] [notice] Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.2 configured -- resuming normal operations
[Thu Jun 28 12:01:12 2007] [notice] Server built: Mar 5 2007 11:23:00
[Thu Jun 28 12:01:12 2007] [notice] Parent: Created child process 720
[Thu Jun 28 12:01:14 2007] [notice] Child 720: Child process is running
[Thu Jun 28 12:01:14 2007] [notice] Child 720: Acquired the start mutex.
[Thu Jun 28 12:01:14 2007] [notice] Child 720: Starting 250 worker threads.
[Thu Jun 28 12:01:14 2007] [notice] Child 720: Starting thread to listen on port 443.
[Thu Jun 28 12:01:14 2007] [notice] Child 720: Starting thread to listen on port 80.
[Thu Jun 28 15:54:16 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 15:55:22 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 15:57:15 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 15:57:53 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 15:59:16 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 16:00:02 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 16:00:37 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 16:03:58 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 16:05:45 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Thu Jun 28 16:05:49 2007] [error] [client 127.0.0.1] File does not exist: C:/xampp/webdav/phpTest/editProjects.php&p=1
[Thu Jun 28 16:05:50 2007] [error] [client 127.0.0.1] File does not exist: C:/xampp/webdav/phpTest/editProjects.php&p=1
[Thu Jun 28 16:06:05 2007] [error] [client 127.0.0.1] File does not exist: C:/xampp/webdav/phpTest/editProjects.php&p=1
[Fri Jun 29 08:42:36 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Fri Jun 29 08:52:38 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Fri Jun 29 08:55:40 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects2.php
[Fri Jun 29 09:03:15 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects.php
[Fri Jun 29 09:18:31 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects2.php
[Fri Jun 29 09:23:23 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects2.php
[Fri Jun 29 09:24:07 2007] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : Could not open password file: C:/xampp/security/htpasswd.webdav, referer: http://localhost/webdav/phpTest/editProjects2.php
sinkingfish
Forum Newbie
Posts: 4
Joined: Fri Jun 29, 2007 3:07 am

Post by sinkingfish »

sorry its ok, i figured it out.

For some reason i thought that my php files went into the webdav folder but the localhost root is htdocs...


Maybe this help someone in the future.
phpRookie87
Forum Newbie
Posts: 1
Joined: Sun Aug 26, 2007 6:28 pm

Post by phpRookie87 »

Had the same problem sinkingfish, and I have spent many hours trying to figure out what I was doing wrong. Thanks for finally pointing out the obvious to me!
Post Reply