This discussion is archived
2 Replies Latest reply: Apr 22, 2013 8:40 AM by 800381 RSS

64-Bit PHP on x86-Solaris 11.1

steffen.moser Newbie
Currently Being Moderated
Hi all,

we have just set-up a x86-Solaris 11.1 based workgroup server which will be mainly used for web-based applications (like ownCloud, Moodle or openAtrium) at our university institute. As some of the members of our workgroup produce media (i.e. full HD videos), we have to deal with files larger than 2 GB. While it isn't any problem for Solaris' Apache to handle these file sizes, some PHP applications have quite big problems to work with files >2 GB correctly as long as the underlying PHP is a 32 bit binary.

I wouldn't have expected that an Enterprise system like Solaris 11.1 still comes with 32 bit applications as the Solaris kernel itself is using the 64 bit mode on x86_64 for quite some time now. Nevertheless, as I really like Solaris' features especially for stable and large storage solutions, I want to stick with Solaris and will have to find a solution for the mentioned problem...

Recompiling PHP from the sources as a 64 bit application is not a problem. I also assume that I would also have to recompile Apache2 as a 64 bit application to get compatibility to the apache module of 64 bit PHP.

My question is: Is there any "gold standard" to accomplish this? Of course, I can recompile all parts that I need by myself, completely independently from the packaging system, and put them to "/usr/local/..." or to "/opt/local/...". I am, however, not sure if this is the best way. Perhaps there are already packages I could install and I don't know about. I can't imagine that I am the first user who experiences that problem. Would it make sense to switch to an alternative package repository like OpenCSW? What I also thought about, was the following way to proceed: I'm going to take the source packages from Oracle and then compile Apache and PHP (and most probably also MySQL) with the option for 64 bit according to the instructions in the sources. So I can also build new packages which I can deploy into the zones where I need them in.

Is there any better way which I might have overlooked, yet?

Thank you in advance for any help!

Kind regards,
Steffen
  • 1. Re: 64-Bit PHP on x86-Solaris 11.1
    sscdvp Newbie
    Currently Being Moderated
    I also assume that I would also have to recompile Apache2 as a 64 bit application to get compatibility to the apache module of 64 bit PHP.
    In S11.1 Apache is already 64-bit aware:

    ls -l /usr/apache2/2.2/bin/amd64
    total 4277
    -r-xr-xr-x 1 root bin 89584 Jan 12 20:47 ab
    -r-xr-xr-x 1 root bin 3649 Jul 19 2012 apachectl
    -r-xr-xr-x 1 root bin 22657 Jul 19 2012 apxs
    -r-xr-xr-x 1 root bin 16424 Jan 12 20:47 checkgid
    -r-xr-xr-x 1 root bin 8925 Jul 19 2012 dbmmanage
    -r-xr-xr-x 1 root bin 1348 Jan 12 20:47 envvars
    -r-xr-xr-x 1 root bin 1081 Jan 12 20:47 envvars-std
    -r-xr-xr-x 1 root bin 36728 Jan 12 20:47 htcacheclean
    -r-xr-xr-x 1 root bin 27232 Jan 12 20:47 htdbm
    -r-xr-xr-x 1 root bin 21616 Jan 12 20:47 htdigest
    -r-xr-xr-x 1 root bin 26432 Jan 12 20:47 htpasswd
    -r-xr-xr-x 1 root bin 841064 Jan 12 20:47 httpd
    -r-xr-xr-x 1 root bin 859224 Jan 12 20:47 httpd.worker
    -r-xr-xr-x 1 root bin 21576 Jan 12 20:47 httxt2dbm
    -r-xr-xr-x 1 root bin 17376 Jan 12 20:47 logresolve
    -r-xr-xr-x 1 root bin 21464 Jan 12 20:47 rotatelogs
    -r-x------ 1 root bin 21712 Jan 12 20:47 suexec.disabled

    The problem is that 64-bit PHP isn't bundled.
    You can try to rise an SR on that topic.

    It seems that it would be easier to integrate large file support only in 32-bit PHP instead.
    Any 32-bit application that is compiled with large file support (-D_LARGEFILE_SOURCE and
    -D_FILE_OFFSET_BITS=64) will work with > 2GB files.
    I think that SR could be realized relatively faster than integrating stable 64-bit PHP.

    Regards,
    Serghei
  • 2. Re: 64-Bit PHP on x86-Solaris 11.1
    800381 Explorer
    Currently Being Moderated
    sscdvp wrote:
    ...

    Any 32-bit application that is compiled with large file support (-D_LARGEFILE_SOURCE and
    -D_FILE_OFFSET_BITS=64) will work with > 2GB files.

    ...
    Regards,
    Serghei
    I wouldn't go that far. I've seen far too much application code where the I'm-SOOO-smart developer just knows "size_t is really an unsigned int".

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points