Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-03-11 18:42:38

Meghanbyte
Member
Registered: 2010-01-22
Posts: 11

Cannot write to image directory, but I can write to the file directory

I think my path is set wrong somewhere, but I can’t find where.
It shouldn’t be /Users/justin/Client/pcg/quill/
I just changed permissions, so that shouldn’t be the problem
Everything on the site works except the textpattern image upload.
Where is this path being set?

Warning: cannot write to image directory
/Users/justin/Client/pcg/quill/images/.

Diagnostics says this:

*
path_to_site is inaccessible: /Users/justin/Client/pcg/quill

Site Directory Unreadable
The directory containing the index.php file specified as the index for your site is unreadable by the webserver. Please check permissions.
*
/Users/justin/Client/pcg/quill/index.php is inaccessible 

Diagnostics: Site Index Inaccessible
The main index.php file specified as the index for your site is unreadable by the webserver. Please check permissions.
*
Image directory is not writable: /Users/justin/Client/pcg/quill/images 

Diagnostics: Directory is not writable
To use the file and image upload capabilities, these directories have to be writable by PHP. Usually this means you have to change permissions to 755 or 777 (depending on your host). This can be done with your FTP client, or alternatively on the command line by issuing a: chmod 755 /path/to/dir

Offline

#2 2010-03-11 18:47:00

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Cannot write to image directory, but I can write to the file directory

Meghanbyte wrote:

I think my path is set wrong somewhere, but I can’t find where.
It shouldn’t be /Users/justin/Client/pcg/quill/
I just changed permissions, so that shouldn’t be the problem
Everything on the site works except the textpattern image upload.
Where is this path being set?

Image directory is set in advanced preferences. Enter it as the relative path from the site root.


Code is topiary

Offline

#3 2010-03-11 18:55:05

Meghanbyte
Member
Registered: 2010-01-22
Posts: 11

Re: Cannot write to image directory, but I can write to the file directory

right, but…

I’ve got it set, relatively to:
Preferences, Advanced, Image Directory: images
and it thinks the path is /Users/justin/Client/pcg/quill/
but it isn’t. where is it getting that path from?
that path is the developer’s laptop, not the server, where the site is currently running.

Offline

#4 2010-03-11 18:56:55

Meghanbyte
Member
Registered: 2010-01-22
Posts: 11

Re: Cannot write to image directory, but I can write to the file directory

why don’t the file and image paths work the same way?

Offline

#5 2010-03-11 19:20:59

Meghanbyte
Member
Registered: 2010-01-22
Posts: 11

Re: Cannot write to image directory, but I can write to the file directory

I think i should move to trouble shooting.

Offline

#6 2010-03-11 20:00:28

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Cannot write to image directory, but I can write to the file directory

path_to_site is inaccessible: /Users/justin/Client/pcg/quill

That’s the one you really need to address. Look at the txpath setting in /textpattern/config.php

Edit: D’Oh! Wrong path. See below.

Last edited by jsoo (2010-03-12 02:40:52)


Code is topiary

Offline

#7 2010-03-12 00:56:42

Meghanbyte
Member
Registered: 2010-01-22
Posts: 11

Re: Cannot write to image directory, but I can write to the file directory

I have a config.php and a config_local.php

I deleted config_local.php because it had the wrong path and we’re not using it any more.

I still get the same Warning: cannot write to image directory
/Users/justin/Client/pcg/quill/images/.

The txpath setting in /textpattern/config.php is the correct one.

is my cache remembering the old path?

Last edited by Meghanbyte (2010-03-12 01:17:09)

Offline

#8 2010-03-12 02:41:31

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Cannot write to image directory, but I can write to the file directory

Sorry, my mistake above. txpath isn’t the problem. Try logging out and back in again. The database has a path_to_site pref, and this is handled automatically by Textpattern.


Code is topiary

Offline

#9 2010-03-19 15:54:22

Meghanbyte
Member
Registered: 2010-01-22
Posts: 11

Re: Cannot write to image directory, but I can write to the file directory

Logging out and in didn’t seem to help.
How do I get TP to automatically see a new path?

I’ve still got the same problem
Warning: cannot write to image directory
/Users/justin/Client/pcg/quill/images/.

even though I think I’ve eliminated all instances of that path in my code.

Offline

#10 2010-03-19 20:42:50

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Cannot write to image directory, but I can write to the file directory

Can you post the exact diagnostics? Admin > Diagnostics (set Detail to ‘high’).

Offline

#11 2010-03-20 02:13:10

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Cannot write to image directory, but I can write to the file directory

I think I was wrong about path_to_site auto-updating. Taking a closer look, I see that on the admin side, it will do so when the preference is empty or missing. On the public side I think it will auto-update if the preference value doesn’t match the location of the public index.php file. So simply browsing to the site (public side) should correct the preference value.

If I’m still wrong, and if you have direct database access, edit (or simply remove) the path_to_site preference in the txp_prefs table.


Code is topiary

Offline

#12 2010-03-20 02:28:58

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Cannot write to image directory, but I can write to the file directory

Please Meghanbyte,

  • Post full high diagnostics so we can see your server setup and information about TXP as Els suggested. Currently we know nothing and can do nothing. We don’t even know your TXP version.
  • If the path shouldn’t be /Users/justin/Client/pcg/quill/image as you say, what should it be? If the path is incorrectly returned, and you are using TXP build that includes auto-update of paths, then I would suspect that your server is setup incorrectly, for example paths are miss-defined.

jsoo wrote:

So simply browsing to the site (public side) should correct the preference value.

That is how it works. Path in the config.php is there just for plugins that use it directly instead of txpath constant and $path_to_site global.

If somehow auto-update gets wrong path (shouldn’t be happening as of PHP 4.3.0 by php itself), then $here can be hard-coded into config.php if required. It’s not fix, nor you should be hard-coding it there.

Offline

Board footer

Powered by FluxBB