PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Compiling for 64 bit?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Compiling for 64 bit?

Réponse
 
LinkBack Outils de la discussion
Vieux 26/03/2008, 06h40   #1
Darren
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Compiling for 64 bit?

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? (My VPS came with everything installed as 32 bit except for the
OS, it is 64 bit. So, ideally, I would not like to have to go through
compiling everything.)

Where would be the best place to look for a precompiled PHP5 for
Solaris 64 bit?

Thanks,
Darren
  Réponse avec citation
Vieux 26/03/2008, 07h50   #2
The Natural Philosopher
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Compiling for 64 bit?

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.

> (My VPS came with everything installed as 32 bit except for the
> OS, it is 64 bit. So, ideally, I would not like to have to go through
> compiling everything.)
>
> Where would be the best place to look for a precompiled PHP5 for
> Solaris 64 bit?
>

I would just compile your own..but will it give you 64 bit ints?

> Thanks,
> Darren

  Réponse avec citation
Vieux 26/03/2008, 08h46   #3
Michael Vilain
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Compiling for 64 bit?

In article
<fdc9ae81-d494-48d4-ad4c-3b7d5d261bc2@i12g2000prf.googlegroups.com>,
Darren <djcdude@gmail.com> 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? (My VPS came with everything installed as 32 bit except for the
> OS, it is 64 bit. So, ideally, I would not like to have to go through
> compiling everything.)
>
> Where would be the best place to look for a precompiled PHP5 for
> Solaris 64 bit?
>
> Thanks,
> Darren


You'll need source for everything to compile it into 64-bit. It will
also be slower as memory access for 64-bit applications has a
performance penalty over 32-bit applications.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



  Réponse avec citation
Vieux 26/03/2008, 10h52   #4
Toby A Inkster
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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/
  Réponse avec citation
Vieux 26/03/2008, 13h19   #5
The Natural Philosopher
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Compiling for 64 bit?

Michael Vilain wrote:
> In article
> <fdc9ae81-d494-48d4-ad4c-3b7d5d261bc2@i12g2000prf.googlegroups.com>,
> Darren <djcdude@gmail.com> 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? (My VPS came with everything installed as 32 bit except for the
>> OS, it is 64 bit. So, ideally, I would not like to have to go through
>> compiling everything.)
>>
>> Where would be the best place to look for a precompiled PHP5 for
>> Solaris 64 bit?
>>
>> Thanks,
>> Darren

>
> You'll need source for everything to compile it into 64-bit. It will
> also be slower as memory access for 64-bit applications has a
> performance penalty over 32-bit applications.
>

Surely memory access is FASTER, its disk access that is slower.
  Réponse avec citation
Vieux 26/03/2008, 23h04   #6
Darren
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Compiling for 64 bit?

On Mar 26, 3:52am, Toby A Inkster <usenet200...@tobyinkster.co.uk>
wrote:
> 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 soI
> >> 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....o.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/


Thanks, I will look at those because my math is not very complex and I
have a feeling that if I attempted to recompile PHP and Apache, I am
not sure that everything would end up working in the end (I am new to
Unix based OS's)
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h57.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,17299 seconds with 14 queries