Jump to content

Recommended Posts

I'm working on updating a clients webpage and the existing code is written in old school php syntax and running on PHP 5.3.29 I've tried a few local servers, WAMP,AMP, easyPHP with no luck getting his existing page to work locally and the client is not willing to upgrade to PHP 5+. 

Does anyone have any suggestions that can help me get it going locally

Link to comment
https://forums.phpfreaks.com/topic/297312-php-5329-with-local-server-with-mysql/
Share on other sites

The server version isn't really an issue that needs to be solved to initially find out why the code is not working.  Initially you need to make sure you have a fully installed server to work with and then make sure that error_reporting is turned on and display_errors is on also.  You can do that globally in the php.ini file or at the top of any php page like this

ini_set('display_errors',1); 
error_reporting(E_ALL);

Once those errors start to show up, then you can decide based on those errors if it's really a php version issue because old code won't work on the new version.

If you still do not get any errors  after doing as fastcol suggested, then one thing that could prevent the code from working is the use of short open tags <? ?> throughout the code rather then the full php tag <?php ?> tags. You maybe able to enable a setting call short_open_tags in the php.ini, but this is deprecated never version of php will complain. I would recommend converting all short tags to the full php syntax.

@

fastsol 

which fully installed server would you suggest?

@

scootstah

believe me I've tried to convince them I'd much prefer to code in mySQLi. The problem is he wrote the old code himself a long time ago and doesn't want to let go but at the same time does not have the time to do it himself.

If you're using Windows, I would suggest WAMP.  I have WAMP and it works perfect on my laptop.  What you use is up to you based on your machine and abilities to get it installed properly.  How many files are we talking that need to be updated?  If it's just a few, maybe just scan through them in Notepad++ for outdated functions or <? short tags like suggested above.  Find any issues and upload them to a server quick and test them there, rather than installing a outdated server locally.

I've tried Wamp for Windows and I was unsuccessful getting the PHP version down to 5.3.29. I'm sure I'm doing something wrong but haven't figured that out yet. There are only 6 pages so far. However he has multiple webpages hosted on his server and therefore he not willing to do the update even though he received update notifications every-time he logs in. He's old school and believes it's going to break his server LOL

I really wouldn't recommend working on older PHP4 code in a PHP5 environment. Your development environment needs to match what it's going to be running on, otherwise you're going to get quirky little bugs. Going from such extreme version differences is going to exacerbate that.

 

If it were me, I'd go with a virtual machine and compile PHP from source for the version he's running.

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.