• Resolved Michael

    (@michael8888)


    Without define(‘FS_METHOD’, ‘direct’); set, which is the default, AI Engine causes WordPress to crash. Visitors will be prompted to enter FTP credentials.

    The problem appears to be in classes/logging.php at this line: $creds = request_filesystem_credentials(site_url(), ”, false, false, []); If I remove this line, the plugin functions, but dev logging stops working.

    I’m curious why request_filesystem_credentials is needed for a logging feature. If the plugin can’t write to uploads, it doesn’t make sense to prompt site visitors for credentials.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @michael8888,

    My goal was just to make sure logging would still work on setups without direct filesystem access, like headless WordPress installs. I didn’t realize it would end up prompting regular users for FTP credentials when direct access wasn’t available…

    To fix this, I’ve removed the explicit credentials request. Now, the plugin checks if the filesystem method is set to “direct” (which allows file writes without needing credentials). If it is, logging continues as expected. If not, it quietly falls back to PHP’s error_log, so there are no more FTP prompts or crashes.

    I will release the fix in the 2.8.1 version.

    Thread Starter Michael

    (@michael8888)

    That’s great! Thanks a lot!

    After I removed the credentials request, I no longer saw any logs in the dev log on the AI Engine frontend.

    I am unsure why you need the WP Filesystem to write to a log file in uploads. Many sites don’t use define(‘FS_METHOD’, ‘direct’) due to security. This way, you don’t need to give write permissions to the web server in wp-content, which means you must provide credentials when updating plugins. However, most sites grant write permissions to the uploads folder because you usually don’t have executables there. Thus, you don’t need to fall back to PHP’s error_log and can write to uploads without WP Filesystem being enabled.

    Thread Starter Michael

    (@michael8888)

    I still don’t see version 1.8.1 available for the pro edition. It appears to be accessible only in the standard edition of AI engine.

    Plugin Support Val Meow

    (@valwa)

    Hey @michael8888! 👋

    The forum is reserved for users of the free version of the plugin. If you’re using the PRO version of AI Engine, please log in to your MeowApps account and reach out to us directly through the support there.

    The fix for the FTP-related issues is planned for the next update and will be available to all users. Thanks for your patience!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘AI Engine crashes WordPress without define(‘FS_METHOD’, ‘direct’);’ is closed to new replies.