title: PHP 5.6.x source install with Apache, but openssl error occurs, dereferencing pointer to incomplete type
body: <p>I install PHP 5.6.39 with Apache.
  My configure options is like below.</p>
  
  <pre><code>./configure --with-apxs2=/home1/apache/bin/apxs 
  --with-config-file-path=/home1/apache/conf/ 
  --prefix=/home1/php 
  --enable-sysvsem 
  --enable-sysvshm 
  --enable-ftp 
  --enable-pdo 
  --with-zlib 
  --with-mcrypt=/home1/apache 
  --with-openssl=/home1/openssl
  </code></pre>
  
  <p>I use with-openssl option like this. <strong>--with-openssl=/home1/openssl</strong> 
  Because OS openssl version is 1.0.1e, and i want use 1.1.0 like below</p>
  
  <pre><code>[root@localhost bin]# ./openssl //This openssl is located /home1/openssl/bin
  OpenSSL&gt; version
  OpenSSL 1.1.0f  25 May 2017
  </code></pre>
  
  <p>Actually configure command is pass, but when i enter <strong>make</strong> i see this screen.</p>
  
  <pre><code>/home1/php-5.6.39/ext/openssl/openssl.c: In function ‘zif_openssl_x509_parse’:
  /home1/php-5.6.39/ext/openssl/openssl.c:1982: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:1983: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:2011: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_generate_private_key’:
  /home1/php-5.6.39/ext/openssl/openssl.c:3420: warning: ‘RSA_generate_key’ is deprecated (declared at /home1/openssl/include/openssl/rsa.h:193)
  /home1/php-5.6.39/ext/openssl/openssl.c:3428: warning: ‘DSA_generate_parameters’ is deprecated (declared at /home1/openssl/include/openssl/dsa.h:122)
  /home1/php-5.6.39/ext/openssl/openssl.c:3446: warning: ‘DH_generate_parameters’ is deprecated (declared at /home1/openssl/include/openssl/dh.h:135)
  /home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_is_private_key’:
  /home1/php-5.6.39/ext/openssl/openssl.c:3485: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3490: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3503: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3512: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3512: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3521: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dsa’:
  /home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3557: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3560: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3560: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3569: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3569: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c: In function ‘php_openssl_pkey_init_dh’:
  /home1/php-5.6.39/ext/openssl/openssl.c:3580: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3580: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c:3583: error: dereferencing pointer to incomplete type
  /home1/php-5.6.39/ext/openssl/openssl.c: In function ‘zif_openssl_pkey_new’:
  </code></pre>
  
  <p>I already search about this and find this post. But not help me.
  <a href="https://github.com/fpoirotte/phpfarm/issues/23" rel="nofollow noreferrer">https://github.com/fpoirotte/phpfarm/issues/23</a></p>
  
  <p>If i am not use --with-openssl=/home1/openssl options then configure and make command is success. But i need this options. what i miss something?</p>