Web Server With Php and windows-1252 Code Page

2 posts / 0 new
Last post
#1 Tue, 2015-11-24 15:24
rsmereka
  • rsmereka's picture
  • Offline
  • Last seen: 8 months 3 days ago
  • Joined: 2015-11-24

Hi All,

I am really liking Apline Linux.

My objective is to set up a LAMP server with Php PDO along with the PDO SQLite and MySQL modules.

My first attempt was using the guide http://wiki.alpinelinux.org/wiki/PhpMyAdmin. That did not work out due to the fact that I could not find a way to change the code page that Lighttpd delivers (I did numerous web searches for this information).

My second attempt was to use the Apache2 guide at http://wiki.alpinelinux.org/wiki/Apache. I am familiar with Apache having Ubuntu/LAMP production servers. I modified /etc/apache2/httpd.conf and changed the AddDefaultCharSet directive to windows-1252. This change has no effect in the Alpine Lunix environment. We are using CP1252 because, historically, French accented characters are input using this code page and our main database (Pick/D3) has it's data stored in CP437 (this goes way back to the 70's-80's) and the data is converted on the-fly to CP1252 for Windows and web presentation.

There are no relevant messages in the Apache error.log and access.log.

For now, I have put this Alpine Linux project on hold until I can solve the code page Apache issue and I have moved onto the same environment using Devuan Linux.

Ideas anyone?
TIA,
Rick

Wed, 2015-11-25 19:24
rsmereka
  • rsmereka's picture
  • Offline
  • Last seen: 8 months 3 days ago
  • Joined: 2015-11-24

I found the answer,

If the web server is offering up Php pages as well as web pages the 'default_charset' directive in /etc/php/php.ini needs to be updated to 'windows-1252'. After I did that and restarted Apache with 'rc-service apache2 restart', all the accented data is being displayed correctly.

Rick

Log in or register to post comments