Do your web hosting packages support the SourceGuardian PHP Encoder?

Friday, May 22nd, 2009

 

By default, SourceGuardian is not installed on any of our web hosting packages. However, that does not mean that you are not able to host any scripts that are encoded with SourceGuardian!

SourceGuardian does tell you to upload there encoders to the scripts folder and it will load the files as long the php function dl() is enabled as part of the installation. And unfortunately we have to dissapoint you once again, dl() is disabled for security reasons on all web hosting packages.

 

Below we will explain you how to get the scripts to run properly, this is possible since we run suPHP.

 

First you need to create a new .htaccess file in your public_html folder if you haven’t done already. Otherwise you need to edit your current .htaccess file.

In your .htaccess file under your public_html folder, add the following:

 

suPHP_ConfigPath /home/user/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

 

Note: Make sure to change the user text above to your account user name.

 

Then create a php.ini file under your public_html folder and add the following (or edit the current file if you have a php.ini file):

 

extension_dir=/home/user/public_html/extensions

 

[Zend]
zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.2.so
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
extension=/home/user/public_html/extensions/ixed.5.2.lin

 

Note: Make sure to change the user text above to your account user name.

Zend Optimizer and IonCube loaders are added as well so you won’t drop the support for them with your new php.ini file.

 

Now create a new folder called "extensions" in your public_html folder and download the required loader at http://www.sourceguardian.com/ixeds/ixed4.lin.x86-64.zip

Then extract the zip file and upload the file "ixed.5.2.lin" to your created folder "extensions"

You may choose another folder to upload the SourceGuardian loader to but remember to have the folder name reflect the one you typed within your php.ini file.

 

Full details about SourceGuardian can be found at there website, located here:

http://www.sourceguardian.com

 

Congratulations, you have just installed SourceGuardian in your web hosting account and your script should now run properly!

How to increase PHP limits

Monday, May 18th, 2009

 

In your .htaccess file under your public_html folder, add the following:

suPHP_ConfigPath /home/user/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>

 

Note: Make sure to change the user text above to your account username.

 

Then create a php.ini file under your public_html folder and add any of the following that are needed:

upload_max_filesize = 12M
post_max_size = 16M
memory_limit = 32M
max_execution_time = 60
upload_tmp_dir = /tmp

 

Information below will not work at DS-Hosting Solutions, use the above method instead because we are running suPHP.

 

For servers running normal PHP you can increase the PHP max upload size for your account by adding the following to your .htaccess file:

php_value upload_max_filesize "12M"
php_value post_max_size "16M"
php_value max_input_time "60"

HTTP Error 500 – Internal server error

Monday, May 18th, 2009

 

If you are receiving the error 500 it will be due to one of the following issues:

  • .htaccess

Check your .htaccess file for php_ commands. If you have any, add a # in front of the line or delete them. Then test your webpage. If you still have the error try removing everything from your .htaccess file. If that resolves the issue add the .htaccess lines back one at time until you find the bad line.

If these steps do not resolve your issue try the next steps.

  • File and folder permissions

Check your files and folders to make sure you don’t have any files with the permission 666 or folders with the permission 777.

 

Those permissions are not needed on our servers. We run suPHP which allows you to make files writable without creating the major security hole that occurs when using the permissions 666 and 777.

 

The correct permissions should be:

Folders: 755

Files: 644

Files that need to be unwritable: 444

  • MIME-Types

If you added a MiME-Type to the system in order to run html files as php scripts, you will have to remove it and add an ApacheHandler instead.

 

Log into cPanel, then click on Apache Handlers and add the following:

Handler: application/x-httpd-php

Extension(s): .html

How to login webmail directly without acessing cPanel?

Monday, May 18th, 2009

 

How to login directly using “webmail.domain.com” in to Squirrelmail, Horde or RoundCube of any account?

 

First you need to create a subdomain that you want to redirect to your preferred Webmail client [Squirrelmail / Horde / RoundCube].

 

Following are the steps to create subdomain.

  1. Login in to your cPanel interface.
  2. Select the Subdomain option, and create the subdomain. (For eg: webmail.domain.com)
  3. Once it has been created, go to the File Manager option of the cPanel.
  4. Change path to “public_html” by selecting the folder image beside the text “public_html”
  5. Now change the path to folder that was create by your subdomain. (as per our example it would be the “webmail” folder.
  6. Once inside this directory [webmail], you will see “.htaccess” file, if it’s not there then you need to create it manually.
    • If it is not there then create new using below steps: (if it already exists proceed to step 10)
  7. Create it [.htaccess] by selecting the “Create New File” option.
  8. A menu appears in the top right corner of the File Manager interface. Choose “Text Document” and name it “.htaccess[without quotes]
  9. Now refresh File Manager and you will then see your new file [.htaccess] in the listing of that directory.
  10. Click on the text title for the .htaccess file on the left side of the screen and a menu appears in the top right of the screen.
  11. Choose the “Edit File” option, a new window opens.
  12. Add the following lines:

- If You Want To Redirect “webmail.domain.com” to the Squirrel Mail Client: -

 

RewriteEngine on

RewriteCond %{HTTP_HOST} ^webmail.domain.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.webmail.domain.com$

RewriteRule ^(.*)$ http://domain.com:2095/3rdparty/squirrelmail/index.php$1 [R=301,L]

 

- If You Want To Redirect “webmail.domain.com” to the Horde Webmail Client: -

 

RewriteEngine on

RewriteCond %{HTTP_HOST} ^webmail.domain.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.webmail.domain.com$

RewriteRule ^(.*)$ http://domain.com:2095/horde/$1 [R=301,L]

 

- If You Want To Redirect “webmail.domain.com” to the RoundCube Webmail Client: -

 

RewriteEngine on

RewriteCond %{HTTP_HOST} ^webmail.domain.com$ [OR]

RewriteCond %{HTTP_HOST} ^www.webmail.domain.com$

RewriteRule ^(.*)$ http://domain.com:2095/3rdparty/roundcube/$1 [R=301,L]

 

NOTE: replace “domain.com” above with your actual domain name.

 

Enjoy Direct Webmail Client Login. :)

.htaccess – Change your default directory page.

Friday, May 15th, 2009

 

Some of you may be wondering, just what in the world is a DirectoryIndex? Well, this is a command which allows you to specify a file that is to be loaded as your default page whenever a directory or url request comes in, that does not specify a specific page. Tired of having yoursite.com/index.html come up when you go to yoursite.com? Want to change it to be yoursite.com/ILikePizzaSteve.html that comes up instead? No problem!

 

DirectoryIndex filename.html

 

This would cause filename.html to be treated as your default page, or default directory page. You can also append other filenames to it. You may want to have certain directories use a script as a default page. That’s no problem too!

 

DirectoryIndex filename.html index.cgi index.pl default.htm

 

Placing the above command in your htaccess file will cause this to happen: When a user types in yoursite.com, your site will look for filename.html in your root directory (or any directory if you specify this in the global htaccess), and if it finds it, it will load that page as the default page. If it does not find filename.html, it will then look for index.cgi; if it finds that one, it will load it, if not, it will look for index.pl and the whole process repeats until it finds a file it can use. Basically, the list of files is read from left to right.

 

One thing you have to keep in mind, sub-folders will adopt the .htaccess settings specified within there main folder.