Jump to content

Recommended Posts

I have a phpbb forum. At work on our network, starting yesterday, it asks to download 2 php pages of my site instead of exceuting and displaying the page. portal.php and index.php are the culprits. I can goto all other pages on the site fine. Up until yesterday they worked fine. Note that it is the same on our entire network. However, everyone else (including me from home) can see the pages fine. Things I have done since this started happening, made changes to a .htaccess file, and browsed to the site from an anonymous browser from work. Here is my .htaccess

 

DirectoryIndex index.html index.htm portal.php index.php

RewriteCond %{HTTP_HOST} ^mysite.com$ [OR]

 

Options +FollowSymlinks

RewriteEngine on

rewritecond %{http_host} ^mysite.com [nc]

rewriterule ^(.*)$ http://www.mysite.com/$1 [r=301,nc] '

 

I am on hostgator, using cpanel. They run PHP 5. The culprit site is an addon domain of my main domain. Please let me know if you need any other info to help resolve.

If theirs a delay before it starts the download, i would assume its timing out.

 

i am not great at rewites but from a regex point of view this doesn't look right.

rewriterule ^(.*)$ http://www.mysite.com/$1 [r=301,nc] '

i assume the PHP file that downloaded is blank! (or atleast contains no php code)

 

if not then thats a BIG issule..

 

MIME type should be (close to)

application/x-httpd-php - php php3 php4 php5 php6

but that affects ALL php pages

 

try creating a test page

 

<?php
phpinfo();
?>

There is definately code in it. Remember, those 2 files run fine and display fine everywhere but in my network. However, using the same code, installed on a different site it works fine in my network. for some reason there is something about that specific site that is not right, and whatever it is, its only apparent to browsers in my network at work.

i mean, when it prompts you to download the files.. if you do download them (from that prompt) and then open the files in notepad (or textedit) does it still contain the code ? the file on the site will contain the code but does the download copy also contain it ?

In firefox it says

 

You have chosen to open

 

which is a:" application/x-httpd-php5

from http://mysite.com

 

What should Firefox do with this file?

 

Open with BROWSE

Save to Disk

 

Pretty much the same in IE7 so its not browser specific.

:o

Okay let me check the facts..

 

from outside your network, it parses fine (displays fine) but internal it shows the source code?

 

if this is the case then it seams more of a network structure or apache issule,

 

is the server at your office or at hostgator (what riole does hostgator play)

 

EDIT:

my mine is

application/x-httpd-php php php3 php4 php5 php6

not

application/x-httpd-php5 php php3 php4 php5 php6

 

also i have

application/x-httpd-php-source phps

phps ONLY

 

 

(sorry leaving work now, will check this post when i'm at home)

 

Hostgator is my host, they have the server in their posession. It does seem more like a network thing but this only happened immediately after I deleted an .htaccess and brosed to the site from an anonymous browser. We are not on a proxy, and my cache is completely cleared. I kinda think its a network issue too but I was just wondering if someone can lead me down the right path of fixing it since the rest of the php pages display fine.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.