0

My boss created an application in php 5.2 on some older server. The application writes and reads data from a sql server 2012 database.

We now have a brand spankin new windows server 2012 with iis 8 on it.

My job is to migrate the application from the old server to the new server.

I've already installed php 5.3 not knowing that we need 5.2

Question

  1. should I downgrade?
  2. if so, how do i downgrade? the process of installing 5.3 is easy, but 5.2 is going to be a nightmare.

example this will only work in versions 5.3+:

$serverName = '(localdb)\v11.0';
$connOptions = array('AttachDBFileName'=>'C:\Users\bswan\ExampleDB.mdf','Database'=>'ExampleDB');

$conn = sqlsrv_connect($serverName, $connOptions);
if($conn === false)      
    die(print_r(sqlsrv_errors(), true)); 
else
    echo "Connected via sqlsrv!<br />";
Alex Gordon
  • 57,446
  • 287
  • 670
  • 1,062
  • depends on what deprecated things the application does.. i seriously doubt 5.3 will be a problem. but, 5.2 is lacking a lot of modern usage, like the static method :: class reference by variable, namespaces.. – Emery King Feb 06 '13 at 03:21
  • @MarshallHouse thank you thats great information. do you know off hand how does very basic php 5.2 differ from 3 – Alex Gordon Feb 06 '13 at 03:22
  • the biggest thing to me is in OOP wher you have a class: Clients and you reference it by variable `$clients = new Clients();` and try to call a static method: `$clients::isSomething()` will error in 5.2 so you have to call it like this: `$clients->isSomething()`. bare bones php there aren't any significant differences. – Emery King Feb 06 '13 at 03:26
  • @MarshallHouse i didnt know php programmers use OO :) – Alex Gordon Feb 06 '13 at 03:27
  • it's turning into a very solid OOP language. – Emery King Feb 06 '13 at 03:27
  • cool! completely off topic but what do you think of php vs go/python(from google) ? – Alex Gordon Feb 06 '13 at 03:31
  • sorry, one server side scripting language is enough for me. never tried anything else. PHP just has the most help available i believe. – Emery King Feb 06 '13 at 03:33

2 Answers2

3

There are NO valid reasons for downgrading. If you have a new system, you should be installing PHP 5.4.

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
2

You should check what has changed in 5.3. I would take the time to test to see if everything works fine with your application in 5.3 and if it does then you shouldn't downgrade. It's best to stay on the latest version if you can. If you insist on downgrading you can check this relevant post.

Community
  • 1
  • 1
SeanWM
  • 16,789
  • 7
  • 51
  • 83