Mysql_connect()

GEO_DB

New member
I’m trying your version of exeoutput for php 2024.0 and keep getting the message “undefined function mysqli_connect()”
 
To enable MySQL in ExeOutput for PHP, you need to follow these steps:
  1. Install MySQL: Ensure MySQL server is installed and running on your system. You can download it from the official MySQL website and follow the installation instructions provided.
    Or you can use the Portable MySQL server feature of ExeOutput.
  2. Configure MySQL in your PHP Script:
  • Make sure your PHP script is designed to connect to a MySQL database. Typically, you would use mysqli or PDO_MySQL extensions for this purpose.
  • Example using mysqli:
    Code:
     $servername = "localhost";
     $username = "username";
     $password = "password";
     $dbname = "database";
    
     // Create connection
     $conn = new mysqli($servername, $username, $password, $dbname);
    
     // Check connection
     if ($conn->connect_error) {
         die("Connection failed: " . $conn->connect_error);
     }
     echo "Connected successfully";
  • Example using PDO:
    Code:
     $dsn = 'mysql:host=localhost;dbname=database';
     $username = 'username';
     $password = 'password';
    
     try {
         $dbh = new PDO($dsn, $username, $password);
         echo "Connected successfully";
     } catch (PDOException $e) {
         echo 'Connection failed: ' . $e->getMessage();
     }
    3. Configure ExeOutput for PHP to Include MySQL Extension:
  • Open ExeOutput for PHP.
  • Go to PHP SettingsPHP Extensions.
  • Ensure that the php_mysqli and/or php_pdo_mysql extensions are enabled. Right click on these extensions to enable them.
  • No need to edit the PHP.INI yourself.
4. Build Your Application:
  • Once everything is configured, build your application as an executable using ExeOutput for PHP.
  • Run the generated executable and test the MySQL connection to ensure everything is working correctly.
If you encounter any issues, make sure to check the MySQL server status, the PHP script for any errors, and the ExeOutput configuration for correct settings.
 
indicates that there are errors and that they can be found in the file php_error.log, this file cannot be found on the entire PC.
Don’t think this program works perfectly with php??
 
php_error.log is inside the folder of the EXE file you compiled. If not, then check whether you modified the PHP.INI yourself.
ExeOutput uses the original PHP itself…
 
Thanks, but the program does not work properly, I have removed it from my PC and will therefore not purchase it.
 
Back
Top