1
Booga
xcGallery in safe mode
  • 2004/4/20 2:43

  • Booga

  • Not too shy to talk

  • Posts: 124

  • Since: 2003/11/29


Hi, I have installed xcGallery and netpbm and have to run it in safe mode for the moment.

In the readme.txt file of the module there is a "workaround" for running in safe mode and reads like this:

----------------------------------
Safe Mode:
If php runs on your server the safe mode enabled, you can't use xcGallery as it is, but there is a workaround. I haven't test this option, but it works only! then the safe mode configuration is faultily. To try this out, open the xcgal/include/init.inc.php go to line 36 and uncomment "//define('SILLY_SAFE_MODE',1);" (delete the slashes) ans save it now go and try it, may be you have luck.
----------------------------------

I have done this as it says and get this message when I try to upload a single picture in usermode:

Quote:
/home/httpd/vhosts/mydomain.com/subdomains/kiwisworld/httpdocs/netpbm/jpegtopnm 'albums/userpics/919.jpg' | pnmscale -xsize=59 -ysize=80 | pnmtojpeg -quality=80 > 'albums/userpics/thumb_919.jpg'


followed by these errors:

Quote:
Warning [PHP]: chmod(): Unable to access albums/userpics/thumb_919.jpg in file modules/xcgal/include/picmgmt.inc.php line 252
Warning [PHP]: chmod(): No such file or directory in file modules/xcgal/include/picmgmt.inc.php line 252
Warning [PHP]: getimagesize(): Unable to access albums/userpics/thumb_919.jpg in file modules/xcgal/include/picmgmt.inc.php line 255
Warning [PHP]: getimagesize(albums/userpics/thumb_919.jpg): failed to open stream: No such file or directory in file modules/xcgal/include/picmgmt.inc.php line 255


I have looked at the code for lines 252 and 255 and they look like this:

Quote:
line 252= chmod($dest_file, octdec($xoopsModuleConfig['default_file_mode']));

line 255= $imginfo = getimagesize($dest_file);


I have set the permissions of the albums and userpics folders to 777 and the netpbm folder and files to 777 as required.

Can you please help me.

Thanks,
Booga.

2
m0nty
Re: xcGallery in safe mode
  • 2004/4/20 3:33

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


i think the answer is in your 1st paragraph.. (safe mode is on!!!)

the hack for safe mode only works in some cases when the php was buggy or not setup correctly..

try it with safe mode off, i'm gathering u have control of php.ini with the statement in your 1st line..

2ndly try running it using GD instead of Netpbm and see if it works that way, ur netpbm might not be setup right..

hope this helps

3
Booga
Re: xcGallery in safe mode
  • 2004/4/20 4:15

  • Booga

  • Not too shy to talk

  • Posts: 124

  • Since: 2003/11/29


thanks very muchly for your time m0nty, i have changed over to GD and all is working fine apart from the fact that GD doesn't support .gif file types........ I like the netpbm as I have it running perfectly on my other sites but the host for this site won't turn safe mode off for the moment as it is a subdomain and and the CP doesn't allow safe mode off on subdomain as yet.......he is working on it!!

Is there a hack or mod or fix that will allow GD to work with .gif file types??

4
m0nty
Re: xcGallery in safe mode
  • 2004/4/20 4:31

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


yes i like netpbm too, but my host won't install it :( we're gonna be moving servers later in the year.. hopefully to a dedicated 1..

there isn't a hack to make gd work with gifs as yet..

the reason they didn't include gif support is due to patents with Unisys LZW (which expired in the USA last year) but doesn't expire in the rest of the world till june this year.the lack of control of distributing etc without upsetting the lawyers of the people who created the gif format so they chose to not include support till the patent expires for the rest of the world..

so after june/july this year you should expect to see Gif support being added to future releases of the GD libraries..

sorry can't i help you more.. it's just a waiting game i'm afraid :(

5
Booga
Re: xcGallery in safe mode
  • 2004/4/20 5:00

  • Booga

  • Not too shy to talk

  • Posts: 124

  • Since: 2003/11/29


m0nty, thanks for your generous answers.

You should be able to install netpbm yourself in your webspace. I just unpacked it locally and ftp'd it to my webspace and then changed all permissions on folder and included files to 777.

In XOOPS gallery or xcGallery in admin>xcgallery>preferences change the image manager to netpbm and the give the phisical path ti that folder in the next form box that askes for it.

Thats all I did.......

Give it a go mate!!

Booga.

Login

Who's Online

956 user(s) are online (85 user(s) are browsing Support Forums)


Members: 0


Guests: 956


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits