|
||||||||||
|
|
Custom php.ini for PHP CGI in cPanel.February 26, 2010 on 3:36 am | In Cpanel, PHP | No CommentsHi guys, When PHP is compiled as CGI, you won’t be able to provide custom php flags in .htaccess or just simply add a php.ini if your home directory. To enable a custom php.ini for your domain running PHP as cgi, perform the following steps. Please note that I am considering that the server has PHP4 and PHP5 where PHP4 is default (dso)-not relevant and PHP5 (cgi) My username is “presoon” so my home directory will be “/home/presoon” (replace with yours) create a custom cgi script in your cgi-bin directory.
add the following contents.
You should have the custom php.ini at “/home/presoon/public_html/”
Now to the .htaccess file at “/home/presoon/public_html/”
Please note that AddHandler given above is to change default php to PHP5. If you have only PHP5 which is compiled as CGI, you can remove the directive AddHandler from .htaccess. Now the values given in your php.ini at /home/presoon/public_html/ should reflect you info page. Suhosin : Exclude a domain from disabled functionsJuly 8, 2009 on 9:09 am | In PHP | 1 Commentwhen you use use “suhosin.executor.func.blacklist”, in php.ini it will disable those functions to entire domains in the server. However, you can exclude domains from that restriction by using the appropriate entry in the apache configuration. If in php.ini you have added suhosin.executor.func.blacklist = “exec,passthru,shell_exec” and all the functions that you want to disable globally. Find the corresponding domain’s Virtual Host entry for which you want to exclude from /usr/local/apache/conf/httpd.conf suhosin.executor.func.blacklist again but without the function that you need to enable. And so you will enable that function only for one domain.
In this example exec has been enabled for the VirtualHost. Thats all Install PHP-MemCache Module On CentOS 5.0 + RHELJanuary 17, 2009 on 3:27 pm | In Apache, Installation, PHP | No CommentsDownload wget http://pecl.php.net/get/memcache-2.1.2.tgz phpize && This should create memcache.so in your extenstion directory (/usr/lib/php/modules) If it is not done copy the file memcache.so to the default module directory. php -i| grep php.ini add the line ——————— Restart Apache /etc/rc.d/init.d/httpd restart check the module is working should show something like ============= Also, you can find it in your phpinfo page. PhpMyAdmin InstallationJanuary 8, 2009 on 5:48 pm | In Mysql, PHP | No CommentsPhpMyAdmin Installation for a domain is so easy. Enter into your webdirectory (public_html) Download the source into it. From shell wget http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.1.1-english.tar.gz or download the source from http://jaist.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-3.1.1-english.tar.gz and upload it via FTP to your public_html extract the contents tar -zxf phpMyAdmin-3.1.1-english.tar.gz Alternatively you may use the filemanger extract option for the purpose. you can now access your phpmyadmin using the link www.yourdomain.com/phpMyAdmin-3.1.1-english/ Before that you need to configure that. You need to have 1 database 2 database user 3 database user password. Now navigate to the directory libraries under /phpMyAdmin-3.1.1-english/ you will have a file named config.default.php. You need to edit this file =================== Update the above with database name, username, password, control user and password which can be the same as db user and password. Now try accessing the link www.yourdomain.com/phpMyAdmin-3.1.1-english/ Thats all. Ioncube InstallationOctober 19, 2008 on 7:59 pm | In Cpanel, Installation, PHP | No CommentsIoncube is easy to install without recompiling PHP. Specifically in cpanel servers you can install Ioncube without recompiling PHP. These steps can be used to install in any Linux servers.. Check the architecture. uname -i cat /etc/redhat-release Download the source from the link http://downloads2.ioncube.com/loader_downloads/ For i316 architecture linux server select ioncube_loaders_lin_x86.tar.gz 2. Installation cd /usr/local/src/ wget http://downloads2.ioncube.com/loader_downloads/<source>.tar.gz tar zxvff <source>.tar.gz mv ioncube /usr/local Locate you php.ini file using the command php -i | grep php.ini open up the php.ini file using any editors, find the “zend_extension” and add the line zend_extension=/usr/local/ioncube/ioncube_loader_lin_x.x.so Don’t forget to replace x.x with the php verision. For example you have php version 5.2.6, replace the x.x with 5.2. Restart Apache /etc/rc.d/init.d/httpd restart Test it php -v It should show Ioncube. Suexe issue + PHP cgi… individual php.ini file wont reflect….CpanelOctober 10, 2008 on 11:17 pm | In Cpanel, PHP | 1 CommentThe php.ini files in your home directory won’t reflect the changes. Perform the following actions to get it resolved. 1. Moving php5 binary: mv /usr/local/cpanel/cgi-sys/php5 /usr/local/cpanel/cgi-sys/php5.bin 2. Then creating wrapper file in the /usr/local/cpanel/cgi-sys/php5 with the following content: #!/bin/bash # This will fake the name & path and hide the /usr/local/cpanel/cgi-sys/php5 path! if [ -f "$DOCUMENT_ROOT/php.ini" ]; then 3. Save the file and change the permissons: chown root:wheel /usr/local/cpanel/cgi-sys/php5*; Thanks to Cpanel forums….. Install php 5.2 in UbuntuMay 21, 2008 on 3:36 am | In PHP | No CommentsInstalling PHP 5.2 Adding the Dotdeb repository We’re going to add the Dotdeb repository, which will provide the latest versions of PHP for Debian. We need to modify the sources.list file by running the following command vi /etc/apt/sources.list Once you have sources.list file open, add the two following lines deb http://packages.dotdeb.org stable all Now let’s update the packet database to add those of Dotdeb. The version of Dotdeb packets being always superior to those of Debian, the Dotdeb versions will be automatically selected during the installation of PHP Installing PHP 5 After having added the Dotdeb repository, we can move on to installing PHP: apt-get install php5-mysql Test PHP by checking the phpinfo page jmorecfg.hApril 26, 2008 on 3:06 pm | In Installation, PHP | No CommentsIf this header file is not found when you give make for gd installation download it =================== mv jmorecfg.h /usr/lib/ =================== jpeglib.hApril 26, 2008 on 3:04 pm | In Installation, PHP | No CommentsIf this header file is not found when you give make for gd installation download it =================== mv jpeglib.h?rev=1.2 /usr/lib/ =================== configure: error: freetype.h not foundApril 26, 2008 on 2:58 pm | In Installation, PHP | 1 CommentDownload the version you need from http://download.savannah.gnu.org/releases/freetype/ Example for freetype-2.1.10 cd /usr/local/src |
![]() Powered and designed by Presoon.com. |