Different PHP Version not work

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Different PHP Version not work

Postby Gae58 » 15. May 2016 10:08

Hello,
I installed the version xamp (xampp-win32-7.0.5-0-VC14-installer.exe) and since I have to work locally with drupal 7:08 I followed the directions to install different versions of php.
I created a folder called php-5.4.45 and copied the contents of the file (php-5.4.45-Win32-VC9-x86.zip).
I changed the signs in httpd-xampp.conf file:
#
# PHP-Module setup
#
#LoadFile "C: /xampp/php/php7ts.dll"
#LoadFile "C: /xampp/php/libpq.dll"
#LoadModule Php7_module "C: /xampp/php/php7apache2_4.dll"

#LoadFile "C: /xampp/php-5.6.21/php5ts.dll"
#LoadFile "C: /xampp/php-5.6.21/libpq.dll"
#LoadModule Php5_module "C: /xampp/php-5.6.21/php5apache2_4.dll"

LoadFile "C: /xampp/php-5.4.45/php5ts.dll"
LoadFile "C: /xampp/php-5.4.45/libpq.dll"
LoadModule php5_module "C: /xampp/php-5.4.45/php5apache2_4.dll"

I run phpinfo and the indication of the php version changes and stands with the setting.

Since installing drupal 7 returns me error in php-4.5.45 folder, I changed a few settings of the php.ini.
I notatao the memory_limit parameter that I brought 256M in phpinfo me always brings to 128.

It means you do not read the php.ini php-4.5.45 folder, but the php folder.

In the lines of: httpd-xampp.conf I also changed
<IfModule php7_module>
    PHPINIDir "C: / xampp / php"
</ IfModule>

in

<IfModule php7_module>
    PHPINIDir "C: /xampp/php-5.4.45"
</ IfModule>

But it returns me an error. You should also use the php version (php-6.5.21)

Can you tell me where I'm wrong?

Thank you
Gaetano
Gae58
 
Posts: 5
Joined: 19. April 2016 16:40
XAMPP version: 3.2.2
Operating System: Gaetano

Re: Different PHP Version not work

Postby Nobbie » 15. May 2016 10:55

Gae58 wrote:Hello,
I installed the version xamp (xampp-win32-7.0.5-0-VC14-installer.exe) and since I have to work locally with drupal 7:08 I followed the directions to install different versions of php.


There is no directions to install different PHP in Xampp. Xampp/Bitnami does not recommend to change any tool of the package. If you did so, due to a foreign hint, you should ask for help there, as this is out of the scope of Xampp.

If you like to use Xampp and need an older PHP version, you should go for an older Xampp release which supports that PHP version. You will find all Xampp versions on Sourceforge.
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04

Re: Different PHP Version not work

Postby Gae58 » 15. May 2016 11:15

I thank you the answer, but in this case what should I do, to install two versions of xampp, one for 5 and one for 7? They do not conflict?

For cusriosità at this link:
http: //localhost/dashboard/docs/use-different-php-version.html

there is an indication of how to do to be + versions of php and is present in the how-to guides xampp:

Use a Different PHP Version

In many cases, you might want to use XAMPP with a different PHP version than the One That comes pre-installed. You might do this to get the benefits of a newer version of PHP, or to reproduce bugs using an earlier version of PHP.

To use a different version of PHP with XAMPP, Follow these steps:

    Download a binary build of the PHP version That you wish to use from the PHP website, and extract the contents of the compressed archive file to your XAMPP installation directory (usually, C: \ xampp). Ensure That You give it a different directory name to avoid overwriting the existing PHP version. For example, in this tutorial, we'll call the new directory C: \ xampp \ php5-6-0.
    Ensure That the PHP build you download matches the Apache build (VC9 or VC11) in your XAMPP platform.

    Within the new directory, rename the php.ini-development file to php.ini. If you prefer to use production settings, you could instead rename the php.ini-production file to php.ini.

    Edit the httpd-xampp.conf files in the apache \ conf \ extra \ subdirectory of your XAMPP installation directory. Within this file, search for all instances of the old PHP directory path and replace them with the path to the new PHP directory created in Step 1.

    In Particular, be sure to change the lines

    LoadFile "/xampp/php/php5ts.dll"
    LoadFile "/xampp/php/libpq.dll"
    LoadModule php5_module "/xampp/php/php5apache2_4.dll"

    to

    LoadFile "/xampp/php5-6-0/php5ts.dll"
    LoadFile "/xampp/php5-6-0/libpq.dll"
    LoadModule php5_module "/xampp/php5-6-0/php5apache2_4.dll"

    Remember to adjust the above file and directory paths to reflect valid paths on your system.

    Restart your Apache server through the XAMPP control panel for your changes to take effect.

The new version of PHP Should now be active. To verify this, browse to the URL http: //localhost/xampp/phpinfo.php, Which displays the output of the phpinfo () command, and check the version number at the top of the page.
Gae58
 
Posts: 5
Joined: 19. April 2016 16:40
XAMPP version: 3.2.2
Operating System: Gaetano

Re: Different PHP Version not work

Postby Nobbie » 15. May 2016 12:27

I dont agree to that, if Bitnami changes its mind to recommend different PHP as module, they can do the support, i dont do it.
Nobbie
 
Posts: 8780
Joined: 09. March 2008 13:04

Re: Different PHP Version not work

Postby Gae58 » 15. May 2016 15:55

ok thank you
Gae58
 
Posts: 5
Joined: 19. April 2016 16:40
XAMPP version: 3.2.2
Operating System: Gaetano


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 40 guests