Detail: PHP 7.3 SUCCESS, PHP 8.1 + 8.2 error "DOMDocument"
Error: php 8.1 Attempted to load class "DOMDocument" from the global namespace.Did you forget a "use" statement?
Solution: CPANEL goto PHP Selector > extension check XML package checked all
Detail: PHP 7.3 SUCCESS, PHP 8.1 + 8.2 error "DOMDocument"
Error: php 8.1 Attempted to load class "DOMDocument" from the global namespace.Did you forget a "use" statement?
Solution: CPANEL goto PHP Selector > extension check XML package checked all
Browser error: Content-Security-Policy: The page’s settings blocked a JavaScript eval (script-src) from being executed because it violates the following directive: “script-src 'self' 'unsafe-inline' ...
Reason: host setting or .htaccess block scripts
Solutions: solution 1 or 2
Solution 1: .htaccess check example line
#Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' https://cdn.ckeditor.com https://ajax.googleapis.com/ https://cdn.jsdelivr.net https://js.calltrk.com/ https://birdeye.com/ https://cdn.calltrk.com/ https://www.google-analytics.com/ https://widgets-v7.birdeye.com/ https://www.googletagmanager.com/ https://portal.setmysite.com/; object-src 'none';"
Remove or disable this line
Solution 2: .htaccess admin line s
<IfModule mod_headers.c>
Header always set Content-Security-Policy "script-src 'none'"
</IfModule>
Details: .htaccess rewrite rule change '/' to '?'
http://mydomain.com/myservices/support
to
http://mydomain.com/myservices?support
Solution:
<IfModule mod_rewrite.c>
RewriteRule ^myservices/(.*)$ /myservices?$1 [R=301,NC,L]
</IfModule>
<?php
// PHP code to obtain country, city,
// continent, etc using IP Address
//$ip = '52.25.109.230';
$ip= $_SERVER [ "REMOTE_ADDR" ];
// Use JSON encoded string and converts
// it into a PHP variable
$ipdat = @json_decode(file_get_contents(
"http://www.geoplugin.net/json.gp?ip=" . $ip));
//print_r($ipdat);
echo 'Your IP: ' . $ip . "<br/>";
echo 'Country Name: ' . $ipdat->geoplugin_countryName . "<br/>";
echo 'Country code: ' . $ipdat->geoplugin_countryCode . "<br/>";
echo 'City Name: ' . $ipdat->geoplugin_city . "<br/>";
echo 'Continent Name: ' . $ipdat->geoplugin_continentName . "<br/>";
echo 'Latitude: ' . $ipdat->geoplugin_latitude . "<br/>";
echo 'Longitude: ' . $ipdat->geoplugin_longitude . "<br/>";
echo 'Currency Symbol: ' . $ipdat->geoplugin_currencySymbol . "<br/>";
echo 'Currency Code: ' . $ipdat->geoplugin_currencyCode . "<br/>";
echo 'Timezone: ' . $ipdat->geoplugin_timezone;
?>