PHP已经出到了5.3.8稳定版本,于是乎准备将公司生产服务器上的PHP从5.2.17升级到5.3.8,在测试服务器上调试的时候却发现了一个诡异的问题:
把PHP环境装好后,原先能在5.2.17正常运行的代码报错了,提示PHP class x has no unserializer,而同一套代码在同服务器上使用5.3.8则没有任何问题.Google一下了发现没有什么有用的信息,看来我是遇到冷门问题了,于是开始逐步debug检查,发现报错的地方位于使用memcache取数据的部分,在取出缓存在memcache中的数据时提示我的类没有反序列化功能,而此行代码运行在5.3.8的时候却没有任何问题.
鉴于唯一的线索是这个反序列化的提示了,搜索了一下php官方相关序列化的信息,首先找到了序列化接口Serializable的介绍,在这里我注意到该接口有一个unserializ方法,这个是用于反序列化类时调用的借口. 同时,php的memcache扩展在把php数据对象存到memcache时是会将其序列化的,难道是我自己使用的对象没有实现Serializable接口的问题?追查了一下代码发现我存在memcache中的类是继承于Array_Object类,于是乎跑到官方Array_Object的介绍页面一看,果然如此.
Array_Object从5.3.0开始就实现了Serializable接口,而5.2是没有实现的。到这里,这个问题的原因也就明朗了,分析如下:
程序在两个版本的PHP下运行却使用同一个memcache缓存池,我先测试的是5.3.8版本,那么存进去的是PHP5.3的Array_Object对象,该对象在5.3下面可以正常序列化和反序列化,后来我又去访问了运行在PHP5.2下面的程序,这是在memcache中已经有了缓存对象,所以5.2读出来的是5.3中序列化的Array_Object对象,而在5.2中Array_Object是没有实现Serializable接口的,那么在反序列化时就会出现错误,也是就是提示PHP class x has no unserializer的原因。
解决这个问题的方法很简单,给每个程序使用不同的缓存池,避免产生数据污染和版本兼容问题。
波比源码 » php提示PHP class x has no unserializer解决办法
order levaquin 500mg online cheap levofloxacin online
order tadalafil without prescription buy voltaren 100mg online cheap diclofenac online buy
bupropion price quetiapine 100mg pills quetiapine 100mg drug
editing essays mba essay service casino slots free
triamcinolone 4mg canada claritin cheap desloratadine medication
cost dapoxetine 60mg cytotec for sale levothyroxine buy online
purchase flomax tamsulosin 0.4mg ca order spironolactone pills
order cephalexin 500mg pills erythromycin for sale brand erythromycin 250mg
ceftin cost buy careprost purchase robaxin online cheap
real money casino games best online casino games purchase tadalafil generic
viagra sildenafil 200mg sildalis usa brand lamotrigine
buy tretinoin cream for sale buy avana 200mg pills avana cheap
tadacip 10mg oral purchase diclofenac online indocin for sale online
naproxen order buy lansoprazole 15mg lansoprazole 30mg ca
order albuterol for sale proventil oral buy cipro pills
ivermectin 3mg otc buy stromectol 3mg sale avlosulfon over the counter
purchase nifedipine for sale fexofenadine online buy order allegra 180mg generic
order generic ramipril buy altace 10mg without prescription oral etoricoxib 60mg
doxycycline 200mg pills order albuterol generic cheap cleocin 300mg
buy mesalamine 400mg generic order asacol 800mg generic avapro without prescription
purchase temovate purchase buspar generic buy generic cordarone 100mg
purchase diamox generic buy imuran 50mg generic purchase imuran for sale
order digoxin 250 mg without prescription micardis 80mg over the counter order molnupiravir 200mg generic
oral fosamax 35mg order furadantin 100mg online cheap buy ibuprofen 400mg pills
priligy 90mg usa priligy 30mg without prescription order generic domperidone
buy famotidine pills buy mirtazapine 15mg sale order remeron 30mg sale
doxycycline buy online methylprednisolone 16mg pills medrol price
buy tricor 200mg without prescription purchase viagra generic viagra for sale
Thank you for great information. Hello Administ . Metropol Halı Karaca Halı Öztekin ve Selçuklu Halı Cami Halısı ve Cami Halıları Türkiye’nin En Büyük Cami Halısı Fabrikasıyız…
cialis 40mg drug viagra daily best pill for ed
order generic modafinil buy stromectol 3mg online cheap buy promethazine 25mg pills
sildenafil 100mg brand buy sildenafil order propecia for sale
purchase ondansetron sale bactrim 960mg cost bactrim drug
buy albuterol pill levothroid drug augmentin us
prednisolone 10mg uk oral gabapentin lasix over the counter
dutasteride over the counter oral avodart buy xenical pill
imuran buy online order naproxen 500mg sale buy naproxen sale
omnicef pill buy cefdinir generic protonix 20mg without prescription
avlosulfon us order tenormin 100mg without prescription cheap atenolol
oral zocor 10mg sildenafil 20mg sildenafil on line
brand zetia 10mg buy zetia 10mg pills buy methotrexate 10mg sale
order levofloxacin generic actigall 150mg bupropion cheap
zyrtec online buy generic atomoxetine for sale buy sertraline 50mg
buy cenforce 50mg without prescription glucophage cheap purchase glycomet sale
purchase lexapro online cheap naltrexone cost order generic revia 50mg
order atorvastatin 10mg without prescription sildenafil us buy viagra 100mg pills
buy femara 2.5mg pill femara order online buy viagra 50mg pills
cialis usa cialis store best natural ed pills
modafinil 200mg tablet buy prednisone 20mg without prescription prednisone 10mg pills
generic accutane isotretinoin 40mg cheap purchase azithromycin without prescription
buy gabapentin 800mg online cheap buy neurontin 100mg without prescription order doxycycline 200mg online
purchase albuterol online order albuterol synthroid us
cheap prednisolone generic gabapentin 800mg price generic lasix 40mg
order generic clomiphene order levitra 10mg pills plaquenil 400mg us
atenolol 50mg tablet femara 2.5mg usa buy generic letrozole 2.5mg
buy levoxyl generic clomid 100mg ca buy vardenafil no prescription
buy albendazole 400 mg online buy aripiprazole 30mg online cheap buy provera 10mg without prescription
buy glucophage 500mg online cheap amlodipine price buy norvasc without a prescription
biltricide 600mg pills generic microzide 25mg order cyproheptadine 4mg for sale
order lisinopril 10mg pill buy zestril cheap generic lopressor 50mg
cheap rosuvastatin 10mg buy generic ezetimibe purchase motilium generic
sumatriptan medication levaquin buy online buy dutasteride online
cheap sumycin 500mg order sumycin online cheap baclofen 10mg pill
order ranitidine 300mg for sale order meloxicam 7.5mg sale celebrex 100mg over the counter
order generic plavix 75mg order ketoconazole for sale nizoral order online
order tamsulosin pill purchase flomax buy spironolactone 25mg sale
buy cymbalta 40mg generic duloxetine cost piracetam where to buy
betnovate 20gm us buy sporanox pills order itraconazole online
progesterone brand order tindamax 500mg without prescription olanzapine 10mg us
purchase nebivolol online diovan 160mg us oral clozaril
purchase nateglinide for sale buy atacand generic buy candesartan tablets
simvastatin 20mg pills purchase valacyclovir generic viagra sildenafil 25mg
carbamazepine price order lincocin 500mg online cheap lincocin oral
buy duricef 250mg generic brand finasteride finasteride 1mg cheap
cheap tadalafil generic tadalafil 40mg price viagra uk
diflucan 200mg us ampicillin 500mg pill ciprofloxacin 1000mg drug
order estrace 2mg pill order minipress pill order prazosin 1mg pill
oral metronidazole 400mg order bactrim 960mg pills buy cephalexin 125mg pills
buy cleocin without a prescription order erythromycin 250mg pill generic fildena 100mg
avana canada order voltaren 50mg for sale order voltaren 100mg generic
nolvadex pills buy cefuroxime 500mg online purchase ceftin for sale
buy clonidine pills for sale buy meclizine cheap order tiotropium bromide online
buy suhagra 50mg generic sildenafil 50 mg sildenafil 150 mg
order accutane 40mg sale order zithromax online order zithromax 500mg sale
azithromycin sale neurontin pills gabapentin 100mg us
furosemide drug doxycycline medication buy albuterol tablets
buy generic vardenafil 20mg order levitra online plaquenil order
order ramipril 10mg sale ramipril 10mg pill purchase etoricoxib
generic levitra 20mg levitra 10mg over the counter plaquenil price
mesalamine 400mg cost generic azelastine 10 ml buy avapro 300mg pills
benicar 20mg drug calan 120mg brand divalproex 500mg over the counter
clobetasol online buy cordarone 100mg price generic cordarone
how to buy acetazolamide diamox 250mg cost azathioprine pills
naprosyn ca cefdinir medication buy generic prevacid