NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problems upgrading to php version 5.5 with PHPEd version 15


Joined: 09 Apr 2013
Posts: 19
Reply with quote
I have just downloaded phpEd version 15 but am having trouble getting the new version to work with php 5.5. When I run phpinfo() the php version displayed is 5.3.18 (which is bad) and the debugger version is 7.5.2 (which is good). I am using TechPlat. I have run the Settings Wizard in Project Properties and no problems there. I have even gone to Tools->Settings->Run & Debug->SRV Web Server (and PHP CLI) to point 'PHP 5.3 and higher' to the php 5.5 executable (I wouldn't think this is necessary as I'm running on a local apache web server using HTTP).

In my previous upgrades I didn't have this problem, and looking around hasn't helped. Your help is appreciated.

_________________
km
View user's profileFind all posts by redriver210Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I thought the latest TechPlatform was only up to PHP 5.4; I've got that one installed myself.

Bear in mind that PhpED includes support for PHP 5.5 and whilst SRV might come with PHP 5.5, you do need to separately update your Apache web server to 5.5

If TechPlatform is not yet at 5.5 you might have to choose a different XAMP(P) package, maybe https://www.apachefriends.org/
View user's profileFind all posts by plugnplaySend private message


Joined: 09 Apr 2013
Posts: 19
Reply with quote
Okay, in the interest of simplicity I'll follow your lead and target php 5.4 instead of 5.5. However, I have no idea how to tell phpEd which version of php I want to use. I have downloaded both the x64 and win32 versions (I have a Windows 8.1 machine) and both versions are using php 5.3. In the apache config file I have the following directives:

LoadModule php5_module php/php5apache2_2.dll
DirectoryIndex index.php index.html
AddType application/x-httpd-php .php .php5

I changed the LoadModule directive to:

LoadModule php5_module C:/Program Files (x86)/NuSphere/PhpED/php54/php5apache2_2.dll

hoping that apache would look for php in the php54 folder, but that didn't work (apache didn't like it). So, I'm at a loss. How do I tell PhpED to use php 5.4 instead of php 5.3.

_________________
km
View user's profileFind all posts by redriver210Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
You tell PhpED what parsing and checking you want it to do for specific versions of PHP / HTML / CSS

PhpED itself does not use PHP when running your project, the web server (eg SRV, Apache or IIS) does.

Because PhpED comes with a web server called SRV and also comes with PHP CLI support, if you are using SRV or CLI then you can tell PhpED which version of PHP you want to target with those. You cannot do that with your own web server (eg Apache or IIS) because the PHP is effectively built into your web server.

PHP can be built in a variety of ways and comes with a whole load of binary components in addition to the single one you tried to implement. The versions of PHP that come with PhpED are built by NuSphere to work with SRV and CLI. Whether those PHP modules can be used with other web servers, I have no idea, but there can be a variety of reasons that those NuSphere PHP modules are not suitable for at least some web servers. Also, that leaves your old php.ini in use and the old php.ini is possibly not compatible with the new version of PHP, plus that php.ini will also still be loading lots of older binary components from the older PHP.

I'm not saying you couldn't get the PhpED PHP to work with some other Apache web servers, I'm just saying it doesn't sound like a good idea and you might end up with a mess.

To be clear, PhpED does not come with different versions of fully built PHP installs intended for you to use with your own web servers. It does come with the ability to change the PhpED parsing/checking to target different versions of PHP, but PhpED will still use whatever PHP is on your own web server.

Some web servers can be configured to support a specific version of PHP for individual web sites. On my Plesk servers in the hosting control panel I can click a dropdown and select a version of PHP. On my Windows server it was easier for me to run two versions of TechPlatform and I configured the one with port 80 to use PHP 5.2 and the one with port 86 to run with PHP 5.4. So I have two Apache's running, each with totally separate settings and versions of PHP. If I want to run a site with PHP 5.4 then I change the project to use http://mysitename.xxxx:86

It is up to you to manage your own web server and implement different versions of PHP, which is the line you've started going down, but I don't think you can tell your web server to load the PhpED PHP module, you need to either 'properly' install a new version of PHP for your Apache, or install a XAMP(P) that already has the PHP version that you want.

To tell PhpED which version of PHP you want to target for parsing/syntax checking, either set the default in Tools > Settings > Code Insight > Settings > Parser Properties or for individual projects using Project Properties > Run & Debug > Parser Properties.

If you are using the SRV web server then you can change the PHP version support for SRV using Tools > Settings Run & Debug > Settings and that does change the version of PHP which is used.

Note that NuSphere is very clear when selecting PHP versions; it shows SRV when you are selecting an actual version of PHP which will be run and it shows parser when you are selecting a version of PHP that is targeted, but if you are not using SRV it cannot change which version of PHP is run.
View user's profileFind all posts by plugnplaySend private message


Joined: 09 Apr 2013
Posts: 19
Reply with quote
That is tremendously helpful. Couple of follow-ups:

1. I could have sworn that when I downloaded PhpED v15 multiple versions of php came with the download. Was I wrong or can I assume that what I saw were the SRV and CLI versions of php provided by NuSphere.
2. You're also saying that when I first downloaded TechPlat, php did not come with that download (or was it again the SRV and CLI versions only).
3. If I want to download php 5.4 should I download it into TechPlat/apache?
4. Does PhpED expect a certain folder name for php (ie: TechPlat/apache/php) or doesn't it care.

Again, thanks so much for the detailed explanations. Now I know why I was so confused.

_________________
km
View user's profileFind all posts by redriver210Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
PhpED comes with multiple versions of PHP for supporting its own SRV/CLI methods of running projects. Whilst that might be specific versions such as 5.2 and 5.5, in the default PhpED settings those PHP versions are broadly referred to as 5.0-5.2 and 5.3+.

There have been specific versions of PhpED intended for targeting specific versions of PHP; I'm not sure why they were released as separate PhpED installers, but it is still up to you to install PHP in your web server.

PhpED does come with multiple builds/versions of the DBG module for many web servers, probably supporting every 'normal' Windows / Linux / Mac web server that is commonly used. That is quite a lot of modules, but PhpED does have a DbgWizard to help you select a DBG module and install it.

Under some circumstances with a local web server I believe PhpED can even install the DBG module for you. I always work with remote web servers (don't have a local web server) so always have to install the DBG module manually.

TechPlatform does come with PHP, but the current version of TechPlatform is PHP 5.4. Originally I had the PHP 5.2 version, I myself missed the 5.3 version and now the latest is PHP 5.4

When I installed TechPlatform 9 (with PHP 5.4) I installed it in a different directory to my old TechPlatform, so I ended up with multiple Apache services and a different version of PHP in each.

If you want PHP 5.4, you can either choose to install it into an existing web server (potentially complex if you can't find a compatible build) or install a ready-to-go build that includes PHP. If you install PHP yourself, you then also have to consider whether you have all the extension modules that tend to come with TechPlatform and many XAMP(P) builds. Using XAMP(P) is often easier.

TechPlatform is different to most XAMP(P) builds because it does not include MySQL or Perl, I guess it could be considered a WAP (Windows Apache PHP).

It sounds like you might have the TechPlatform with PHP 5.3, so if you are happy with PHP 5.4 rather than 5.5 then you could use the latest TechPlatform, otherwise I suggest finding a WAMP(P)/XAMP(P) build that includes PHP 5.5.

I have a some legacy PHP 5.2 projects that do not run properly on PHP 5.3+ so have to run multiple versions of PHP.

PhpED does not care where your web server PHP is, because it does not access it when working with projects. Normally on Windows PHP is installed under the Apache install directory, but on a Linux server could be somewhere else. PhpED uses the PHP version specific rules for parsing/syntax checking but PhpED does not itself run your project, so does not need to directly access your PHP.

The NuSphere DBG module does need to be installed into your PHP and that is how PhpED communicates with your running project.
View user's profileFind all posts by plugnplaySend private message


Joined: 09 Apr 2013
Posts: 19
Reply with quote
Again, excellent info. Is it safe to assume that any version of PhpED will support any version of TechPlatform?

_________________
km
View user's profileFind all posts by redriver210Send private message


Joined: 09 Apr 2013
Posts: 19
Reply with quote
I decided to install the newest version of Tech Platform but having multiple problems with permissions, etc. Is there a defined process for doing an upgrade? Of course I'd like to keep my work and configuration files intact. When you do a Tech Platform update you you remove the previous version first? How do you do it?

_________________
km
View user's profileFind all posts by redriver210Send private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
I don't know if there is an upgrade process.

My original TechPlatform was PHP 5.2 and I wanted to keep that, so I installed the later version in a TechPlatform9.0 directory and got a separate Apache service. Then I edited the newer Apache config files and copied some over (mostly from the conf/extra directory) to duplicate most of the settings. Both services run fine and are totally independent of each other.

Because the two Apache services ended up with the same name, I did manually rename them so they show differently in Task Manager and are easy to identify for restarting them.

You might want to consider installing in a different directory then uninstalling the older TechPlatform if you do not want it any more.

PhpED should support *any* Apache / IIS server as long as it is running PHP and has a working DBG module.

Different versions of PhpED do have a requirement for specific versions of the DBG module and if those are mismatched, you can get strange things happening when debugging. Newer versions of PhpED will probably warn you about the version mismatch.

This does mean that you possibly could not have both PhpEd 9 and PhpED 15 debugging through the same web server, unless you have the ability to load a different DBG module for each site. Out of the box, TechPlatform does not allow that, you would need to create a somewhat more complex Apache config.
View user's profileFind all posts by plugnplaySend private message


Joined: 09 Apr 2013
Posts: 19
Reply with quote
I think I'm on top of things again. Thanks for all the detail...that really helped!

_________________
km
View user's profileFind all posts by redriver210Send private message
Problems upgrading to php version 5.5 with PHPEd version 15
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic