Jump to content

LLLLLLL

Members
  • Posts

    306
  • Joined

  • Last visited

Everything 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. A great solution! I see this works, but I need to ask... does it change anything else? I wouldn't want that one line to cause other unforeseen issues.
  4. 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?
  5. 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.
  6. AH!!!!!!! I think you may have answered it. Bravo to you! I think that's the case with the 500 server. How do I give you a gold star??
  7. Yes, but my entire question on this thread is why 500 vs. blank screen. It must be an environmental setting somewhere, but which setting??
  8. As discussed, the code on both servers is identical. It is the same intentionally-flawed code.
  9. No no no.... I'm asking why would a blank screen display, versus a 500 error. This is what I've been trying to understand during this entire thread.
  10. What determines the 500 or blank screen?
  11. But this just suppresses the errors, it doesn't cause a browser 500 error. That's the ultimate mystery I'm trying to solve.
  12. 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!
  13. Yes, rbrown, that is my question: what are these relevant settings? The environments are the same; only the error handling was different.
  14. One thing I notice is that there's no "break" after your default case.
  15. 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.
  16. Oh I see, "fatal" meaning "parser" errors? I can see why this isn't something that would work...
  17. Thanks for your reply Yes, I now see http://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors. Useful page. I don't really understand the part about fatal errors. Seems a little vague. Any more input there? Is it saying fatal errors won't be logged? That seems like exactly what you WOULD WANT to be logged. Unless I'm misinterpreting it.
  18. It seems that using error_reporting - http://php.net/manual/en/function.error-reporting.php - is not relevant if a site's php.ini file has display_errors = Off... is there a way to set that at runtime, too? Is ini_set the way to go? And if so, does it matter which function is called first (I'm guessing ini_set). Merci...
  19. 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....
  20. JStefan, just use NeuCart.com. No need to create new shopping carts!
  21. 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 );
  22. 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.
  23. Mmm. I'm sorry I missed that. Although I'm pretty sure it didn't work that way on one server.... oh well, I'll have a look...
  24. 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.
  25. Per my last entry, I didn't actually have the right encoding set for the file. So that's why it didn't work. Per the overall topic, the solution was to add mysql_set_charset(), as you suggested. Bravo. My shopping cart just got better!
×
×
  • 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.