I'm getting "destinationPath is not writable"
#2
Posted 05 October 2011 - 01:59 PM
not sure, are you using latest PW2.1? There used to be such an issue which was fixed. Any more infos you might can give can be helpful.
@somartist | modules created | support me, flattr my work flattr.com
#4
Posted 05 October 2011 - 07:17 PM
try opening up wire/modules/inputfield/inputfield.module and change this line
if(!is_writable($this->destinationPath)) return $this->error("destinationPath is not writable");
to if(!is_writable($this->destinationPath)) return $this->error($this->destinationPath." is not writable");and see what the error is.
#6
Posted 06 October 2011 - 10:33 AM
Not sure what the problem could be. Safe Mode on/off? in php? Have you manually uploaded the pw folders over ftp , so ftp user/group permission doesn't allow php to write in even if 0777... there can be many reasons.
@somartist | modules created | support me, flattr my work flattr.com
#7
Posted 06 October 2011 - 11:03 AM
When I change that line, I don't get any errors and get a green session saved flash notice.
That's unexpected. I have no idea what that would be. Doesn't sound like something coming from ProcessWire.
I agree with everything Soma and 12345J said.
When you get a "destinationPath is not writable" message, that only comes as a result of a permission issue. 12345J's suggestion was just to rule out the possibility that destinationPath isn't what we think it is for one reason or another, as well as to point out what the directory is so that we know what we're troubleshooting. But if you aren't even getting an error message when changing to his suggested code, that's a bit unusual. Why don't you just try changing it to this temporarily:
if(!is_writable($this->destinationPath)) die($this->destinationPath . " is not writable");
That will halt execution and give you the message indicating exactly what directory isn't writable.
Most likely there is a permission issue affecting the directory due to some change at the server or a site migration that didn't retain permissions. If you have shell access, a simple way to resolve it would be this:
cd /your/web/root/ chmod -R og+rw ./site/assets
If that doesn't do it, or you don't have shell access to do that, then I'd suggest creating a simple test script that you can use to help resolve it without having to upload an image every time. Place this in your web root in a file called test.php:
/test.php:
<?php
if(is_writable('./site/assets/files/1/')) echo "Writable!";
else echo "NOT writable!";
If you know the ID of your page, replace the "1" in the path above with the ID of your page. For instance, ID 123 would be: ./site/assets/files/123/
#9
Posted 06 October 2011 - 11:31 AM
It really looks like a server issue, isn't it?
#10
Posted 06 October 2011 - 11:42 AM
That's good that the directory appears to be writable, but if your uploads aren't going there, then not good. If you want, PM me a link to your phpinfo() and I can have a look to see if there's anything about the server's configuration that might be causing a problem. To get the PHP info, just paste the following into your /test.php, and then send me the URL:
<?php phpinfo();
#11
Posted 06 October 2011 - 03:45 PM
The first thing I want you to try is to create this directory and make it writable to all. Later on, once you know it's working, it'd be better to make it just writable to PHP (if you know what user it's running as). But if this is a dedicated server or the accounts are well jailed, then not a big deal. But for now create this directory and make it 777 (rwxrwxrwx):
/site/assets/cache/uploads/
Then add this to your /site/config.php at the bottom:
ini_set('upload_tmp_dir', $config->paths->cache . 'uploads/');
See if that resolves it. If not, the next thing to try is to see if your web host lets you create your own php.ini, or modify the php settings for your account. Many web hosts let you do this, but you might have to search around in their support docs. You will want to disable safe_mode, which can't be done at runtime with ini_set(). Let me know if you get to this point and I can help you figure it out.
If none of those are an option, then I'd be willing to experiment on the server to find a solution if you don't mind giving me access temporarily.
Btw, the site you have running on that server is gorgeous–beautiful design.
#12
Posted 06 October 2011 - 04:16 PM
Having only faced 2-3 such configuration yet in all the years from friends... I for myself decided to simply tell the owner to change hosting provider. Everytime it got chaotic and it took them ages and 1000000 emails to get them the configuration only nearly right. Often they are shared hostings with php running as a module to save money and have no clue.
@somartist | modules created | support me, flattr my work flattr.com
#13
Posted 07 October 2011 - 08:47 AM
#14
Posted 10 October 2011 - 04:53 AM
#15
Posted 10 October 2011 - 09:30 AM
#16
Posted 12 October 2011 - 02:56 PM
I wan't to thank everyone for all the help and patience!! I'm very happy everything is working ok!!
#17
Posted 21 January 2012 - 09:32 AM
#18
Posted 21 January 2012 - 09:37 AM
@somartist | modules created | support me, flattr my work flattr.com
#20
Posted 22 January 2012 - 11:18 AM
Ejdamd, is some part of PW not working in your case? Let me know, as PW should be safe_mode compatible. But if you are finding it's not we can find out why not and tweak as needed.
Also, I would suggest sending your provider this link. The PHP team strongly recommends not using safe_mode. Servers relying on it tend to be less secure, not more secure. They have deprecated it and it won't be around much longer:
http://php.net/manua...s.safe-mode.php
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













