php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55027 C Extension and symbol lookup error on execution
Submitted: 2011-06-10 15:36 UTC Modified: 2011-06-14 15:56 UTC
From: peter dot colclough at toolstation dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.3.6 OS: Ubuntu 10
Private report: No CVE-ID: None
 [2011-06-10 15:36 UTC] peter dot colclough at toolstation dot com
Description:
------------
Hi, Am building a C extension, which is a wrapper to a third party product. I have the basics working, but wanted to use a different call (from PHP) for a number of functions.
So I have a standard PHP C function, and a number of dirreent wrappers depending on what we need.... so:

static void php_main_php_function(INTERNAL_FUNCTION_PARAMETERS, long nType, int expected_args){
 .....
  call main C function();
  Return to PHP
}

PHP_FUNCTION(main_function_wrap_1){
	php_main_php_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0,1);
}

PHP_FUNCTION(main_function_wrap_2){
	php_main_php_function(INTERNAL_FUNCTION_PARAM_PASSTHRU, 2,1);
}
-----------------------------
When I call main_function_wrap_1() (or _2()) I get a:
 'php: symbol lookup error: .....undefined symbol: php_main_php_function  

I have tried to do thios as per the mysql drivers, and can't see the differemce between my code, and what they are doing? Anyone any ideas please?

TIA


Test script:
---------------
 All C Code.... and lots of it... so best not to confuse here.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-06-14 15:56 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2011-06-14 15:56 UTC] aharvey@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

There's nothing wrong with the (tiny) snippet you've provided, and this doesn't sound likely to be a bug in PHP itself, since the same pattern works elsewhere.

Please try one of the support channels above.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 10:01:30 2024 UTC