Configure:error:snmp.h not found. Check your SNMP installation.
# yum Install Net-snmp Net-snmp-devel
15)
/usr/bin/ld:cannot Find-lltdl
Collect2:ld returned 1 exit status
Make: * * * [sapi/cgi/php-cgi] Error 1
# yum Install libtool-ltdl.x86_64 libtool-ltdl-devel.x86_64
16)
When compiling XCache modules for PHP, you need to run Phpize
Got a mistake
#/usr/local/php/bin/phpize
Configuring for:
PHP Api version:20041225
Zend Module Api no:20060613
Zend Extension Api no:220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP _autoconf
environment variable is set correctly and then rerun this script.
Autoconf can be resolved by installing
CentOS Execute yum Install autoconf
Ubuntu under the executive Apt-get install autoconf can be
17)
#/usr/local/php/bin/phpize
Cannot find CONFIG.M4.
Make sure so you run '/usr/local/php/bin/phpize ' in ' the '
To modify the method:
[Root@centos lnmp]# CD php-5.2.14ext/
[Root@centos ext]#./ext_skel--extname=my_module
Creating directory My_module
Creating basic Files:config.m4 config.w32. Cvsignore my_module.c php_my_module.h credits experimental TESTS/001.PHPT My_ module.php [done].
To use your new extension, you'll have to execute the following steps:
1. $ cd ...
2. $ VI EXT/MY_MODULE/CONFIG.M4
3. $/buildconf
4. $/configure--[with|enable]-my_module
5. $ make
6. $/php-f ext/my_module/my_module.php
7. $ VI ext/my_module/my_module.c
8. $ make
Repeat steps 3-6 until you are satisfied with EXT/MY_MODULE/CONFIG.M4 and
Step 6 confirms the Your module is compiled into PHP. Then, start writing
Code and repeat the last two steps as often as necessary.
[Root@centos ext]# CD my_module/
[Root@centos my_module]# Vim CONFIG.M4
According to your own choice, you will
DNL Php_arg_with (My_module, for my_module support,
DNL Make sure this comment is aligned:
DNL [--with-my_module Include my_module support])
Modified into
Php_arg_with (My_module, for my_module support,
Make sure this comment is aligned:
[--with-my_module Include my_module support])
or to
DNL php_arg_enable (My_module, whether to ENABLE my_module support,
DNL Make sure this comment is aligned:
DNL [--enable-my_module enable my_module support])
Modified into
Php_arg_enable (My_module, whether to ENABLE my_module support,
Make sure this comment is aligned:
[--enable-my_module enable my_module support])
[Root@centos my_module]# Vim my_module.c
Modify the following code in the file
/* Every user visible function must have a entry in my_module_functions[].
*/
Function_entry my_module_functions[] = {
Php_fe (Say_hello, NULL)/*? Add a line of code * *
Php_fe (confirm_my_module_compiled, NULL)/* For testing, remove later. */
{null, NULL, NULL}/* must is the last line in my_module_functions[] * *
};
Add the following code at the end of the file
Php_function (Say_hello)
{
zend_printf ("Hello sdomain!");
}
Re-modified: Php_sdomain.h
VI Php_sdomain.h
In Php_function (confirm_my_module_compiled); /* For testing, remove later. * * Add a line below this line:
Php_function (Say_hello); /* For testing, remove later. */
Save File Exit
Then we can use the above command in this directory.
/usr/local/php/bin/phpize
After execution, you will see the following
[Root@ns sdomain]#/usr/local/php/bin/phpize
Configuring for:
PHP Api version:20020918
Zend Module Api no:20020429
Zend Extension Api no:20050606
[Root@ns sdomain]#
And then execute./configure--with-php-config=/usr/local/php/bin/php-config
Then execute make
Make install
He then puts the corresponding so file into a folder under the PHP installation directory, and prompts where it is, and then copies the inside so file to the place where you store the so file.
The position you specified in the Extension_dir inside the php.ini.
The final step is that you open this extension in the php.ini file.
Extension=sdomain.so
And then
Restart Apache
The above errors are in the entire compilation of installation problems encountered, and then combined with the online data, find solutions, summed up to this place, hoping to help everyone!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.