Re: [PHP] Reading files
Hi Chris, You should delete the ; after the while statement because it causes an infinite loop. - Original Message - From: "Chris Blake" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 27, 2003 16:29 Subject: [PHP] Reading files > Greetings... > > When the following runs.. > === > > $handle = fopen ("fopen.txt", "r"); > $date = date("l dS of F Y h:i:s: A"); > >while (!feof ($handle)) ; >{ > $buffer = fgets($handle, 4096); > echo ''. $buffer. ''; > > } >fclose($handle); > ?> > > > .it gives out > > > > Fatal error: Maximum execution time of 30 seconds exceeded in > /home/data/ClientWebs/chrisplay/Things/fopen.php on line 16 > > > I used the example from php.net/fget() and have tried a few changes > based on other stuff I read, but to no avail. > > Line 16 is = " while (!feof ($handle)) ; " > > Suggestions ? > > > -- > Chris Blake > Office : (011) 782-0840 > Cell : 083 985 0379 > It is reported that somewhere in the world, every 15 seconds, a woman > gives birth to a child. She must be found and stopped. > > > -- > 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] gethostbyaddr woes
Hi Eric, You can test the gethostbyaddr function using the following script: It outputs 'mole.phpwebhosting.com' on my system. If it doesn't work the same way for you, then there may be trouble with the phpwebhosting. - Original Message - From: "erich" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 26, 2003 12:50 Subject: [PHP] gethostbyaddr woes > for some reason i cannot retrieve a hostname using gethostbyaddr(). > > if it helps, my host is http://phpwebhosting.com/. i have asked them > countless times if it is something on their end causing this and have > been told that it works for them and i must be doing > something wrong. any suggestions? > > > -- > 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] fopen woes....
Hi Chris, The mode rw is contradictory. You say open the file in the read-only and write-only modes. I think you the append mode(a) is the candidate to solve your problem. Ferhat Can - Original Message - From: "Chris Blake" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 10:55 Subject: [PHP] fopen woes > Greetings, > > According to PHP manual example this is supposed to open a file and > write a line of text to itbut it doesn`t. > === > > > File Open > > > > > $handle = fopen ("/home/data/ClientWebs/chrisplay/Things/fopen.txt", > "rw"); > fwrite($handle, "Hello there!"); > fclose($handle); > > > ?> > > > > > > But my text file is blank..some of the other code samples I looked > at on www.php.net/fopen don`t provide specific help.. > > > -- > Chris Blake > Office : (011) 782-0840 > Cell : 083 985 0379 > It is reported that somewhere in the world, every 15 seconds, a woman > gives birth to a child. She must be found and stopped. > > > -- > 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] Session problem
Thank you for replying Jonathan, I set the session.cookie_domain in php.ini but it didn't work. I have too many session files in my /tmp directory. Everytime I refresh the page a new session file is created unfortunately. Ferhat Can - Original Message - From: "Jonathan Sharp" <[EMAIL PROTECTED]> To: "Ferhat Can" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 6:55 PM Subject: Re: [PHP] Session problem > Sorry... session.cookie_domain in php.ini > > Make sure you can also write to /tmp > > -js > > > Ferhat Can wrote: > > Dear All, > > I have a problem and need your help. I use PHP 4.2.3, Apache 1.3.27 and > > a local version of Red Hat. Here is the problem: I have a web site that > > depends on Session, but the Session ID seems to be regnerated evertime I > > refresh the page. I have tried different versions of PHP with different > > versions of Apache but the problem remained. I am giving some links on > > my server showing my system variables, and the session example given in > > the manual. Here is the link: > > http://linuxserver.pergelcrm.com/system.php > > <http://linuxserver.pergelcrm.com/system.php> > > Thanks in advance for your help. > > > > Ferhat Can > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session problem
Dear All, I have a problem and need your help. I use PHP 4.2.3, Apache 1.3.27 and a local version of Red Hat. Here is the problem: I have a web site that depends on Session, but the Session ID seems to be regnerated evertime I refresh the page. I have tried different versions of PHP with different versions of Apache but the problem remained. I am giving some links on my server showing my system variables, and the session example given in the manual. Here is the link: http://linuxserver.pergelcrm.com/system.php <http://linuxserver.pergelcrm.com/system.php> Thanks in advance for your help. Ferhat Can
Re: [PHP] about forms with php
Hi Meltem, Since you place return false in the onSubmit code, you cannot submit the form to the next page. What you need to do is that check if the email field is empty, if yes return false; if not return true. - Original Message - From: "Meltem Demirkus" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 20, 2002 2:44 PM Subject: [PHP] about forms with php > Hi, > > I want to learn if anyone tried to use both of javasccript and php together > ?Because when I tried to use them like this: > > onSubmit="checkemail(email.value);return false" > > > and when I click submit.. javascript is working but it is not going to the > sign_up_ page ..How can I manage it?.. > > thanks alot.. > by the way , by using javascript , I am checking if the email adress are > written correctly ( '@' ...).. > > thanks > > > meltem > > > -- > 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