Can wamp run PHP4 and PHP5 side by side?
Posted by: sTimulated (---.cable.ubr05.cast.blueyonder.co.uk)
Date: July 03, 2009 04:32PM

I have some software that works with PHP4.
Unfortunately wamp and my forum use PHP5.

Mostly the software works but it does generate a lot of errors.

I can only see 2 ways of correcting my problem.

1:-Paying someone to alter the software to work with PHP5.
2:-Somehow configuring wamp to let ONLY the software use PHP4.

I had installed PHP4 into a test enviroment and while the software worked my Forum did not.

Is there anyone who can help me or point me in a suitable direction?

Many Thanks

Options: ReplyQuote
Re: Can wamp run PHP4 and PHP5 side by side?
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: July 03, 2009 06:15PM

Your PHP scripts should run fine regardless of the version you're using.

What are the errors you are getting? If you're getting a lot of undedfined variable errors then it may mean your script replies on a setting called register globals which is disabled by default in PHP5.

You can enable register_globals for your script only by placing a .htaccess file in the folder your script is located in. Place the following code inside your .htaccess file

php_flag register_globals On

Options: ReplyQuote
Re: Can wamp run PHP4 and PHP5 side by side?
Posted by: sTimulated (---.cable.ubr05.cast.blueyonder.co.uk)
Date: July 03, 2009 06:43PM

Thanks for trying to help.

I tried that and it doesn't work sad smiley

Errors.....
Notice: Undefined index: qualyfile in C:\wamp\www\stimulatedgaming\rfactorreport\src\index.php on line 33

I also tried enabling the register globals setting in PHP settings.

Options: ReplyQuote
Re: Can wamp run PHP4 and PHP5 side by side?
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: July 03, 2009 06:48PM

simple

either declare your varibable in the script


or turn off warnings in php5


in the php.in

change

error_reporting =E_ALL

to

error_reporting = E_ALL ~ E_NOTICE


its fully explain in the php.ini just above the line u need to change..

then restart wamp

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Can wamp run PHP4 and PHP5 side by side?
Posted by: sTimulated (---.cable.ubr05.cast.blueyonder.co.uk)
Date: July 03, 2009 07:38PM

stevenmartin99 Wrote:
-------------------------------------------------------

> or turn off warnings in php5
>
>
> in the php.in
>
> change
>
> error_reporting =E_ALL
>
> to
>
> error_reporting = E_ALL ~ E_NOTICE
>
>
> its fully explain in the php.ini just above the
> line u need to change..
>
> then restart wamp


sad smiley not worked also

I have no idea how to "declare your varibable in the script"

p.s
This program is not mine,it is a freely available package found here
[code.google.com]



Edited 1 time(s). Last edit at 07/03/2009 07:44PM by sTimulated.

Options: ReplyQuote
Re: Can wamp run PHP4 and PHP5 side by side?
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: July 03, 2009 08:15PM

Looking at the script everthing runs fine. There are no problems with the script its just poorly coded.

If you dont errors to be displayed for that script only then add the following line

ini_set('display_errors', 'Off');

before the following in rFactor/index.php

// read URL parameters

No errors will no be reported when you use that script.

You disable errors globaly by editing the php.ini as stevenmartin99 suggested before

Options: ReplyQuote
Re: Can wamp run PHP4 and PHP5 side by side?
Posted by: sTimulated (---.cable.ubr05.cast.blueyonder.co.uk)
Date: July 03, 2009 08:31PM

grinning smiley
Nice one c2dan that did the trick

If your ever near Falkirk let me know so I can buy you a beer or 3

Thanks.

Options: ReplyQuote
Possible to run 2 instances of wamp?
Posted by: sTimulated (---.cable.ubr06.cast.blueyonder.co.uk)
Date: July 15, 2009 04:34PM

I've come across another problem.

Comparing these 2...
[www.vrl-simracing.be]

[www.stimulatedgaming.com]

If you click on history graph or lap by lap graph one works one doesn't.

I've researched into the problem.
The graphs are made by jpgraph from here..[www.aditus.nu]
I'm presuming the author of the software used the PHP4 version which states that it won't run on PHP5.

I've downloaded both versions,changed files,swapped files etc etc and got nowhere.

Would it be possible to install another wamp to a different directory/HD and have it run PHP4?

Options: ReplyQuote
Re: Can wamp run PHP4 and PHP5 side by side?
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: July 15, 2009 07:42PM

You cannot expect your code to work by simply updating the files to jpgraph. You may need to update the code in your files that interact with jpgraph.

It is not possible to run multiple versions of WAMP.

Options: ReplyQuote
Re: Can wamp run PHP4 and PHP5 side by side?
Posted by: sTimulated (---.cable.ubr06.cast.blueyonder.co.uk)
Date: July 15, 2009 10:41PM

c2dan Wrote:
-------------------------------------------------------
> You cannot expect your code to work by simply
> updating the files to jpgraph. You may need to
> update the code in your files that interact with
> jpgraph.
>
> It is not possible to run multiple versions of
> WAMP.


I didn't think so on both counts but I had to ask smiling smiley

Thanks

Options: ReplyQuote


Sorry, only registered users may post in this forum.