LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > HTTP_ACCEPT_LANGUAGE not working

Reply
 
Thread Tools Display Modes
  #1  
Old 03-19-2006, 11:13 PM
pcguru pcguru is offline
Member
 
Join Date: Nov 2005
Posts: 17
Default HTTP_ACCEPT_LANGUAGE not working

Hello!

I have two servers online with litespeed on them, one free version, and one enterprise. Neither of the two hosts put anything in the $_SERVER['HTTP_ACCEPT_LANGUAGE'] variable with PHP, nothing at all.

Apache sets it correctly to "sv" for my browser.

I need this to work, what should I do?
Reply With Quote
  #2  
Old 03-19-2006, 11:57 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
It is a bug in LSAPI code, if you build your own PHP binary, you can fix it by changing two line of code at beginning of "lsapilib.c".
search for "HTTP_ACCEPT_LANG", change it to "HTTP_ACCEPT_LANGUAGE", then serch "11, 19, 20, 16,", change "16" to "20", then rebuild your lsphp binary.

If you are not comfortable with code changes, please wait for next LSAPI code release.
Reply With Quote
  #3  
Old 03-20-2006, 01:54 AM
pcguru pcguru is offline
Member
 
Join Date: Nov 2005
Posts: 17
It worked like a charm as usual mistwang.

After fixing this and trying to enable GD for PHP as well I ran into the next problem, PHP:s extensions do not configure properly because the configure script gets confused on 64-bit machines where /usr/lib64/lib doesn't exist. Solved by http://www.fabnat.com/linux/Php4_FC4_x86_64.html . Could be nice to know if someone asks. 8) Don't know why the PHP-freaks haven't fixed this, it's an old bug report.
Reply With Quote
  #4  
Old 03-20-2006, 09:02 AM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
PHP 5.1.2 and its extensions compile correctly under CentOS 4.2 x86_64.

Perhaps the the problem got fixed in the late php releases but didn't get backported to the earlier ones.

Which php version were you trying to build extensions for on 64bit distro and failed? We definitely would like to keep track of all the weird php problems that litespeed users find and the fixes for them as the forums get as much php questions as litespeed ones. =)
Reply With Quote
  #5  
Old 03-20-2006, 12:59 PM
pcguru pcguru is offline
Member
 
Join Date: Nov 2005
Posts: 17
We're using 4.4.1, should upgrade to 4.4.2 in the future. Changelog for 4.4.2 has no info about this configuration error so I don't think it has been fixed.

Server OS is SLES9.
Reply With Quote
  #6  
Old 06-16-2006, 04:04 AM
pcguru pcguru is offline
Member
 
Join Date: Nov 2005
Posts: 17
Default Not fixed

Just wanted to say that the issue with 64-bit library directories in PHP 4.4.2 has not been fixed. GD still fails when configuring, complaining about "configure: error: libpng.(a|so) not found." etc. It will likely not be fixed since it works in PHP 5.

Here's the guide to fix it since the original site is not available anymore (www.fabnat.com/linux/Php4_FC4_x86_64.html)

1. Add the following lines to configure.in:
Code:
dnl Support systems with system libraries in e.g. /usr/lib64
AC_ARG_WITH(libdir,
[  --with-libdir=NAME     Look for libraries in .../NAME rather than .../lib],
[PHP_LIBDIR=$withval], [PHP_LIBDIR=lib])
Add them right at the beginning, after 'dnl AC_PROG_CXXCPP'.

Keep in mind we want to run ./configure --with-libdir=lib64 and have it cause ./configure to look for libraries in, for example, /usr/lib64 rather than /usr/lib.

2. Edit the config.m4 file for the extension you want to compile (for example, ext/gd/config.m4), and change 'lib', when used to indicate a directory part such as /usr/lib, into '$PHP_LIBDIR'. You have to look at all instances manually; automated replacing for example might replace libjpeg.so with $PHP_LIBDIRjpeg.so which is not what you want.

You can download a fixed config.m4 for GD in PHP 4.4.2 here: http://lowtech.dyndns.org/config.m4.zip

3. Once you're happy and ready to go, type: autoconf to generate your new ./configure

4. Run ./configure but make sure you add --with-libdir=lib64.
Reply With Quote
  #7  
Old 06-17-2006, 08:03 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Thank you for your guide to fix this issue. You can post it in our Wiki if you want. :-)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
htaccess not working sofatime Install/Configuration 1 06-01-2007 04:48 AM
lsws stops working frequently? surfman General 3 01-14-2007 05:56 PM
Apache working with Litespeed? surfman Apache Migration/Compatibility 23 01-02-2007 09:45 AM
Rails Working Directory? Hiro Protagonist Ruby/Rails 3 12-11-2006 04:06 PM
mod_rewrite stopped working on 2.1 upgrade wx4u Bug Reports 3 09-26-2005 06:17 PM


All times are GMT -7. The time now is 08:05 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.