Jump to content

Downloading PHP files instead of processing them .. why?


yapyapayap

Recommended Posts

Hey,

I have a site in PHP and for some reasons instead of processing the files its making the browser Firefox and IE downlaod the php files as you would any file. This appears to be an intermittent problem some times its works most of the time it does not. Does anyone know why this occurs?

Many Thanks,
Richard  ???
Link to comment
Share on other sites

This happens because the extension that you used isn't recognized as an extension to be parsed by php.  It could be that php isn't installed on your server at all, or that you need to use a different extension.  Who is your host?  I would verify that php is installed and what extensions are parsed by php.
Link to comment
Share on other sites

Most likely the extension inst registered with Apache. Assuming you running your own server in windows with apache, add the following:

Find the file: http.conf

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .php3 .php5
Action application/x-httpd-php "/php/php-cgi.exe"
Link to comment
Share on other sites

Hi,

Thanks for your responses. The problem is Intermetent as sometimes it logs in normally with no problems. My host is wiredhub.net. The pages come down as  login_code.php but are Empty (there is no code in the file) so they are being processed but instead of outputing or linking to the next page they are offering to be downloaded.

I will be happy to provide you with a login to the site to see for yourself but don't want to post my email and password on here so if you can send me a message i will send it that way.

Richard
Link to comment
Share on other sites

One thing that i have a suspicion on is a cron job i am running that uses WGET http://flickr.ifresh.co.uk/automaticupdate.php.
I seem to get a lot of retries on this usually about 20. Is it possable that this is causing the PHP processing to go skewy.. and hence the intermetent problems ? Anyone have anything similar ?

--13:17:54--  http://flickr.ifresh.co.uk/automaticupdate.php
  (try:20) => `automaticupdate.php.6'
Connecting to flickr.ifresh.co.uk|209.59.164.74|:80... connected.
HTTP request sent, awaiting response... No data received.
Giving up.
Link to comment
Share on other sites

humm .. just a quick though is it possable because it takes sooo much time to pull down delete and rewrite all the images to the filesystem (when running the cron job on the autoupdate.php file) that WGET times-out and then retries up to 20 times and it is this that is causing it to mess up the php processing ?
Link to comment
Share on other sites

the server does seem to be a bit slow... but I was able to curl the pages in question and got an interesting location header "Location: ../user/index.php"

I'm not entirely sure how some browsers would use that header. Try removing the ".." from the beginning at the very least.

PS: I was able to login multiple times without a problem in safari, camino, and firefox.
Link to comment
Share on other sites

Hi michaellunsford,

Thanks for you help. I have done as you suggested and instead of using the relative link i put in the full thing though i doubt it was that. I have reset the CrOn job to its origional 15 min intervals. If you have the time please keep randomly logging in and out when you have a fre minute and im sure that the Weirdness will occur again soon.  :-\

If you have an instent messenger i can msg on that when it occurs.
Thanks again
Richard
Link to comment
Share on other sites

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.