Modify file.php to solve a wordpress temporary folder issue

Status
Not open for further replies.

backint2

New Member
Messages
25
Reaction score
1
Points
3
Hi, i need someone to modify for me the file.php because i cannot upload images due to this error that says "Missing a temporary folder" This is causing me more problems, i run an online shop with woocommerce and when a client purchase something, the purchase is cancelled automatically.
The instructions i get to find are here and are the following:

"I had this same problem and it was from WordPress working in a different directory than the root, trying to upload to a tmp folder that doesn't exist.
If you are using WordPress 2.7, go to wp-admin/includes/file.php, and after line 260, add this line temporarily:
echo getcwd();
This will tell you the current working directory. If there is more than just "/", you will need to add this to your PHP temporary directory line as well instead of just the usual "/tmp"
So, I changed my php.ini file from upload_tmp_dir ="/tmp/" to
upload_tmp_dir ="/usr/home/usernamehere/tmp/"
Works now!"

Hope someone can help me, thanks!

________________________________________________________________________________
Hola, necesito que alguien me ayude modificando el archivo file.php porque no puedo subir imágenes a mi web ya que "Falta un directorio temporal" Esto me está causando más problemas, ya que tengo una tienda online con woocommerce y cuando un cliente compra algo, el pedido se cancela de forma automática.
Las instrucciones que he podido encontrar están en este link y son las siguientes:

"I had this same problem and it was from WordPress working in a different directory than the root, trying to upload to a tmp folder that doesn't exist.
If you are using WordPress 2.7, go to wp-admin/includes/file.php, and after line 260, add this line temporarily:
echo getcwd();
This will tell you the current working directory. If there is more than just "/", you will need to add this to your PHP temporary directory line as well instead of just the usual "/tmp"
So, I changed my php.ini file from upload_tmp_dir ="/tmp/" to
upload_tmp_dir ="/usr/home/usernamehere/tmp/"
Works now!"

Espero que alguien pueda ayudarme, gracias!
 

backint2

New Member
Messages
25
Reaction score
1
Points
3
Hi again, is there anyone who can help me, or tell me what can i do, or something?
Thanks!
Hola de nuevo, hay alguien que me pueda ayudar, o decirme que debo hacer?
Gracias!
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi backint2,

Sorry I missed this thread. The error message is showing because there was a problem when PHP was trying to access your temporary folder, which shouldn't happen. I took a look at your account, and it looks like some crucial files in your home directory are missing, which may be causing this issue. Unfortunately there is no easy way for me to restore these files, and we would effectively have to recreate your account to do this.

If you wish, I can recreate the account and then restore your files and databases to as they are now. Are you happy with me doing this?

Thank you,
 

backint2

New Member
Messages
25
Reaction score
1
Points
3
Hi! yes please do that,
Just one question,
I´ll keep my webpage as it is now?
Thanks in advance!
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi backint2,

Yes, I'll restore all your webpages and other files to as they were. :)

Edit: I'm now recreating your account. Your website and cPanel account may temporarily go offline while I do this.

Thank you,
 
Last edited:

backint2

New Member
Messages
25
Reaction score
1
Points
3
Ok, thanks again!! really appreciate your help, I have been wondering why I had so many issues this last weeks!
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

This should now be completed. Please could you check whether you can upload images? :)

Thank you,
 

backint2

New Member
Messages
25
Reaction score
1
Points
3
Hi, yes now its working! thanks so much for your time and for helping me!
 

backint2

New Member
Messages
25
Reaction score
1
Points
3
Hi again, it seems like something is wrong, i cannot manage to find my wordpress installation in softaculous to make a backup and also when i try to navigate my webpage i get this error:

Not Found
The requested URL /shop/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Any idea on how to solve this? Thanks!
 
Last edited:

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi backint2,

Sorry about that. I've now resolved the problem with your WordPress pages, and copied over your Softaculous settings. Please could you check again now? :)

Thank you,
 

tstsstx

New Member
Messages
8
Reaction score
0
Points
1
Dead-i

Hey, I'm having a very similar problem with my Wordpress Installation too. Could you please recreate my account too? And restore it from a backup after?

Thank You
 
Status
Not open for further replies.
Top