I like to debug my PHP applications. So, I installed the ZendDebugger.
I downloaded and placed the ZendDebugger.so file in
/usr/lib/php5/modules/ZendDebugger.so
And pasted this code in the php.ini file:
zend_extension=/usr/lib/php5/modules/ZendDebugger.so
This path is correct, and I have tried several other paths.
I also have tried other codes in the php.ini file.
I work with a Ubuntu server and eclipse with the PDT extension on Ubuntu.
But the debugger is not installed. The only information I can find in the phpinfo is:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
I don't know what to do? I have searched many times on the internet, and tied it with a clean server install.
Related
I have difficult question.
On win.server i have PHP 5.2 version. I must connect on Oracle 12c db. Procedure that i do is:
download oracle client 12.2
enable php_oci8.dll
insert PATH to
C:\Windows\SysWOW64\instantclient_12_2
restart server
also i tried to insert php_oci8_12c.dll extension and put oci8_12c.dll file in php/ext directory.
When i true to run .bat file i see errors:
"Missing MSVCR120.ddl" - i resolve this with put this file in /php/ext dir.
"The procedure entry point gc_remove_zval_from_buffer could not be located in the dynamic link library php5ts.dll"
On my local pc i have php 5.6 and they work with 12c oracle.
On internet see that 5.2 version can work with 12c.
What is the potencial problem? What I can try?
OCI 12c requires PHP 5.5, see http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-12c-2088811.html
You can try tho to install the Visual C++ Redistributable Package.
Because the MSVCR120.dll error can't be fixed by putting it in the ext folder.
When you use Apache and/or Console client, make sure you have enabled in both php.ini files, because they are different configurations.
You can also try the PECL OCI package from https://pecl.php.net/package/oci8
Make sure to pick the correct version, the most recent only works for PHP 7.
I finally managed to install it, with some miracle because i do like this much time...
Steps what i do is:
download instaclient12.2 (32bit)
install visual c++ redistributable 2013
put instaclient_12_2 in C:\Windows\SysWOW64\
insert PATH C:\Windows\SysWOW64\instantclient_12_2
download oci8_2.0.12 X64 TS and put php_oci8_12c.dll in php/ext
put oci.dll (from instantclient_12_2 (32bit)) in C:\Apache24\bin, C:\php\ext and C:\php
enable extension php_oci8_12c.dll ini php.ini
On servers was Windows server 2008 R1 and PHP 5.6.2 TS
i'm having an issue loading the php extension for mongo. i'm running windows 7 (32bt), with php 5.2. i'm trying to update my php.ini file with the correct dll name, but not sure which of the dll's to use. i know which php file to update.
the two sites i've found are:
https://github.com/stealth35/stealth35.github.com/downloads
https://github.com/mongodb/mongo-php-driver/downloads
of these two sites, which windows (32bt) version am i to use?
any help on this would be much appreciated. thank you.
I'm going to recommend a 3rd place https://s3.amazonaws.com/drivers.mongodb.org/php/index.html
Now if you look in the latest version: php_mongo-1.4.5.zip (it has older versions there also) you'll see
php_mongo-1.4.5-5.2-vc9-nts.dll
php_mongo-1.4.5-5.2-vc9.dll
php_mongo-1.4.5-5.3-vc9-nts-x86_64.dll
php_mongo-1.4.5-5.3-vc9-nts.dll
php_mongo-1.4.5-5.3-vc9-x86_64.dll
php_mongo-1.4.5-5.3-vc9.dll
php_mongo-1.4.5-5.4-vc9-nts-x86_64.dll
php_mongo-1.4.5-5.4-vc9-nts.dll
php_mongo-1.4.5-5.4-vc9-x86_64.dll
php_mongo-1.4.5-5.4-vc9.dll
php_mongo-1.4.5-5.5-vc11-nts-x86_64.dll
php_mongo-1.4.5-5.5-vc11-nts.dll
php_mongo-1.4.5-5.5-vc11-x86_64.dll
php_mongo-1.4.5-5.5-vc11.dll
x86_64 are the 64 bit versions, since you are running 32 bit windows, you can ignore those, and the number that comes after 1.4.5(the mongo version) is the php version it expects aka 1.4.5-5.3 is php 5.3, mongo 1.4.5, so that narrows down the list to:
php_mongo-1.4.5-5.2-vc9-nts.dll
php_mongo-1.4.5-5.2-vc9.dll
vc9 refers to the visual studio it was compiled with, I believe vs9 is VS2008 ,and nts refers to "Non-Thread Safe" , if you are using threads use the php_mongo-1.4.5-5.2-vc9.dll ,
Place it in the "ext" directory for your php install(or wherever the extensions directory is) then add
extension=php_mongo-1.4.5-5.2-vc9.dll
or extension=php_mongo.dll (if you rename it to php_mongo.dll) to your php.ini
I have worked on Zend-Framework on linux environment since last 6 months where i used to install the zend framework by simply creating a virtual host and in the corresponding virtual host i will change the path to the zend public folder.. In this way I installed zend framework on Linux (Ubuntu) but currently i have requirment to install to zend framework on windows 7 + xampp , i am not able to install this.. i stuck there...please help me to install zend on windows + xampp environment.
Thanks in Advance!!
You can do pretty much the same as you have done under Linux. You will need to go in your Xampp install. There, you will have a bin folder (might be an other name) which will contain your apache folder. In that folder, dig deep enough to find the httpd.conf file.
In that file, search for the include of the vhost.conf files. It will probably be commented out with a # at the beginning of the line. Uncomment it. Take note of the path and find the vhost file (most likely in the extras folder).
In that file, you can define your vhost as you see fit.
Last step, go to C:\Windows\System32\drivers\etc and edit the hosts file. To edit it, you have to be admin (launch NotePad as admin through right clic menu > Execute as administrator). Add the name of the vhost you just created and make it point to your localhost ip address.
Restart Xampp, it should now find your freshly created vhost.
MAC OSX 10.7.5 -- MAMP 2.1.3 -- XDEBUG 2.2.3
I used the xdebug wizzard to download and install using the terminal. After following the steps
Rebooted MAMP but no xdebug in phpinfo();
I thought it was weird that the wizzard says all you have to do it paste zend_extension = /Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so in the end of your php.ini file
I did add quotes around the pathname - the pathname from the wizzard came without them
Every other tutorial says there is more than just this one line that needs to be added
MAMP seems to have its own 'zend_extension = "/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"' that just needs to becommented out. Anyway I tried both the pasting from the wizzard as well as uncommenting.
Since I'm trying to use xdebug with my PHPstorm trial, I checked for the steps layed you at http://www.dotvoid.com/2012/09/using-xdebug-in-mamp/
Again it's weird: Here it says that all you need to do it add these 2 lines
xdebug.remote_host=127.0.0.1
xdebug.remote_enable = 1
It's weird because other tutorials make you add more lines (back when I tried to get xdebug on an older version of MAMP to go with netbeans without success) about the localhost.
Here's what's in my php.ini file now:
[xdebug]
zend_extension= "/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
I also checked if I'm configuring the right php.ini file, looking in phpinfo(); where it says which php.ini file is loaded. In this case /Applications/MAMP/bin/php/php5.4.10/conf/php.ini I verified if this is the correct php.ini file that I'm edititing and it is.
The last anwser in this SO question here speaks of two certain files that need to be the same binary maybe one file is 32bit binary and the other one is 64bit. When I tried to check this, the files mentioned in that question (/path/to/mamp/Library/modules/php5.3/libphp5.so) are not in my current installation of MAMP. In my current installation, I can go to Applications/MAMP/Library/modules, but there is no folder in that modules folder, leave alone one that says php of any sort.
In this tutorial, there is a mention of updating PEARL. This may not be relevant to my issue but I just followed it because I don't know really, I thought it wouldn't hurt. When I try to do that in my terminal the error message says
Xdebug requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.
I found this issue in the xdebug FAQ. I quote
it is most likely because you compiled Xdebug against PHP headers that belong to a different PHP version that you're running
Further explanation confirms that the message about the zend api version points to the same issue and that two versions of PHP are colliding somehow.
The solution to this is explained on the same FAQ page where it says
Q: How do I find which phpize to use? [...]If it doesn't match up, and perhaps the wrong "phpize" binary is found on the path, you can
run configure as follows:
1. /full/path/to/php/bin/phpize
2. ./configure --with-php-config=/full/path/to/php/bin/php-config
I don't know how to interpret this in practice. But here's what I have tried
I was still in the /usr/bin and tried the first command usr/bin/phize. this returned Cannot find config.m4. Make sure that you run '/usr/bin/phpize' in the top level source directory of the module
I don't know what they mean by the top level source directory of the module. Maybe 1. and 2. are 1 command? And the module means xdebug.so?
No matter what I try though, I keep getting the Cannot find config.m4 error whenever I just even try to run phpize. I tried running phpize from /usr/bin/phpize or from /Applications/MAMP/bin/php/php5.4.10/bin/phpize. Same error came
I cannot debug a PHP script as a script. It always terminates immediately after starting. I set up an Xdebug log in my php.ini, but it's completely unhelpful. Xdebug does show up on my phpinfo(), so I know it's loaded in Apache.
I can also debug code as a webpage (which provides no info on variables and will not stop on breakpoints though), so I know Eclipse has the proper server settings. Both debug options use the same PHP exe (the one installed with XAMPP, php 5.3.1 compiled with vc6 compiler). I made sure that the compilation of Xdebug matched these settings.
On a perhaps related note: I noticed that I could only load Xdebug with the zend_extension command, instead of zend_extension_ts even though my version of PHP is indeed thread safe? I have to admit I'm a little confused by that.
I also made very sure that wherever I could select "XDebug" in Eclipse, I did. I've followed two tutorials to no avail here. Anyone have any ideas? I've tried the version of Xdebug bundled with my XAMPP (2.0.6-dev) and I also downloaded a new .dll, version 2.1.
Thanks!
Excellent instructions for Setup XDebug on XAMPP and Eclipse
#user629300 Instructions are good for eclipse versions prior to 3.5 see the links to get instructions for version based instructions. Also Getting XDebug to work with apache xampp to debug php, has pictures with good explanations. They are a little stale though.
A summary of the details from the first link, assuming PHP > 5.3 (which hopefully everyone is running now!):
Make sure that your php.ini file contains the following:
[XDebug]
zend_extension={xampp-folder}\php\ext\php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
Remove any config entries under the [Zend] heading, particularly those starting with zend_extension
Configure Eclipse:
in Window -> Preferences -> PHP -> Servers, configure the PHP server to use XDebug, add the base URL and local web root
in -> Installed debuggers, configure XDebug to accept remote sessions
(optional?) configure the PHP executable to point to php.exe in your XAMPP installation
You should now be able to hit breakpoints in Eclipse by adding XDEBUG_SESSION_START to the query string of your URL, e.g. http://localhost/?XDEBUG_SESSION_START.
first download the dll for xDebug
then edit your php.ini file
zend_extension_ts = “C:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll”
make sure the line is uncommented
restart apache
make sure you are editing the right php.ini file