Search results

  1. M

    Several Questions

    Read the mod_cgi documentation. Anything in the "cgi-bin" directory (more accurately, anything targeted by a ScriptAlias directive) is processed by the cgi-script handler, which passes files off to sh. It, in turn, expects scripts to start with a shebang line; if they don't, sh processes them as...
  2. M

    problems with perl script executing at all

    Have you tested whether or not hitcounter.pl works on its own? What do you get if you access it directly from a browser? I doubt the exec cmd command is enabled, considering that the equivalent is disabled everywhere else. Try include virtual and exec cgi (the former is preferred), and make...
  3. M

    hosting error message

    Before we escalate this, I want to be certain: was your cPanel account linked to the forum account you're currently using (abcisaac)?
  4. M

    Which Text Editor & Why

    Emacs, for this reason.
  5. M

    Extra horizontal space- div/table/image within <td>

    Also read "Why avoiding tables (for layout) is important" or "Why tables for layout is stupid".
  6. M

    HellowWorld.aspx

    You should use [code], [html] or [php] tags (as appropriate) so we can better see what actual code you are using, otherwise we're working from incomplete and incorrect information. Note that the problem isn't that the browser isn't finding http://daspnet.x10.mx/day1b/HelloWorld.aspx, it's that...
  7. M

    Can I make a website in Python or Django?

    Yes, but FTP clients are easier and more powerful. Uploading multiple files is easier with most FTP clients. Uploading folders isn't possible with cPanel, unless you archive (e.g. zip) the folder first, then unarchive it after u/ling. Some FTP clients also support synchronization, which is a big...
  8. M

    Warning: Invalid argument supplied for foreach() in***holder.php on line 108

    Please don't throw all your code up (read that link; it's very important) in a post, especially without formatting it. It's completely unreadable. Create a minimal test case, indent it properly, and use [php], [html] or [code] tags (as appropriate) to delineate and format the code, and indicate...
  9. M

    error in pictures

    @joennika214: when posting source code, please use , [html] or [code] tags (as appropriate) to delineate the code, preserve formatting and make it readable. For example, [php]while ($newArray = mysql_fetch_array($result)) { // give a name to the fields if...
  10. M

    Private Message form - friends list

    Exactly. Old code can be brought up to the current style if you happen to edit it for other reasons, but otherwise it's not an important enough task. Coding style is a matter for writing rather than maintenance.
  11. M

    Private Message form - friends list

    While you could say it's their fault, the blame game isn't useful in development. If anything, it's counter productive. Typos can be easily fixed, as can most simple bugs, but it still requires a little effort and extra time while you're testing the code (there's an extra test-and-fix...
  12. M

    Getting Non-Syndicated Info from Another Site

    If you get permission to use the data but can only access it from the web pages, you can use the regexp: /Regular Rating\s*(?:<[^>]*>\s*)*([^<]+)/s which matches the first text after "Regular Rating" (the ([^<]+)) and ignores intervening tags and whitespace (the (?:<[^>]*>\s*)*). This should...
  13. M

    phpinfo Test File

    Note that the PHP code won't be visible in the rendered view, only the source view. Though slightly tricky to execute, you can make use of this to give visual feedback on whether or not the file was processed by PHP.
  14. M

    phpinfo Test File

    You can easily roll your own using ini_get_all and get_loaded_extensions. Since you want users to be able to check whether their server meets the requirements for your package, you can run the checks in a script, rather than forcing users to pour over lists of extensions, configuration options...
  15. M

    ereg_replace and explode problem

    If you're referring to LocalDB::connect, see "Display all that would be secret while Mysql is broken", "Script terminating in middle of script for no reason", "MySQL and PHP" ..., though it has less to do with PDO and more to do with isolating sensitive information (you could write a...
  16. M

    ereg_replace and explode problem

    Careful. Leaving in single-quotes and using mysql_query without first quoting the input values leaves the query vulnerable to SQL injection. @learning_brain: note that the input word list can be filtered in a single query: // in some other script if (get_magic_quotes_gpc()) { $_REQUEST; #...
  17. M

    Private Message form - friends list

    There were a few other resources mentioned in the "OO JS Issue" thread, including Eloquent Javascript. Also check out the Jibbering JS FAQs. For specific topics in JS, read: Use functional programming techniques to write elegant JavaScript Object Oriented Programming in JavaScript...
  18. M

    PHP registration script - Username check does not work

    while, for and foreach are functionally equivalent, but the connotations of foreach make it the slightly better choice in this instance because it better communicates intent to other programmers. while loops run until the (static) condition is false; a change of circumstance makes this so...
  19. M

    Private Message form - friends list

    You should indent blocks an additional level to make it more readable. That is, function returnFriends() { // Page that used window.open input to field var inputField = ... rather than function returnFriends() { // Page that used window.open input to field var inputField = ... The...
  20. M

    Private Message form - friends list

    A window created with window.open has a reference to the window that opened it via window.opener. Thus you can access form elements with window.opener.document.forms.formName.elements.elementName, as long as both windows are on a page in the same domain. Alternatively, you can use a JS library...
Top