Unsuccessful XDebug installation - php

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)

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.

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.

Php Curl not working After Upgrade to x64. Its enabled in php.ini [duplicate]

I got my WAMP installed on my windows 7 64bit. cURL is not working, but still I got it enabled from the WAMP tray.
I have also uncommented extension=php_curl.dll in php.ini for both the PHP and Apache folder.
Windows give me an error message,
PHP Startup: unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_curl.dll' - the application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-lin sxstrace.exe tool for more detail."
How can I fix this problem?
Go to http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ and download the cURL version that corresponds to your PHP version under "Fixed curl extensions:".
So if you have PHP 5.3.13, download "php_curl-5.3.13-VC9-x64.zip". Try the "VC" version first. Then replace the php_curl.dll in ext folder. This worked for me.
I had the same exact issue. After trying almost everything and digging on Stack Overflow, I finally found the reason. Try downloading "fixed curl extension" separately from PHP 5.4.3 and PHP 5.3.13 x64 (64 bit) for Windows.
I've downloaded "php_curl-5.4.3-VC9-x64", and it worked for me. I hope it helps.
Works for me:
Go to this link
Download *php_curl-5.4.3-VC9-x64.zip* under "Fixed curl extensions:"
Replace the php_curl.dll file in the ext folder.
This worked for me.
I have struggled a lot with this myself.. In the end, PHP version 5.3.1 with Apache 2.2.9 worked...
I was getting the consistent error of missing php5.dll. For this, I renamed all the old php.ini files which are not required (outside of the WAMP folder) to old_ohp.ini.
The error is unrelated to PHP. It means you are somehow relying on Apache's mod_deflate, but that Apache module is not loaded. Try enabling mod_deflate in httpd.conf or commenting out the offending line (search for DEFLATE in httpd.conf).
As for the PHP curl extension, you must make sure it's activated in php.ini. Make sure extension_diris set to the directory php_curl.dll is in:
extension_dir = "C:/whatever"
and then add
extension=php_curl.dll
The steps are as follows:
Close WAMP (if running)
Navigate to WAMP\bin\php\<your version of PHP>
Edit file php.ini
Search for curl, uncomment extension=php_curl.dll
Navigate to WAMP\bin\Apache\<your version of Apache>\bin\
Edit file php.ini
Search for curl, uncomment extension=php_curl.dll
Save both
Restart WAMP
I think cURL doesn't work with WAMP 2.2e. I tried all your solutions, but it still did not work. I got the previous version, (2.2d) and it works.
So just download the previous version :D
Well, just uninstall WAMP 64-bit and go with the 32-bit version. It worked in my case.
This is how I've managed to load CURL correctly. In my case php was installed from zip package, so I had to add php directory to PATH environment variable.
Ensure that your system PATH environment variable contains the directory in which PHP is installed.
Stop the Apache server and restart it once more. With luck CURL will start working.
This work for me: http://www.mediafire.com/?3ay381k3cq59cm2
download a paste the file in ext folder
PHP 5.4.3
I had the problem with not working curl on win8 wamp3 php5.6. Reinstalling wamp (x64 version as I had x64 in system info) made it work fine.
uncomment "curl=cainfo" in the php.ini document
This helped me when installing Prestashop when all other methods still did not work.
This is what worked for me
Answered by Soren from another SO thread - CURL for WAMP
"There seems to be a bug somewhere. If you are experiencing this on Win 7 64 bit then try installing apache addon version 2.2.9 and php addon version 5.3.1 and switching to those in WAMP and then activating the CURL extension. That worked for me."

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

mcrypt and IIS - module does not load in PHP

I have Windows 2003 Standard, IIS 6, PHP, MySQL and amy trying to get mcrypt working so I can use phpMyAdmin.
I have uncommended php_mcrypt.dll in php.ini and this file is in my extensions folder (c:\php).
I have downloaded libmcrypt.dll to c:\php, c:\php\ext, c:\windows, c:\windows\system32. I have also found a second version of this file on the next and tried that. After each change I have restarted IIS.
Whatever I try mcrypt does not seem to be loaded when I check php_info();. But there are no errors showing.
Is there another version of php_mcrypt.dll? does anyone have a version of phpMyAdmin that does not need mcrypt? Has anyone experienced this problem / have a solution?
All help will be greatly apprecaited.
Many thanks,
Tim
I had the same problem and found that the version of libmcrypt.dll I had was corrupt and when I downloaded a version from the net it was fine. As you have already done this I doubt this helps?
We had the same issue on W2k3(x64)/IIS6/PHP5.2.17. Copying libmcrypt.dll to %WINDIR%\SysWOW64 and an IISRESET solved the problem.
Make sure your extension_dir in php.ini points to the right path (e.g. c:/php5/ext)
Try restarting windows after each change instead of IIS.
libmcrypt.dll only has to be in c:\windows\system32
To be sure mcrypt is (not) loaded, use phpinfo() to check.
I'm also having difficulty getting mcrypt to load, but above has helped me a lot in getting closer to a solution.
Try starting php from the commandline with php -m. It will show you a list of loaded modules.
I was having a weird issue with Win 2k3 Server + IIS 6 + PHP 5.2.9 + mcrypt as well. As soon as I added the mcrypt (or mhash for that matter) extension, fastcgi just timed out. When I removed those extensions from php.ini I see my phpinfo() page as expected. The really weird part was that I could see the module loaded when I run php -m from the command line.
I grabbed all of the dlls from XAMPP (in the php folder) and stuck them all in my PHP installation folder (C:\Program Files\PHP for me). After making the the change to my php.ini
extension=php_mcrypt.dll
I restarted IIS completely rather than recycling the App Pool and my phpinfo page worked as expected. I am not sure why but fastcgi wasn't able to "see" the libraries in the system32 folder, I had to put them in my php root folder.
Good luck.
In my case, my site gave the error "PHP Warning: mcrypt_decrypt()..."
I use IIS6 - Plesk - PHP 2.5
So, I updated PHP version in Plesk CP to 5.3 and then the error disappeared.
Hope this helps somebody.

Categories