Phpize build PHP Extension error cannot find CONFIG.M4.

Source: Internet
Author: User

First, enter the PHP source installation package directory below to execute a command:

cd /home/oldboy/tools/php-5.5.32/ext/./ext_skel --extname=redis

Then go to the extension directory, you can see the following three files, respectively, to edit:

cd redis/lsconfig.m4    redis.c    php_redis.h

Habit of getting back up before operation
Edit CONFIG.M4 First In order
Will

> dnl PHP_ARG_ENABLE(redis, whether to enable redis support,> dnl Make sure that the comment is aligned:> dnl [  --enable-redis           Enable redis support])

Revision changed to

< PHP_ARG_ENABLE(redis, whether to enable redis support,< [  --enable-redis           Enable redis support])

Save exit

Then edit REDIS.C
Add one line of code in this paragraph: Php_fe (Say_hello, NULL)

const zend_function_entry redis_functions[] = {        PHP_FE(say_hello,       NULL)        PHP_FE(confirm_redis_compiled,  NULL)           /* For testing, remove later. */        PHP_FE_END      /* Must be the last line in redis_functions[] */};

Add the following code at the end of the file:

PHP_FUNCTION(say_hello){        zend_printf("hello redis!");}

Save exit

Last edited Php_redis.h
Add one line of code in this paragraph: php_function (Say_hello)

PHP_FUNCTION(confirm_redis_compiled);   /* For testing, remove later. */PHP_FUNCTION(say_hello); /* For testing, remove later. */

Save exit

No accident at this time can execute phpize command, no error, problem solving!

Phpize build PHP Extension error cannot find CONFIG.M4.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.