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

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

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

Post 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
Last edited by jsw_nz on Sun 30. Jan 2005, 23:23, edited 3 times in total.
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Update

Post 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
antal
Posts: 9
Joined: Fri 5. Nov 2004, 22:45

Post 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?
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post 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"]; 
Post Reply