
Philip
Staff Alumni-
Posts
4,665 -
Joined
-
Last visited
-
Days Won
20
Everything posted by Philip
-
We would like to welcome back @Ch0cu3r to having a shiny blue, moderator badge! Thanks for all the hard work & helpful posts you make around here
-
Maybe it just didn't like the weekend?
-
Looks like its related to the Google +1 button. Does it work on the homepage? If so, that'd confirm the culprit.
-
Mine seems to be working still? Any JS errors?
-
You know you can only see the contents of that, right?
-
In the developer world it is still pretty popular. It's a great way to find quick help from collective developers on a topic. Most large open-source projects have their own IRC channel somewhere, usually freenode. Go to GitHub, find a project that you like you you've used and fork it. Fix a thing or two, add a new feature and do a pull request. I welcome it when someone does this to my GitHub projects; it's a nice feeling as a project owner that people are using your stuff. Once you've found your groove on what you like to contribute to & you get the chops, start releasing your own projects. Then, as trq pointed out, people start to notice you. I have to agree with this. It's very rare I see someone straight from college (or with X years experience) not have a junior or mid-level position before a senior position. Many senior positions require a lot of field experience. I'm in a relatively niche field myself, but a lot of the "senior" positions require 5-10 years minimum of hands-on experience in the industry. Just my $0.02.
-
Emails should now be sending.
-
And I could say I'm a veterinarian because I have a dog.
-
It's almost as bad as the real thing. *Philip runs
-
The following scenarios are what I consider code completion (all of which, I hate): Start typing "$foo" and it finishes it with "bar", resulting in "$foobar" Type a quote or start of like an html attribute and it puts in the closing quote e.g. type "<a href" and it finishes it to "<a href=''>"- this by far is the most annoying one IMO Type "<div>" and it includes a "</div>"
-
I must be the only one that hates code completion.
-
mysql* expects parameter 1 to be resource, boolean given This means your query failed, for some reason or another. Remove any error suppressing (@), make sure you have error displaying enabled, and output mysqli_error to see specific information about your error!
-
I use MySQL workbench, mainly on windows. It's not the best that's for sure. I'm interested in seeing other options as well.
-
PHP kept crashing on preg_match* on large strings, why? This is actually one I kept running into recently... There is a limit on the amount of recursions that PHP will do. You're likely running into this limit and should either up the limit or found a different way to go about your problem.
-
When shouldn't I use regex? It may be cool and hip to be a "regex guru" (it is!). And regex may be powerful and sexy (it is!). But more often than not, you don't really need regex to solve your coding dilemma. In reality, regex is almost always either too powerful or not powerful enough for the job. It has an extremely small set of circumstances where it's the best tool for the job. So, before you try to use regex, ask yourself if you really need it. A good rule of thumb is to assume you don't need regex, and turn to it when you are certain that no other option exists. Too powerful There are many string and substring functions that will handle things much more efficiently than regex. For example: Want to know if the value has only numbers or letters or alphanumeric etc? Use one of the ctype functions Want to know if "foobar" is in "this is the foobar moment in time!" Use strpos or stripos Want to split up a string into an array by a known delimiter, e.g. a comma or pipe? Use explode Want to trim whitespace or other known chars from beginning and/or end? Use trim or ltrim or rtrim Want to replace or strip a known value from a string? Use str_replace Not powerful enough On the other end of that spectrum, regex sometimes isn't powerful enough for the job. The most common example of when regex falls short is that a lot of people turn to regex as a solution for trying to parse HTML/XML content. Sometimes regex may work out for you, depending on what you are trying to accomplish. But most of the time, regex is not what you should be using for HTML/XML manipulation. Regex has come a long way over the years, but at its core, regex is for parsing regular grammar, but html/xml is context-free grammar. If you are looking to parse html/xml content, you should use a DOM parser. There are several libraries that are by default included with php, such as DOM or SimpleXML, as well as a lot of great 3rd party libraries, such as Simple HTML DOM or phpQuery. Also, if you are using a php framework, there's a good chance it already has one or more of these (or its own) included and wrapped in your framework syntax.
-
I need help with some regex, how should I post? Regex can be a tricky subject, especially when you need some help with it. Here is the bare minimum on what you should include with your post: Describe your problem Give lots of sample input data Give the matching expected data for the input data you gave (this is important!) If you already have some code (which you should!), show us the code and tell us what you think is going wrong with it We assume its a PHP regex related as this is PHP Freaks, but you still need to specify (if not obvious) if you are talking about POSIX (ereg) or PCRE (preg) flavor.
-
Should I salt my user's passwords, and why? YES! Salting makes it much harder to crack if an attacker is using a rainbow table.
-
What is the point of MD5 / SHA1 / SHA256 / etc.? You should always, always, be hashing your users passwords. Note the word hashing and not encrypting (difference: hashing is one way and cannot be reversed.) These functions will hash a string with varying levels of security. The more processing power it takes (SHA512 will take more than MD5), the more secure it is likely to be. It should be noted that MD5 really shouldn't be used for password hashing, and instead you should be using the crypt function with a more secure algorthym (like Blowfish).
-
I'm getting a "headers already sent error". What does that mean? When you get this error, it means that you've already started to send content to the user and you're trying to send other header information that should be at the beginning of the request. Common situations include outputting content and trying to redirect the user later, or outputting content and then trying to set cookies. This works in javascript, because it is clientside. This doesn't work with php or other server-side languages, because cookies and redirects are sent in the header of a response, and the header goes at the beginning of the response, before content. It's like trying to dial a number to call your friend when you already called them and are in the middle of talking to them. The only thing that happens is your friend starts wondering why you're pressing random numbers. IOW the browser will not do anything with headers sent after content has already started being sent. So for example, if you try and set a cookie after outputting content, it's not going to get set. So php outputs a warning to inform you of this. So, how do you fix it? There are 2 ways; the first and preferred method, you can reorder your script so that you send the vital information (cookies, header redirects, etc.) before you send any content. The second would be to use output buffering. You can also read more about this in one of older, yet still relevant, resource topic.
-
Call to undefined function "mysql_connect" This means your MySQL PHP library is not loaded. You should check to see if it is loaded by running phpinfo();. If it is not included, you need to check your php.ini configuration or contact your host for more information. It should be noted that mysql_ functions should be replaced with PDO library or the mysqli library.
-
Can you do / write _________ for me? Sure, we could do it for you. But it is going to cost you, and better suited for the freelance forum. Instead, show us some code that you've tried or ask for guidance on what is the best way to go about something. Otherwise, don't expect anything except for snarky replies! Remember, we are volunteering our time to help you. Help us help you by at least attempting to solve the problem on your own!
-
faq README: Everything you'd want to know about PHP Freaks
Philip replied to Philip's topic in PHPFreaks.com Website Feedback
What do those user badges mean? How do I get one?!!? PHP Freaks Staff This is the "Staff" of the PHP Freaks community, the members who actively help out and make decisions around here. There is no formal application process for becoming a Staff member of PHP Freaks. Nominees are picked by current PHP Freak Staff. We actively look for people to join our ranks and we do have some criteria that must be met before considering someone, but in order to keep people from trying to "cheat the system," we refrain from making our methods public. If you wish to be promoted to one of these groups, our best advice to you is to be an active member of the community, be a ninja, help others, etc... and in time you will be noticed. Guru The Gurus are a group of people who have been around for a while, are active, and have shown to be very knowledgeable in one or more areas of interest of PHP Freaks. Gurus take part in making decisions to shape the community, have limited moderator permissions, and have permissions to post blog posts and tutorials on the main site. Moderator In addition to Guru responsibilities and abilities, the moderators can modify, lock, and delete any post or topic. They are responsible for enforcing the rules and may issue warnings or ban any member. Questions regarding a particular moderation action or warning should always be made to whomever did it. If a resolution cannot be found then you may appeal to an admin. The mods have a great deal of influence in the decision making on PHP Freaks. Administrator In addition to Moderator responsibilities and abilities, the admins are responsible for running the server, and they have root access to our servers. They are the highest authority on the forum, and are those who ultimately have the final say in any matter. Questions regarding the operation of the website, questions/help with your account, etc. should be made to an administrator. Other Groups Staff Alumni This group is composed of people who were former staff members of the PHP Freaks community. They no longer possess any authority or special privileges on PHP Freaks. -
faq README: Everything you'd want to know about PHP Freaks
Philip replied to Philip's topic in PHPFreaks.com Website Feedback
Why can't I edit my profile? In order to prevent spam, we've disabled the ability to edit your profile. This includes changing your avatar, your signature, etc. This will be lifted once you hit 10 posts. You should not spam your way to those 10 posts though! If you are in need of editing your profile right away, contact an administrator and we may help you out, depending on how nice you ask. -
faq README: Everything you'd want to know about PHP Freaks
Philip replied to Philip's topic in PHPFreaks.com Website Feedback
I don't like my username, can I change it? We used to not allow username changes, then we started to do them manually. With our switch of forum software we allow you to change your display name on your own. To do so, you need to have 100 posts and can only change your username once per year. You will not be able to change it to a name that is already in use (even the user is not using that account anymore.) No exceptions. Your new name should reflect professionalism and if deemed inappropriate, it will be reverted. You can make the change in the User Control Panel "Display Name" tab. It will show you more information about if you've used your 1 time or not, or if you cannot see that page, you likely do not have enough posts.