Jump to content


Photo

US503->PHP 5.2.10


  • Please log in to reply
7 replies to this topic

#1 happyotter

happyotter

    Newbie

  • Member
  • Pip
  • 2 posts
  • Main OS: Windows XP

Posted 27 August 2009 - 12:03 PM

Greetings,

Everything is working fine for me in UniServer 5.03.
But, Drupal is not compatible with PHP 5.3
I would like to use PHP 5.2.10 instead
But, I have not been able to install it correctly.
I tried copying the PHP directory from UniServer 4.3 into \usr\local\php

When I click Start_Server.bat there are many many error messages which I think are related to...
usr\local\php\php.exe -n unicon\main\start_servers.php
which is calling\unicon\main\includes\functions.php

examples...
Warning: fclose(): supplied argument is not a valid stream resource in D:\UniServer503\unicon\main\includes\functions.php on line 606

Warning: opendir(__DIR__): failed to open dir: No such file or directory in D:\UniServer503\unicon\main\includes\functions.php online 828

Warning: readdir(): supplied argument is not a valid Directory resource in D:\UniServer503\unicon\main\includes\functions.php on line 830

Warning: closedir(): supplied argument is not a valid Directory resource in D:\UniServer503\unicon\main\includes\functions.php online 856

Warning: fopen(__DIR__/unicon/main/location_tracker.txt): failedto open stream: No such file or directory in D:\UniServer503\unicon\main\includes\functions.php on line 593 can't open file

----
606 = fclose($fh); // close file handle
828 = $dirlist = opendir($start_dir); // Open start directory
830 = while ($file = readdir($dirlist)){ // Iterate through list
856 = closedir($dirlist); // Close handle
-----
$fh seems to come from
....
function get_mysql_password(){
global $usf_mysql_passwd; // Password file
$fileName = $usf_mysql_passwd;

$fh = fopen($fileName, 'r'); // Open file for read
$Data = fread($fh, filesize($fileName)); // Read all data into variable
fclose($fh); // close file handle
----
Thank you for any help you can offer.
-HappyOtter

#2 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 27 August 2009 - 03:43 PM

It should not be too difficult try the following:

The magic constant __DIR__ is PHP5.3 specific hence replace with dirname(__FILE__) see below

1 Start with Clean copy of 5.3 run it once this rewrites all absolute paths (stop servers and close Unitray)

2 Rename folder UniServer\usr\local\php to UniServer\usr\local php53 need this for reference see step 3

3 Copy php folder from 4.3 to UniServer\usr\local (you now have two folders php and php53)

4 Use something like portable Win Merge compare php.iniís
UniServer\usr\local\php\php.ini
UniServer\usr\local\php53\php.ini
Where you see an absolute path in php53 copy it across (in other words replace all relative path for absolute paths) these are a minimum

include_path
user_dir
extension_dir
upload_tmp_dir
soap.wsdl_cache_dir
eaccelerator.allowed_admin_path
session.save_path

5 Make two copies of php.ini name them
php.ini_delvelopment_nano and php.ini_production_nano

These are switched in using UniTray and overwrite pnp.ini (provides development and production switching you can change these to meet whatever you need)

6 Edit: UniServer\unicon\main\includes\config.inc.php

Replace __DIR__ with dirname(__FILE__)

7) Copy
Mona_4_3\UniServer\udrive\usr\local\apache2\bin\libmcrypt.dll
To:
Nano_5_3\UniServer\udrive\usr\local\apache2\bin\libmcrypt.dll

Thats it! Run the servers, the above should give you a starting point.

Once you are convinced it works copy folder UniServer to another location run the servers. This just tests rewriting of all paths, note performed once when server moved, hence checks it functions correctly.

All the best
Ric :)

#3 cgaugi

cgaugi

    Newbie

  • Member
  • Pip
  • 3 posts
  • Main OS: Windows Vista

Posted 26 December 2010 - 04:36 PM

Ric

Is this the same way I can downgrade from PHP 5.3.x to for e.g. 5.2.16?
- I have downloaded Uniserver 5.7.0 Nano.
- Unzipped un launched once as you described.
- Downloaded PHP 5.2.16 VC6 x86 Thread Safe and extracted to UniServer\usr\local\php, previously original directory renamed to UniServer\usr\local\php53
- Compared two php.ini files and copy-pasted absolute paths
- I have created copies of php.ini, copied eaccelerate.dll into extensions dir, which was renamed to match uniform one name convention.

It seems that UniServer\unicon\main\includes\config.inc.php does not need to be changes as it is ok
As well as UniServer\udrive\usr\local\apache2\bin\ does not originally contain libmcrypt.dll, so I did nothing here.

BUT when I launch Unitray and press Start Uniserver I gent an error:
Title: Apache.exe - Entry Point Not Found
Msg: The procedure entry point pass_two could not be located in the dynamic link library php5ts.dll

I have double checked the php directory and it does contain php5ts.dll.

Admin panel seems working so PHP and Apache is working but, what can cause an error?!

#4 cgaugi

cgaugi

    Newbie

  • Member
  • Pip
  • 3 posts
  • Main OS: Windows Vista

Posted 28 December 2010 - 01:58 PM

Ric

Is this the same way I can downgrade from PHP 5.3.x to for e.g. 5.2.16?
- I have downloaded Uniserver 5.7.0 Nano.
- Unzipped un launched once as you described.
- Downloaded PHP 5.2.16 VC6 x86 Thread Safe and extracted to UniServer\usr\local\php, previously original directory renamed to UniServer\usr\local\php53
- Compared two php.ini files and copy-pasted absolute paths
- I have created copies of php.ini, copied eaccelerate.dll into extensions dir, which was renamed to match uniform one name convention.

It seems that UniServer\unicon\main\includes\config.inc.php does not need to be changes as it is ok
As well as UniServer\udrive\usr\local\apache2\bin\ does not originally contain libmcrypt.dll, so I did nothing here.

BUT when I launch Unitray and press Start Uniserver I gent an error:
Title: Apache.exe - Entry Point Not Found
Msg: The procedure entry point pass_two could not be located in the dynamic link library php5ts.dll

I have double checked the php directory and it does contain php5ts.dll.

Admin panel seems working so PHP and Apache is working but, what can cause an error?!

Does anyone has a solution or at least a tip how to downgrade PHP?!

#5 Shyokou Ouyou

Shyokou Ouyou

    Member

  • Member
  • PipPip
  • 72 posts
  • Main OS: Windows XP

Posted 28 December 2010 - 09:05 PM


Notice you mean "Uniserver 5.7.0 Nano", which holds PHP 5.3.4 but already a big move from 5.3, it depends upon the interface compatibility between both ends to downgrade one ...

While the "pass_two" seems to be a PHP 5.2.x feature, it might not be fatal to launch in your situation, in case it disappeared in PHP 5.3.x ...

Obviously, you may have found the easiest "solution or at least a tip how to downgrade PHP", once you have a compiler and source code tarball, such that it is "at least" the bottom line of open source ...



Ric

Is this the same way I can downgrade from PHP 5.3.x to for e.g. 5.2.16?
- I have downloaded Uniserver 5.7.0 Nano.
- Unzipped un launched once as you described.
- Downloaded PHP 5.2.16 VC6 x86 Thread Safe and extracted to UniServer\usr\local\php, previously original directory renamed to UniServer\usr\local\php53
- Compared two php.ini files and copy-pasted absolute paths
- I have created copies of php.ini, copied eaccelerate.dll into extensions dir, which was renamed to match uniform one name convention.

It seems that UniServer\unicon\main\includes\config.inc.php does not need to be changes as it is ok
As well as UniServer\udrive\usr\local\apache2\bin\ does not originally contain libmcrypt.dll, so I did nothing here.

BUT when I launch Unitray and press Start Uniserver I gent an error:
Title: Apache.exe - Entry Point Not Found
Msg: The procedure entry point pass_two could not be located in the dynamic link library php5ts.dll

I have double checked the php directory and it does contain php5ts.dll.

Admin panel seems working so PHP and Apache is working but, what can cause an error?!


Does anyone has a solution or at least a tip how to downgrade PHP?!



#6 cgaugi

cgaugi

    Newbie

  • Member
  • Pip
  • 3 posts
  • Main OS: Windows Vista

Posted 29 December 2010 - 10:27 AM


Notice you mean "Uniserver 5.7.0 Nano", which holds PHP 5.3.4 but already a big move from 5.3, it depends upon the interface compatibility between both ends to downgrade one ...

While the "pass_two" seems to be a PHP 5.2.x feature, it might not be fatal to launch in your situation, in case it disappeared in PHP 5.3.x ...

Obviously, you may have found the easiest "solution or at least a tip how to downgrade PHP", once you have a compiler and source code tarball, such that it is "at least" the bottom line of open source ...

Does anyone has a solution or at least a tip how to downgrade PHP?!


I have found out what was the problem. It was eAccelerate it is suitable for certain verison only, so i have downloaded 6.2.14 thread safe version, but i have to use PHP 5.2.14 as well

#7 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 08 January 2011 - 06:53 AM

PHP has released 5.2.17 this release marks the end of support for PHP 5.2 series.
PHP strongly advise to update to this version immediately. Ideally you should downgrade the latest release of Uniform Server this allows any security updates for other components to be retained.

This one-off release is a downgrade of 5.7.1-Nano.
Components:

Apache 2.2.17
MySQL 5.5.8
PHP 5.3.5 Ė Downgraded to PHP 5.2.17
phpMyAdmin 3.3.9
Go-Pear 1.1.2
msmtp 1.4.21
eAccelerator 1.0-snv425

Download:
UniServer 5.7.1_5217-Nano

All the best
Ric :)

#8 jkurrle

jkurrle

    Newbie

  • Member
  • Pip
  • 2 posts
  • Main OS: Windows 7

Posted 08 February 2014 - 12:11 PM

I've found PHP 5.2 zipped up at http://windows.php.n...eases/archives/.  Can someone provide instructions how to package it up for UniServer version 11?  I also need PHP 5.2 for Drupal 7 compatibility (it still needs pass by reference) and am trying to troubleshoot an asynchronous stream_connect_client() error, which also may be related to version 5.2 vs later versions.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users