Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Cannot install Unyson Extensions. Error: Cannot create temporary directory

Open talktosanjay3 opened this issue 3 years ago • 15 comments

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

talktosanjay3 avatar Oct 24 '21 05:10 talktosanjay3

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

Fallenstedt avatar Oct 26 '21 03:10 Fallenstedt

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.

talktosanjay3 avatar Oct 29 '21 14:10 talktosanjay3

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.

gh0stface avatar Nov 03 '21 11:11 gh0stface

Having same issue.

tmetcalfe avatar Nov 04 '21 20:11 tmetcalfe

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.

talktosanjay3 avatar Nov 05 '21 01:11 talktosanjay3

I'm having same issue.

doankhoi avatar Nov 24 '21 08:11 doankhoi

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__ . '/' );
}

trevordboyer avatar Mar 06 '22 01:03 trevordboyer

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

hubematt avatar Apr 23 '22 04:04 hubematt

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

danyhooks avatar May 26 '22 07:05 danyhooks

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

rkhyd avatar May 31 '22 02:05 rkhyd

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

ngeorges avatar Jun 26 '22 01:06 ngeorges

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

bigjeffuk avatar Sep 14 '22 13:09 bigjeffuk

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:

Sahu-Ayush avatar Oct 26 '22 11:10 Sahu-Ayush

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

faynercosta avatar Nov 02 '22 05:11 faynercosta

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

Worked for AWS light sail and Bitnami installations

arunkarnann avatar Nov 17 '22 10:11 arunkarnann