• 12:28 PM

Use 127.0.0.1 instead of localhost on Zend Server

When install some system on Zend Server locally, such as Magento, sometimes, you need change the database server name from “localhost” to “127.0.0.1”.

It is just a note written as a record for future reference.

last comments
juliadiets.com
juliadiets.com

linux - Can t connect to MySQL using localhost but using 127.0.0.1 it s ok? - Server Fault

  • 12:50 AM

Mysql client uses older authentication method in PHP 5.3 on windows?

Just found out the if I use PHP5.3 on windows, I can’t connect to my Mysql5 server. It says my client is too old. After I switch back to PHP5.2.9, things get normal. So, it means the PHP5.3 for windows used a older version of library to compile the code? I don’t know. It took me a while to find out the problem.

  • 10:35 PM

Curl better than simplexml_load_file when web screen scrapping

As in my previous post, I briefly introduced how you can use SimpleXML object to load various web services’ API query urls, if you so choose to mashup a website with data provided by the various websites, such as YouTube and Amazon. Of course, the pay off comes when you use some affiliate code in your query, such as the famouse Amazon’s ECS and you did a pretty well job on your page layout & design, and seo to attract many visitors to you sites. (more…)

last comments
lakshan
lakshan

thank you very much for this article..

  • 08:36 PM

How to use SimpleXML parsing XML data with namespace and CDATA

There are many social network websites (e.g. YouTube) and big brand websites(e.g. Amazon, Yahoo) use REST or SOAP or even RSS web services to provide the enormous data for developers. Using these data, we can build a website virtually with no own database at all, all the information are come from these big sites. The nice thing is that, virtually all of the data returned for your web service client request are a XML data stream. So, we can use the nice PHP5 built in SimpleXML object to parsing the XML data stream, and format the representation of the data according our own website needs. However, the XML data format vary from site to site, some of the XML data returned from the sever, includes namespace and CDATA; if this is the case, you need find a way to access a sub item in the XML data use the same ” -> ” syntax. (more…)

last comments ...
clonks
clonks

Thanks! GREAT!
jcvangent
jcvangent

To speed things up (since I only want the description),if I do an: $entry->children('http://search.yahoo.com/mrss/')->group->description; It…
jcvangent
jcvangent

even when doing it like the example above it gives me an empty string: $media =…
David Adam
David Adam

Are you sure the live feed you got is in correct format. Here is the code I run on the…
jcvangent
jcvangent

What is the url you are using for getting the xml feed, currently I'm using 'http://gdata.youtube.com/feeds/base/videos/-/dance' for example as a…

  • 08:49 PM

Zend PHP5 certification Exam study review 12: supplementary III

Ok, this is the last part of my reviews. This post listed some WEIRD and STRANGE questions I found in the phparch’s simulator exam. You may think these are some advanced features of the PHP5 language, but some of them are actually mention in the GUIDE also. However, some of the questions, I found that there maybe some errors in the question itself; in this case, I marked with the “*” in front of the question. Therefore, some of the answer I gave maybe not right, or maybe I get the meaning of the questions wrong. So, if you have any comment on this post, please feel free to comment or send me a message. Thanks!
(more…)

last comments ...
sarah
sarah

hi, what is the right answer for this * When writing portable database…
David Adam
David Adam

Hello, it is the 2nd answer. :)
felicia
felicia

Thanks for this study guide!!! It was really useful and easy to understand. I just passed the exam this afternoon…
charan
charan

thank you for posting. its really helpful. I have got my ZCE exam day after tomorrow. Please suggest what all…
David Adam
David Adam

I suggest to do some mock test.

  • 08:40 PM

Zend PHP5 certification Exam study review 11: supplementary II

In this and the up-coming Post, I listed some extra questions I found during I took the phparch’s Vulcan Zend PHP 5 Certification Testings. This post listed some EASIER but will not be frequently asked in the actual exam I think. But, they are worthy noted here, they can also serve as check points for you previously learned knowledge.
(more…)

last comments ...
john smith
john smith

Hello I am prepareing ZCE. Anybody can the answer of the following question…
Jahid
Jahid

My Answer would be: (2) Moving all database credentials outside of the document root (3)…
Richard
Richard

Unlike the old MySQL extension, the new MySQLi extension requires that you provide what when performing a query when using…
Jevgenijus
Jevgenijus

(2) and (3) of course, and I would also consider taking (4) "Setting credential information as system…
James Dunmore
James Dunmore

"The ????? function is used to generate a file resource in the file system with a randomly-generated filename to be…

  • 09:33 PM

Zend PHP5 certification Exam study review 10: Supplementary I

Since I mentioned before, I didn’t included the Language Basic and Function topics in these series of reviews, because I think you should already have a good knowledge about them. Anyway, if you have more time, then you can following this post to review some of these features in PHP. It mainly includes PHP’s String(since it is so important), Array, and Function feature; also, it contain some extra information just I think worthy to be reminded.
(more…)

last comments
Kirill
Kirill

Could you explain why str_replace(array('a','b','c'),array('b','c','a'),'abc') returns 'aaa' string instead of 'bca' ? Simply can`t understand thist trick!
David Adam
David Adam

Hi, This is why: The first time, str_replace replace the "a" to "b"…
Henry Lu
Henry Lu

Hi admin, About the question "Can you define an abstract method as private?". I don't think abstract method can…

  • 08:23 PM

Zend PHP5 certification Exam study review 9: OOP Design&Theory

Here is the second topic regarding the OOP paradigm. Trust me, read more about Design Pattern, don’t just for pass the exam sake. The exam regard to the Design Pattern and general OOP theory is very basic. Anyway, following I listed some basic Design Pattern may tested in the exam. Also, I think you should look into the SPL(standard PHP Library) and PECL(PHP Extension Community Library) and PEAR(PHP Extension and Application Repository).
(more…)

last comments ...
Max
Max

Since there are many types of design patterns, would you please give us a list here? Thank you very much…
David Adam
David Adam

Hi Max. I don't know the completed list. I have watched this tutoiral: http://www.vtc.com/products/Design-Patterns-tutorials.htm This may help?
Zzzz
Zzzz

I am really appreciate your effort for ZCE. My Questions: sure if you have a free…
David Adam
David Adam

No, the real exam was actually easier than the mock exam. At least when I took it. :)
bala
bala

Hi, I'm going to write PHP5.3 exam on Nov 2012. Please give me some more idea how to pass…

  • 08:12 PM

Zend PHP5 certification Exam study review 8: OOP In PHP 5

Object Oriented Programming is the norm in modern software programming. Sadly, prior PHP4, PHP lack a great OOP language support. PHP5 changes all that. That’s why the Exam has two topics especially regarding this area: the actual OOP feature in PHP5 and OOP design and theory. This post is a brief review on PHP5 OOP feature, you will spent some time on OOP in PHP if you are a well experienced structure-style programmer in PHP4 I think. OOP is actually easier once you shift you ideas around :). Because, in life, not in one moment, we are not dealing with OBJECTS.
(more…)

last comments
Henry Lu
Henry Lu

Hi admin, Thank you for your post. It is a good article for ZCE review. I…
David Adam
David Adam

Oops, you are right. Yes, it is obvious that the "This is never displayed" is never displayed! :)
jo
jo

Hi admin, I have a question, please give me a help, Q: The __method…
David Adam
David Adam

the answer is 1.

  • 08:01 PM

Zend PHP5 certification Exam study review 7: PHP4 And PHP5

Due to the fact that many hosting providers and live web sites are still using PHP4, and this situation is likely remaining for some time; the PHP5 Certification Exam has a topic on the difference between PHP4 and PHP5. You should have very good knowing that PHP5 has great improvement on which subject as well as deprecations on older code. I did post review on the Language Basic and Function topics in the exam, because I think these topic is too “basic” to write out and you should quickly or already know them. However, this post do start with some basic concept then migrating to the difference made in PHP5 as compare to older version; because I think this post is consider the “Language Level” subjects on PHP. So, here comes “what exactly language construct”…
(more…)

last comments ...
Heena
Heena

yes I tried to post with tag… btw code is here if($obj1===$obj2){ //do something }
David Adam
David Adam

The answer is 4>$obj1 and $obj2 must be the same instance in php5.
mcloide
mcloide

Hi Heena, about the first question, the correct answer would be 3. PHP4 will throw a notice error for using…
Henry Lu
Henry Lu

I agree mcloide for the following reasons: You should never use parentheses around your return variable when returning…
kleo
kleo

E_ALL includes E_STRICT in 5.4.0 and up