Jump to content
  • Advertisement
Sign in to follow this  
OuncleJulien

[web] PHP Extensions trouble

This topic is 4847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been trying to get into writing custom extensions for PHP. Everything works great except I'm having a hard time getting the zend_parse_parameters function to work. char* name; int length; zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,"s",&name,&length); zend_parse_parameters works perfectly when I run the script from the shell. But when I try to run the php script via the browser it segfaults. I've been tearing my hair out over this for two days now = Here's that error_log is saying: /Users/james/php-5.0.4/Zend/zend_execute_API.c(392) : Block 0x003795E8 status: /Users/james/php-5.0.4/Zend/zend_variables.c(45) : Actual location (location was relayed) Beginning: Overrun (magic=0x03FFF140, expected=0x7312F8DC) End: Unknown --------------------------------------- [Fri Aug 12 07:44:57 2005] [notice] child pid 9806 exit signal Segmentation fault (11) Does anyone have any ideas? I'm like so desperate lol =/

Share this post


Link to post
Share on other sites
Advertisement
Here's what gdb is saying. I seriosuly have no idea why it works fine from the shell but not via the browser. If anyone has some input no matter how remote I would *sooo* apreciate it.



Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xfffffff8
0x00527154 in zend_parse_va_args ()
(gdb) bt
#0 0x00527154 in zend_parse_va_args ()
#1 0x00527278 in zend_parse_parameters ()
#2 0x000e0c80 in zif_imagesmoothline (ht=1, return_value=0x3bf9d8, this_ptr=0xbfffdf40, return_value_used=0) at /Users/james/www/php5/extensions/re_draw/re_draw.c:65
#3 0x02291668 in zend_do_fcall_common_helper (execute_data=0xbfffe0e8, opline=0x1843d70, op_array=0x3bf828) at /Users/james/Desktop/php5-STABLE-200508121236/Zend/zend_execute.c:2760
#4 0x022923cc in zend_do_fcall_handler (execute_data=0xbfffe0e8, opline=0x1843d70, op_array=0x3bf828) at /Users/james/Desktop/php5-STABLE-200508121236/Zend/zend_execute.c:2894
#5 0x02288774 in execute (op_array=0x3bf828) at /Users/james/Desktop/php5-STABLE-200508121236/Zend/zend_execute.c:1437
#6 0x0224dc24 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /Users/james/Desktop/php5-STABLE-200508121236/Zend/zend.c:1064
#7 0x021e5e7c in php_execute_script (primary_file=0xbfffea50) at /Users/james/Desktop/php5-STABLE-200508121236/main/main.c:1640
#8 0x0229a124 in apache_php_module_main (r=0x183de38, display_source_mode=0) at /Users/james/Desktop/php5-STABLE-200508121236/sapi/apache/sapi_apache.c:54
#9 0x0229b618 in send_php (r=0x183de38, display_source_mode=0, filename=0x183fab8 "/Library/WebServer/Documents/php5/extensions/test.php") at /Users/james/Desktop/php5-STABLE-200508121236/sapi/apache/mod_php5.c:630
#10 0x0229b6a4 in send_parsed_php (r=0x183de38) at /Users/james/Desktop/php5-STABLE-200508121236/sapi/apache/mod_php5.c:645
#11 0x0000dd18 in ap_invoke_handler ()
#12 0x00017dd4 in process_request_internal ()
#13 0x00017e54 in ap_process_request ()
#14 0x00006b60 in child_main ()
#15 0x00006dc4 in make_child ()
#16 0x000070f4 in perform_idle_server_maintenance ()
#17 0x000076d0 in standalone_main ()
#18 0x00007d74 in main ()
(gdb)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!