Im a newbie trying to get a simple Hello World program(Site?Page?) to work on my local machine. Im running Windows XP Pro SP1a. I installed all the IIS components available. Im editing/launching using Dreamweaver 2004 v7. The company is running their own proxy on port 80.
Well there is nothing wrong with your code. Can you view any other pages from the server? or is this the only one that comes up blank? Does the file have a .php extension?
Yes I can view normal html files. Slapping F12 in dreamweaver (preview in IE) with the following code shows the correct page. In IIS my site is "Default Web Site". Under properties, Web Site Identificaton, IP Address "All Unassigned" is selected. No pages are served at all if my IP Address (10.12.2.128) is selected
C:\Inetpub\wwwroot\mySite'blahblah.htm
The code for the page is
andre_c wrote:Are you sure that php is installed on the server?
Please excuse me while I go and try to pick up my harddrive with a magnet... *very serious blush* I thought I downloaded and installed it already. I just remembered now from your post that the download a few days ago failed. Um, *coff*.
Sorry for bothering you guys. Thanks andre_c. I'll come back if there's still a problem.
The page STILL is not displaying. Im using PHP 5.0.3. In my php.ini
cgi.force_redirect = 0 and
extension=php_mysql.dll
are the only two entries I was told to modify by the install.txt(I think) and documentation for mysql, although they were like this by default.
Relevant(I hope) services:
IIS Admin - ON
FTP Publishing - ON
ICF/ICS - OFF
IPSEC - ON
MySQL - ON
Network DDE - OFF
Network DDE DSDM - OFF
SMTP - ON
Telnet - OFF
Web Client - ON
World Wide Web Publishing - ON
I am getting NOTHING. What am I doing wrong? RTFM? Which *F*M?
<?php
// store.php3 - by Florian Dittmer <dittmer@gmx.net>
// Example php script to demonstrate the storing of binary files into
// an sql database. More information can be found at http://www.phpbuilder.com/
?>
<html>
<head><title>Store binary data into SQL Database</title></head>
<body>
<?php
// code that will be executed if the form has been submitted:
if ($submit) {
// connect to the database
// (you may have to adjust the hostname,username or password)
MYSQL_CONNECT("localhost","root","password");
mysql_select_db("binary_data");
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ".
"VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')");
$id= mysql_insert_id();
print "<p>This file has the following Database ID: <b>$id</b>";
MYSQL_CLOSE();
} else {
// else show the form to submit new data:
?>
<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
File Description:<br>
<input type="text" name="form_description" size="40">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<br>File to upload/store in database:<br>
<input type="file" name="form_data" size="40">
<p><input type="submit" name="submit" value="submit">
</form>
<?php
}
?>
</body>
</html>
I got the following results:
// Example php script to demonstrate the storing of binary files into // an sql database. More information can be found at http://www.phpbuilder.com/ ?>
File Description:
[textbox]
File to upload/store in database:
[textbox][button]
[button]
Yep, it was dreamweaver. I uninstallde everything and then reinstalled everything with dreamweaver being installed last and now it works. *scratch head* Dunno what went wrong or why the order matters. Anyone want to hazard a guess?