View Single Post
Old 01-14-2013, 03:32 AM   PM User | #7
doubledee
Regular Coder

 
doubledee's Avatar
 
Join Date: Mar 2011
Location: Arizona
Posts: 617
Thanks: 19
Thanked 0 Times in 0 Posts
doubledee has a little shameless behaviour in the past
Quote:
Originally Posted by Fou-Lu View Post
And what is your question to go with that? It matches the output $from variable you have created.
I am wondering all the mod_rewrites I used - only a dozen really - are worth the trouble they can cause?!


Okay, I think I am making some progress thanks to your lead, so here is where I am stuck now...

In my Web Root I have a directory called "uploads" which holds Member's profile photos plus a png to handle if a photo is "pending approval" and one if the Member has no photo.

For whatever reason, I had the wrong filename in my code, and so I corrected below...
PHP Code:
    // Check for No Image.
    
if (is_null($fromPhoto)){
        
$fromPhoto "NoImageAvailable_100x77.png";
    }

    if (
is_null($toPhoto)){
        
$toPhoto "NoImageAvailable_100x77.png";
    } 

So, when I re-run my code with an exit() to isolate things, in View Source I see...

Code:
src='/uploads/NoImageAvailable_100x77.png'

If I type this in the URL I get a 404-Error...

local.debbie/uploads/NoImageAvailable_100x77.png


So to me that means that the HTML that is trying to display my "No Image Available" thumbnail is crashing things...


The best thing I can think, is that is very liberal mod_rewrite could be causing an issue...

Code:
#-------------------------------------------------------------------------------
#PRETTY:		finance/
#UGLY:			articles/index.php?section=finance

#Rewrite only if the request is not pointing to a real file (e.g. add-comment.php, index.php).
RewriteCond %{REQUEST_FILENAME} !-f

#Match any kind of Section.  PHP will decide if it's valid or not.
RewriteRule (.+)/$ articles/index.php?section=$1 [L]

Does that make sense??


Debbie
doubledee is offline   Reply With Quote