WebFaction
Community site: login faq

I'm trying to build PHP/Apache in order to use APC using the script made available by Webfaction

If you want to install Alternate PHP Cache (APC) for your PHP apps, you will need to build your own Apache and PHP from source and use that to serve your sites. We have a script that you can use to build Apache and PHP available at http://wiki.webfaction.com/attachment/wiki/MiscellaneousFiles/build_php_worker.sh

The script starts fine and after 30 seconds it starts the compilation, but unfortunately it's failing with following errors while trying to compile OpenSSL

"Error: 0xXXXXXXX out of range of signed 32bit displacement"

Can you provide a fix/update for the PHP/Apache compilation scripts?

Cheers, John

asked 13 Feb '13, 11:54

John Mautari
111
accept rate: 0%


We don't have an updated Apache build script, but you might be do what you need by following these instructions to build only PHP: How did I install my own PHP/cURL/OpenSSL for use with the shared web-server?

You'd basically build PHP with whatever options and extensions you need, then use .htaccess directives to point Apache at your PHP installation.

Hope that helps!

permanent link

answered 13 Feb '13, 15:48

seanf
12.2k41936
accept rate: 37%

I want to have my own custom apache php and I have tried to update your script by making sure that the custom apache-php installation uses shared mysql and postgres.

I have managed to install all apache php dependencies but failed to install PHP in configuration check

Here is the message: configure: error: Cannot find libmysqlclient under /usr. Note that the MySQL client library is not bundled anymore!

I know that my server is centos 64 bit so I tried to google and all I found was put –with-libdir=lib64 in php ./configure parameters.

But if I put that --with-libdir=lib64, php will use server's own lib and not my own installed lib.

Do I have to install my own custom mysql to use my custom apache-php?

(16 Feb '13, 08:50) Maverick Bozo

Hello,

You can link the /usr/lib64/libmysqlclient.so library in your own PHP lib path, i.e.

ln -s /usr/lib64/libmysqlclient.so $HOME/myownPHPlib/libmysqlclient.so

and then start the configuration again.

If you still experience problems compiling then please submit a ticket so we can investigate.

Sincerely,

Valentin I.

(16 Feb '13, 10:22) valentini

Hello,

Actually linking that one file is not enough, so here is what one needs to do:

  • copy, or link, all the /usr/lib64/libmysqlclient* files to your own lib folder
  • set the LIB_LOCATION_MYSQLCLIENT_R variable to point to your own lib folder
  • compile

If that does not work, for some reason, then please contact us, either here, or via our support system.

Sincerely,

Valentin I.

(17 Feb '13, 10:41) valentini

It turns out, I don't have to copy libmysqlclient* to my my-apache-php's lib dir. I only need to create symbolic link of libmysqlclient.so and libmysqlclient_r.so in $HOME/my-apache-php/lib.

I have solved the libmysqlclient not found error by following the some of the suggestion here: http://community.webfaction.com/questions/7959/how-did-i-install-my-own-phpcurlopenssl-for-use-with-the-shared-web-server

Basically, I need to use --with-libdir=lib64 in PHP_FLAGS in your build script. I also have to create symbolic link lib64 in $HOME/my-apache-php which points to my $HOME/my-apache-php/lib

ln -s lib lib64

and remove LIB_LOCATION_MYSQLCLIENT_R from PHP_FLAGS in your build script.

Your modified build script ran successfully. I now have custom apache-php installation.

My custom-apache-php is up and running and when I opened it in browser I got this response:

It works!

Thank you for your help.

(17 Feb '13, 13:21) Maverick Bozo
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×225
×3

question asked: 13 Feb '13, 11:54

question was seen: 3,539 times

last updated: 17 Feb '13, 13:21

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM