yapyapayap Posted October 3, 2006 Share Posted October 3, 2006 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 ??? Quote Link to comment Share on other sites More sharing options...
Hi I Am Timbo Posted October 3, 2006 Share Posted October 3, 2006 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. Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted October 3, 2006 Share Posted October 3, 2006 you say download... do you mean like a zip file? if it's downloaded like a zip file, is the content the full PHP source, or is it the correct html that you would see if you were to visit the page with browser?do you have a link we can test? Quote Link to comment Share on other sites More sharing options...
JustinK101 Posted October 3, 2006 Share Posted October 3, 2006 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.confScriptAlias /php/ "c:/php/"AddType application/x-httpd-php .php .php3 .php5Action application/x-httpd-php "/php/php-cgi.exe" Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted October 3, 2006 Share Posted October 3, 2006 Would the httpd.conf file be responsible for an [u]intermittent[/u] problem? Quote Link to comment Share on other sites More sharing options...
Hi I Am Timbo Posted October 3, 2006 Share Posted October 3, 2006 What do you mean by intermittent problem? Quote Link to comment Share on other sites More sharing options...
JustinK101 Posted October 3, 2006 Share Posted October 3, 2006 http.conf = intermittent = no!Can you provide a link so we can verify? Quote Link to comment Share on other sites More sharing options...
yapyapayap Posted October 3, 2006 Author Share Posted October 3, 2006 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 Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted October 3, 2006 Share Posted October 3, 2006 generally PHP files are accessable from outside of your login. If your domain isn't registered yet, there should at least be a preview feature. Quote Link to comment Share on other sites More sharing options...
yapyapayap Posted October 3, 2006 Author Share Posted October 3, 2006 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. Quote Link to comment Share on other sites More sharing options...
yapyapayap Posted October 3, 2006 Author Share Posted October 3, 2006 automaticupdate.php,runs though a database of users and depending on their settings deletes all the users photos and pulls fresh ones down of off flickr.com site and stored them locally. This should not effect the site though. Quote Link to comment Share on other sites More sharing options...
yapyapayap Posted October 3, 2006 Author Share Posted October 3, 2006 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 ? Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted October 3, 2006 Share Posted October 3, 2006 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. Quote Link to comment Share on other sites More sharing options...
yapyapayap Posted October 3, 2006 Author Share Posted October 3, 2006 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 againRichard Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.