What are some common pitfalls to avoid when modifying PHP scripts for specific server configurations like Teamspeak?

One common pitfall when modifying PHP scripts for specific server configurations like Teamspeak is not properly handling server-specific settings or dependencies. To avoid this, it's important to thoroughly test the script on the target server and ensure all necessary configurations are accounted for.

// Example code snippet demonstrating how to handle server-specific configurations
if (extension_loaded('pdo_mysql')) {
    // Code specific to servers with MySQL support
    $pdo = new PDO('mysql:host=localhost;dbname=mydatabase', 'username', 'password');
} else {
    // Code for servers without MySQL support
    echo 'MySQL extension not available';
}