Search results

  1. D

    I am looking for excel file reader specifically .xlsx reader using php 8

    First, make sure you have Composer installed on your system. If not, you can download it from getcomposer.org. Then, create a new PHP project or navigate to your existing project directory and install PhpSpreadsheet using Composer: composer require phpoffice/phpspreadsheet Once installed, you...
  2. D

    PHP 8 compatible DBMS

    PHP 8.x is compatible with MySQL 5.7 and higher, including MySQL 8.0, ensuring full support for the latest PHP features. For MariaDB, versions 10.2 and higher are recommended, with MariaDB 10.3 and higher offering optimal compatibility. Upgrading both PHP and your database to these versions will...
  3. D

    need another pair of eyes pls on this array..

    In your loop: $response = array(); // Initialize an empty array while ($row = mysqli_fetch_array($get_tour, MYSQLI_ASSOC)) { // Assign values to $response array $response = array(["name"=>"$tour_name","dates"=>"$print_start","datee"=>"$print_end","location"=>"$city,$state"]); }...
  4. D

    Please help me How to customize sngine home page

    To achieve your goal of making localhost/sngine/blogs the homepage (localhost/sngine), you typically need to configure the web server (Apache in XAMPP) to rewrite URLs. Here's how you can approach this: 1. Modify .htaccess (Apache Rewrite Rules) In your project directory (localhost/sngine), you...
  5. D

    dates

    In your SQL query, you have used backticks () around $TIMER_INCEPT`, which should ideally be single quotes ('') or none if it's a direct value. Backticks are used in SQL to denote identifiers (like table or column names), not string values. Avatar.TIMER_INCEPT = `$TIMER_INCEPT', Echo...
  6. D

    Beginner noob, that's me

    Sure, I can help you with that! Here is an example of a simple PHP script that accesses an SQL database using a key: ```php <?php // Connect to the database $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "dbname"; $conn = new mysqli($servername...
  7. D

    I need help with php includes

    You can try using the absolute path in your require command like this: You can try using the absolute path in your require command like this: ```php require 'E:/PHP8/INCLUDES/includes/testing.php'; ``` Best regard Danish hafeez | QA Assistant ICTInnovations
  8. D

    Auto Upgrade

    Upgrading a PHP 4.1 software package to PHP 8.1 involves incremental updates through PHP 5.x, 7.x, and finally 8.x, addressing compatibility issues at each stage. Use tools like PHPStan, Rector, and automated testing to aid in the process, and ensure thorough testing before deploying the...
  9. D

    problem create object

    The issue you are encountering is related to how you are trying to access and initialize the $dwelling array within the stdClass object. In PHP, you cannot directly use the array syntax with object properties in the way you've shown. $Reg = new stdClass(); // Initialize basic properties...
  10. D

    Not seeing images

    Here’s a revised version of your script that includes some of these checks: <?php // Enable error reporting for debugging ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); require "thumbimage.class.php"; try { $sourcePath =...
  11. D

    PHP mail() and PHPMailer

    Certainly! Without using Composer, you can still utilize PHPMailer to send emails with attachments. Download PHPMailer: First, download PHPMailer from its GitHub repository. You can download the latest version as a zip file from here. Extract PHPMailer: Once downloaded, extract the contents...
  12. D

    Help fix log error please (PHP Warning: stream_socket_client(): unable to connect to tcp)

    To handle the connection timeout error and exclude it from generating warnings in your PHP logs, you can wrap the stream_socket_client call in a try-catch block to catch the exception that is thrown when a connection timeout occurs public function connect() { $reuseKey = implode(':'...
  13. D

    $_SESSION Issue

    Variable assignment in PHP File 1:In your code snippet, you're assigning the string '$dndid' to $_SESSION['$dndjobnumber'] instead of the value of $dndid. Also, you're enclosing '$dndid' in single quotes, which means it will be treated as a string literal rather than a variable. You should...
  14. D

    hide / protect credentials

    The best approach to hide and protect credentials in scripts involves utilizing environment variables or dedicated configuration files with restricted permissions. Alternatively, consider employing vaults or secrets managers for enhanced security, ensuring encryption for stored credentials if...
  15. D

    Tsp-solver web application with the ant colony optimization method

    Hello! Congratulations on creating your ACO application! That sounds like an interesting project. I'd be happy to help you with testing. Could you provide me with the necessary details to access the application? If you have a link to the video demo or any instructions for testing, that would be...
  16. D

    How to determine if we have php.net?

    The errors in your logs indicate a PHP application running on a Linux server, not tied to .NET. To check the PHP version, run php -v in the terminal. You can specify PHP 8.0 in your Dockerfile for containerization. Best Regard Danish Hafeez | QA Assistant ICTInnovations
  17. D

    Template page help

    your welcome! Thanks you for your feedback Best Regard Danish hafeez | QA Assistant ICTInnovations
  18. D

    Not seeing images

    File Paths: Ensure that the paths to the source and destination images are correct. In your example, you're using relative paths (web/uploads/orig.jpeg and web/uploads/thumb.jpeg). Double-check that these paths are correct relative to the location of your PHP files. <?php // example.php...
  19. D

    What would be the best way to make this code more readable, compact and maintainable?

    To make the code more readable, compact, and maintainable, you can apply several improvements // Get the first record from the query result $actualRecord = $query[0]; // Initialize variables $updateRequired = false; $sql = ''; $fieldsToUpdate = []; // Loop through all fields to check for...
  20. D

    PHP Mail working on one server, not another?

    It's plausible that the production server's hosting provider imposes restrictions on outgoing SMTP connections to prevent spam. Verify firewall settings for port 587 and test connectivity to Gmail's SMTP server using telnet or netcat. Ensure the production server has internet access and check...
Back
Top