Note that there are some explanatory texts on larger screens.

plurals
  1. POZend function returns with a bad encoding after apache update
    primarykey
    data
    text
    <p>I updated today my Apache on my debian/Lenny to the 2.2.9 version and for some reason the encoding is not right anymore.</p> <p>I use UTF-8 on all my pages and a lot of javascript to do some ajax, I do that for the login for example. This encoding problem screw up the javascript and create weird behavior on the front end. </p> <p>Here is an example of what my backend returns when I do my ajax calls : {"d":"http://my.domain.com","status":true}���������������</p> <p>(I hope you will see the weird characters, they are the usual question mark and weird rectange with some numbers in them)</p> <p>I tried to force apache to return UTF-8 encoding using the "AddDefaultCharset UTF-8" option. I didn't change my code at all.</p> <p>Please help me on this one, I don't know where to look anymore. </p> <p>Here is my apache2.conf</p> <pre><code>ServerRoot "/etc/apache2" LockFile /var/lock/apache2/accept.lock PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 &lt;IfModule mpm_prefork_module&gt; StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 &lt;/IfModule&gt; &lt;IfModule mpm_worker_module&gt; StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 &lt;/IfModule&gt; User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} AccessFileName .htaccess &lt;Files ~ "^\.ht"&gt; Order allow,deny Deny from all &lt;/Files&gt; DefaultType text/plain HostnameLookups Off ErrorLog /var/log/apache2/error.log LogLevel warn Include /etc/apache2/mods-enabled/*.load Include /etc/apache2/mods-enabled/*.conf Include /etc/apache2/httpd.conf Include /etc/apache2/ports.conf LogFormat "%v:%p %h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %&gt;s %b" common LogFormat "%{Referer}i -&gt; %U" referer LogFormat "%{User-agent}i" agent CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined Include /etc/apache2/conf.d/ Include /etc/apache2/sites-enabled/ </code></pre> <p>And my Vhost configuration</p> <pre><code>NameVirtualHost Myip &lt;VirtualHost *:80&gt; DocumentRoot /var/www/domain.com/public ServerName domain.com ServerAlias *.domain.com ServerAdmin dev@domain.net RequestHeader edit Host: ^([^.]+)\.my\.domain\.com my.domain.com early RequestHeader edit Host: ^([^.]+)\.api\.domain\.com api.domain.com early RequestHeader edit Host: ^([^.]+)\.partners\.domain\.com partners.domain.com early RequestHeader edit Host: ^([^.]+)\.admin\.domain\.com admin.domain.com early AddOutputFilterByType DEFLATE text/html text/plain text/xml &lt;Location /&gt; # Insert filter SetOutputFilter DEFLATE # Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 # the above regex won't work. You can use the following # workaround to get the desired effect: BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html # Don't compress images SetEnvIfNoCase Request_URI \ \.(?:gif|jpe?g|png|swf)$ no-gzip dont-vary # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary &lt;/Location&gt; &lt;Directory /&gt; Options FollowSymLinks AllowOverride All &lt;/Directory&gt; &lt;Directory /var/www/domain.com/public&gt; Options FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php &lt;/Directory&gt; ErrorLog /var/log/apache2/domain_error.log CustomLog /var/log/apache2/domain_access.log combined &lt;/VirtualHost&gt; </code></pre> <p>Thank you for your help and let me know if you need more information. I hope we will be able to resolve this problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload