PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
OK I'm guessing RTQ stands for "read the question".
RTQ == Really Tricky Question
ole wrote:I suggested persistent connections. If that was incredibly stupid suggestion for some reason...well I've never used sockets before and please educate me
Sorry to confuse ... your answer was brilliant (as ever ). A quick search of the online manual for "socket" functions obviously turned up the answer.
Weirdan wrote:pfsockopen is not going to help really because unless you're very lucky, next request would get served by a different apache process.
Does this have any relation to thread safety?
/ hangs head in apologeticness since I didn't mean to take over the thread but was really curious and didn't want to look like an inexperienced n00b asking a thread related question.
Everah wrote:
Does this have any relation to thread safety?
php on its own may or may not be thread-safe (it depends on the extensions loaded/compiled in). So it's actually not valid to talk about thread-safety of one particular function when entire module could be thread-unsafe.
pfsockopen is not going to help really because unless you're very lucky, next request would get served by a different apache process.
Really? That makes them pretty useless doesn't it?
Well, they serve their purpose when you want both to limit the number of connection to particular service and get rid of connection instantiation overhead.