从 andot 的网站上找到一个不错的WP插件 coolweather,就是我页面右边那个Weather的东西,利用PHPRpc实现Ajax从 accuweather 的xml接口读取天气信息,经过解析和处理后显示到页面上,是个非常不错的插件。
在andot写的插件中如果使用到了PHPRpc Server,默认都是在代码里面指向使用他服务器上的PHPRpc Server,这给很多朋友提供了方便,不过也给andot的服务器形成较大压力,导致最近总是服务器无法访问,也就致使andot提供的PHPRpc Server没法连接,也就无法正常返回Weather数据,于是我决定改到使用我自己服务器上的PHPRpc Server,却遇到一点麻烦。
Coolweather_rpc中用到了xml解析类,这个类据andot说不是他自己写的,从国外下载过来直接使用的,简单的看了一下代码,发现代码并不复杂,但是感觉解析效率并不是很高,简单的xml数据会占用较大的系统开销,不过由于weather数据实在不大,加上访问压力并不大,就先凑合用着吧,等空了改成我原来在3721自己写的一个XML解析类。经过我实际使用,发现这个xml解析类还有个怪现象,那就是在兼容PHP4.x和5.x版本时有问题,最初的现象就是在我的本本上没有问题,上次到toplee服务器上就不能正常解析,让我花了很多时间去定位和排查代码对Windows和FreeBSD的兼容性问题,没想最后发现是因为在toplee服务器上的php.ini中我打开了这样一个选项
[coolcode linenum=”off”]
; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
zend.ze1_compatibility_mode = On
[/coolcode]
就是这个设置导致了问题,我给改成Off或者把xml_parser.php文件代码改成强制使用xml_parser_php4.php后就没有问题了。
虽然简单的解决了问题,但是我感觉这个问题应当成为一个普遍的问题提出来考虑,那就是当我们服务器环境要求同时兼容PHP4.x和5.x的时候,代码中应该注意一些什么呢?初步的感觉应该从5.x和4.x的差异入手,有时间专门研究一下,整理一份东西出来今后备用。
hello,
can you help me find an english website explaining how I can start using my own rpc server instead of relying on coolcode’s server?
I remember reading somewhere reading that was possible, but all I can find with google now is chinese or other asian language I don’t udnerstand.
would be great if you could help
thx
ovidiu
The simplest way is just copy coolcode’s PHPRpc severside’s scripts to your own server, and complish the installtion according to the documentions in the project.
Another website maybe can give you some help, @see the website for the details: http://www.sitepoint.com/article/own-web-service-php-xml-rpc
thx,
I discovered the english page on the original plugins page 🙂 which explained this quite a bit.
thx for the hints
Wow, this article is nice, my sister is analyzing these kinds of things, thus I am going to inform her.
Hmm is anyone else having problems with the images on this
blog loading? I’m trying to determine if its a problem on my end or if it’s the
blog. Any feed-back would be greatly appreciated.
Attractive section of content. I just stumbled upon your
web site and in accession capital to assert that
I get actually enjoyed account your blog posts.
Anyway I will be subscribing to your feeds and even I achievement you access consistently fast.
Inspiring story there. What happened after? Good luck!
Having read this I believed it was extremely informative.
I appreciate you finding the time and effort to put this informative article together.
I once again find myself spending a lot of time both reading and leaving comments.
But so what, it was still worthwhile!
Hello there! I know this is kinda off topic however I’d figured I’d ask.
Would you be interested in exchanging links or maybe guest writing a blog post or vice-versa?
My site addresses a lot of the same subjects as yours and I think we
could greatly benefit from each other. If you are interested feel free to
send me an email. I look forward to hearing from you!
Fantastic blog by the way!
It’s actually very complex in this full of activity life to listen news on Television, therefore I simply use world wide web for that reason, and take the newest information.
Hello to every body, it’s my first go to see of this website;
this blog consists of remarkable and truly good data for
readers.
I loved as much as you’ll receive carried out right here.
The sketch is tasteful, your authored material stylish.
nonetheless, you command get got an shakiness
over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the
same nearly very often inside case you shield this increase.
I blog frequently and I really appreciate your information. This article has really peaked my interest.
I’m going to take a note of your site and keep checking for new information about once per week.
I subscribed to your RSS feed too.
Do you mind if I quote a few of your posts as long as I provide credit and
sources back to your website? My website is in the very same area
of interest as yours and my visitors would definitely benefit
from a lot of the information you provide here.
Please let me know if this ok with you. Thanks a lot!
Tremendous issues here. I am very glad to peer your post.
Thanks so much and I’m taking a look forward to touch you.
Will you please drop me a e-mail?
When some one searches for his required thing, therefore he/she wishes
to be available that in detail, therefore that thing is maintained over here.
plenty of fish natalielise
Whoa! This blog looks just like my old one! It’s on a completely different subject
but it has pretty much the same layout and
design. Outstanding choice of colors!
Hey very interesting blog!
I’ve read some excellent stuff here. Certainly worth bookmarking for revisiting.
I wonder how so much effort you place to create one of these excellent informative
web site.
Thank you for the auspicious writeup. It actually was a enjoyment account it.
Glance complicated to more brought agreeable from you! By the way, how could we communicate?
My brother recommended I might like this web site. He was totally right.
This post truly made my day. You can not imagine just how much time
I had spent for this information! Thanks!
I know this if off topic but I’m looking into starting my own weblog and was wondering what all is required
to get set up? I’m assuming having a blog like yours would cost a
pretty penny? I’m not very internet smart so I’m not 100% certain. Any tips or advice would be greatly appreciated.
Cheers
With havin so much written content do you ever run into any
issues of plagorism or copyright violation? My blog has a lot of completely unique content I’ve
either written myself or outsourced but it looks like a lot of
it is popping it up all over the internet without my permission. Do you know any solutions to help prevent content from
being ripped off? I’d genuinely appreciate it.
This post is genuinely a good one it assists new net users, who are wishing for blogging.
Thank you a bunch for sharing this with all people you actually understand what you’re speaking
about! Bookmarked. Please also discuss with my site =).
We can have a hyperlink trade contract between us
Fastidious answers in return of this issue with firm arguments
and telling all concerning that.
Hey just wanted to give you a quick heads up. The words in your article seem to
be running off the screen in Ie. I’m not
sure if this is a format issue or something to do with internet browser compatibility but I figured I’d
post to let you know. The layout look great though!
Hope you get the issue fixed soon. Many thanks
Good post. I learn something new and challenging on sites I stumbleupon every day.
It will always be useful to read articles from other authors and use a little something from other web sites.
Hello my friend! I wish to say that this article is awesome, nice written and include approximately all significant infos.
I’d like to look more posts like this .
Valuable info. Fortunate me I discovered your site by chance,
and I’m stunned why this twist of fate didn’t came about earlier!
I bookmarked it.
Its like you read my mind! You seem to know so much about this, like you wrote the book
in it or something. I think that you can do with some pics
to drive the message home a little bit, but
instead of that, this is great blog. A great read. I will definitely be
back.
Everything is very open with a very clear explanation of the issues.
It was truly informative. Your website is useful. Thanks for sharing!
Nice post. I used to be checking continuously this weblog
and I am inspired! Extremely useful info particularly the closing
section 🙂 I care for such info a lot. I was seeking this particular
information for a long time. Thank you and best of luck.
I’m not sure exactly why but this weblog is loading incredibly slow for me.
Is anyone else having this problem or is it a problem on my end?
I’ll check back later and see if the problem still exists.
I am genuinely pleased to glance at this web site posts which
contains lots of valuable data, thanks for providing such information.
Hello There. I discovered your weblog the usage of msn. This is an extremely smartly written article.
I will be sure to bookmark it and come back to read
extra of your useful information. Thank you for the
post. I’ll definitely return.
If some one needs expert view about running a blog then i propose him/her to pay a quick visit this website, Keep up the fastidious
job.
Hi, yes this piece of writing is truly good and I have learned lot of things
from it about blogging. thanks.
generic viagra usa http://qenericviaqra.com/ – generic viagra review generic viagra canada generic viagra names when will viagra go generic
buying viagra online legally http://emtpartsstore.com/ – buying viagra online legally best place to buy generic viagra online viagra online usa order viagra online
Hi there would you mind letting me know which web host you’re using?
I’ve loaded your blog in 3 different internet browsers and I must say this blog loads a lot quicker then most.
Can you recommend a good hosting provider at a reasonable price?
Many thanks, I appreciate it!
Hiya! Quick question that’s totally off topic. Do you know how
to make your site mobile friendly? My website looks weird when viewing from my iphone.
I’m trying to find a template or plugin that might be able
to resolve this problem. If you have any suggestions, please share.
Cheers!
We stumbled over here by a different web address and thought I may as well check things out.
I like what I see so now i’m following you. Look forward to finding out
about your web page again.
Awesome article.
I’m truly enjoying the design and layout of your blog.
It’s a very easy on the eyes which makes it much more enjoyable for me to
come here and visit more often. Did you hire out a
developer to create your theme? Exceptional work!
I must thank you for the efforts you have put in penning this site.
I am hoping to view the same high-grade blog posts by you later on as well.
In fact, your creative writing abilities has encouraged me to get
my own blog now 😉