Re: PHP, Sun, Solaris
| From: | Victor | Date: | Wed, 26 Jul 2000 16:23:42 +0000 |
| Subject: | Re: PHP, Sun, Solaris | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8336@lists.php.net to get a copy of this message | ||
I've had numerous problems with PHP on solaris. However most problems aren't
problems with PHP but problems with Solaris. For one thing, solaris does not
include many libraries and even if it does, they aren't automatically located
during compiles by default. (pcap lib for instance). If you hit this, sometimes
you need to add directives to gcc like
gcc -lsocket -lnsl
because socket lib isn't checked by default and if your code needs it, it will
bomb.
I find sunfreeware site to have very old stuff and you might want to check the
UNC archives for packages.
http://metalab.unc.edu/pub/solaris/sparc/
With php regexp, there is no easy way to do .?* (from perl) where the
expression is not greedy. This can often be replaced by something else. I don't
know how well tested the pcre regexp's are, so make sure you know how to handle
the cases where nongreedy catches is what you want.
The regexp also does not seem to be complient with the POSIX standard (as I
understand it and read about it in the Friedl's Mastering Regular Expressions).
Stuff like \s don't work, and etc. I hope that if someone knows how to get that
stuff to work, they'll post. Perhaps testing the pcre functions on Solaris 8
will tell you if you would just be comfortable there.
Someone pointed out to me today that PHP supports the regexp's listed in this
man page:
man 7 regexp
Not a whole lot there but at least you know exactly where you stand.
Solaris also incurs a slight performance loss when apache is used with DSO's,
so might want to test for that or just use statically compiled apache
executables.
There were a bunch of other problems I had with PHP on Solaris, one that I
recall involved PHP --with-mysql. One problem was indeed PHP and was fixed In
the second Beta of PHP4, I think. Sometimes the compiles still bomb though so
it's a good idea to just use the mysql libraries that come with mysql distro's.
Make sure to read PHP docs on specifing the locations of mysql. I was once told
that if you give this directive
--with-mysql=/usr/local/mysql
then php will look for libs in
/usr/local/mysql/lib/mysql
However, I never was able to verify that this is indeed the case. However, if
--with-mysql bombs for you, create a link /usr/local/mysql/lib/mysql that
points to /usr/local/mysql/lib
This way you are sure to cover your bases. As I said before, I am not sure if
this is PHP freaking out or Solaris. I haven't heard of these problems on any
other platform.
I also never gotten --with-mcrypt to work right. I haven't spent too much time
with it, you might want to try it on Solaris 8 and see what happens. Maybe one
day I'll see if it works, didn't have any time for it lately.
I use Solaris 7 (and not by choice :-). I have to say that BSD's are by far my
favorite os when I have to compare web experience with
Linux/Solaris/BSD/Windows.
Well, that's my pack of change, HTH.
Here is my configure line for PHP that works for now during my apache compiles
./configure \
--with-apache=../apache_1.3.12 \
--disable-debug \
--enable-safe-mode \
--enable-trans-sid \
--enable-track-vars \
--with-mysql=/usr/local/mysql \
--with-pgsql=/usr/local/pgsql
Matthew Clark wrote:
> How does PHP perform on a Sun box (say Netra T1 or E250(Dual CPU)) and
> Solaris 8? Anyone had any problems?
>
> We're about to migrate and I'd love to short-circuit any potential problems
> if possible!!
>
> Thanks,
>
> Matthew Clark.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net