PHPIDS problem

Ether - April 13, 2009 - 16:15
Project:PHPIDS
Version:6.x-1.8-beta2
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Gos77
Status:closed
Description

Hi,

I got problem. I had no problem until last weekend and now when trying to open site as guest I'm geting

Fatal error: Uncaught exception 'Exception' with message 'Temp directory seems not writable' in \htdocs\sites\all\modules\phpids\IDS\Caching\File.php:130 Stack trace: #0 \htdocs\sites\all\modules\phpids\IDS\Filter\Storage.php(264): IDS_Caching_File->setCache(Array) #1 \htdocs\sites\all\modules\phpids\IDS\Filter\Storage.php(107): IDS_Filter_Storage->getFilterFromXML() #2 \htdocs\sites\all\modules\phpids\IDS\Monitor.php(185): IDS_Filter_Storage->__construct(Object(IDS_Init)) #3 \htdocs\sites\all\modules\phpids\phpids.module(83): IDS_Monitor->__construct(Array, Object(IDS_Init)) #4 [internal function]: phpids_init() #5 \htdocs\includes\module.inc(471): call_user_func_array('phpids_init', Array) #6 \htdocs\includes\common.inc(2567): module_invoke_all('init') #7 \htdocs\includes\bootstrap.inc(1070): _drupal_bootstrap_full() #8 \htdocs\includes\bootstrap.inc(981): _drupal_bootstrap(8) #9 W:\WEB\htdocs\index.php(16): drupal_bootstrap(8) #10 {main} thrown in \htdocs\sites\all\modules\phpids\IDS\Caching\File.php on line 130

If I disable PHPIDS - no problems. I've not chenge any persmissions. For File.php persmission is 666.
Any suggestions ? Thanks.

#1

Gos77 - April 22, 2009 - 09:23
Assigned to:Anonymous» Gos77

Sry that answer took so long, I was travelling aorund a little bit ;)

Please reset the File.php permissions to 644 and check the permissions of the used phptmp directory (also configured in PHPIDS module settings) and/or create under your phptmp a writable directory named phpids.

PHPIDS needs this temp directory to create caching data. I hope this helps a little bit.

#2

bstrange - May 17, 2009 - 02:13

I too have this problem. I returned all files to their original settings. I opened IDS and configured tmp to 666. I don't really understand what you said:
"check the permissions of the used phptmp directory (also configured in PHPIDS module settings) and/or create under your phptmp a writable directory named phpids."

what is this used phptmp directory? I have a directory called tmp. Is that what you are referring to?

In case it was, I opened IDS/tmp/ and created IDS/tmp/phpids which I set to 666. It exists as a directory ONLY if I leave IDS/tmp set to 777, if I revert IDS/tmp to 666, ftp fails to retrieve a directory listing for the /tmp directory and when looking at it in legacy file manager, IDS/tmp/phpids shows up as a directory ONLY if it's parent (IDS/tmp) is set to 777.

I followed the readme to the letter, and honestly, I am feeling stupid that I cannot get it to work...

Thanks in advance, for now I am pulling off the phpid mod folders to regain access to my site

#3

Gos77 - May 18, 2009 - 09:05

phptmp = Their is a configured tmp-directory (named upload_tmp_dir) set in your php configuration of your webhost. Check your phpinfo() output to get its full qualified path. If its possible create in this tmp-directory a directory named phpids. Otherwise you have to take the tmp-directory in phpids-module directory.

Take a look at:
Site Configuration -> Logging and Alerts -> PHPIDS settings

Their you can set the PHP-IDS Temp Path. For example your phptmp-path + phpids (example: /var/www/phptmp/phpids) or you can use tmp-directory from phpids module (example: /var/www/htdocs/sites/all/modules/phpids/tmp). Allways your configured tmp-directory needs 770 or 777 permissions, better are 770 permissions. You have to enter allways the full qualified path of your tmp-directory.

I hope these informations help you a little bit.

#4

bstrange - May 20, 2009 - 03:38

Thanks for the reply. As I don't have access to set the tmp-directory on my webhost I would have to do ir within Site configuration. Unfortunately I cannot access my site if phpids module is in the modules directory, and if it is not I have no way to edit the temp path.

Is there a way to manually edit a file in the phpids module to specify a temp path prior to upload?

Thanks in advance!

#5

wladimir.f - June 17, 2009 - 04:40

The quick and dirty way:

- move phpids directory out of the way so you can log back in on your site. (mv phpids ../)

- access admin, disable phpids module

- move phpids back to where ever you installed it. At this step verify proper permissions (770 etc etc)

- reenable phpids module from admin

- set correct tmp path. (Full path and instructions as Gos77 mentioned in his post).

Good luck.

#6

Gos77 - June 17, 2009 - 14:31

thx wladimir.f .. my created post is eaten up by a disconnected websession some days ago.

Only thing I could add: Check PHPIDS install- and configstatus under admin -> reports -> status after installing and configuration PHPIDS before logging out as admin.

greetz Gos77

#7

bigmack83 - September 11, 2009 - 08:28

I have tried the options above and i still cannot get drupal to recognize the phpids install. i have tried with the phpids download in the modules/phpids/phpids dir as well as in /usr/share/php/phpids . I have the temp dir at /tmp/php/phpids which i am not getting any error about. When i was first tryign to install the module i was gettin WSOD's but i believe that was because of the permissions problem. I changes the phpids permissions to 770 and the tmp dir to 777 and drupal still refuses to find the phpids directory.

path: /usr/share/php/phpids-0.6.1.1/lib
temp: /tmp/php/phpids

I have full root access to the server. Running Ubuntu, phptemp dir set to /tmp/php . I am also getting these errors in my log:

closedir(): supplied argument is not a valid Directory resource in /home/public_html/drupal/shamce.net/sites/all/modules/cvs_deploy/cvs_deploy.module on line 190.

readdir(): supplied argument is not a valid Directory resource in /home/public_html/drupal/shamce.net/sites/all/modules/cvs_deploy/cvs_deploy.module on line 175.

opendir(sites/all/modules/phpids/phpids) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Permission denied in /home/public_html/drupal/shamce.net/sites/all/modules/cvs_deploy/cvs_deploy.module on line 174.

opendir(sites/all/modules/phpids/phpids) [<a href='function.opendir'>function.opendir</a>]: failed to open dir: Permission denied in /home/public_html/drupal/shamce.net/includes/file.inc on line 888.

My cvs_deploy module has good permissions so im not sure why its not able to access the files. or even why its accessing that module in the first place.

#8

Gos77 - September 15, 2009 - 06:37

Hello bigmack83,

path and permissions seems to be looking good for me.

Have your tried to deactivate the cvs_deploy module?

Greetz Gos77

#9

bigmack83 - September 15, 2009 - 09:32

If I disable my cvs_deploy module i am unable to see updates for my modules on the updates page as they are installed via drush which I cannot do at the moment because drush has a current bug when being used with pressflow (so i would have no idea when my updates are available)

#10

Gos77 - September 15, 2009 - 16:42

I think the problem is coming only from your cvs_deploy module. If you could try to deactivate the cvs_deploy module for a moment, then I think you'll get no errors. Give it a try ;)

And I think the error appears because directory "sites/all/modules/phpids/phpids" isn't their because this directory makes no sense for me. This should be only "sites/all/modules/phpids".

#11

Gos77 - September 30, 2009 - 09:39
Status:active» postponed (maintainer needs more info)

feedback needed .. otherwise issue will be closed in 2 weeks

#12

Gos77 - November 25, 2009 - 09:56
Status:postponed (maintainer needs more info)» closed

Closed because of no more activity.

 
 

Drupal is a registered trademark of Dries Buytaert.