[wp-trac] [WordPress Trac] #36374: Audio playback fails on iOS 9.x
WordPress Trac
noreply at wordpress.org
Sun Apr 3 20:32:56 UTC 2016
#36374: Audio playback fails on iOS 9.x
--------------------------------+-----------------------------
Reporter: Clorith | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: External Libraries | Version: 4.4.2
Severity: normal | Resolution:
Keywords: | Focuses: javascript
--------------------------------+-----------------------------
Comment (by a4jp.com):
I think I might have found the problem with iOS 9 update.
I emptied my htaccess file and uploaded a blank file to my server as a
test.
Of course this gave an error stating I needed a newer version of PHP but I
went to the server settings and updates the PHP version of the server
space to PHP 7.0.3.
After that, it added this info to the file automatically.
{{{
suPHP_ConfigPath /home/a4jp/agreatdream.com/xserver_php/
AddHandler fcgid-script .php .phps
FCGIWrapper "/home/a4jp/agreatdream.com/xserver_php/php-cgi" .php
FCGIWrapper "/home/a4jp/agreatdream.com/xserver_php/php-cgi" .phps
}}}
I got the sounds playing perfectly on test page on my server
(http://agreatdream.com/quiz34test.php) then I went to
(http://agreatdream.com/free-study/) but there was a 404 error so I added
a few extra lines of code to the htaccess file from the old file.
{{{
suPHP_ConfigPath /home/a4jp/agreatdream.com/xserver_php/
AddHandler fcgid-script .php .phps
FCGIWrapper "/home/a4jp/agreatdream.com/xserver_php/php-cgi" .php
FCGIWrapper "/home/a4jp/agreatdream.com/xserver_php/php-cgi" .phps
#access plus 2 hours before - above
# BEGIN WordPress
# BEGIN Math Captcha
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php*
RewriteCond %{HTTP_REFERER} !.*agreatdream.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>
# END Math Captcha
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
}}}
After doing this with a refresh, I got Worpress working again. No more 404
errors.
That means that something in the old htaccess file was causing the problem
on iOS devices with WordPress.
I don't know who made the original file but want to find out the best
optimizations for the old file if possible.
{{{
suPHP_ConfigPath /home/a4jp/agreatdream.com/xserver_php/
#Expire Header
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$">
Header unset ETag
FileETag None
ExpiresDefault "access plus 1 day"
</FilesMatch>
#access plus 2 hours before - above
# BEGIN WordPress
# BEGIN Math Captcha
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php*
RewriteCond %{HTTP_REFERER} !.*agreatdream.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>
# END Math Captcha
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>
# BEGIN WP Performance Score Booster Settings
## BEGIN Enable GZIP Compression ##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE image/svg+xml
SetOutputFilter DEFLATE
</IfModule>
## END Enable GZIP Compression ##
## BEGIN Vary: Accept-Encoding Header ##
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
## END Vary: Accept-Encoding Header ##
## BEGIN Expires Caching (Leverage Browser Caching) ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 2 week"
ExpiresByType image/jpeg "access 2 week"
ExpiresByType image/gif "access 2 week"
ExpiresByType image/png "access 2 week"
ExpiresByType text/css "access 2 week"
ExpiresByType application/pdf "access 2 week"
ExpiresByType text/x-javascript "access 2 week"
ExpiresByType application/x-shockwave-flash "access 2 week"
ExpiresByType image/x-icon "access 2 week"
ExpiresDefault "access 2 week"
</IfModule>
## END Expires Caching (Leverage Browser Caching) ##
# END WP Performance Score Booster Settings
SetEnvIf Request_URI ".*" AllowCountry
AddHandler fcgid-script .php .phps
FCGIWrapper "/home/a4jp/agreatdream.com/xserver_php/php-cgi" .php
FCGIWrapper "/home/a4jp/agreatdream.com/xserver_php/php-cgi" .phps
}}}
I'm so glad I found this fix and I hope the lines of code that screw up
the audio playback on WordPress sites on Apple products but not PCs or
Android devices can still be figured out though.
It would also be great to have info on the best optimizations in the
htaccess file for WordPress.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36374#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list