Hi , I am writing a php extension module on AIX 4.3.3 RS6000 machine.I have compiled php as CGI.When I test my php extension module function from a test php script I get a CORE dump.The gdb php core is as below Core was generated by `php'. Program terminated with signal 11, Segmentation fault. #0 0xd0990180 in zend_parse_parameters () (gdb) bt #0 0xd0990180 in zend_parse_parameters () #1 0xd0990930 in zif_myfunction () #2 0x1002c5a4 in execute (op_array=0x200e6c70, tsrm_ls=0x20027738) at /usr/local/php-4.3.2/Zend/zend_execute.c:1606 #3 0x1000e0d4 in zend_execute_scripts (type=8, tsrm_ls=0x20027738, retval=0x0, file_count=3) at /usr/local/php-4.3.2/Zend/zend.c:869 #4 0x10007410 in php_execute_script (primary_file=0x5, tsrm_ls=0x3027738) at /usr/local/php-4.3.2/main/main.c:1671 #5 0x10001ec8 in main (argc=2, argv=0x2ff228c0) at /usr/local/php-4.3.2/sapi/cgi/cgi_main.c:1501 #6 0x100001dc in __start () I have tried all combinations of ZTS=0 ZEND_DEBUG =0 ZTS=0 ZEND_DEBUG =1 ZTS=1 ZEND_DEBUG =0 ZTS=1 ZEND_DEBUG =1 for compiling php as well as my extension module. All give the same result :-( Has anyone encountered this on a AIX machine. If not atleast has anyone successfully tested a PHP extension module on a AIX machine.I urgently need some Help.
I have followed the following steps to create the extension module: 1. ran the ext_skel command i.e. ext_skel --extname=rot13 --proto=rot13.def 2. with rot13 as current folder I ran phpize for creating a self contained extension. 3. /usr/local/php-4.3.2/ext/rot13> ./configure 4. /usr/local/php-4.3.2/ext/rot13> make 5. /usr/local/php-4.3.2/ext/rot13> make install 6. librot13.a is generated. 7. when I do a ldd ./librot13.a i get error as exec(): 0509-036 Cannot load program ./librot13.a. because of the following errors: 0509-022 Cannot load module ./librot13.a. 0509-103 The module has an invalid magic number. 8. so I used the library rot13.so.0 and got the core dump at zend_parse_parameters. It seems my extension is not getting the reference to zend_parse_parameters function in php.The same thing runs withou any problem on Linux as well as Windows. Thanks & Regards Ashish Borkar --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software