Unable to update/install any extensions in Joomla

Got into your Cpanel and look for: MultiPHP INI Editor

Select tab: Basic Mode
Configure PHP INI basic settings

Select a location of the domain name from the drop down menu:

Enter the following numbers in the right side column:
DO NOT COPY AND PASTE THESE IN THE .htaccess FILE BECAUSE IT WILL NOT WORK!
Make sure there is a .htaccess file.

max_execution_time     => 60
max_input_time           => 128
max_input_vars           => 1000
memory_limit               => 128M
post_max_size            => 20M
session.gc_maxlifetime => 1440
upload_max_filesize     => 20M

 

Make sure you hit "Apply" to save these new settings.

This code changes file permissions

<?php
echo shell_exec('
#!/bin/bash
find $1 -type f -exec chmod 644 {} \;
echo "  end"
');
?>

This code changes directory permissions

<?php
echo shell_exec('
#!/bin/bash
find $1 -type d -exec chmod -R 755 {} \;
echo "  end"
');
?>

Remove duplicate latitude and longitude pairs from a database table

To remove duplicate latitude and longitude pairs from a database table, you can use a DELETE statement to delete all but one of the duplicates. Here's an example PHP code that performs this operation:

<?php
// database connection parameters
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "database_name";

// connect to the database
$conn = new mysqli($servername, $username, $password, $dbname);

// check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// query to find duplicates
$sql = "SELECT latitude, longitude, COUNT(*) 
        FROM locations 
        GROUP BY latitude, longitude 
        HAVING COUNT(*) > 1";

// execute the query
$result = $conn->query($sql);

// loop through the duplicate pairs and delete all but one
while($row = $result->fetch_assoc()) {
    $latitude = $row["latitude"];
    $longitude = $row["longitude"];
    $count = $row["COUNT(*)"];

    // query to delete duplicates
		$delete_sql = "DELETE FROM mrk6smh_service_locations 
               WHERE latitude = $latitude AND longitude = $longitude 
               LIMIT " . ($count - 1);


    // execute the delete query
    if ($conn->query($delete_sql) === TRUE) {
        echo "Deleted $count - 1 duplicate pairs with latitude $latitude and longitude $longitude.<br>";
    } else {
        echo "Error deleting duplicates: " . $conn->error;
    }
}

// close database connection
$conn->close();
?>

The code first performs the same SELECT query to find the duplicate latitude and longitude pairs, as explained in my previous answer. It then loops through each duplicate pair and deletes all but one using a DELETE statement. The LIMIT clause is used to specify the number of rows to delete, which is equal to the count of duplicates minus one. Finally, the code outputs a message for each duplicate pair indicating how many rows were deleted.

Note that this operation permanently deletes data from the database, so it's important to make sure you have a backup of the data before running the code.

- All From ChatGPT
PLG_GSPEECH_SPEECH_BLOCK_TITLE