I am configuring a Ubuntu 14.04 web server at Amazon Web Services. I have the latest PHP5.5 installed as base, but I am using PHP Farm so that I can use PHP5.4.31 for a specific project that requires Zend Guard, which is only compatible with PHP up to 5.4.x. I added these lines to my custom php.ini
zend_extension=/usr/local/php/ioncube_loader_lin_5.4.so
zend_extension=/usr/local/php/ZendGuardLoader.so
So, everything works fine, but when I compile the PHP custom build I get this in the end:
Cannot load the ionCube PHP Loader - it was built with configuration API220100525,NTS, whereas running engine is API220100525,NTS,debug
Cannot load Zend Guard Loader - it was built with configuration API220100525,NTS, whereas running engine is API220100525,NTS,debug
Now from what can be seen, the builds are the same, the only differnce is:
API220100525,NTS vs. API220100525,NTS,debug
What I understand from this is that the PHP Zend Engine is running in Debug mode, but I can't seem to find how to disable debug mode so that the extensions can be activated.
Any ideas?
I just stumbled upon the same error.
Thanks to Marc B's hint I had a look into PHPFarm's compile.sh
There's a standard-option defined:
--enable-debug
just remove this line, delete your compiled php stuff in
/path/to/phpfarm/src/php-5.x
and recompile with
./compile.sh 5.x
Afterwards you should have a non-debug version which will work with ZendGuardLoader
Related
I have recently installed Windows Server 2016 and I'm trying to get my IIS 10 set-up to create a site.
The PHP 5.6.30 installed just fine, but the PHP Manager 1.2, WinCache 1.3 for PHP 5.6 and CGI didn't install!
The dialog image:
The PHP Manager log: http://pastebin.com/Y9Ud1XUU
The WebPI log: http://pastebin.com/H13fJU0Z
I've tried setting the MajorVersion to 7 (and other values), but the installer still fails. I have .NET 4.5> installed.
as far as i know this addon/tool has not been working since the release of Windows Server 2012 R2.
i have still to find Another tool like it, but so far nothing has come up
though i have found this solution:
https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings/php-manager-for-iis-on-windows-10/33ef32f0-6a86-4803-abc1-6de81110f9a8
(confirmed to work, just remember to restart the IIS manager)
PHP Manager requires .NET Framework 3.5 installed and may require a small hack in the registry as outlined here:
I was able to find a workaround at the PHP manager's site.
Just make sure you have .NET 3.5 installed and modify the following registry:
HKLM/System/CCS/Services/W3SVC/Parameters/MajorVersion
The value is 10 (Ax0). Just change the value to 9 (or 8), then try to install it again.
To avoid future issues with other IIS stuff, change back to 10 (Ax0). It seems that PHP Manager validates the value converting it into string or something related.
On my Windows Server 2016 machine for some reason the Web Platform Installer (downloaded from https://php.iis.net/) gave me a less recent PHP version (5.3.28) than yours, but all components were correctly installed, with the exception of PHP Manager (which I was expecting given it has been discontinued, and I didn't really care anyway...):
Also, if you want, you can install the components manually, by following this detailed post:
Steps to Install PHP manually on Windows 2016 server
It's really not complicated and it will give you a better understanding of what is not working, should that be the case.
With the help of above article I could also verify that the Web Platform Installer did not miss any important parts (modifying php.ini as required by extensions, setting environment variables, and so on).
Hope it helps.
We have several Windows Server 2012 R2 servers with PHP Manager running without problems (sorry Robert). I have just setup a new one and added PHP Manager and others by installing PHP 5.6 with Web Platform installer. The only thing needed extra was .NET 3.5. Have you tried to setup with .NET 3.5 installed?
When you try to install PHP Manager using the direct download link, the setup will ask you to install .NET 2.0. That isn't necessary :).
I'm trying to install zend-escaper but I'm getting this error:
This is strange as my PHP version (from phpinfo()) is 5.5.19, the message claims it is 5.3.5(!) which should satisfy the requirement anyway.
My ZF version is 1.12.13
I'm using PHP Storm
Can anyone help please?
Thanks
Tomasz
The PHP version on the command line can be a different executable than the PHP running inside the web server. It also can use a different pho.ini configuration file.
So if Composer states the PHP it is using is 5.3.5, this is correct because Composer is directly asking the PHP it is running on for its version. The problem is when this PHP version on the command line is way older then the PHP version in the web server.
Try to update your command line PHP.
Some more things to say: the version 5.3.5 is lower than the required 5.3.23, because the last number in the version is 5 compared with 23, and 5 is less than 23. So the version you are using is below the minimum requirement for zend escaper - at least in the version 2.5.1 you try to use. Such an old PHP was last supported in the 2.2 framework versions, so you might as well try to depend on ~2.2. However this will simply be a workaround for the old cli version.
One other note: You are in the process of installing a zend framework 2 component - don't expect your installed zend framework 1 to support any fancy stuff on its own. It is possible to mix classes with namespaces and without, and even use zf2 things together with zf1, but zf1 won't offer any automatic functionality to use these.
I'm trying to find a copy of the Zend debugger for PHP 5.4.
I've followed the various tutorials on the web telling me to download the Studio Web Debugger from the zend website, but unfortunately it only contains the binaries for PHP 5.3 (and below). I can't seem to find any mention anywhere of the Zend Debugger for PHP 5.4 ... it seems like they no longer make it and instead want you to use their full Server product instead.
Amazingly, Zend, "The PHP Company", will sell you Zend Studio, but they will not package a 5.4 version of the Studio Debugger in the related download. I would think they could get an updated version out since 5.4 has been released for over a year...
In any event, a work around has been making the rounds on the Internets.
Here is a full set of instructions for a Debian based system.
It was based largely on this Zend Forum post...
http://forums.zend.com/viewtopic.php?t=47568&f=59#p148893
The gist is to lift a 5.4 debugger file from an old Zend Server download an use it instead.
Many thanks to the original posters.
I had the same problem - however recent versions of the debuggers for php 5.3.x and php 5.4.x are included in the free version of Zend Server, so you can install that, make a copy of the .dll or .so that you need, and then uninstall it.
I did this to get at a version of ZendDebugger.dll that would work with php 5.3 and Zend Studio 10, but there is a 5.4 version of Zend Server aswell.
Currently PHP 5.3 hosting environments have to install and use "Zend Guard Loader" extension to process and execute Zend Guard encoded files. I was unable to make it execute files that were encoded for use with Zend Optimizer (PHP 5.2).
Any workaround for this?
I don't think so... I am also stuck with using php 5.2 because of that.
If you want to run zend encoded 5.2 scripts using "Zend Guard Loader", you will need to fork out more money and buy the new version to encode the scripts again.... sad.
The only way that worked for me was to include php 5.2 file instead of Zend Guards message that is displayed when no zend guard loader found with if condition checking php version. Dirty, but working, yet 2 files still required to be present, but no need to have loader switching them in unprotected code.
To answer the Encoding vs. Runtime in Zend Guard/Optimizer/Loader context - they should perfectly match. The accepted answer is incorrect - there is no tweak to execute PHP 5.3 encoded files in Optimizer loaded in PHP 5.2.
Maintaining 2 target versions is very easy if you script / batch your encoding process when you have code updates. You just execute your source encoding once with zendenc52 and then with zendenc53, giving them different target directories.
More about that. PHP 5.3 code is different from 5.2, and you should actually have 2 different branches for your sources matching those versions.
Old News: http://php.net/manual/en/migration53.php
When testing / staging a Zend Guard encoded application, make sure you test the encoded version (and debug the open sources of course as needed). The reason is simple - encoded files have some overhead of data tables which handles obfuscation, and might change PHP functionality with some advanced PHP syntax. If any issue is found in encoded files while testing - it is easy to locate and fix the source. If you test only the source version and then encode and deploy to your customers - result is unpredictable.
As for deployment, when you install/untar/git/svn deploy your PHP files, you can either stick the PHP target version to your releases / downloads / code pushes, so they install in the correct version, or deploy 2 versions in different document root locations, and you can symlink / rewrite to the correct Guarded application version matching the PHP target version 5.2 or 5.3.
Last but not least. The supported runtime for Zend Guard is Zend Server. It has a community edition and anyone can install it free of charge (or purchase licensed components if needed extra boost and monitoring) on supported OSs, via native package managers for DEB / RPM or installation file (Windows, Mac, Other Linuxes not supported with native package managers). Zend Server optional Loader component will handle the encoded application files, and it comes with PHP 5.2 and 5.3 branches, so there is no need to manually install Zend Optimizer or Loader on your PHP. Upgrade from PHP 5.2 to 5.3 is easy and native when applications (encoded and open source) were properly migrated.
Hope this helps.
I had installed XAMPP, as a matter of convenience, since it installs php, apache (which is what I need) and, in addition, it installs other things like MySQL, but I'm not going to use now.
In XAMPP, I enabled the mssql module (editing the php.ini), to use the connection to Microsoft SQL, and everything works fine.
Now, I'm wanting to debug a script in PHP debugger with ZendStudio and I notice that there are two ways:
Internal
Server
[Internal], uses the ZendStudio "internal" PHP.
[Server], connect to a server (which is what I need).
The point is that I can not do it, I can not understand how it is configured.
I would like to use with the XAMPP apache and php.
I use Internal for now, but I get problems with the mssql module. I was looking at the Zend internal php, copied by hand the mssql dll and edited the php.ini (I am talking about the Zend) but still not working.
Any ideas?
You will need to install either Zend Debugger or xdebug on the server, and then configure Zend Studio accordingly. Both are fairly easy to install on XAMPP, and there are many articles available through Google that detail installation better than I can here.
If you choose to go with Zend Debugger, you shouldn't need to do anything else in Zend Studio, as it is the default debugger. If you opt for xdebug, you will need to edit your Studio configuration to use xdebug instead. This option can be found under PHP > Debug, and is a drop-down labeled PHP Debugger.
Now you can start a debugging or profiling session using the Zend Studio browser toolbar, or from the Remote Debug or Remote Profiling buttons in Studio. I highly suggest reading the Zend Studio manual for some more advanced debugging information.
Also, just to throw this out there, you can replace XAMPP with Zend Server Community, which has Zend Debugger installed and configured by default. Studio 7+ will pick up a Server installation and configures itself to use it automatically.
I'm not all that familiar with ZendStudio, but wouldn't you just use the "Server" option and point to http://localhost/ for the server to connect to?