Problem with PHP and MMAP. [SOLVED]

Support/Development for PHP
sebas
Forum User
Forum User
Posts: 85
Joined: Thu Feb 12, 2009 8:53 pm
Location: Mexico
Contact:

Problem with PHP and MMAP. [SOLVED]

Unread post 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.
CentOS release 6.5 (Final)
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: Problem with PHP and MMAP.

Unread post 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.
hostingguy
Forum Regular
Forum Regular
Posts: 661
Joined: Mon Oct 29, 2007 6:51 pm

Re: Problem with PHP and MMAP.

Unread post 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.
sebas
Forum User
Forum User
Posts: 85
Joined: Thu Feb 12, 2009 8:53 pm
Location: Mexico
Contact:

Re: Problem with PHP and MMAP.

Unread post by sebas »

That was it, it is now working.

Thanks for your help.
CentOS release 6.5 (Final)
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64
Post Reply