Jump to content

Derek

Members
  • Posts

    105
  • Joined

  • Last visited

Posts posted by Derek

  1. Should be == instead of =.

     

    omg I swear I tried that already (because Java uses "==" too), but I must have forgotten to FTP or something >.>

     

    Thanks--again.

     

    P.S.: Yeah, I'm updating my Profile and signature, etc. I figure it's about 2 years overdue. :S

  2. I compiled the gnuplot-4.4.0 package locally...It works great on my local system, I just type gnuplot, and it launches fine.

     

    gnuplot seems to be a library, not an executable... at least in the incarnation we have installed.

     

    So, it looks like to me (correct me if I'm wrong), but djBob didn't install the same thing you did (besides the fact that you're running Windows and Stevie is running Linux). I have no clue what djbob installed, but it should have been this. Maybe djbob can spread some light on this.

     

    I don't know if Stevie has RPM installed, but the RPM for gnuplot is located here, as the official Sourceforge for gnuplot only offers the source.

  3. According to the "I'm Feeling Lucky" result of that error on Google, the person with your same error found he could connect using "localhost" instead of "127.0.0.1". So, if you haven't already, you can try to connect to the MySQL server "stevie.heliohost.org" (if that's the real url you should use) instead of the IP address of the server.

     

    EDIT: Yeah, on PHPmyAdmin, it says it's connecting to "localhost", and the url is "stevie.heliohost.org", so the mySQL server must be at that server.

  4. Yeah, I seem to be overlooking something really simple again today, but I can't figure it out. (Yeah I sent this as a PM but I thought I should put it here instead.)

     

    Source:

    <?php
        $filename = $_GET['file'];
        $location = $_GET['where'];
        if ($filename) {
            if ($location = "main") {
                print($filename . ' - ' . $location);
            } else if ($location = "home") {
                print($filename . ' - ' . $location);
            } else if ($location = "scoizzle") {
                print($filename . ' - ' . $location);
            }
        }
    ?>

     

    No matter what I put for "where", I get $location printed as "main". So if I go to

    , they both print "test.txt - main".

     

    Thanks,

    ~Derek

  5. @Derek

     

    Exactly what info do you need from a file?

     

    Well, extending on what I said on the original post, I'm writing a download script that takes the file name from the url, so if I wanted to download my test.txt, I would go to "download.php?file=test.txt"

     

    <?php
        $filename = $_GET['file']; //Get the file name using the variable "file" in the URL
        chdir("download"); //Files to download are in my public_html/download folder
        header('Content-disposition: attachment; filename=' . $filename); //Force the browser to download file, not view it.
        header('Content-type: text/plain'); //This would only work for test.txt
        readfile($filename);
    ?>

     

    So, the 4th line is telling the browser what MIME type the file is, so this example would work fine, but if I tried to download, lets say, a Zip folder, it would be telling the browser that it's a text file, and it thinks it's supposed to be saved as a .txt extension.

     

    That's what I needed the finfo_*() functions for--it would give me the MIME type of any file being used for $file, so it would save as a .zip, for example, instead of a .txt.

     

    EDIT: Yeah, byron, I checked that example you gave me and it looks like I could use it, but it returns a lot of data when I really only need the "Content-Type" part of it, so I'll read more on those PHP.net pages you linked.

  6. ...Ask the Apache forums?

     

    The Original Poster is saying that he would like some server configuration information, because he would like to set up a test server on his computer to make site development faster (since he wouldn't have to FTP every change, etc), and then perhaps later, upload it to Stevie. But, since the default Apache installation is different from the configuration of Stevie, he would like more information about it, so developing the site on his test server and copying it over to his HelioHost site wouldn't cause any problems.

  7. So, I'm trying to write a download script for my site by using the "Content-disposition" header. However, in order for it to work, I have to supply the file's MIME type. So I wrote it to automatically check for the file's type using finfo, so different files could still be downloaded. Then I got:

     

    Fatal error: Call to undefined function finfo_open()

     

    According to PHP.net, I found it's because the PECL extension is not installed.

     

    So, please install it, because I would love to get this to work.

     

    Thanks,

    ~Derek

     

    Extra Info:

    Username: derekboy

    Site: unorthodox.co.cc

    PHP Source:

    <?php

    /* The equivalent code:

    *

    * header('Content-disposition: attachment; filename=someFile.ext');

    * header('Content-type: madeUp/MIMEtype');

    *

    */

    $filename = $_GET['file'];

    $fileinfo = finfo_open(FILEINFO_MIME_TYPE);

     

    chdir("download");

    header('Content-disposition: attachment; filename=' . $filename);

    header('Content-type: ' . finfo_file($fileinfo, $filename));

    readfile($filename);

    ?>

  8. I was wondering if I would be able to host a RSPS Webclient here. It is written in Java and I would take all the sprites and upload them, edit the source to read the sprites online, then I would Jar all the class files and upload it. It would run just like this, except I won't have any ads (unless I decide later to use HelioHost ads).

     

    ~Derek

  9. I use iTunes for audio and VLC for the rare case where I am watching non-online video.

     

    Same, as I don't watch videos on my iMac G3, as it has an non-upgradeble 8mb Graphics card. And since Mac OS X comes with iTunes, I didn't feel like getting a different one

×
×
  • Create New...