
Knowledge Base - FAQ
Can I get my own php.ini?
How can I override the php max upload filesize?
How do I install pear modules
You can install Pear modules into your account.
The Pear documentation for this is here:
http://pear.php.net/manual/en/installation.shared.php
The Pear documentation for this is here:
http://pear.php.net/manual/en/installation.shared.php
How do I send mail from my PHP script?
For security and anti-spam reasons, Kattare no longer supports the PHP mail() call.
Instead you can use PEAR's Mail/mail.php module to send via SMTP through
mail.kattare.com.
Something like this should get you started: (use your pop/smtp user/password)
Hopefully that gets you started! Let us know if you have any troubles.

Something like this should get you started: (use your pop/smtp user/password)
<?php
require_once "Mail.php";
$from = "User <user@kattare.com>";
$to = $recipient_email;
$subject = "My Email";
$body = "Hi there.";
$host = "mail.kattare.com";
$username = "user";
$password = "XXXXX";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}?>
Hopefully that gets you started! Let us know if you have any troubles.
How do I setup pretty URLs in MediaWiki on Kattare
In your MediaWiki install directory put a .htaccess with the following content:
Then, in LocalSettings.php in the wiki install directory, make sure the setup matches up with the following:
You can then access your wiki at something like:
http://www.mydomain.com/my/mediawiki/Main_Page

RewriteEngine on RewriteRule ^index.php$ index.php [L,QSA] RewriteRule ^/?([^\/]+)$ index.php?title=$1 [L,QSA]
Then, in LocalSettings.php in the wiki install directory, make sure the setup matches up with the following:
$wgScriptPath = "/my/mediawiki";
$wgScript = "$wgScriptPath/index.php";
$wgRedirectScript = "$wgScriptPath/redirect.php";
$wgArticlePath = "$wgScriptPath/$1";
Where the URL path to your wiki is /my/mediawiki.You can then access your wiki at something like:
http://www.mydomain.com/my/mediawiki/Main_Page
[Submit a Question]
You are at: Kattare Hosting: Knowledge Base: PHP Programming
Comments or feedback? Email: support@kattare.com
Legal: Terms of Service | Privacy Policy | DMCA Procedure | Trademarks
Comments or feedback? Email: support@kattare.com
Legal: Terms of Service | Privacy Policy | DMCA Procedure | Trademarks



