Re: Compiling for 64 bit?



The Natural Philosopher wrote:
Darren wrote:

Apache, PHP and MySQL are all running in 32 bit on a Solaris server
that is 64 bit. The main problem I have is I need 64 bit integers so I
have 2 questions:

If I compile PHP for 64 bit, do I need to compile Apache in 64 bit
also?

I wouldn't have thought so..php output is a character stream fed to
apache..via stdout IIRC.

You only "RC" if you're talking about the CGI version of PHP. If you're
using the Apache module (mod_php), you will almost certainly need to
recompile Apache. If you use CGI, you should be able to get away with
using 32-bit Apache with 64-bit PHP.

If your maths is fairly simply (i.e. just some basic addition,
multiplication, etc, but with really big numbers), then you could try
using a PHP class or extension for large numbers in 32-bit PHP. These
basically store numbers in a string and do maths on that. They're a few
orders of magnitude slower than the maths functions built into the CPU,
but if your maths isn't complex, they'll might do the trick.

http://www.php.net/manual/en/ref.bc.php
http://www.icosaedro.it/bigint/
http://www.icosaedro.it/bigfloat/

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 8 days, 11:21.]

Best... News... Story... Ever!
http://tobyinkster.co.uk/blog/2008/03/23/hypnotist/
.



Relevant Pages

  • Re: upgrage from 4.1.2 to 4.3.3+?
    ... > every available RPM for the distro...and there isn't one for PHP. ... > And also, I uh, don't believe I've ever recompiled Apache or PHP. ... Well - You could compile your own version of Apache and PHP and place it ... port number - By this I mean, whenever you visit a website, it defaults ...
    (comp.lang.php)
  • Re: Compiling for 64 bit?
    ... You only "RC" if you're talking about the CGI version of PHP. ... using the Apache module, you will almost certainly need to ... recompile Apache. ... If your maths is fairly simply (i.e. just some basic addition, ...
    (comp.lang.php)
  • Re: Configure help using CentOS 5.1
    ... PHP excludes MySQL, PDO and a bunch of other popular modules. ... apxs is used to compile the package. ... It should be part of your Apache installation; depending on what they shipped you, you may have to install an Apache development package or similar. ...
    (comp.lang.php)
  • Re: PHP5.1.6 Compilation
    ... you may just need to check the apache httpd.conf for the correct module declaration. ... PHP needs to be compiled for apache, ... Is there any need to compile apache also. ... You need to update your extensions from the PECL library. ...
    (comp.lang.php)
  • Re: [PHP] Apache asks to save php file?
    ... Just did a new install on FreeBSD 6.0 of Apache 2, ... PHP4 and MySQL, but the browser asks to save a PHP ... the compile began however. ...
    (php.general)