Page 1 of 1

switch_php.sh !

PostPosted: 06. May 2012 13:29
by magj
Hi

I know this"Only latest version is supported" and "Older versions are unsafe" things and I searched forum in the hope that could find an answer with no luck(read 20+ full threads :shock: ) , Sorry if it seems silly but my scenario makes me do so in my LAN.

I want to have PHP4 with xampp.

I know that the 1.6.8 is the last version to support PHP4 (+5) . I downloaded and installed it but there is no php4 there and I couldn't find a php_switch.sh file or a documentation to switch back to PHP4.

How may I do that? , I'm a little bit new to Linux

ANY help would be GREATLY appreciated
Regards
magj

Re: switch_php.sh !

PostPosted: 06. May 2012 21:46
by JonB
First - LAMPP is not a LAMPP stack, it runs from a bash script -- /opt/lampp/lampp . That script is 'self-documented'. I have never had cause to use the PHP4 option that is part of the script, but I know it (the switch) existed in more than one version as I have run 1.73 and 1.74 for Linux. They have not been rigorous in cleaning up the script, and there may be parts that don't work, period. I'm not going to break my LAMPP box trying this out - In version 1.7.4, at line 497 you appear to have the option to switch PHP versions. I suggest you read the whole script and grok what you can, as it is the key to understanding LAMPP. I don't think that option is vaiable in the later releases, just as webmin is no longer shipped with LAMPP. Have a look and then read the rest of this post.

Code: Select all
"php4")
      /opt/lampp/share/lampp/activatephp 4
      ;;

"php5")
      /opt/lampp/share/lampp/activatephp 5.3.5
      ;;


If the same folder is RELEASENOTES - which indicates that 1.6.8a may have been the last version to ship with PHP 4 embedded,

Second - I take it from your post you DL'ed 1.6.8. We ask that you fix your profile (User Control Panel) with the version of XAMPP and host OS, so we don't have to ask or dig around for that info. On Linux the Distribution and version might even be more important than it is on Windows.

Thanks and good luck
8)