php-general Digest 30 Jan 2001 09:50:16 -0000 Issue 482 Topics (messages 37103 through 37274): form validation :ereg () 37103 by: kaab kaoutar 37212 by: Jeff Warrington unable to load dynamic librabry "c:\php/php_oracle.dll"! 37104 by: kaab kaoutar 37266 by: Richard Lynch Javascript doesn't work with PHP???? 37105 by: Dhaval Desai Apache/PHP Configuration Problem on NT5 37106 by: [ rswfire ] 37116 by: [ rswfire ] 37153 by: Jonathan Sharp 37220 by: Maxim Maletsky Re: Win32 - Mail & SMTP ??? 37107 by: Chris Hayes Hey Rasmus! 37108 by: [ rswfire ] PHP + send mail using remote smtp server ? 37109 by: Samuel Tran 37218 by: Maxim Maletsky ibm-db2 support 37110 by: Bill Sneed 37204 by: szii.sziisoft.com outlook & php 37111 by: kaab kaoutar 37217 by: Maxim Maletsky sessions or db for shopping cart 37112 by: Matthew Delmarter ereg() 37113 by: kaab kaoutar 37219 by: Maxim Maletsky Server VS Client script validation 37114 by: kaab kaoutar 37174 by: Toby Butzon 37180 by: Steve Edberg 37248 by: Michael Hall ereg_replace all items in a array 37115 by: Joseph H Blythe 37206 by: Jeff Warrington PHP compile with ODBC support (iODBC x Openlinkx unixODBC...) and MyODBC 37117 by: Paulo Parola (PHP) where to get php_oracle.dll for win32? 37118 by: kaab kaoutar Importing MS Access into MySQL? 37119 by: James, Yz 37163 by: Jon Snell 37221 by: Maxim Maletsky Resize the pop-up window 37120 by: david klein 37165 by: david klein 37190 by: Chris Hayes 37222 by: Maxim Maletsky PHP oop in C 37121 by: matt.wong.tumbleweed.com 37144 by: John Donagher XML to MySQL 37122 by: Erich Kolb Problem! 37123 by: Fredrik Arild Takle 37156 by: Brian V Bonini 37199 by: Stephan Ahonen 37201 by: Benjamin Munoz 37213 by: Jeff Warrington 37223 by: Maxim Maletsky Announcement: Smarty template engine 1.2.1 released 37124 by: Monte Ohrt can .inc run php script? 37125 by: John LYC 37145 by: Shawn Blaylock 37154 by: Brian V Bonini 37215 by: John LYC 37216 by: John LYC 37224 by: Maxim Maletsky Re: Problem with a regex! 37126 by: Zack Ham 37171 by: Stephan Ahonen Re: Sending Download Header 37127 by: WreckRman2 37138 by: Bojan Gajic 37195 by: Natasha Re: Outputting a 2 digit number < 10 37128 by: Brian White Non Expiring Cookie 37129 by: Karl J. Stubsjoen 37267 by: Richard Lynch Not receiving [PHP] mail - is PHP Mailing List Down? 37130 by: Karl J. Stubsjoen Re: Apache 37131 by: Christian Reiniger 37185 by: Markus Fischer Re: mail( ) question 37132 by: Toby Butzon Passing HTTP_COOKIE_VARS to functions 37133 by: Jamie 37230 by: Jamie LOOKING FOR CODE LOCATION IN PHP SOURCE.... 37134 by: Tim Meader 37167 by: Joe Sheble (Wizaerd) Re: Persistent connections and transactions 37135 by: Nuno Silva Cookie with Netscape 37136 by: Eugene Yi (InfoSpace Inc) 37152 by: Aaron D. Turner 37155 by: Eugene Yi (InfoSpace Inc) 37157 by: Aaron D. Turner 37161 by: Eugene Yi (InfoSpace Inc) 37272 by: Teodor Cimpoesu Anyone out there that can help before my brain gets to hot? 37137 by: Christian Sakshaug PHP Lists keep going down ? 37139 by: Ade Smith 37151 by: Jason Murray confused about eval() 37140 by: Joe Sheble (Wizaerd) 37142 by: Joe Sheble (Wizaerd) testing 37141 by: Joe Sheble (Wizaerd) 37225 by: Maxim Maletsky Re: whois 37143 by: Jason Murray PHP List down ? 37146 by: Ade Smith Problems with majodomo 37147 by: Alan Todd 37168 by: Brian V Bonini Re: E Bay is going up again.. 37148 by: James Moore [NEWBIE] PHP.INI 37149 by: Steve Haemelinck 37173 by: Johannes Janson 37179 by: Jani Taskinen Maximum execution time exceeded! 37150 by: Chakravarthy K Sannedhi 37158 by: Josh G 37164 by: Kyle Jerviss Re: IIS and PHP authorization 37159 by: Ernest E Vogelsinger MySQL Backup Daemon 37160 by: Michael A. Peters PHP Classes 37162 by: christopher calicott Re: AUTH_PW & External Authentication 37166 by: david klein MS SQL 7.0 - Functions 37169 by: Santhyago Bueno Gallão Thumbnails and PHP 37170 by: Todd Cary $DOCUMENT_ROOT 37172 by: Toby Miller 37200 by: CC Zona 37203 by: Jonathan Sharp 37226 by: Maxim Maletsky PHP/MySQL question 37175 by: Julia A . Case 37178 by: Johannes Janson 37192 by: Joe Sheble (Wizaerd) regex with non-ascii characters 37176 by: Remco Chang Interactive external program execution 37177 by: Paul Automate the apache authentication process 37181 by: david klein 37183 by: Jason Murray IIS and $PHP_AUTH_USER 37182 by: Shane McBride VIRUS ON LIST? 37184 by: Chuck Mayo 37227 by: Maxim Maletsky 37229 by: Ashley M. Kirchner 37235 by: Brian White Re: PHP and Oracle resources 37186 by: Markus Fischer 37211 by: Nold, Mark Re: filename length ... 37187 by: Josh G Re: Invoke PHP script from onLoad handler? 37188 by: Kristofer Widholm ENOTTY error 37189 by: Slappy Smith Using PHP as generic security wrapper for content 37191 by: Aaron D. Turner APC version 1.0.7 released 37193 by: George Schlossnagle FTP rawcommands -> FXP 37194 by: Andreas Richter when using die(), how can i get the line number that errored? 37196 by: Noah Spitzer-Williams 37198 by: David Harrison 37228 by: Maxim Maletsky 37268 by: Richard Lynch Sybase port definition 37197 by: Sloboda, Jaroslav 37269 by: Richard Lynch PEAR? 37202 by: Jonathan Sharp 37207 by: Sterling Hughes 37257 by: Teodor Cimpoesu 37259 by: Philip Olson ' VS " 37205 by: Jonathan Sharp 37210 by: Philip Olson Re: pfpro extension 37208 by: John Donagher Re: expressions 37209 by: Jeff Warrington File upload problem 37214 by: Hugo Trovao Mota strings 37231 by: PeterOblivion.aol.com 37232 by: Josh G 37273 by: Teodor Cimpoesu Nesting 'foreach ()' 37233 by: Tim Ward 37234 by: Chris Fry 37236 by: Philip Olson Disable print button of client browser 37237 by: Usman Ghani 37238 by: Josh G 37239 by: Maxim Maletsky Re: HELP!. INstalling PHP4 on a Cobalt RAQ 2! 37240 by: Nold, Mark Re: html_mime_mail.class - - help 37241 by: Finesse Can php listen to server ports 37242 by: Scott Mebberson 37243 by: David Harrison checkdnsrr 37244 by: Cameron Problems with PHP mail() 37245 by: Louis LeBlanc 37270 by: Richard Lynch test 37246 by: Maxim Maletsky Anyone out there that can help before my brain gets to hot? -> Solution #1 37247 by: Christian Sakshaug Editor 37249 by: Website4S.aol.com 37250 by: jeremy brand 37251 by: Christian Sakshaug 37254 by: Philip Olson 37260 by: Maxim Maletsky Variable Problem when UPGRADING... 37252 by: James Smith 37255 by: Philip Olson 37256 by: Philip Olson 37258 by: Teodor Cimpoesu 37271 by: Richard Lynch session problem can't pass 37253 by: GITD DCH major help required with php3 and apache on suse 7.0 pro 37261 by: bob Re: Indexing Remote Directory 37262 by: Richard Lynch Re: Zeros get striped off my db entrees.... how to stop... 37263 by: Richard Lynch 37274 by: php3.developersdesk.com Re: Date Comparison Question 37264 by: Richard Lynch Re: Apache on NT 5 =) 37265 by: Richard Lynch Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Hi again! I still did not fix my prob : I want to check, in a form, that the name input may include an alphabetical letter a- z, A-Z, or a space, or -, or à, or ä or ü etc how can i do that ? i used ereg("([a-z,A-Z][ë,à]?)",$name) then (!ereg("([a-z,A-Z,é,ê,è,ë,-,\t,à,ä,ï,ü,ö,û,â,ç])", $name)) i get the following warnin :REG_ERANGE:,invalid character range by the way how to add space " " and "-" ? Please help! Thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
In article <[EMAIL PROTECTED]>, "kaab kaoutar" <[EMAIL PROTECTED]> wrote: If you wish to include a hyphen in the allowed character list of a pattern match, you must include it as the last character. So what you want should be more like: if (eregi("[^a-zA-Zëàéêêàäïüöûâç-]",$name)) { print("your name can't include non-letter, etc...."); } You can add space with: [:space:] within the charachter class ([^a-zA-Z[:space:]ëàéêêàäïüöûâç-]) Jeff > Hi again! > > I still did not fix my prob : I want to check, in a form, that the name > input may include an alphabetical letter a- z, A-Z, or a space, or -, > or à, or ä or ü etc how can i do that ? i used > ereg("([a-z,A-Z][ë,à]?)",$name) then > (!ereg("([a-z,A-Z,é,ê,è,ë,-,\t,à,ä,ï,ü,ö,û,â,ç])", $name)) > i get the following warnin :REG_ERANGE:,invalid character range by the > way how to add space " " and "-" ? > > Please help! > > Thanks > > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at > http://www.hotmail.com. > > >
hi! i got the following error whe i try to connect to an oracle dbs : unable to load dynamic librabry "c:\php/php_oracle.dll" this module is not found ! please help! _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Try changing that \ to / -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: "kaab kaoutar" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Monday, January 29, 2001 3:30 PM Subject: [PHP] unable to load dynamic librabry "c:\php/php_oracle.dll"! > hi! > i got the following error whe i try to connect to an oracle dbs : > > unable to load dynamic librabry "c:\php/php_oracle.dll" this module is not > found ! > > please help! > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] >
Hi! I am facing a very big Proble,m with this javascript below: I have gotten a form validation script. Please copy the script save as .php and try it out..It doesn't server the purpose...Can anybody point me to right direction: ******************************************************* <html> <head><title>Dubaiteenz.com>Ecards><?php echo"$category"; ?></title> </head> <SCRIPT language="JavaScript"> function verifyall() { missinginfo = ""; if(document.contact.toname.value =="") { missinginfo += "\n - Recepeint's Name"; } if(document.contact.fromname.value =="") { missinginfo += "\n - Sender's Name"; } if ((document.contact.toemail =="") || (document.contact.toemail.value.indexOf('@') == -1)|| (document.contact.toemail.value.indexOf('.') == -1)) { missinginfo += "\n - Recepient's Email Address"; } if ((document.contact.fromemail =="") || (document.contact.fromemail.value.indexOf('@') == -1)|| (document.contact.fromemail.value.indexOf('.') == -1)) { missinginfo += "\n - Sender's Email Address"; } if(document.contact.message.value =="") { missinginfo += "\n - Message"; } if (missinginfo != "") { missinginfo ="===========================\n" + " www.DubaiTeenz.com \n" + "===========================\n" + " \n" + "You failed to correctly fill in your :-\n" + missinginfo + "\n----------------------------------------------------" + "\nPlease re-enter and submit again!"; alert(missinginfo); return false; } else return true; } </SCRIPT> <body> <?php $img .= "b.jpg"; ?> <h3 align="center"><font face="'Comic Sans MS',Arial" size="2" color="Black">Personalise this card <font color="red">Now!!!</font></font></h3> <hr> <table width="70%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center"><font face="'Comic Sans MS',Arial" size="4" color="Black"><i>To Recepient</i></font></td> </tr> <tr> <td align="center"><img src="./images/<? echo"$img"; ?>"></td> </tr> <tr> <td align="center"><font face="'Comic Sans MS',Arial" size="2" color="Black"><b>Message comes here...</b></font></td> </tr> <tr> <td> </td> </tr> <tr> <td align="center"><font face="'Comic Sans MS',Arial" size="2" color="red"><i>- Sender</i></font></td> </tr> </table> <br><br> <form name="contact" action="preview.php" method="post"> <input type="hidden" name="img" value="<? echo "$img"; ?>"> <input type="hidden" name="category" value="<? echo "$category"; ?>"> <!-- Outline Table--> <table width="70%" align="center" cellpadding="1" border="0" cellspacing="0" bgcolor="Black"> <tr> <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="left"> <tr> <td colspan="3" align="center" bgcolor="#000000"><font face="Arial,Verdana" color="White">Fill out the form below, then click the Continue button to Preview:</font> </td> </tr> <tr> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"><font face="Arial,Verdana" size="2"> Recepient's name</font></td> <td bgcolor="#FFFFFF"><font face="Arial,Verdana" size="2">Recepients Email</font></td> </tr> <tr> <td align="right" bgcolor="#FFFFFF"><font face="Arial,Verdana"> To:</font></td> <td bgcolor="#FFFFFF"><input type="text" name="toname" size="30"></td> <td bgcolor="#FFFFFF"><input type="text" name="toemail" size="30"></td> </tr> <tr> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> </tr> </tr> <tr> <td colspan="3" bgcolor="#FFFFF"><img src="../miss_you_malefriend/images/spacer.gif" width="134" height="1" alt="" border="0"></td> </tr> <tr> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"><font face="Arial,Verdana" size="2">Your name</font></td> <td bgcolor="#FFFFFF"><font face="Arial,Verdana" size="2">Your Email</font></td> </tr> <tr> <td align="right" bgcolor="#FFFFFF"><font face="Arial,Verdana"> From:</font></td> <td bgcolor="#FFFFFF"><input type="text" name="fromname" size="30"></td> <td bgcolor="#FFFFFF"><input type="text" name="fromemail" size="30"></td> </tr> <tr> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> </tr> <tr> <td colspan="3" align="center" bgcolor="#FFFFFF"><font face="Arial,Verdana">You may enter a personal message below:</font></td> </tr> <tr> <td colspan="3" align="center" bgcolor="#FFFFFF"><textarea name="message" cols="40" rows="5"></textarea></td> <tr> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> </tr> <tr> <td colspan="3" align="center" bgcolor="#FFFFFF"><input type="submit" value="Click here to CONTINUE"></td> </tr> <tr> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> </tr> </table> </td> </tr> </table> </form> </body> </html> ******************************************************* Thanx a lot! Cheers!~ Dhaval Desai __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
My apologies if you receive this message twice, I'm not sure if it went through the first time. I've set up an ErrorDocument 404 in httpd.conf to point to a local PHP file. When I attempt to access a page that doesn't exist, rather than seeing this page, I get an Internal Error 500. If I go into the error.log, I find the following: [Sun Jan 28 15:18:35 2001] [error] [client 127.0.0.1] Premature end of script headers: c:/program files/php/php.exe This was working for a while, then it suddenly stopped working -- resulting in the problem mentioned above. Any ideas on what's happening and how to fix the problem? _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
I have set up an ErrorDocument 404 in httpd.conf to point to a PHP file in the root of my documents. It was working, now suddenly it has stopped working. Here's the scenario: When I attempt to view a page that is not there, I receive a 500 Internal Error Message, as follows: ============================================ Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.14 Server at swifte.dev Port 8080 ============================================ If I look at the error log, I find the following line: [Sun Jan 28 15:18:35 2001] [error] [client 127.0.0.1] Premature end of script headers: c:/program files/php/php.exe ============================================ Any ideas on how to fix this problem? _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
Hey, have you tried just a static .html file, no php anywhere? -Jonathan -----Original Message----- From: [ rswfire ] [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 28, 2001 12:24 PM To: [EMAIL PROTECTED] Subject: [PHP] Apache/PHP Configuration Problem on NT5 I have set up an ErrorDocument 404 in httpd.conf to point to a PHP file in the root of my documents. It was working, now suddenly it has stopped working. Here's the scenario: When I attempt to view a page that is not there, I receive a 500 Internal Error Message, as follows: ============================================ Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.14 Server at swifte.dev Port 8080 ============================================ If I look at the error log, I find the following line: [Sun Jan 28 15:18:35 2001] [error] [client 127.0.0.1] Premature end of script headers: c:/program files/php/php.exe ============================================ Any ideas on how to fix this problem? _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.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]
Have you touched any .htaccess file? Then maybe that's the problem ... I've no idea what you misconfigured at all, but I know that a misconfiguration of .htaccess gives you the exactly same error (500) and the error log line is often looking very similar, Cheers, Maxim Maletsky -----Original Message----- From: [ rswfire ] [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 5:24 AM To: [EMAIL PROTECTED] Subject: [PHP] Apache/PHP Configuration Problem on NT5 I have set up an ErrorDocument 404 in httpd.conf to point to a PHP file in the root of my documents. It was working, now suddenly it has stopped working. Here's the scenario: When I attempt to view a page that is not there, I receive a 500 Internal Error Message, as follows: ============================================ Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [EMAIL PROTECTED] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/1.3.14 Server at swifte.dev Port 8080 ============================================ If I look at the error log, I find the following line: [Sun Jan 28 15:18:35 2001] [error] [client 127.0.0.1] Premature end of script headers: c:/program files/php/php.exe ============================================ Any ideas on how to fix this problem? _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.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]
a listmember claiming to be Jon Shoberg wrote: > I have PHP-4.0.1 running on my Win200 Pro devel box though the IIS DLL and > SMTP services running. I have SMTP enabled on this machine and have outlook > express configured to send mail though the local SMTP service. I simply told > O.Express the outgoing mail server was my machine (just told it the machine > name)..... > > Now to the PHP stuff .... > > I can't seem to get the mail function to work. A server error gets returned. > I am trying to run a simple script though the PHP.EXE executable. I've tried > editing the php.ini with the SMTP being localhost, my machine's name, and IP > address ... I keep getting the same error. both PHP.EXE and PHP.INI reside in > c:\winnt\system32 so there should not be a path problem .... And outlook works? What did you fill in in php3.ini at SMTP = sendmail_from = ? Is the server error more specific? Chris -------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
There's something wrong with the PHP list... I was wondering if you could help me with a problem I'm having... I set up an ErrorDocument 404 in my httpd.conf file to point to a local file. For awhile, this was working fine, but now I'm receiving a 500 Internal Error message and the following is in the error.log file:[Sun Jan 28 15:53:28 2001] [error] [client 127.0.0.1] Premature end of script headers: c:/program files/php/php.exe Do you know what is causing this to happen? Also, I only get the error-handling page if it's a file in the root and includes an extension of .php, .phtml, or .html. It won't work if it's just a directory (that doesn't exist) or a file in a sub-directory, even if it has the extension. What's happening?? Any help you could offer would be greatly appreciated!! Robert _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
Hello everybody ! Is it possible to send mail using PHP and a mail server that is different from the Web Server ? I would appreciate any help. Thank you. Sam
Yes, Check the PHP.ini file, it can be easily configured there, Cheers, Maxim Maletsky -----Original Message----- From: Samuel Tran [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 1:29 AM To: php-general Subject: [PHP] PHP + send mail using remote smtp server ? Hello everybody ! Is it possible to send mail using PHP and a mail server that is different from the Web Server ? I would appreciate any help. Thank you. Sam -- 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]
Greetings: I'm using RH6.2, DB2 V7.1, PHP-4.0.4pl1, Apache 1.3.14, and Pgsql 7.0.3. I've been able to ./configure successfully support for apache, pgsql, & db2 but come time to compile, make ends with the following error: In file included from internal_functions.c:38: /usr/local/php-4.0.4pl1/ext/odbc/php_odbc.h:60:sqlcli.h: no such file or directory . . . make ends..... Anyone have an idea what's going on and how to fix it?? TIA..... ....bill sneed, prospect, maine.....
Yup. Install the "DB2 Application Development" package and it'll give you the headers. -Szii ----- Original Message ----- From: Bill Sneed <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 28, 2001 12:49 PM Subject: [PHP] ibm-db2 support > Greetings: > > I'm using RH6.2, DB2 V7.1, PHP-4.0.4pl1, Apache 1.3.14, and Pgsql 7.0.3. > > I've been able to ./configure successfully support for apache, pgsql, & > db2 but come time to compile, make ends with the following error: > > In file included from internal_functions.c:38: > /usr/local/php-4.0.4pl1/ext/odbc/php_odbc.h:60:sqlcli.h: > no such file or directory > . > . > . > make ends..... > > Anyone have an idea what's going on and how to fix it?? > > TIA..... > > ....bill sneed, prospect, maine..... > > > -- > 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]
hi! do someone knows how to trigger a php file from outlook? i have an html file where user adds his email address, if the email does not exist, a mail undelevery will be recieved in a certain email address, so what i like to do, is that, once an email is received, the email address will be sent as argument to a program that will deleted it rom my database! thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
What about some sort of page open of JavaScript with the email in a SRC string, so then the page opened proceed and close? PHP and Outlook? no other ideas ... MS and JavaScript? can work sometimes .. Cheers, Maxim Maletsky -----Original Message----- From: kaab kaoutar [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 8:03 PM To: [EMAIL PROTECTED] Subject: [PHP] outlook & php hi! do someone knows how to trigger a php file from outlook? i have an html file where user adds his email address, if the email does not exist, a mail undelevery will be recieved in a certain email address, so what i like to do, is that, once an email is received, the email address will be sent as argument to a program that will deleted it rom my database! thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]
I am about to build my own shopping cart but would like some feedback on the following: 1. Using arrays stored in a PHP4 session vs. a database for storing cart details. 2. What is the best method of passing session data if cookies disabled. I hope you can help... Matthew
Hi is the following right? ereg("[a-zA-Zéêèë\sbàäïüöûâç-]", $firstname) cause even when i type a number it accepts it ! however i want only letters - and space ! thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
only letters and space ? if (eregi("^[A-Z ]+$", $firstname)) this will return true only if a case-insensitive string will contain only letters and spaces... (and the string must not be NULL) if (eregi("^([A-Z]+( )*[A-Z]+)$", trim($firstname)))\ this will return "Maxim Maletsky", " Maxim Maletsky " but not "Maxim Maletsky, jr" or even "MaximMaletsky " Cheers, Maxim Maletsky -----Original Message----- From: kaab kaoutar [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 7:32 PM To: [EMAIL PROTECTED] Subject: [PHP] ereg() Hi is the following right? ereg("[a-zA-Zéêèë\sbàäïüöûâç-]", $firstname) cause even when i type a number it accepts it ! however i want only letters - and space ! thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]
Hi! What's best ? using client script while validating form inputs(javasript or vbscript) or using php for validating! with the first way, i can trigger alert ! however with the second one, i have to show up a whole page for just saying that there are errors, go back to the form ! any ideas ? thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Make the form page post to itself and use default values of <?php echo $HTTP_POST_VARS['field_name'] ?>. The initial form will be blank, but subsequent failing attempts will have the values the visitor already entered. You can also add red text to the form to show what exactly was wrong, etc. Then, to handle posts that are successful, you'll need to use something like this: if (<successful post>) { // post is acceptable - process the info include("file/to/handle/post.php"); } else { // post failed ?> <!-- put HTML form page here --> <?php } // end if ?> I know some people might say this is bad style, but it works. It can be cleaned up some, but this is good enough IMO. --toby kaab kaoutar wrote: > > Hi! > What's best ? using client script while validating form inputs(javasript or > vbscript) or using php for validating! > with the first way, i can trigger alert ! however with the second one, i > have to show up a whole page for just saying that there are errors, go back > to the form ! > any ideas ? > thanks > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]
At 11:27 AM +0000 1/29/01, kaab kaoutar wrote: >Hi! >What's best ? using client script while validating form >inputs(javasript or vbscript) or using php for validating! >with the first way, i can trigger alert ! however with the second >one, i have to show up a whole page for just saying that there are >errors, go back to the form ! >any ideas ? >thanks > Best way is to do it both ways: JavaScript to make a more user-friendly page, and server-side validation in case JavaScript is disabled AND to catch programs that simulate posts by writing directly to a socket. It's really easy to do that - via telnet to port 80, for example, or via PHP (see the posttohost function at one of the code libraries - see px.sklar.com, or phpbuilder.com, or on of the other resources). - steve -- +--- "They've got a cherry pie there, that'll kill ya" ------------------+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-------------------------------------- FBI Special Agent Dale Cooper ---+
Client side validation is not very secure. Someone may be able to play around with your script and send back whatever they like. Mick On Mon, 29 Jan 2001, kaab kaoutar wrote: > Hi! > What's best ? using client script while validating form inputs(javasript or > vbscript) or using php for validating! > with the first way, i can trigger alert ! however with the second one, i > have to show up a whole page for just saying that there are errors, go back > to the form ! > any ideas ? > thanks > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] > >
G'day PHP'ers I am trying highlight the results from a search, so far I have this working but only if the string is an exact match ie: case sensitive, for example: <?php $keywords = "foo"; $data = "This is a lower foo. This is an upper FOO. This is a ucase Foo"; $lower = strtolower($keywords); $upper = strtoupper($keywords); $ucase = ucwords($keywords); $words = array($lower, $upper, $ucase); while ( list($key, $val) = each($words) ) { $hilite = "<font color=\"#ff0000\">" . $val . "</font>"; $replaced = ereg_replace($val, $hilite, $data); } echo $replaced; ?> Now as metioned this seems to work only for "foo" does anyone have any idea why? Also I need to be able to support mutiple keywords ie: foo Foo FOO, so basically I know I could split(" ", $keywords) then some how traverse the array making a new array of all possible case combinations then in my while loop replace each occurance found in $data with the highlighted replacment, sounds easy hmm.... If anyone has any ideas or can see what I am doing wrong so far, it would be mutch appreciated. Regards, Joseph
In article <[EMAIL PROTECTED]>, "Joseph H Blythe" <[EMAIL PROTECTED]> wrote: What is happening is that you are replacing the variable $replaced on each iteration of the while loop. As a result, $replaced is only storing the most recent match. To see this, try this out: $keywords = "foo"; $data = "This is a lower foo. This is an upper FOO. This is a ucase Foo"; $lower = strtolower($keywords); $upper = strtoupper($keywords); $ucase = ucwords($keywords); $words = array($lower, $upper, $ucase); while ( list($key, $val) = each($words) ) { print("key: $key => val: $val<br>"); $hilite = "<font color=\"#ff0000\">" . $val . "</font>"; $replaced[] = ereg_replace($val, $hilite, $data); } for($i=0;$i<sizeof($replaced);$i++) { echo $replaced[$i]."<br>"; } The first print statement will show you what keywords we are focusing on. The ereg_replace in this case is appending an arrary. If you then walk that array, you will see that each of your keywords was matched and highlited. that should get you a little further along. Jeff > G'day PHP'ers > > I am trying highlight the results from a search, so far I have this > working but only if the string is an exact match ie: case sensitive, for > example: > > <?php > $keywords = "foo"; > $data = "This is a lower foo. This is an upper FOO. This is a ucase > Foo"; > > $lower = strtolower($keywords); > $upper = strtoupper($keywords); > $ucase = ucwords($keywords); > $words = array($lower, $upper, $ucase); > > while ( list($key, $val) = each($words) ) { > $hilite = "<font color=\"#ff0000\">" . $val . "</font>"; > $replaced = ereg_replace($val, $hilite, $data); > } > > echo $replaced; > ?> > > Now as metioned this seems to work only for "foo" does anyone have any > idea why? > > Also I need to be able to support mutiple keywords ie: foo Foo FOO, so > basically I know I could split(" ", $keywords) then some how traverse > the array making a new array of all possible case combinations then in > my while loop replace each occurance found in $data with the highlighted > replacment, sounds easy hmm.... > > If anyone has any ideas or can see what I am doing wrong so far, it > would be mutch appreciated. > > Regards, > > Joseph > >
Hi, We are currently configuring PHP4.0.4 with MySQL and Apache. We *need* to access MySQL via ODBC as well. Which is the best thing to do? There are many options of different ODBC drivers that can be configured, like 'iodbc' or 'openlink' from Openlink or unixODBC. Which driver is best? Which has better administration tools? Which has GUI's? Any comments about pros and cons about each one, functionalities available, ease of installation ? When building PHP, I know I should choose among options like (I quote here from memory): --with-iodbc --with-openlink --with-unixODBC --with-customODBC I tried building it with iODBC support, but make failed because of some source header files needed that were missing. About MyODBC: it is just an API and not the proper driver I suppose. We are going to access the Linux server both locally as well as remotely from Windows98 workstations. So I believe we should install MyODBC only on our Windows clients machines and not on the server, right? What about MySQLGUI? Should I install it only at my windows machines or also on the server. Is it somewhat similar to what I have seen about a unixODBC grphical manager for KDE? Any tips would be greatly appreciated, TIA, Paulo
Hi! i still have'nt found the php_oracle.dll file ! i've checked in php4win.de but in vain! Thanks _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Hey all, I heard somewhere (I think) that it's possible to import a Microsoft Access file (when saved as a delimited text file) into a MySQL table.... Just wondering whether or not this is true, and if it is, where I might find a tutorial / some literature on how I might go about doing it. Thanks, as always, in advance :) James.
There are a few ways to do this... 1) Save your data to a comma separated list and use the import features of mysql. This is the easiest option for one time use. 2) Use MyODBC, create a link table, and paste the rows into it. This is one of the easier options if you plan on doing it repeatedly. Jon Snell -----Original Message----- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 3:46 PM To: [EMAIL PROTECTED] Subject: [PHP] Importing MS Access into MySQL? Hey all, I heard somewhere (I think) that it's possible to import a Microsoft Access file (when saved as a delimited text file) into a MySQL table.... Just wondering whether or not this is true, and if it is, where I might find a tutorial / some literature on how I might go about doing it. Thanks, as always, in advance :) 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]
just what my problem was 2 month ago... here we go: http://dbtools.vila.bol.com.br/ this little toy will seat on your windows machine administering your mySQL database. It has an MSAccess-mySQL import feature very easy to use. Try to do so and check if your data went transferred ok. NOTE: You will need to review your MSAccess table structure, things like field names, properties and other attributes.... make yourself a copy first and play with it for a while ... but it is easy enough to do this way P.S: When I needed it that much I found a bunch of good advices in PHP-General Archives at http://marc.theaimsgroup.com/?l=php-general&r=1&w=2 Cheers, Maxim Maletsky -----Original Message----- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 6:46 AM To: [EMAIL PROTECTED] Subject: [PHP] Importing MS Access into MySQL? Hey all, I heard somewhere (I think) that it's possible to import a Microsoft Access file (when saved as a delimited text file) into a MySQL table.... Just wondering whether or not this is true, and if it is, where I might find a tutorial / some literature on how I might go about doing it. Thanks, as always, in advance :) 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]
Hello, I know this question is out of PHP, but I'll very appreciate if some guru here could help me out. I have a link, which will pop up a new window, but the problem is: I don't know how to resize the new popped-up window. My code is like this: <A HREF="www.intc.com" target="_blank"> intel connection </A> Thank you very much in advance. David _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
Joe, Got it! Thank you very much. Now the codes are like this: <script language=javascript> function openWindow (url) { window.open( url, "target_win",config='directories=yes,location=yes,menubar=yes,toolbar=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=yes,width=600,height=500'); } <A HREF="http://www.intc.com" target="target_win", onclick="openWindow('http://www.intc.com')"> Intel </A> Thanks again, David >From: Joseph Koenig <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: david klein <[EMAIL PROTECTED]> >Subject: Re: [PHP] Resize the pop-up window >Date: Mon, 29 Jan 2001 16:40:53 -0600 > >You'll have to do that with Javascript. Check this page: > >http://htmlgoodies.earthweb.com/beyond/openwin.html > >Good Luck, > >Joe _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
> I have a link, which will pop up a new window, but the problem is: I don't > know how to resize the new popped-up window. > > My code is like this: > > <A HREF="www.intc.com" target="_blank"> intel connection </A> * for 3.0+ browsers open a window with javascript (see www.irt.org window FAQ's) and set size in window features * for 4.0+ browsers maybe there are some DHTML ways to set browser size but i'm sure it will be a headache to make it work for IE as well as NS as well as Mozilla. good luck, Chris -------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
Here's an example from some of my old code: <snip> <SCRIPT LANGUAGE="JavaScript"> <!-- function newWindow(file,window) { msgWindow=open(file,window,'resizable=yes,scrollbars=1,width=900,height=550, screenX=100,screenY=100,top=25,left=25'); if (msgWindow.opener == null) msgWindow.opener = self; } //--></SCRIPT> <? echo '<td><font face="Verdana" size="2"> '; ?><a CLASS="b" href="javascript:newWindow('<?=$PHP_SELF.'?db=users&id='.$rec['id']?>','wind ow<?=$rec['id']?>')"><? echo '<B>'.three_dots(trim($name),0,$sections[$db][3][0]).'</B></font></A></td>'; ?> </snip> hey, this yes WILL HELP YOU ALL: http://developer.irt.org/script/script.htm Lots of good Javascript tips! Cheers, Maxim Maletsky -----Original Message----- From: david klein [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 4:15 AM To: [EMAIL PROTECTED] Subject: [PHP] Resize the pop-up window Hello, I know this question is out of PHP, but I'll very appreciate if some guru here could help me out. I have a link, which will pop up a new window, but the problem is: I don't know how to resize the new popped-up window. My code is like this: <A HREF="www.intc.com" target="_blank"> intel connection </A> Thank you very much in advance. David _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.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]
Hello, Does anyone know how to take a PHP class and move it directly into PHP's C code, OR (even better) to move it into C code that compiles in a separate binary object (e.g. myobj.o), and is then linked to the php executable (or httpd executable)? For example, how can I move this code into C? <? class myObject { function myObject { $this->data = "hello!"; } function hello () { echo $this->data; } } ?> Thanks! -Matt
Take a look at the domxml extension code, for one example. There are other extensions that do this as well. John On Mon, 29 Jan 2001 [EMAIL PROTECTED] wrote: > Hello, > > Does anyone know how to take a PHP class and move it directly into PHP's C > code, OR (even better) to move it into C code that compiles in a separate > binary object (e.g. myobj.o), and is then linked to the php executable (or > httpd executable)? > > For example, how can I move this code into C? > <? > class myObject { > function myObject { > $this->data = "hello!"; > } > function hello () { > echo $this->data; > } > } > ?> > > Thanks! > -Matt > > > > -- John Donagher Application Engineer Intacct Corp. - Powerful Accounting on the Web 408-395-0989 720 University Ave. Los Gatos CA 95032 www.intacct.com -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.0.1 (GNU/Linux) Comment: For info see http://www.gnupg.org mQGiBDnCZ1oRBACFgkFCV6p3dWic1qm1FLhip5beIyzZSt+ccTDYQQdPZA/t5H+k PZ7ZFBIUrXz/oEqwQwlEKlg8JQqg7hgtcL+xrIJ0BInLeSJG4lvvB551g59Thr7/ OsdxNVxKci775+K+GkdAz4xcULMuB+QE7t665Ri46EAS8ALos5UG6DGmhwCguD0v 1cxwy/KlKr+oi4sWM9caueED/RmjiSD3vmBZQt6PMisVe1AmkEf6cJoemduCSJxu 0eMz/LIeu+CqfpuJH2N/dZ3hRj9xMSHF4l71wKqV99zhm58kDGwG1u3yVzULPDqz 0yL+8nunlkoOUyn3zOnh3Zmz4POFVMZQ5oian3QkLllUwly5JCi5tWULxZ2vOkb0 zzjuA/4jigNxYV4NAyCl+wAbnyzk9/Iz8EHv4/0Ex8ytlcMtvBJKa9HjJxlyIl74 yOILHk3+GSAdM0b3ZmbavpoCpebinOMBhqEVBwCI4VUIAqf86gx+2dKBGxfKPnU4 Xxvqs/BOl/EbeJjyd4uieYndGRaWg+kYXqZ7SxrlFN24fohnd7QgSm9obiBEb25h Z2hlciA8am9obkB3ZWJtZXRhLmNvbT6IVgQTEQIAFgUCOcJnWgQLCgQDAxUDAgMW AgECF4AACgkQIt6tVu6+jd3SHwCgjssFktMXf8NjE9JBR+sJ2gDIsW8An0CFNdFd dU+DJYC6ogYP9AsVfM27uQENBDnCZ2MQBAD8E0qe1gBKjtoRmyiyORtwhOz/2XZE mqiZN2NouAUWRRZd4dHggFAA1jUsp2MVIZZQyY9ajNVy3Oaxj5kYz8LR5GItxxcD jC8RFXKM40ZfTJeR7fH6eJa689w+le71Tt4ALyN4xcjSWuksr8795AhHFjonDi8D rgGIq6GtWvi/KwADBgQAmeBbcjPzhqR2M8TdvEyNfVTQSSp/RNoTjNNWpHui8V0p kiQ49tbsqeMjXGToGgMugfmrX77JidXyuVjgYjT9xUdaaA25qKAR75M9izDliT7Y h5L+QZTAw0/5X9go7XK3WI3LYfFrp4TP0veXgSWxDqccqsRzWKW7IoXsliTCbVqI RgQYEQIABgUCOcJnYwAKCRAi3q1W7r6N3YIcAKCkJMTPLu6tOPnXPl2s3xmnSawy BACeOx83WlBhVScYWo+BUzntJ6ks4T0= =OkJU -----END PGP PUBLIC KEY BLOCK-----
Does anyone know of a script that will take data from XML/RDF news feeds and automatically INSERT into a MySQL database? I have a news script that I can make changes to, but I would also like to be able to automatically insert data into the database that my news script is running on.
1. $date = "20010101"; How could I output 01 01 2001 (or make it 3 variables, like day, month, year)? 2. What is the best way to encrypt (using PHP and MySQL)? Could you please answer me directly by mailadr. ([EMAIL PROTECTED]), because I'm currently not a member of this list at home! --------------------------------- Fredrik A. Takle [EMAIL PROTECTED]
$today = getdate(); $month = $today[month]; $mday = $today[mday]; $year = $today[year]; print "$month $mday, $year"; -Brian ********** > -----Original Message----- > From: Fredrik Arild Takle [mailto:[EMAIL PROTECTED]] > Sent: Sunday, January 28, 2001 2:32 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Problem! > > > 1. > $date = "20010101"; > > How could I output 01 01 2001 (or make it 3 variables, like day, > month, year)? > > 2. > What is the best way to encrypt (using PHP and MySQL)? > > Could you please answer me directly by mailadr. > ([EMAIL PROTECTED]), because I'm currently not a member of this > list at home! > > --------------------------------- > Fredrik A. Takle > [EMAIL PROTECTED] > >
<<1. $date = "20010101"; How could I output 01 01 2001 (or make it 3 variables, like day, month, year)?>> $year = substr($date,0,4); $month = substr($date,4,2); $day = substr($date,6,2); ...Assuming that the date is stored in yyyymmdd format.
Stephen, If this date format is coming from a MySQL database (frequently the case), you might want to look at the date formatting functions of MySQL. http://www.mysql.com/doc/D/a/Date_and_time_functions.html. ex. select DATE_FORMAT('1997-10-04 22:23:00', '%W %M %Y'); One drawback is that this is not standard SQL, so it's not too portable, if you are concerned with that. -Ben -----Original Message----- From: Stephan Ahonen [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 5:22 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Problem! <<1. $date = "20010101"; How could I output 01 01 2001 (or make it 3 variables, like day, month, year)?>> $year = substr($date,0,4); $month = substr($date,4,2); $day = substr($date,6,2); ...Assuming that the date is stored in yyyymmdd format. -- 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]
In article <000a01c08960$f60d33e0$6dc94382@hp>, "Fredrik Arild Takle" <[EMAIL PROTECTED]> wrote: $date = "20010101"; $newdate = strtotime($date); $formatted = date("m d Y",$newdate); list($mon, $day, $year) = array(date("m",$newdate),date("d",$newdate),date("Y",$newdate)); > 1. > $date = "20010101"; > > How could I output 01 01 2001 (or make it 3 variables, like day, month, > year)? > > 2. > What is the best way to encrypt (using PHP and MySQL)? > > Could you please answer me directly by mailadr. ([EMAIL PROTECTED]), > because I'm currently not a member of this list at home! > > --------------------------------- > Fredrik A. Takle [EMAIL PROTECTED]
if you are sure $date will *always* be of the same format: function date_manipulator($date=0) { Global $year,$day,$month; // I should update your variables from a previous call, if you don't need it - don't use it ... if($date!=0) { $year = substring($date,0,4); $month = substring($date,4,6); // you mean that the month follows the year? (not clear in your example) $day = substring($date,6,8); return "Today's date is $day $month $year"; or use mktime() etc ... } } Cheers, Maxim Maletsky -----Original Message----- From: Fredrik Arild Takle [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 4:32 AM To: [EMAIL PROTECTED] Subject: [PHP] Problem! 1. $date = "20010101"; How could I output 01 01 2001 (or make it 3 variables, like day, month, year)? 2. What is the best way to encrypt (using PHP and MySQL)? Could you please answer me directly by mailadr. ([EMAIL PROTECTED]), because I'm currently not a member of this list at home! --------------------------------- Fredrik A. Takle [EMAIL PROTECTED]
Changes: - added ability to specify template and compile directory locations independently. - misc documentation updates & additions http://www.phpinsider.com/php/code/Smarty/
hi all, can .inc file run scripts... example... //config.inc function watever() { //do something $var = something; return $var; } thanks
You have to set up the webserver to accept .inc files as php scripts. The example you gave isn't actually running the function it's just defining it. If you include the .inc file in a .php file, it'll run whatever's in it as if it were part of the php file. If you directly call the .inc file from the browser without setting up the webserver properly, it'll output the source of the inc file. If you set up the webserver to use the php parser on inc files, it'll work fine. If you include the .inc file in a .php file, it'll work fine. John LYC wrote: > > hi all, > > can .inc file run scripts... > > example... > > //config.inc > > function watever() > { > //do something > $var = something; > return $var; > } > > 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] -- Shawn Blaylock, ClipperNet Software Engineer [EMAIL PROTECTED] http://www.clipper.net/ Eugene OR 541-431-3360 x406 Toll Free 866-673-6260 x406
Well if your using .inc then your probably including this into a php file via include "config.inc"; in which case it will become part of a php file so yes it will be parsed. If your trying to run it as a standalone then that will depend on your web server config and which files you've told it to parse as php files. -Brian ********* > -----Original Message----- > From: John LYC [mailto:[EMAIL PROTECTED]] > Sent: Sunday, January 28, 2001 6:31 AM > To: PHP List > Subject: [PHP] can .inc run php script? > > > hi all, > > can .inc file run scripts... > > example... > > //config.inc > > function watever() > { > //do something > $var = something; > return $var; > } > > 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] > >
hi all, can .inc file run scripts... example... //config.inc function watever() { //do something $var = something; return $var; } thanks
THANKS EVERYONE!!!... John LYC wrote: > hi all, > > can .inc file run scripts... > > example... > > //config.inc > > function watever() > { > //do something > $var = something; > return $var; > } > > 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]
Yup, you can even run .maxim or .john if you add them into apache's httpd.conf, or without adding anything you can just include() any possible kind of file into .php file and it will be processed just as a .php file. Cheers, Maxim Maletsky -----Original Message----- From: John LYC [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 28, 2001 8:31 PM To: PHP List Subject: [PHP] can .inc run php script? hi all, can .inc file run scripts... example... //config.inc function watever() { //do something $var = something; return $var; } 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]
Thanks a lot. I knew that, but last night I was just really tired :). I wasn't actually copy-pasting the code I had, so what I had at the time was correct as for case. As for assigning the ereg_replace to a variable, I figured that out about 20 minutes after i sent out my last mail last night (then I went into deep depression realizing how stupid of a mistake it was). Thanks for all your help {everyone who helped} --- Dustin Butler <[EMAIL PROTECTED]> > wrote: >Zack, > >Your not going to find {title} when $var = "TITLE". Everything PHP is case >sensitive. Also $string is not changed if there are matches, ereg_replace >returns the modified string. > >HTH >Dustin > > >> I tried ereg_replace("\{" . $var . "\}",$value,$string) and >> it didnt return >> an error... but it didnt replace anything. >> Other ideas ? Either {'s are >> impossible to escape or php just doesnt like me... >> >> --- CC Zona <[EMAIL PROTECTED]> >> > wrote: >> >In article <[EMAIL PROTECTED]>, >> >[EMAIL PROTECTED] (Zack Ham) wrote: >> > >> >> What I'm trying to do is run through it and replace >> {title} with an >> >> appropriate value. I have tried running >> >> ereg_replace("{$var}",$value,$string) and >> >> ereg_replace("\{$var\}",$value,$string). Neither work. >> They either do >> >> nothing or produce the error "Warning: invalid content of \{\}". >> > >> >Is $var=="title" (same case, no leading/trailing whitespace, etc.)? >> > >> >If so, then perhaps try: >> > ereg_replace("\{" . $title . "\}",$value,$string) >> > >> >If not, then perhaps one of these: >> > eregi_replace("\{" . $title . "\}",$value,$string) >> > eregi_replace("\{title\}",$value,$string) _____________________________________________________________ Free email provided by ---> http://sect0r.com
> Your not going to find {title} when $var = "TITLE". Everything PHP is case > sensitive. If it absolutely *has* to be case insensitive, you can use eregi instead of ereg.
When doing this does the $file_name have to be in the current directory or can it be a URL? ----- Original Message ----- From: Bojan Gajic <[EMAIL PROTECTED]> To: Natasha <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, January 27, 2001 2:13 PM Subject: Re: [PHP] Sending Download Header > > header("Content-Disposition: attachment; filename=$file_name"); > header("Content-Type: application/octet-stream"); file://or any other MIME type > .... > echo "Content"; > > HTH, > Bojan Gajic > > > Natasha wrote: > > > Hi, > > > > I'm making a small thing, that sends download response > > to the header, so that I can build a file from some > > data in the mysql, and send the data. It can be both > > text and binary data, could some one help out how to > > go about this ? > > > > I know about Content-Disposition, but I don't know to > > build it. > > > > thanks. > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Auctions - Buy the things you want at great prices. > > http://auctions.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] >
$file_name is just a name that scripts offers to the users in 'save as' dialog. If you want to let them download a 'real' file, you have to use fopen()/fpassthru() (or anything else you can think of, in order to open a file and print it's content) and fopen can take URL as an argument. HTH, Bojan Gajic WreckRman2 wrote: > When doing this does the $file_name have to be in the current directory or > can it be a URL? > > ----- Original Message ----- > From: Bojan Gajic <[EMAIL PROTECTED]> > To: Natasha <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Saturday, January 27, 2001 2:13 PM > Subject: Re: [PHP] Sending Download Header > > > > > header("Content-Disposition: attachment; filename=$file_name"); > > header("Content-Type: application/octet-stream"); file://or any other MIME > type > > .... > > echo "Content"; > > > > HTH, > > Bojan Gajic > > > >
The filename is just the name, the content is what matters, and also wanted to know if echoing binary data is ok ? and what about images, can i send it through octect stream ? will they turn up right ? --- WreckRman2 <[EMAIL PROTECTED]> wrote: > When doing this does the $file_name have to be in > the current directory or > can it be a URL? > > > ----- Original Message ----- > From: Bojan Gajic <[EMAIL PROTECTED]> > To: Natasha <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Saturday, January 27, 2001 2:13 PM > Subject: Re: [PHP] Sending Download Header > > > > > > header("Content-Disposition: attachment; > filename=$file_name"); > > header("Content-Type: application/octet-stream"); > file://or any other MIME > type > > .... > > echo "Content"; > > > > HTH, > > Bojan Gajic > > > > > > Natasha wrote: > > > > > Hi, > > > > > > I'm making a small thing, that sends download > response > > > to the header, so that I can build a file from > some > > > data in the mysql, and send the data. It can be > both > > > text and binary data, could some one help out > how to > > > go about this ? > > > > > > I know about Content-Disposition, but I don't > know to > > > build it. > > > > > > thanks. > > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Yahoo! Auctions - Buy the things you want at > great prices. > > > http://auctions.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] > > > __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
I normally solve this problem by doing a "< 10" test, on the assumption it is quicker. Something like for ($i=00;$i<$daysinmonth;$i++) { $str_i= (string) $i; if ( $i < 10 ) { $str_i = "0$str_i"; } if ($i == $day) { echo("<option SELECTED value=\"$str_i\">$str_i</option>\n"); } else { echo("<option value=\"$str_i\">$str_i</option>\n"); } } ><? echo"<select name=\"form_date_day\">"; > $day = (date ("d")); > $daysinmonth = (date("t")); > for ($i=00;$i<$daysinmonth;$i++){ > if ($i == $day) { > echo("<option SELECTED value=\"$i\">$i</option>\n"); > } else { > echo("<option value=\"$i\">$i</option>\n"); > } > } > echo"</select>" > ?> At 01:07 26/01/2001 +0800, you wrote: >I need to enable a user to insert an 'NEWS' item into a mySQL table one of >the definable limits for the user is to be the date that the news is to be >displayed. Currently the collum is in a 'date' format and should be stored >in a YYYYMMDD - being Australian we are used to the exact reverse of that so >I though it best to produce a series of three select options in html and >then joing the values before inserting them > > $form_date = $form_date_Year . $form_date_month . $form_date_day; > >CRUX: the looping format I'm using to make the options needs to output a 2 >digit number as a single digit like 1 as compared to 01 will invalidate the >date > >Sample of a loop I use to output an option > ><? echo"<select name=\"form_date_day\">"; > $day = (date ("d")); > $daysinmonth = (date("t")); > for ($i=00;$i<$daysinmonth;$i++){ > if ($i == $day) { > echo("<option SELECTED value=\"$i\">$i</option>\n"); > } else { > echo("<option value=\"$i\">$i</option>\n"); > } > } > echo"</select>" > ?> > >Any help will be apreciated >Jamie ------------------------- Brian White Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [EMAIL PROTECTED]
Is this a never expiring cookie, or a "per" session cookie? I want to create a never expiring cooky. SetCookie ("MyNeverExpiringCookie", "This cookie should never expire"); Thanks! Karl
> Is this a never expiring cookie, or a "per" session cookie? I want to > create a never expiring cooky. > > SetCookie ("MyNeverExpiringCookie", "This cookie should never expire"); That is a session cookie. It will disappear when the user closes the browser. The Cookie spec puts an upper bound on how long you can set the expiration of a Cookie, I think... And I think it's like 2 years... You can always update the cookie when somebody visits your site again. Let's face it, if they haven't come back within 2 years, they really aren't going to remember any context from your cookie anyway.
I haven't received mail from the PHP list since the 27th. Is it down? Please respond to: [EMAIL PROTECTED] Thank you. Karl
On Sunday 28 January 2001 03:57, [ rswfire ] wrote: > 1. Why does $PHP_SELF include /php/php.exe in the variable? How can I > stop it from doing that? You're using PHP as CGI. Try using the shared module. > 2. Same thing with $SCRIPT_NAME as $PHP_SELF except it does not > include the filename. It does, except it does not?? > 3. How can I turn on directory browsing? I am receiving a Forbidden > error whenever there isn't a default document in a directory. search for "Options " in your apache configs and add an "Inexes" to it -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him.
On Sat, Jan 27, 2001 at 09:57:35PM -0500, [ rswfire ] wrote : > 3. How can I turn on directory browsing? I am receiving a Forbidden error > whenever there isn't a default document in a directory. htpd.conf: <Directory foobar> Options Indexes </Directory> or in .htaccess Options Indexes You'll find all documentation at apaches website [1]. m. [1] http://httpd.apache.org/docs/mod/directives.html -- Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/ EMail: [EMAIL PROTECTED] PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
This isn't going to work the way it's set up now. Javascript is processed by the visitor's browser, while PHP is processed by the server before the page is ever sent. So in essence, PHP doesn't care one bit what anything outside of the <?php ?> tags does. Therefore, you're instructing PHP to do this: mail( That doesn't mean anymore to PHP than it does to me. It's definately not a function without the arguments and closing paren. If you're not following me, I suggest you go read up in the PHP manual and any sites you can find on the links page; you might even check the archives of this list, I know we've been over it several times. It's a matter of client-side scripting vs. server-side scripting. --toby Fang Li wrote: > > Hi All: > > Would anyone tell me how to correct the code in mail( ) function? Thanks a > lot. > > <html> > <head> > <scrip language="JavaScrip"> > function askEmailAddress( ){ > var inputedData = prompt("The email address you want send to:"," >"); > if(confirm("The email address you want send to is" + inputedData + > "?")){ > alert("OK, the article will send to " + inputedData + "!"); > } > } > </script> > </head> > > <body> > ....... > > <?php > mail(?> <script language="JavaScript"> document.write(inputed_data)</script> > <?php , "My Subject", "Line 1\nLine 2\nLine 3"); ?> > > </body> > </html> > > Fang Li > > -- > 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]
Can anyone tell me why this piece of code is not working - I'm finding that if I pass values rather then the HTTP_COOKIE_VARS["cookiename"] to the function it seems to work but I want to have this value a variable cookie (for obvious reasons). I cannot seem to find any more information on this function other then it is better to use this method rather then just using the $cookiename variable as it stops the variable being passed through the URL - though using these variables works fine. //a function to load Registered Users pref's overiteing Guest pref's function PrefResults($user, $password) { global $DB_Server, $HTTP_Host, $DB_Login, $DB_Password, $DB_Name, $DocRoot, $language_pref, $currency_pref, $notifyme_pref, $page_pref; $db = mysql_connect("$DB_Server", "$DB_Login","$DB_Password"); mysql_select_db("$DB_Name",$db); $result = mysql_query("SELECT language_pref, currency_pref, page_pref, notifyme_pref FROM users WHERE user_id=$user AND password=$password",$db); $pref_settings = mysql_fetch_array($result); $language_pref = $pref_settings["language_pref"]; $currency_pref = $pref_settings["currency_pref"]; $notifyme_pref = $pref_settings["notifyme_pref"]; $page_pref = $pref_settings["page_pref"]; } PrefResults($HTTP_COOKIE_VARS["cookie_user"],$HTTP_COOKIE_VARS["cookie_passw ord"]);
Can anyone tell me why this piece of code is not working - I'm finding that if I pass values rather then the HTTP_COOKIE_VARS["cookiename"] to the function it seems to work but I want to have this value a variable cookie (for obvious reasons). I cannot seem to find any more information on this function other then it is better to use this method rather then just using the $cookiename variable as it stops the variable being passed through the URL - though using these variables works fine. //a function to load Registered Users pref's overiteing Guest pref's function PrefResults($user, $password) { global $DB_Server, $HTTP_Host, $DB_Login, $DB_Password, $DB_Name, $DocRoot, $language_pref, $currency_pref, $notifyme_pref, $page_pref; $db = mysql_connect("$DB_Server", "$DB_Login","$DB_Password"); mysql_select_db("$DB_Name",$db); $result = mysql_query("SELECT language_pref, currency_pref, page_pref, notifyme_pref FROM users WHERE user_id=$user AND password=$password",$db); $pref_settings = mysql_fetch_array($result); $language_pref = $pref_settings["language_pref"]; $currency_pref = $pref_settings["currency_pref"]; $notifyme_pref = $pref_settings["notifyme_pref"]; $page_pref = $pref_settings["page_pref"]; } PrefResults($HTTP_COOKIE_VARS["cookie_user"],$HTTP_COOKIE_VARS["cookie_passw ord"]); Regards Jamie
Hey all, I've come to the realization that if I intend to be able to write a file to disk AS it's being uploaded via http, I will need to modify the PHP source directly. Just wondering, anyone know in what source file I should be looking for the HTTP UPLOAD handling code, I've looked through quite a few files in the /ext/standard source directory, to no avail yet. Thank you in advance to any and all for your help Tim Meader [EMAIL PROTECTED] ACS Government Solutions Group
I don't believe this is a PHP function, but rather a function of the browser if using the <INPUT TYPE="file"> Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com ================================= > -----Original Message----- > From: Tim Meader [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 29, 2001 8:36 AM > To: [EMAIL PROTECTED] > Subject: [PHP] LOOKING FOR CODE LOCATION IN PHP SOURCE.... > > > Hey all, I've come to the realization that if I intend to be able > to write > a file to disk AS it's being uploaded via http, I will need to modify the > PHP source directly. Just wondering, anyone know in what source file I > should be looking for the HTTP UPLOAD handling code, I've looked through > quite a few files in the /ext/standard source directory, to no avail yet. > Thank you in advance to any and all for your help > > > Tim Meader > [EMAIL PROTECTED] > ACS Government Solutions Group > > > -- > 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] > > >
Frank Joerdens wrote: > On Fri, Jan 26, 2001 at 11:01:14AM +0000, Nuno Silva wrote: > [ . . . ] > >> i ran across this transaction problem vs. persistent conn in pgsql some time ago. >> >> I found two workaround methods: >> - don't use persistent conn's :-) or; >> - start every conn with the usual pg_pconnect and then query a rollback to the >server: >> $query="ROLLBACK work;" >> >> (this will kill any supposed transaction in ABORT STATE that some child had left). >> >> postgres don't support nested transactions (yet), but when it does maybe you should >add multiple "ROLLBACK WORK;" queries :-) > > > Ah. Very cool. What I _still_ don't quite understand, though, is _how_ > exactly this situation could come about. And what the worst case would > be. What if you don't kill the transaction in ABORT STATE? > > Ta, Frank > Hi, this happens because pg_pconnect don't know about transactions. If some transaction reach ABORT and for some reason the script never makes it to COMMIT or ABORT queries the postgresql backend will be _always_ in ABORT STATE. The problem is present in several combinations... for instance: in mysql you could make the connection with one user to database X. While logged in you could change to database Y.... This database backend will be in database Y after that! Even if you persistent_connect with the original parameters! This is because the backend is never terminated and retains the last state, being it a ABORT STATE or another DB... :) queriing "ROLLBACK WORK;" right after the conect is my best shot at this one. Regards, Nuno Silva
I set up a cookie using the following command and it works fine under IE but not in Netscape. Am I doing something wrong? setcookie("mycookie[1]",$domain,"","/","mydomain.com"); Please help me. Thanks much in advance.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 29 Jan 2001, Eugene Yi (InfoSpace Inc) wrote: > I set up a cookie using the following command and it works fine under IE but > not in Netscape. Am I doing something wrong? > > setcookie("mycookie[1]",$domain,"","/","mydomain.com"); Should be: setcookie("mycookie[1]", $domain, 0, "/", "mydomain.com"); the expire time is an integer, not a string. - -- Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org> URI:www.synfin.net They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 9817 F86E DAE6 All emails by me are PGP signed; a lack of a signature indicates a forgery. I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E 60BF 451B 20E8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc iEYEARECAAYFAjp17rkACgkQhweYF/hu2ubpNgCdH1/7RrnWldqfUfjJntSSe3D9 lhEAnjquZx1k+m+LgPzZV0xSr/k15iNJ =iVu3 -----END PGP SIGNATURE-----
Thank you for your feedback! I tried it but it didn't make a difference. I printed the var right after the set and it returns null. setcookie("cbcookie1",$domain,0,"/","mydomain.com"); $domain = $HTTP_COOKIE_VARS["cbcookie1"]; echo "domain($domain)<br>"; > -----Original Message----- > From: Aaron D. Turner [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 29, 2001 2:29 PM > To: Eugene Yi (InfoSpace Inc) > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Cookie with Netscape > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > On Mon, 29 Jan 2001, Eugene Yi (InfoSpace Inc) wrote: > > > I set up a cookie using the following command and it works > fine under IE but > > not in Netscape. Am I doing something wrong? > > > > setcookie("mycookie[1]",$domain,"","/","mydomain.com"); > > Should be: > > setcookie("mycookie[1]", $domain, 0, "/", "mydomain.com"); > > the expire time is an integer, not a string. > > - -- > Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org> > URI:www.synfin.net > They that can give up essential liberty to obtain a little > temporary safety > deserve neither liberty nor safety. -- Benjamin Franklin > > pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 > 9817 F86E DAE6 > All emails by me are PGP signed; a lack of a signature > indicates a forgery. > I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E > 60BF 451B 20E8 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.4 (GNU/Linux) > Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc > > iEYEARECAAYFAjp17rkACgkQhweYF/hu2ubpNgCdH1/7RrnWldqfUfjJntSSe3D9 > lhEAnjquZx1k+m+LgPzZV0xSr/k15iNJ > =iVu3 > -----END PGP SIGNATURE----- > >
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 That's becuase the cookie variable is not available to PHP until the next page load. It's a limitation of cookies/HTTP not PHP. On Mon, 29 Jan 2001, Eugene Yi (InfoSpace Inc) wrote: > Thank you for your feedback! I tried it but it didn't make a difference. I > printed the var right after the set and it returns null. > > setcookie("cbcookie1",$domain,0,"/","mydomain.com"); > $domain = $HTTP_COOKIE_VARS["cbcookie1"]; > echo "domain($domain)<br>"; > > > -----Original Message----- > > From: Aaron D. Turner [mailto:[EMAIL PROTECTED]] > > Sent: Monday, January 29, 2001 2:29 PM > > To: Eugene Yi (InfoSpace Inc) > > Cc: [EMAIL PROTECTED] > > Subject: Re: [PHP] Cookie with Netscape > > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > > > On Mon, 29 Jan 2001, Eugene Yi (InfoSpace Inc) wrote: > > > > > I set up a cookie using the following command and it works > > fine under IE but > > > not in Netscape. Am I doing something wrong? > > > > > > setcookie("mycookie[1]",$domain,"","/","mydomain.com"); > > > > Should be: > > > > setcookie("mycookie[1]", $domain, 0, "/", "mydomain.com"); > > > > the expire time is an integer, not a string. > > > > - -- > > Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org> > > URI:www.synfin.net > > They that can give up essential liberty to obtain a little > > temporary safety > > deserve neither liberty nor safety. -- Benjamin Franklin > > > > pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 > > 9817 F86E DAE6 > > All emails by me are PGP signed; a lack of a signature > > indicates a forgery. > > I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E > > 60BF 451B 20E8 > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.4 (GNU/Linux) > > Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc > > > > iEYEARECAAYFAjp17rkACgkQhweYF/hu2ubpNgCdH1/7RrnWldqfUfjJntSSe3D9 > > lhEAnjquZx1k+m+LgPzZV0xSr/k15iNJ > > =iVu3 > > -----END PGP SIGNATURE----- > > > > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc iEYEARECAAYFAjp18dUACgkQhweYF/hu2uZ+LwCfZfjsoyS7ZLXCyZs+9BwYEhCR 4KkAnj39fqbYrykBB1TovSGx4kMBQ9gN =rwDT -----END PGP SIGNATURE-----
Yeah, that's what I read from the documentation but it works in IE. I mean I place the print right after the setcookie command, and it prints the cookie value when successfully set. Of course, the next page will fail because of the print before header. > -----Original Message----- > From: Aaron D. Turner [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 29, 2001 2:42 PM > To: Eugene Yi (InfoSpace Inc) > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Cookie with Netscape > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > That's becuase the cookie variable is not available to PHP > until the next > page load. It's a limitation of cookies/HTTP not PHP. > > On Mon, 29 Jan 2001, Eugene Yi (InfoSpace Inc) wrote: > > > Thank you for your feedback! I tried it but it didn't make > a difference. I > > printed the var right after the set and it returns null. > > > > setcookie("cbcookie1",$domain,0,"/","mydomain.com"); > > $domain = $HTTP_COOKIE_VARS["cbcookie1"]; > > echo "domain($domain)<br>"; > > > > > -----Original Message----- > > > From: Aaron D. Turner [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, January 29, 2001 2:29 PM > > > To: Eugene Yi (InfoSpace Inc) > > > Cc: [EMAIL PROTECTED] > > > Subject: Re: [PHP] Cookie with Netscape > > > > > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > > > > > On Mon, 29 Jan 2001, Eugene Yi (InfoSpace Inc) wrote: > > > > > > > I set up a cookie using the following command and it works > > > fine under IE but > > > > not in Netscape. Am I doing something wrong? > > > > > > > > setcookie("mycookie[1]",$domain,"","/","mydomain.com"); > > > > > > Should be: > > > > > > setcookie("mycookie[1]", $domain, 0, "/", "mydomain.com"); > > > > > > the expire time is an integer, not a string. > > > > > > - -- > > > Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org> > > > URI:www.synfin.net > > > They that can give up essential liberty to obtain a little > > > temporary safety > > > deserve neither liberty nor safety. -- Benjamin Franklin > > > > > > pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 > > > 9817 F86E DAE6 > > > All emails by me are PGP signed; a lack of a signature > > > indicates a forgery. > > > I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E > > > 60BF 451B 20E8 > > > -----BEGIN PGP SIGNATURE----- > > > Version: GnuPG v1.0.4 (GNU/Linux) > > > Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc > > > > > > iEYEARECAAYFAjp17rkACgkQhweYF/hu2ubpNgCdH1/7RrnWldqfUfjJntSSe3D9 > > > lhEAnjquZx1k+m+LgPzZV0xSr/k15iNJ > > > =iVu3 > > > -----END PGP SIGNATURE----- > > > > > > > > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.4 (GNU/Linux) > Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc > > iEYEARECAAYFAjp18dUACgkQhweYF/hu2uZ+LwCfZfjsoyS7ZLXCyZs+9BwYEhCR > 4KkAnj39fqbYrykBB1TovSGx4kMBQ9gN > =rwDT > -----END PGP SIGNATURE----- > >
"Eugene Yi (InfoSpace Inc)" wrote: > > Thank you for your feedback! I tried it but it didn't make a difference. I > printed the var right after the set and it returns null. > > setcookie("cbcookie1",$domain,0,"/","mydomain.com"); > $domain = $HTTP_COOKIE_VARS["cbcookie1"]; > echo "domain($domain)<br>"; ahem, I think you shall see the cookie after a round trip to the browser. if you set it w/ setCookie() it won't be available right away in HTTP_COOKIE_VARS. only on the next calls to the page, cause the client has to receive it, accept it (eventually) and send it back. when she sends it back, it is in fact a HTTP header, so it will be parsed and avaiable in that http array. -- teodor
Anyone out there that can help before my brain gets to hot? http://www.sakshaug.net/phps/loop.phps I have tried many different ways, but i'm for sure that you have to use recursive function for make this one... for ($iamgoingtomakeit=1; ;;) { echo "I'm going to make it!!!<br>"; } *take care* Best Regards, Christian Sakshaug -- Email: [EMAIL PROTECTED] Web: www.sakshaug.net Tel: +47 913 95 618
Does anyone know why the list keeps going down ? The last PHP List email I received was at 6 o clock my time Sunday morning, until a few minutes ago. Its not the first time it has happened. Adrian
> Does anyone know why the list keeps going down ? It hasn't happened for a while until now - I wouldn't worry myself too much over it :)
I have searched the archives, php.net and zend.com, and cannot seem to come up with an answer as to why this isn't woking... I have the following code snippet stored in a database, and I'm trying to eval it with this line of code: $cVar = addslashes( $qrNews[$cContentField . "Text"] ); eval( "<? " . $cVar . " ?>" ); I've tried: eval( $cVar . " ?>" ); eval( "?> " . $cVar ); and I cannot get the code snippet to actually evaluate... here's the output I actually do get: TCE's Canvas Chat (Java Applet) if( !( $myFile = open( \"http://wizaerd.com/cgi-sys/mchat.cgi?channel=wizaerd.com\", \"r\" ))) { print( \"Cannot be opened\" ); exit; } while( !feof( $myFile )) { $myLine = fgets( $myFile, 255 ); print( $myLine . \" \" ); } fclose( $myFile ); Parse error: parse error in Unknown on line 0 the code in the database is correct cuz I can drop it into a PHP page and it runs as expected... Could somebody give me a hand with this? Thanx --- code as is in database ------- if( !( $myFile = open( "http://wizaerd.com/cgi-sys/mchat.cgi?channel=wizaerd.com", "r" ))) { print( "Cannot be opened" ); exit; } while( !feof( $myFile )) { $myLine = fgets( $myFile, 255 ); print( $myLine . "<BR>" ); } fclose( $myFile ); Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com =================================
I don't know if anybody is curious or not, but I found my own problem... I changed the following code: $cVar = addslashes( $qrNews[$cContentField . "Text"] ); eval( "<? " . $cVar . " ?>" ); to: $cVar = $qrNews[$cContentField . "Text"]; eval( $cVar ); SO basically I removed the addslashes() (which I thought were necessary since the code snippet had quotes in them) and the <? and ?> from the eval funciton call, and it works as expected.... Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com ================================= > -----Original Message----- > From: Joe Sheble (Wizaerd) [mailto:[EMAIL PROTECTED]] > Sent: Sunday, January 28, 2001 12:44 PM > To: General PHP List > Subject: confused about eval() > > > I have searched the archives, php.net and zend.com, and cannot > seem to come up with an answer as to why this isn't woking... > > I have the following code snippet stored in a database, and I'm > trying to eval it with this line of code: > > $cVar = addslashes( $qrNews[$cContentField . "Text"] ); > eval( "<? " . $cVar . " ?>" ); > > I've tried: > eval( $cVar . " ?>" ); > eval( "?> " . $cVar ); > > and I cannot get the code snippet to actually evaluate... here's > the output I actually do get: > > TCE's Canvas Chat (Java Applet) > if( !( $myFile = en( > \"http://wizaerd.com/cgi-sys/mchat.cgi?channel=wizaerd.com\", > \"r\" ))) { print( \"Cannot be opened\" ); exit; } while( !feof( > $myFile )) { $myLine = fgets( $myFile, 255 ); print( $myLine . \" > \" ); } fclose( $myFile ); > Parse error: parse error in Unknown on line 0 > > the code in the database is correct cuz I can drop it into a PHP > page and it runs as expected... > > Could somebody give me a hand with this? > Thanx > > > --- code as is in database ------- > if( !( $myFile = fopen( "http://wizaerd.com/cgi-sys/mchat.cgi?channel=wizaerd.com", "r" ))) { print( "Cannot be opened" ); exit; } while( !feof( $myFile )) { $myLine = fgets( $myFile, 255 ); print( $myLine . "<BR>" ); } fclose( $myFile ); Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com =================================
I haven't received any emails from this list in over 24 hours... is it down or it it me just not receiving them.... Joseph E. Sheble [EMAIL PROTECTED] ======================== Wizaerd's Realm http://www.wizaerd.com
Yeah, apparently the server was a bit down these hours ... no one received anything ... Cheers, Maxim Maletsky -----Original Message----- From: Joe Sheble aka Wizaerd [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 10:52 PM To: [EMAIL PROTECTED] Subject: [PHP] testing I haven't received any emails from this list in over 24 hours... is it down or it it me just not receiving them.... Joseph E. Sheble [EMAIL PROTECTED] ======================== Wizaerd's Realm http://www.wizaerd.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]
> There's a very cool service out there, you can go to for instance > ba.whois-servers.net to find server for .ba. > > So you can basically go to ${TLD}.whois-servers.net to find server for > $TLD. The trouble is that it's not really current. [jason@phpdev jason]$ nslookup es.whois-servers.net Name: whois.ripe.net Address: 193.0.0.129 Aliases: es.whois-servers.net ... no, thats not the right server. Some ccTLD's just don't *have* public whois servers. (ES is one of them, I contacted them and asked for their whois server address and they said to use their web interface, since giving me the IP would constitute a security risk(!)) Remember a good chunk of ccTLD registries are still being run from a single machine tucked under a desk in an office somewhere, too. A few months ago I spent a few days tracking down whois web interfaces and servers, and made the information into a nice little MySQL database, along with some PHP3 scripts that'll query it using either the server (if found) or pointing people to the web interfaces with the appropriate variables filled in to their form submission. You can see it running on www.inww.es in the WhoIs and the Availability Check areas (try doing an nslookup of that at es.whois-servers.net :)). Anyone interested in the data structure and underlying scripts, let me know and I'll see what I can do about packaging it up. Jason -- Jason Murray [EMAIL PROTECTED] Web Design Team, Melbourne IT Fetch the comfy chair!
Does anyone know why the list keeps going down ? The last PHP List email I received was at 6 o clock my time Sunday morning, until a few minutes ago. Its not the first time it has happened. Has the list gone down for anyone else ? Adrian
I was wondering if anyone has set it up from a website. the problem i am having is it does send the comfirmation back i have mail("$majordomo", "", "$action $list $email","From: $email"); where $action is subscribe or unsubscribe and $list is oe they pick Thanks ALan /'^'\ ( o o ) -----------------------oOOO--(_)--OOOo---- Alan Todd Infoave.net Web Development ICQ : 159944 E-Mail : [EMAIL PROTECTED]
I missed the beginning of this thread, I've got a subscribe routine set up on a website for Majordomo, what are you trying to do? Bring me up to speed.... -Brian > -----Original Message----- > From: Alan Todd [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 29, 2001 10:33 AM > To: Phpg > Subject: [PHP] Problems with majodomo > > > I was wondering if anyone has set it up from a website. the problem i am > having is it does send the comfirmation back > i have > mail("$majordomo", "", "$action $list $email","From: $email"); > where $action is subscribe or unsubscribe and $list is oe they pick > > Thanks > ALan > > /'^'\ > ( o o ) > -----------------------oOOO--(_)--OOOo---- > Alan Todd > Infoave.net > Web Development > ICQ : 159944 > 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] > >
John, There are various reasons why what you suggested will not happen, if you really want to see why look in the archives there are plenty of posts. You have a delete key so use it. Rasmus already has Spam filters for the list but they only block certain email address' these are added, blocking *@yahoo.com isn't really an option either, so use you delete key, stop complaining and don't worry about it, yes it is annoying but every piece of Spam on the lists is reported to the correct people by me, im sure others do the same too, all of the last three Spam posts from yahoo accounts have been reported and yahoo have been very efficient at shutting them down and apologising. James > -----Original Message----- > From: Jonathan Sharp [mailto:[EMAIL PROTECTED]] > Sent: 28 January 2001 03:59 > To: tabathia; [EMAIL PROTECTED] > Subject: RE: [PHP] E Bay is going up again.. > > > Do I have to repeat myself about this topic? Sheesh! > > -Codeboy >
I want to put the php.ini in /etc/php Which argument do I have to attach to ./configure --?=/etc/php to accomplish this ? THX
Hi, I'm not sure but I think it's "--with-config-file-path=/path/to/dir. Good Luck Johannes ""Steve Haemelinck"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 003901c08a14$3f692bd0$0200a8c0@shaemeli">news:003901c08a14$3f692bd0$0200a8c0@shaemeli... > I want to put the php.ini in /etc/php > > Which argument do I have to attach to ./configure --?=/etc/php to accomplish > this ? > > THX > > > -- > 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] >
On Mon, 29 Jan 2001, Steve Haemelinck wrote: >I want to put the php.ini in /etc/php > >Which argument do I have to attach to ./configure --?=/etc/php to accomplish >this ? Try running ./configure --help sometimes.. :) Anyway, the right argument is --with-config-file-path --Jani
hi all, when i am trying to calculate the number of rows with a '0' in a particular column using the following code, it is giving the 'Maximum execution time exceeded' message, eventhough after i gave set_time_limit(60), it didn't worked, infact now it is even worse the browser is getting siezed. $result=mysql_query("select * from mytable"); while ($avgrow=mysql_fetch_array($result)) { $prescene2 = $avgrow["scene2"]; $prescene4 = $avgrow["scene4"]; $prescene5 = $avgrow["scene5"]; $prescene7 = $avgrow["scene7"]; $prescene8 = $avgrow["scene8"]; $prescene9 = $avgrow["scene9"]; $i = 1; while ($prescene2 == 0) { $i=$i+1; } } printf ("Number of zeros=%d",$i); Can any one please help me with this. TIA kalyan __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
Of course, you have this code: > while ($prescene2 == 0) { > $i=$i+1; > } Where $prescnene2 is not modified, hence you get an endless loop. When you increase the timeout, that loop just gets longer to run. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. ----- Original Message ----- From: "Chakravarthy K Sannedhi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 29, 2001 2:37 PM Subject: [PHP] Maximum execution time exceeded! > hi all, > > when i am trying to calculate the number of rows with a '0' in a > particular column using the following code, it is giving the 'Maximum > execution time exceeded' message, eventhough after i gave > set_time_limit(60), it didn't worked, infact now it is even worse the > browser is getting siezed. > > $result=mysql_query("select * from mytable"); > while ($avgrow=mysql_fetch_array($result)) > { > $prescene2 = $avgrow["scene2"]; > $prescene4 = $avgrow["scene4"]; > $prescene5 = $avgrow["scene5"]; > $prescene7 = $avgrow["scene7"]; > $prescene8 = $avgrow["scene8"]; > $prescene9 = $avgrow["scene9"]; > $i = 1; > while ($prescene2 == 0) { > $i=$i+1; > } > } > printf ("Number of zeros=%d",$i); > > Can any one please help me with this. > > TIA > kalyan > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - Buy the things you want at great prices. > http://auctions.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] >
That loop will never end. Generally, the loop body should manipulate some part of the loop ending condition. initialize $i before the loop replace the second loop with "if($prescene2==0){$i++;}" Chakravarthy K Sannedhi wrote: > > hi all, > > when i am trying to calculate the number of rows with a '0' in a > particular column using the following code, it is giving the 'Maximum > execution time exceeded' message, eventhough after i gave > set_time_limit(60), it didn't worked, infact now it is even worse the > browser is getting siezed. > > $result=mysql_query("select * from mytable"); > while ($avgrow=mysql_fetch_array($result)) > { > $prescene2 = $avgrow["scene2"]; > $prescene4 = $avgrow["scene4"]; > $prescene5 = $avgrow["scene5"]; > $prescene7 = $avgrow["scene7"]; > $prescene8 = $avgrow["scene8"]; > $prescene9 = $avgrow["scene9"]; > $i = 1; > while ($prescene2 == 0) { > $i=$i+1; > } > } > printf ("Number of zeros=%d",$i); > > Can any one please help me with this. > > TIA > kalyan > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - Buy the things you want at great prices. > http://auctions.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]
At 06:48 28.01.2001, Rasmus Lerdorf said: --------------------[snip]-------------------- >There is an ISAPI module. --------------------[snip]-------------------- yes, which is more than unstable as I found... Using a good machine (2xXeon 550, 512 MB, NT4/SP6a/IIS4) it constantly crashed being a filter, and crashed being used as MIME plugin latest at the 6th page access. ...ebird >O Ernest E. Vogelsinger (\) http://www.1-at-web.at/ ^ ICQ# 13394035
Howdy, The company I work for has developed a backup daemon for MySQL (Windows and x86 Linux) that uses a php web interface. We will be destributing it commercially, but would like to offer it for beta testing to a limited number of users. If anyone here has interest in testing the software, please contact us at [EMAIL PROTECTED] Please, do NOT reply to the list!! I'm sending the offer to the list because I feel that users of this list, many of whom use MySQL on a daily basis, could greatly benefit from such a tool and are likely to represent the needs of our customers. Its suppose to work for regularly scheduled backup of multiple servers as well as restore the databases should all hell break loose. If you are interested, please send an e-mail to < [EMAIL PROTECTED] > including what platform (Wndows, Linux, both) you would like to run it on, and we'll send you more information. We plan to make it available for linux on PowerPC and Sparc64 as well, but not now. Thank you for your time. -=-=-=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters Abriasoft Senior Developer http://www.abriasoft.com/ (510) 623-9726x357 Fax: (510) 249-9125
I know this has been discussed several times before, but the only actual class I've found information on - tap internet - had a problem and cancelled their class. I am willing to travel within the US to take a comprehensive PHP and/or mySQL/PHP class, but I can't find one to take. Could you please share any/all information you have on PHP classes that are now available? -=- christopher calicott P L U S H, L T D. 7979 Westheimer #1601 Houston, Texas 77063 Main: (713) 789-0690 Cell: (832) 689-6009 ICQ: 2520536 www.pureplush.com
I don't think it is easy to steal the password by using PHP_AUTH_PW. PHP_AUTH_PW is cached in the browser, if you exit the browser, nobody can steal it. If the other people is using a different browser, there is no way for him to steal it even if he is accessing the same URL. Just my understanding. David >From: Chen Shiyuan <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: [PHP] AUTH_PW & External Authentication >Date: Fri, 26 Jan 2001 23:50:17 +0800 (SGT) > >Hello everyone! > >I am currently using Apache-1.3.14 with php-4.0.4pl1 compiled statically >into it and running on RedHat Linux 6.2 . Apache is configured to do >authentication for certain URLs via a auth_ldap module which is >dynamically loaded when Apache starts. > >I noticed that when I access the protected URL, PHP_AUTH_PW will give me >the password for the user who is currently logged to the protected site. >If I recall correctly, earlier versions of PHP4 and PHP3 didn't have >this "feature" . > >This "feature" creates a problem when the protected URL is shared by >many parties with each party providing it's own services under the >protected URL as any party would be able to "steal" the >username/password without the end user knowing. The username/password is >used to control who has access to the protected URL and the parties are >not required to make use of the password. > >Is there anyway to disable this "feature" or is the disclosure of the >password a bug? > >Many thanks for any advice! > >-- >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] > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
Hi, Which are the functions of php to controler a data base Microsoft SQL 7? >From which version is possible PHP - MSSQL? I have that to install some module? Tanks, Santhyago
What is the best way to display thumbnail photos and their titles with HTML/PHP? Table? If I do <table width="100%"> and <td width="750"> all works fine - the <img>'s "word wrap". But, when I do <table width="100%"> and <td width="100%">, I get a horizontal scroll bar and the <img>'s go off to the left. Todd -- Todd Cary Ariste Software [EMAIL PROTECTED]
Whenever I include files in Apache I always do it like this: include($DOCUMENT_ROOT."/folder/file.php"); However, now I am doing a site in IIS and I do not have $DOCUMENT_ROOT at my disposal. What do most of you usually do to workaround this? Aside from installing Apache and Linux and bypassing the whole Windows thing :) Thanks, Toby
In article <039901c08a48$3d4b5740$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Toby Miller") wrote: > Whenever I include files in Apache I always do it like this: > > include($DOCUMENT ROOT."/folder/file.php"); > > However, now I am doing a site in IIS and I do not have $DOCUMENT ROOT at > my disposal. What do most of you usually do to workaround this? Aside from > installing Apache and Linux and bypassing the whole Windows thing :) Why not either include the doc root in the include_path of php.ini? Or define you own DOCUMENT_ROOT constant? -- CC
define('DOCUMENT_ROOT', 'C:\path\to\document\root'); NOTE! This would define a global variable to all your scripts without the $ dollar sign. include(DOCUMENT_ROOT."/folder/file.php"); -Jonathan Sharp Director of Technology - Imprev Inc. Renwick Development Group - Flyerware http://www.flyerware.com/ Phone: (425)688-9200 Cell: (425)766-1398 EPage: [EMAIL PROTECTED] -----Original Message----- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 5:23 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] $DOCUMENT_ROOT In article <039901c08a48$3d4b5740$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Toby Miller") wrote: > Whenever I include files in Apache I always do it like this: > > include($DOCUMENT ROOT."/folder/file.php"); > > However, now I am doing a site in IIS and I do not have $DOCUMENT ROOT at > my disposal. What do most of you usually do to workaround this? Aside from > installing Apache and Linux and bypassing the whole Windows thing :) Why not either include the doc root in the include_path of php.ini? Or define you own DOCUMENT_ROOT constant? -- CC -- 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]
Just add the full path of your web server into your include_path (php.ini) - this should work the best for you. Cheers, Maxim Maletsky -----Original Message----- From: Toby Miller [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 8:07 AM To: [EMAIL PROTECTED] Subject: [PHP] $DOCUMENT_ROOT Whenever I include files in Apache I always do it like this: include($DOCUMENT_ROOT."/folder/file.php"); However, now I am doing a site in IIS and I do not have $DOCUMENT_ROOT at my disposal. What do most of you usually do to workaround this? Aside from installing Apache and Linux and bypassing the whole Windows thing :) Thanks, Toby
Is it possible to move through an array that is returned as a recordset and then move back to the beginning of the array. Julia -- [ Julia Anne Case ] [ Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for. ] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
reset($array), if this is what you need. this resets (who would have thought it?) the internal pointer back to the first position. ""Julia A . Case"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is it possible to move through an array that is returned as a recordset > and then move back to the beginning of the array. > > Julia > > -- > [ Julia Anne Case ] [ Ships are safe inside the harbor, ] > [Programmer at large] [ but is that what ships are really for. ] > [ Admining Linux ] [ To thine own self be true. ] > [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] > > > -- > 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] >
// loops through the entire recordset while( $qrResults = mysql_fetch_array( $rQuery )) { print( $qrResults["SomeField"] } // reset the recordpointer to the first record mysql_data_seek( $rQuery, 0 ); Joseph E. Sheble a.k.a. Wizaerd Wizaerd's Realm Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com ================================= > -----Original Message----- > From: Julia A . Case [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 29, 2001 4:15 PM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP/MySQL question > > > Is it possible to move through an array that is returned as a recordset > and then move back to the beginning of the array. > > Julia > > -- > [ Julia Anne Case ] [ Ships are safe inside the harbor, ] > [Programmer at large] [ but is that what ships are really for. ] > [ Admining Linux ] [ To thine own self be true. ] > [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] > > > -- > 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] > > >
hi, just a quick question... i can't seem to have ereg() work with non-ascii characters such as the character 'ö'. is this something that i can work around? remco chang www.bountyquest.com
I'm running php4 as a CGI binary. During the course of a cronjob scheduled script, I need to execute an external program which connects to another server using an implementation of eftp (sort of ftp for ISDN). The eftp program returns no success/error codes, is moderately unstable, and the remote server/network is often unavailable - thus blind automation is out of the question. On a good day, however, it all works and data/info is sent to STDOUT. My problem is this: how to make my script interact with the eftp program? I need to start it, check for a successful connection, move files around locally, upload/download files, send emails, log data, etc, etc, depending on which commands were successful and which were not. The only thing I'm getting back is the STDOUT stream? How can I capture this in real time (as opposed to in a big lump once the program has finished), pause the eftp program, parse the output then send suitable commands back to the eftp program? I've checked out most of the likely functions (popen() was looking good for a while, exec() and system() seem to offer little scope for interactivity) but there always seems to be a 'gotcha' at some point. If anyone has some insight into this problem, their help, or a pointer in the right direction, would be appreciated. All the best, -- Paul Replace "spamtrap" with "paul" to reply by e-mail
I am using apache authentication. The problem is: I want the user to be able to get registered throught the web GUI, and all the users' password and userID will be kept in the database. In my mind, I can use php later to get all these userID/password, and run the apache htpasswd to register these users. However, Apache htpasswd is an interactive program and we need manually input the password, is there a way to automate and batch process this using php scripts? Thanks, David _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
> However, Apache htpasswd is an interactive program and we > need manually input the password, is there a way to automate > and batch process this using php scripts? [jason@phpdev htdocs]$ /usr/local/apache/bin/htpasswd --help Usage: htpasswd [-cmdps] passwordfile username htpasswd -b[cmdps] passwordfile username password -c Create a new file. -m Force MD5 encryption of the password. -d Force CRYPT encryption of the password (default). -p Do not encrypt the password (plaintext). -s Force SHA encryption of the password. -b Use the password from the command line rather than prompting for it. Looks like you should be able to run htpasswd as a fire-and-forget operation, just play with the flags. Jason
I am getting a whole lot closer to getting IIS to work with PHP loading as ISAPI. Now, when I try to get authorized, it never works. It's probably a varialbe in the .ini file I have not set. I keep getting the user prompt box, and the realm changes after the first login failure NT5 PHP 4.0.4pl1 Here's the code: ?> // Check to see if $PHP_AUTH_USER already contains info if (!isset($PHP_AUTH_USER)) { // If empty, send header causing dialog box to appear header('WWW-Authenticate: Basic realm="TBCC"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required!'; exit; } else if (isset($PHP_AUTH_USER)) { if (($PHP_AUTH_USER !="admin") || ($PHP_AUTH_PW !="admin")) { header('WWW-Authenticate: Basic realm="TBCC"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required!'; exit; } } ?> <html> <h1>It worked!</h1> </html>
I don't want to be an alarmist, but wanted to give everyone a heads-up. Our firewall at corporate scrubbed a virus from a mail sent to the php-db list from "Angel2 Gabriel Lena Valega". The virus was in an attachment named "Emanuel.exe" and the message subject was "i need help with odbc!" John Coonrod wrote: > Right. That's what I saw here also: a virus attachment from Angel2 Gabriel > Lena Valega in Peru > > ===== Original Message from Chuck Mayo <[EMAIL PROTECTED]> at 1/29/01 6:17 pm > >Virus in this mail? > > > >Angel2 Gabriel Lena Valega wrote: > > > >> ------------------ Virus Warning Message (on the network) > >> > >> Found virus TROJ_NAVIDAD.E in file Emanuel.exe > >> The file is deleted. > >> > >> --------------------------------------------------------- > >> > >> ------------------------------------------------------------------------ > >> > >> ------------------ Virus Warning Message (on the network) > >> > >> Emanuel.exe is removed from here because it contains a virus. > >> > >> --------------------------------------------------------- > > > > > >-- > >PHP Database 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] > > ---------------- > Dr. John Coonrod, Vice President, [EMAIL PROTECTED] > The Hunger Project, 15 East 26th Street, NY, NY 10010 www.thp.org
my firewall reports this at last once a moth ... Cheers, Maxim Maletsky -----Original Message----- From: Chuck Mayo [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 8:50 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP] VIRUS ON LIST? I don't want to be an alarmist, but wanted to give everyone a heads-up. Our firewall at corporate scrubbed a virus from a mail sent to the php-db list from "Angel2 Gabriel Lena Valega". The virus was in an attachment named "Emanuel.exe" and the message subject was "i need help with odbc!" John Coonrod wrote: > Right. That's what I saw here also: a virus attachment from Angel2 Gabriel > Lena Valega in Peru > > ===== Original Message from Chuck Mayo <[EMAIL PROTECTED]> at 1/29/01 6:17 pm > >Virus in this mail? > > > >Angel2 Gabriel Lena Valega wrote: > > > >> ------------------ Virus Warning Message (on the network) > >> > >> Found virus TROJ_NAVIDAD.E in file Emanuel.exe > >> The file is deleted. > >> > >> --------------------------------------------------------- > >> > >> ------------------------------------------------------------------------ > >> > >> ------------------ Virus Warning Message (on the network) > >> > >> Emanuel.exe is removed from here because it contains a virus. > >> > >> --------------------------------------------------------- > > > > > >-- > >PHP Database 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] > > ---------------- > Dr. John Coonrod, Vice President, [EMAIL PROTECTED] > The Hunger Project, 15 East 26th Street, NY, NY 10010 www.thp.org -- 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]
Maxim Maletsky wrote: > my firewall reports this at last once a moth ... <joke> So, uuhhh, how many moths have you caught so far? Must be quite an insect collection by now. You may want to clean out your firewall before it gets clogged up by all those moths. </joke> AMK4 -- H | Hi, I'm currently out of my mind. Please leave a message. BEEEEP! |____________________________________________________________________ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 Director of Internet Operations / SysAdmin . 800.441.3873 x130 Photo Craft Laboratories, Inc. . eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave, #6 .................. . . . . Boulder, CO 80303, U.S.A.
You left some attributes off: <joke type="bad" ratingOutOf10="2"> At 20:02 29/01/2001 -0700, Ashley M. Kirchner wrote: >Maxim Maletsky wrote: > > > my firewall reports this at last once a moth ... > > <joke> > So, uuhhh, how many moths have you caught so far? Must be > quite an insect collection by now. You may want to clean out > your firewall before it gets clogged up by all those moths. > </joke> > > AMK4 > >-- >H | Hi, I'm currently out of my mind. Please leave a message. BEEEEP! > |____________________________________________________________________ > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 > Director of Internet Operations / SysAdmin . 800.441.3873 x130 > Photo Craft Laboratories, Inc. . eFax 248.671.0909 > http://www.pcraft.com . 3550 Arapahoe Ave, #6 > .................. . . . . Boulder, CO 80303, U.S.A. > > > >-- >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] ------------------------- Brian White Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [EMAIL PROTECTED]
On Sun, Jan 28, 2001 at 12:46:37AM -0500, Kristofer Widholm wrote : > Well, I've been given the joyous task of implementing the DaveTV > project at CBS via PHP, using Oracle as a database. > > I've never used Oracle before. > > Looking at the PHP functions for Oracle, and having heard about it in > the past, it seems like quite a different approach than any SQL > database I've ever used. I still don't get the whole point of cursor > objects, etc. :-) It's ain't that hard. Just use OCILogon to connect, then OCIParse to parse the sql statement and finally OCIExecute it. Loop through your result data with OCIFetchInto. The Shitload of possible errors should be abstracted into a class. m. -- Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/ EMail: [EMAIL PROTECTED] PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
---------------------------------------------------------------------------- ----------------- Disclaimer: The information contained in this email is intended only for the use of the person(s) to whom it is addressed and may be confidential or contain legally privileged information. If you are not the intended recipient you are hereby notified that any perusal, use, distribution, copying or disclosure is strictly prohibited. If you have received this email in error please immediately advise us by return email at [EMAIL PROTECTED] and delete the email document without making a copy. ---------------------------------------------------------------------------- ----------------- It's actually pretty easy, just have a read and have a go :) http://www.php.net/manual/en/ref.oci8.php there are several examples there. As far as resources, your best bet is to use a DB abstraction library like PHPLib or the PEAR DB stuff. Im not sure where these projects are at the moment, but using DB abstraction stops you worrying about those DB specific calls... but i doubts id want to try to learn something more with such a close deadline) Anyway the worlds most basic Oracle query follows. <? // Have a look at http://www.php.net/manual/en/function.ocilogon.php // Also look at http://www.php.net/manual/en/function.ocifetchstatement.php for easier/faster fetching of data. $sql = " SELECT table_type, table_code, table_desc FROM msf010 WHERE table_type = 'MT'"; //OCIInternalDebug(1); $connection_id = ocilogon("USERNAME","PASSWORD","TNSNAME"); $result_id = ociparse($connection_id, $sql); $success = ociexecute($result_id); if($success){ while(@ocifetchinto($result_id,&$row,OCI_ASSOC+OCI_RETURN_NULLS)){ $data[] = $row; } ocifreestatement($result_id); }else{ $error= OCIError(); echo "Error is $error<br>\n"; } ocilogoff($result_id); function makeTable($data, $options = ""){ // This is an extremely simple table generator function $table = "<table $options>\n"; while(list($key,$row) = each($data)){ $table .= "<tr>"; while(list($col,$val) = each($row)){ $table .= "<td>$val</td>"; } $table .= "</tr>\n"; } $table .= "</table>\n"; return $table; } echo makeTable($data,"border=1 cellspacing=0"); ?> Mark Nold [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Senior Consultant Change is inevitable, except from vending machines. -----Original Message----- From: Kristofer Widholm [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 28, 2001 1:47 PM To: PHP List Post Subject: PHP and Oracle resources Well, I've been given the joyous task of implementing the DaveTV project at CBS via PHP, using Oracle as a database. I've never used Oracle before. Looking at the PHP functions for Oracle, and having heard about it in the past, it seems like quite a different approach than any SQL database I've ever used. I still don't get the whole point of cursor objects, etc. :-) It would all be pretty hilarious if it weren't so real, and with a big fat deadline looming smack for the end of February. To get to the point: Anyone have any good PHP & Oracle tutorials, resources, books, etc, to point me to? EVERYTHING I see is MySQL, MySQL, MySQL, and all I get for Oracle are lists of unexplained PHP function calls. Just point me in the right direction. I can walk there myself. Thanks for the help. Kristofer -- ______________________________________ Kristofer Widholm Web Pharmacy [EMAIL PROTECTED] 191 Grand Street, Brooklyn NY 11211 718.599.4893 ______________________________________
There's no filename length, but the url string (even for POST I belive) must total < 4096 characters. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. ----- Original Message ----- From: "George Edmonds" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Tuesday, January 30, 2001 10:47 AM Subject: RE: filename length ... > On a GET URL, yes there is a limit of i think its the 256, but on a POST > if memory serves you can go as high as you want, or well lets put it this > way, posting i havent hit a limit yet > > > > > George R. Edmonds > Director of Technology > Strategy Source > Pager: (888) 914-6551 > Office: (202) 296-4200 > Fax: (202) 296-4295 > > "Make everything as simple as possible, but no simpler." - Albert Einstein > > -----Original Message----- > From: David L. Penton [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 29, 2001 5:49 PM > To: ActiveServerPages > Subject: RE: filename length ... > > > Since a filename can be no longer than 256 characters, have you tried it? > > Have you tried different lengths? > > The length will depend on the browser (IE, Netscape, Mosaic, etc) and > serving software (IIS, Apache, O'Reilly, etc) > > > David L. Penton, MCP > Consultant > "Mathematics is music for the mind, and Music is Mathematics for the > Soul. - J.S. Bach" > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 29, 2001 11:04 AM > > Is there any limit on the filename length on URL line? > > TIA. > > > --- > You are currently subscribed to activeserverpages as: > [EMAIL PROTECTED] > To unsubscribe send a blank email to > [EMAIL PROTECTED] > > --------- > Administrated by 15 Seconds : http://www.15Seconds.com > List Archives/Search : http://local.15Seconds.com/search > Subscription Information : http://www.15seconds.com/listserv.htm > Advertising Information: http://www.internet.com/mediakit/ > > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > --------- > Administrated by 15 Seconds : http://www.15Seconds.com > List Archives/Search : http://local.15Seconds.com/search > Subscription Information : http://www.15seconds.com/listserv.htm > Advertising Information: http://www.internet.com/mediakit/ > >
Here's what you wrote, 01-01-27: >OK, I've gone back through the archives and now understand the situation >with client- and server-side. I just wasn't thinking it through. > >Spawning a window to let PHP query the db and somehow passing returned >values back to the parent window is something I could do, I suppose, but >it seems that what I and the other zillion people who keep asking the >same question need is a way to get to our databases using a client-side >technology like Javascript. If it's not an enormous amount of data the user will be working with, and they're just reading it and not inputting new values (a set number of options, etc.), you could just load all the data into JavaScript arrays at the initial load. Whenever a part of any form or window is changed, the displayed data would be changed as well via JavaScript, without the need for any database query. Kristofer -- ______________________________________ Kristofer Widholm Web Pharmacy [EMAIL PROTECTED] 191 Grand Street, Brooklyn NY 11211 718.599.4893 ______________________________________
I get this error, even when trying to start apache with the -X option: (tail end of strace on httdp -X) 6421 open("/etc/httpd/php3.ini", O_RDONLY) = 5 6421 ioctl(5, TCGETS, 0xbfffc8e8) = -1 ENOTTY (Inappropriate ioctl for device) 6421 read(5, "[PHP_3]\n\n;;;;;;;;;;;;;;;;;;;\n; A"..., 8192) = 8192 6421 read(5, "eadlen for an explanation of uod"..., 8192) = 4370 6421 read(5, "", 3822) = 0 6421 read(5, "", 8192) = 0 6421 ioctl(5, TCGETS, 0xbfffc8d4) = -1 ENOTTY (Inappropriate ioctl for device) 6421 --- SIGSEGV (Segmentation fault) --- 6421 +++ killed by SIGSEGV +++ Ive seen a few message on the web but no answers. Any help would be greatly appreciated. Thanks, Jimmy ----------------------------------------------------------------------- Q: Backstreet Boys or N'Sync? A: Both of them. In a house, on fire, surrounded by trick fire extinguishers filled with gasoline. -----------------------------------------------------------------------
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 While this isn't a really a PHP problem, I figured I can't be the first person to ever have tried to solve this problem. Basically I have a web site with many kinds of content (static html, PHP, cgi's of various flavors, etc) and I'm looking to create a way to do user authentication and authorization against a DB for all this content. While there are various existing solutions to do this (like mod_auth_db), none of them seemed to fit my requirements: 1) Support *my* MySQL database schema 2) Light memory usage (ie, no modperl) 3) Support any kind of content (cgi, php, static html, etc) 4) Not require changes to existing content (ie, I don't want to do a require "security.php"; in all the php pages I want to secure). The closest I've come so far is using mod_layout to allow my custom PHP script to generate HTTP headers so that I can do the user authentication myself. This is actually working very well for most pages and is completely content agnostic since it's sourced via the Apache server, not the content. The problem with this is that mod_layout's LayoutHTTPHeader option seems to be eating any POST's that CGI's or PHP scripts use. The mod_layout list has been completely useless in trying to find the answer to this issue. So, does anyone have another viable solution to this problem? Are there any builtin PHP options to source a php script during the http header generation process for any content (not just other PHP scripts)? Are there any other modules other than mod_layout that can do this? I know I can do this with mod_perl, but it's a lot more memory intensive than PHP so I'd like to avoid it if possible. Thanks. - -- Aaron Turner <[EMAIL PROTECTED]|synfin.net|linuxkb.org> URI:www.synfin.net They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 9817 F86E DAE6 All emails by me are PGP signed; a lack of a signature indicates a forgery. I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E 60BF 451B 20E8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc iEYEARECAAYFAjp2CJUACgkQhweYF/hu2ubc2gCfWeJTNlVgKrv/CrOyHoqRzbaI XLkAn2LuiTg0lkYIyAdutAqXRyPnT8i4 =ytFC -----END PGP SIGNATURE-----
Changes in this version: 1.0.7: + partially fixed for Solaris [gws 01.29.2001] + fixed mtime support for relative includes [gws 01.29.2001] + code cleanup [yg,ta,gws 01.29.2001] + support for mtime in mmap [yg,gws 01.27.2001] + fixed indexed-array initialization bug [djc,gws 01.27.2001] This should be the first version which fully supports phplib. apc is available at http://apc.communityconnect.com/
I need a function to exec raw commands on a server, like "LIST" and esp. "LIST -al". I going to use it for programming a public php-fxp client. mfg
here's my code: $res = mysql_query($badsqlstatement) or die(errtrapper()); inside errtrapper(), is there a way to find out what line this error occurred? thanks!! - Noah
print __LINE__ Will print the line number (as per http://www.php.net/manual/en/language.constants.php). --dave > -----Original Message----- > From: Noah Spitzer-Williams [mailto:[EMAIL PROTECTED]] > Sent: Monday, 29 January 2001 7:21 AM > To: [EMAIL PROTECTED] > Subject: [PHP] when using die(), how can i get the line number that > errored? > > > here's my code: > > $res = mysql_query($badsqlstatement) or die(errtrapper()); > > inside errtrapper(), is there a way to find out what line this error > occurred? > > thanks!! > > - Noah > > > > -- > 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] >
$res = mysql_query($badsqlstatement) or die(errtrapper().' at line (<B>'.__LINE__.'</B>)'); Cheers, Maxim Maletsky -----Original Message----- From: Noah Spitzer-Williams [mailto:[EMAIL PROTECTED]] Sent: Monday, January 29, 2001 6:21 AM To: [EMAIL PROTECTED] Subject: [PHP] when using die(), how can i get the line number that errored? here's my code: $res = mysql_query($badsqlstatement) or die(errtrapper()); inside errtrapper(), is there a way to find out what line this error occurred? thanks!! - Noah -- 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]
function errtrapper($file, $line){ echo "In $file on line $line<BR>\n"; #current body here. } die(errtrapper(__FILE__, __LINE__)); -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: "Noah Spitzer-Williams" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Monday, January 29, 2001 6:59 PM Subject: [PHP] when using die(), how can i get the line number that errored? > here's my code: > > $res = mysql_query($badsqlstatement) or die(errtrapper()); > > inside errtrapper(), is there a way to find out what line this error > occurred? > > thanks!! > > - Noah > > > > -- > 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] >
Hi folk's I have one problem our sybase uses port 5000 how can i tel php to send all traffic on this port ? thank's jaro
> I have one problem our sybase uses port 5000 > how can i tel php to send all traffic on this port ? Wild Guesses: Either your "interfaces" file specifies port 5000 for the servername you are using, or you do something like: sybase_connect("servername:5000", 'username', 'password'); -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
I came across http://pear.php.net/ So what is this? I found this in the PHP Developers Cookbook by SAMS...Right now it only has a few documentation and coding standards...are there more plans for this? -Jonathan Sharp Director of Technology - Imprev Inc. Renwick Development Group - Flyerware http://www.flyerware.com/ Phone: (425)688-9200 Cell: (425)766-1398 EPage: [EMAIL PROTECTED]
> I came across http://pear.php.net/ So what is this? I found this in the PHP > Developers Cookbook by SAMS...Right now it only has a few documentation and > coding standards...are there more plans for this? > Good choice in reading ;-). PEAR, the web site is currently not that functional, but rather contains minimal information about the goals and ideas of PEAR. If your looking to obtain pear classes and have php4 or greater, guess what? you already have those classes, PHP4 (every distribution of) comes with an updated set of classes. If you need classes that are available in later versions of PHP4 (such as Net_Curl) you can either do a simple checkout of the pear directory in PHP's CVS:: cvs -z3 -d :pserver:[EMAIL PROTECTED]:/repository login --> password is phpfi cvs -z3 -d :pserver:[EMAIL PROTECTED]:/repository co php4/pear and you should get the latest and greatest version of pear.... If your not adept with CVS, you can send me a mail for any class you want (or to the list)... There should be at least nightly builds (if that term could be used) on pear.php.net, I'll send you a note when there are.... Best Regards, Sterling Hughes [EMAIL PROTECTED]
Jonathan Sharp wrote: > > I came across http://pear.php.net/ So what is this? I found this in the PHP > Developers Cookbook by SAMS...Right now it only has a few documentation and > coding standards...are there more plans for this? It comes (and installs by default) in every PHP distribution for some releases now. Just grab the sources, and look for pear directory. There you will find some g00dies :) -- teodor
Also, PEAR is online, look at (and steal) the software from cvs! It can be seen here : http://cvs.php.net/viewcvs.cgi/php4/pear/ There is a fairly recent article about PEAR DB Abstraction Layer, which is found here : http://phpbuilder.com/columns/allan20010115.php3 And you can read what all the pearPeople have to say, here's the archive of PEAR mailing list : http://marc.theaimsgroup.com/?l=php-pear&r=1&w=2 You'll notice that January list activity is about equal to the last 10 months combined so that's exciting. Regards, Philip Olson http://www.cornado.com/ On Tue, 30 Jan 2001, Teodor Cimpoesu wrote: > > Jonathan Sharp wrote: > > > > I came across http://pear.php.net/ So what is this? I found this in the PHP > > Developers Cookbook by SAMS...Right now it only has a few documentation and > > coding standards...are there more plans for this? > > It comes (and installs by default) in every PHP distribution for some > releases now. > Just grab the sources, and look for pear directory. There you will find > some g00dies :) > > -- teodor > > -- > 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] >
I read somewhere that when PHP encounters a single quote ' it doesn't parse the contents for any variables or such...but if it encounters the double quote " it does. How much of a performance increase (very very very very small I'd imagine) would this provide? Any thoughts on coding style? -Jonathan Sharp Director of Technology - Imprev Inc. Renwick Development Group - Flyerware http://www.flyerware.com/ Phone: (425)688-9200 Cell: (425)766-1398 EPage: [EMAIL PROTECTED]
Hello Jonathan, Not sure on the exact numbers but consider : print "hello, this has one $variable in it yet all is interpreted"; print 'hello, Concatenating is a ' . $another . ' way!'; not sure the exact performance increases but if done a million times it should be noticable. i happen to be mildy anal on this and even seeing stuff like this : $var = "some words"; bothers me. some good basic information on this can be found here : http://www.zend.com/zend/tut/using-strings.php http://www.php.net/manual/en/language.types.string.php of course this all is preference and depends on the situation as doing this : $var = 'a ' . $b . ' c ' . $d . ' e ' . $f . ' g'; is downright silly. philip On Mon, 29 Jan 2001, Jonathan Sharp wrote: > I read somewhere that when PHP encounters a single quote ' it doesn't parse > the contents for any variables or such...but if it encounters the double > quote " it does. How much of a performance increase (very very very very > small I'd imagine) would this provide? Any thoughts on coding style? > > -Jonathan Sharp > > Director of Technology - Imprev Inc. > Renwick Development Group - Flyerware > http://www.flyerware.com/ > Phone: (425)688-9200 > Cell: (425)766-1398 > EPage: [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] >
About a month ago Verisign released a new SDK (albeit with somewhat limited platform support) which fixes the problems previously discussed regarding using the pfpro extension inside another program which has been linked against an SSL library. You can download the new SDK from within the manager interface: https://testmanager.signio.com/Downloads/Downloads_secure.htm So at this point, the extension should be considered fully operational by anyone considering using it. Thanks to everyone who helped request this enough so that customer support stopped piping the requests to /dev/null :) John -- John Donagher Application Engineer Intacct Corp. - Powerful Accounting on the Web 408-395-0989 720 University Ave. Los Gatos CA 95032 www.intacct.com
In article <94t6hv$903$[EMAIL PROTECTED]>, "Kumanan" <[EMAIL PROTECTED]> wrote: if (eregi("[^0-9]{3}",$co_area)) { print("area code must be digits"); } or if (eregi("[^[:digit:]]{3}",$co_area)) if you use the POSIX regex fields. > hi, im trying to fix this couple of hours but i couldnt find the > mistake... can somebody look at it... > > first i want to check the $co_area for 3 digital ... it must contain 3 > digital > > if ($co_area != !ereg("([0-9]{3})",$co_area)) > { echo " * Area code must be 3 digital"; } > > > second... > > nickname check works but the first letter could be any number or any > letters.... > > with this code it accept only letters as first character....... i just > want any letter or numbers or - _ symboles from 3 to 12 characters... > > if ($nickname != !eregi("^[-\._\.0-9a-zA-Z]{3,12}$",$nickname)) > { > $error ="Nickname must be Alphanumeric[ a-z 0-9; - _ ; 3 - 12 > characters ]"; > $flak=1; > } > First mistake when using character classes in the pattern is that the hyphen must be at the end if it is to be included. Otherwise the hyphen is seen to be part of the range (0-9 or A-Z): so, ^[0-9a-zA-Z._-]{3,12} instead of what you have. You also should not need the trailing $. As in the first example, don't use the 'double negative' approach. use: if (eregi("^[^0-9a-zA-z._-]{3,12}",$nickname)) { echo "only alphanumeric buddy!"; } I didn't test this but it should be closer to success. Jeff > > i hope someone can help me to fix this... > > thanx > > kumanan [EMAIL PROTECTED] > > > > > >
Hi! I've recently upgraded my system to Redhat 7, running Apache 1.3.14, PHP 4.0.4pl1 and mod_perl 1.24. Since that, some of my PHP scripts just stopped working (they worked just fine before). When I use file upload, all the uploaded files get a "free bonus" 'Content-Type' header that makes them unusable. For example, I can't display uploaded GIFs or JPGs because of the added 'Content-Type' line. Is this a bug in PHP 4.0.4pl1? Is it something in my php.ini? Regards, Hugo Trovao Mota
How can i make http://www.something.com/blah/blah.zip into blah/blah.zip http://www.somethingcom is a constant.. always the same thing how can i cut it out? thnx - Peter
str_replace() I think the syntax is $foo = str_replace($old_foo,"http://www.something.com",""); Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 30, 2001 2:41 PM Subject: [PHP] strings > How can i make http://www.something.com/blah/blah.zip into > > blah/blah.zip > > http://www.somethingcom is a constant.. always the same thing > > how can i cut it out? > > thnx > > - Peter > > > -- > 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] >
[EMAIL PROTECTED] wrote: > > How can i make http://www.something.com/blah/blah.zip into > > blah/blah.zip > > http://www.somethingcom is a constant.. always the same thing > > how can i cut it out? > what comes to my mind right now is str_replace ('http://www.../','',$url) where $url is the full URL. oh, there is also parse_url() :) so what you want would be: $purl = parse_url ("http://.../blah.zip"); $whatiwant = $purl['path']; -- teodor
according to the online refernce foreach() doesn't change the array pointer. However the following code: $fred = array(1,2,3,4,5,6); foreach ($fred as $fred1) { foreach ($fred as $fred2) echo "$fred1 : $fred2<br>"; }; returns: 1 : 1 1 : 2 1 : 3 1 : 4 1 : 5 1 : 6 and stops there, implying that the second foreach() is interfering with the first. I've got around this in my actual case by creating two arrays and adding to the second as well as the first, but this won't always be as convenient. Is this a known bug or is the manual wrong? ... by the way $fred = array(1,2,3,4,5,6); $fred2 = $fred; foreach ($fred as $fred1) { foreach ($fred2 as $fred2) echo "$fred1 : $fred2<br>"; }; ... doesn't work either which would normally imply that $fred2 is a pointer to $fred rather than a copy. Can this be the case? I am using version 4.0.0 Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html
Tim, Works fine in 4.04pl1 on NT. I think you should have curly braces round the inner foreach as well? $fred = array(1,2,3,4,5,6); foreach ($fred as $fred1) { foreach ($fred as $fred2) { echo "$fred1 : $fred2<br>"; } }; Chris Fry Tim Ward wrote: > according to the online refernce foreach() doesn't change the array pointer. > However the following code: > > $fred = array(1,2,3,4,5,6); > foreach ($fred as $fred1) > { foreach ($fred as $fred2) > echo "$fred1 : $fred2<br>"; > }; > > returns: > > 1 : 1 > 1 : 2 > 1 : 3 > 1 : 4 > 1 : 5 > 1 : 6 > > and stops there, implying that the second foreach() is interfering with the > first. > > I've got around this in my actual case by creating two arrays and adding to > the second as well as the first, but this won't always be as convenient. Is > this a known bug or is the manual wrong? > > ... by the way > > $fred = array(1,2,3,4,5,6); > $fred2 = $fred; > foreach ($fred as $fred1) > { foreach ($fred2 as $fred2) > echo "$fred1 : $fred2<br>"; > }; > > ... doesn't work either which would normally imply that $fred2 is a pointer > to $fred rather than a copy. Can this be the case? > > I am using version 4.0.0 > > 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] -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ********************************************************************** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed.
Perhaps : http://php.net/ChangeLog-4.php Under 4.0.2 it says : "Fixed problem with nested foreach()'s. (Andi, Zend Engine)" philip On Tue, 30 Jan 2001, Chris Fry wrote: > Tim, > > Works fine in 4.04pl1 on NT. > > I think you should have curly braces round the inner foreach as well? > > $fred = array(1,2,3,4,5,6); > foreach ($fred as $fred1) > { foreach ($fred as $fred2) { > echo "$fred1 : $fred2<br>"; > } > }; > > > Chris Fry > > Tim Ward wrote: > > > according to the online refernce foreach() doesn't change the array pointer. > > However the following code: > > > > $fred = array(1,2,3,4,5,6); > > foreach ($fred as $fred1) > > { foreach ($fred as $fred2) > > echo "$fred1 : $fred2<br>"; > > }; > > > > returns: > > > > 1 : 1 > > 1 : 2 > > 1 : 3 > > 1 : 4 > > 1 : 5 > > 1 : 6 > > > > and stops there, implying that the second foreach() is interfering with the > > first. > > > > I've got around this in my actual case by creating two arrays and adding to > > the second as well as the first, but this won't always be as convenient. Is > > this a known bug or is the manual wrong? > > > > ... by the way > > > > $fred = array(1,2,3,4,5,6); > > $fred2 = $fred; > > foreach ($fred as $fred1) > > { foreach ($fred2 as $fred2) > > echo "$fred1 : $fred2<br>"; > > }; > > > > ... doesn't work either which would normally imply that $fred2 is a pointer > > to $fred rather than a copy. Can this be the case? > > > > I am using version 4.0.0 > > > > 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] > > -- > Chris Fry > Quillsoft Pty Ltd > Specialists in Secure Internet Services and E-Commerce Solutions > 10 Gray Street > Kogarah > NSW 2217 > Australia > > Phone: +61 2 9553 1691 > Fax: +61 2 9553 1692 > Mobile: 0419 414 323 > eMail: [EMAIL PROTECTED] > http://www.quillsoft.com.au > > You can download our Public CA Certificate from:- > https://ca.secureanywhere.com/htdocs/cacert.crt > > ********************************************************************** > > This information contains confidential information intended only for > the use of the authorised recipient. If you are not an authorised > recipient of this e-mail, please contact Quillsoft Pty Ltd by return > e-mail. > In this case, you should not read, print, re-transmit, store or act > in reliance on this e-mail or any attachments, and should destroy all > copies of them. > This e-mail and any attachments may also contain copyright material > belonging to Quillsoft Pty Ltd. > The views expressed in this e-mail or attachments are the views of > the author and not the views of Quillsoft Pty Ltd. > You should only deal with the material contained in this e-mail if > you are authorised to do so. > > This notice should not be removed. > > >
Hello Can anybody tell me how to disable the print button of the client browser? If there is any method please let me know. Thanks in advance Usman
No, no damn way, and besides, I can alt-prtscn and paste it into something else and print from there anyway. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. ----- Original Message ----- From: "Usman Ghani" <[EMAIL PROTECTED]> To: "PHP Email List" <[EMAIL PROTECTED]> Sent: Tuesday, January 30, 2001 3:38 PM Subject: [PHP] Disable print button of client browser Hello Can anybody tell me how to disable the print button of the client browser? If there is any method please let me know. Thanks in advance Usman
There's NO METHOD~~!!! any one can just hit print-screen and dump whatever your monitor was showing into PhotoShop (which will print it on request) :-)) Cheers, Maxim Maletsky -----Original Message----- From: Usman Ghani [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 1:38 PM To: PHP Email List Subject: [PHP] Disable print button of client browser Hello Can anybody tell me how to disable the print button of the client browser? If there is any method please let me know. Thanks in advance Usman
---------------------------------------------------------------------------- ----------------- Disclaimer: The information contained in this email is intended only for the use of the person(s) to whom it is addressed and may be confidential or contain legally privileged information. If you are not the intended recipient you are hereby notified that any perusal, use, distribution, copying or disclosure is strictly prohibited. If you have received this email in error please immediately advise us by return email at [EMAIL PROTECTED] and delete the email document without making a copy. ---------------------------------------------------------------------------- ----------------- RE: checking for flex... lex checking for yywrap in -ll... no checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up You could install flex and bison as Rasmus suggested. I found a similiar problem on my Sun box. I found that all i had to do was include the path to the "lex" executable in my $PATH. This is wierd because i though the "checking for flex... lex" actually would have tested whether lex was there. Hope this helps. mn Mark Nold [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Senior Consultant Change is inevitable, except from vending machines.
all you have to do is after accepting the variables just send them to foo.php. //you can skip this file. its only for the purpose of showing which variables are to be used <?php //building up the html $html = "<HTML><head><meta http-equiv=\"Content-Language\" content=\"en-us\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\"><meta name=\"GENERATOR\" content=\"Microsoft FrontPage 4.0\"><meta name=\"ProgId\" content=\"FrontPage.Editor.Document\"><title></title></head>"; $html .="<body bgcolor="; $html .="$back_color"; $html .="$sender_name"; //displaying the html file echo $html; blah blah blah //sending the variables to foo.php echo "<form method=\"POST\" action='foo.php'>"; echo "<input type=\"HIDDEN\" name=\"sender_name\" value='$sender_name'>"; echo "<input type=\"HIDDEN\" name=\"sender_email\" value='$sender_email'>"; echo "<input type=\"HIDDEN\" name=\"recip_name\" value='$recip_name'>"; echo "<input type=\"HIDDEN\" name=\"recip_email\" value='$recip_email'>"; echo "<input type=\"HIDDEN\" name=\"pic_select\" value='$pic_select'>"; echo "<input type=\"HIDDEN\" name=\"back_color\" value='$back_color'>"; echo "<input type=\"HIDDEN\" name=\"html\" value='$html'>"; ?> **************************************************************************** *************************************** //foo.php **************************************************************************** **************************************** <?php include('html_mime_mail.class'); //picture filename $filename = $pic_select; $backgrnd = fread($fp = fopen($filename, 'r'), filesize($filename)); fclose($fp); $mail = new html_mime_mail("X-Mailer: anything u want\n"); $text = ' '; $mail->add_html_image($back_color, $pic_select, 'image/jpeg'); $mail->add_html($html, $text); $mail->build_message(); $mail->send($recip_name, $recip_email, $sender_name, $sender_email, 'Sub: Hi'); ?> _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Hi Guys, Can php listen to server ports to capture any data that is coming in? I am running linux and PHP so if there is anyother way to get the information into PHP. Anything you can offer will be a great help. Thanks Scott.
http://www.php.net/manual/en/ref.sockets.php has a cut'n'paste sample that works perfectly. --dave > -----Original Message----- > From: Scott Mebberson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, 30 January 2001 3:37 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Can php listen to server ports > > > Hi Guys, > > Can php listen to server ports to capture any data that is > coming in? I am > running linux and PHP so if there is anyother way to get the > information > into PHP. > > Anything you can offer will be a great help. > > Thanks > > Scott. > > > > -- > 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] >
Warning: checkdnsrr() is not supported in this PHP build in /usr/local/apache/htdocs/squirrelmail/plugins/filters/filters.php on line 203 what module do i need to compile into php to get the function working? http://www.gattcomp.com.au/~gamr/test.php for a list of already compiled modules . . .
Hey all. I am running RH6.2, Apache 1.3.14/php4.04. I am trying to make a simple mail() call to send myself a message when a 404 is sent - as a means of monitoring dead links. Anyway, I have the sendmail path set (/usr/sbin/sendmail -t -i), but something isn't working right. Here is the mail() usage as I have it: mail("$emailaddress", "404 Error Report", $message); Here is the maillog output: Jan 30 01:03:52 acadia sendmail[21394]: BAA21394: from=nobody, size=257, class=0, pri=30257, nrcpts=1, msgid=<[EMAIL PROTECTED]>, relay=nobody@localhost Jan 30 01:03:52 acadia sendmail[21397]: BAA21394: SYSERR(nobody): Cannot exec /usr/cyrus/bin/deliver: Permission denied Jan 30 01:03:52 acadia sendmail[21396]: BAA21394: to=leblanc+webmaster, ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=cyrus, relay=webmaster, stat=Operating system error As you can see, it is a permissions problem. Any way to get around this? TIA Lou -- Louis LeBlanc Fully Funded Hobbyist, KeySlapper Extrordinaire :) [EMAIL PROTECTED] http://acadia.ne.mediaone.net
> Anyway, I have the sendmail path set (/usr/sbin/sendmail -t -i), but > something isn't working right. Do you have quotes around that "/usr/sbin/sendmail -t -i" ? You need quotes in php.ini there, or it ignores the -t -i part cuz it's after a space. > Jan 30 01:03:52 acadia sendmail[21394]: BAA21394: from=nobody, size=257, > class=0, pri=30257, nrcpts=1, > msgid=<[EMAIL PROTECTED]>, > relay=nobody@localhost > Jan 30 01:03:52 acadia sendmail[21397]: BAA21394: SYSERR(nobody): Cannot > exec /usr/cyrus/bin/deliver: Permission denied Is user nobody allowed to send email using sendmail? Is the user PHP is running as (maybe "nobody", maybe not -- check httpd.conf "User" line) allowed to execute sendmail. > Jan 30 01:03:52 acadia sendmail[21396]: BAA21394: to=leblanc+webmaster, > ctladdr=nobody (99/99), delay=00:00:00, xdelay=00:00:00, mailer=cyrus, > relay=webmaster, stat=Operating system error -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
Maxim Maletsky - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> Webmaster, J-Door.com / J@pan Inc. LINC Media, Inc. TEL: 03-3499-2175 x 1271 FAX: 03-3499-3109 http://www.j-door.com <http://www.j-door.com/> http://www.japaninc.net <http://www.japaninc.net/> http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/>
Thanks to Brad Jackson, solution #1 is out -> http://www.sakshaug.net/phps/loop.phps Best Regards, Christian Sakshaug -- Email: [EMAIL PROTECTED] Web: www.sakshaug.net Tel: +47 913 95 618
Hi, I know this has been asked before but I can`t seem to get the archive email thingy to work, basically I`m looking for a free or cheap editor that has the lines numbered so that it`s a bit easier for me to debug my scripts. TIA Ade
http://www.vim.org/ :set nu Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED] http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "LINUX is obsolete" -- Andy Tanenbaum, January 29th, 1992 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://www.JEEP-FOR-SALE.com/ -- I need a buyer Get your own Free, Private email at http://www.smackdown.com/ On Tue, 30 Jan 2001 [EMAIL PROTECTED] wrote: > Date: Tue, 30 Jan 2001 02:37:36 EST > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: [PHP] Editor > > Hi, > > I know this has been asked before but I can`t seem to get the archive email > thingy to work, basically I`m looking for a free or cheap editor that has the > lines numbered so that it`s a bit easier for me to debug my scripts. > > TIA > Ade > > -- > 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] > >
Try www.phpedit.com or www.ultraedit.com (30$) At 08:37 30.01.2001, you wrote: >Hi, > >I know this has been asked before but I can`t seem to get the archive email >thingy to work, basically I`m looking for a free or cheap editor that has the >lines numbered so that it`s a bit easier for me to debug my scripts. > >TIA >Ade > >-- >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] Best Regards, Christian Sakshaug -- Email: [EMAIL PROTECTED] Web: www.sakshaug.net Tel: +47 913 95 618
http://marc.theaimsgroup.com/?l=php-general&r=1&w=2&q=b&s=editor Marc is thee best place to scour (as is google!), in terms of the archive, not sure what you've tried but jic. pretty much any editor will give you lines -- here's the gist of editors in no particular order and of course there are others : windows - homesite - editplus - ultraedit - textpad - zend ide - phpedit unix - vi(m) - emacs - bluefish - nedit mac - bbedit regards, philip olson http://www.cornado.com/ On Tue, 30 Jan 2001 [EMAIL PROTECTED] wrote: > Hi, > > I know this has been asked before but I can`t seem to get the archive email > thingy to work, basically I`m looking for a free or cheap editor that has the > lines numbered so that it`s a bit easier for me to debug my scripts. > > TIA > Ade > > -- > 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] >
EditPlus.com ($?) -----Original Message----- From: Christian Sakshaug [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 30, 2001 4:45 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Editor Try www.phpedit.com or www.ultraedit.com (30$) At 08:37 30.01.2001, you wrote: >Hi, > >I know this has been asked before but I can`t seem to get the archive email >thingy to work, basically I`m looking for a free or cheap editor that has the >lines numbered so that it`s a bit easier for me to debug my scripts. > >TIA >Ade > >-- >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] Best Regards, Christian Sakshaug -- Email: [EMAIL PROTECTED] Web: www.sakshaug.net Tel: +47 913 95 618 -- 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]
Alright, when i was programming with PHP3, I would use if statements like this: if(!$submit) { // display form } else { // display signup complete } to make multiple pages. Or I would do this: if($action == "signup") { if(!$submit) { //display form } else { // display signup complete } } if($action == "login") { // show login screen } But now I get an error like this: Warning: Undefined variable: submit in c:\apache\htdocs\test.php on line 3 I don't know if I misconfigured my php.ini file or what. Thanks, James __________________________________________________ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
this has to do with error reporting, using the function : http://www.php.net/manual/en/function.error-reporting.php definition of types : http://www.php.net/manual/en/phpdevel-errors.php you may have E_ALL or E_NOTICE on within php.ini philip olson http://www.cornado.com/ On Mon, 29 Jan 2001, James Smith wrote: > Alright, when i was programming with PHP3, I would use > if statements like this: > > if(!$submit) { > // display form > } else { > // display signup complete > } > > to make multiple pages. Or I would do this: > > if($action == "signup") { > if(!$submit) { > //display form > } else { > // display signup complete > } > } > if($action == "login") { > // show login screen > } > > But now I get an error like this: > > Warning: Undefined variable: submit in > c:\apache\htdocs\test.php on line 3 > > I don't know if I misconfigured my php.ini file or > what. > > Thanks, > > James > > __________________________________________________ > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.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] >
hi again james, btw, consider doing this : if (empty($submit)) { or if (!empty($submit)) { as it doesn't run into such problems. or use isset although i tend to almost always use empty, i LOVE empty() !!! each have their uses : http://www.php.net/manual/en/function.empty.php http://www.php.net/manual/en/function.isset.php there are also compare functions such as : http://www.php.net/manual/en/function.strcmp.php but anyway, those are other options to consider. options are good. but really for such things use empty(), also the following is bad form (imho of course) : if ($var == '') { regards, philip olson http://www.cornado.com/ On Mon, 29 Jan 2001, James Smith wrote: > Alright, when i was programming with PHP3, I would use > if statements like this: > > if(!$submit) { > // display form > } else { > // display signup complete > } > > to make multiple pages. Or I would do this: > > if($action == "signup") { > if(!$submit) { > //display form > } else { > // display signup complete > } > } > if($action == "login") { > // show login screen > } > > But now I get an error like this: > > Warning: Undefined variable: submit in > c:\apache\htdocs\test.php on line 3 > > I don't know if I misconfigured my php.ini file or > what. > > Thanks, > > James > > __________________________________________________ > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.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] >
James Smith wrote: > > Alright, when i was programming with PHP3, I would use > if statements like this: > > if(!$submit) { > // display form > } else { > // display signup complete > } > > to make multiple pages. Or I would do this: > > if($action == "signup") { > if(!$submit) { > //display form > } else { > // display signup complete > } > } > if($action == "login") { > // show login screen > } > > But now I get an error like this: > > Warning: Undefined variable: submit in > c:\apache\htdocs\test.php on line 3 > > I don't know if I misconfigured my php.ini file or > what. > Very likely you used the optimized version of php.ini which has global variables registration off. As for your question, I can tell you my tip: I use <input type="submit" name="action[login]" value="Login"> <input type="submit" name="action[signup]" value="SignUp"> and in the form do: $PV = $HTTP_POST_VARS; $action = isset ($PV['action']) ? key($PV['action']) : '<default-action-here>'; switch ($action) { // allows lots of action w/o too many ifs and such case 'login': // login break; case 'signup': // signup break; case 'default-action': default: // evetually break; } so on. hope it helps ciao -- teodor
You set error_reporting to 15 (E_ALL) instead of 7. Turn it back down to 7 or fix your scripts to use if (isset($submit)){ } -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: James Smith <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Tuesday, January 30, 2001 1:54 AM Subject: [PHP] Variable Problem when UPGRADING... > Alright, when i was programming with PHP3, I would use > if statements like this: > > if(!$submit) { > // display form > } else { > // display signup complete > } > > to make multiple pages. Or I would do this: > > if($action == "signup") { > if(!$submit) { > file://display form > } else { > // display signup complete > } > } > if($action == "login") { > // show login screen > } > > But now I get an error like this: > > Warning: Undefined variable: submit in > c:\apache\htdocs\test.php on line 3 > > I don't know if I misconfigured my php.ini file or > what. > > Thanks, > > James > > __________________________________________________ > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.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] >
hello, I am developing a website which extensively use the session function of php. I have meet the following problem: the server for development was placed in the intranet originally and when it moved to DM zone yesterday, and then all session value can't pass any more! I had checked that all sid value were passed correctly between every page, but all registered session value can't pass. I saw that there is an entry: session.referer_check in the php.ini. Is it necessary to set anything in this entry if the web server was placed in DM zone? thx Wilson _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Hi, I have a webserver with over 100 domains running. I have installed suse 7.0 with the apache that came with suse. php3 and 4 are installed but are not running. I cannot restart apache because of an error, and I dont seem to find it. I want to download the new .14 apache and compile it, but I have NEVER done that before. My system admin had a major car crash, and is out for the next 3 months. Now I want to try this. I must be careful though, because of the running domains etc... How can I do this ? Can anyone help me ? Regards, Bob
> I have tried $startdir = http://siteiwant.com/; with no joy > :( If the web-site in question had DirectoryBrowse on, or whatever that Apache flag is so you can see directories when there's no index.htm, and if the site in question had no index.htm, you could maybe use fopen() to do that... Another potentially viable alternative would be to use PHP's ftp functions, if you compiled them in, but you'd only see directories the FTP username you provided has access to. Other than that, maybe somehow mounting the remote directories locally vis NSF or, um, Samba?, or, err, I dunno what them other things are that do stuff like that. Web-sites use file-systems to serve up their contents, usually, but they really aren't file-systems necessarily, and don't have to have actual files and directories where the URLs exist, so you can't do file-system functions on them in any organized way... -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
> Ok, I have a string of bits that I combine to store as the privilege level > for our users.... it is 5 chars long "12345", and the default is "00000" > this would be the most basic user. now, when there is a non 0 number at the > front.... it works.... and every thing is cool.... but, even though the > field is set as CHAR 5, if the privs number is set to 00110, it is stored in > the DB as 110.... or at least that is how it is retrieved.... in > PHPmyAdmin.... it shows up as 00110.... > > so anyway, somewhere it is stripping the leading 0's off the number, and I > need to know why and how to fix that..... PHP auto-converts data on an as-needed basis. It probably is stripping the leading 0's off only when you print, and when you attempt to compare them using ==. [Though I don't think the == part is going to hurt you...] For output, you can use something not unlike: printf("%05s", $foo); [Only I probably got the 05 part wrong -- I usually do until I go re-read http://php.net/printf] For your tests, you can use strcmp rather than == if that seems to be going wrong. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
> Ok, I have a string of bits that I combine to store as the privilege level > for our users.... it is 5 chars long "12345", and the default is "00000" > this would be the most basic user. now, when there is a non 0 number at the > front.... it works.... and every thing is cool.... but, even though the > field is set as CHAR 5, if the privs number is set to 00110, it is stored in > the DB as 110.... or at least that is how it is retrieved.... in > PHPmyAdmin.... it shows up as 00110.... > > so anyway, somewhere it is stripping the leading 0's off the number, and I > need to know why and how to fix that..... This is a job for the SET data type in MySQL! Even though the SET type returns a list of legible strings it stores information in a bitmap, as compactly as possible. See: http://www.mysql.com/doc/S/E/SET.html If you can't switch to sets, consider switching to a string of non numeric characters, or make the first character in your string non numeric. It wont get mangled by type conversions, and leading zero supression that way. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com
> The display works great until I get to the end of the month (like now). I > have separated the date as three rows in my dB (msg_year, msg_month and > msg_day) Don't do that. :-^ > As soon as the next month starts, then I get 4 events. > > I know exactly what's wrong, But my non-programmer limitations are coming to > light and I have absolutely no clue what to do next or how to proceed. Any > direction will be extremely appreciated. Database developers spent years getting date-time calculations to work, and you went and tried to out-think them... :-) You *might* be able to use some sort of mktime() function in your database package, and build up a date from your existing fields before you compare. But it would probably be easiest all around to convert your three fields into a single date field. Then, you can just use < and > and = on your dates, as well as some data arithmetic functions like date_add. Caveats: The date field may have limitations such as "only dates between 1/1/1970 and 3/17/2038" Check your database documentation... MySQL http://mysql.org PostgreSQL http://postgresql.org -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
I think you want "C:/InetPub/wwwroot" to take advantage of the permissions system already in place... Forbidden probably means that InetPub itself is not readable by the user PHP runs as. Speaking of which, where's your User and Group lines? Did I miss them? Set User to that goofy iUSR_machinename thingie if NT5 is like NT4. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: "[ rswfire ]" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Saturday, January 27, 2001 4:59 PM Subject: [PHP] Apache on NT 5 =) > I'm getting a Forbidden error when I try to access my site using Apache. > Does anyone know what I did wrong? This is the contents of my httpd.conf > file: > > ServerType standalone > > ServerRoot "C:/Program Files/Apache" > > PidFile logs/httpd.pid > > ScoreBoardFile logs/apache_runtime_status > > Timeout 300 > > KeepAlive On > > MaxKeepAliveRequests 100 > > KeepAliveTimeout 15 > > MaxRequestsPerChild 0 > > ThreadsPerChild 50 > > BindAddress * > > Port 8080 > > ServerAdmin [EMAIL PROTECTED] > > ServerName swifte.dev > DocumentRoot "C:/Inetpub" > > <Directory /> > Options FollowSymLinks > AllowOverride None > </Directory> > > <Directory "C:/Inetpub"> > > Options Indexes FollowSymLinks MultiViews > > AllowOverride None > > Order allow,deny > Allow from all > </Directory> > > <IfModule mod_userdir.c> > UserDir "C:/Program Files/Apache/users/" > </IfModule> > > <IfModule mod_dir.c> > DirectoryIndex index.html > </IfModule> > > AccessFileName .htaccess > > <Files ~ "^\.ht"> > Order allow,deny > Deny from all > </Files> > > UseCanonicalName On > > <IfModule mod_mime.c> > TypesConfig conf/mime.types > </IfModule> > > DefaultType text/plain > > <IfModule mod_mime_magic.c> > MIMEMagicFile conf/magic > </IfModule> > > HostnameLookups Off > > ErrorLog logs/error.log > > LogLevel warn > > LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" > combined > LogFormat "%h %l %u %t \"%r\" %>s %b" common > LogFormat "%{Referer}i -> %U" referer > LogFormat "%{User-agent}i" agent > > CustomLog logs/access.log common > > ServerSignature On > > NameVirtualHost * > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.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] >