![](https://forums.phpfreaks.com/uploads/set_resources_1/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
LLLLLLL
-
Posts
306 -
Joined
-
Last visited
Posts posted by LLLLLLL
-
-
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.
-
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.
-
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?
-
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.
- Large files can be streamed from public (URL-able) directories
-
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??
-
Yes, but my entire question on this thread is why 500 vs. blank screen. It must be an environmental setting somewhere, but which setting??
-
As discussed, the code on both servers is identical. It is the same intentionally-flawed code.
-
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.
-
you will either get a 500 Internal Error Message or a blank screen.
What determines the 500 or blank screen?
-
But this just suppresses the errors, it doesn't cause a browser 500 error. That's the ultimate mystery I'm trying to solve.
-
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!
-
Yes, rbrown, that is my question: what are these relevant settings?
The environments are the same; only the error handling was different.
-
One thing I notice is that there's no "break" after your default case.
-
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.
-
Oh I see, "fatal" meaning "parser" errors? I can see why this isn't something that would work...
-
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.
-
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...
-
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....
-
JStefan, just use NeuCart.com. No need to create new shopping carts!
-
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 );
-
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.
-
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...
-
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.
-
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!
fwrite Permission variations from server to server
in PHP Coding Help
Posted
(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:
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.