Search results

  1. M

    Basic Ruby Question

    Though Ruby on Rails isn't available, you should be able to run ruby scripts as CGI scripts on X10. Put them in ~/public_html/cgi-bin and set execute permissions via your FTP client or cPanel. Make sure to include a shebang line with the path to the ruby interpreter. Search the web or these...
  2. M

    PHP resource error #6

    You can get information about callers, including line numbers, using (e.g.) debug_backtrace or apd_callstack (the latter is part of the APD extension and may not be installed on the X10 servers). If you use PDO rather than the old mysql driver, you can use exceptions, which also record line...
  3. M

    JS/PHP Inline Page Editing.

    Someone didn't read the sig, I see. In Safari 4 and Firefox 3.6, I don't see the behavior you describe. For example, on http://ci.h0stilewarfare.co.cc/index.php/pages/view/test, I clicked the content ("Test Content :S"), which turned into a textarea. I added a paragraph, then clicked the "save"...
  4. M

    PHP mail code works on other hosts but no x10?

    I'm not sure about their mail script, but much of W3Schools is outdated or doesn't cover crucial information (such as security). See "PHP tutorial that is security-, accuracy- and maintainability-conscious?" for better suggestions.
  5. M

    PHP mail code works on other hosts but no x10?

    Note that the script has an injection vulnerability via the "email" input variable. An attacker can inject arbitrary headers. The script from the tutorial is simply using mail(). Half of the script displays a result page. There are other difficulties sending e-mail on X10 due to spammers...
  6. M

    Form in html/css positionning "search" button for an input type=file

    You simply don't have that much control over the styling of file input fields. You could try a Flash file uploader (Google for them). Always include a link to a live sample page so we don't need to create our own in order to figure out what you're talking about. Screenshots also help. The code...
  7. M

    JS/PHP Inline Page Editing.

    Do you have a link to a live page we can test? Make sure you escape page_content and page_name when adding them to a query string. Alternatively, pass an object as the "data" param and let jQuery handle the encoding: $.ajax({ type: "POST", url...
  8. M

    PHP function reference

    If you intend to display the output of mysql_error to the user, first read "Writing Error Messages for Security Features: Information Disclosure". The short version is that mysql_error should only be shown to site admins. Generally speaking, you can pass the output of functions as the input...
  9. M

    $_SESSION Problem state not changing

    Wow, sarcasm. That's original. My point is the only setting that affects the presence of the BOM is the one that mentions the BOM. Try changing it in the page properties.
  10. M

    $_SESSION Problem state not changing

    Unicode normalization affects how certain equivalent characters are saved (e.g. "\uE9" (é) vs "e\u0301" (e with combining-acute)) and has nothing to do with the BOM. From the screenshot, the option that should affect the presence of the BOM is (surprise, surprise) "Include Unicode Signature (BOM)".
  11. M

    Custom HTML Tags, Good Idea?

    If you want custom tags, you could adapt the HTML DTD and reference your version in the DOCTYPE. That would be the W3C approved way, though some browsers may not work well with custom doctypes. There needs to be another poll answer, something along the lines of "Bad idea (Unpredictable results)".
  12. M

    Stylesheet exploded

    Take a look in Firebug or the like. Right-click the blank area where #right should be and choose "inspect", and you'll find it's filled by #header-right, whose height of 500px pushes #right down. Remove this height property. IE8-compatibility is bug-compatible with old IE versions, so pay it no...
  13. M

    Cron trouble

    The problem might lie with the script rather than the cron job. Does cleanPackages.php run from the browser (once you make it browser accessible)? What's the output? Any error messages?
  14. M

    notthing is showing up i my MainConten DIV

    That's an awful lot of code to wade through. For our sake, reduce it to a minimal test case (which will also help you narrow down on the cause) and enclose the code in [PHP] tags when you post it. Also, describe in more detail the behavior you expect and the behavior you get, which includes any...
  15. M

    $_SESSION Problem state not changing

    You've got a byte order mark in your page. Save the source code as ASCII or as UTF-8 without the BOM. How you do the latter depends on your editor; check its documentation for more information. See also "session_start() error - Not below any other ouput"
  16. M

    Perl References

    There's more going on than what's in the code. An inconsequential alteration (removing the HTML templates, so I can be lazy and not install HTML::Template) works. #!/usr/bin/perl -w #use HTML::Template; use CGI; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use XML::Simple; use...
  17. M

    Sudden Death Overtime

    Oddly, I wanted the US to win the game, but Canada to get the gold. That is, I was rooting for the US to win but knew that once the game was over, I would have wanted Canada to have one, with the US getting silver. I'm quite happy with the result. Even the overtime period and final score...
  18. M

    what is the worst virus you've had?

    Somewhat surprisingly, Symantec had top-score in AV Comparitive's 2009 tests, with Kaspersky taking silver and ESET Nod32 taking bronze. Of the free options tested, AVG bested Avira. AV Test (published via PC World) gave top position to G-Data, with Symantec at #2 and Kaspersky at #3. They...
Top