[PHP] When are Form Variables Null?
Hi, I've been wondering the behavior of browsers and POST submissions.. basically I'd like to know the behavior of: is_null(), empty(), and isset(). I've found that sometimes when an item is not filled out, the variable is still set on the subsequent page, like $_POST['var'] = ""; What does everyone use to see if forms were submitted correctly? I built my own function: function form_exists($variable) { if (strlen($variable) < 1) { return false; } else { return true; } } It was the only apparent way I could know *for sure* that independent of the browser, I knew what the heck was being submitted. Thoughts? Thanks, Al -- This email was sent with Ximian Evolution. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Run two separate version of Apache and Php
I believe you will need to compile two versions, and point two to different php.ini locations. Here's a snipet from the manual. http://www.php.net/manual/en/install.configure.php#install.configure.options.php Al --enable-maintainer-mode Enable make rules and dependencies not useful (and sometimes confusing) to the casual installer. --with-config-file-path=PATH Sets the path in which to look for php.ini, defaults to PREFIX/lib. --enable-safe-mode Enable safe mode by default. --with-exec-dir[=DIR] Only allow executables in DIR when in safe mode defaults to /usr/local/php/bin. --enable-magic-quotes Enable magic quotes by default. --disable-short-tags Disable the short-form Hello php-general, > > I need to run a separate version of Apache on the same server I also > what to use a different copy of the php.ini file with that version of > apache. I am aware that I can override most of the php.ini settings in > the httpd.conf file. But this is not what I want to do. > Php will be running as a DSO with apache. So is the only way I can do > this is to install a different copy of php to run with this version of > Apache. Or is there a way I can get the httpd.conf file to read a > different copy of php.ini > > > > > -- > Best regards, > rdkurth mailto:[EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- This email was sent with Ximian Evolution. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session Events
Well, since HTTP is stateless you can really say that this event happens in either of two places: - The next page accessed by the user with that session ID - As an event in the backend. If it's the first, I would recommend just having a lib_session that verifies a timer or whatever and then redirects the page or whatever. If it's something in the back-end, like a user accesses a page and you need to do clean up 30 minutes after that user goes inactive, then I recommend that is done in like a database stored procedure. On Mon, 2002-06-24 at 20:37, Joe Krause wrote: > Is there anyway to have PHP execute a function or object method > automatically when a session is expired? In JAVA, you can define an > httpSessionBindingEvent which will notify an object when it is bound to or > unbound from a session. This may be the result of a servlet programmer > explicitly unbinding an attribute from a session, due to a session being > invalidated, or due to a session timing out. I need this behavior in PHP. > > Joe Krause > > > > -- This email was sent with Ximian Evolution. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need Help with $_SESSION.
You must do a session_start() before you can use the session ID or the session array. On Wed, 2002-07-03 at 12:24, Scott Fletcher wrote: > Have not been successful in making this work for 2 days now. I'm focusing > on making the $_SESSION to work on each webpages. The 1st page is the > login. The 2nd page represent the rest of the webpages on a secure side > after logging in. I could use some help in making this work. The $_SESSION > does not work on the 2nd page. Since I can't use the register_global(), so > I don't see how someone claim that it can work without it. I will > appreciate it. > > --clip-- (Page 1) > > odbc_fetch_into($result,$_SESSION,1); > > $salt = strtoupper(md5(uniqid(rand(; > session_id($salt); > session_start(); > header("Location: https://test.whatever/index.php?".SID); > > --clip-- (Page 2) > > print_r($_COOKIE); > print_r($_SESSION); > > --clip-- > > Thanks! > FletchSOD > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- This email was sent with Ximian Evolution. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Apache
I had a problem where I compiled in too many extensions and apache thought the module file was too complicated, and thus corrupt and wouldn't start. On Tue, 2002-07-02 at 14:09, B i g D o g wrote: > Sorry bro...doing to many things at once. > > Apache 1.3.23 > Linux 7.2 > PHP 4.1.2 > > Configuration: > ./configure > --with-apxs=/usr/local/apache/bin/apxs > --with-sybase-ct=/sybase > --with-mysql' '--enable-exif > --with-gd > --with-jpeg-dir=/usr/lib > --with-png-dir=/usr/local/lib > --with-zlib > --with-config-file-path=/etc > --with-freetype-dir=/usr/local/lib > > > My webserver keeps crashing: error log entry > [Tue Jul 2 15:12:07 2002] [error] [client 164.214.4.59] (24)Too many open > files > > I am just wondering if this a php issue or something else... > > > B i g D o G > > > > - Original Message - > From: "Michael Sweeney" <[EMAIL PROTECTED]> > To: "B i g D o g" <[EMAIL PROTECTED]> > Cc: "PHP GEN" <[EMAIL PROTECTED]> > Sent: Tuesday, July 02, 2002 12:04 PM > Subject: Re: [PHP] PHP and Apache > > > > No. Only you. :-) > > > > Platform? Environment? Configuration information? > > > > ..mike.. > > > > On Tue, 2002-07-02 at 11:01, B i g D o g wrote: > > > Has anyone had a problem where PHP created to many open files and > crashed > > > apache? > > > > > > B i g D o g > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- This email was sent with Ximian Evolution. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Development Tools
I've picked up PHPed, Zend IDE, and Dreamweaver MX. - ZendIDE has the best code-completion and editing features out of all of them, best auto-tabs and auto completes. - PHPed is ok, better with database and total MySQL development then Zend IDE. - Dreamweaver MX has limited PHP support but it is far superior on the front end than the other two. If only there were a ZendEd MX, hah. On Thu, 2002-07-11 at 06:33, Richard Lynch wrote: > >I am looking for a good Development tool to write my PHP in and was > >wondering what people are using out there. > > I will confess to not reading the entire thread, and if it was mentioned, I > apologize, but I think ActiveState's Komodo might be worth a try-out. > > The Zend IDE is great for huge projects if it's in your budget. > > My pages are all small and easy (and I like it that way) and I have no > budget :-) > > -- > Like Music? http://l-i-e.com/artists.htm > Off-Topic: What is the moral equivalent of 'cat' in Windows? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- This email was sent with Ximian Evolution. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php