Jump to content

PHP 5.6 in a folder


Recommended Posts

Hello from Austria, 

I´d have a question: 

I just installed a new shop (running with PHP 5.6) but I´d need on this server PHP 4 because of many old picture galleries which are working only with PHP 4. 

 

Can I use only for the shop PHP 5.6 in a folder (in the folder where the new shop is installed) and keep PHP 4 for the rest of my documents? 

 

I found the command "AddType application/x-httpd-php56 .php" in internet. 

Is this working? 

If yes, where does it have to be? I read in the file .htaccess (the file of the folder where the shop is) many things, but I do not understand it (I am a carpenter). 

 


 

Link to comment
Share on other sites

Well, this is not a question for Prestashop Forum. It is a technical one. Indeed you can run more than one php-version simultaneously on the server, but this should be installed and managed by your hosting company.

If you have more than one php-Version available on the server and you are using cPanel, than you can select the different versions on cPanel.  Do not simply add things to files, if you don't know their consequences. ;) Please contact the support of your hosting company if you are only user.

 

If your are server administrator than here you find some useful tutorials:

http://linuxplayer.org/2011/05/intall-multiple-version-of-php-on-one-server

https://askubuntu.com/questions/50344/how-to-have-two-versions-of-php-installed-and-switch-easily-between-them

In this case the best is to separate projects in their own folders (vhosts) and than set the php-version into the host-configuration file (ini).

 

Greetings vom AT.

Link to comment
Share on other sites

The old story, 

the provider says "ask the shop support" and there they say I should ask the provider. 

Very cool. 

Then you probably should locate a different hosting provider if they cannot help you with your issue.  The version of PHP that you install on your server is outside the scope of Prestashop.

Link to comment
Share on other sites

Well 1&1 is not realy a good provider. It's standard for WP or every other software with no extra requirements to a server (simply homepage), but not really suitable for e-commere platforms.

 

Unfortunately we don't know if on your server there are installed several php-versions you can use. This wasn't yet answered. If yes, than by adding a line into .htaccess  (AddHandler application/x-httpd-php56 .php or AddType application/x-httpd-php55 .php - depending on your server configuration) on root of the shop, it could work. BUT could doesn't mean it will work without problems ! Which versions php are installed on server and you can use ?

 

The solution I named before (vhosts) is the professional way and this works. The one you are suggesting is not and can fail.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...