Re: [PHP] Missing or wrong reply-to headers in this mailing list
On 7/12/05, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > Probably just means the lists aren't very technical. That comment amused me greatly, because the only other mailinglist I'm on is the Ruby on Rails list, and that one does reply-to munging. What that says about the respective userbases of PHP and RoR, I'm not sure... :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: jpgs into database
I've always liked storing all data in the DB to keep things simple, so I stored images in the DB and then cache them on the filesystem when they're first requested. Granted, it's pretty inefficient with disk space, but if you have a good ORM db lib and caching lib, it's extremely convenient. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a way to get a variable name as a string?
function named_print($var_name) { return "echo 'the variable named $var_name is set to ' . \$var_name;" } eval(named_print($foo)); ;-) Tyler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Restarting windows from php
> I never used this kind of functions before. What's wrong? In IIS for > "Execute Permissions" I have "Scripts and Executables". What > permissions should I set for the Internet Guest Account? Or something > else caused the problem, not the permissions? Please help me.:) On windows, php uses cmd.exe to do exec() stuff. IIRC< if your web server/php script is running as an underprivileged user (which it should be), it probably don't have read/exec access to cmd.exe. This is one possible cause of the fork error you mentioned. You can solve this by giving your php script access to cmd.exe, or copying cmd.exe into the directory that contains your php dll or exe. (you may have already done this, or this may be different in newer versions of windows -- I haven't had this issue in a while) Tyler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] DB access and sessions
Since you can't be sure to be notified when a user stops editing a page, whatever solution you choose will probably involve some sort of timeout-based system. (e.g. when someone starts editing a page, set a "last_opened" time field on the resources, and when someone else tries to edit the same page, check to see if "last opened" is in the last 30 mins). If you combine this with an ajax/iframe reload, you can be much more precise (e.g. while someone is editing a document, have their browser hit a designated url every 60 seconds; when the repeated hits stop, you know they're done) Since no such system is absolutely positively foolproof, you'll probably want to look into optimistic locking if you want to guarantee that no one's changes are accidentally overwritten. Tyler On 8/17/05, Bret Walker <[EMAIL PROTECTED]> wrote: > Hello- > > I'm developing a web-based system whereby users can edit documents and > then e-mail the documents to selected recipients. > > The "documents" are comprised of the data from several MySQL fields. > > I want to make sure that two people don't edit a document at the same time. > > My users log in via a script that starts a session. > > My initial idea was to have a field to denote file access (1 for "in > use" 0 for available). The problem with this would be if a user > navigates to a different page or closes the browser window without > clicking a "save" or "close" button (which would execute a query to set > the in_use field to 0). > > I'm sure others have dealt with the issue of exclusive access to a MySQL > resource. I've looked into InnoDB transactional support, but that > doesn't seem to be what I need, since I'm not overly concerned about > simultaneously access, just simultaneous editing. > > How can I ensure the "document" isn't accessed by two people at the same > time? > > Thanks, > Bret > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php