NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
OS X install difficulties
Veteran

Joined: 26 Dec 2006
Posts: 253
Location: Phoenix, AZ
Reply with quote
Hey folks,

I'm trying to get DBG installed on a Mac Pro running OS X 10.5.2 (Leopard). Here's what I added to my /private/etc/php.ini file:

Code:
extension=dbg.so-5.2.x
[debugger]
debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow=localhost,127.0.0.1
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16


Here's the contents of the PHP extensions dir:

Code:
Cyrus:~ bob$ cd /usr/lib/php/extensions/no-debug-non-zts-20060613
Cyrus:no-debug-non-zts-20060613 bob$ ll
total 736
drwxr-xr-x  4 root  wheel   136B Apr 11 17:48 .
drwxr-xr-x  3 root  wheel   102B Mar 20 13:23 ..
-rwxrwxrwx  1 root  wheel   285K Sep 10  2007 dbg.so-5.2.x
-rwxr-xr-x  1 root  wheel    78K Sep 28  2007 phpcups.so


I got the dbg extension from the C:\Program Files\nusphere\phped\debugger\server\MacOsX directory of build 5233 of PhpED. It looks like it's the right kind of file:

Code:
Cyrus:no-debug-non-zts-20060613 bob$ file dbg.so-5.2.x
dbg.so-5.2.x: Mach-O bundle i386


which jives with the extension Apple has in there:

Code:
Cyrus:no-debug-non-zts-20060613 bob$ file phpcups.so
phpcups.so: Mach-O universal binary with 4 architectures
phpcups.so (for architecture ppc7400):   Mach-O bundle ppc
phpcups.so (for architecture ppc64):   Mach-O 64-bit bundle ppc64
phpcups.so (for architecture i386):   Mach-O bundle i386
phpcups.so (for architecture x86_64):   Mach-O 64-bit bundle x86_64


I see this in Apache's error log when I try to restart Apache with "sudo apachectl graceful":

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20060613/dbg.so-5.2.x' - (null) in Unknown on line 0


When I run phpinfo(), I get the info page okay, but there's no sign of DBG being installed.

I tried reinstalling the extension in case it had gotten corrupted, but that didn't work. The md5 for the file is bd658dae3feaad20de06247f63fcc3d4.

Any ideas where I've gone wrong? Below is the output of the DBG wizard:

Code:
Thank you for using NuSphere! I am your DBG (PHP Debugger) Helper Script.

I will try to help you with setting up your PhpED project and installing DBG - NuSphere PHP Debugger. I'll do my best and suggest the ways to configure things, but if you still having problems, please don't forget: NuSphere's team is committed to making you successful. Here is the list of resources you can use:

NuSphere Support Forums
Overview of DBG debugger and Project Mappings
DBG debugger installation on the server
and you can always ask us a question using NuSphere Contact Us Form
What did I find out about your system

I assume that you placed me in the directory of your main php script and on your PhpED machine pointed your browser to me - like this: <URL of your web site>/dbg-wizard.php

I see that:

PHP Version: 5.2.4
Web Server: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2 PHP/5.2.4
Server Name: localhost
OS: Darwin
Your Client IP Address: ::1
Your Server IP Address: ::1
Port: 80
Your Web Server is on the same machine with PhpED
Path to website files: /Users/bob/Sites/
Document Root is: /Library/WebServer/Documents/
Your PHP.INI file is /private/etc/php.ini
PHP extensions directory is /usr/lib/php/extensions/no-debug-non-zts-20060613
DBG (PHP DEBUGGER) is NOT INSTALLED
How to install Server side DBG module

I noticed that DBG (PHP DEBUGGER) is NOT INSTALLED on your server localhost.

Your DBG Module is: dbg.so-5.2.x located in the tarball in <PhpED install path>\debugger\server\MacOsX\
To install it, please do the following:

Copy dbg.so-5.2.x located in the tarball in <PhpED install path>\debugger\server\MacOsX\ into /usr/lib/php/extensions/no-debug-non-zts-20060613 on your server localhost. No NEED TO CHANGE THE NAME OF THE MODULE!!
Add the following lines to /private/etc/php.ini
extension=dbg.so-5.2.x
[debugger]
debugger.hosts_allow= ::1 localhost
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16
debugger.hosts_allow has should be in format debugger.hosts_allow= host1 host2 host3, where host1, host2 and host3are host names or IP or network addresses allowed to start debug sessions. If you run debug session through an SSH tunnel , you need to list just one local IP address only (localhost).
Restart web server (SIG_HUP or httpd reload won't help!)
Launch phpinfo and check its output. Make sure that one of the topmost headers contains
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies with DBG v3.2.7 , (C) 2000, 2007 by Dmitri Dmitrienko
How to setup your PhpED Project Properties

I can suggest the following settings for your Project to debug PHP scripts on Server localhost :
You can create new Project by selecting File->New Project or by selecting New Project in the Workspace Pop up Menu
In the Project Properties Dialog set:

Project -> Root Directory: /Users/bob/Sites/
Mapping -> Run Mode: HTTP Mode (3-rd party WEB server)
Mapping -> Remote URL: http://localhost/
Mapping -> Remote Root Directory: /Users/bob/Sites/ , same as Project -> Root Directory.
View user's profileFind all posts by bobwilliamsSend private messageVisit poster's website
Veteran

Joined: 26 Dec 2006
Posts: 253
Location: Phoenix, AZ
Reply with quote
Okay, after some more research, I think I see what the problem is: the module needs to be compiled in 64-bit mode. This doesn't normally make much of a difference under Mac OS X thanks to the way the OS runs both in parallel, but in this case, it does make a difference, I assume because the code is being loaded into another application that itself is 64-bit.

This is something, obviously, that NuSphere will need to take care of.
View user's profileFind all posts by bobwilliamsSend private messageVisit poster's website
OS X install difficulties
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