by dabempire | Feb 26, 2011 | Knowledgebase, Scripting (HTML, PHP, Perl/CGI)
Apache’s ‘DirectoryIndex’ directive is used for this purpose. On our servers we have ‘index.html index.htm index.php ….’ order. You can change it according to your choice. Say you want index.php to be loaded by default then you need to add the following line in .htaccess file. DirectoryIndex index.php index.html index.htm The .htaccess file is usually placed under ‘public_html’ directory of your account. If it is not there you can create...
by dabempire | Feb 26, 2011 | Knowledgebase, Scripting (HTML, PHP, Perl/CGI)
In order to parse HTML pages by PHP engine, you need to add the following line in the .htaccess file. => Clients using PHP 4.x should add the following link in .htaccess file AddHandler application/x-httpd-php4 .htm .html => Clients using PHP 5.x should add the following link in .htaccess file AddHandler application/x-httpd-php5 .htm .html The .htaccess file is usually placed under ‘public_html’ directory of your account. If it is not there you can create...
by dabempire | Feb 26, 2011 | Knowledgebase, Scripting (HTML, PHP, Perl/CGI)
php.net has posted this announcement 13-Jul-2007: ————– Today it is exactly three years ago since PHP 5 has been released. In those three years it has seen many improvements over PHP 4. PHP 5 is fast, stable & production-ready and as PHP 6 is on the way, PHP 4 will be discontinued. The PHP development team hereby announces that support for PHP 4 will continue until the end of this year only. After 2007-12-31 there will be no more releases of PHP 4.4. We will continue to make critical security fixes available on a case-by-case basis until 2008-08-08. Please use the rest of this year to make your application suitable to run on PHP 5. For documentation on migration for PHP 4 to PHP 5, we would like to point you to our migration guide: http://www.php.net/manual/en/migration5.php ———— As you may already know that we provide both php4 and php5 alongside each other. We will continue to provide php4 for one more year, so that all our clients can make the conversion to php5. After that default php will be php5 on all servers. Please test all your applications on php5 asap. Some applications may already work with php5 but following the migration guide will help in making those changes smoothly. How can you test your applications in php5? If you are on our shared/sdx/reseller server (or if your server/vps is setup like our cpanel shared servers) with both php4 and php5, then you can activate and use php5 alongside php4 to test your applications. Please read this KB: http://www.jaguarpc.com/support/kbase/710.html or You can setup your own test environment using XAMPP...
by dabempire | Feb 26, 2011 | Knowledgebase, Scripting (HTML, PHP, Perl/CGI)
Phpsuexec is a deprecated feature in cPanel where php is setup as cgi instead of apache module. All shared hosting servers for HostingWebsitez have been updated from phpsuexec to suPHP. This KB applies to such clients that are still using phpsuexec on their VPSs/Dedicated servers. Phpsuexec brings a new level of security to the way php is used. 1) php scripts execute using the permissions of userid of the account holder instead of user “nobody” 2) world writable folders (chmod 777) is not required for file uploads through php 3) The php file need to have ownership of the user to execute in the user account (by default it is). 4) php file (script) does not need 755 permissions. 644 is fine. In fact 400 or 600 is ok too (especially good for sensitive information). 5) php_flag or php_value can NOT be used in .htaccess files (It will result in Internal Server Error). 6) The php flags that do not work in .htaccess can be moved to php.ini file in the same folder where php script exists. However, the php flag/value will be in the format of php.ini and not that of .htaccess. For example this from .htaccess php_flag register_globals off will go into php.ini as: register_globals off If php.ini exists in the folder where the php scripts exists, it will take all values from it (and nothing will be taken from main php.ini. 7) If the folder that contains a php file/script is world writable (chmod 777), it will result in Internal Server Error. This is similar to cgi/perl scripts under suexec that do not like such permissions...
by dabempire | Feb 26, 2011 | Knowledgebase, Scripting (HTML, PHP, Perl/CGI)
This is a development issue and is explained in the php manual: http://www.php.net/session There is great security risk in doing that but if you are being forced to do that for some reasons, you can do that by placing a php.ini file in the folder where you want to do that, and disable cookies for sessions and enable transparent sid support in php.ini i.e. session.use_cookies = 0 session.use_trans_sid = 1 Note: The above instructions for php.ini file are for our shared/sdx account where phpsuexec is enabled and you can get php.ini file from your control...
by dabempire | Feb 26, 2011 | Knowledgebase, Scripting (HTML, PHP, Perl/CGI)
Yes, HTTP authentication works fine through PHP.