Saturday, January 17, 2009

cannot send email from php

Problem:
setting editor used to work well, but all of sudden cannot sending emails...though no changes made to the files at all.....

Reason:
after some painful google, and finally remember this is not the first time met this problem. when setup editor on dyi, already got the problem.

here it goes:
go to php.ini file find the line
SMTP = localhost

in this situation , it's not localhost, we dont' run any mail server on local machine, we use a external mail server in our company.

Solution:
here is how to fix it:
to find out what mail server we actually use, go open outlook, from top menu, choose Tools->Options->Mail Setup(tab)->Data Files->E-mail(tab) on 'E-mail Accounts' window, find the entry on the table 'Miscrosoft Exchange Server', choose that entry then click 'Change' button on the top, it bring up 'Change Email Account' window, in that window it tells you what mail server you currently use. copy the mail server's name, and paste it back to php.ini file at the line 'SMTP = localhost', restart appache, then it works again!

cannot access apache on pc2 from pc1

Problem:
cannot access appache server on pc2 from pc1 though they are on the same network.
the appache server settings are the same on both pcs, but pc2 can access pc1 not the reverse.

Reason:
suspect it's the pc2's firewall making trouble, go to pc1's control panel->system firewall->exception, found 'appache' was included, then go to pc2's system firewall->exception, 'appache' was not included becuase pc2 was newly reinstalled.

Solution:
so go ahead added 'appache httpd' to the exception, make it available to anyone on the network, then it works!

Saturday, January 10, 2009

isolation between web 2.0 techonologies

the problem i got is chart wont' work well in tab view when using gwt-ext. after some painful searching, found out gwt-ext actually use ext engine to deal with yui' chart library. yui already admit it's a bug but claim it's fixed in release 2.6.0. the yui library version used by gwt-ext is 2.4.1. that's the problem. tried to copy the 2.6.0 version of chart files from yui to gwt-ext wont' work. then notice gwt-ext only support ext 2.0.2 because of the license issue. went to ext js website and download the version 2.2 but found out it still use yui 2.4.1 version...there is no freeking way to fix that get rid of it in gwt-ext then......

have to admit web 2.0 has a cool concept, but just the techonologies to support web2.0 are all on their isolated island, wont' talk to each other friendly...maybe the best way is back to javascript+php.....

Tuesday, January 6, 2009

gwt-ext/php/mysql

there are three ways to get data from mysql in gwt-ext:

1. requestion JSON using HTTP
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=GettingStartedJSON

2. gwt-RPC, which you have create bouch of code, which looks so weird and ugly to me, to connect to MySQL server, create SQL query and return the data to gwt-ext to populat whatever widget you want;
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideHttpRequests

3. use php file, let php go connect to MySQL and return JSON data(or xml data).

obviously 3 is way more simpler and cleaner, but hard to get it work in gwt-ext. tried to put the php file in 'public/data' folder, and in java code, call the following:
new HttpProxy("data/getData.php");

it return php file itself instead of JSON data.... maybe should try the following:

new HttpProxy("data/getData.php", Connection.GET)

???