Re: [PHP] Locking in PHP (Question for PHP Gurus)
I would use a cronjob to make the entry rather than a user, why let the poor guy wait for you to create the content You may have 2 requests both trying to create the new cache entry, but that is much cleaner than having to deal with locking. Do a tempnam() to get a temp file to write to and then do a rename() if this is a filesystem thing. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] if question
> I need to test if a variable value is 3 or 6 or 9 or 12 or 15 or 18 ... goes if ($variable%3 == 0) #do something -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com
Re: [PHP] Help with proper post method...
very quick and *very* dirty, put this in top of your file extract($_POST); and voila, you bypassed "registerglobals off" -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com - Original Message - From: "Joey" <[EMAIL PROTECTED]> To: "PHP" Sent: Wednesday, April 06, 2005 2:23 PM Subject: [PHP] Help with proper post method... OK I am migrating some sites from an old school server to one with MySQL 4 & newest PHP, however certain things aren't running because of the register_globals variable on the new server is set to OFF for security reasons. What I am trying to do is post like so with hidden variables The display_info.php says Undefined variables in the file, because of course since globals is off it's not being passed to it from the first form. Now I'm not trying to become the master here, but need a quick and dirty way of patching these programs to accept the hidden passed values so I don't have to go and re-code everything... Any links to a good example etc would be greatly appreciated. Thanks! Joey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anybody getting these also?
yep -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com - Original Message - From: "Andy Pieters" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 06, 2005 2:33 PM Subject: [PHP] Anybody getting these also? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] functions vs classes
Novice PHPer, and i am wondering why one would use a function instead of a class (or object)? They seem to server very similar in use. All depends on the specific use and situation - pros and cons by both models, for speed and performance, I mostly use optimized functions sorted out in structured files for easy reuse, rather than objects. PHP5 seem to embrase object orientation more, so lets see if a war starts again - it's religion. Think before you program. The way I see it, is a function if for repeated use in a project specific manner, where as a class could be used for many projects. It's precisely the same, if you include a file with your class or include a file with your functions, whats the difference ? none. -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP logo is freaked in phpinfo();
Is someone playing games with me I have a rabbit photo which has taken over the php logo in my phpinfo(), I also saw a dog in a logo on a mirror for the php manual :) Its kinda cute, interested how its done. yeah, we hacked your server and changed the logo ... just for the fun of it -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: ISO encoding of subject in mail?
i vaguely recall some new (aka 5.04) functions added to the mbstring extension to handle this. Hmm... I´m programming on a platform with 4.3.10, so that won´t work for me. Might just create my own function since it´s 6 chars that needs to be converted... beware of biting dog when proceeding with mbstring functions, as some is buggy for some languages (in my case Japanese) -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-help
The manual to the rescue http://jp2.php.net/stripslashes There is alot of good information in the manual, think it would benefit you alot going through some of it, especially the central chapters -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com - Original Message - From: "K Karthik" <[EMAIL PROTECTED]> To: Sent: Thursday, March 10, 2005 4:01 PM Subject: [PHP] php-help sir, i'll explain my problem.and if anyone could help me i'll be thankful. i am displaying a content read from a file into a text area of a form. when i make changes andretrieve back in the text area, i encounter a problem.. i.e., when i enter text="please enter" i have an outputas text= /" please enter/" thanks, kkarthik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-help
The following should be pretty selfexplanatory * 0 * * * /usr/local/bin/php /usr/local/www/cron/sync.php -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com - Original Message - From: "K Karthik" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 09, 2005 3:48 PM Subject: [PHP] php-help hello sir, i am so happy about the immiediate response for any of my question. i would like to create a static html page. using cronjob regenerate it every 24 hours. how can i do it using php. thanks, kkarthik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function to remove all \" from a variable
The manual to the rescue http://jp2.php.net/stripslashes -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com - Original Message - From: "Tim Burgan" <[EMAIL PROTECTED]> To: "[php] PHP General List" Sent: Wednesday, February 16, 2005 11:22 AM Subject: [PHP] function to remove all \" from a variable Hello, I'm using FCKeditor to edit content on my site. But the content it produces escapes all the " (double quote) characters from my HTML, and replaces it with \" (backslash-double quote). Is the a function that I can use to change it back? Does str_replace() do it.. if so is this how I use it: str_replace('\"', '"', $_POST['FCKeditor1']); Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5 with Apache 2.0
I've been running FreeBSD 5.3, Apache 2.0.53, PHP 5.0.3 with mySQL 4.1.8 without any issues in production. Unless you rely on some spooky extentions, I wouldnt think you should have any problems running - that you ask this question here, tells me you aint running any such spooky things. I'm facing about 100k unique users a month running some 5 million pageviews with extensive load for the database - this backed on a single server with a Xeon processor and 2gb of memory. So from here, go for it mate -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com - Original Message - From: "Neal Schilling" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 15, 2005 2:28 PM Subject: [PHP] PHP 5 with Apache 2.0 I know this question probably gets asked a lot, but I'm setting up a Web Server shortly and am debating going with PHP 5 on Apache 2.0 or 1.3. In short, is PHP 5, when combined with either Apache 1.3 or 2.0 on Linux or FreeBSD, ready for a production environment? This is, of course, an opinion, but back your opinion with as much fact as possible. Also, if PHP 5 is NOT ready, do you feel PHP 4.3 is ready for production with Apache 2.0? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zend Performance Suite 3.6 and PHP5
Thx Matthew, Meanwhile I got the software from Zend and tried to install it on my server. After manipulating some files to make the install script run, it segfaults later in the install. It seems, 3.6 isnt forward compatible and I've given up to install the product on the new server. Pricing for the newer versions make me look other ways Thanks for your reply / Lars I'm almost certain that PHP 5 was supported starting with Zend Performance Suite 4.0. You can log into your company's Zend account to download the software that you have access to. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Zend Performance Suite 3.6 and PHP5
I've taken over the system administration of our servers, and have been migrating from PHP4 on Redhat, to PHP5 on a FreeBSD system setup. Few questions, Is this version of the ZPS compatible with PHP5, I mean, the software was bought back in dec. 2003 and never updated since. (the new Zend Platform is outrageously priced, and I'll never get that through on the IT budget here) Does anybody know where to download the source for this, the old (and ofcourse not working here anymore) admin didnt keep the source, so all I got is the name and serial. (and Zend supporters seem to be "on vacation") With the "Zend Platform" out of the way, should I look more toward eg. the APC ? -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encoding problems using phpMyAdmin
I am just curious why you do not upgrade to the latest stable 2.6.0-pl3? Because, any version in any patch level since 2.5.7-pl1 doesnt display shift-jis (japanese) properly - or anyway on my system. They seem to have broken the support for it, since that specific version. / Lars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encoding problems using phpMyAdmin
Just a quick note, this seems to be a bug in phpMyAdmin since 2.5.7-pl1 - I submitted a bug report on the sourceforge website and awaits them to handle it. / Lars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Encoding problems using phpMyAdmin
I seem to have problems getting phpMyAdmin showing shift_jis properly, after upgrading to PHP5 on my FreeBSD box. mySQL is running version 4.1.8. My application works excellent, the problem only exist in phpmyadmin. Anyone ran into this problem before ? I've tried to google for it, but didnt really find anything on it ? I did as a test update the phpmyadmin sourcecode to force shift_jis charset rather than UTF8 which it seems to prefer, to no apparent difference. -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com
Re: [PHP] Re: Fw: Identify which function called another
Is there any way, I from one function can identify which other function called it, without parameter passing the name manually ? I still question whether its correct to design a function which requires this. I thought the idea of encapsulating code inside a function is that its non-dependent/black-boxed still for every rule there is an exception! Need it for my "identify why the hell this error occured, send email to the admins with full debug, server variables, time, pop that into the errorhandling database for cross referencing if it happened before". Practically, yesterday, we spend a few hours tracing a special error occuring extremely seldom and ended up making some crappy debugging on a livesite. Please don't post twice in an hour if you haven't yet received your answer. With that in mind, I have an answer for you. :-) maybe Lars thought his post had disappeared into /dev/null, not altogether strange considering the fluctuating time delays in posts being sent out! then maybe he's an impatient s.o.b ;-) Or maybe Lars has multiple email accounts, and realized he was sending from the wrong one forgetting he had authorized it beforehand. / Lars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fw: Identify which function called another
Is there any way, I from one function can identify which other function called it, without parameter passing the name manually ? In code, something like where I would like to have function c identify if it was called by function a or b -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com
[PHP] Identify which function called another
Is there any way, I from one function can identify which other function called it, without parameter passing the name manually ? In code, something like where I would like to have function c identify if it was called by function a or b -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com
Re: [PHP] $_GET & $_POST simultaneously
Is it just me or ... why on earth would you want to populate both GET and POST arrays through this obscure way of coding ? If you really have a form where you dont have a clue wether your data comes from GET or POST, it should be way less effort to copy one array to another or have a lookup function to return the given value. / Lars - Original Message - From: "Bostjan Skufca @ domenca.com" <[EMAIL PROTECTED]> To: Sent: Tuesday, January 11, 2005 5:42 PM Subject: [PHP] $_GET & $_POST simultaneously Hello, If I create form like this ... both arrays contain appropriate variables when submitted: ::: $_GET ::: Array ( [a] => b ) ::: $_POST ::: Array ( [action] => modify ... ) Now what I am interested in is if this is valid behaviour regarding HTTP specification and if other platforms support this interference of GET and POST variables in request? Thank your for your answers, Bostjan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Super newbie question....
First of all, use Second, you dont need the two lines, write the following to get the space And you should have your nicely formatted name right there / LJ www.ljweb.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Possible to make $$ distributing PHP as Shareware?
If you have any experience with this, kindly enlighten me. In my experience, people aren't going to pay unless they have to. ... and spending money for some application, which more than likely is going to be filtered hard by spam filters, might not be what I want to spend my pennies on -- Lars B. Jensen, Internet Architect CareerCross Japan Japan's premier online career resource for english speaking professionals http://www.careercross.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php