DM7 Posted April 27, 2012 Share Posted April 27, 2012 Hello guys, I'm having a little problem here, I want to put a code in my website but i don't know where, its this code : AddHandler application/x-httpd-php4 .php .php4 .php3 I've been trying to do this by creating a .htaccess file but that doesn't work. My server is currently running on PHP 5.3 but i want to let it switch to PHP4 It's not a CMS site. Anybody have any sugestions to try for me? Thanks in advance, Quote Link to comment https://forums.phpfreaks.com/topic/261698-need-help-with-this-code/ Share on other sites More sharing options...
titan21 Posted April 27, 2012 Share Posted April 27, 2012 If .htaccess isn't working it may be that the server admin has disabled that functionality. in which case it would need to go into httpd.conf or something similar. I'm not even 100% if it is even possible to run two versions of PHP from the same server (I would imagine not!). The only thing I can thing of is running a second instance of Apache on a different port with PHP4 installed. I'm sure someone else will be able to give you a better answer however. Quote Link to comment https://forums.phpfreaks.com/topic/261698-need-help-with-this-code/#findComment-1341034 Share on other sites More sharing options...
DM7 Posted April 27, 2012 Author Share Posted April 27, 2012 I created a .htaccess file but when i get on the site again, it just lets me download my .php files,might be a wrong code? Quote Link to comment https://forums.phpfreaks.com/topic/261698-need-help-with-this-code/#findComment-1341039 Share on other sites More sharing options...
titan21 Posted April 27, 2012 Share Posted April 27, 2012 This may sound a bit strange - but have u tried a different browser? I had a situation recently whereby a php generating a JSON response was resulting a download of a php file on IE8. It's a long shot tho... Alterantvely - do you run your own server? Are you absolutely sure that the hosting company provides php4? Does PHP run normally? BTW - just seen that you can run multiple versions of PHP on one server! You learn something new everyday! Quote Link to comment https://forums.phpfreaks.com/topic/261698-need-help-with-this-code/#findComment-1341057 Share on other sites More sharing options...
DM7 Posted April 27, 2012 Author Share Posted April 27, 2012 I've tried it on Mozilla Firefox and IE, both give the same message, i think it might be the code, the server currently runs on php 5.2 so i think php 4 can do also. Quote Link to comment https://forums.phpfreaks.com/topic/261698-need-help-with-this-code/#findComment-1341068 Share on other sites More sharing options...
DM7 Posted April 27, 2012 Author Share Posted April 27, 2012 I just called the provider, it seems they don't support php4 anymore so i guess i have to rewrite the site, thanks anyway Quote Link to comment https://forums.phpfreaks.com/topic/261698-need-help-with-this-code/#findComment-1341072 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.