<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ITechLog &#187; PHP</title>
	<atom:link href="http://itechlog.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://itechlog.com</link>
	<description>Your source to IT solutions, interesting technology news and code snipets.</description>
	<lastBuildDate>Mon, 12 Jul 2010 16:42:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Automatically display form data with PHP</title>
		<link>http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/</link>
		<comments>http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/#comments</comments>
		<pubDate>Wed, 13 May 2009 12:23:44 +0000</pubDate>
		<dc:creator>Alex Costa</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[$_POST]]></category>
		<category><![CDATA[foreach()]]></category>
		<category><![CDATA[html form]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://itechlog.com/?p=723</guid>
		<description><![CDATA[This is a simple PHP  script to automatically display (dump output)  data submited from a html form. The form setup all inputs (form fields) need to have the same name with [] at the end to turn it into an array,  e.g &#60;input type=text name=formdata[]&#62; formq.html content &#60;form method=post action=showme.php&#62; Name: &#60;input type=text name=formdata[]&#62;&#60;br&#62; Email: [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple PHP  script to automatically display (<strong>dump output</strong>)  data submited from a html form.</p>
<p><strong>The form setup</strong></p>
<ul>
<li>all inputs (form fields) need to have the same name with [] at the end to turn it into an array,  e.g &lt;input type=text name=formdata[]&gt;</li>
</ul>
<p style="padding-left: 30px;">formq.html content</p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">&lt;form method=post action=showme.php&gt;<br />
Name: &lt;input type=text name=formdata[]&gt;&lt;br&gt;<br />
Email: &lt;input type=text name=formdata[]&gt;&lt;br&gt;<br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">&lt;input type=submit value=ok&gt;<br />
&lt;/form&gt;</span>
</p>
<p style="padding-left: 30px;">
<p><strong>The Script setup</strong></p>
<p style="padding-left: 30px;">showme.php content</p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">&lt;?php<br />
$data = $_POST['formdata']; # get value from the form fields</span>
</p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">foreach ( $data as $key =&gt; $value ) { # loop through array collecting the results</span></p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">echo  &#8220;$value&lt;br&gt;&#8221;;  # output the data  &#8211; print to page<br />
}<br />
?&gt;</span></p>
</p>
<ul class="socialwrap size32 row">
<li class="iconOnly"><a rel="nofollow" target="_blank" class="delicious" href="http://delicious.com/post?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F&amp;title=Automatically+display+form+data+with+PHP" title="Bookmark this post : Automatically display form data with PHP on Delicious"><span class="head">Bookmark on Delicious</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="digg" href="http://digg.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F&amp;title=Automatically+display+form+data+with+PHP&amp;bodytext=This+is+a+simple+PHP%C2%A0+script+to+automatically+display+%28dump+output%29%C2%A0+data+submited+from+a+html+form.%0D%0A%0D%0AThe+form+setup%0D%0A%0D%0A%09all+inputs+%28form+fields%29+need+to+have+the+same+name+with+%5B%5D+at+the+end+to+turn+it+into+an+array%2C%C2%A0+e.g+%26lt%3Binput+type%3Dtext+name%3Dformdata%5B%5D%26gt%3B%0D%0A%0D%0Aformq.html+content%0D%0A%0D%0A%26lt%3Bform+method%3Dpost+action" title="Digg this post : Automatically display form data with PHP"><span class="head">Digg this post</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="facebook" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F&amp;t=Automatically+display+form+data+with+PHP" title="Recommend this post : Automatically display form data with PHP on Facebook"><span class="head">Recommend on Facebook</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="google_buzz" href="http://www.google.com/reader/link?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F&amp;title=Automatically+display+form+data+with+PHP" title="Buzz up this post : Automatically display form data with PHP "><span class="head">Buzz it up</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="yahoo_buzz" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F" title="Buzz up this post : Automatically display form data with PHP "><span class="head">Buzz it up</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="orkut" href="http://promote.orkut.com/preview?nt=orkut.com&amp;du=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F&amp;tt=Automatically+display+form+data+with+PHP" title="Share this post : Automatically display form data with PHP on Orkut"><span class="head">Share on Orkut</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="reddit" href="http://www.reddit.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F&amp;title=Automatically+display+form+data+with+PHP" title="Share this post : Automatically display form data with PHP on Reddit"><span class="head">share via Reddit</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="stumble" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F&amp;title=Automatically+display+form+data+with+PHP" title="Share this post : Automatically display form data with PHP with Stumblers"><span class="head">Share with Stumblers</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="twitter" href="http://twitter.com/home/?status=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F05%2F13%2Fautomatically-display-form-data-with-php%2F" title="Tweet this post : Automatically display form data with PHP on Twitter"><span class="head">Tweet about it</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="rss" href="http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/feed" title="Follow this post : Automatically display form data with PHP comments"><span class="head">Subscribe to the comments on this post</span></a></li>
<li class="iconOnly"><a rel="_blank" class="email" href="mailto:?subject=ITechLog : Automatically display form data with PHP&#038;body=here is a link to a site I really like.   http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/" title="Tell a friend about this post : Automatically display form data with PHP "><span class="head">Tell a friend</span></a></li>
</ul>
<div class="clean"></div>

<!-- start wp-tags-to-technorati 1.01 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/%24_POST' rel='tag' target='_self'>$_POST</a>, <a class='technorati-link' href='http://technorati.com/tag/foreach%28%29' rel='tag' target='_self'>foreach()</a>, <a class='technorati-link' href='http://technorati.com/tag/html+form' rel='tag' target='_self'>html form</a>, <a class='technorati-link' href='http://technorati.com/tag/PHP' rel='tag' target='_self'>PHP</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_self'>Programming</a></p>

<!-- end wp-tags-to-technorati -->
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>December 4, 2008 -- <a href="http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/" title="Search Engine Optimization  SEO in PHP (Book)">Search Engine Optimization  SEO in PHP (Book)</a></li><li>July 8, 2009 -- <a href="http://itechlog.com/itechlog-news/2009/07/08/android-to-iphone-apps-with-xml/" title="Android to iPhone Apps with XML">Android to iPhone Apps with XML</a></li><li>June 20, 2009 -- <a href="http://itechlog.com/itechlog-news/2009/06/20/opensuse-factory/" title="OpenSuse Factory">OpenSuse Factory</a></li><li>April 14, 2009 -- <a href="http://itechlog.com/web-programming/2009/04/14/pdf-to-email-with-registration/" title="PDF to Email with registration">PDF to Email with registration</a></li><li>February 18, 2009 -- <a href="http://itechlog.com/open-source/2009/02/18/sugarcrm-installation-error-sessionsave_path-not-set/" title="SugarCRM Installation error: session.save_path not set">SugarCRM Installation error: session.save_path not set</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDF to Email with registration</title>
		<link>http://itechlog.com/web-programming/2009/04/14/pdf-to-email-with-registration/</link>
		<comments>http://itechlog.com/web-programming/2009/04/14/pdf-to-email-with-registration/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 15:20:00 +0000</pubDate>
		<dc:creator>Alex Costa</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[email pdf]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPMailer]]></category>

		<guid isPermaLink="false">http://itechlog.com/?p=697</guid>
		<description><![CDATA[Serve PDF files on your website by requesting the user to register their email address. The PDF file is sent to the given email address and the user details registered on a database. This is a very simple script and relies on four main features. Apache mod_rewrite (via the .htaccess file) PHPMailer MySQL database the [...]]]></description>
			<content:encoded><![CDATA[<p>Serve PDF files on your website by requesting the user to register their email address. The PDF file is sent to the given email address and the user details registered on a database. This is a very simple script and relies on four main features.</p>
<p><strong></strong></p>
<p><strong>Apache mod_rewrite (via the .htaccess file)</strong></p>
<p><strong>PHPMailer</strong></p>
<p><strong>MySQL database</strong></p>
<p><strong>the simple-register.php script itself</strong></p>
<p><span id="more-697"></span></p>
<p>See a <a href="http://itechlog.com/pdf/test.pdf" target="_blank">demo here</a></p>
<p>Let&#8217;s start, first you need to create the folder on your site where you are going to place your PDF files, in my case I called it /pdf/ so the address to your files should be something like this, http://yoursite.com/pdf/yourfile.pdf</p>
<h3>1. Apache mod_rewrite (via the .htaccess file)</h3>
<p>create a text file and name it .htaccess and add the follwing text</p>
<pre class="”php”">RewriteEngine On
RewriteBase /
RewriteRule ^(.*).pdf$ /pdf/simple-register.php?file=$1 [R=301,NE,L]</pre>
<p>Mod_rewrite will redirect any trffic to your .pdf file to the registration form &#8220;/pdf/simple-register.php&#8221;, if you save the php file with a different name you will need to adjust this file with the correct filename.</p>
<h3>2. PHPMailer</h3>
<p>is an openSource mailer script which you can <a href="http://phpmailer.codeworxtech.com/" target="_blank">download from their official site</a>. After download extract the class.phpmailer.php file to your /pdf/ folder</p>
<h3>3. MySQL database</h3>
<p>Create a database with a table with the following details</p>
<pre class="”php”">`ID` int(10) unsigned zerofill NOT NULL auto_increment,
  `name` text NOT NULL,
  `email` text NOT NULL,
  `file` text NOT NULL,
  `ip` text NOT NULL,
  PRIMARY KEY  (`ID`)</pre>
<p>if you want you can save the following code as a .sql file and upload to your MySQL using PHPmyAdmin.</p>
<pre class="”php”">CREATE DATABASE `pdflog`;
USE `pdflog`;

-- --------------------------------------------------------

--
-- Table structure for table `download_log`
--

CREATE TABLE IF NOT EXISTS `download_log` (
  `ID` int(10) unsigned zerofill NOT NULL auto_increment,
  `name` text NOT NULL,
  `email` text NOT NULL,
  `file` text NOT NULL,
  `ip` text NOT NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;</pre>
<h3>4. Create the simple-register.php script</h3>
<p>just copy the following code to a text editor and save the file as &#8220;simple-register.php&#8221; or any other name you may want to, but remember to also change the redirection on your .htaccess file.</p>
<p>Before you can upload your script you will need to edit some details on your file, just look at the section &#8220;############ variables for the email function ######&#8221; and add the required information. You will also need to change the database connection information, just look for the line matching the details below and change accordingly.</p>
<pre class="”php”">$dbHost = "localhost"; 	# set host - most likely you don't need to change this
$dbUser = "user";		# set database user
$dbPass = "password";		# set password
$dbName = "databbse";		# set database name</pre>
<p><strong>The script code</strong></p>
<pre class="”php”" style="overflow: auto; height: 400px; width: 100%;"> &lt;?php

echo "&lt;center&gt;&lt;div style=\"width:500px;text-align:left\"&gt;";
$email = $_POST['email'] ;
$name = $_POST['name'] ;
$pdf_file = $_REQUEST['file'] ;

$file = str_replace(".pdf","",$pdf_file); # a workaround for frinedly URL stuff

$allowed_file = "pdf"; # set single filetype

$file = "$pdf_file.$allowed_file";

$filename = str_replace("/pdf/","",$file); # removes the directory /pdf/ from the string

$ip=@$REMOTE_ADDR; // get IP address
if(!$ip) {$ip=$_SERVER['REMOTE_ADDR'];}

############ variables for the email function ######

$webmaster = "webmaster@yourdomain.com"; 	#webmaster or site email address
$site_name = "your site name";			#website name

$subject = "Your requested File: $filename"; #email subject line
$body_html = "&lt;b&gt;Dear $name&lt;/b&gt;&lt;br&gt;&lt;bR&gt;Please find attached the file requested.&lt;/b&gt;"; # HTML version of the message sent to user
$body_txt = "Dear $name\n\nPlease find attached the file requested."; # TEXT only version of the message sent to user
$sent_msg = "&lt;center&gt;&lt;h2&gt;Thank you&lt;/h2&gt; The file has been sent to $name - $email&lt;/center&gt;"; # message displayed on the page after file has been sent

$errot_subject = "Blocked action attempt [$email]"; # error email subject line
$error_body_html    = "&lt;b&gt;This person: $name - $email&lt;/b&gt;&lt;br&gt;&lt;br&gt;has attempted to downlod the file: $filename"; # HTML message to webmaster in case of attempt to access not permited file
$error_body_txt = "This person: $name - $email\n\nhas attempted to downlod the file: $filename";# TEXT message to webmaster in case of attempt to access not permited file
$error_msg = "&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;h2&gt;&lt;center&gt;&lt;font color=#ff0000&gt;Access to this file is not permited.&lt;/center&gt;&lt;/h2&gt;&lt;h4&gt;&lt;/font&gt;&lt;br&gt;Your details have been logged.&lt;br&gt;&lt;br&gt;IP Address: $ip &lt;br&gt; Email: $email &lt;br&gt; Name: $name &lt;br&gt; &lt;/h4&gt;"; # error message showed when user attempt to download a not permited filetype 

############ end vadiables #########################

if(!$email) {  #if email field is blank display the registration form

echo "&lt;center&gt;&lt;br&gt;&lt;br&gt;&lt;h2&gt;&lt;b&gt;Please enter your details to proceed!&lt;/b&gt;&lt;/h2&gt;&lt;br&gt;&lt;br&gt;&lt;form method=post&gt;&lt;input type=hidden value=\"$filename\" name=name&gt; Name: &lt;input type=text name=name&gt;&lt;br&gt;Email: &lt;input type=text name=email&gt;&lt;br&gt; &lt;input type=submit value=send&gt;&lt;br&gt;&lt;br&gt;&lt;div style=\"text-align:left\"&gt;"; 

echo "&lt;/div&gt;&lt;/form&gt;&lt;/center&gt;";

}

else { #otherwise send the file 

$data[] = explode(".", $file);

while (list ($key,$val) = @each ($data)) {

$file_type = $val[1];

}
 # can only email PDF files, for security
if($file_type == $allowed_file) {
$blocked = 0; # information for the database 0 = no attempt to access unauthorized file

sendInfo($webmaster, $site_name, $name, $email, $subject, $body_html, $body_txt, $filename, $sent_msg);

}

else {
$blocked = 1; # information for the database 1 = attempt to access unauthorized file

sendInfo($webmaster, $site_name, $webmaster, $site_name, $error_subject, $error_body_html, $error_body_txt, $filename, $error_msg);
}

	}# end else

###### write details to to database
regtodb($name, $email, $filename, $ip, $blocked); 

echo "&lt;div&gt;&lt;/center&gt;";

?&gt;

&lt;?php

############## functions #############

# write to database

function regtodb($name, $email, $dfiles, $ip, $blocked) {

$dbHost = "localhost"; 	# set host - most likely you don't need to change this
$dbUser = "user";		# set database user
$dbPass = "password";		# set password
$dbName = "databbse";		# set database name

mysql_connect ($dbHost, $dbUser, $dbPass) or die ('MySQL connect failed. ' . mysql_error());
mysql_select_db($dbName) or die('Cannot select database. ' . mysql_error());
$query="INSERT INTO download_log VALUES ('','$name','$email','$dfiles','$ip', '$blocked')";
$result=mysql_query($query);

mysql_close();

}

# send email with phpMailer

function sendInfo($webmaster, $site_name, $name, $email, $subject, $body_html, $body_txt, $filename, $sent_msg) {

require_once("class.phpmailer.php");

$mail = new PHPMailer();

$mail-&gt;From = $webmaster;
$mail-&gt;FromName = $site_name;
$mail-&gt;AddAddress($email, $name);
$mail-&gt;AddAttachment($filename, $filename);

$mail-&gt;IsHTML(true);                                  // set email format to HTML

$mail-&gt;Subject = $subject;
$mail-&gt;Body    = $body_html;
$mail-&gt;AltBody = $body_txt;

if(!$mail-&gt;Send())
{
   echo "Message could not be sent. &lt;p&gt;";
   echo "Mailer Error: " . $mail-&gt;ErrorInfo;
   exit;
}

echo $sent_msg;

	}

?&gt;</pre>
<p>Now upload your files to your newly create /pdf folder together with your pdfs. Remember that your links must be to the pdf file and not the script, the mod_rewrite will take care of the redirection for you.</p>
<p>You may also want to add a <a href="http://recaptcha.net/plugins/php" target="_blank">captcha</a> type feature to avoid spam.</p>
<ul class="socialwrap size32 row">
<li class="iconOnly"><a rel="nofollow" target="_blank" class="delicious" href="http://delicious.com/post?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F&amp;title=PDF+to+Email+with+registration" title="Bookmark this post : PDF to Email with registration on Delicious"><span class="head">Bookmark on Delicious</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="digg" href="http://digg.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F&amp;title=PDF+to+Email+with+registration&amp;bodytext=Serve+PDF+files+on+your+website+by+requesting+the+user+to+register+their+email+address.+The+PDF+file+is+sent+to+the+given+email+address+and+the+user+details+registered+on+a+database.+This+is+a+very+simple+script+and+relies+on+four+main+features.%0D%0A%0D%0A%0D%0A%0D%0AApache+mod_rewrite+%28via+the+.htaccess+file%29%0D%0A%0D%0APHPMailer%0D%0A%0D%0AMySQL+d" title="Digg this post : PDF to Email with registration"><span class="head">Digg this post</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="facebook" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F&amp;t=PDF+to+Email+with+registration" title="Recommend this post : PDF to Email with registration on Facebook"><span class="head">Recommend on Facebook</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="google_buzz" href="http://www.google.com/reader/link?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F&amp;title=PDF+to+Email+with+registration" title="Buzz up this post : PDF to Email with registration "><span class="head">Buzz it up</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="yahoo_buzz" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F" title="Buzz up this post : PDF to Email with registration "><span class="head">Buzz it up</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="orkut" href="http://promote.orkut.com/preview?nt=orkut.com&amp;du=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F&amp;tt=PDF+to+Email+with+registration" title="Share this post : PDF to Email with registration on Orkut"><span class="head">Share on Orkut</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="reddit" href="http://www.reddit.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F&amp;title=PDF+to+Email+with+registration" title="Share this post : PDF to Email with registration on Reddit"><span class="head">share via Reddit</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="stumble" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F&amp;title=PDF+to+Email+with+registration" title="Share this post : PDF to Email with registration with Stumblers"><span class="head">Share with Stumblers</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="twitter" href="http://twitter.com/home/?status=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2009%2F04%2F14%2Fpdf-to-email-with-registration%2F" title="Tweet this post : PDF to Email with registration on Twitter"><span class="head">Tweet about it</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="rss" href="http://itechlog.com/web-programming/2009/04/14/pdf-to-email-with-registration/feed" title="Follow this post : PDF to Email with registration comments"><span class="head">Subscribe to the comments on this post</span></a></li>
<li class="iconOnly"><a rel="_blank" class="email" href="mailto:?subject=ITechLog : PDF to Email with registration&#038;body=here is a link to a site I really like.   http://itechlog.com/web-programming/2009/04/14/pdf-to-email-with-registration/" title="Tell a friend about this post : PDF to Email with registration "><span class="head">Tell a friend</span></a></li>
</ul>
<div class="clean"></div>

<!-- start wp-tags-to-technorati 1.01 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/email+pdf' rel='tag' target='_self'>email pdf</a>, <a class='technorati-link' href='http://technorati.com/tag/PDF' rel='tag' target='_self'>PDF</a>, <a class='technorati-link' href='http://technorati.com/tag/PHP' rel='tag' target='_self'>PHP</a>, <a class='technorati-link' href='http://technorati.com/tag/PHPMailer' rel='tag' target='_self'>PHPMailer</a></p>

<!-- end wp-tags-to-technorati -->
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>May 13, 2009 -- <a href="http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/" title="Automatically display form data with PHP">Automatically display form data with PHP</a></li><li>February 18, 2009 -- <a href="http://itechlog.com/open-source/2009/02/18/sugarcrm-installation-error-sessionsave_path-not-set/" title="SugarCRM Installation error: session.save_path not set">SugarCRM Installation error: session.save_path not set</a></li><li>December 4, 2008 -- <a href="http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/" title="Search Engine Optimization  SEO in PHP (Book)">Search Engine Optimization  SEO in PHP (Book)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://itechlog.com/web-programming/2009/04/14/pdf-to-email-with-registration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SugarCRM Installation error: session.save_path not set</title>
		<link>http://itechlog.com/open-source/2009/02/18/sugarcrm-installation-error-sessionsave_path-not-set/</link>
		<comments>http://itechlog.com/open-source/2009/02/18/sugarcrm-installation-error-sessionsave_path-not-set/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 19:47:06 +0000</pubDate>
		<dc:creator>Alex Costa</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[session.save_path]]></category>
		<category><![CDATA[SugarCRM Error]]></category>

		<guid isPermaLink="false">http://itechlog.com/open-source/2009/02/18/sugarcrm-installation-error-sessionsave_path-not-set/</guid>
		<description><![CDATA[SugarCRM Community Edition 5.2.0a has shown me the following error during installation. &#8220;The session.save_path setting in your php configuration file (php.ini) is not set or is set to a folder which did not exist. You might need to set the save_path setting in php.ini or verify that the folder sets in save_path exist.&#8221; Before you [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.sugarcrm.com/crm/download/sugar-suite.html">SugarCRM Community Edition 5.2.0a</a> has shown me the following<b> error during installation. <br /></b><b><i><br />&#8220;The session.save_path setting in your php configuration file (php.ini)<br />
is not set or is set to a folder which did not exist. You might need to<br />
set the save_path setting in php.ini or verify that the folder sets in<br />
save_path exist.&#8221;</i></b> </p>
<p>Before you attempt to follow my instructions here, please check that the <b>session.save_path</b> in your <b>php.ini</b> is properly set and that your webserver is behaving normally.</p>
<p>This error is apparently a bug in the installation process of SugarCRM so to get past it you need to edit a PHP file. 
<ol>
<li>Open the file SystemCheck.php (it is located in the install folder)</li>
<li>uncomment lines 184 to 210&nbsp; (just place /* on line 183 &nbsp; and&nbsp; */ on line 211)</li>
<li>save file and restart installation</li>
</ol>
<p><img style="max-width: 800px;" src="http://itechlog.com/wp-content/uploads/2009/02/sugar-error.png" /></p>
<ul class="socialwrap size32 row">
<li class="iconOnly"><a rel="nofollow" target="_blank" class="delicious" href="http://delicious.com/post?url=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F&amp;title=SugarCRM+Installation+error%3A+session.save_path+not+set" title="Bookmark this post : SugarCRM Installation error: session.save_path not set on Delicious"><span class="head">Bookmark on Delicious</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="digg" href="http://digg.com/submit?url=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F&amp;title=SugarCRM+Installation+error%3A+session.save_path+not+set&amp;bodytext=SugarCRM+Community+Edition+5.2.0a+has+shown+me+the+following+error+during+installation.+%22The+session.save_path+setting+in+your+php+configuration+file+%28php.ini%29%0Ais+not+set+or+is+set+to+a+folder+which+did+not+exist.+You+might+need+to%0Aset+the+save_path+setting+in+php.ini+or+verify+that+the+folder+sets+in%0Asave_path+exist.%22" title="Digg this post : SugarCRM Installation error: session.save_path not set"><span class="head">Digg this post</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="facebook" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F&amp;t=SugarCRM+Installation+error%3A+session.save_path+not+set" title="Recommend this post : SugarCRM Installation error: session.save_path not set on Facebook"><span class="head">Recommend on Facebook</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="google_buzz" href="http://www.google.com/reader/link?url=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F&amp;title=SugarCRM+Installation+error%3A+session.save_path+not+set" title="Buzz up this post : SugarCRM Installation error: session.save_path not set "><span class="head">Buzz it up</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="yahoo_buzz" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F" title="Buzz up this post : SugarCRM Installation error: session.save_path not set "><span class="head">Buzz it up</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="orkut" href="http://promote.orkut.com/preview?nt=orkut.com&amp;du=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F&amp;tt=SugarCRM+Installation+error%3A+session.save_path+not+set" title="Share this post : SugarCRM Installation error: session.save_path not set on Orkut"><span class="head">Share on Orkut</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="reddit" href="http://www.reddit.com/submit?url=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F&amp;title=SugarCRM+Installation+error%3A+session.save_path+not+set" title="Share this post : SugarCRM Installation error: session.save_path not set on Reddit"><span class="head">share via Reddit</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="stumble" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F&amp;title=SugarCRM+Installation+error%3A+session.save_path+not+set" title="Share this post : SugarCRM Installation error: session.save_path not set with Stumblers"><span class="head">Share with Stumblers</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="twitter" href="http://twitter.com/home/?status=http%3A%2F%2Fitechlog.com%2Fopen-source%2F2009%2F02%2F18%2Fsugarcrm-installation-error-sessionsave_path-not-set%2F" title="Tweet this post : SugarCRM Installation error: session.save_path not set on Twitter"><span class="head">Tweet about it</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="rss" href="http://itechlog.com/open-source/2009/02/18/sugarcrm-installation-error-sessionsave_path-not-set/feed" title="Follow this post : SugarCRM Installation error: session.save_path not set comments"><span class="head">Subscribe to the comments on this post</span></a></li>
<li class="iconOnly"><a rel="_blank" class="email" href="mailto:?subject=ITechLog : SugarCRM Installation error: session.save_path not set&#038;body=here is a link to a site I really like.   http://itechlog.com/open-source/2009/02/18/sugarcrm-installation-error-sessionsave_path-not-set/" title="Tell a friend about this post : SugarCRM Installation error: session.save_path not set "><span class="head">Tell a friend</span></a></li>
</ul>
<div class="clean"></div>

<!-- start wp-tags-to-technorati 1.01 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/PHP' rel='tag' target='_self'>PHP</a>, <a class='technorati-link' href='http://technorati.com/tag/session.save_path' rel='tag' target='_self'>session.save_path</a>, <a class='technorati-link' href='http://technorati.com/tag/SugarCRM+Error' rel='tag' target='_self'>SugarCRM Error</a></p>

<!-- end wp-tags-to-technorati -->
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>May 13, 2009 -- <a href="http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/" title="Automatically display form data with PHP">Automatically display form data with PHP</a></li><li>April 14, 2009 -- <a href="http://itechlog.com/web-programming/2009/04/14/pdf-to-email-with-registration/" title="PDF to Email with registration">PDF to Email with registration</a></li><li>December 4, 2008 -- <a href="http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/" title="Search Engine Optimization  SEO in PHP (Book)">Search Engine Optimization  SEO in PHP (Book)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://itechlog.com/open-source/2009/02/18/sugarcrm-installation-error-sessionsave_path-not-set/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Search Engine Optimization  SEO in PHP (Book)</title>
		<link>http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/</link>
		<comments>http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 23:55:02 +0000</pubDate>
		<dc:creator>Alex Costa</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[MOD_REWRITE]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://itechlog.com/?p=101</guid>
		<description><![CDATA[The term SEO (Search Engine Optimization) has become a new phenomenon with marketeers.  As a programmer/developer it&#8217;s very hard to find a good book on such a broad subject but recently I found this great book. The authors go about explaining and guiding you through exercises that are relevant for both programmers and marketeers.  It [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.co.uk/gp/product/0470100923?ie=UTF8&amp;tag=costafamily-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0470100923" target="_blank"><img src="https://images-na.ssl-images-amazon.com/images/I/5184%2B7hkqxL._SL160_.jpg" border="0" alt="" align="right" /></a><br />
The term SEO (Search Engine Optimization) has become a new phenomenon with  <a title="or MARKETER - One that sells goods or services in or to a market, especially one that markets a specified commodity" href="http://www.thefreedictionary.com/marketeer" target="_blank">marketeers</a>.  As a programmer/developer it&#8217;s very hard to find a good book on such a broad subject but recently I found this great book. The authors go about explaining and guiding you through exercises that are relevant for both programmers and marketeers.  It contains detailed chapters on Website Content, Links, Webmaster tools and <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html" target="_blank">MOD_REWRITE</a>. The code snipets found in this book can be used as a good reference guide to any SEO project.   This <a title="SEO with PHP" href="http://www.amazon.co.uk/gp/product/0470100923?ie=UTF8&amp;tag=costafamily-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0470100923" target="_blank">book is for PHP Programmers</a> but they have also published a <a title="SEO with .net" href="http://www.amazon.co.uk/gp/product/0470131470?ie=UTF8&amp;tag=costafamily-21&amp;linkCode=as2&amp;camp=1634&amp;creative=6738&amp;creativeASIN=0470100923" target="_blank">.NET version.</a></p>
<p>If  you develop with <a title="WordPress.org" href="http://wordpress.org" target="_blank">WordPress.org</a> this releted post can also be very helpfull:  <a title="SEO and WordPress" href="http://itechlog.com/wordpress/2008/12/13/seo-and-wordpress/" target="_blank">SEO and WordPress</a></p>
<ul class="socialwrap size32 row">
<li class="iconOnly"><a rel="nofollow" target="_blank" class="delicious" href="http://delicious.com/post?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F&amp;title=Search+Engine+Optimization++SEO+in+PHP+%28Book%29" title="Bookmark this post : Search Engine Optimization  SEO in PHP (Book) on Delicious"><span class="head">Bookmark on Delicious</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="digg" href="http://digg.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F&amp;title=Search+Engine+Optimization++SEO+in+PHP+%28Book%29&amp;bodytext=%0D%0AThe+term+SEO+%28Search+Engine+Optimization%29+has+become+a+new+phenomenon+with++marketeers.%C2%A0+As+a+programmer%2Fdeveloper+it%27s+very+hard+to+find+a+good+book+on+such+a+broad+subject+but+recently+I+found+this+great+book.+The+authors+go+about+explaining+and+guiding+you+through+exercises+that+are+relevant+for+both+programmers+" title="Digg this post : Search Engine Optimization  SEO in PHP (Book)"><span class="head">Digg this post</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="facebook" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F&amp;t=Search+Engine+Optimization++SEO+in+PHP+%28Book%29" title="Recommend this post : Search Engine Optimization  SEO in PHP (Book) on Facebook"><span class="head">Recommend on Facebook</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="google_buzz" href="http://www.google.com/reader/link?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F&amp;title=Search+Engine+Optimization++SEO+in+PHP+%28Book%29" title="Buzz up this post : Search Engine Optimization  SEO in PHP (Book) "><span class="head">Buzz it up</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="yahoo_buzz" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F" title="Buzz up this post : Search Engine Optimization  SEO in PHP (Book) "><span class="head">Buzz it up</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="orkut" href="http://promote.orkut.com/preview?nt=orkut.com&amp;du=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F&amp;tt=Search+Engine+Optimization++SEO+in+PHP+%28Book%29" title="Share this post : Search Engine Optimization  SEO in PHP (Book) on Orkut"><span class="head">Share on Orkut</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="reddit" href="http://www.reddit.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F&amp;title=Search+Engine+Optimization++SEO+in+PHP+%28Book%29" title="Share this post : Search Engine Optimization  SEO in PHP (Book) on Reddit"><span class="head">share via Reddit</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="stumble" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F&amp;title=Search+Engine+Optimization++SEO+in+PHP+%28Book%29" title="Share this post : Search Engine Optimization  SEO in PHP (Book) with Stumblers"><span class="head">Share with Stumblers</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="twitter" href="http://twitter.com/home/?status=http%3A%2F%2Fitechlog.com%2Fweb-programming%2F2008%2F12%2F04%2Fsearch-engine-optimization-seo-in-php-book%2F" title="Tweet this post : Search Engine Optimization  SEO in PHP (Book) on Twitter"><span class="head">Tweet about it</span></a></li>
<li class="iconOnly"><a rel="nofollow" target="_blank" class="rss" href="http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/feed" title="Follow this post : Search Engine Optimization  SEO in PHP (Book) comments"><span class="head">Subscribe to the comments on this post</span></a></li>
<li class="iconOnly"><a rel="_blank" class="email" href="mailto:?subject=ITechLog : Search Engine Optimization  SEO in PHP (Book)&#038;body=here is a link to a site I really like.   http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/" title="Tell a friend about this post : Search Engine Optimization  SEO in PHP (Book) "><span class="head">Tell a friend</span></a></li>
</ul>
<div class="clean"></div>

<!-- start wp-tags-to-technorati 1.01 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Books' rel='tag' target='_self'>Books</a>, <a class='technorati-link' href='http://technorati.com/tag/MOD_REWRITE' rel='tag' target='_self'>MOD_REWRITE</a>, <a class='technorati-link' href='http://technorati.com/tag/PHP' rel='tag' target='_self'>PHP</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_self'>Programming</a>, <a class='technorati-link' href='http://technorati.com/tag/Search' rel='tag' target='_self'>Search</a>, <a class='technorati-link' href='http://technorati.com/tag/SEO' rel='tag' target='_self'>SEO</a></p>

<!-- end wp-tags-to-technorati -->
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>June 5, 2009 -- <a href="http://itechlog.com/itechlog-news/2009/06/05/keyword-search-and-website-ranking-tools/" title="Keyword search and website ranking tools">Keyword search and website ranking tools</a></li><li>May 13, 2009 -- <a href="http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/" title="Automatically display form data with PHP">Automatically display form data with PHP</a></li><li>March 27, 2009 -- <a href="http://itechlog.com/web-programming/2009/03/27/htaccess-301-redirect/" title=".htaccess 301 Redirect">.htaccess 301 Redirect</a></li><li>December 13, 2008 -- <a href="http://itechlog.com/wordpress/2008/12/13/seo-and-wordpress/" title="SEO and Wordpress">SEO and Wordpress</a></li><li>March 26, 2010 -- <a href="http://itechlog.com/itechlog-news/2010/03/26/books-for-sale-linux-shell-qmail-handbook-and-ssltls/" title="Books for sale &#8211; Linux Shell, Qmail Handbook and SSL/TLS">Books for sale &#8211; Linux Shell, Qmail Handbook and SSL/TLS</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
