Online Blogging, Online Sharing

October 22, 2008

How to install PEAR on Appserv easly

Filed under: All About PHP

Because I need the library to create excel files with PHP, then how can one use the library located in the Pear (PHP Extension and Application Repository).

So coincidence that server I use is made AppServ apple. Pear on the server is not installed by default, so I must installing PEARfirst. Initially my confusion on how to install Pear, and the more I find reference from google and I have do it and was successful … but my experience in instruct is confusing, ever the time I was not sure if Pear really is installed on my server. Finally I decided to re-install Pear on the server. With deleting all folders that have been there during the installation process is complete. After the uninstall process Pear finished, I started to reinstall Pear by the filmmakers.

How can you previously found in googlethe instruction of the English language.

If you do not want to try the first method above, simply by following the methods below, this is more simple and effective.

  1. Download the Xampp server in apachefriends.org
  2. Then install the drive in which there is no AppServ it, for instance, you Appserv installed on Drive in the C drive so you must installing Xampp on D
  3. Before the installation is completel, please leave checkbox all to make apache as sytem services, leave it all
  4. after installation is complete, please go to the folder D: / xampp / php / Pear and copy all the files and folders within folders that are Pear
  5. after that paste in folder in C: / Appserv/php5/PEAR /
  6. After editing php.ini in the property appserv at the end of the string add the following include_path = “.; C: AppServ php5 Pear”
  7. Then restart your apache appserv
  8. Uninstall your Xampp
  9. To check whether Pear has been installed correctly, please copy the script below into a file exce.php then place the folder in your web browser and go through, when there is an error tidka the Pear has been successfully installed :-)

HTTP headers
$workbook->send(‘test.xls’);
// Creating a worksheet
$worksheet =& $workbook->addWorksheet(‘My first worksheet’);
// The actual data
$worksheet->write(0, 0, ‘Name’);
$worksheet->write(0, 1, ‘Age’);
$worksheet->write(1, 0, ‘John Smith’);
$worksheet->write(1, 1, 30);
$worksheet->write(2, 0, ‘Johann Schmidt’);
$worksheet->write(2, 1, 31);
$worksheet->write(3, 0, ‘Juan Herrera’);
$worksheet->write(3, 1, 32);
// Let’s send the file
$workbook->close();
?>

3 Comments »

The URI to TrackBack this entry is: http://didingo.blogsome.com/2008/10/22/2/trackback/

  1. wow.. this great, I think this way is simple, thank’s for author ;-)

    Comment by 44_Jocke — October 23, 2008 @ 1:48 am

  2. if you use XAMPP, i think PEAR supported by XAMPP out of the box

    Comment by adit — October 23, 2008 @ 12:50 pm

  3. hm.. yes, you’ll right “kang adit”, but more people needs to install PEAR on appserv, but the basic of installing PEAR on appserv is too hard, so I use this easy way to get more easyly installing PEAR on Appserv :-)

    Comment by Administrator — October 23, 2008 @ 2:23 pm

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.






















Get free blog up and running in minutes with Blogsome
Theme designed by Riosoft