Jump to content

LLLLLLL

Members
  • Posts

    306
  • Joined

  • Last visited

Posts posted by LLLLLLL

  1. (This might be the wrong forum; it might be server-side configuration, but alas it is the code that *calls* fwrite, so I'll start here.)

     

    I have written a script, and one thing it does is generate a file to disk using fwrite. No big deal.

     

    Here's what interests me:

    • On most servers, the file is written successfully when the folder's permissions are 755 with recursive permissions.
    • On some servers, 755 fails. Only 777 works.

     

    How could this be? Are permissions=permissions=permissions? Why will 755 work on one machine but not another?

     

    I'm just a logic guy; I know very little of server-side configuration and/or why there would be a difference here. Just trying to learn.

  2. This section of the site is filled with .htaccess stuff, huh?

     

    Anyway, this is what I have:

     

    somesite.com/store/*  (all files are in the "store" folder)

     

    And this is what I want:

    1) somesite.com/blah.php to be a URL, but the server will actually show somesite.com/store/blah.php

    2) A visitor who tries to go to somesite.com/store/blah.php should be inaccessable directly, or it should redirect to the URL in #1 while actually showing this URL. (Hopefully you understand.)

     

    I've done .htaccess work before, but I guess I've never tried to strip out text in the middle of a URL.

  3. This is my development box: http://neucart.com/demo/. Items can be dragged/dropped into the cart (grab the image). This fails in ie9.

     

    The issue is known and addressed here:

    http://forum.jquery.com/topic/jquery-ui-sortable-and-draggable-do-not-work-in-ie9

     

    I tried to add the hotfix. Doesn't work.

     

    I tried to upgrade all of my jQuery library but that made things worse (drag/drop failed on all browsers). I'm more of a server-side developer; can someone help me out?

  4. I have more information about this:

    • Large files can be streamed from public (URL-able) directories
    • Large files cannot be streamed from private directories
    • Other files can be streamed from either/or

     

    So is there a combination of settings here?

     

    Note that the server is using CGI.

  5. Well even the web host is unsure how they get this type of error to show a 500 error:

     

    The website encountered an error while retrieving http://somesite/intentionalbadpage. It may be down for maintenance or configured incorrectly. Here are some suggestions: Reload this web page later. HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

     

    I like this type of error handling, but don't know how to get it set up!

  6. OK, I thought I understood the error logging settings, but I don't quite understand. Trying to troubleshoot another friend's site, a page had a fatal error so it didn't load. The browser returned a "page not found" type of error. We enabled the log and found the issue and corrected it.

     

    However, on my own machine, I tried to attempt this same bad behavior and I always see the error:

     

    Fatal error: Call to undefined function foo() in /(path)/header.php on line 4
    

     

    Why would my server show the error, but his server treated the page as if it did not exist? For the record, the entire page had this content

     

    <?php
    include( 'includes/header.php' );
    ?>
    

     

    The error is caused because header.php calls a function that hasn't been defined. I'm just wondering why there is a difference of error handling.

  7. The chat session guy from this webhost is pretty much useless. Someone suggested that I cannot stream files from folders that don't have a URL. That's not right because there are no other sites that require this.

     

    Again, is there a possible server setting for something like this?

     

    Thanks again....

  8. I sell shopping cart software that allows digital downloads of files. It always works, for everyone. Until now.

     

    This guy has a 56MB file for customers to download. It fails on his server. But on my server, that same file is downloaded without issue. I think maybe there's some file size limit on his server or something. Any thoughts?

     

    This is the code that "downloads" the file to a customer's browser:

     

    // Set headers and stream the file to the client browser. the attachment
    // filename is only the filename, but readfile must be the full path.
    header( "Content-Description: File Transfer" );
    header( "Content-Type: application/force-download");
    header( "Content-Length: " . filesize( $filename ) );
    header( "Content-Disposition: attachment; filename=" . $dp->filename );
    readfile( $filename );
    

  9. I googled with only minimal confidence in the results, so I thought I'd post... is there a library anyone here has used that allows me to fill data into a PDF (a writable PDF form)?

     

    I'll be storing a bunch of data in a database, and there's a pre-configured PDF that I need to fill. I just don't know which library will help me with this.

     

    Thanks.

  10. I'm unclear about error_reprorting( level ): does this set the error level for the duration of the script, or does it persist until some other event (like calling it again)?

     

    The documentation seems to indicate that it lasts longer than the duration of the script, differing from, say, ini_set. I've had it work a couple different ways on different servers so I'm a bit confused.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.