Jump to content

madmoose

Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by madmoose

  1. I'm interested. I only meant do we still pass tickets through your regular help desk when something goes wrong?
  2. What degree of tech service is offered to semi-managed servers?
  3. I'm interested. A couple questions... Managed or unmanaged? Will moving my sites mean propagating a new IP? If so, does this mean reinstalling SSL certs? Fee? I have some custom server configurations on my current accounts. Can I keep them on the new server? Who will move my sites? The deal says no setup fee, but the order form asks for $99 1st month Thank you for your attention.
  4. Here is an interesting entry to my logs that have shown up regularly as of late: http://localhost/~luki/D1-XMB.php another entry: 194.165.130.93/~luki/D1-XMB.php (IP points to RIPE Network Coordination Centre in Amsterdam) Is this actually an account named luki on server 21 trying to run a script on my account?
  5. If SSL certs must be installed by TCH, why is there a control panel for this in my user cpanel? What is this for if not to generate SCRs and install SSL certs as it appears?
  6. Woke this morning to find someone testing one of my forms, I suppose for injection weaknesses, but not using any characters I'm blocking. What do you suppose they are looking for when they send a form with this content... Name: ª?¥<= E-mail: bom@hotmail.com IP Address: 61.152.169.27 Comments: Œ“?«Ã·<pi>©<a href=http://www.xxxxxxx.com>?˜¿‡“«±Ìª?¥<=</a>°£ Note: I altered the URL as it pointed to a zip file. I have done a decent job of blocking line returns and other false header info. What purpose may it serve spammers to send these characters through a form?
  7. Does TCH allow users to install their own 3rd party SSL certs? Are there instructions posted anywhere for doing so?
  8. I have a resellers account and have seen the setup for skeleton directories in the WHM, but I only want the skeleton setting to apply to the subdomains of one specific domain. Any ideas?
  9. Is it possible to setup a skeleton dir (with a specified set of files) from cpanel that will populate new subdomain dirs as they are created?
  10. No I have not installed anything and it appears to have happened on all my hosted accounts. I will start a ticket in the morning. Thanks, BC
  11. why did a new database named test_bd just appear in all my accounts? I notice it does not appear in the cpanel and therefore can't be deleated. BC
  12. The reason the "empty" folders can't be thrown away is because it still contains an invisible file named "icon" which the server says isn't even there. It seems I create this icon by uploading directories with dependent files to the server rather than creating the directory and then uploading its contents secondarily. This is not convenient procedure for managing large sites yet irritating to dismiss this extra step and then be stuck with dirs that fill up the trash and can't be deleted. I'd like to know how to avoid this icon file from the start. BC
  13. I am trying to use a mailform to send an image from a webpage to the viewer. In most cases this works fine... 100% to web based email accounts and 50% to POP mail accounts on Mac and PC. In the cases that fail, the mail arrives but the images is displayed simply as code in the body of the mail. I am unsure why sometimes it works and sometimes not (all testing the same image files). Here are the 2 pages of code I am using. Does anyone see something wrong that I have missed? Thanks for any suggesstions BC form.php (only sensitive server info has been altered): <? if(isset($_POST['Submit'])) { $guestemail = $_POST['guestemail']; if ($guestemail <> "") { include("mail_attach.php"); $filename="/home/username/public_html/images/img.jpg"; $fh=fopen($filename,"r"); $data=fread($fh,filesize($filename)); mail_attach($guestemail,$mymail,$subject,"Here is the photo you requested.\n","img.jpg",$data,3,"application/octet-stream", "$headers"); ?> <p><font color="#0000CC"><i><b>Image Sent.</b></i></font></p> <? } else { ?> <p><font color="#FF0000"><b><i>Could not send image.</i></b></font></p> <? } } ?> <form name="mailpic" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <p>Enter your E-mail: <input type="text" name="guestemail" size="20"> <input type="submit" name="Submit" value="Send"> </p> </form> mail_attach.php: <? function mail_attach($to,$from,$subject,$body,$fname,$data, $priority=3,$type="Application/Octet-Stream") { $mime_boundary = "<<<:" . md5(uniqid(mt_rand(), 1)); $fdata = chunk_split(base64_encode($data)); $headers .= "From: $from\r\n"; $headers .= "To: $to\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "X-Priority: $priority\r\n"; $headers .= "Content-Type: multipart/mixed;\r\n"; $headers .= " boundary=\"" . $mime_boundary . "\"\r\n"; $mime = "This is a multi-part message in MIME format.\r\n"; $mime .= "\r\n"; $mime .= "--" . $mime_boundary . "\r\n"; $mime .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"; $mime .= "Content-Transfer-Encoding: 7bit\r\n"; $mime .= "\r\n"; $mime .= $body . "\r\n"; $mime .= "--" . $mime_boundary . "\r\n"; $mime .= "Content-Disposition: attachment;\r\n"; $mime .= "Content-Type: $type; name=\"$fname\"\r\n"; $mime .= "Content-Transfer-Encoding: base64\r\n\r\n"; $mime .= $fdata . "\r\n"; $mime .= "--" . $mime_boundary . "\r\n"; mail($to, $subject, $mime, $headers); } ?>
  14. How about this... Does anyone have a good (complete) script that will allow users to load image files from a html form to an upload directory AND rename the file to a very specific name as it moves to the end directory? If I use a move function to relocate the image to a directory, I need to rename the file to a very specific name as it passes through. any ideas? MM
  15. I'm on 21. Do I need to register globals? How do I do this? Thanks MM
  16. I can get them with no trouble. My problem is sending. Each script I have tried generates a T_STRING error right at the start of the script. I have hand loaded images and reflected them with no trouble, just can't seem to find a script to load them. I have only thus far been able to use a move_file script that moves the image to a perm server directory. This is fine but only valuable to me if I could find a way to rename the file with a specific name (ie. img01, img02...) as it move through to the directory. No ideas on this to date. This move script is the only one I have been able to use without receiving the STRING error: <?php $uploaddir = 'images/'; print "<pre>"; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name'])) { print "File is valid, and was successfully uploaded."; } else { print "ERROR: File transfer was NOT successful. Possible invalid file."; } ?> Thanks Raul, MM
  17. I am not having trouble viewing the image once posted to the db (i have tested this by hand loading the image from phpmyadmin). My trouble is with the sendimage script. They all are experiencing error at the very start of the script not even getting to the variables. Here is just one of several I have tried: 1. Form: <html> <body> <FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD=POST> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="300000"> Send this file: <INPUT NAME="userfile" TYPE="file"> <INPUT TYPE="submit" VALUE="Upload file"> </FORM> </body> </html> 2. Sendimage: Here is the scipt that receives the unexpacted T_STRING error. <? if (is_uploaded_file($userfile)) { copy($userfile, $HTTP_POST_FILES['userfile']['name']); } else { echo "error. File: '$userfile'."; } $filename=$HTTP_POST_FILES['userfile']['name']; $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize($filename)); fclose($fd); $escaped_contents=mysql_escape_string($contents); // Connecting, selecting database $link = mysql_connect("dbhost", "dbuser", "dbpassword") or die("Could not connect"); mysql_select_db("databasename") or die("Could not select database"); // Performing SQL query; assuming that the "image" is a BLOB field $query = "UPDATE tablename SET image='$escaped_contents' WHERE id=1"; $result = mysql_query($query) or die("Query failed"); // Closing connection mysql_close($link); ?> 3. To view the image, I am using this script successfully: <? // Connecting, selecting database $link = mysql_connect("dbhost", "dbuser", "dbpassword") or die("Could not connect"); #print "Connected successfully"; mysql_select_db("databasename") or die("Could not select database"); header(" Content-Type: image/gif"); header(" Content-Disposition: inline"); $sql = "SELECT picture FROM tablename WHERE id=1"; $result = mysql_query($sql); $row = mysql_fetch_row($result); $image = $row[0]; echo $image; ?> Thanks for the attention. MM
  18. Actually, I have several great scripts including those found at the top of your google search. The problem is that each time I attempt any one of many scripts, I receive the same unexpected T_STRING error. I cannot seem to get past it. If you have thoughts on this issue, please let me know. MM
  19. Is it possible to load images into a database from a form and then reflect it back on a view page? I have tried several script configurations taken from the php manual etc., but the all send this error message (whereas other people seem to have no trouble): Parse error: parse error, unexpected T_STRING in /home/myaccount/public_html/test/sendimage.php on line 6 Is it possible to store images in a database at TCH? Thanks MM
×
×
  • Create New...