Page 1 of 1

Problem with PHP and MMAP. [SOLVED]

Posted: Wed Mar 25, 2009 4:04 pm
by sebas
I am getting:

OSSEC HIDS Notification.
2009 Mar 24 18:05:41

Received From: www->/var/log/httpd/error_log
Rule: 1002 fired (level 2) -> "Unknown problem somewhere in the system."
Portion of the log(s):

[Tue Mar 24 14:52:50 2009] [warn-phpd] mmap cache can't open /var/www/vhosts/xxx.com.mx/subdomains/chat/httpdocs/index.php - Permission denied (pid 14281)

--END OF NOTIFICATION

But I don't know what to do or how to fix it.

Thank you for your help.

Re: Problem with PHP and MMAP.

Posted: Wed Mar 25, 2009 8:19 pm
by mikeshinn
This is a PHP error that means either the permissions are wrong on your PHP file or the user and/or group ownerships are wrong on the file. Your best bet is to find out what those should be for your application, or in a short term pinch you can try going with 777 (danger danger danged - not for production use), but if you are in safe mode you still need to make sure the ownership is right.

If this just started happening for you look into what changed (upgrade of your application, copying it over from another system, restored backup, etc.) and see if you can roll back to a version from when it was working and compare the permissions, ownership and code to see if anything changed. Finally, you can try turning safe mode off in PHP if you cant sort out the ownership issues to see if that works.

The ideal solution to make sure the permissions and ownership are correct to run PHP in safe mode though.

Re: Problem with PHP and MMAP.

Posted: Thu Mar 26, 2009 5:47 pm
by hostingguy
When ever I see that it means that the world is set to 0 - like 640 or 750 and just needs to change to 644 or 755 to solve the issue.

Re: Problem with PHP and MMAP.

Posted: Fri Mar 27, 2009 6:16 pm
by sebas
That was it, it is now working.

Thanks for your help.