Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
The typical solution those kind of locking problems would be concurrency/multithreading. PHP supports process forking using pcntl_fork. It only works on Unix based systems, which might be a problem for you.
-
It seems to be working quite fine for virtually all other services...
-
Have you considered that there are actually people who have kids as well? So now we have food, clothes and toys for the kids. Considering you're working 12 hours per day, those children also need somewhere to stay after school and until you get home if they're not very old yet. I don't know about the US, but here that would easily be an extra $300/month/child for some sort of after school care. Let's not forget that more people requires more electricity, water and space. And then we are still assuming that you are working a ridiculous amount of 12 hours per day every day. Now if we say that you work 8 hours per day and there are 30 days in a month and you actually have weekends, that would be 7.25*8*22=1276 before tax, and if tax is 15% then you're down to $1085.
-
That's not a very good regular expression for matching phone numbers though. -.........234-.-.23.-.-23-.4-.2-.34 would be a valid phone number according to that regex.
-
What's the domain name called? You can use dig (available in most Linux distributions) to find the DNS records for a domain name. Example for phpfreaks.com: daniel@daniel-laptop:~$ dig phpfreaks.com MX ; <<>> DiG 9.6.1-P1 <<>> phpfreaks.com MX ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11949 ;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;phpfreaks.com. IN MX ;; ANSWER SECTION: phpfreaks.com. 120 IN MX 30 ASPMX2.GOOGLEMAIL.com. phpfreaks.com. 120 IN MX 30 ASPMX5.GOOGLEMAIL.com. phpfreaks.com. 120 IN MX 30 ASPMX4.GOOGLEMAIL.com. phpfreaks.com. 120 IN MX 20 ALT2.ASPMX.L.GOOGLE.com. phpfreaks.com. 120 IN MX 20 ALT1.ASPMX.L.GOOGLE.com. phpfreaks.com. 1 IN MX 10 ASPMX.L.GOOGLE.com. phpfreaks.com. 120 IN MX 30 ASPMX3.GOOGLEMAIL.com. ;; Query time: 134 msec ;; SERVER: 208.67.222.222#53(208.67.222.222) ;; WHEN: Thu Nov 5 12:26:24 2009 ;; MSG SIZE rcvd: 207 daniel@daniel-laptop:~$ I really don't know how you would change DNS with your host/registrar though. It would be better to ask them.
-
It's \n though, not /n.
-
SELECT * FROM $db_table WHERE MONTH(date) = $newsmonth ORDER BY nid DESC; You'll get a problem once your site has been online for a year though. When you select January you would get news items from January 2009 and January 2010 (and January 2011 later on). What I would do is to list them in reverse chronological order, but introduce pagination so you can do like "Earlier entires". We have a pagination tutorial on PHP Freaks.
-
PHP outputs things exactly as you tell it to. If you want newlines, HTML line breaks, tab characters, etc. you'll have to add it yourself. If you said 'output "foo" then output "bar"', it would be incorrect if it output "foo\nbar", "foo<br />bar", "foo<br>bar" or anything different from "foobar".
-
MySQL not working with PHP5.2.11 on 64Bit Linux
Daniel0 replied to khanyawar's topic in PHP Installation and Configuration
When you build something as a shared module, you'll have to load it in php.ini. Edit: Damn... now I posted to a (semi-)old topic again. -
It's not HTML that resets the form, it's your browser that resets it. An INPUT or BUTTON element with type="reset" is per definition supposed make the browser reset all form fields in that form to the default state they were in when the page loaded. Submitting a form is different. You can easily submit the form (again, it's your browser that does this, not HTML) to any page, but unless there is something to handle it on the other end, the stuff you wrote in the form has no meaning. HTML is what you call a markup language. It's just describing what your content is, not what anyone is supposed to do with it.
-
That's because they're manuals. A manual is just supposed to tell you how something works. You don't learn how to fly by reading a plane's manual either. Maybe if you're already really good at flying you can pick up how to fly that particular plane using its manual, but with little or no experience flying that's not going to happen. If you want to learn how to program, read a book.
-
Did you check that it's correct according to your DNS server? Google Apps won't keep checking if your MX records are correct. Once they're correct once it assumes that you don't screw it up. I have got a couple of domains on Google Apps that I once set up MX records for. They're not configured right now, but Google Apps doesn't care anyways. It still says it's active.
-
Transfer Complete Auction Site to Run on Localhost
Daniel0 replied to Modernvox's topic in Miscellaneous
Why can't you just upload only the changed files? -
Have a look at these: http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml http://themoneyconverter.com/USD/rss.xml http://feeds.currencysource.com/USD.xml You could easily parse them to get exchange rates.
-
Well then go start one if you want one, but not in other people's topics when it is entirely irrelevant.
-
More generally, AND takes higher precedence than OR. This means that the two following statements are equivalent: a OR b AND c a OR (b AND c) Both of them are also left associative (that means they're evaluated from left to right), which means that when you write: variableA = 1 OR variableA = 2 AND variableB = Z AND variableC = N OR variableC = M The implicit parentheses are like this: (variableA = 1 OR ((variableA = 2 AND variableB = Z) AND variableC = N)) OR variableC = M
-
I have a plan to reduce the "tl:dr" count!
Daniel0 replied to PugJr's topic in PHPFreaks.com Website Feedback
http://www.phpfreaks.com/forums/index.php?action=profile;u=22533 haha you know, there have actually been several posts I've made that I've gotten the "your message exceeds the character limit" message or however it says it. And it wasn't because of random stuff c/p'd into it... Hmm... it seems like it's actually restricted to 40000 chars. We could restrict it to 140 like Twitter -
I have a plan to reduce the "tl:dr" count!
Daniel0 replied to PugJr's topic in PHPFreaks.com Website Feedback
http://www.phpfreaks.com/forums/index.php?action=profile;u=22533 -
Hmm... well I can definitely say that the CSS hasn't been changed. Have you by any chance zoomed in just a tiny bit?
-
Hmm... does the HTML look correct if you view the source though?
-
It was a very serious question. How would you analyze a website if you were to do it manually? If you can't do that then you wont be able to program a computer to do it either. As an example, imagine you want to make a function that computes the greatest common divisor (GCD) of two numbers. If you don't know how to find the GCD, trying to implement an algorithm that does it would be impossible.
-
If you want a place to link back to, I suppose you can link to PHP Freaks. It's in no way required though. I'm glad you got it working
-
I can't reproduce this issue. Maybe your version of the CSS file is corrupted somehow? Try clearing your cache.
-
How would you do it by hand?
-
Hence the "usually"