Content
Posts Tagged ‘php’
PHP is the standard in web development languages, although some people might prefer Ruby, Python, or Java – PHP is simply the most widely used language and that should not be debated. Although not officially related to PERL, PHP shares so much with PERL that it’s hard to believe they aren’t related. PERL was the standard, the most widely used language for so long it’s still very common to see it despite the fact it’s gone almost unsupported for years, but PHP has solved many of the shortcomings of PERL and brings so many features to the table it’s a difficult choice to not use PHP.
by php-love
The rule? Simplify.
When searching for your IP address, you usually just do a Google search for “what is my IP address” and pick one of the top results. For quite a while now, Google has been displaying your IP address right in the results for that search, which makes it much easier.
But what if looking up your IP address is something you do constantly, daily or weekly?
And what if you need to look up the IP address programmatically, lets say via PHP or even Javascript? (more…)
Tags: hello, ip address, php, session, the rule, timestamp
Posted in Code Snippets, Linux, PHP and MySQL, Programming, Servers, Software, Troubleshooting Tips, Web Development | Comments Off
by php-love
Types of PHP Frameworks
Frameworks existing for many purposes and are written in many languages. PHP frameworks come in many shapes and sizes, so it’s important to match your requirements and your development capabilities with the framework.
If you are very picky, you’ll need a framework that easy to customize. If you don’t have any development resources, you’ll need to choose a framework that provides all the functionality you will need.
Frameworks can be “large” or “small”, “light” or “heavy” and everywhere in between. For example, Joomla and Drupal are “large” and “heavy”. They contain lots and lots of code, lots and lots of built-in logic, and accordingly have lots and lots of problems. On the other hand, frameworks such as CodeIgniter are “small” and “lightweight”. CodeIgniter is minimalistic, and some would consider it more of a code organization tool. WordPress isn’t strictly a framework, but works great as a framework and isn’t as “small” or “lightweight” as CodeIgniter, but it isn’t “heavy” either. (more…)
Tags: developer, features, map, mockup, php, plan, spec, wordpress
Posted in Frameworks, HTML and CSS, JavaScript and AJAX, PHP and MySQL, Programming, Software, Web Development | Comments Off
by php-love
PHP exec() command is heavily used, but sometimes when using mysqldump and other commands the results can be confusing and difficult to debug.
Namely, when tables are crashed, exec()’s $retVal might end up as either 2 or 3, and the table may or may not show as Crashed when doing a “SHOW TABLE STATUS”. Try to do a mysqldump, and look at the very end of the file to check for an error. Alternatively, just attempt to REPAIR TABLE on the table after the last table it successfully backed up.
It is best to always treat any value in $retVal as an error.
Tags: code, error, exec, mysql, php, return
Posted in Code Snippets, Linux, PHP and MySQL, Programming, Servers, Software, Troubleshooting Tips, Web Development | Comments Off
by php-love
Crons can solve a lot of problems, but they can also create a lot of problems so be careful.
Usually you’ll make a cron to fix a specific problem, or to create a queue. There aren’t a whole lot of “standard” crons that we can discuss. (more…)
Tags: backup, cleanup, cron, mysql, php, queue, rotate, schedule
Posted in Code Snippets, Linux, Performance, PHP and MySQL, Programming, Servers, Software, Web Development | Comments Off
by php-love
The Queue.
It’s a wonderful thing. Queues are a great way to deal with performance issues. Generally, from an end-user perspective they make the system appear to work very quickly.
This is #2 in our series because if you are searching for information on performance fixes, chance’s are you need a quick fix of some type. Queues are a great quick fix, they are also suitable for long-term implementation, and can solve a variety of problems, however they are only useful in certain situations so don’t get overzealous. (more…)
Tags: mysql, performance, php, queue
Posted in Code Snippets, Linux, Performance, PHP and MySQL, Programming, Servers, Troubleshooting Tips, Web Development | Comments Off
by php-love
When trying to optimize the performance of your MySQL database, the first thing you try is often the most futile:
Table Optimization.
We put this first because it’s often the first “fix” people arrive at when trying to fix performance problems, but we think it’s almost never the solution, so we want to get that out of the way first. Generally speaking, most Mysql tables are created in a very optimum way. 5-10 years ago that wasn’t necessarily the case, however these days most problems are caused at the application-level or table-desgin-level (aka. Improper use of tables or improper table structure). It might be worthwhile to skip this article, but it’s a good idea to keep Table Optimization in mind, just don’t assume that’s going to be some magical fix. (more…)
Tags: index, magic, magic fix, mysql, optimize, performance, php, the rule
Posted in Hardware, Performance, PHP and MySQL, Programming, Servers, Software, Web Development | Comments Off
by php-love
I love lamp.
LAMP programming has been around for many years. Although there are many variations, it normally stands for:
Linux Apache Mysql Php
Through the years, there have been many variations. For a long time, until PHP became popular, the P stool for Perl. Some people might argue that the P stands for Python. Eh, not really, PHP is much, much more widely used. (more…)
Tags: apache, lamp, linux, mysql, php, programming
Posted in Frameworks, Glossary, Linux, PHP and MySQL, Programming, Servers, Web Development | Comments Off
by php-love
How do I use PHP’s parse_url() function to separate out the base domain from the domain extension?
How do I use PHPto extract the domain from a URL?
How do I extract the domain when it is using a ccSLD, or “country code second level domain”, such as .com.au and .co.uk?
PHP’s parse url function is quite handy, but not all powerful, and it cannot distinguish between domains and subdomains. (more…)
Tags: domain, parse, php, tld
Posted in Code Snippets, Domains, Glossary, PHP and MySQL, Programming, Web Development | Comments Off
by php-love
“Deprecated” is a term used in programming to describe when a function or other feature should no longer be used.
Because of the fact that the term “deprecated” is fairly industry-specific to programming, we choose instead to call it “decapitated”. We think this is a more accurate description.
“Deprecated ” is often used in PHP because of he numerous iterations PHP has gone through. PHP describes many functions as deprecated because they were used in PHP 4 but were dumped in PHP 5. PHP also has many significant upgrades between version – subversions that have many more differences than average. PHP 5.3 is a great example of this, but there are many more significant sub-versions. (more…)
Tags: decapitated, deprecated, html, Javascript, mysql, php, programming
Posted in Android, Frameworks, Glossary, HTML and CSS, JavaScript and AJAX, PHP and MySQL, Programming, Troubleshooting Tips, Web Development | Comments Off
by php-love
There are a variety of web frameworks out there. Some are called “Platforms”, and are usually more complex. Here are a few examples:
- CodeIgniter
- Zend Framework
- Joomla
- Plone
- Drupal
- CakePHP
- Yii Framework
- Symfony
- PHP Nuke
So which one is right for me? (more…)
Tags: application, develop, framework, php, platform, simple
Posted in Frameworks, HTML and CSS, JavaScript and AJAX, Linux, PHP and MySQL, Programming, Servers, Web Development | Comments Off