Determine execution time in PHP

<!-- put this at the top of the page -->
<?php
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
;?>

<!-- put other code and html in here -->

<!-- put this code at the bottom of the page -->
<?php
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
echo "This page was created in ".$totaltime." seconds";
;?>

Configure NORTON AV with Mozilla Thunderbird

The fact that Antivirus Norton is not compatible with Thunderbird,you must configure it manually, perform as explained below:

  • Open Norton Antivirus
  • Select Configure > File Systems>Auto-Protect
  • Cross check the box [Exclude files/folders selected]
  • Click [exclusions] and [Files/Folders]
  • Select the folder [Inbox] (without extension) under:

.htaccess upload_max_filesize ini_set()

I m PHP 5.2.0 / Apache
and I can’t access php.ini

I try to update .htaccess
and added
php_value upload_max_filesize “25M”
php_value post_max_size “25M”

However it will give me “Internal Server Error” Continue reading “.htaccess upload_max_filesize ini_set()”

Plesk fix .conf files

In case you need to allow access with PHP scripts of a certain virtual host to additional folder(s), you should set up option ‘open_basedir’ for the virtual host with the new path value, splitting the folder names with colons. This action can only be made by a user with root privileges on domains’ vhost.conf or vhost_ssl.conf files (for SSL virtual host). For more information, read the article ‘Including Directives into Configuration File of Web Serve’ in the Parallels Plesk Panel documentation.

Once applied these changes, you should recreate Apache’s configuration files and restart Apache service using the following command in the shell. If the vhost(_ssl).conf file is found, then it will be automatically added to the httpd.include file of the domain:

~# /usr/local/psa/admin/sbin/websrvmng -a -v

/plesk_installation_directory/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=<domain_name>