Thursday, September 25, 2008

XAMPP's Apache wont start! Troubleshooting guide...

Initial steps:

-Loading http://localhost or http://127.0.0.1 in browser results to error or page cant be found. This means XAMPP services is not started successfully

-Ctrl + Alt +Del or the Task Manager, then checking on Services or Processes, verified that indeed apache is not running, although mysql is

- Checked on portcheck (alternatively in command prompt c:\xampp-portcheck.exe), and verified that another service is already using port 80, being the standard port apache will be using

- Verified also the listening sockets and ports by running netap -ao (c:\netap -ao) which will basically output a summary of listening sockets and ports currently in use by machine

Next Steps:

-Since port 80 is in use, try assigning port 81 to apache. This is done by editing and saving the file C:\xampp\apache\conf\httpd.conf:

Find these lines and change 80 to 81:
#Listen 12.34.56.78:80
Listen 80

Also find:
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost:80

-Restart XAMPP services, try loading localhost in browser; and/or Restart PC then check again

-Also verify the ff. settings in xampp's control manager c:\xampp\xampp-control.exe:
1. Modules > Apache and MySQL is running, or
2. Click Service Button > Check Run XAMPP Control Panel as a Service > Check Apache and MySQL
3. In same Service Settings dialogue box, verify these as running in C:\xampp\service.exe apache mysql.
4. Try restart of PC

-By this time, XAMPP shall be running in full mode, if not also check XAMPP's SCM (also in xampp-control.exe or Window's Control Panel > Services) and verify from the list if Apache and MySQL is running. Try Restart from here.

- Also while in here, verify IIS is not running. This is commonly the conflicting service with Apache.

Hope this helps, for anyone googling the problem out there. This is more for my reference than anything else :D

Tuesday, August 26, 2008

Importing Dropdown list from HTML to Excel

As part of one task in a CMS development, may this blog serve as my personal notepad for future referencing :D

1. Needed to import the list of countries found in the country dropdown list in this online database.

2. Problem: How to import the list items (also viewable in View Source and can be tediously weeded out in any text editor) into tabular data,for example in MS Excel?

3. While on the targeted webpage with the needed content, save page as type txt, Encoded as Unicode (UTF-8).

4. Open MS Excel, File > Open > go to saved text unicoded file, then follow the wizard and series of steps in how to display the data in Excel, this time in tabular format.

-End-

Tuesday, May 27, 2008

Google Analytics in Drupal

Been cracking my head in installing the Google Analytics script in my drupal sites. Have this drupal version 7 site, unfortunately the Google Analytics module available as of this writing is for versions 5 and up only. A dilemma for dynamic sites... Tried posting the script in the following as advised in www.drupal.org forum threads: template pages (page.tpl.php), index and incluldes, etc.

However, I think the best method that work for a test site is perhaps creating a block and publishing the google analytics script in there. To best have accurate analysis reports, publish analytics block accordingly, e.g. excluding the /node/edit* pages or /admin* pages. This way only anonymous visits are logged and recorded. On the other hand, reverse the publishing to determine administrative behaviors. Neat! Worked like a charm!

P.S.

the generated reports didn't come until after 24 hours... or a disclaimer from google that due to technical problems it may not generate some reports at all, somethin' like that... the adage, patience is a virtue... indeed!

Tuesday, May 13, 2008

Install and configure Tomcat for Windows (How to and step by step)

Trying my hands full with Jahia (pronounce "J-A-Y-A"), an integrated Enterprise Content & Portal Management software in the open source, and a few documentation on my Tomcat installs... personally, for my own reference... hope this might become useful to anyone searching.... full disclaimer/s apply haha!

To install and configure Tomcat, you will have to take the following steps:

  1. Download JDK 1.5 from Sun(tm) site at http://java.sun.com/javase/downloads/index_jdk5.jsp

  2. Install JDK to C:\Program Files\Java\jdk1.5.0_08

  3. Download Tomcat 5 from http://tomcat.apache.org/download-55.cgi

  4. Install Tomcat on C:\Program Files\Apache Software Foundation\Tomcat 5.0

  5. Set the port number to 8080, which is the default port. Set the name as admin and password as desired. The password column can even be left blank.


  6. Set the environment variables as follows:
    • Right-click My Computer and select properties.

    • Click the Advanced tab button.

    • Click Environment Variables.

    • Select New to set the properties as follows:

      1. Classpath: In the variable name field write classpath, and in the variable value field write the location of servlet-api.jar file as C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar

      2. Path: In the variable name field write PATH, and in the variable value field write the location of JDK installation as C:\Program Files\Java\jdk1.5.0_08\bin;.;

      3. CATALINA_HOME: In the variable name field write CATALINA_HOME, and in the variable value field write the location of Tomcat installation as C:\Program Files\Apache Software Foundation\Tomcat 5.0.



      4. JAVA_HOME: In the variable name field write JAVA_HOME, and in the variable value field write the location of JDK installation excluding bin as C:\Program Files\Java\jdk1.5.0_08.



  7. Write a small Servlet program to test the installation as follows:

    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;

    public class TestServlet extends HttpServlet
    {

    public void doGet(HttpServletRequest request, HttpServletResponse response)throws IOException, ServletException
    {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("");
    out.println("");
    out.println("This is a Servlet test!");
    out.println("");
    out.println("");
    }
    }

  8. Compile the Servlet file and put the class file in webapps/servlets/WEB-INF/classes directory inside the Tomcat directory.

  9. Open a new textpad file and write the following code:

    TestServlet
    TestServlet



    TestServlet
    /test


  10. Save the above textpad file as web.xml in the webapps/servlets/WEB-INF directory.


  11. Go to C:\Program Files\Tomcat 5.0\bin directory and start tomcat by double clicking on the startup batch file.


  12. Open a new instance of Internet Explorer and type the following URL in the Address bar:
    http://localhost:8080/servlets/test

Note: Whenever any change is made to the servlet, it should be compiled again. In such a case, either restart the Tomcat server or redeploy the application by going to http://localhost:8080/manager/html.

Source:
the fastest way to IT certification

Friday, May 9, 2008

'Forbidden Access' error and 'tag in POST' error while publishing / editing article in Joomla

Forbidden Access error, and 'tag in POST' error? while posting in http://www.doh.gov.ph/bihc_doh

This has not occurred before: frontend editing saves are rejected with a message 'Forbidden Access (flooding)' - or 'Forbidden Access (tag in POST)'. This is with Joomla 1.0.12 and 1.0.13 versions.

This is either (a) a Joomla built-in security block being triggered, or (b) more likely a server setting perhaps. I'm seeing it especially on Apache 1.1.3x / Unix servers.

If you Save and edit with a few words of plain text, it seems to be OK; but a fair-sized page with plenty of mixed content gets blocked - probably because of the number of HTTP requests at one time?

Of course, it means that frontend editing is impossible, which makes any kind of community use out of the question. Thought this was a joomla issue or server setting, but obviously an extension issue.

Solution:

Turn off security features of SH404SEF, that is of course assuming you have had the extension installed (being the issue here) :D

Thursday, May 8, 2008

Need to install Apache, MySQL, and PHP (Linux, Mac OC, Solaris or Windows)?



I was reminded of a friend who asked me the other day about installing a CMS package, as well as installation of Apache to his server... Thus, this article... He was asking for feedback on manually installing each application needed: Apache web server app, mysql and php... Manually installing each package separately may be the best, effective way. However, personally, I have had no problem in installing the three in a bundled package like most LAMP packages offer... Besides, I tried the manual installs and found it to be a tedious process... Personally tested XAMPP, a very easy to install Apache Distribution for Linux, Solaris, Windows and Mac OS X. The package also includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.

Download XAMPP and other add-ons at these links (for Linux, Mac OC, Solaris or Windows):

Apache Friends.Org: XAMPP Official Developers' Site
Sourceforge.Net

Simply download, extract, then enjoy! And by the way, it's free!

Wednesday, April 30, 2008

Social Network Analysis using SoNIA (Social Network Image Animator)

These past 2 weeks had been fun and informative, having attended the training on Arcview's AccessMOD a participant, a GIS extension software / tool last week; and today as secretariat for SoNIA (Social Network Image Animator), a Java-based package for visualizing dynamic or longitudinal "network" data...

All these participated with other attendees from the Department of Health offices and other agencies... Ali, the pictures! :D

Downloadable at and more documentation on these on the ff:

- Developers' site: http://www.stanford.edu/group/sonia/
- Sourceforge.net

Try out SoNIA... cool software, something like Statistical SPSS or Public Health's EpiInfo, more or less... just more graphical in presentations, methinks! Btw, has XML compliant features, and can be exported in SWF format for your flash viewing needs in your websites :D...

Wednesday, April 23, 2008

Troubleshooting startup errors in Dreamweaver (updating dreamweaver): The following translators were not loaded due to errors

This is a follow up to a previous article: Dreamweaver version 8 wont start!

Having followed the procedures in updating dreamweaver (as mentioned in said article), Dreamweaver did startup successgully but this time errors kept popping:

The following translators were not loaded due to errors (any of the ff. may appear):
ASP.htm: has configuration information that is invalid.
ASP.NET.htm: has configuration information that is invalid.
ColdFusion.htm: has configuration information that is invalid.
PHP_MySQL.htm: has configuration information that is invalid.
JSP.htm: has configuration information that is invalid.
XSLT.htm: has configuration information that is invalid.

A solution to this may be applied:

Delete FileCache.dat files from the Dreamweaver user configuration folder.

Delete the WinFileCache-7A9586CB.dat, MacFileCache-BFE7CE2E.dat, or FileCache.dat file from the Dreamweaver user configuration folder. It is recommended to delete the FileCache.dat file if you are experiencing a JavaScript error related to "dwscripts" or if you are receiving a "translators were not loaded" error message. The string of characters after "FileCache-" may differ on your machine. The location of the FileCache.dat file depends your operating system and your version of Dreamweaver. Note that on Windows, the Application Data and AppData folders are hidden by default, so verify that your Windows Explorer folder options are set to View Hidden Folders.

Dreamweaver CS3 on Windows Vista:
C:\Users\[username]\AppData\Roaming\Adobe\Dreamweaver 9\Configuration

Dreamweaver CS3 on Windows XP:
C:\Documents and Settings\[username]\Application Data\Adobe\Dreamweaver 9\Configuration

Dreamweaver 8 on Windows XP:
C:\Documents and Settings\[username]\Application Data\Macromedia\Dreamweaver 8\Configuration

Dreamweaver 8 on Windows Vista:
C:\Users\[username]\AppData\Roaming\Macromedia\Dreamweaver 8\Configuration

Dreamweaver CS3 on Macintosh:
Mac HD/Users/[user]/Library/Application Support/Adobe/Dreamweaver 9/

Dreamweaver 8 on Macintosh:
Mac HD/Users/[user]/Library/Application Support/Macromedia/Dreamweaver 8/

Source: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19105


This worked for me. Next Dreamweaver startup was successful this time without any errors :D

Wednesday, April 9, 2008

Dreamweaver version 8 wont start!

Google search query: Dreamweaver version 8 wont start!

Am a hard user of dreamweaver, even with opensource cms... may it be for editing, enhancements, ftp, etc... so i have to add a tag here for dreamweaver troubleshooting issues, bugs and fixes, tips and techniques that may prove useful to others... :D If any have encountered similar problems of dreamweaver not starting up all of a sudden, this article helps. Scenario: upon starting dreamweaver you find only the splash sreen of DW shown but the entire application doesn't start or follows. First reaction is to restart the PC but same problem. Then you might think maybe its hard disk space or low memory, but still same dilemma... If all mentioned fails, try the ff. tips here...

Solutions found:

1] Update Dreamweaver with update patches (Dreamweaver 8.0.2 Updater) from Adobe Macromedia here: http://kb.adobe.com/selfservice/viewContent.do?externalId=a3f38dcf&sliceId=1

A list of updates for other versions are found here: - http://www.adobe.com/support/dreamweaver/downloads_updaters.html#dw8

"The Dreamweaver 8.0.2 Updater (released May 9, 2006) includes all of the fixes in the 8.0.1 update. If you haven?t installed the 8.0.1 update yet, then install the 8.0.2 update to get all of the fixes for both updates. All Dreamweaver users should apply this update, regardless of operating system. Download the updater and read the release notes for more information."

Steps:

1] download updater
2] install, follow series of steps in wizard
3] start or restart dreamweaver

Hope this helps people! Keep on coding...

Tuesday, February 12, 2008

Printer friendly pages in drupal: customizing formatting options

To edit the fonts (fontsize, font style, etc) and other text properties (or html attributes and properties) of printable friendly page of drupal sites 4.7,

Go to:
- site/modules/print/
- open print.tpl.php
- edit accordingly

I thought editing site/misc/print.css is enough... can't seem to have it done the way i want it to be though... obviously, text font and other formatting should be done in print.tpl.php not (only in) print.css...

simply put... treat this php page with htm tags, attributes, etc. for the desired formatting of your printerfriendly drupal page.

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

Friday, February 8, 2008

"Make sure you have a working image toolkit installed and enabled" in Drupal

Having installed image module for Drupal, I began having this error in admin pages:

"Make sure you have a working image toolkit installed and enabled"

it says "for more information see settings page"

Solution would be to enable the ImageMagick toolkit in the settings page (don't be surprised if this is not available in the drupal forum before):

Go to settings > image handling > enable imagemagick or gd2

afterwhich the image handling option will not be made available anymore (not viewable from the settings page)

See other suggestions here from the drupal forum
- http://drupal.org/node/60927

Tuesday, February 5, 2008

Forgot your password in Joomla, Drupal, or any other php run cms with mysql database (with management in phpmyadmin)?

Forgot your password in Joomla, Drupal, or any other php run cms with mysql database (with management in phpmyadmin)?

In the event you forget your administrator password or passwords in in Joomla, Drupal, mediawiki, coppermine, etc. (or any opensource php-driven cms with mysql database manageable in phpmyadmin for that matter), a workaround is fortunately available. For newbies, forgetting one's administrator user account's password the only solution will have to be re-installing the entire cms from scratch thus re-creating an administrator account in the process. A solution is as follows:

- Go to site/phpmyadmin (login, of course assuming you have the necessary rights to the database/s)
- Browse for the database, then the table (in the case of Joomla, Drupal, etc. this is commonly the table 'users') intended to be edited
- click edit user, then under the 'Function' column (dropdown list) choose MD5, edit the 'Value' or your password (you will initially see the encrypted version of your original password), then type in the desired, new password of your choice
- Lastly, don't ever forget your password again, silly! :D

Thanks to pete avila and michael for the tip!

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

Wednesday, January 16, 2008

Earning Money Through Blogging

If your blog's receiving good traffic, you might consider whether or not you'd like to be rewarded for your efforts। Many bloggers have discovered they can earn good money through their blogs. If this interests you, there are several programs available.

1. Pay Per Click Advertising
It's possible to earn a decent income through Google Adsense or other pay-per-click advertisers। While some bloggers report earning a meager income with the pay-per-clicks, it's indeed possible to earn up to six figures। If you have a popular blog, you can do well. Installing Adsense on your blog is simple, it's just a matter of pasting code on your website. Every time a visitor clicks on one of the links in the ad, you'll collect a percentage of the ad revenue. Because you can fine tune the ads to match your blog, they're not as unattractive as other forms of advertising.


2. Blogads
Invitation only sites such as Blogads sell ads for placement on high traffic blogs। The good news is that this isn't affiliate income. Bloggers receive a flat fee for every ad sold. The bad news is that Blogads doesn't accept just anyone. If you don't know anyone who can offer a recommendation on your behalf, try emailing a request to be placed on the waiting list. But don't hold your breath, some bloggers have been waiting years.

3. Affiliate Revenue
Many online retailers will pay a percentage of a sale if it results from an advertisement placed on your site. Amazon.com offers a popular program, or you can visit an affiliate super-site such as Commission Junction to find retailers catering to your particular niche। Bloggers report mixed results. While it is possible to earn a decent commission, it's not as easy to earn with these advertisers as with the pay per click programs. Still, some do well. The flashing, colorful ads are a turn off for many because they're so distracting. Fortunately you can choose codes for the ads that work best for your site.

4. E-Books
If you're an expert in your field you might consider writing e-books and selling them through your blog। This would be a good way of expanding on some of the information blogged about in the past. Check your stats to see which topics garnered the most interest and take it from there. If you have loyal readers and good traffic, you might have a best seller on your hands!

5. Café Press
If you have a recognizable logo, why not Café Press it? Café Press allows you to place your blog's logo or catch phrase on merchandise such as mugs, t-shirts and calendars। Sell them on your blog for a percentage of the earnings.

6. Tip Jar
Some bloggers place "tip jars" on their blog's sidebars. Tip jars are donation buttons leading to the recipient's paypal account. Some bloggers report earning hundreds of dollars through tip jars alone. While this isn't recommended for every blogger, those who put in hours to provide a useful service are certainly justified.

What is A Blog?

By now you must have heard of weblogs. These online journals and diaries, more commonly known as blogs, have become harder to define in recent years. Technically, a blog is a series of posts arranged in chronological order. Most agree, however, they're an important form of expression. Though many modern blogs are personal observances updated on a regular basis, the earliest blogs weren't rants or observances. They were lists of links maintained by a handful of tech savvy individuals। It wasn't until the late 1990's that blogging evolved into what we see today. So what is a blog?

Components:

Subject or Header: Your blog's title।

Content or Body:The text is typed or pasted into the body।

Comments: The comment feature allows others to take part in a discussion regarding the contents of your blog। When visitors add their own two cents regarding the subject matter, a lively discussion can ensue. Many bloggers and blog readers appreciate the sense of community blogs offer thanks to comments.

Time and Date Stamp: Because blogs are arranged in chronological order, it's important for visitors to note the time and date of each post।

Community:

Bloggers will often link to other blogs and websites as a way of illustrating a point or citing a source. This not only adds an air of credibility to the blog, but it also allows readers to visit blogs they might not have otherwise heard about. The blogger on the other end of the link is sure to appreciate the resulting boom in traffic. In fact a community made up of like-minded bloggers and commenters usually forms as a result of the links. These bloggers will cite each other's blogs in their own and even discuss and analyze each other's topics.

Linking in Web blogs

The first blogs weren't rants or bits of news, they were lists of links। While the blogs of today have evolved into something completely different, linking is still essential to a blog's success. Many new bloggers aren't sure how to go about linking. Should they ask for permission? Can they quote and link? What follows are a few basic rules of linking etiquette.

Always Provide Attribution:
If you quote another blogger, you'll want to not only mention that blogger's name and blog, but you'll also want to link to that blog somewhere within your post। It's very bad form to discuss topics found on other blogs without giving credit where credit is due. Always link back to the original source.

Requesting Permission:
If you're only quoting a sentence or paragraph and linking back to the original source, you generally don't need to ask permission. It's a nice idea to drop a line to the blogger letting him know about the quote, however. If you're repeating large blocks of text or a whole blog post or article, you simply must ask for permission. There are no exceptions to this rule.

How to Increase Traffic website

Ways to Increase Blog Traffic

What good is creating great content for your blog if no one is there to read it? For many of us, it’s not enough to post; we want hoards of people to read what we have to say and add their own comments। For those who wish to earn money through blogging, having lots of traffic is a must. So how does one get the traffic flowing? There are plenty of things you can do to increase traffic!

Top 10 Tips for Bringing in Blog Traffic
This article covers everything you need to know to promote your blog and bring in visitors। Increasing blog traffic no easy feat! It takes diligence and dedication. Fortunately, these tips make it easy.

Blog Traffic: Patience Pays Off
Many new bloggers make the same mistake; they give up on their blogs because after a few weeks or months the traffic still isn’t there। It takes time to build up a respectable amount of traffic, sometimes a year or two.

How to Comment to Bring in Traffic
One of the best ways to spread the word about your blog is by social networking। Visiting other blogs and forums will pique the curiosity of others and send them to your blogs.

Encouraging Reader Participation
Involving your visitors is a great way to keep them coming back। Hosting contests and interesting discussions is a way to open your blog to new readers. Blogging should be an interactive experience. Invite your visitors to participate and increase traffic.

How Technorati Tags Increase Traffic
Tags work much in the same matter of keywords। If you want the traffic to flow, you’ll need to use them!

Stat Trackers
Never underestimate the importance of this handy tool! Your stat tracker will help you analyze your traffic and provide you with the information you need to bring in more।

How Often Should You Update?
The answer is, often। The more content you post, the more people will show up to read. If you’re prone to sporadic posts, your traffic will reflect as much.

What is Digg?
Submitting individual posts to Digg is a sure way to increase blog traffic।

Should you Use Linkbait?
Linkbait is the act of posting content for the sole purpose of getting others to talk about you. Some associate it with spam, while others see nothing wrong with it. Learn the pros and cons of using linkbait.

This blog has been archived and is not maintained any longer. For similar useful posts, please visit www.jeromeesperanza.com

Search

Google