Administrative (4)
-make sure account has a dedicated ip
-from cpanel generate key for the domain name
-from cpanel generate CSR with company info to appear in ssl
-copy CSR and keep it in memory to paste into the order form
-goto ssl order form , order regular ssl fill in your own contact then paste the CSR into appropriate area
-make sure that the email accounts are created so that you can confirm the account and recieve the cert
-once you recieve the cert install it from cpanel.
-goto whm and install it from there by typing the web account and then submit
<?php
// random row mysql query example
$sql = "SELECT * FROM tablename
WHERE somefield='something'
ORDER BY RAND() LIMIT 5";
// or, something like this
$sql = "SELECT * FROM tablename
ORDER BY RAND()";
?>
The first thing you'll need to do is make sure you have the ZZIPlib library installed. If you have WHM, goto the Apache Build page, and just build apache with the "Zip" checkbox checked. That simple.
<?php
$zip = zip_open("zip.zip");
if ($zip) {
while ($zip_entry = zip_read($zip)) {
$fp = fopen("zip/".zip_entry_name($zip_entry), "w");
if (zip_entry_open($zip, $zip_entry, "r")) {
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
fwrite($fp,"$buf");
zip_entry_close($zip_entry);
fclose($fp);
}
}
zip_close($zip);
}
?> find . -type d -exec chmod 755 {} \;
- This will “
find” all directories, starting at “.“, and chmod them to755.
find . -type f -exec chmod 644 {} \;
- This snippet does the opposite and finds only files. The difference (beside the file permissions) is the “
-type f“, “f” specifies files and “d” directories.
find . -type f -name '*.htm*' -exec chmod 644 {} \;
- This lets you “
find” files (“-type f“) with a specific extension (“-name '*.htm*'“) and chmod them with your desired permission (“-exec chmod 644 {}“).
chmod -R o+rX
- This snippet will recursively chmod “other” (“
o“) permissions with read/eXecutable (“+rX“), and the capital X ensures that directories and files set (user/group permissions) to executable will be properly modified, while ignoring regular (non-executable) files.
