NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
DBG not working on Mac OS X 10.4.6


Joined: 17 May 2006
Posts: 5
Reply with quote
Hello all, I compiled and installed DBG and it seemed to go fine: the dbg.so module is in the right place. I did change the --prefix to point to my MAMP PHP5 installation also.

I then followed the INSTALL instructions. I am using ZendOptimizer so I added zend_extension="/path/to/dbg.so" (i entered the actual path). I also added the lines to enable the debugger to my php.ini file. However, when I restarted MAMP (Apache 2.0.55 and MySQL) nothing about DBG showed up in phpinfo()'s output. I'm at a loss.

Any help would be greatly appreciated.

I am running PHP 5.1.2, DBG 2.13.1, and Apache 2.0.55.

Thanks,

Bryan


Last edited by wantar on Thu May 18, 2006 1:06 am; edited 1 time in total
View user's profileFind all posts by wantarSend private message
some more info


Joined: 17 May 2006
Posts: 5
Reply with quote
I tried to update a PEAR package and saw the following:

Failed loading /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/dbg.so: (null)

I saw a post by someone else having a similar on another board - but they had to create a custom make file (which I don't know how to do Smile ). I have seen things mentioning tar balls of DBG for MAC OS X. I am running 10.4.6 and am wondering if there are any packages, disk images, or tar balls I may use.

I did notice that for the other modules I have (eaccelorator, pdo_mysql, yaz) there is both a .so and .a file. However, for dbg there is only a .so file. Could this be the problem? Is there something in my config that I missed?

Any help would be great,

Thanks,

Bryan
View user's profileFind all posts by wantarSend private message
hope this helps


Joined: 17 May 2006
Posts: 5
Reply with quote
I don't mean to be a pest, but I'm learning more as I research this. I ran otool -L /path/to/dbg.so and got this:

/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/dbg.so:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.5)

I don't know what it means, but I hope it helps.

Thanks,

Bryan
View user's profileFind all posts by wantarSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Just don't use ZendOptimizer on the site where you want to debug scripts. It's useless there anyway. Also check if there are any other zend_extensions like opcode caches. They should be turned off too.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Here's my php.ini


Joined: 17 May 2006
Posts: 5
Reply with quote
engine = On
short_open_tag = On
asp_tags = Off
precision = 12
y2k_compliance = On
output_buffering = Off
zlib.output_compression = Off
implicit_flush = On
unserialize_callback_func=
serialize_precision = 100
allow_call_time_pass_reference = On
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =
disable_classes =
expose_php = On
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off
error_log = "/Applications/MAMP/logs/php_error.log"
variables_order = "EGPCS"
register_globals = Off
register_argc_argv = On
post_max_size = 32M
gpc_order = "GPC"
magic_quotes_gpc = On
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
include_path = ".:/Applications/MAMP/bin/php5/lib/php"
doc_root =
user_dir =
extension_dir = "/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/"
enable_dl = On
file_uploads = On
upload_tmp_dir = /Applications/MAMP/tmp/php
upload_max_filesize = 32M
allow_url_fopen = On
default_socket_timeout = 60
extension=dbg.so
extension=imap.so
extension=yaz.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so

[Debugger]
debugger.enabled=on
debugger.profiler_enabled=on

define_syslog_variables = Off
sql.safe_mode = Off
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket = /Applications/MAMP/tmp/mysql/mysql.sock
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0

bcmath.scale = 0

session.save_handler = files
session.save_path = /Applications/MAMP/tmp/php
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
sockets.use_system_read = On
; crack.default_dictionary = "c:\php\lib\cracklib_dict"
; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
; With mbstring support this will automatically be converted into the encoding
; given by corresponding encode setting. When empty mbstring.internal_encoding
; is used. For the decode settings you can distinguish between motorola and
; intel byte order. A decode setting cannot be empty.
;exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel = UCS-2LE
;exif.encode_jis =
;exif.decode_jis_motorola = JIS
;exif.decode_jis_intel = JIS

;xdebug
;zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/xdebug.so"
; xdebug.remote_enable=1
; xdebug.remote_handler=dbgp
; xdebug.remote_mode=req
; xdebug.remote_host=127.0.0.1
; xdebug.remote_port=9000

;zend_extension="/Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/eaccelerator.so"
; eaccelerator.shm_size="16"
; eaccelerator.cache_dir="/Applications/MAMP/tmp/eaccelerator"
; eaccelerator.enable="1"
; eaccelerator.optimizer="1"
; eaccelerator.check_mtime="1"
; eaccelerator.debug="0"
; eaccelerator.filter=""
; eaccelerator.shm_max="0"
; eaccelerator.shm_ttl="0"
; eaccelerator.shm_prune_period="0"
; eaccelerator.shm_only="0"
; eaccelerator.compress="1"
; eaccelerator.compress_level="9"

[Zend]
;zend_optimizer.optimization_level=15
;zend_extension_manager.optimizer=/Applications/MAMP/bin/php5/zend/lib/Optimizer-2_6_0
;zend_optimizer.version=2.6.0
;zend_extension=/Applications/MAMP/bin/php5/zend/lib/ZendExtensionManager.so

If anything looks out of place, please let me know.
View user's profileFind all posts by wantarSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Did you compile PHP yourself?
If not, I'd highly recommend you to do it. There are many PHP binary distros for MACOSX which come with symbol tables stripped off leaving you on your own with dynamic extensions. They simply won't load.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Help compiling


Joined: 17 May 2006
Posts: 5
Reply with quote
So what would the compile process look like? From phpinfo() this is what's in the 'Config Command' section:

'./configure' '--with-mysql=/Applications/MAMP/bin/mysql4' '--with-apxs2=/Applications/MAMP/Library/bin/apxs' '--with-gd' '--with-jpeg-dir=/Applications/MAMP/Library' '--with-png-dir=/Applications/MAMP/Library' '--with-zlib' '--with-freetype-dir=/Applications/MAMP/Library' '--prefix=/Applications/MAMP/bin/php5' '--exec-prefix=/Applications/MAMP/bin/php5' '--sysconfdir=/Applications/MAMP/conf/php5' '--with-soap' '--with-config-file-path=/Applications/MAMP/conf/php5' '--enable-track-vars' '--enable-bcmath' '--enable-ftp' '--enable-gd-native-ttf' '--with-bz2=/usr' '--with-ldap' '--with-mysqli=/Applications/MAMP/bin/mysql4/bin/mysql_config' '--with-sqlite' '--with-ttf' '--with-t1lib=/Applications/MAMP/Library' '--enable-mbstring=all' '--with-curl=/Applications/MAMP/Library' '--enable-dbx' '--enable-sockets' '--enable-bcmath' '--with-imap=shared,/Applications/MAMP/Library' '--enable-soap' '--with-kerberos' '--enable-calendar' '--with-pgsql=shared,/Applications/MAMP/Library/pg' '--enable-dbase' '--enable-exif' '--with-libxml-dir=/Applications/MAMP/Library' '--with-xsl=/Applications/MAMP/Library' '--with-pdo-mysql=shared,/Applications/MAMP/bin/mysql4' '--with-pdo-pgsql=shared,/Applications/MAMP/Library/pg'

Could I just add '--with-debug=/path/to/dbg.so', run ./configure and call make && make install?
View user's profileFind all posts by wantarSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Quote:
So what would the compile process look like? From phpinfo() this is what's in the 'Config Command' section:

'./configure' '--with-mysql=/Applications/MAMP/bin/mysql4' '--with-apxs2=/Applications/MAMP/Library/bin/apxs'

Correct and you need all these libraries (devel packages with libraries and headers)

Quote:
Could I just add '--with-debug=/path/to/dbg.so', run ./configure and call make && make install?

No. Php's configure has no --with-debug option and knows nothing about dbg.
Certainly you can complie without that big number of libraries, just leave only those you need.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
DBG not working on Mac OS X 10.4.6
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