Page 1 of 1

Images in SPAW (Linux) - 'Library doesn't physically exist'

Posted: Sun 30. Jan 2005, 10:02
by jsw_nz
When trying to insert an image with SPAW, I get the standard popup window with the message 'Library doesn't physically exist' - at the bottom of the dialogue box. Also the browse button is disabled...so effectively there is no review of images on server, nor any means of uploading files from client.

The installation is working off a linux server (shared)...and this is likely a path declaration problem.
Not too familiar with the proper way to going about troubleshooting and fixing this within Linux.

Have put the manual declaration of $SERVER['DOCUMENT_ROOT'] = ..... in conf.inc.php in order to load Spaw:

Code: Select all

$_SERVER['DOCUMENT_ROOT'] = '/www/virtual/www.bware.co.nz/htdocs/';
Yet when I click the insert image, I get the message....as mentioned above. Otherwise Spaw loads correctly. All directories have been Cmoded correctly. Might this have to do with special read directory priviledges...since the spaw script is basically not finding them....and why the browse functionality is not working is strange, but it is likely conditional on finding upload directories in the first place.


Wanted to ask if others have encountered this problem in linux configurations.
I would like to get this feature working for this installation...and this is the very first time I have encountered this error.

Cheers,
John

Update

Posted: Sun 30. Jan 2005, 23:08
by jsw_nz
OK...fixed...

Even though the explicit declaration of document root can be put into conf.inc.php file...as far as the spaw img library is concerned, the scripts use a variable $_root that is returned via $HTTP_SERVER_VARS['DOCUMENT_ROOT'], returning the wrong path. Using $_SERVER['DOCUMENT_ROOT'] will work...but it needs to be manually included in image library scripts.

Corrections were made by manually editing this file:

include/inc_ext/spaw/dialogs/img_library.php

changing:

Code: Select all

$_root = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
to
$_root = $_SERVER['DOCUMENT_ROOT'];
lines 162, 165, 271, 273

hope this helps someone else...

Cheers,
John

Posted: Wed 1. Feb 2006, 21:07
by antal
Changed this in my img_library.php file, just works fine now. Still cannot upload images to this folder, CHMOD is 777.

What could be the problem?

Posted: Thu 2. Feb 2006, 12:26
by DeXXus
Came up with a little change to DEV 1.2.6 script that got SPAW's little image buttons to work for me (phpWCMS in a subdirectory):
Edit "/include/inc_ext/spaw/config/spaw_control.config.php"

CHANGE:

Code: Select all

$spaw_dir       = '/'.$phpwcms["root"].'include/inc_ext/spaw/'; 
$spaw_base_url    = $phpwcms["site"].$phpwcms["root"]; 
TO:

Code: Select all

$spaw_dir       = 'include/inc_ext/spaw/';    
$spaw_base_url    = $phpwcms["site"];