ThemeFuse / Unyson

A WordPress framework that facilitates the development of WP themes
http://unyson.io
926 stars 219 forks source link

Cannot install Unyson Extensions. Error: Cannot create temporary directory #4186

Open talktosanjay3 opened 2 years ago

talktosanjay3 commented 2 years ago

I am running a fresh installation of bitnami/wordpress on docker container. I am trying to install the extensions that are required for my installed theme but the installations fails with error : Cannot create temporary directory. Please find the attached screenshots of the issue. UnysonError1

UnysonError2

Logs: [Sun Oct 24 04:21:22.529502 2021] [php7:warn] [pid 161] [client 192.168.1.108:35183] PHP Warning: Cannot create directory "". It must be inside "/opt/bitnami/wordpress" or "/opt/bitnami/wordpress/wp-content" or "/opt/bitnami/wordpress/wp-content/plugins" or "/opt/bitnami/wordpress/wp-content/themes" in /bitnami/wordpress/wp-content/plugins/unyson/framework/helpers/class-fw-wp-filesystem.php on line 275, referer: https://----------.com/wp-admin/admin.php?page=fw-extensions&sub-page=install&supported

[Sun Oct 24 04:21:22.529800 2021] [php7:warn] [pid 161] [client 192.168.1.108:35183] PHP Warning: Cannot create directory "". It must be inside "/opt/bitnami/wordpress" or "/opt/bitnami/wordpress/wp-content" or "/opt/bitnami/wordpress/wp-content/plugins" or "/opt/bitnami/wordpress/wp-content/themes" in /bitnami/wordpress/wp-content/plugins/unyson/framework/helpers/class-fw-wp-filesystem.php on line 275, referer: https://----------.com.com/wp-admin/admin.php?page=fw-extensions&sub-page=install&supported

[Sun Oct 24 04:21:22.530072 2021] [php7:warn] [pid 161] [client 192.168.1.108:35183] PHP Warning: Cannot create directory "". It must be inside "/opt/bitnami/wordpress" or "/opt/bitnami/wordpress/wp-content" or "/opt/bitnami/wordpress/wp-content/plugins" or "/opt/bitnami/wordpress/wp-content/themes" in /bitnami/wordpress/wp-content/plugins/unyson/framework/helpers/class-fw-wp-filesystem.php on line 275, referer: https://----------.com/wp-admin/admin.php?page=fw-extensions&sub-page=install&supported

[Sun Oct 24 04:21:22.530390 2021] [php7:warn] [pid 161] [client 192.168.1.108:35183] PHP Warning: Cannot create directory "". It must be inside "/opt/bitnami/wordpress" or "/opt/bitnami/wordpress/wp-content" or "/opt/bitnami/wordpress/wp-content/plugins" or "/opt/bitnami/wordpress/wp-content/themes" in /bitnami/wordpress/wp-content/plugins/unyson/framework/helpers/class-fw-wp-filesystem.php on line 275, referer: https://----------.com/wp-admin/admin.php?page=fw-extensions&sub-page=install&supported

Fallenstedt commented 2 years ago

Hi,

I am having the same exact issue.

I am hosting my wordpress site on AWS Lightsail. So far, Unyson is the only extension being used on this site, and it has the same problems in #3181.

It appears others using AWS Lightsail also have this problem: https://community.bitnami.com/t/cannot-create-temporary-directory-aws-wordpress-plugins/98901/5

It looks like the error is appearing here: https://github.com/ThemeFuse/Unyson/blob/master/framework/helpers/class-fw-wp-filesystem.php#L268-L278

Please let me know how I can help you debug this issue.

[Tue Oct 26 03:24:20.128413 2021] [proxy_fcgi:error] [pid 2921:tid 140387339446016] [client 67.168.254.75:60932] AH01071: Got error 'PHP me
ssage: PHP Warning:  Cannot create directory "". It must be inside "/opt/bitnami/wordpress" or "/opt/bitnami/wordpress/wp-content" or "/opt
/bitnami/wordpress/wp-content/plugins" or "/opt/bitnami/wordpress/wp-content/themes" in /bitnami/wordpress/wp-content/plugins/unyson/framew
ork/helpers/class-fw-wp-filesystem.php on line 275', referer: https://www.trustadultcare.com/wp-admin/admin.php?page=fw-extensions
[Tue Oct 26 03:24:40.729893 2021] [proxy_fcgi:error] [pid 3290:tid 140387154806528] [client 67.168.254.75:60965] AH01071: Got error 'PHP me
ssage: PHP Warning:  Cannot create directory "". It must be inside "/opt/bitnami/wordpress" or "/opt/bitnami/wordpress/wp-content" or "/opt
/bitnami/wordpress/wp-content/plugins" or "/opt/bitnami/wordpress/wp-content/themes" in /bitnami/wordpress/wp-content/plugins/unyson/framew
ork/helpers/class-fw-wp-filesystem.php on line 275', referer: https://www.trustadultcare.com/wp-admin/admin.php?page=fw-extensions
Screen Shot 2021-10-25 at 8 24 38 PM

782-8000-96d29a5a95fd.png">

Screen Shot 2021-10-25 at 8 24 44 PM
talktosanjay3 commented 2 years ago

Hi,

I am having the same exact issue.

I am hosting my wordpress site on AWS Lightsail. So far, Unyson is the only extension being used on this site, and it has the same problems in #3181.

It appears others using AWS Lightsail also have this problem: https://community.bitnami.com/t/cannot-create-temporary-directory-aws-wordpress-plugins/98901/5

It looks like the error is appearing here: https://github.com/ThemeFuse/Unyson/blob/master/framework/helpers/class-fw-wp-filesystem.php#L268-L278

Please let me know how I can help you debug this issue.

[Tue Oct 26 03:24:20.128413 2021] [proxy_fcgi:error] [pid 2921:tid 140387339446016] [client 67.168.254.75:60932] AH01071: Got error 'PHP me
ssage: PHP Warning:  Cannot create directory "". It must be inside "/opt/bitnami/wordpress" or "/opt/bitnami/wordpress/wp-content" or "/opt
/bitnami/wordpress/wp-content/plugins" or "/opt/bitnami/wordpress/wp-content/themes" in /bitnami/wordpress/wp-content/plugins/unyson/framew
ork/helpers/class-fw-wp-filesystem.php on line 275', referer: https://www.trustadultcare.com/wp-admin/admin.php?page=fw-extensions
[Tue Oct 26 03:24:40.729893 2021] [proxy_fcgi:error] [pid 3290:tid 140387154806528] [client 67.168.254.75:60965] AH01071: Got error 'PHP me
ssage: PHP Warning:  Cannot create directory "". It must be inside "/opt/bitnami/wordpress" or "/opt/bitnami/wordpress/wp-content" or "/opt
/bitnami/wordpress/wp-content/plugins" or "/opt/bitnami/wordpress/wp-content/themes" in /bitnami/wordpress/wp-content/plugins/unyson/framew
ork/helpers/class-fw-wp-filesystem.php on line 275', referer: https://www.trustadultcare.com/wp-admin/admin.php?page=fw-extensions
Screen Shot 2021-10-25 at 8 24 38 PM

782-8000-96d29a5a95fd.png">

Screen Shot 2021-10-25 at 8 24 44 PM

I am not using AWS. Im hosting on my personal servers with Dockers. The only thing that I see common between the error is that we are using Bitnami Wordpress installations.

gh0stface commented 2 years ago

I'm having the exact same issue and it's producing the exact same message in the logs. I however am using Bitnami's wordpress app running on AWS Lightsail.

I even changed some of the permissions on the /opt/bitnami/wordpress/ & /bitnami/wordpress/ recursively to be more inclusive and over-permission the bitnami user. This did not resolve the issue.

tmetcalfe commented 2 years ago

Having same issue.

talktosanjay3 commented 2 years ago

is there any work around for this? its clearly an issue due to permissions set by Bitnami. ! And, I dont think the developers are going to help us anytime soon.

doankhoi commented 2 years ago

I'm having same issue.

trevordboyer commented 2 years ago

I'm not 100% sure this is what fixed it for me, but I added define('WP_CONTENT_DIR', realpath(ABSPATH . './wp-content/')); to my wp-config.php file. ABSPATH was already defined for me so I just pasted the WP_CONTECT_DIR definition right below it. In case it's not defined for you, this is what it looks like in my file:

if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', __DIR__ . '/' );
}
hubematt commented 2 years ago

@trevordboyer SOLVED MY PROBLEM! THANK YOU!!!!!!!!!!

danyhooks commented 2 years ago

Thanks so much @trevordboyer , I had the same issue and your solution fixed it. You´re best!

rkhyd commented 2 years ago

@trevordboyer solution worked for me too for bitnami wordpress on lightsail.

ngeorges commented 2 years ago

@trevordboyer your solution worked for me too for bitnami wordpress on lightsail.

bigjeffuk commented 1 year ago

I have the same issue on Bitnami hosted locally on VMware. Tried the above fix but still have same issue. Seems images are missing from Unyson also

Install Extension Downloading the "Backup & Demo Content" extension...

Cannot create temporary directory:

Cannot create temporary directory:

Screenshot 2022-09-14 at 14 01 06 Screenshot 2022-09-14 at 14 00 55

Sahu-Ayush commented 1 year ago

Try the above solution but not work. I am using "WordPress Certified by Bitnami and Automattic" on GCP.

Install Compatible Extensions Downloading the "Backup & Demo Content" extension...

Cannot create temporary directory:

Downloading the "Portfolio" extension...

Cannot create temporary directory:

Downloading the "Mega Menu" extension...

Cannot create temporary directory:

Cannot create temporary directory: Cannot create temporary directory: Cannot create temporary directory:

faynercosta commented 1 year ago

I'm not 100% sure this is what fixed it for me, but I added define('WP_CONTENT_DIR', realpath(ABSPATH . './wp-content/')); to my wp-config.php file. ABSPATH was already defined for me so I just pasted the WP_CONTECT_DIR definition right below it. In case it's not defined for you, this is what it looks like in my file:

if ( ! defined( 'ABSPATH' ) ) {
  define( 'ABSPATH', __DIR__ . '/' );
}

perfect, it was very helpful. Thank you very much!!

image

arunkarnann commented 1 year ago

define('WP_CONTENT_DIR', realpath(ABSPATH . './wp-content/'));

Worked for AWS light sail and Bitnami installations