PHP和SWIG [英] PHP and SWIG

查看:68
本文介绍了PHP和SWIG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..

我试图从PHP调用交流功能。

但是我收到了以下错误。


警告:dl():无法加载动态库''/usr/local/lib/php/extensions/no-debug-non-zts-20090626/example.so'' - / usr / local / lib / php /extensions/no-debug-non-zts-20090626/example.so:无法打开共享对象文件:第22行/var/www/html/example.php中没有此类文件或目录

致命错误:在第8行的/var/www/html/test.php中调用未定义的函数fact()


我的php文件和.c .i文件位于/ var / www / html文件夹。

我正在编译同一文件夹中的文件。所以.so其他文件被创建到同一个文件夹

php.ini中的扩展也被赋予/var/www/html/example.so


我仍然收到上述错误。


什么是remidy?


问候

Dheeraj Joshi M

Hi..
I am trying to call a c function from a PHP.
But i am getting following error.

Warning: dl(): Unable to load dynamic library ''/usr/local/lib/php/extensions/no-debug-non-zts-20090626/example.so'' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/example.so: cannot open shared object file: No such file or directory in /var/www/html/example.php on line 22
Fatal error: Call to undefined function fact() in /var/www/html/test.php on line 8

My php file and .c .i file resides in /var/www/html folder.
I am compiling the file in same folder. So .so an other files are created to same folder
also extension in php.ini is given to /var/www/html/example.so

Still i am getting the above error.

What is the remidy?

Regards
Dheeraj Joshi M

推荐答案

你能详细说明一下吗?


系统os?从我正在阅读你使用Linux?什么版本?


你的编码环境是什么?即视觉工作室?


谢谢,

theo werntz ii
can you elaborate for me?

system os? from what i''m reading your using linux ? what version?

also what is your coding environment? i.e. visual studio?

thanks,

theo werntz ii


OS LINUX(fedora core 4) 。)


PHP版本是php 5.3,swig是1.3.39
OS LINUX( fedora core 4.)

PHP version is php 5.3 and swig is 1.3.39


尝试修复包。我之前遇到过这种情况,最后还是用了屁眼!它更容易开发。因为lib.so的那些错误我还创建了一个符号链接来创建临时修复,如果你去目录并看到它没有指向文件,但文件只是另一个文件的链接,它是链接到。


告诉我这是否有效,符号链接是一个临时修复。它起作用然后它不会。
try repairing the package. i''ve ran into this before and just ended up going with lampp! its easier for developement. because of those errors with the lib.so i''ve also created a symlink to create a temp fix if you go to the directory and see that its not pointing to the file but the file is just a link of another file that it is linked to.

let me know if this works the symlinks is a temp fix. it works then it doesn''t.


这篇关于PHP和SWIG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆