Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL
  • ICQ
  • Yahoo

Profile Information

  • Location
    New York, NY

dkotchen's Achievements


Explorer (4/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges



  1. Is there something wrong with Cpanel's web interface to the crontab program? My existing cron jobs seem to have disappeared, and when I try to create a new job, it does not appear to get saved (nor does it run). By the way, I am using this format for my cron command: /usr/bin/php -q /home/myCpanelID/public_html/mySubdirectory/myFile.php Any thoughts? Thanks.
  2. Is is possible to connect to MySQL remotely using SSL?
  3. Bruce and Madmanmcp, Thanks for your excellent suggestions. xcopy and the Windows XP Backup executable are both included with the Windows XP operating system and are logical choices for doing efficient, regularly scheduled backups. I decided to write a PHP script to back up files because I need to back up files, but also because I'm trying to use PHP wherever possible these days to improve my skills (and to see what the language has to offer). What I have discovered is that PHP has a history of weakness in the character-encoding area (see, for example, what Joel Spolsky has to say). When I did not get an answer to my question about multibyte character encoding for file names at several different PHP user group forums, I contacted the PHP development team. From them, I learned that "readdir" is unable to read multibyte character encodings. The development team has gotten several requests for this feature and plans to add it in PHP 6. So for now, PHP's directory functions can only handle file names whose characters are represented in an ISO-8859-1 compatible encoding. This makes PHP unsuitable for backing up an NTFS-formatted drive, which uses UTF-16LE (2-byte) character encoding for all file names. (The exception is the special case where all files on an NTFS drive have names whose characters are included in the ISO-8859-1 repertoire; in this case, a PHP backup will work. This is because all information about each character is included in the first byte of its two-byte encoding, and the second byte is the null byte, which has no impact on the filename string in PHP. But requiring that all files have ISO-8859-1 compatible names seems unnecessarily restrictive when comprehensive backup utilities like xcopy and the Windows XP Backup executable exist.) By the way, for anyone interested in digging into the details of character encoding, Jukka Korpela has published an informative primer.
  4. I have written a PHP script that I use to back up my internal hard drive to an external hard drive. I use Windows XP, and my internal hard drive is NTFS formatted. Omitting the details, I'm basically using: $file = readdir($dir); $original = $C_drive_path.'\\'.$file; $bkup = $E_drive_path.'\\'.$file; copy($original, $bkup); The backup script works well, except when it comes across the occasional file that has Chinese characters in the file name (some of my music files). I believe file names in NTFS are UTF-16 encoded (16-bit). PHP, which is designed to work with 8-bit character data, does not handle these file names well. It interprets these file names as gibberish (mostly question marks) and generates an error message that says the file does not exist. Then, of course, it is unable to copy these files. Does anybody know of a way to have PHP read a 16-bit file name correctly and then copy the file to another drive? Thanks!
  5. Glad you got it working. Good luck with the product. It looks interesting.
  6. Dan, Only had time to look at your home page. These changes should do the trick for that page: CHANGE #1 Change this: <tr> <td width="803" height="26" colspan="2" class="PageHeader">Usenet newsreader and binary grabber for Windows 2000/XP </td> </tr> to this: <tr> <td width="781" height="26" colspan="2" class="PageHeader">Usenet newsreader and binary grabber for Windows 2000/XP</td> </tr> CHANGE(S) #2 Change this: <table width="300%" border="0" cellspacing="12" cellpadding="0"> <tr> <td class="SectionHeader">Features</td> <td>& nbsp;</td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> to this: <table align="left" border="0" cellspacing="12" cellpadding="0"> <tr> <td class="SectionHeader">Features</td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="clear: both;"> CHANGE #3 Finally, in your style sheet, add this to the bottom of your "BulletDetail" class: padding-right: 63px;
  7. In the rotator.php code, add the lines shown in red below (these lines add headers that will prevent your image from being cached): if ($img!=null) { $imageInfo = pathinfo($img); $contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ]; header ($contentType); header ("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header ("Expires: Fri, 05 Jul 2002, 05:00:00 GMT"); // date in the past readfile($img); } else { if ( function_exists('imagecreate') ) { header ("Content-type: image/png"); header ("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 header ("Expires: Fri, 05 Jul 2002, 05:00:00 GMT"); // date in the past $im = @imagecreate (100, 100) or die ("Cannot initialize new GD image stream"); $background_color = imagecolorallocate ($im, 255, 255, 255); $text_color = imagecolorallocate ($im, 0,0,0); imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color); imagepng ($im); imagedestroy($im); } }
  8. Add the red "</div>" tags where shown below: <center>site designed by <a href="http://www.blackphoebe.com/msjen" target="_blank">Jenifer Hanen</a><br> hosted by <a href="http://www.totalchoicehosting.com" target="_blank">Total Choice Hosting</a></center> </div> </div> </div> <div id="right"> <div class="sidebar"> <h2>Debutante Clothing</h2>
  9. antandsons, For some reason, you set the height of the paragraphs in your left and right columns to 17px (take a look at your style sheet). This is the immediate cause of your problem. When you use the <center> tag in Firefox, Firefox treats the text enclosed in the <center>...</center> tags as a new block-level element (the <center> tag is equivalent to <div align="center">). This new block-level element forces a paragraph break, and then Firefox places this new element just below the paragraph. But since the height of the paragraph is only 17px, the centered block-level element is placed 17px from the top of the paragraph (which is very close!), putting it right on top of some of the text of your paragraph. To make this visually clear, you can place a border around the paragraph: <p style="border: solid black 1px">. Notice that since the text of your paragraph requires more space than 17px, it blows right through the bottom of its container. A quick fix would be to replace your <center>...</center> tags with <span style="text-align: center">...</span>. Because they create an in-line element instead of a block-level element, the span tags will not force a paragraph break. The text between the span tags will remain a part of the paragraph. But you should really get rid of the statement in your style sheet that sets the height of the paragraph to 17px. By the way, the center tag was deprecated in HTML 4.01. In your document type declaration, you have declared HTML 4.01 strict. However, because you are using deprecated tags, your page will not validate as strict. If you want some insight into the details of how Firefox treats the <center> element, try this: http://www.markschenk.com/various/center-element.html. In general, you're probably better off avoiding the <center> element altogether. Hope this helps.
  10. When I try to get into Cpanel, I get the following message: "Sorry for the inconvience! The root partition on this server is running out of disk space. Cpanel operation has been temporarily suspended to prevent something bad from happening. Please ask your system admin to remove any files not in use on that partition." What's going on?!
  11. Mike, Try this: http://www.random.org/nform.html
  12. Very helpful answers here! Thank you HCSuperStores, owatagal, and David - you've saved me a lot of time and frustration!
  • Create New...