UniServer Coral and UniServerZ Running Wrong PHP Version - php

I've been baffled and frustrated that I've been trying to update one of our servers that my supervisor installed and when I run any PHP installed module, it starts with wrong version of PHP. The server always starts with PHP Version 5.4.19. Regardless of what module I installed and checked that the files run with, it always starts with that version according to phpinfo. Server runs MS Server 2008 R2. My objectives are to 1) Update PHP to Version 5.6. and 2) Use ZeroXI controller for modularity of the server.
Here's what I've found and checked so far:
Supervisor installed two types of Uniservers while trying them out: Uniserver Coral don't know which version, but I tried updating to Coral 8.9.2... Initially, I uninstalled the original services but cannot verify (1) What is the name of the service in order to verify that? Also all of the apache and mysql modules are stopped and ZeroXI can peacefully start apache and mysql.
The other uniserver is Uniserver ZeroXI 1.1.6. Oddly enough, there was an installed service that wasn't running so I uninstalled that as well. I can verify that us_apache_1 service is not running. I installed php_5_6_0 which the documentation says that it supports. However, even if php56 is selected and phpinfo verifies that
Loaded Configuration File C:\uniserver\core\php56\php_production.ini
Apache Environment:
PATH C:\uniserver\core\apache2\bin;C:\uniserver\core\mysql\bin;C:\uniserver\core\php56;C:\uniserver\core\openssl;C:\uniserver\core\msmtp;C:\uniserver\utils;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MySQL\MySQL Server 5.6\bin
Core:
extension_dir C:/uniserver/core/php56/extensions
Environment:
PHP_SELECT php56
Well, Apparently:
PHP Version 5.4.19
(2) Are there any other causes why the uniserver zeroxi uses 5.4.19 although it is set as php 5.6.0?
I have tried installing a new uniserver zeroxi controller under a different folder name, but to no avail, it consistenly still uses the same php version. Please let me know what other things that could point me to what is causing this.
Thanks in advance.

Just to update what happened and our solution and this may apply to various WAMPP installations as well...
We thought that
Configuration File (php.ini) Path C:\Windows
had nothing to do with our install of Uniserver. Apparently there is this errant php5ts.dll in the Windows folder. This file loaded the wrong version of php. As soon as we copied the dir/to/php/folder/php5ts.dll (c:\uniserver\core\php56\php5ts in our case), all of the modularity of unizerver zeroxi worked again.
For other WAMPP installs, you might want to check the same php.ini path in you phpinfo and if you have C:\Windows as the path, you can backup then copy the php5ts.dll file from the php installation folder to the Windows folder.

Related

Installing the Mongo PHP Extensions (php_mongo.dll)

Environment in local system
MAMP 3.2.2
PHP 5.6.24
Webserver Apache
Mongodb for caching is installed successfully and found running in MongoDBservice.
I Downloaded Mongodb drivers from https://pecl.php.net/package/mongodb (used thread safe versions PHP5.6 "php_mongodb.dll") selected php_mongo-1.1.8-5.6-ts-vc11-x64.zip, Made changes to php.ini as extension=php_mongo.dll
I just copied and pasted .dll file in my C:\MAMP\bin\php\php5.6.24\ext
So far good... After restarting my MAMP I cannot see mongo in phpinfo ---->This is my issue
Any idea about this?
Thank you
Just copying the DLL file to the correct directory is not enough. You also need to add the following line to your php.ini file before the MongoDB extension is available:
extension=php_mongo.dll
After that restart Apache and MongoDB should show up as an available extension in phpinfo().
By the way, that is also mentioned on the official PHP website for installing the MongoDB driver: http://www.php.net/manual/en/mongodb.installation.windows.php
Should be extension="php_mongodb.dll instead of extension="php_mongo.dll as it is the name of the file you copied.
In my case, I first downloaded a x64 version of php_mongo.dll, which did not show in phpinfo page. Then i downloaded a x86 version and everything works fine. Hope this helps.
PS. Make sure you pick the right php version.

How to install PHP 7 extension "memcache" on Windows

I'm having huge problems installing memcached extension for php.
Currently using:
OS: Windows 10 x64
PHP: 7.0.1 via XAMPP
Apache: 2.4.18 (Win32)
I have successfully installed memcached in C:/memcached the service is running.
But the problem starts when trying to add the memcache php extension. I've tried numerous versions of php_memcache.dll and non seem to be working. I did include the extension in php.ini extension=php_memcache.dll
When i run php -m memcache is not listed and at the top i recieve the error:
PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_memcache.dll' - The specified module could not be found.
And when I try running a test.php for memcache initialization i recive the Class not found exception
This is a huge problem, because I need it for running selenium tests.
The memcached service doesn't actually install the PHP memcached extension for you. It only installs the memcached server used to store your cache.
You'll need to download the Windows DLL from the PECL repository first (click on the blue Windows DLL link). Then you must add the extension=php_memcache.dll line to the correct php.ini file for your SAPI. Also, note the extension DLL file needs to be placed in the correct path for your XAMPP installation.
For Apache, simply create a script in your document root with the line <?php phpinfo(); and try loading that in your web browser. You should see a line at the top labeled Loaded configuration (php.ini) which gives you the full path to your loaded php.ini file. On Windows the path may actually appear different than what is stated in phpinfo() if you installed PHP through something like XAMPP. So you may need to rely on XAMPP to locate the correct php.ini file.
For the CLI SAPI, you can use php.exe --ini to do the same. Again, you may need to rely on the XAMPP package if it has modified your configuration path (since this is a compile time directive).
After making your changes to php.ini you will need to restart PHP for the changes to take effect.
Since you're using PHP 7 on Windows it's probably also important to note that the compiled DLL from PECL may not actually work under apache for Windows, because you're more than likely using a theaded SAPI. So make sure you are downloading the correct version. As far as I can tell that version is only compiled to work with up to PHP 5.6. The github alternative, for PHP 7, available at https://github.com/nono303/PHP7-memcahe-dll as mentioned in the comments is tested under non-thread safe. So you may only be able to get this working for your CLI scripts on Windows.

PHP extensions on MAMP 3.5

I have installed MAMP 3.5 with Apache 2.4.16 on Yosemite 10.10.5 and have run into some obstacles that I find hard to solve.
The first issue was that virtual host settings have changed in Apache but that I managed to fix.
The remaining problem is with extensions. I use gettext in an application and it can not be found.
php -v says PHP 5.6.10 (cli)
phpinfo() says PHP 5.5.27
php --ini says /Applications/MAMP/bin/php/php5.6.10/conf/php.ini
The php.ini path seems to be correct although phpinfo() says that extension_dir is /usr/lib/php/extensions/no-debug-non-zts-20121212
This seems very strange to me? The gettext extension is not in this directory but is found along with all other relevant extensions in the directory listed in the php.ini file for PHP 5.6.10 which is the one that should be used...
Any ideas what has gone wrong and how I can make PHP use the correct ini file?
CLI uses the installed version of OSX, MAMP uses it's own version.
The easiest way to use same version for both is to add the MAMP version first in your path in ~/.bash_profile.
export PATH=/Applications/MAMP/Library/bin/:/Applications/MAMP/bin/php/php7.0.0/bin/:~/bin:$JAVA_HOME/bin:$PATH
of course you need to replace the php7.0.0 part with the version you want to use.
Quit your terminal app and reopen it, and try php -v again.

cannot load php5apache2_2.dll

cannot load c:/PHP5/php5apache2_2.dll into server I am getting this error while running apache 2.2 on window XP machine
anyone have any idea what could be the problem. I can see there is no php5apache2_2.dll in c:/php5 folder.
What worked for me was obtaining php5apache2_4.dll-php-5.4-win32.zip from
apachelounge and using "php5apache2_4.dll" file from the "PHP 5.4.8" unzipped folder. I had apache 2.3.4 (32-bit) from apachelounge.com and php 5.4.9 (32-bit) from windows.php.net installed on my Win 7 (64-bit).
The dll worked despite 5.4.8 - 5.4.9 mismatch.
The corrsponding changes within "php.ini" and "httpd.conf" are to be maintained acoording to this helpful guide.
Best regards.
First you must downlaod de .dll file (php5apache2_2.dll)
then put it in your extensions directory.
Then edit your php.ini file, find de text:
;extension=php5apache2_2.dll
// and change y to
extension=php5apache2_2.dll
if the text is not present put the line yourself.
Then restart apache and it should load your extension.
PD: you can see where your extensions directory is located looking
for the text "extension_dir" in your php.ini, sometimes looks like:
extension_dir = C:\php\extensions
Hope this help you, if not please paste the error here, you can find
an error log file in apache/error/error.log or something like that.
You should download the dll file from PHP distribution package. And see three ways to set up PHP to work with Apache 2.x.
You can configure PHP as Apache handler in <[apache_home]>\conf\httpd.conf as follow:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
#configure the path to php.ini
PHPIniDir 'C:\php\'
NOTE: To avoid the error while starting apache, the php ini dir path should be in single quotes with backslash. Don't forget to end it with backslash.
Here is how I got it to GO:
Created the folder C:\Apache
Downloaded and installed http-2.2.22-win32-x86-no-ssl.msi
During install, entered localhost as Network Domain and Server Name
From browser, typed in url http://localhost/ and page came up with "It Works"
(I do not know if there is a God, but took that as a good sign:)
Created the folder C:\PHP
Downloaded and installed php-5.2.17-Win32-VC6-86.msi
Created a new file in notepad with the following:
Saved it in the Apache/htdocs folder as phpinfo.php
From browser, typed in url http://127.0.0.1/phpinfo.php
It did not work (i.e. it did not run the .php program file)
Hmm, oh yeah, you have to restart Apache for it to see updates to its
own configuration file
Start, Apache, Control..
-> generated the error that it could not find C:\Apache\php5apache2_2.dll
Well, I found it in C:\PHP and I copied it to C:\Apache\
Start, Apache, Control..
-> generated an error about a problem with the PHPINIDir directive on line 495 of C:/Apache/conf/httpd.conf
Fixed that by editing this line in the above file to
PHPIniDir "C:/PHP/php.ini"
Tried to restart Apache again, run the test file in the browser.
Still, it did not work:(
Recalled seeing this before and decided to reboot computer
Restarted (or started) the Apache Server
Ran the test file again..
IT WORKED!
Note that in some of the above I may have mixed up some forward and back slashes
Good luck!
You are getting an error due to the fact that the c:/PHP5/php5apache2_2.dll is not shipped with the non-thread safe version of PHP that you probably downloaded. Two options:
Download and install the thread safe version of PHP instead and you
will get everything you need.
If the non-thread safe version is important to what you want to accomplish, download the zip bundle of the thread safe version and take only the .dll you need from there.
Which version: For Apache Server 2.2, you need to download PHP 5.4 thread safe, which is shipped with both php5apache2_2.dll and php5apache2_4.dll. Some earlier versions probably work as well. PHP 5.5 is only shipped with php5apache2_4.dll which will mismatch with your version.
Cf the download links here on the official site: http://windows.php.net/download/.
Please check that for using Apache you should download VC6 version of PHP. If you use VC9 Apache will not start. It is clearly given in the site.
http://in3.php.net/manual/en/install.windows.manual.php
For me the problem was resolved by replacing the file php5apache2_2.dll from another site, somehow the file downloaded from the php.net site was corrupt.
I had already the file php5apache2_2.dll on my wamp 2.2 and the PHP version 5.3.13 so I just copied that file into my version 5.4.35 and it worked.
I did not have to mess with the apache configuration as other people suggest.
One more thing I did was to install the Visual C++ Redistributable for Visual Studio 2008 for my x64 machine running Windows 7 Ultimate Edition. I don't think this helped since I had already the x86 version and working with my previous PHP version, but is part of the action I taken.
None of the suggestions above worked for me. I tried replacing the php5apache2_2.dll file and restarting everything, but got the same error. I ended up uninstalling Apache, MySQL, and PHP, removing the path variables, and then installing WampServer. Had everything up and running in less than 5 minutes.
By the way, I uninstalled PHP by just deleting the folder in Program Files, since it did not turn up in Add/Remove Programs. I also deleted any leftover Apache and MySQL folders after the uninstalls.
Even file exist and apache shows error that this file don't exists, install Microsoft C++ Redistributable Package. Note, that you have to install 2008 version, then 2010. Install both packages, not only 2010 version.
I've had a similar problem. I found out after following a particular Youtube tutorial that if you go and edit the httpd.conf file while Apache is running... it will mess up.
Make sure that you install Apache first... then turn it off, then install php afterward. It should then edit the httpd.conf file itself. This Youtube tutorial solved my problem. http://www.youtube.com/watch?v=UKbEzmMliNM
Hope it helps. I got MySQL installed and working too... but had to install the .Net 4 Framework.
You need to install "http-2.2.22-win32-x86-no-ssl.msi" instead.
I had the same error.
I had installed x64 version of Apache and x86 version of php.
After a lof of searching I found that this doesn't work.
So I had to install x64 (threadsafe) version of PHP.
After this Apache works fine . :)
Hope this helps!
If your php5apache2_4.dll is missing:
My problem was the php5apache2_4.dll was not included in PHP install zip. It is included only the Thread Safe version of PHP 5.4.38
http://windows.php.net/downloads/releases/php-5.4.38-Win32-VC9-x86.zip

Unsuccessful XDebug installation

I'm trying to install XDebug on my local machine with Win 7, Apache 2, PHP 5.3.6 TS VC9 build (server manually installed, no package). I've followed instructions at http://xdebug.org/find-binary.php:
I've downloaded dll, moved to dir with other extensions, added following code to C:\Windows\php.ini, restarted server and - in contrary to my expectations - xdebug is neither installed nor listed in phpinfo page.
zend_extension="E:\www\server\php\ext\php_xdebug-2.1.2-5.3-vc9.dll"
Altough I've gone trough my phpinfo and XDebug site several times I still have no idea what can cause this problem. Do you have any suggestions how to get XDebug working please?
Thank you
According to netbeans manual you have to add the xdebug configuration file to the apache php ini directory and not the local php ini directory to make it work with anykind of wamp.
1) http://wiki.netbeans.org/HowToConfigureXDebug
2) Definition of wamp: http://en.wikipedia.org/wiki/WAMP
try zend_extension**_ts**=...
and the in a console fire php -m to see whats in. No need to restart server
I "solved" the problem by updating from 5.3.6 to 5.3.8. I dont know where the problem was, but update and it will work fine. (I used http://xdebug.org/find-binary.php)

Categories