Re: [PHP] A simple PHP form not working
On Tue, 25 Sep 2001 12:56, Tshering Norbu wrote: Hi list, I can not get the form (from thesitewizard) working. When I submit the form, I get this error: Warning: Failed to Connect in c:\Program Files\Apache Group\Apache\htdocs/druknet/feedback/feedbacksend.php on line 2. My PHP conf with Apache has no problem. What am I doing wrong? Sorry, I am a beginner in PHP. Here are 2 php files: feedback.html HTML/BODY FORM method=post action=feedbacksend.php Email: INPUT name=email type=textbr Message:br TEXTAREA name=message /textareabr input type=submit value=Submit /FORM /BODY/HTML feedbacksend.php ?php mail([EMAIL PROTECTED], Feedback Form Results,$message, From: $email); (Location:thankyou.html); ? Line 2 appears to be the mail() function - have you correctly configured the mail section of your php.ini? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Do the joke. Get the laugh. Move on. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] select based on time/date
On Tue, 25 Sep 2001 13:38, Maxim Maletsky \(PHPBeginner.com\) wrote: Don't do it with PHP. Instead use the native functions of mySQL itself. Use the combination of CONCAT(), some string and date functions of mySQL. Something like CONCAT(SUBSTRING(), SUBSTRING(), ...) so you end up in the right time format i.e.: -00-00. With that string you should be able to do time comparisons within mySQL database. In other words, go to mySQL documentation and read there. mySQL will do it way better and faster than PHP. Cheers, Maxim Maletsky PHPBeginner.com -Original Message- From: Jason Dulberg [mailto:[EMAIL PROTECTED]] Sent: martedì 25 settembre 2001 5.47 To: [EMAIL PROTECTED] Subject: [PHP] select based on time/date I am using sessions on my site and have noticed that people often don't click the logout button -- something which I need them to do in order to clear their session from the db and update some site stats. In the sessions table, I have a field $timein (in format F j, Y, g:i a) that gets added when the user logs in and a $timeout field that gets added when they hit logout. Basically, what I've been thinking of doing is using cron to run a php script every hour or so that will search the table for sessions with no $timeout field and $timein is more than X number of minutes old. My problem is that since I'm using the F j, Y, g:i a date/time format, how would I make the mysql select? Do I have to explode the $timein field? Any suggestions are appreciated. __ Jason Dulberg Extreme MTB http://extreme.nas.net And, as someone recently pointed out in response to a similar suggestion I made, there is a mysql DATE_FORMAT function that will do the same thing without the CONCATS. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA For every vision there is an equal and opposite revision. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] imageJPEG problem.
When trying to use a simple code like this below i receive an error which says that it cant find the header. ? Header(Content-type: image/jpeg); $im = imagecreatefromjpeg(./test.jpg); Imagejpeg($im,'',20); ImageDestroy($im); ? It outputs the information in ascii and binary code. it doesn't show the picture Thanks for all the help you can give me. //Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Receiving mySQL result from remote server?
Yes you can. It depends if you have a user name and password and access to access abc.com's MySql server, remember you do this: ? $db_name = newsdatabase; $db_uname= username; $db_upass= password; $db_host = abc.com; $conn = mysql_connect($db_host, $db_uname, $db_upass); mysql_select_db($db_name); ? see? try http://freesql.org (it is a free mysql database provider!;)) Jeff Lewis [EMAIL PROTECTED] wrote in message 010301c14508$864c8060$[EMAIL PROTECTED]">news:010301c14508$864c8060$[EMAIL PROTECTED]... Is it possible to have a script at xyz.com retrieve data from a mySQL database on abc.com? Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] imageJPEG problem.
- Original Message - From: Johan Vikerskog (EMP) [EMAIL PROTECTED] To: 'Stefan Rusterholz' [EMAIL PROTECTED]; Johan Vikerskog (EMP) [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 9:07 AM Subject: RE: [PHP] imageJPEG problem. Thanks for your answer but the problem remains. It says i allready have given the header information and everything comes out in ascii. file://Johan -Original Message- From: Stefan Rusterholz [mailto:[EMAIL PROTECTED]] Sent: den 25 september 2001 08:55 To: Johan Vikerskog (EMP); [EMAIL PROTECTED] Subject: Re: [PHP] imageJPEG problem. - Original Message - From: Johan Vikerskog (EMP) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 8:47 AM Subject: [PHP] imageJPEG problem. When trying to use a simple code like this below i receive an error which says that it cant find the header. ? Header(Content-type: image/jpeg); I don't know about the other stuff of your script, but when I wrote a similar script, I took content-type: image/jpg and not 'jpeg'. Probably that's the point... $im = imagecreatefromjpeg(./test.jpg); Imagejpeg($im,'',20); ImageDestroy($im); ? It outputs the information in ascii and binary code. it doesn't show the picture Thanks for all the help you can give me. file://Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] make sure you run the php-part at the very top of the file: ?php header(...); ? HTML HEAD ...and so on if you have output before you execute the php part, your webserver will generate the header for you and then it is impossible to send another header (exactly because of what the warning tells you: the headers are already sent - but by the server and not by you and the server normally assumes text/html or text/plain). I hope, it helps regards Stefan Rusterholz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle
Andrew Hill, I would like to thank you very much for your help. I manage to connect to remote oracle after a week try. The problem was I run apache as nobody and nobody user does not have priviliege to access ~oracle directory. Now I can continue with my project.. :) Jeffrey Iskandar Ahmad System Engineer Technology Division TIME dotNet -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Monday, September 24, 2001 9:38 PM To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED] Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle Jeffrey, Ensure your ORACLE_SID is also set. This is a case of Oracle environment variables. Log in as the oracle user and look at the output of an 'env'. You are missing something there. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]] Sent: Monday, September 24, 2001 1:04 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle I have reinstalled but still cannot work. How i compile: ./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs \ --with-ldap=/home/jeffrey/download/directory/install --with-oci8=/home/oracl e Apache server stop and started. Im using redhat 7. Oracle 8i installed as programmer, apache_1.3.14. Remote oracle server version is 8.0.5 My bash env as below: ORACLE_HOME=/home/oracle TNS_ADMIN=$ORACLE_HOME/network/admin PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib ORA_NLS33=/home/oracle/ocommon/nls/admin/data my php content: putenv('TNS_ADMIN=/home/oracle/network/admin'); putenv(ORACLE_HOME=/home/oracle); $db = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = patin)(PORT = 1521)) ) (CONNECT_DATA = (SID = I32) ) ); $c1 = ocilogon(ims,ims,$db); if ($c1 == false){ echo OCIError($c1).; } else { echo success; } I still get the same error OCISessionBegin: Error while trying to retrieve text for error ORA-03106 meening : fatal two-task communication protocol error) I have tested using sqlplus(same php server) connect to remote server, there is no problem. Do you have sample configuration how to do it.. please.. :) Jeffrey Iskandar Ahmad System Engineer Technology Division TIME dotNet -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 11:31 PM To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED] Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle Ensure that this is sent in the envrionment before compiling php and starting apache as well. Cheers, Andrew -Original Message- From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 11:50 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle I did but didnt work. Jeffrey Iskandar Ahmad System Engineer Technology Division TIME dotNet -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 9:09 PM To: Jeffrey Iskandar Ahmad; [EMAIL PROTECTED] Subject: RE: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle Jeffrey, Set your ORACLE_HOME environment variable. putenv(ORACLE_HOME=/path/to/oracle/home/dir); etc. HTH Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Jeffrey Iskandar Ahmad [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 5:47 AM To: [EMAIL PROTECTED] Subject: [PHP] installing PHP with-apxs with-oci8 --with-oracle onLinux - remote oracle I cannot connect to remote oracle database. I get the error below. OCISessionBegin: Error while trying to retrieve text for error ORA-03106 (meening : fatal two-task communication protocol error) My env is all correct. My test.php: $db = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = patin)(PORT = 1521)) ) (CONNECT_DATA = (SID = I32) ) ); $c1 = ocilogon(ims,ims,$db); if ($c1 == false){ echo OCIError($c1).; exit; } else { echo success; } Jeffrey Iskandar Ahmad System Engineer Technology Division TIME dotNet --
Re: [PHP] imageJPEG problem.
Stephan, Check that there are no html statements or blank lines above the ?php line. I had a few blank lines in my first program, and it gave me the same error message. Hugh - Original Message - From: Stefan Rusterholz [EMAIL PROTECTED] To: Johan Vikerskog (EMP) [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 12:13 AM Subject: Re: [PHP] imageJPEG problem. - Original Message - From: Johan Vikerskog (EMP) [EMAIL PROTECTED] To: 'Stefan Rusterholz' [EMAIL PROTECTED]; Johan Vikerskog (EMP) [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 9:07 AM Subject: RE: [PHP] imageJPEG problem. Thanks for your answer but the problem remains. It says i allready have given the header information and everything comes out in ascii. file://Johan -Original Message- From: Stefan Rusterholz [mailto:[EMAIL PROTECTED]] Sent: den 25 september 2001 08:55 To: Johan Vikerskog (EMP); [EMAIL PROTECTED] Subject: Re: [PHP] imageJPEG problem. - Original Message - From: Johan Vikerskog (EMP) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 8:47 AM Subject: [PHP] imageJPEG problem. When trying to use a simple code like this below i receive an error which says that it cant find the header. ? Header(Content-type: image/jpeg); I don't know about the other stuff of your script, but when I wrote a similar script, I took content-type: image/jpg and not 'jpeg'. Probably that's the point... $im = imagecreatefromjpeg(./test.jpg); Imagejpeg($im,'',20); ImageDestroy($im); ? It outputs the information in ascii and binary code. it doesn't show the picture Thanks for all the help you can give me. file://Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] make sure you run the php-part at the very top of the file: ?php header(...); ? HTML HEAD ...and so on if you have output before you execute the php part, your webserver will generate the header for you and then it is impossible to send another header (exactly because of what the warning tells you: the headers are already sent - but by the server and not by you and the server normally assumes text/html or text/plain). I hope, it helps regards Stefan Rusterholz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Including files without loosing my string
Hello ! I am trying to keep my string after including av file. file1.php: (accessed with file1.php?id=1) ?php include 'index.php'; function func() { echo buddy; } ? index.php: ?php echo Hello; if (function_exists('func')) { call_user_func ('func'); } The output should then be Hello buddy; Can anyone help me with this one ?? Regards Bård Tommy Nilsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem with regex
if (ereg('^[a-z][-a-z0-9\._]*[a-z]$', $TestPwd)) { echo Good; } else { echo Bad password $TestPwd; } should do it. If you want a case insensitive match, use eregi(...) instead. The above regexp allows passwords as short as 2 characters. If you want to, for example, enforce a password length of 4 to 8 characters, you can do: ereg('^[a-z][-a-z0-9\._]{2,6}[a-z]$', $TestPwd) See http://php.he.net/manual/en/function.ereg.php for more info. -steve At 5:55 PM -0700 9/24/01, Oliver Ertl wrote: Hi, I need a regex for a username validation. The ereg function should be used. o the username must start and end with a-z o in the middle it could be a-z0-9\.-_ o and never something like this -- -. _- and so on Thanks for your help Oliver = mailto: [EMAIL PROTECTED] www.ertl.co.za __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com -- + Open source questions? + | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +--- http://pgfsun.ucdavis.edu/open-source-tools.html ---+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] imageJPEG problem.
Whooops, right. HTML after or before picture data doesn't make any sense :) I checked my a bit older function, which puts out image data correctly working. I'm sorry, but I didn't see a big difference to yours... But as I said before: I don't know what your doing at that lines where you wrote: $im = imagecreatefromjpeg(./test.jpg); Imagejpeg($im,'',20); ImageDestroy($im); If I was you, I would try to open and read a valid jpeg file, just for testing, if the output works. If it works, I'd search the error in that lines written above. Here a snippet from my routine (and now I see: header really has to be image/jpeg, I must have been a little tired): require(../protected/php_db_access.inc); mysql_select_db('mydb'); $picture_types=array(jpg = image/jpeg, gif = image/gif, png = image/png); $result=mysql_query(SELECT type,picture FROM $table[pictures] WHERE id='$pic_id'); $img_data=mysql_fetch_array($result); $mime=$picture_types[$img_data['type']]; $img_bin=$img_data['image']; header(Content-type: $mime); echo $image; I know that the routine could be written better, but I think I wrote it in a hurry when I wrote it :) Perhaps you can do something with that routine (it works fine on a linux machine)... regards stefan rusterholz - Original Message - From: Hugh Danaher [EMAIL PROTECTED] To: Stefan Rusterholz [EMAIL PROTECTED] Cc: Php-General [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 9:33 AM Subject: Re: [PHP] imageJPEG problem. Stephan, Check that there are no html statements or blank lines above the ?php line. I had a few blank lines in my first program, and it gave me the same error message. Hugh - Original Message - From: Stefan Rusterholz [EMAIL PROTECTED] To: Johan Vikerskog (EMP) [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 12:13 AM Subject: Re: [PHP] imageJPEG problem. - Original Message - From: Johan Vikerskog (EMP) [EMAIL PROTECTED] To: 'Stefan Rusterholz' [EMAIL PROTECTED]; Johan Vikerskog (EMP) [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 9:07 AM Subject: RE: [PHP] imageJPEG problem. Thanks for your answer but the problem remains. It says i allready have given the header information and everything comes out in ascii. file://Johan -Original Message- From: Stefan Rusterholz [mailto:[EMAIL PROTECTED]] Sent: den 25 september 2001 08:55 To: Johan Vikerskog (EMP); [EMAIL PROTECTED] Subject: Re: [PHP] imageJPEG problem. - Original Message - From: Johan Vikerskog (EMP) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 8:47 AM Subject: [PHP] imageJPEG problem. When trying to use a simple code like this below i receive an error which says that it cant find the header. ? Header(Content-type: image/jpeg); I don't know about the other stuff of your script, but when I wrote a similar script, I took content-type: image/jpg and not 'jpeg'. Probably that's the point... $im = imagecreatefromjpeg(./test.jpg); Imagejpeg($im,'',20); ImageDestroy($im); ? It outputs the information in ascii and binary code. it doesn't show the picture Thanks for all the help you can give me. file://Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] make sure you run the php-part at the very top of the file: ?php header(...); ? HTML HEAD ...and so on if you have output before you execute the php part, your webserver will generate the header for you and then it is impossible to send another header (exactly because of what the warning tells you: the headers are already sent - but by the server and not by you and the server normally assumes text/html or text/plain). I hope, it helps regards Stefan Rusterholz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] I'm back
Oh well, who didn't know me can whether ignore this message or just say hi :-) Cheers Everybody! Maxim Maletsky Welcome back Max M@ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Including files without loosing my string
On Tue, 25 Sep 2001 17:01, Bård Tommy Nilsen wrote: Hello ! I am trying to keep my string after including av file. file1.php: (accessed with file1.php?id=1) ?php include 'index.php'; function func() { echo buddy; } ? index.php: ?php echo Hello; if (function_exists('func')) { call_user_func ('func'); } The output should then be Hello buddy; Can anyone help me with this one ?? Regards Bård Tommy Nilsen In most languages, you must declare a function _before_ calling it. In your case, your program looks like this after the include: ?php // include 'index.php'; echo Hello; if (function_exists('func')) { call_user_func ('func'); } function func() { echo buddy; } So you have no function at the time you test for it :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Useless Invention: Rollerblade skates for peglegs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
SV: [PHP] Including files without loosing my string
Thats only if i call the index.php file first. For that i have another solution if (function_exists('func')) { call_user_func ('func'); } else { include 'main.php'; But thats not the problem. I am using id in an sql query, but not shown in my example (sorry :) ) But i wanted to show what i am after, and that is that the id string cant be called after including index.php ... Bård Tommy Nilsen -Opprinnelig melding- Fra: David Robley [mailto:[EMAIL PROTECTED]] Sendt: 25. september 2001 09:56 Til: Bård Tommy Nilsen; [EMAIL PROTECTED] Emne: Re: [PHP] Including files without loosing my string On Tue, 25 Sep 2001 17:01, Bård Tommy Nilsen wrote: Hello ! I am trying to keep my string after including av file. file1.php: (accessed with file1.php?id=1) ?php include 'index.php'; function func() { echo buddy; } ? index.php: ?php echo Hello; if (function_exists('func')) { call_user_func ('func'); } The output should then be Hello buddy; Can anyone help me with this one ?? Regards Bård Tommy Nilsen In most languages, you must declare a function _before_ calling it. In your case, your program looks like this after the include: ?php // include 'index.php'; echo Hello; if (function_exists('func')) { call_user_func ('func'); } function func() { echo buddy; } So you have no function at the time you test for it :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Useless Invention: Rollerblade skates for peglegs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: SV: [PHP] Including files without loosing my string
On Tue, 25 Sep 2001 17:32, Bård Tommy Nilsen wrote: Thats only if i call the index.php file first. For that i have another solution if (function_exists('func')) { call_user_func ('func'); } else { include 'main.php'; But thats not the problem. I am using id in an sql query, but not shown in my example (sorry :) ) But i wanted to show what i am after, and that is that the id string cant be called after including index.php ... Bård Tommy Nilsen If you want to access id, you know that it is available as $id; but if you want it accessible within the function, you either have to pass it to the function as a parameter or delcare it as global within the function. -Opprinnelig melding- Fra: David Robley [mailto:[EMAIL PROTECTED]] Sendt: 25. september 2001 09:56 Til: Bård Tommy Nilsen; [EMAIL PROTECTED] Emne: Re: [PHP] Including files without loosing my string On Tue, 25 Sep 2001 17:01, Bård Tommy Nilsen wrote: Hello ! I am trying to keep my string after including av file. file1.php: (accessed with file1.php?id=1) ?php include 'index.php'; function func() { echo buddy; } ? index.php: ?php echo Hello; if (function_exists('func')) { call_user_func ('func'); } The output should then be Hello buddy; Can anyone help me with this one ?? Regards Bård Tommy Nilsen In most languages, you must declare a function _before_ calling it. In your case, your program looks like this after the include: ?php // include 'index.php'; echo Hello; if (function_exists('func')) { call_user_func ('func'); } function func() { echo buddy; } So you have no function at the time you test for it :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Useless Invention: Rollerblade skates for peglegs. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Unto thee, Jesus said verily. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] search engine submission
Hi, I have a website which i would like to submit to the search engines frequently, so i thought i could write a program for this, not depending on other free web sites for submission Rgds Krushna Kumar - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'Krushna Kumar R' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, September 24, 2001 7:36 PM Subject: RE: [PHP] search engine submission You can find this code all over the web, an example of it can be seen at most search engines on the Add a URL page :-) What are you trying to do? Cheers Jon -Original Message- From: Krushna Kumar R [mailto:[EMAIL PROTECTED]] Sent: 24 September 2001 15:08 To: [EMAIL PROTECTED] Subject: [PHP] search engine submission Hi, Can someone help me by where i could get some free code for search engine submission Regards Krushna Kumar ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: array
I can't see where any element of $link is set in the second piece of code. I assume they are separate examples. In the second example I would expect $link[$c] to always be empty. Tim Ward -- From: Jeremy Morano [SMTP:[EMAIL PROTECTED]] Sent: 24 September 2001 16:23 To: [EMAIL PROTECTED] Subject: array Hello everyone. I'm encountering difficulties using my arrays. while ($row = mysql_fetch_array($result)) { $link[$c] = $row['link']; $c = $c + 1; } This is where I try using it. while ($row = mysql_fetch_array($result)) { $date = $row['date']; $path = $row['path']; $entry_name = $row['entry_name']; $company_name = $row['company_name']; $file = basename ($path); while ($c = 0) { echo $link[$c]; if($file == $link[$c]) { $file = This is new; } $c = $c -1; } $contact_list2 .= $date $file $entry_name $company_name\n; } Comment: Theecho $link[$c] works fine. It displays what it should. However the if statement does not because $file and $link[$c] are equal on several occasions yet the content of $file doesn't change... Thank You. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
SV: SV: [PHP] Including files without loosing my string
Can you write me an short example ?? Bård Tommy Nilsen -Opprinnelig melding- Fra: David Robley [mailto:[EMAIL PROTECTED]] Sendt: 25. september 2001 10:11 Til: Bård Tommy Nilsen; [EMAIL PROTECTED] Emne: Re: SV: [PHP] Including files without loosing my string On Tue, 25 Sep 2001 17:32, Bård Tommy Nilsen wrote: Thats only if i call the index.php file first. For that i have another solution if (function_exists('func')) { call_user_func ('func'); } else { include 'main.php'; But thats not the problem. I am using id in an sql query, but not shown in my example (sorry :) ) But i wanted to show what i am after, and that is that the id string cant be called after including index.php ... Bård Tommy Nilsen If you want to access id, you know that it is available as $id; but if you want it accessible within the function, you either have to pass it to the function as a parameter or delcare it as global within the function. -Opprinnelig melding- Fra: David Robley [mailto:[EMAIL PROTECTED]] Sendt: 25. september 2001 09:56 Til: Bård Tommy Nilsen; [EMAIL PROTECTED] Emne: Re: [PHP] Including files without loosing my string On Tue, 25 Sep 2001 17:01, Bård Tommy Nilsen wrote: Hello ! I am trying to keep my string after including av file. file1.php: (accessed with file1.php?id=1) ?php include 'index.php'; function func() { echo buddy; } ? index.php: ?php echo Hello; if (function_exists('func')) { call_user_func ('func'); } The output should then be Hello buddy; Can anyone help me with this one ?? Regards Bård Tommy Nilsen In most languages, you must declare a function _before_ calling it. In your case, your program looks like this after the include: ?php // include 'index.php'; echo Hello; if (function_exists('func')) { call_user_func ('func'); } function func() { echo buddy; } So you have no function at the time you test for it :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Useless Invention: Rollerblade skates for peglegs. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Unto thee, Jesus said verily. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] next maintenance release?
PHP 4.0.6 has been out for 3 months now. Any word on the next update? -- Eugene Lee [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Feature?
After some days spent in a hospital reading Programming Perl and Oracle Web Applications I found that a language construct which appears in Perl and PL/SQL is not available in PHP. As in most 3G languages function call is like that $bar=foo($bar1,$bar2,$bar3,'bar4'); function foo($par1=1,$par2=2,$par3=3,$par4='foo_bar',...){ ... } In the case when I've few parameters I've to remember their order, so why not $bar=foo('par2'=10); I want to pass value to only one or more but not to all params. Also this will make the code clearer I think. Comments are welcome! Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A simple PHP form not working
Is this the correct mail function config in php.ini ? [mail function] SMTP = smtp01.druk.net.bt ;for win32 only sendmail_from = [EMAIL PROTECTED] ;for win32 only ;sendmail_path = ;for unix only, may supply arguments as well (default is sendmail -t) Here, I have smtp01.druk.net.bt as my SMTP server which exsits and [EMAIL PROTECTED] as my own just to test. I tried those and still no luck -:) Thank you david. NORBU - Original Message - From: David Robley [EMAIL PROTECTED] To: Tshering Norbu [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 12:32 PM Subject: Re: [PHP] A simple PHP form not working On Tue, 25 Sep 2001 12:56, Tshering Norbu wrote: Hi list, I can not get the form (from thesitewizard) working. When I submit the form, I get this error: Warning: Failed to Connect in c:\Program Files\Apache Group\Apache\htdocs/druknet/feedback/feedbacksend.php on line 2. My PHP conf with Apache has no problem. What am I doing wrong? Sorry, I am a beginner in PHP. Here are 2 php files: feedback.html HTML/BODY FORM method=post action=feedbacksend.php Email: INPUT name=email type=textbr Message:br TEXTAREA name=message /textareabr input type=submit value=Submit /FORM /BODY/HTML feedbacksend.php ?php mail([EMAIL PROTECTED], Feedback Form Results,$message, From: $email); (Location:thankyou.html); ? Line 2 appears to be the mail() function - have you correctly configured the mail section of your php.ini? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Do the joke. Get the laugh. Move on. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mysql_fetch_array() doesn't work
System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98 ? .. .. $res=mysql_query($query); $num=mysql_num_rows($res); for($i=0; $i$num; $i++){ $arr=mysql_fetch_array($res); ... } ... When PHP is running at the line: $arr=mysql_fetch_array($res); The IE always show info as below: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\program files\apache group\apache\...\page.php on line ... What's the problem wiht mysql_fetch_array() or other? Thanks! Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] html encode
Is there a function available that will convert any none standard chars ($,@,,%,etc) into their quot; equivalents? Thanks all Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] curl_exec() output and curl_setopt( CURL_CERTIFICATE, $path )
1. How to redirect curl_exec() output to a variable without passing it thru a file? 2. Is there a way to use CRT certificates with cURL [curl_setopt( CURL_CERTIFICATE, $path ) ]? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] html encode
Original message From: Mark B [EMAIL PROTECTED] Date: Tue, Sep 25, 2001 at 10:07:36AM +0100 Message-ID: [EMAIL PROTECTED] Subject: [PHP] html encode Is there a function available that will convert any none standard chars ($,@,,%,etc) into their quot; equivalents? Thanks all Mark /Original message Reply Check the manual first in the future: http://www.php.net/manual/en/function.htmlentities.php Good luck! /Reply -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Sessions just don't work on my machine. (Trying this ag ain)
On Monday 24 September 2001 21:23, Thomas Deliduka wrote: I just tried this here below. Before trying this I changed any called to $PHPSESSID to session_id(). I turned off cookies Loaded the page... Created session id and file: sess_44074d3a54862b480c3407c9eb373f77 Contents: var1|s:8:My var 1;var2|s:8:My var 2; I submitted the form: If you used the yesterday's code, then you it really doesn't work with turned off cookies. You have to pass the SID from page to page in order to keep the session: FORM ACTION=index2.php??=SID? METHOD=POST PHPsessionid shows up as: 2f633e17c6752342d0c1e7e6191b4112 New file with same name contents: var3|s:8:My Var 3; I removed index2.php and went back to the first file. PHP SessID shows up as 68b482365d9086068edfa3e35d8dd41d Corresponding file with contents: var1|s:8:My var 1;var2|s:8:My var 2; [..] But it's clear to me that each time session_start() is called, it doesn't open the existing session rather it creates a new one. If you just removed all things from the url, even the session id then it's not strange that php created a new session. Sessions works this way. If session_start() can't find a session id then start a new session, otherwise it reopens the old one, and creates the variables that's been stored previuosly. When I click the 'try this link' instead when starting over. It still creates a new session ID on the server. It's really strange, and does the same for me on you server for the first page loading. When I reload the page again (with the old session id, not the newly created) the variables are read properly from the session (var1, var2), and are shown on the page. Somehow it doesn't work on the first page load, but works later. Sorry I can't think of any other thing, but please let me know if something works, or changes. Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Capturing several checkbox values
Hi, I have a page containing about 50 different checkboxes, the user can select as few or many as they like. When they submit the form I want the values/names of the checkboxes that they selected to be displayed on the next page, i.e. a thankyou page. Any help is much appreciated. JD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Capturing several checkbox values
input type=checkbox name=mycheck[] value=value1 input type=checkbox name=mycheck[] value=value2 input type=checkbox name=mycheck[] value=value3 Now you get an array called mycheck. Manipulate this array in php. Remeber that only checked items are set in array. That means if 2 checkboxes are checked you 'll get an array with 2 positions. Suppose that 1st and 3rd checkboxes are checked. - Original Message - From: John Day [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 12:30 PM Subject: [PHP] Capturing several checkbox values Hi, I have a page containing about 50 different checkboxes, the user can select as few or many as they like. When they submit the form I want the values/names of the checkboxes that they selected to be displayed on the next page, i.e. a thankyou page. Any help is much appreciated. JD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Feature?
On Tue, Sep 25, 2001 at 11:36:25AM +0300, Andrey Hristov wrote: : : After some days spent in a hospital reading Programming Perl and : Oracle Web Applications I found that a language construct which : appears in Perl and PL/SQL is not available in PHP. : As in most 3G languages function call is like that : $bar=foo($bar1,$bar2,$bar3,'bar4'); : : function foo($par1=1,$par2=2,$par3=3,$par4='foo_bar',...){ : ... : } : In the case when I've few parameters I've to remember their order, so why not : $bar=foo('par2'=10); : I want to pass value to only one or more but not to all params. Also : this will make the code clearer I think. AFAIK, Perl doesn't support named parameters (it's listed for Perl 6). Since C does not support this, almost all C-like languages also do not support this. The only exception I know of is Objective-C, which is the base language for Apple's new Unix-based Mac OS X. As for PHP supporting named parameters, it seems silly to preserve C's use of parentheses. Why not do something more radical like Objective-C that draws from Smalltalk syntax: $bar = [foo par2:10] -- Eugene Lee [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Making session last
Martin wrote: The sessions-functions works really fine. But I got one Problem: How can I make the php-session last more then a browser-session? When the users Now it isn't a 'session' for nothing, for your use I guess cookies and storage of state in database is a much better thing. to make a valid example just put an unique string in a cookie and store the user settings in the database (or file system in cause you're silly enough not to use a database ;) and then just fetch them when the user enters the page and the cookie exists. -- PHP Developer, home: http://www.moijk.net | work: http://www.coretrek.com rawurldecode: Decode URL-encoded strings | http://www.php.net/manual/en/function.rawurldecode.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with regex
Hi, The following works. But I wouldn't allow users to use something like -. --- _- in $TestPwd. How can I implement this ? --- Steve Edberg [EMAIL PROTECTED] wrote: if (ereg('^[a-z][-a-z0-9\._]*[a-z]$', $TestPwd)) { echo Good; } else { echo Bad password $TestPwd; } = mailto: [EMAIL PROTECTED] www.ertl.co.za __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] class name in static functions
HI!!! Is it possible to get the name of the class from a static member function for which no object has been instantiated? THANKS! James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to make the php page always newest when clicking 'back' botton in browser?
On Tue, 25 Sep 2001 13:09, mydata wrote: Hi,I meet a problem when I am developing. I am developing php base on other programer's php code . I must make the php page always newest when clicking 'back' botton in browser(because that programer using javascript: history.go(-1)), I try sent header() to disable cach,but seems to not works: my development show below: I have two page: page1 and page2 , on page1 I have a form which used to send parameter to page2, when I submit this form ,the URL change to page2 ,page2 use php code to deal with parameter and date submitted by form on page1 , then page use javascript: history.go(-1) to return page1 . and page1 must show newest information . I think it maybe not php questtion ,maybe I shoud insert some javascript code into page1 somewhere,but I don't know what to . Could somebody help me , thank you very much. You're welcome. // Function to disable caching of individual page function Congo_nocache() { $dateHeader=time(); $expHeader=$dateHeader-60; // set expire date for 60 seconds ago $modHeader=$dateHeader-3600; // set modified date for an hour ago header(Date: . gmdate(D, d M Y H:i:s,$dateHeader). GMT); // Current Date header(Cache-Control: no-cache, must-revalidate); // HTTP/1.1 header(Expires: . gmdate(D, d M Y H:i:s,$expHeader). GMT); // Date in the past header(Last-Modified: . gmdate(D, d M Y H:i:s,$modHeader). GMT); // always modified header(Pragma: no-cache); // HTTP/1.0 } Sorry about the formatting (or lack of it :-) Happy trails, -- Brad Hubbard Congo Systems 12 Northgate Drive, Thomastown, Victoria, Australia 3074 Email: [EMAIL PROTECTED] Ph: +61-3-94645981 Fax: +61-3-94645982 Mob: +61-419107559 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] class name in static functions
Set internal member variable $class_name='CSomeClass'; The call is for example print CSomeClass::class_name; I'm not sure whether this works 100% but I think it works. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: James Gregory [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 26, 2001 3:56 AM Subject: [PHP] class name in static functions HI!!! Is it possible to get the name of the class from a static member function for which no object has been instantiated? THANKS! James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to increase number of supported servers?
Notice: Jay´s reply to my post yesterday was only a little mistake while asking his own different question (he corrected this immediatly reposting his message as thread '[PHP] what does this mean?' and got some answers). So keep in mind plaese, the original question '... number of supported servers' still fills my heads space... ;) Thanks for your attention again. I´m keep on trying to figure out a solution meanwhile looking into the code. --Buchholz what does this mean? Warning: Cannot use a scalar value as an array I look at the line that is causing the warning and it's this: $errorMsg[error] = ; thanks, jay [EMAIL PROTECTED] wrote: PHP 3.0.18 stops working after i add over 125 virtual hosts in my httpd.conf file. PHP 4.0.6 still working. After reaching this limit PHP3 completely stopps delivering pages. Searching the archives i recognized, that nearly the same problem was reported on http://bugs.php.net, reading Bug Id #5316 and #6842. Im running Apache 1.3.20 with PHP 4.0.6 and PHP 3.0.18 on Solaris 2.7 Unfortunatly i can´t stop serving PHP3 at this moment, so i really need for a solution to break through this PHP3 limitation. In addition it seems, that PHP4 (at laest after the 4.0.3pl1 release) hasn´t the problem or has a higher limit level. Question 1: Any chance to configure/patch PHP3 to support more than 255 file handles? (equal to support more than 125 virtual servers in my production environment)? Question 2: Is the problem reported in the two bug reports above solved in PHP 4.0.6? Or is it pushed to a later appearance by optimising file handle consumption? Any one out there who knows more about this? Any hints? Thanks in advance. --Buchholz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Job wanted
Hi all, I am Karthick, from Ireland. I recently got laid off and looking for a job, anywhere in Europe. The Job market is so bad that I haven't got any solid responses, so far. It has been more than 2 weeks that I started looking for a job. But no luck, so far. I am hereby attaching my Resume' with this email, and if you come across any jobs in PHP/MySQL, pls. let me know. Thanks in adv. Karthick +353 87 7928230 My Resume: Resume of T.V. KARTHICK KUMAR # 3, Granby Row Apartment 4 Dublin 1 Republic of Ireland Phone # (353) 87 7928230 (Mobile) E-mail: [EMAIL PROTECTED] Homepage: http://www.karthicktv.com Objective: To obtain a Challenging position in the World Wide Web Development. Qualification: B.A. English Literature (1993-96) in Sourashtra College, Madurai Additional Qualification: National Institute of Information Technology (NIIT) Honors Diploma in Systems Management GNIIT. Professional Work Experience: More than four years of work experience in various capacities in the information technology and at present working as a Web Developer in VoxPilot Ltd, Dublin, Ireland. Work Experience: 1. From 17-02-97 to 31-11-97 - in Sri Chakra Computers, Madurai Designation: Programmer 2. From 01-12-97 to 05-03-98 - in Webworld, Madurai Designation: Programmer 3. From 06-04-98 to 25-03-99 - in Pioneer Internet Pvt Ltd, Madurai Designation: Programmer 4. From 31-03-99 to 20-03-2000 - in Aspire Systems, Chennai, India Designation: Programmer 5. From 22-03-2000 to 22-11-2000 - in SSI-BizNet.com, Chennai, India Designation: Programmer 6. From 29-11-2000 to Till date - in VoxPilot Ltd, Dublin, Ireland Designation: Application Developer Area of Interest Programming in PHP (Hypertext Preprocessor) with MySQL, Oracle Programming in ASP / CGI / Perl / Miva / Java Technical Expertise Operating Systems: Linux / Unix, Windows NT, Windows 95 98, MS-Dos Languages: ASP, Java, C++, C, Cobol Others: Focus 4GL, Dbase III Plus, Professional Write, Foxpro, VP-Planner, MS-Office 2000, Lotus 1-2-3, Ms-Excel , Perforce (version control system), Oracle 8.0, APT (Application Productivity Tool) DB-Library, Forms 4.5, Reports 3.1, Javascript, Dhtml, Visual Interdev Database: Ms SQL, MySQL, PostgreSQL, Ms Access Web design Pieces: http://www.maduraionline.com http://www.ramanathapuramonline.com http://www.dindigulonline.com http://www.dublin-indians.org PROJECT DETAILS TUTTiCOM Ltd Name: Invites Section Tool / Language: PHP 3.0 Tool Used: Javascript Platform: Redhat Linux Duration: 03rd Dec 2000 30th August 2001 Description: This project is for the TUTTiCOM Ltd, through which the customers can interact with their members, friends, relatives and colleagues over the web. Its a part of the Web based contact management software, which includes features like News, Address book, Path Tracker etc. SSI BizNet.com Name: Components in ASP Language: ASP Database: Ms Access, Ms SQL Tool Used: Javascript Platform: Windows NT Duration: 25th March 2000 20th November 2000 Description: This project is of B2B Portals category. There are some components in the B2B Portals through which a specific Community people can make their business over the Internet. Those components includes features like Discussion Forum, Polling, Classifieds etc. SSI BizNet.com Name: Components in PHP Language: PHP 4.0 Database: mySQL Tool Used: Javascript Platform: Windows NT / Linux Duration: 25th March 2000 20th November 2000 Description: This project is of B2B Portals category. There are some components in the B2B Portals through which a specific Community people can make their business over the Internet. Aspire Systems Name: Fourcorners Client: Fourcorners Trading Co. (http://www.fourcornersusa.com) Platform: Linux (Redhat Distribution) Duration: 2nd of January 2000 18th March 2000 Description: This project is for the Fourcorners Trading company who are involved in manufacturing of Duvet covers, Pillow Shams Bed Skirts. There are around 80 products on this shopping mall and the products are listed by material type like Villa, Valios, Linen, Cotton, Silk, Silk Route etc. The features / customization includes: Wholesale + Retail interface, Gift Note Area, Color of the Product, Quantity in Basket Aspire Systems Name: Virtual Notice Board Client: Adapting Inc. Valencia, Spain Tool Used: ASP, Javascript Visual Interdev Database: MS Access Platform: Windows NT Duration: 2nd October 1999 30th December 1999 Description: · A complete bulletin board interface consisting of user level as well as Admin level interface · An effective and user friendly interface to manage the message listings Aspire Systems Name: Boliviamall Organisation: Aspire Systems, India Client: Boliviamall (http://www.boliviamall.com) Tool Used: Miva / Javascript Platform: Linux (Redhat Distribution) Duration:
Re: [PHP] Feature?
Yeap, I know that. I thought about this bit of hack but this breaks the conception on giving parameters. Also this trick cannot solve the problem with default parameters. If I have function with 5 params and all of them have default values and I want to pass value only to the second parameter what I have to do? Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 1:14 PM Subject: Re: [PHP] Feature? On Tue, 25 Sep 2001 11:36:25 +0300, you wrote: In the case when I've few parameters I've to remember their order, so why not $bar=foo('par2'=10); I want to pass value to only one or more but not to all params. Also this will make the code clearer I think. Comments are welcome! ?php function foo($p) { echo $p['fred'] . $p['banana']; } foo(array('fred' = 'hello', 'banana' = 'world')); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Can I rely on session.gc_maxlifetime?
Hi, I don't know if I understand right the manual at the session.gc_maxlifetime setting. As I read, php won't use sessions that are older than that time. It means that when a user logs in, and does his/her work for more than (for example) 15 minutes, than he/she will be kicked off immediately, because the gc_maxlifetime is set to 900?? Is this right, or I missunderstoud something? Thanks for your help, Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Feature?
On Tuesday 25 September 2001 10:36, Andrey Hristov wrote: After some days spent in a hospital reading Programming Perl and Oracle Web Applications I found that a language construct which appears in Perl and PL/SQL is not available in PHP. As in most 3G languages function call is like that $bar=foo($bar1,$bar2,$bar3,'bar4'); function foo($par1=1,$par2=2,$par3=3,$par4='foo_bar',...){ ... } In the case when I've few parameters I've to remember their order, so why not $bar=foo('par2'=10); I want to pass value to only one or more but not to all params. Also this will make the code clearer I think. Comments are welcome! You can emulate this with arrays: $bar = foo (array ('par2' = 10)); -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) ...1000100011010101101010110100111010113... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Image location question.
I have a question. I have created an image with imagecreatefromjpeg I have a empty page and i want to display the picture at a specefic location at the page. Does anyone know how to do that? With regards //Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Image location question.
You have to have one script for the page and one which serves the image. Also it's possible to use just one script by using GET but this is a mess some_script.php: ? ... ? html ... img src=get_image.php get_image.php: ?p herader('image/jpeg'); ... ? Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Johan Vikerskog (EMP) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 3:17 PM Subject: [PHP] Image location question. I have a question. I have created an image with imagecreatefromjpeg I have a empty page and i want to display the picture at a specefic location at the page. Does anyone know how to do that? With regards file://Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Can I rely on session.gc_maxlifetime?
New SESSID will be generated because the old expired and because all rely on the SESSID which is the hash key to the data no previous data will be available. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Arpad Tamas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 3:20 PM Subject: [PHP] Can I rely on session.gc_maxlifetime? Hi, I don't know if I understand right the manual at the session.gc_maxlifetime setting. As I read, php won't use sessions that are older than that time. It means that when a user logs in, and does his/her work for more than (for example) 15 minutes, than he/she will be kicked off immediately, because the gc_maxlifetime is set to 900?? Is this right, or I missunderstoud something? Thanks for your help, Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Accessing lots of variables
Hi, I'm feeling a bit stupid. I have a,load of variables coming from a MySQL connection using list(). The variables are link1 to link 35 inclusive. How can I access each of these variables, check if they are empty, then add them to an array. I don't know how to access then inside a for loop. Can I use $link and append the number on the end somehow? Any help please, Jord -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP][ORACLE][SOLARIS] Getting cursors from stored procedures
Environment: Solaris 2.6 Apache 1.3.12 PHP 4.0b4 Oracle 8.1.7 I'm trying to get a cursor as an output value for a stored procedure. My stored procedure is correct (I tested it). When I run the php script with apache on my NT server (using the same database on Solaris), everything is OK. When I run it on Solaris, the browser shows a dialog box saying The server returns an invalid answer. The stored procedure is exactly the same, so I think that the problem comes either from my Apache/PHP configuration or from Oracle client libraries on Solaris... Couldn't find anything... Did anyone already have that kind of problem? What could I do? Thanks, Stephane. Below is the PHP script: ** ?php $conn = OCILogon(user,password); $curs = OCINewCursor($conn); $stmt = OCIParse($conn,begin MYPACKAGE.MYPROC(1,:data); end;); ocibindbyname($stmt,data,$curs,-1,OCI_B_CURSOR); ociexecute($stmt); ociexecute($curs); while (OCIFetchInto($curs,$data)) { var_dump($data); } OCIFreeStatement($stmt); OCIFreeCursor($curs); OCILogoff($conn); ? ** And the PL/SQL stored procedure : * TYPE CURS_REPERTOIRE IS RECORD ( REP_IDREPERTOIRE.REP_ID%TYPE ); TYPE TYP_CURS_REPERTOIRE IS REF CURSOR RETURN CURS_REPERTOIRE; PROCEDURE MYPROC ( i_rep_idIN REPERTOIRE.REP_ID%TYPE, io_cursIN OUT MYPACKAGE.TYP_CURS_REPERTOIRE ) IS BEGIN OPEN io_curs FOR SELECT rep_id FROM REPERTOIRE WHERE rep_id = i_rep_id; RETURN; END; * * Ce message et toutes les pieces jointes (ci-apres le message) sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. SG Asset Management et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. Découvrez l'offre et les services de SG Asset Management sur le site www.sgam.fr This message and any attachments (the message) are confidential and intended solely for the addressees. Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither SG Asset Management nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] no of files in a folder....
hi all, is there any way out to get the total no of files in a directory including its subfolders ? thanQ,, /sagar
Re: [PHP] Can I rely on session.gc_maxlifetime?
On Tuesday 25 September 2001 14:27, Andrey Hristov wrote: New SESSID will be generated because the old expired and because all rely on the SESSID which is the hash key to the data no previous data will be available. So, no matter if the user is still working, the session will be destroyed. I mean session.gc_maxlifetime isn't session.gc_maxIDLEtime? Becuase I needed the second one :)), but it's not hard to make it in php, I was just curious. Thanks Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Accessing lots of variables
for ($i=1;$i36;$i++){ if (${link.$i}){ //it's real }else{ // none } } Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Jordan Elver [EMAIL PROTECTED] To: PHP General Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 8:42 PM Subject: [PHP] Accessing lots of variables Hi, I'm feeling a bit stupid. I have a,load of variables coming from a MySQL connection using list(). The variables are link1 to link 35 inclusive. How can I access each of these variables, check if they are empty, then add them to an array. I don't know how to access then inside a for loop. Can I use $link and append the number on the end somehow? Any help please, Jord -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A simple PHP form not working
you have an l just after the @ sign, it might be an idea to change that, because when it connects, it first does HELO email and checks if that user is allowed... - Original Message - From: Tshering Norbu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 6:38 PM Subject: Re: [PHP] A simple PHP form not working Is this the correct mail function config in php.ini ? [mail function] SMTP = smtp01.druk.net.bt ;for win32 only sendmail_from = [EMAIL PROTECTED] ;for win32 only ;sendmail_path = ;for unix only, may supply arguments as well (default is sendmail -t) Here, I have smtp01.druk.net.bt as my SMTP server which exsits and [EMAIL PROTECTED] as my own just to test. I tried those and still no luck -:) Thank you david. NORBU - Original Message - From: David Robley [EMAIL PROTECTED] To: Tshering Norbu [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 12:32 PM Subject: Re: [PHP] A simple PHP form not working On Tue, 25 Sep 2001 12:56, Tshering Norbu wrote: Hi list, I can not get the form (from thesitewizard) working. When I submit the form, I get this error: Warning: Failed to Connect in c:\Program Files\Apache Group\Apache\htdocs/druknet/feedback/feedbacksend.php on line 2. My PHP conf with Apache has no problem. What am I doing wrong? Sorry, I am a beginner in PHP. Here are 2 php files: feedback.html HTML/BODY FORM method=post action=feedbacksend.php Email: INPUT name=email type=textbr Message:br TEXTAREA name=message /textareabr input type=submit value=Submit /FORM /BODY/HTML feedbacksend.php ?php mail([EMAIL PROTECTED], Feedback Form Results,$message, From: $email); (Location:thankyou.html); ? Line 2 appears to be the mail() function - have you correctly configured the mail section of your php.ini? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Do the joke. Get the laugh. Move on. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Getting my head around nulls.
I wish the rest of the world saw it that way! But not so... That's what capitalism does for you -;) You may want to look at MySQL's IS_NULL function for retrieving data. Other than that, I don't have any good advice. It seems that if you retrieve a NULL from the database and try to assign it to a PHP variable, that variable gets destroyed. AFAIK, yes, you need a bunch of data checks, both putting data in and pulling it back out. Strange, I did a search on is_null in the MySQL manual (ver 3.23.40 .pdf) and got no nits on is_null. Could you provide example of its use. Neb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Getting my head around nulls.
SELECT * from some_table WHERE some_field IS NULL; Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 4:09 PM Subject: RE: [PHP] Getting my head around nulls. I wish the rest of the world saw it that way! But not so... That's what capitalism does for you -;) You may want to look at MySQL's IS_NULL function for retrieving data. Other than that, I don't have any good advice. It seems that if you retrieve a NULL from the database and try to assign it to a PHP variable, that variable gets destroyed. AFAIK, yes, you need a bunch of data checks, both putting data in and pulling it back out. Strange, I did a search on is_null in the MySQL manual (ver 3.23.40 .pdf) and got no nits on is_null. Could you provide example of its use. Neb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fw: [PHP] Capturing several checkbox values
- Original Message - From: sagar N Chand To: John Day Sent: Tuesday, September 25, 2001 6:46 PM Subject: Re: [PHP] Capturing several checkbox values give each checkbox an individual name before you submit it. In the next page put this code : while(list($key,$value)=each($HTTP_POST_VARS)) { echo ($key); // if you want to print the name of the check box echo($value); // if you want to print the values of the check box } make sure that u use post method while submitting the form. /sagar - Original Message - From: John Day To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 3:00 PM Subject: [PHP] Capturing several checkbox values Hi, I have a page containing about 50 different checkboxes, the user can select as few or many as they like. When they submit the form I want the values/names of the checkboxes that they selected to be displayed on the next page, i.e. a thankyou page. Any help is much appreciated. JD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] public and private parts in classes ?
Hello I'm sorry, if this is a faq. But I would like to know, if there exist public and private parts in classes like in c++ ? AFAIK there are no public and private parts supportet. I would be pleased to get either a confirmation on that or, if it works, some information on how to do it. Thanx for your support! Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] public and private parts in classes ?
PHP Classes are not so powerful as C++. No there is no division ot private and public or protected. All is public but good technique is to name methods you prefer to be private with a underbar at the start. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Oliver Ruf [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 4:34 PM Subject: [PHP] public and private parts in classes ? Hello I'm sorry, if this is a faq. But I would like to know, if there exist public and private parts in classes like in c++ ? AFAIK there are no public and private parts supportet. I would be pleased to get either a confirmation on that or, if it works, some information on how to do it. Thanx for your support! Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] public and private parts in classes ?
Thank you for your confirmation. Now I'm sure that I was correct. -Oliver [EMAIL PROTECTED] (Andrey Hristov) wrote in 01ba01c145c7$22bcc6d0$0b01a8c0@ANDreY:">news:01ba01c145c7$22bcc6d0$0b01a8c0@ANDreY: PHP Classes are not so powerful as C++. No there is no division ot private and public or protected. All is public but good technique is to name methods you prefer to be private with a underbar at the start. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] public and private parts in classes ?
On Tue, 25 Sep 2001, Andrey Hristov wrote: I'm sorry, if this is a faq. But I would like to know, if there exist public and private parts in classes like in c++ ? AFAIK there are no public and private parts supportet. I would be pleased to get either a confirmation on that or, if it works, some information on how to do it. PHP Classes are not so powerful as C++. No there is no division ot private and public or protected. All is public but good technique is to name methods you prefer to be private with a underbar at the start. The same applies to properties: class Test { function Test() { $_this-foo = bar; } } $n = new Test; echo foo: . $n-foo; // returns 'foo: ' Cheers, Nick W.. -[ [EMAIL PROTECTED] ]- :: today's word is.. haggis (n): a small, hairy creature that has 8 long legs, looks like a set of bagpipes and tastes good with deep-fried chipped potatoes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] public and private parts in classes ?
Hmmm, Original: $_this-foo = bar; I think that it must be: $this-_foo = bar; Have fun. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Nick Winfield [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 4:49 PM Subject: Re: [PHP] public and private parts in classes ? On Tue, 25 Sep 2001, Andrey Hristov wrote: I'm sorry, if this is a faq. But I would like to know, if there exist public and private parts in classes like in c++ ? AFAIK there are no public and private parts supportet. I would be pleased to get either a confirmation on that or, if it works, some information on how to do it. PHP Classes are not so powerful as C++. No there is no division ot private and public or protected. All is public but good technique is to name methods you prefer to be private with a underbar at the start. The same applies to properties: class Test { function Test() { $_this-foo = bar; } } $n = new Test; echo foo: . $n-foo; // returns 'foo: ' Cheers, Nick W.. -[ [EMAIL PROTECTED] ]- :: today's word is.. haggis (n): a small, hairy creature that has 8 long legs, looks like a set of bagpipes and tastes good with deep-fried chipped potatoes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] public and private parts in classes ?
On Tue, 25 Sep 2001, Andrey Hristov wrote: Hmmm, Original: $_this-foo = bar; I think that it must be: $this-_foo = bar; Nope, I tested my code before I posted. :) Definitely $_this-foo Cheers, Nick W.. -[ [EMAIL PROTECTED] ]- :: today's word is.. haggis (n): a small, hairy creature that has 8 long legs, looks like a set of bagpipes and tastes good with deep-fried chipped potatoes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Getting my head around nulls.
SELECT * from some_table WHERE some_field IS NULL; Andrey Hristov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Thanks for correcting my misspelling, Andrey, IS NULL not IS_NULL. Another thing to look at, Ben, is IFNULL(). I would give you an example, but I never got it to work like I thought it should ;) I think it is supposed to return an alternate value for NULLs. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] public and private parts in classes ?
class Test { function Test() { $_this-foo = bar; } } $n = new Test; echo foo: . $n-foo.\n; var_dump($n); returns : foo: object(test)(0) { } So there is no member variable which you meant to be private in the instance $n of class Test. Have fun. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Nick Winfield [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 5:13 PM Subject: Re: [PHP] public and private parts in classes ? On Tue, 25 Sep 2001, Andrey Hristov wrote: You by yourself showed that you code return: echo foo: . $n-foo; // returns 'foo: ' but if the code was correct it must return : foo: bar, not foo: Exactly. Thus, it means that by adding the underscore, I had made the property private which was the whole point of the exercise. If the property had not been private, then yes the script would have had the output foo: bar. See? Cheers, Nick W.. -[ [EMAIL PROTECTED] ]- :: today's word is.. haggis (n): a small, hairy creature that has 8 long legs, looks like a set of bagpipes and tastes good with deep-fried chipped potatoes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] chat with php
HI. Anyone have a chat with php? tks
RE: [PHP] Can I rely on session.gc_maxlifetime?
So, no matter if the user is still working, the session will be destroyed. I mean session.gc_maxlifetime isn't session.gc_maxIDLEtime? Every time the user requests a page in an application using sessions, the session file's access time gets updated. The garbage collection routine looks at that access time. If the file hasn't been accessed less than gc_maxlifetime seconds ago, the gc routine deletes the session file. Another factor comes into play, tho, that is session.gc_probability. This sets how often the gc routine is launched. The default value is 1%, which means that on 1 of every 100 page requests the gc routine launches. So, if the server is not getting many hits, it can be a long time before the gc routine launches, so the session file can hang around longer than gc_maxlifetime. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Linking data from a different site and server
?php $ch = curl_init (http://www.php.net/;); $fp = fopen (php_homepage.txt, w); curl_setopt ($ch, CURLOPT_FILE, $fp); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_exec ($ch); curl_close ($ch); fclose ($fp); ? I think that by using CURL you can get the output of your script and add the content to the another page on the other server, also you can parse it to make modifications. Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Sheni R. Meledath [EMAIL PROTECTED] To: PHP Masters [EMAIL PROTECTED] Cc: MySQL Masters [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 5:09 PM Subject: [PHP] Linking data from a different site and server Hi all, I have developed a MySQL/PHP application for one of our web sites. The PHP script extracts data from the MySQL database which is on the same server and displays the results. Now I want to display the same results on one of our other sites which is on a different server. I tried calling the same PHP3 script file from that site (require ('http://www.mysite.com/data.php3'). But its not connecting to the MySQL database or displaying the results. This is for displaying a news ticker on various sites. The news is stored in a MySQL database on one server. I want to create a PHP script that displays news on various sites, by embedding the script. Awaiting your valuable suggestions to solve this issue. Regards Sheni R Meledath [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Socket help
Hello list, I need to receive/send sms through an IPSec connection using the socket (pfsocket) function of php. I hope there's someone out there that can help me solving some questions. Here is what I thought to do: REC_SCRIPT that open the socket connection and listen on arriving messages (msg will be stored in mysql) SEND_SCRIPT that is launched from a html form and use that socket to send the message and store it in myslq. Questions 1. Can the REC_SCRIPT stay alive listening on the persistent socket connection ? 2. There's a way to launch it automagically when I start apache ? 3. Can the SEND_SCRIPT use the socket conn. opened by the first script ? 4. In case of receive/send in the same time, will all be ok ? Thank you very much for any help Stefano Baronio [EMAIL PROTECTED] www.sateltrack.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Getting my head around nulls.
Just realised, you meant 'is null' not is_null. Sorry, couldn't see the wood for the trees. This in ANSI SQL and I use it every day. Had a look at zootweb.com. And I thought ASP meant 'Active Server Pages' not 'Application Service Provider'. And not a zoot suit in sight -;) Regards, Neb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Feature?
Maybe this? A bit verbose, but functional. -Steve ?php function foo($p) { if (empty($p['fred'])){ $p['fred'] = 'hello'; } if (empty($p['banana'])){ $p['banana'] = 'world'; } echo $p['fred'] . $p['banana']; } foo(array('fred' = 'hello', 'banana' = 'world')); ? On Tuesday, September 25, 2001, at 06:25 AM, Andrey Hristov wrote: Yeap, I know that. I thought about this bit of hack but this breaks the conception on giving parameters. Also this trick cannot solve the problem with default parameters. If I have function with 5 params and all of them have default values and I want to pass value only to the second parameter what I have to do? Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 1:14 PM Subject: Re: [PHP] Feature? On Tue, 25 Sep 2001 11:36:25 +0300, you wrote: In the case when I've few parameters I've to remember their order, so why not $bar=foo('par2'=10); I want to pass value to only one or more but not to all params. Also this will make the code clearer I think. Comments are welcome! ?php function foo($p) { echo $p['fred'] . $p['banana']; } foo(array('fred' = 'hello', 'banana' = 'world')); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP attempting to parse non-existent files
okay, I'll try again. The apache server our site runs on is set up to parse .html files as php. If you pass a url of a non-existant file to the server the client gets a php parse error back rather than a 404 error ... specifically: pass in http://www.sitename/fred.html and you get Fatal error: Unable to open e:\program files\apache group\apache\htdocs\dev\maintenance\fred.html in Unknown on line 0 pass in http://www.sitename/fred.htm (which apache hasn't been told to treat as PHP) and you get the expected 404 error which I am well aware can be trapped in apache. (n.b. http://www.sitename/bill/fred.html where bill is a non existant directory, gives the 404 error okay) Either this happens to everyone (which apparently it doesn't) or I've got the configuration wrong somewhere in Apache or PHP. I've trawled through the on-line documentation for both and haven't found anything relevant. I'm a programmer not a network or web administrator, but here I'm all there is. Any ideas what and/or where the problem is? Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] help with some printing stuff
I'm having some trouble putting on a formatting to printer script. I've done it in ASP to print CDs tracklists... 4 per page. Since I know nothing about Word macros, I've done it in HTML and it's working fine... it's customizable and all.. but the problem I have is printers... since it's in HTML each printer prints the way it wants... cuz HTML is not a fixed doc or anything. So I was wondering if this would be easy to implement in PDF, it would be closed, fixed and printer independent cuz it would have fixed sizes of fields and all... is it easy... can anyone give me some pointers? thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Getting my head around nulls
Thanks for correcting my misspelling, Andrey, IS NULL not IS_NULL. Another thing to look at, Ben, is IFNULL(). I would give you an example, but I never got it to work like I thought it should ;) I think it is supposed to return an alternate value for NULLs. Just had a look at manual, ifnull() seems close to useless. However if they had NVL(), as Oracle douse NVL( column|litrel, '*null*' ) This takes a column or literal as its first arg and if arg is null returns 2nd arg otherwise returns arg. In other words if the column is null it is replaces by arg2 otherwise it is simply returned. Next week I will sing the prases of the oracle decode statement -;) The week after that I will get all exited about MySQL freetext indexes, yum, yum. Neb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Counter
Hi, I would like to know how to write a web page counter in PHP or Javascript. Thank You Mark Lo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Can I rely on session.gc_maxlifetime?
On Tuesday 25 September 2001 16:19, Johnson, Kirk wrote: So, no matter if the user is still working, the session will be destroyed. I mean session.gc_maxlifetime isn't session.gc_maxIDLEtime? Every time the user requests a page in an application using sessions, the session file's access time gets updated. The garbage collection routine looks at that access time. If the file hasn't been accessed less than gc_maxlifetime seconds ago, the gc routine deletes the session file. Another factor comes into play, tho, that is session.gc_probability. This sets how often the gc routine is launched. The default value is 1%, which means that on 1 of every 100 page requests the gc routine launches. So, if the server is not getting many hits, it can be a long time before the gc routine launches, so the session file can hang around longer than gc_maxlifetime. Thank you for the detailed answer Kirk. I thought that php works as you wrote. But sometimes I find that much older session are still alive. I have 1440secs for maxlifetime, and if I bookmark a page with the session id I can use it till days or even weeks (I haven't tested longer time period :)) It is critical for most applications with user privileges, because someone can easily spoof other user's identity. Of course people should use he logout button, but as you all know they don't want, forget it, or their browser hangs, many things can happen. So do you know any better sollution to this problem? Thanks, Arpi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Test.php does not show that it was configured with sybase on Linux 7.1
Hi all, I have installed sybase on my Linux 7.1 machine and after creating my first php-4.0.4pl1-9 page, sybase is not listed under ./configure section,,, do i need to recompile again??? pls help Caleb Carvalho LoadRunner/APM - Enterprise Testing and Performance Management Solutions - Mercury Interactive 410 Frimley Business Park Frimley, Surrey. GU16 7ST United Kingdom Telephone : +44 (0)1276 808300 _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php from the command line
Hi! I was wondering how you could run php from the command line, and how it works! Just out of curiosity =) Thanks /Broder
[PHP] cookies
When I set a cookie like below, what does the 300 represend in time? Seconds? setcookie (referred, yes, 300, , .advparadigm.com,0); Thanks, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] dates only in the future
Good afternoon, I'm looking for a function which enables me to allow user only to enter those dates which are still to come. In my head I have three select things... one for day, one for month and one for year. In order to prevent the user from submitting the form with the date which is in past, I need probably Javascript. Am I correct? I rather prefer to keep my site Javascript free and therefore it would be great if somebody has already written such a function and would be ready to share it with me/others. If not, any ideas how to start... TIA happy coding, Kristjan Kanarik P.S. Please put [EMAIL PROTECTED] to CC: line since I'm only on the digest. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] the apache log file
Hey! I know the question is somewhat missplaced thought I think someone on this list should be able to answer me. I'm doing a statistics application wich uses the apache http-acces.log file. One line looks like this: 195.58.118.234 - - [03/Oct/2000:09:39:04 +0200] GET /temp/odenresor HTTP/1.1 301 324 - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) My question is what the numbers 301 324 (between GET /temp/odenresor HTTP/1.1 and - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)) represents. I have thought much about it but haven't come up with an answer. So please help!! //Broder
[PHP] Re: cookies
Hi m8 I just say... rtfm ... start here: From the manual:.. (http://www.php.net/manual/en/function.setcookie.php) int setcookie (string name [, string value [, int expire [, string path [, string domain [, int secure]) - Oliver [EMAIL PROTECTED] (Joseph Bannon) wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: When I set a cookie like below, what does the 300 represend in time? Seconds? setcookie (referred, yes, 300, , .advparadigm.com,0); Thanks, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] the apache log file
It is the response code and the number of bytes transferred. These are the codes: #define HTTP_CONTINUE 100 #define HTTP_SWITCHING_PROTOCOLS 101 #define HTTP_PROCESSING102 #define HTTP_OK200 #define HTTP_CREATED 201 #define HTTP_ACCEPTED 202 #define HTTP_NON_AUTHORITATIVE 203 #define HTTP_NO_CONTENT204 #define HTTP_RESET_CONTENT 205 #define HTTP_PARTIAL_CONTENT 206 #define HTTP_MULTI_STATUS 207 #define HTTP_MULTIPLE_CHOICES 300 #define HTTP_MOVED_PERMANENTLY 301 #define HTTP_MOVED_TEMPORARILY 302 #define HTTP_SEE_OTHER 303 #define HTTP_NOT_MODIFIED 304 #define HTTP_USE_PROXY 305 #define HTTP_TEMPORARY_REDIRECT307 #define HTTP_BAD_REQUEST 400 #define HTTP_UNAUTHORIZED 401 #define HTTP_PAYMENT_REQUIRED 402 #define HTTP_FORBIDDEN 403 #define HTTP_NOT_FOUND 404 #define HTTP_METHOD_NOT_ALLOWED405 #define HTTP_NOT_ACCEPTABLE406 #define HTTP_PROXY_AUTHENTICATION_REQUIRED 407 #define HTTP_REQUEST_TIME_OUT 408 #define HTTP_CONFLICT 409 #define HTTP_GONE 410 -Rasmus On Tue, 25 Sep 2001, [iso-8859-1] Jimmy Bäckström wrote: Hey! I know the question is somewhat missplaced thought I think someone on this list should be able to answer me. I'm doing a statistics application wich uses the apache http-acces.log file. One line looks like this: 195.58.118.234 - - [03/Oct/2000:09:39:04 +0200] GET /temp/odenresor HTTP/1.1 301 324 - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) My question is what the numbers 301 324 (between GET /temp/odenresor HTTP/1.1 and - Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)) represents. I have thought much about it but haven't come up with an answer. So please help!! //Broder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] dates only in the future
I'm looking for a function which enables me to allow user only to enter those dates which are still to come. In my head I have three select things... one for day, one for month and one for year. In order to prevent the user from submitting the form with the date which is in past, I need probably Javascript. Am I correct? Only if you want to check before the form gets submitted... I rather prefer to keep my site Javascript free and therefore it would be great if somebody has already written such a function and would be ready to share it with me/others. If not, any ideas how to start... Here is a function I use. Call after the form is submitted. function verifyDate( $date_month, $date_day, $date_year, $notprior = ) { // v. 1.1 // 1999.11.19 - to check to make sure that the selected dates are // within the appropriate range: // ie. days cannot exceed 31, months cannot exceed 12 and // years cannot be more than 10 years in the future. $retval = 1; $today = MkTime(0,0,0, date( m ), date( d ), date( Y )); $selected_date = MkTime(0,0,0, $date_month, $date_day,$date_year); if(( $date_month 12 ) || ( $date_day 31 ) || (( $date_year ( date( Y ) - 95 )) || ( $date_year date( Y { $dategood = 0; } else { $dategood = checkdate( $date_month, $date_day, $date_year ); } if( !$dategood ) { $retval = Date is invalid. Please make sure that the day selected is valid for the month selectedbr\n; } elseif (( $today $selected_date ) ( $notprior )) { $retval = Date Selected Is Prior To Todaybr\n; } return $retval; } // End function verifyDate(); Chris
Re: [PHP] php from the command line
It might be a good idea to check the list archives. http://marc.theaimsgroup.com/?l=php-general But since I am feeling nice today (assuming you want to do it on *nix). Then download and un-pack the source and run: # ./configure [... additional options here like MySQL etc...(make sure you don't put in the webserver)] # make # make install Then it will create a php executable in the /usr/local/bin/ dir. Run that like this: # php -f filename.php There is also another way to do it with magic lines I think something like this at the top of your _executable_ file #!/usr/local/bin/php ... Then just run your executable file like you would any other. Nathan Cook [EMAIL PROTECTED] - Original Message - From: Jimmy Bäckström [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 10:21 AM Subject: [PHP] php from the command line Hi! I was wondering how you could run php from the command line, and how it works! Just out of curiosity =) Thanks /Broder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Getting my head around nulls
On Tuesday, September 25, 2001, at 10:30 AM, [EMAIL PROTECTED] wrote: Thanks for correcting my misspelling, Andrey, IS NULL not IS_NULL. Another thing to look at, Ben, is IFNULL(). I would give you an example, but I never got it to work like I thought it should ;) I think it is supposed to return an alternate value for NULLs. Just had a look at manual, ifnull() seems close to useless. However if they had NVL(), as Oracle douse NVL( column|litrel, '*null*' ) This takes a column or literal as its first arg and if arg is null returns 2nd arg otherwise returns arg. In other words if the column is null it is replaces by arg2 otherwise it is simply returned. Um, that's what ifnull() does. At least it works for me. -Steve Next week I will sing the prases of the oracle decode statement -;) The week after that I will get all exited about MySQL freetext indexes, yum, yum. Neb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: cookies
And this is where I say kma thanks. J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] curl_exec() output and curl_setopt( CURL_CERTIFICATE,$path )
On Tue, 25 Sep 2001, Kamil Nowicki wrote: 1. How to redirect curl_exec() output to a variable without passing it thru a file? curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); echo $data; curl_close($ch); -Sterling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 2 decimal places
What if I want to pad a number with zeros in the other direction? I.E: 524 becomes 00524 - Original Message - From: Christian Dechery [EMAIL PROTECTED] To: Kurth Bemis [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 9:41 AM Subject: Re: [PHP] 2 decimal places At 22:22 19/09/01 -0400, Kurth Bemis wrote: i'm looking for a php function to add 2 decimal place sto a number. if the number already have one decimal place then one more zero should be added to make it two decimal placesanyone know of a quick way to do this? $number=32.5; echo number_format($number,2); outputs: 32.50 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Counter
It's very simple - at the top of every page, have a routine that opens a text file, reads the number inside it into a variable, adds one, and writes it back out again. If the text file doesn't exist, create it. Psuedocode: if (file exists) { open file for reading; read contents into $counter; increase $counter by 1; } else { set $counter to 1; open file for writing; } write $counter to file; close file; print you are visitor number $counter.; Look into fopen(), fread(), fwrite() and friends. Of course, it's now up to you to work out how you're going to count cached requests, search engine bots, link checkers, etc etc. Personally I reckon you're better off with this: ?php mt_srand((double)microtime()*100); $counter = mt_rand(1, 9); echo You are visitor number $counter.; ? Cheers Jon -Original Message- From: Mark Lo [mailto:[EMAIL PROTECTED]] Sent: 25 September 2001 16:50 To: php general Subject: [PHP] Counter Hi, I would like to know how to write a web page counter in PHP or Javascript. Thank You Mark Lo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] 2 decimal places
What if I want to pad a number with zeros in the other direction? I.E: 524 becomes 00524 printf() / sprintf() is your friend. Chris
[PHP] Re: Zend Cache cache_gui
I had that problem. Appeared to be some incompatibility with Zend Optimizer and Zend Cache. Upgrade to Zend Optimizer 1.1.0 and everything worked. Regards, John Joseph Blythe [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello all, I just installed Zend LaunchPad (PHP 4.0.4pl1) with Zend Cache v1.1.0 all seems ok when I run phpinfo() This program makes use of the Zend scripting language engine: Zend Engine v1.0.4, Copyright (c) 1998-2000 Zend Technologies with Zend Optimizer v1.0.0, Copyright (c) 1998-2000, by Zend Technologies with Zend Cache v1.1.0, Copyright (c) 1999-2001, by Zend Technologies But when I try and use Cache GUI it says that zend cache not loaded when clearly it seems it has been by the phpinfo script, there are no messages in apache's error logs relating to php either, I was wondering if anyone else has had simular problems, or could point me somewhere to find out what is going on? Any help would be much appreciated. Regards, Joseph. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Php-Gtk.....does it work ever?
Hi! I downloaded the Php-Gtk files for Windows 32 Binary and I am trying to make it work on Windows 98. I already have phpdev2 with Apahce, Mysql and Php installed phpdev2 is in C:\phpdev2 1. Now I downloaded php-gtk and I copied the files from php4 folder to php directory. 2. Then I copied the files from Winnt directory to C:\WINDOWS\SYSTEM32 3. I didn't copy php.ini file anywhere because... C:\phpdev2\php\ already had a php.ini file. 4. Copied the sameples to the same folder as that of Php C:\phpdev2\php\samples. Now When I try to run the a sample file.eg. C:\phpdev2\php\php_win.exe -q C:\phpdev2\php\samples\hello.php It doesn't do anything...it just comas back to the command line in Dos Prompt Is the thing installed properly..? How can we check it and if it is installed why isn't the thing showing any results... Please reply to me...coz I am just making a beginning with Php-Gtk Thank You Greetings!~ Dhaval __ Do You Yahoo!? Get email alerts NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] News ticker
Hi friends, I have a created a PHP script for a news ticker. The data is extracted from a MySQL server. I have to use this script on all our sites which is on different servers. Is there a way to execute the PHP script from one server and get the results on these sites. For eg: I am looking for a script that can be put on any page on any sites (even if the server doesn't support PHP). The script should call the News Ticker PHP script and execute it from my server and only the results are send to the client pages. Sorry for writing long. I was trying to explain the situation. If any body has got any idea on this, please let me know. Many Thanks Regards Sheni R Meledath [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] News ticker
Make the output in javascript format. If you just want to write to the document, use something like this document.write('?php echo $whatever; ?'); My JavaScript is a little rusty, but I think that's the correct format. Have the PHP parsed on your server then the remote site could call it like this: script src=http://www.yourserver.com/news.php; /. On Tuesday 25 September 2001 10:03, you wrote: Hi friends, I have a created a PHP script for a news ticker. The data is extracted from a MySQL server. I have to use this script on all our sites which is on different servers. Is there a way to execute the PHP script from one server and get the results on these sites. For eg: I am looking for a script that can be put on any page on any sites (even if the server doesn't support PHP). The script should call the News Ticker PHP script and execute it from my server and only the results are send to the client pages. Sorry for writing long. I was trying to explain the situation. If any body has got any idea on this, please let me know. Many Thanks Regards Sheni R Meledath [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Can I rely on session.gc_maxlifetime?
I thought that php works as you wrote. But sometimes I find that much older session are still alive. I have 1440secs for maxlifetime, and if I bookmark a page with the session id I can use it till days or even weeks (I haven't tested longer time period :)) Are old files being re-used, or instead, is the session ID in the bookmark causing PHP to create a new session file with that old ID? That has been my experience: if a bookmark contains the session ID, PHP will re-use the old session file if it still exists, but if the old file has been cleaned up, then PHP will create a new session using the old ID in the bookmark. Do you have access to the /tmp directory? If so, try to track this. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help with some printing stuff
If you want to cheat, I would create the html doc, then use one of the many HTML - PDF converters out there. Of course you could also create the PDF by hand, there is a module for that On Tuesday 25 September 2001 08:19, you wrote: I'm having some trouble putting on a formatting to printer script. I've done it in ASP to print CDs tracklists... 4 per page. Since I know nothing about Word macros, I've done it in HTML and it's working fine... it's customizable and all.. but the problem I have is printers... since it's in HTML each printer prints the way it wants... cuz HTML is not a fixed doc or anything. So I was wondering if this would be easy to implement in PDF, it would be closed, fixed and printer independent cuz it would have fixed sizes of fields and all... is it easy... can anyone give me some pointers? thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] can you pls tell me where is php ./configure file in linux 7.1
hi, am still having problem to compile my sybase, i have linux 7.1 and php was installed during installation process, i can't find the ./configure file.. php-4.0.4pl1-9 pls help Caleb Carvalho LoadRunner/APM - Enterprise Testing and Performance Management Solutions - Mercury Interactive 410 Frimley Business Park Frimley, Surrey. GU16 7ST United Kingdom Telephone : +44 (0)1276 808300 _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php from the command line
Hi Simply put /usr/local/bin/php -q to the top of your script ... i've written one a while ago an email roboter ... it works on command line maybe u wanna check it out : http://linuks.net/robot.phps best regards attila strauss Hi! I was wondering how you could run php from the command line, and how it works! Just out of curiosity =) Thanks /Broder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] can you pls tell me where is php ./configure file in linux 7.1
Chances are that since it was installed as part of your RH install, there isn't a configure script. I would scrap the RPM and go to www.php.net and download the source tarball. That includes the configure script that you are looking for, which will allow you to include whatever you would like as part of the PHP install. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED] - Original Message - From: Caleb Carvalho [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 25, 2001 1:33 PM Subject: [PHP] can you pls tell me where is php ./configure file in linux 7.1 hi, am still having problem to compile my sybase, i have linux 7.1 and php was installed during installation process, i can't find the ./configure file.. php-4.0.4pl1-9 pls help Caleb Carvalho LoadRunner/APM -- --- Enterprise Testing and Performance Management Solutions -- --- Mercury Interactive 410 Frimley Business Park Frimley, Surrey. GU16 7ST United Kingdom Telephone : +44 (0)1276 808300 _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php from the command line
Simply put /usr/local/bin/php -q to the top of your script ... i've written one a while ago an email roboter ... it works on command line But you realize you have to have command line php compiled first, right? Nathan Cook [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 2 decimal places
Yeah, but what if they don't JUST want to print it... /*untested*/ $i=524; $n=5-strlen($i); $outnum=; for($x=1;$x=$n;$x++){ $outnum.=0; }; $outnum.=$i; On Tuesday 25 September 2001 09:56, you wrote: What if I want to pad a number with zeros in the other direction? I.E: 524 becomes 00524 printf() / sprintf() is your friend. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] 2 decimal places
Yeah, but what if they don't JUST want to print it... Umm, have you read the documentation on either of the functions? They both return a string; they don't send anything to standard out (like echo or print does). $myString = printf(); $myString = sprintf(); echo $myString; Chris
[PHP] php script ownership
Is there anyway I could make a PHP script run as the user that owns the script?
[PHP] XML works like a DataBase?
Hi. I've been looking for XML, and I'd like to know if you know if with the XML funtions of PHP I can create a XML file, add and remove data just, or almost equal of I do with MySQL. regards, Augusto ___ Yahoo! GeoCities Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! http://br.geocities.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] XML works like a DataBase?
Augusto, Regardless if you CAN do this, I recommend against it :) Relational Databases are much better for storing, updating, and accessing disparate information than XML. XML should be used for communication between applications or for an intermediary output format from relational data. If you do need XML, then convert from relational data to XML on the fly. There are several ways to do this. An easy one is our database: Virtuoso You can download it for free at http://www.openlinksw.com/virtuoso Hope this helps. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 2:03 PM To: [EMAIL PROTECTED] Subject: [PHP] XML works like a DataBase? Hi. I've been looking for XML, and I'd like to know if you know if with the XML funtions of PHP I can create a XML file, add and remove data just, or almost equal of I do with MySQL. regards, Augusto __ _ Yahoo! GeoCities Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! http://br.geocities.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variable naming
I want to use the value of a variable in a variable name. For instance: $id = 1; $sql_$id = hey; //set variable $sql_1 to hey print $sql_1; //should print hey I have looked high and low on how to do this. My first idea was eval but I can't seem to get that to work in this instance. Any ideas? I'm sure it is possible and easy but I just can't figure out how to do this in php. Thanks -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]