[PHP] problem running php
Hi, Though i am running php on apache server on my win98 machine perfectly, recently i install apache and php on my win2000 server, apache start very well but php is not working, as it seems, though when i run phpinfo out of my server with php.exe it runs but it dosen't show in browser whenever i go through localhost\phpinfo.php. What's matter. I faced this problem on my win98 maching too, but somehow it worked, and probable that too after installing PWS and making script executable one. I will thankful to you if u solve my problem with explanation. Regards, Raj k Bhatt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP 4.0.6 on RedHat 6.2: Undefined symbols when using IMAP?!
So sprach »Rasmus Lerdorf« am 2001-07-25 um 21:46:48 -0700 : > Sorry, typo in my response. --with-kerberos is what you want. Arghl, of course! :) I should have seen this one myself... *G* Thanks a lot! It's now working! Hmm - wouldn't it make sense if configure automatically enabled --with-krb *G* if --with-imap is used? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 3 days 7 hours 49 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] IE -> View Source
So sprach »Steve Haemelinck« am 2001-07-26 um 08:32:11 +0200 : > Some sites are able to disable the source view in ie. How do you do that? You can't. You can make stupid games and disable right mouse button clicks, but that's still not going to stop anyone to get the HTML output. Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 3 days 7 hours 48 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mail priority
You can add it in the headers. In fact you can add any info as long as they abide by the RFC822. I took if from the function.mail.php /* additional header pieces for errors, From cc's, bcc's, etc */ $headers .= "From: Birthday Reminder <[EMAIL PROTECTED]>\n"; $headers .= "X-Sender: <[EMAIL PROTECTED]>\n"; $headers .= "X-Mailer: PHP\n"; // mailer $headers .= "X-Priority: 1\n"; // Urgent message! $headers .= "Return-Path: <[EMAIL PROTECTED]>\n"; // Return path for errors $headers .= "cc:[EMAIL PROTECTED]\n"; // CC to $headers .= "bcc:[EMAIL PROTECTED], [EMAIL PROTECTED]\n"; // BCCs to /* and now mail it */ mail($recipient, $subject, $message, $headers); Adrian On Wed, 25 Jul 2001, Jack wrote: > Dear folks, > I am doing the email using mail() command. I wonder if there is anyone can tell me >how do I do the priority attached with the message so that the mail get sent out with >different priority status. > Any advice will be appreciated. > Jack > [EMAIL PROTECTED] > "Love your enemies, it will drive them nuts" > -- 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] what would return?
Hi, I have a php script that will send certain information to a mailing list. Upon arrival the customer will have seven records each with a unique id. On clicking the link a mail will be sent back with the subject having that unique id. On arriving at my mail server I pipe the mail thru a php program using lynx -dump http://localhost/filename.php > /dev/null. My question is what will be returned to the filename.php. I need the unique id from the subject to do further processing? Any ideas. Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to call HTML file within php file
On Thu, 26 Jul 2001 16:18, Balaji Ankem wrote: > Hi! dear friends, > I would like to invoke one HTML file if "IF condition " > satisfies otherwise invoke another HTML file. > > I am sending the document. > > Please help out me. > > Thanks in advance. > > Regards > -Balaji This mailing list doesn't allow attachements. However: if(condition) { include('onehtmlfile'); } else { include('anotherhtmlfile'); } -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I do not fear computers. I fear the lack of them. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] IE -> View Source
There is no way to disable view source from the menu bar in IE, you can only disable view source by disable right click, but they can still view source using the menu bar. Jack [EMAIL PROTECTED] "Love your enemies, it will drive them nuts" - Original Message - From: Peter Houchin <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 1:33 AM Subject: Re: [PHP] IE -> View Source > They do it using a java script that disables the right click or they build a > custom right click menu > > -- > Peter Houchin > Sun Rentals STR Manager > Phone: 03 9329 1455 > Fax: 03 9329 6755 > [EMAIL PROTECTED] > http://www.sun.com.au/rentals > = > _ __ /\ > /_/_/_\/ |_/ \ >/_/_/___ __ __ __ / \ >\_/_/_\ /_/ /_/ /_/ /_/ \ _ / > ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/ > \_//_/_/ /_/_/_/ /_/ \/_/v > > /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ >/_/_ _/_/ __ __ __ /_/ __ __ > /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\/_//_/_/_/ > /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ > /_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/ > = > Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 > * We rent the dot in .COM! ** > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] how to call HTML file within php file
Hi! dear friends, I would like to invoke one HTML file if "IF condition " satisfies otherwise invoke another HTML file. I am sending the document. Please help out me. Thanks in advance. Regards -Balaji The Information contained and transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If this is a forwarded message, the content of this E-MAIL may not have been sent with the authority of the Company. If you are not the intended recipient, an agent of the intended recipient or a person responsible for delivering the information to the named recipient, you are notified that any use, distribution, transmission, printing, copying or dissemination of this information in any way or in any manner is strictly prohibited. If you have received this communication in error, please delete this mail & notify us immediately at [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] IE -> View Source
They do it using a java script that disables the right click or they build a custom right click menu -- Peter Houchin Sun Rentals STR Manager Phone: 03 9329 1455 Fax: 03 9329 6755 [EMAIL PROTECTED] http://www.sun.com.au/rentals = _ __ /\ /_/_/_\/ |_/ \ /_/_/___ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/v /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ __ __ __ /_/ __ __ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\/_//_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/ = Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 * We rent the dot in .COM! ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] IE -> View Source
I was under the impression it couldn't be done because it would require your code control the end-user's web browser, no matter what the brand. Can you please show us these sites? - Original Message - From: "Steve Haemelinck" <[EMAIL PROTECTED]> To: "Brad S. Jackson (E-mail)" <[EMAIL PROTECTED]>; "PHP Mailing Listl (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 4:32 PM Subject: [PHP] IE -> View Source > Some sites are able to disable the source view in ie. How do you do that? > > Haemelinck Steve > > Personal: > Haemelinck.be - Developers Unite :) > Junior WebDeveloper > http://www.haemelinck.com/ > [EMAIL PROTECTED] > > Work: > MCT IT Consulting - Take consulting 2 the next level > Junior IT Consultant > http://www.mct.be/ > [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] repost: error allways on line 1
Hi, No matter where in my code i have a syntax / parse error, my local test server (php 4.0.1, FreeBSD) it reports it as an error on line one, whereas it actually be 281!! When I upload the same script to the "live" server, it reports the error on the correct line. This is really eating into my development time... I know the simple answer is "write big-free code", but I can't understand what else could be wrong. I haven't done any tweaking of the php.ini file, and everything else works fine, and has been for the last six months. Really appreciate any advice / suggestions / places to look. Justin French -- 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] IE -> View Source
Some sites are able to disable the source view in ie. How do you do that? Haemelinck Steve Personal: Haemelinck.be - Developers Unite :) Junior WebDeveloper http://www.haemelinck.com/ [EMAIL PROTECTED] Work: MCT IT Consulting - Take consulting 2 the next level Junior IT Consultant http://www.mct.be/ [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Perl Splice Equivalent
On Thu, 26 Jul 2001 15:24, Steven Michaels wrote: >> - Original Message - > From: "Don Read" <[EMAIL PROTECTED]> > To: "Steven Michaels" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, July 25, 2001 1:11 PM > Subject: RE: [PHP] Perl Splice Equivalent > > > On 25-Jul-2001 Steven Michaels wrote: > > > Hello, > > > I've been wanting to open a file, read its contents, > > > and if one line matches my text, have the program > > > remove that line. The file is in this format (a common > > > text file.): > > > User1 > > > User2 > > > User3 > > > What I want the program to do is to go through each > > > line, and if that line matches User2, then have it > > > delete it, so the finished text file would be > > > User1 > > > User3 > > > The problem is that I can't find an equivalent of > > > splice in perl, and that was what I used before > > > to do this. Could someone help me out? > > > Thanks! > > > > PHP4: > > array_splice() > > > > PHP3: untested stab: > > unset($user[1]); > > unset($user['User2']); > > > > > > Regards, > > -- > > Don Read [EMAIL PROTECTED] > > -- It's always darkest before the dawn. So if you are going to > >steal the neighbor's newspaper, that's the time to do it. > What would be the actual code for this however in > PHP4? I'm new to the language, but know moderate > amounts of PERL, so I'm really struggling with how > I can assign a file's contents into an array and > delete a line, then write the edited version back > to the file. Also, the line now contains more > data. To clarify what I need code for: > Get every line from file.txt which is in this format: > User1~background~font~ > Username2~background~font~ > Login3~background~font~ > Then, match the first field (The one before the ~) > to Username2. If it does match, have the program > get rid of the entire line. Then write everything back > to file.txt. > Sorry if I'm unclear, its really hard to explain what > I need done in text. > Thanks!! > Steven Michaels > http://hollow.myip.org/ Excuse me reordering the message, but it's easier to read when read downwards chronologically. To read a file into an array, where each line of the file is an array element, just use file() See the docs on filesystem functions for more info. Then you loop through the array (see the array handling functions) and perhaps use substr (see string functions) to check whwether the text you want is in the current array element. You may need a regex, but from your information above I would think substr would do the job. Or maybe you could explode the array element on the ~ and just check the first element of the exploded array for the value required. Then, depending on whether you want to keep the current line or not, you could write it to a new array (which will be the basis of what you write out to file). Or maybe I'm not quite understanding you - are all those fields in one row, or... -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA The world is coming to an end. Please log off. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Session - to restrict same user from two logins
Hello Sheni when a user logs into a site, the information that the php server gets is about the machine and not about a particular person, so you have to associate information with that particular person, what i mean is give your users passwords and maintain a database of those logged in using their respective passwords, and whenever a person logs in, run a check from the database to see if he is there or. an easier way of doing this is to have a database of users with their password in the table and when they log on simply mark them logged using sum boolean variable. this will, cut down time. good luck!. and remeber Have a nice day :) On Thu, 26 Jul 2001, Sheni R. Meledath wrote: > Hello: > > Session: > I am using sessions for user authentication in one of our sites. Are there > any ways to restrict the same user from logging in from two different > machines. That is, once if the user is logged in, and if somebody tries to > log-in using the same userid and password it should be able it display a > message 'already logged in from other another computer'. > > I have seen a similar sample in venturewire.com. > > Please help me to find out a solution for this. > > Many thks & best rgds > > > > Sheni R Meledath > [EMAIL PROTECTED] > > > -- Saquib Farooq @ Systems @ SDNPK Islamabad -- 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] Session - to restrict same user from two logins
Hello: Session: I am using sessions for user authentication in one of our sites. Are there any ways to restrict the same user from logging in from two different machines. That is, once if the user is logged in, and if somebody tries to log-in using the same userid and password it should be able it display a message 'already logged in from other another computer'. I have seen a similar sample in venturewire.com. Please help me to find out a solution for this. Many thks & best rgds Sheni R Meledath [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problems with POST form. Page Not Found
Hello, I have some problems sending a form via POST. When I submit the form, I get the error of 'Page Not Found'. This happens in some Internet Explorer (all are v5.5, I think). The action form is ok (http://www.domain.com/formprocess.html"; method="post">). It happens randomly. I've the type .html associated with the php engine. And I need to use the url of action in long format (http://.) Anybody with the same problem?? Best regards -- Antonio Mármol Albert ( [EMAIL PROTECTED] ) http://www.infurma.es -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Install
this would seem to be a php list, maybe you should look on a perl list for a complete response, hmm? Activestate make a reasonable perl interpreter for windows, have a look at activestate.com for more details. also try google and search for perl windows apache, maybe you can try reading some of the results of the search. good luck. -Original Message- From: Roman [mailto:[EMAIL PROTECTED]] Sent: July 26, 2001 1:50 PM To: Php-General Subject: [PHP] Install Hello ! I want to install perl under apache in windows, please send me some information how can i install, where I find perl software, where I find some perl editor... Thanks fo all roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Perl Splice Equivalent
What would be the actual code for this however in PHP4? I'm new to the language, but know moderate amounts of PERL, so I'm really struggling with how I can assign a file's contents into an array and delete a line, then write the edited version back to the file. Also, the line now contains more data. To clarify what I need code for: Get every line from file.txt which is in this format: User1~background~font~ Username2~background~font~ Login3~background~font~ Then, match the first field (The one before the ~) to Username2. If it does match, have the program get rid of the entire line. Then write everything back to file.txt. Sorry if I'm unclear, its really hard to explain what I need done in text. Thanks!! Steven Michaels http://hollow.myip.org/ - Original Message - From: "Don Read" <[EMAIL PROTECTED]> To: "Steven Michaels" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 1:11 PM Subject: RE: [PHP] Perl Splice Equivalent > > On 25-Jul-2001 Steven Michaels wrote: > > Hello, > > I've been wanting to open a file, read its contents, > > and if one line matches my text, have the program > > remove that line. The file is in this format (a common > > text file.): > > User1 > > User2 > > User3 > > What I want the program to do is to go through each > > line, and if that line matches User2, then have it > > delete it, so the finished text file would be > > User1 > > User3 > > The problem is that I can't find an equivalent of > > splice in perl, and that was what I used before > > to do this. Could someone help me out? > > Thanks! > > PHP4: > array_splice() > > PHP3: untested stab: > unset($user[1]); > unset($user['User2']); > > > Regards, > -- > Don Read [EMAIL PROTECTED] > -- It's always darkest before the dawn. So if you are going to >steal the neighbor's newspaper, that's the time to do it. -- 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] Install
Hello ! I want to install perl under apache in windows, please send me some information how can i install, where I find perl software, where I find some perl editor... Thanks fo all roman -- 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] Bug report 11790 - compile error
I wonder if there is any further info available on this? I have encountered the same problem, for the apparent same reasons, on a Linux 2.0.29 kernel Slackware system. Compile error is, for php 4.0.6 filestat.c: In function `php_if_diskfreespace': filestat.c:157: storage size of `buf' isn't known and the probable cause stated is Do you have following header files: /usr/include/sys/statvfs.h /usr/include/sys/statfs.h /usr/include/sys/mount.h On 2.0.29 only the last is available; although there is a statfs.h in the kernel source. Same error with the latest snapshot php4-200107252235 so my short term solution will be php4.0.4. Do I need to submit a formal bug report? -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA My mind ain't so open that anything can crawl right in. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Headers
To emulate a post you'll have to do something similar to the following header "POST /index.php3 HTTP/1.1"; header "Host: $host"; header "Content-type: application/x-www-form-urlencoded" ; header "Content-length: ". strlen ($data); header "Connection: close\n\n"; //may only need one, can't remember if header postpends \n //Now print variables //var1=information&var2=more //for each var to submit header "$$var1=$var1&$$var2=$var2"; or function PostToHost($host, $path, $data_to_send) { $fp = fsockopen($host,80); fputs($fp, "POST $path HTTP/1.1\n"); fputs($fp, "Host: $host\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\n"); fputs($fp, "Content-length: ".strlen($data_to_send)."\n"); fputs($fp, "Connection: close\n\n"); fputs($fp, $data_to_send); while(!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } $host = "cgiserver.x.com"; // target server $path = "/cgi-bin/target.cgi"; // cgi's name $string = "value1=value1&value2=value2" ; // There can be more value PostToHost("$host","$patha","$string"); // call the function Cheers, Lawrence. -Original Message- From: Christian Reiniger [mailto:[EMAIL PROTECTED]] Sent: July 26, 2001 12:32 PM To: Richard Baskett; PHP General Subject: Re: [PHP] Headers On Wednesday 25 July 2001 15:24, Richard Baskett wrote: > What does the header look like when you submit a form using the POST > method? I would like to transfer some php variables to another page > using the header() function. The Location part I have down no problem, > but I don't want to do something like this: > > header(Location:mypage.html?variable1=total) > > This shows all the variables in the URL. Is there a way to use a > header to POST variables to the Location part of the header? Header () is for altering the HTTP headers sent back to the browser. Read some HTTP intro. Regarding your problem - have a look into sessions. they might be what you want. -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) Error 032: Recursion error - see error 032 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP 4.0.6 on RedHat 6.2: Undefined symbols when usingIMAP?!
Sorry, typo in my response. --with-kerberos is what you want. -Rasmus On Thu, 26 Jul 2001, Alexander Skwar wrote: > So sprach »Rasmus Lerdorf« am 2001-07-24 um 16:42:12 -0700 : > > Add --with-kerbeors to your PHP configure flags > > Done. I ran: > > ./configure --enable-bcmath --enable-exif --enable-ftp > --enable-dba=shared --enable-dbx --enable-magic-quotes > --enable-safe-mode --enable-sysvshm --enable-sysvsem --enable-trans-sid > --enable-versioning --with-apxs=/usr/local/apache/bin/apxs --with-gdbm > --with-gd --with-jpeg-dir=/usr --with-mysql=/usr --with-openssl > --with-png-dir --with-ttf --with-swf=../dist --with-xpm-dir=/usr/X11R6 > --with-zlib --with-imap --with-kerbeors > > Same result. Cannot load /usr/local/apache/libexec/libphp4.so into > server: /usr/local/apache/libexec/libphp4.so: undefined symbol: > krb5_defkeyname > > > Someone suggested to compile the kernel without version information for > the modules?!? I don't understand - how could this help? > > Alexander Skwar > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Headers
On Wednesday 25 July 2001 15:24, Richard Baskett wrote: > What does the header look like when you submit a form using the POST > method? I would like to transfer some php variables to another page > using the header() function. The Location part I have down no problem, > but I don't want to do something like this: > > header(Location:mypage.html?variable1=total) > > This shows all the variables in the URL. Is there a way to use a > header to POST variables to the Location part of the header? Header () is for altering the HTTP headers sent back to the browser. Read some HTTP intro. Regarding your problem - have a look into sessions. they might be what you want. -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) Error 032: Recursion error - see error 032 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] OT--PHP, MySQL, WML and GPS Tracking
Probably necessary to have a customised browser or other solution - i haven't seen any that explicitly interface to a gps device for lat/long co-ords. You cannot triangulate position using wap - the phone company does it by triangulating the position of the cellphone (Very simplified explanation here) GSM cellphones transmit a 'i am here' signal every few seconds, minutes etc (dependant on phone settings) It waits for a response from a cell tower, the strongest one to respond is used. On some nokia phones (and motorolas) you can turn on the engineering menu to have a look yourself. The phone company can look at the celltower stats and work out from response times what cell you are in. By using triangulation they can pinpoint you down. This is not available for the general public though. I haven't worked with GPS devices so I can't really point you at any people - garmin is a big name though. I do know some gps devices have serial inputs for reporting position, you could write code interface to that and use some method to transmit that info back. WML is not the only solution. CDPD is also available in most countries. I use that here in China for internet on the go. For low bandwidth solutions, its not too bad. You could possibly end up with a iPaq or similar, a GPS module for that, and a wireless modem for your solution. Would be expensive though, and does incur monthly costs. Not sure what your application is, or volume though. Cheers, Lawrence. -Original Message- From: John Monfort [mailto:[EMAIL PROTECTED]] Sent: July 26, 2001 11:51 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] OT--PHP, MySQL, WML and GPS Tracking Thanks for the reply, Lawrence. The embedded C option sounds tempting. Question: Is it necessary to have a customized browser? I know that most WAP browsers (like the UP.SDK browser) pass certain parameters to the server. Like, phone numbers, software version, and other values. Any chance that one these parameters could be the Lat/Long coordinates? (I don't think I've ever noticed that). How does the phone company triangular a cell pone user? Is anyone aware of a customizable GPS system? Or, any suggestions on GPS developers? I've noticed quite a few companies, but most of them focus on automobiles, and other large devices. The GPS device is too large for our purposes. I am familiar with Embedded C...with the right direction, I can probably put the browser together. But, I'll research the option of a third party browser, or outsourcing a customized browser. Thanks for the info. -john __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- On Wed, 25 Jul 2001 [EMAIL PROTECTED] wrote: > I'm of the opinion you cannot do this totally in PHP. > > You are going to need some client side, and some server side software - > server side can be php of course. > > Client side ie (gps/wap device)- One possibility - write a wap browser that > interfaces with your gps device and returns co-ords in header variables or > cookies. (or post variables possible). > you are either going to have to licence a web browser (or write on yourself, > add in some extra headers in the software), for your gps/pda. This is most > probably going to be an embedded system written in C or similar. > > 1.Its not as hard as it seems, there are open sourced browsers you can base > it on. > 2.It is possible inhouse, but from what you describe, but probable you want > to outsource it. > > let me know if you need some more answers - i used to do embedded systems > design in another life back in the good old days. > > > -Original Message- > From: John Monfort [mailto:[EMAIL PROTECTED]] > Sent: July 26, 2001 7:22 AM > To: [EMAIL PROTECTED] > Subject: [PHP] OT--PHP, MySQL, WML and GPS Tracking > > > > > Hello everyone, > > This is slightly off topic, but I'm sure you guys are the best group to > answer this. > > I have a client who needs a wireless website, that interacts with PHP and > MySQL. In addition to that, the client wants to be able to track the > geographical location, of the user--who will access the site with a cell > phone and/or PDA device. Basically, if someone from, say Los Angeles, > access the website, we want to be able to (automatically) capture his/her > location. This is for internal uses, so the PDA device will be uniformed. > > > That means, I will need to integrate a GPS system/function in the > wireless pages. Once the connection is made, I can use php and mysql to > handle the rest. > > > My problem is with the GPS functions. I've never worked with any GPS > system, so I'm looking for advices, references, and general directions. > > 1) How do I track a user's PDA device (geographical location)? > **- I know some of the WAP
[PHP] Re: Opening another page in code
On Wed, 25 Jul 2001 07:30:03 -0600, [EMAIL PROTECTED] (Nelson Goforth) wrote: >I just want to open another page, sending some parameters, at a point >in a script - without the user clicking on anything (I can do this in >a form - I want to do it WITHOUT the form). > >Like:if($test) { > GO_TO_PAGE (http://www.site.dom/page.php?id=838383); > } > >Except with code that actually works, of course. > >I tried "header (Location:...)" but got an error message that I can't >add to the headers. to clarify: so while the script is running (ON THE SERVER, it has not yet arrived at the client browser), there are several logic paths and some of them don't involve you printing anything to the browser, instead you just want to jump to another site/page. OK. the simplest solution is to redirect as you've tried above. if that doesn't work then the reason is, you've already printed something out to stdout and once you've done that you can't send headers anymore. to work around this, you would use the output buffering functions: www.php.net/manual/ref.outcontrol.php there are other workarounds, but that's the simplest. platypus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] OT--PHP, MySQL, WML and GPS Tracking
Thanks for the reply, Lawrence. The embedded C option sounds tempting. Question: Is it necessary to have a customized browser? I know that most WAP browsers (like the UP.SDK browser) pass certain parameters to the server. Like, phone numbers, software version, and other values. Any chance that one these parameters could be the Lat/Long coordinates? (I don't think I've ever noticed that). How does the phone company triangular a cell pone user? Is anyone aware of a customizable GPS system? Or, any suggestions on GPS developers? I've noticed quite a few companies, but most of them focus on automobiles, and other large devices. The GPS device is too large for our purposes. I am familiar with Embedded C...with the right direction, I can probably put the browser together. But, I'll research the option of a third party browser, or outsourcing a customized browser. Thanks for the info. -john __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- On Wed, 25 Jul 2001 [EMAIL PROTECTED] wrote: > I'm of the opinion you cannot do this totally in PHP. > > You are going to need some client side, and some server side software - > server side can be php of course. > > Client side ie (gps/wap device)- One possibility - write a wap browser that > interfaces with your gps device and returns co-ords in header variables or > cookies. (or post variables possible). > you are either going to have to licence a web browser (or write on yourself, > add in some extra headers in the software), for your gps/pda. This is most > probably going to be an embedded system written in C or similar. > > 1.Its not as hard as it seems, there are open sourced browsers you can base > it on. > 2.It is possible inhouse, but from what you describe, but probable you want > to outsource it. > > let me know if you need some more answers - i used to do embedded systems > design in another life back in the good old days. > > > -Original Message- > From: John Monfort [mailto:[EMAIL PROTECTED]] > Sent: July 26, 2001 7:22 AM > To: [EMAIL PROTECTED] > Subject: [PHP] OT--PHP, MySQL, WML and GPS Tracking > > > > > Hello everyone, > > This is slightly off topic, but I'm sure you guys are the best group to > answer this. > > I have a client who needs a wireless website, that interacts with PHP and > MySQL. In addition to that, the client wants to be able to track the > geographical location, of the user--who will access the site with a cell > phone and/or PDA device. Basically, if someone from, say Los Angeles, > access the website, we want to be able to (automatically) capture his/her > location. This is for internal uses, so the PDA device will be uniformed. > > > That means, I will need to integrate a GPS system/function in the > wireless pages. Once the connection is made, I can use php and mysql to > handle the rest. > > > My problem is with the GPS functions. I've never worked with any GPS > system, so I'm looking for advices, references, and general directions. > > 1) How do I track a user's PDA device (geographical location)? > **- I know some of the WAP enabled phones (like the i1000 by Nextel) > doesn't let you do that** > **- I think there some legality issues around that, but am not sure. > > 2) Where can I read up on that? > > 3) Has anyone work with something on that level? If so, then please help. > > At this point, the PDA device has not been chosen. We are still in the > research stage. > > As far as I know, Trucking Companies, uses this type of system to track > their trucks and drivers. And, off course, any car with a Navigation > System is using the same concept. > > Where can I get some information on this? Has anyone programmed anything > related to Global Positioning Systems? If so, then I would appreciate any > information that you can share. > > > Any help would be greatly appreciated. > > Thanks in advance! > > > __John Monfort_ > _+---+_ > P E P I E D E S I G N S >www.pepiedesigns.com > "The world is waiting, are you ready?" > -+___+- > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] progress dbi?
Susan, OpenLink has Progress ODBC drivers available. The Multi-Tier Drivers are available for many versions of Progress. The Product Availability link will walk you through the selection process for the components specific to your OS. Regarding ODBC - for PHP to use an ODBC driver, you have to link PHP at compile time to a Driver Manager. This is used in conjunction with ODBC drivers to affect your connection. An open source iODBC Driver Manager is available at www.iodbc.org, as well as a HOWTO on compiling PHP --with-iodbc. The iODBC Driver Manager is maintained by OpenLink, and supports the ODBC 3.5 API and includes a GUI control panel on Mac OS X, Linux, and many Unix platforms. OpenLink's commercial drivers download with a free non-expiring 2 user license. Support is available at http://www.openlinksw.com Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers On Wednesday, July 25, 2001, at 08:47 PM, [EMAIL PROTECTED] wrote: > I'm thinking of writing some web aps to interface with a progress > database > created with Association Plus. I'm wondering if anyone has done this > and if > it was hard. I'm not certain how to go about understanding this whole > ODBC > thing ... > > Susan > > -- > [EMAIL PROTECTED] > http://futurebird.diaryland.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] session problems with NS and AOL
I'm developing an area on my site where clients will have access to certain things that nonclients don't. They each have a login and password and stuff like that. I'm using sessions so members can move from one page to the next w/o typing in their info everytime. This works so great in IE. I concentrate mainly on IE, but when I tried it in netscape and in AOLs browser, I get the error message I would get if they were not logged in. I also tried just setting a simple variable on one page and retrieving it on the next and it worked in IE but not netscape or aol. I do not have access to my php.ini because its configured right into Apache. I put phpinfo() on a page here: http://www.jaminatingdesigns.com/beta/php/phpinfo.php";>http://www.jaminatingdesigns.com/beta/php/phpinfo.php I also have a link that my server admin told me to check out: http://www.vservers.com/support/faq/QID=946515720&VIEWFAQ=UNIX I also posted this on the DevShed forums and that can be found here: http://forums.devshed.com/showthread.php?s=&postid=68583#post68583 I'd really like to get this figured out asap and haven't had much luck as of yet. thanks, Pat
[PHP] installing php on redhat7
I am trying to install php as DSO on a redhat7 install of Apache. I can not seam to figure this out. I can not find apxs on the server anywhere. But in the httpd.conf file in the LoadModule area there is a section like this. How can I install php without reinstalling Apache that is not possible for it is on a working server that has a lot of customers. Or is it. LoadModule php_module modules/mod_php.so LoadModule php3_modulemodules/libphp3.so LoadModule php4_modulemodules/libphp4.so Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] parser outside of web tree. whats the trick?
If I have php installed as an executable outside the web tree I can't seem to get php scripts, called as a cgi, to work correctly. When run from the command line this script - #!/usr/local/bin/php - Produces - X-Powered-By: PHP/4.0.4pl1 Content-type: text/html hello world - Just as expected. However, when called from a browser it ends up getting - #!/usr/local/bin/php hello world - when we view the source with a browser. If we telnet to port 80 and do a get for the url in question we find that the above is all that we get, no headers of any kind. If we add a -q the #! line we get the behavior we expect from the command line, the headers are supresed, but the browser ends up getting "No input file specified." sans headers or any html tags. Why am I seeing this behavior? I would expect the script the produce the exact same output whether it is called via the command line or as a cgi outside the web tree. I had thought that perhaps it was a system dependent bug, however, I am seeing this same behavior on several machines, AIX 4.2 running 4.06, FreeBSD 4.3 running 4.0.4.pl1, and I've found similar reports in the bug db for HP/UX etc. So... this leads me to believe I must be missing something somewhere anyone have any thoughts? How do I supress the printing of the #! line? It has to be in col 1 row 1, if it wasn't for that I could manually enter the headers at least and continue on my way, Where did the headers go? if I use the -q option to purposely turn off headers, I could provide my own, but if I have that option it tells me that there is no input file specified if its not invoked from the command line. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] how do you write queries in php codes? (was Re: [PHP] Why doesn't this simple query work?)
Its however you prefer it (or whatever is easier to type usually). sprintf is usable, depends on if you have a c or perl background, and its second nature. For me, I use editplus on windows which gives color coding (www.editplus.com), if I do $query = "select abc,def,ghi from table1,table2". $another_table ." where abc='". $a ."'"; I can immediately see the $another_table, and $a are variables. Use a color coded editor - it makes life a lot easier. Lawrence. -Original Message- From: Moriyoshi Koizumi [mailto:[EMAIL PROTECTED]] Sent: July 26, 2001 10:28 AM To: [EMAIL PROTECTED] Subject: [PHP] how do you write queries in php codes? (was Re: [PHP] Why doesn't this simple query work?) yes, both of yours make the same result too, and are clean :-) and i wonder what the best way is, to put queries into php code... there's a more complicated sample, $a=addslashes($a); $b=addslashes($b); $c=addslashes($c); if( $another_table ) { $another_table=','.$another_table; } $query = "select abc,def,ghi from table1,table2 $another_table where abc='$a' and def='$b' and ghi='$c' "; and i prefer because i often confuse php variables with columns if( $another_table ) { $another_table=','.$another_table; } $query = sprintf( 'select abc,def,ghi from table1,table2 %s where abc="%s" and def="%s" and ghi="%s"', $another_table, addslashes($a), addslashes($b), addslashes($c) ); but i think the latter loses some good php features... then, does anyone have good idea? [EMAIL PROTECTED] wrote: > how about > > $location = addslashes($location); > $query = "select shoodID from shoots where location = '$location'"; > > or > > $query = "select shoodID from shoots where location = '". > addslashes($location) ."'"; > > > Both are \'clean\' :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: ereg_replace
In article <079201c1151f$ec6472e0$650a@cicse>, [EMAIL PROTECTED] (Clayton Dukes) wrote: > Can someone tell me why this doesn't work? > > $home street = ereg replace (" " , "+" , $home street); > > The input is "123 happy trail" > I need the output to be "123+happy+trail" Using an ereg here is overkill. $home_street=str_replace(" ","+",$home street); As to why it's not working as-is... The syntax is fine, so it must be failing because there are no matches to replace. Either you don't have spaces in the string (could they be " " instead?) or you don't have a space in that match string (is it a tab instead?). -- 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]
[PHP] how do you write queries in php codes? (was Re: [PHP] Why doesn't this simple query work?)
yes, both of yours make the same result too, and are clean :-) and i wonder what the best way is, to put queries into php code... there's a more complicated sample, $a=addslashes($a); $b=addslashes($b); $c=addslashes($c); if( $another_table ) { $another_table=','.$another_table; } $query = "select abc,def,ghi from table1,table2 $another_table where abc='$a' and def='$b' and ghi='$c' "; and i prefer because i often confuse php variables with columns if( $another_table ) { $another_table=','.$another_table; } $query = sprintf( 'select abc,def,ghi from table1,table2 %s where abc="%s" and def="%s" and ghi="%s"', $another_table, addslashes($a), addslashes($b), addslashes($c) ); but i think the latter loses some good php features... then, does anyone have good idea? [EMAIL PROTECTED] wrote: > how about > > $location = addslashes($location); > $query = "select shoodID from shoots where location = '$location'"; > > or > > $query = "select shoodID from shoots where location = '". > addslashes($location) ."'"; > > > Both are \'clean\' :) -- 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] It just won't run in background!!!!
I'm trying to get the following (broken up only for readability and cademaintainability) to actually run in the background, returning the browser to the user immediately and not waiting for lynx to exit. I'm obviously going it wrong, but how? Any suggestions? $cmd1 = "/usr/bin/lynx -auth=$Client_Username:$Client_Password -dump \"http://someurl.php?User=$Client_365Num&List=$listchoice[$i]&Letter=$letter choice\""; $cmd2 = "mail -s \"Some Email subject line..\" $Client_Email"; $cmd3 = $cmd1." | ".$cmd2; exec("($cmd3) &"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP/Cold Fusion questions:
This may be off. but in IIS asp pages are handled by asp.dll and php pages by some php dll... maybe it be possible to write another dll that passes the the request and script to asp.dll first and then simulates the browser by grabbing all output sent back by the asp.dll and then passes it to the php dll and then finally passes everything back to the browser? I have no idea how it would be done, but I don't see why it couldn't be done. Regards, Johnny -Original Message- From: Kurt Lieber [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 7:00 PM To: 'SalvatoreJD'; 'PHP-General' Subject: RE: [PHP] PHP/Cold Fusion questions: AFAIK, there are no web servers out there that will allow you to pass a single file through two separate parsing engines (i.e. PHP and CF) Apache won't and I don't believe IIS will do it either. So, from a web server standpoint, the server will either send a web page through the PHP parsing engine or the Cold Fusion parsing engine, but not both. So, I think the answer is the CF developers will have to completely redo the site in CF. Now, I do remember seeing some sort of CF-->PHP converter project over at SoureForge. (www.sf.net) However, I have no direct experience with the project, nor do I know how mature it is. hth --kurt > -Original Message- > From: SalvatoreJD [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 25, 2001 10:32 AM > To: PHP-General > Subject: [PHP] PHP/Cold Fusion questions: > > > Hello... Let me say thank you in advance to those who respond... > > How well does PHP and Cold Fusion code play together? Can PHP > code in CF pages be parsed by PHP server or vise versa- Can > CF code in PHP pages be parsed by the CF server? Or will this > cause major headaches? > > The reason I ask is because I will be building a concept site > for my client in PHP using a MySQL database. As the concept > moves on to production however, I am fairly certain that the > developers will use Cold Fusion to implement further dynamic > features and site architecture. Also, they will probably > want to use Access in conjunction with the CF code. If it > were completely up to me, I'd have the whole site done in > PHP, but unfortunately, I am not the final decision maker here. > > So to recap... Will the CF developers be able to use any of > my code or will they have to redo the site completely in cold fusion?? > > Thanks again for your inputSD > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Syntax Eyes
Almost, but not quite. You also need to prepend a Header before any output your data to tell the browser its content type. Eg -Original Message- From: Mark Roedel [mailto:[EMAIL PROTECTED]] Sent: July 26, 2001 12:02 AM To: Clayton Dukes; Php-General Subject: RE: [PHP] Syntax Eyes > -Original Message- > From: Clayton Dukes [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 25, 2001 10:42 AM > To: Mark Roedel; Php-General > Subject: Re: [PHP] Syntax Eyes > > > I have a row in sql that is binary data (a jpeg) > I need to echo that data to a table on the web page in the form of the > original jepg, when I echo it now, I just get the actual data stream. > > How can I fix this? "; ?> --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University ||-- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP/Cold Fusion questions:
AFAIK, there are no web servers out there that will allow you to pass a single file through two separate parsing engines (i.e. PHP and CF) Apache won't and I don't believe IIS will do it either. So, from a web server standpoint, the server will either send a web page through the PHP parsing engine or the Cold Fusion parsing engine, but not both. So, I think the answer is the CF developers will have to completely redo the site in CF. Now, I do remember seeing some sort of CF-->PHP converter project over at SoureForge. (www.sf.net) However, I have no direct experience with the project, nor do I know how mature it is. hth --kurt > -Original Message- > From: SalvatoreJD [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 25, 2001 10:32 AM > To: PHP-General > Subject: [PHP] PHP/Cold Fusion questions: > > > Hello... Let me say thank you in advance to those who respond... > > How well does PHP and Cold Fusion code play together? Can PHP > code in CF pages be parsed by PHP server or vise versa- Can > CF code in PHP pages be parsed by the CF server? Or will this > cause major headaches? > > The reason I ask is because I will be building a concept site > for my client in PHP using a MySQL database. As the concept > moves on to production however, I am fairly certain that the > developers will use Cold Fusion to implement further dynamic > features and site architecture. Also, they will probably > want to use Access in conjunction with the CF code. If it > were completely up to me, I'd have the whole site done in > PHP, but unfortunately, I am not the final decision maker here. > > So to recap... Will the CF developers be able to use any of > my code or will they have to redo the site completely in cold fusion?? > > Thanks again for your inputSD > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Why doesn't this simple query work?
how about $location = addslashes($location); $query = "select shoodID from shoots where location = '$location'"; or $query = "select shoodID from shoots where location = '". addslashes($location) ."'"; Both are \'clean\' :) -Original Message- From: Moriyoshi Koizumi [mailto:[EMAIL PROTECTED]] Sent: July 26, 2001 4:59 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Why doesn't this simple query work? IMHO $query = "SELECT shoodID FROM shoots WHERE location=\"$location\""; and even $query = "SELECT shoodID FROM shoots WHERE location='$location'"; sometimes cause SQL Syntax Error, because the variable $location may contain quote characters (')(")... since i experienced the same thing i've been doing like this... (the reason is just that i did with 2 byte japanese characters?) $query = sprintf( 'SELECT shootID FROM shoots WHERE location="%s"', AddSlashes( $location ) ); going well, but is this code too ugry? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Opening another page in code (PROPOSED FAQ)
Brian, Bill and Gunther - Thank you, and others, for answers to this question. I think the FAQ entry is a good idea, perhaps with a special note to Perl programmers. I'm used to something like: print "Location:www.site.com"; in Perl, which doesn't seem too strict about other data coming first - it just tosses the browser to that URL (or I've been lucky) - and perhaps PHP needs a function like that - just a sort of "Stop what you're doing and open this URL!" kind of thing. My problem does lie in a 'require' page, so I've got to figure out how to circumvent that. Thanks again, Nelson >I have seen this question alot recently. Maybe it is time for an >FAQ. Maybe somebody >else would like to have an attempt at wording this better: > -- === Nelson Goforth Lighting for Moving Pictures phone: 01.303.322.5042 pager: 01.303.634.9733 resume: http://www.earthnet.net/~ngoforth/film -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] OT--PHP, MySQL, WML and GPS Tracking
I'm of the opinion you cannot do this totally in PHP. You are going to need some client side, and some server side software - server side can be php of course. Client side ie (gps/wap device)- One possibility - write a wap browser that interfaces with your gps device and returns co-ords in header variables or cookies. (or post variables possible). you are either going to have to licence a web browser (or write on yourself, add in some extra headers in the software), for your gps/pda. This is most probably going to be an embedded system written in C or similar. 1.Its not as hard as it seems, there are open sourced browsers you can base it on. 2.It is possible inhouse, but from what you describe, but probable you want to outsource it. let me know if you need some more answers - i used to do embedded systems design in another life back in the good old days. -Original Message- From: John Monfort [mailto:[EMAIL PROTECTED]] Sent: July 26, 2001 7:22 AM To: [EMAIL PROTECTED] Subject: [PHP] OT--PHP, MySQL, WML and GPS Tracking Hello everyone, This is slightly off topic, but I'm sure you guys are the best group to answer this. I have a client who needs a wireless website, that interacts with PHP and MySQL. In addition to that, the client wants to be able to track the geographical location, of the user--who will access the site with a cell phone and/or PDA device. Basically, if someone from, say Los Angeles, access the website, we want to be able to (automatically) capture his/her location. This is for internal uses, so the PDA device will be uniformed. That means, I will need to integrate a GPS system/function in the wireless pages. Once the connection is made, I can use php and mysql to handle the rest. My problem is with the GPS functions. I've never worked with any GPS system, so I'm looking for advices, references, and general directions. 1) How do I track a user's PDA device (geographical location)? **- I know some of the WAP enabled phones (like the i1000 by Nextel) doesn't let you do that** **- I think there some legality issues around that, but am not sure. 2) Where can I read up on that? 3) Has anyone work with something on that level? If so, then please help. At this point, the PDA device has not been chosen. We are still in the research stage. As far as I know, Trucking Companies, uses this type of system to track their trucks and drivers. And, off course, any car with a Navigation System is using the same concept. Where can I get some information on this? Has anyone programmed anything related to Global Positioning Systems? If so, then I would appreciate any information that you can share. Any help would be greatly appreciated. Thanks in advance! __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Big difference?
Henrik Hansen wrote: > > The difference between echo and print is that print returns a > > boolean value, so you can check if "blah blah" was successfully > > printed. > > hmm isen't it always succesfull printed or did I miss something? IIRC print will return false if the connection is aborted (by the browser, usually). There may be other cases. regards Wagner -- Madness takes its toll. Please have exact change. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] WSIWYG Editor using PHP?
I use Quanta. Sorry, don't have a link at the moment. Try on freshmeat.net or sourceforge - k On Tuesday 24 July 2001 11:27 pm, Chip wrote: > Joseph Blythe wrote: > > Try PHP Coder Pro! http://www.phpide.de > > Too bad it's a winblows-only app. :-( > > Chip > > > Regards, > > > > Joseph. > > > > -Original Message- > > From: Bob Clingan [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, 25 July 2001 9:18 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] WSIWYG Editor using PHP? > > > > Does anyone know of any WSIWYG editors that you can plug into a site > > using PHP. > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- > Regards, > > -- > Chip Wiegand > CRW Computer Services > www.wiegand.org > [EMAIL PROTECTED] > <--> > Web page design > Consulting > PC Repair > <--> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strlen
On Thu, 26 Jul 2001 05:49, David OBrien wrote: > I'm having a heck of a time getting something to work like it should > > I have a script which reads a list of words one per line > I want it to display the length of the word a tab then the word. No > matter how I code it it still only shows the word alone on strlen. Any > ideas? > > $handle = fopen ("./ospd3.txt", "r"); > while (!feof($handle)) { > $wordlist[]=fread($handle,4096); > } > fclose($handle); > uasort($wordlist, "sortbylength"); > foreach ($wordlist as $word) { > $lent = strlen($word); > print "$lent"."\t"."$word"."\n"; > } > exit; > > > function sortbylength($arr,$brr) { > $alen = strlen($arr); > $blen = strlen($brr); > if ($alen == $blen) { > return 0; > } > return ($alen > $blen) ? -1 : 1; > } > ?> > > sample of the ospd3.txt > Thanks If you are outputting that to a browser, be aware that, unless the output is enclosed in tags, the browser will ignore the tabs. Tabs, multiple spaces and end of line dharacters are all ignored. Alternatively, you could build it into a structure. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Not a real tagline, but an incredible soy substitute. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] string concatenation
Whoops meant to delete the old message. Doh. Variable variables eh? A topic I've always wondered about and never found in a manual for any of the languages I've used before. Will go and have a look now, cheers. - seb -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: 26 July 2001 02:10 To: Seb Frost; PHP Subject: Re: [PHP] string concatenation On Thu, 26 Jul 2001 06:54, Seb Frost wrote: > OK let's say in variable $search I have the string "color" (without the > quote marks). > > now I want to be able to refer to the variable $color in my code. > > How in gods name do I do this. I guess somehow I have to combine a "$" > with the contents of £search or something...? > > - seb Feel free to trim all the ireelevant stuff from your posts :-) Try $$search or ${color} depending on exactly what you want to do. You might want to have another read through the Variable variables section of the documentation to clarify this. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I tried switching to gum but couldn't keep it lit. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] string concatenation
On Thu, 26 Jul 2001 06:54, Seb Frost wrote: > OK let's say in variable $search I have the string "color" (without the > quote marks). > > now I want to be able to refer to the variable $color in my code. > > How in gods name do I do this. I guess somehow I have to combine a "$" > with the contents of £search or something...? > > - seb Feel free to trim all the ireelevant stuff from your posts :-) Try $$search or ${color} depending on exactly what you want to do. You might want to have another read through the Variable variables section of the documentation to clarify this. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I tried switching to gum but couldn't keep it lit. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] html form question
Funny you should ask - just done it myself: "; echo mysql_result($result,$i,"eventName"); echo ""; } MYSQL_CLOSE(); ?> - seb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] html form question
I use the following Looks a bit unwieldy to call, but does everything I need. eg, say I have a table called foo with ID, Name print OptionCreate ("ID","returnID", "foo order by Name", "","Name"); will create me a drop down print OptionCreate ("ID","returnID", "foo order by Name", "1","Name"); will create me a drop down with item 1 selected. Hope this helps. //OptionName = field to list, passedname=option Select name //tablename= table name , selected value = option select selected value if found //NOTE THAT THE DB open MUST have been already made in the calling routine!!! //eg$db = mysql_connect($db_domain, $db_user,$db_password); // mysql_select_db($db_databasename,$db); function OptionCreate ($optionname,$passedname, $tablename, $selectedvalue="",$optiontext="") { if ($optiontext=="") $sqlstring = "select $optionname from $tablename"; else $sqlstring = "select $optionname, $optiontext from $tablename"; global $db; $result=mysql_query($sqlstring,$db); $rows = mysql_num_rows ($result); $tmpOut = ""; for ($count=0;$count <$rows; $count++) { $tmpOut = $tmpOut . "" . MYSQL_RESULT($result,$count,$optionname) . ""; else $tmpOut = $tmpOut . ">" . MYSQL_RESULT($result,$count,$optiontext) . ""; } $tmpOut = $tmpOut . ""; return ($tmpOut); } -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: July 26, 2001 9:02 AM To: CGI GUY; [EMAIL PROTECTED] Subject: Re: [PHP] html form question On Thu, 26 Jul 2001 10:27, CGI GUY wrote: > What's the method for populating any number of html > form ... tags with query results? > I've seen lots of php-embedded examples for CHECKBOX, > RADIO and even SELECT, but I can't seem to figure out > how to create a simple drop-down menu. HELP!!! You only need to loop through the query result in the usual fashion and echo the results within option tags. Here's a function I wrote to to useful things with SELECT: * vars: $name - the form variable NAME * $value - the SELECTED option which may be an array for multiple selected items * $labels - assoc. array, list of values=>labels * $multiple - if non-empty, select multiple * $size - number of rows to show if multiple * returns: string, HTML (i.e. for use in echo or print statement) */ function formDropDown($name,$value,$labels,$multiple = '',$size ='') { $html = '$labels[$key]\n"; next($labels); $key = key($labels); } $html .= "\n"; return $html; } ?> 4ÈÑ4 -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Why build a wall round a cemetery when no-one wants to get in? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] html form question
> What's the method for populating any number of html > form ... tags with query results? > I've seen lots of php-embedded examples for CHECKBOX, > RADIO and even SELECT, but I can't seem to figure out > how to create a simple drop-down menu. HELP!!! Wouldn't it just be: If there's a varying number of options run a loop with arrays $option[$i] ?> Matt -- 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] RV: Installing PHP in WinNT and Apache 1.3
- Original Message - From: El Gerva To: [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 2:46 PM Subject: Installing PHP in WinNT and Apache 1.3 Hi everyone... I'm really a newbie in PHP. I've got Perl running in Apache, and i want to install PHP 4 (binary) too. These are the lines i added to httpd.conf ScriptAlias /php/ "C:/servers/server1/php/" AddType application/x-httpd-php .php LoadModule php4_module c:/php/sapi/php4apache.dll And configured c:\winnt\php.ini as install help file explains... It seems to run... (doesn't have any problem starting the service), but when I run a script, it gives an 500 error... in the log, appears that the file hasn't, in the first line, "#!". that it's used with perl... people, i would appretiate a lot any help Really thanX aLmAgEdOn
Re: [PHP] html form question
On Thu, 26 Jul 2001 10:27, CGI GUY wrote: > What's the method for populating any number of html > form ... tags with query results? > I've seen lots of php-embedded examples for CHECKBOX, > RADIO and even SELECT, but I can't seem to figure out > how to create a simple drop-down menu. HELP!!! You only need to loop through the query result in the usual fashion and echo the results within option tags. Here's a function I wrote to to useful things with SELECT: * vars: $name - the form variable NAME * $value - the SELECTED option which may be an array for multiple selected items * $labels - assoc. array, list of values=>labels * $multiple - if non-empty, select multiple * $size - number of rows to show if multiple * returns: string, HTML (i.e. for use in echo or print statement) */ function formDropDown($name,$value,$labels,$multiple = '',$size ='') { $html = '$labels[$key]\n"; next($labels); $key = key($labels); } $html .= "\n"; return $html; } ?> 4ÈÑ4 -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Why build a wall round a cemetery when no-one wants to get in? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] html form question
What's the method for populating any number of html form ... tags with query results? I've seen lots of php-embedded examples for CHECKBOX, RADIO and even SELECT, but I can't seem to figure out how to create a simple drop-down menu. HELP!!! __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: error using imagecreate function
On Wed, 25 Jul 2001 22:06, venomous wrote: > This is the code just a normal imagecreate function > file://draw1.php > Header("Content-type: image/jpeg"); > $image = ImageCreate(200,150); > $gray = ImageColorAllocate($image,204,204,204); > $blue = ImageColorAllocate($image,0,0,255); > ImageLine($image,10,10,150,30,$blue); > ImageJPEG($image); > ImageDestroy($image); > ?> > > I think the fault is that i don't use the gd library but i don't know > how i must install it on my NT 4.0 apache 1.3.2 server Check your php.ini file (which is possibly in c:/winnt) for the entry extension=php_gd.dll and if it has a semicolon (;) at the beginning of the line remove it. Check you have a file called ph_gd.dll which is possibly in directory extensions under your php installation and restart apache service. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I'm not paranoid! Which of my enemies told you this? -- 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] progress dbi?
I'm thinking of writing some web aps to interface with a progress database created with Association Plus. I'm wondering if anyone has done this and if it was hard. I'm not certain how to go about understanding this whole ODBC thing ... Susan -- [EMAIL PROTECTED] http://futurebird.diaryland.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] Newbie Help
I was reading through the PHP manual and got to the section on constructors. class A { function A() { echo "I am the constructor of A.\n"; } function B() { echo "I am a regular function named B in class A.\n"; echo "I am not a constructor in A.\n"; } } class B extends A { function C() { echo "I am a regular function.\n"; } } // This will call B() as a constructor. $b = new B; In PHP 3, the function B() in class A will suddenly become a constructor in class B, although it was never intended to be. The rule in PHP 3 is: 'A constructor is a function of the same name as the class.'. PHP 3 does not care if the function is being defined in class B, or if it has been inherited. This is fixed in PHP 4 by modifying the rule to: 'A constructor is a function of the same name as the class it is being defined in.'. Thus in PHP 4, the class B would have no constructor function of its own and the constructor of the base class would have been called, printing 'I am the constructor of A.'. It says that when a new class B was made, that the class B would have no constructor, because the function B() was in the base class. Instead the class B was supposed to derive it's constructor from class A and output 'I am the constructor of A.' When I tried this script, this did not happen and the Function B() was called as the constructor of class B, even though the function was in the base class...can anyone help to clear up this matter? thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Hi! PHP & SQL!
On Thu, 26 Jul 2001 09:47, Dana Holt wrote: > Hello everyone, > > I am very new to PHP (only 2 days now!), and I am having a problem with > MySQL. > > This is probably simple. > > Ok, I insert a new row into a database that has an AUTO_INCREMENT key > defined. > > How to get the value of the AUTO_INCREMENT field of the row I just > inserted? My database doesn't have any other columns that are > guaranteed to be 100% unique. I need this value to create a file with > data related to the row. > > Thanks in advance for any help! mysql_insert_id is the function you want. Have a read through the mysql section of the docs to see what other goodies are available. I suspect mysql_error will be one you may find useful :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA A camel is a horse planned by committee. -- 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] Hi! PHP & SQL!
Hello everyone, I am very new to PHP (only 2 days now!), and I am having a problem with MySQL. This is probably simple. Ok, I insert a new row into a database that has an AUTO_INCREMENT key defined. How to get the value of the AUTO_INCREMENT field of the row I just inserted? My database doesn't have any other columns that are guaranteed to be 100% unique. I need this value to create a file with data related to the row. Thanks in advance for any help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Opening another page in code (PROPOSED FAQ)
I have seen this question alot recently. Maybe it is time for an FAQ. Maybe somebody else would like to have an attempt at wording this better: Q: (7.15?) I want to use the "header" function to do something like a redirect, but I keep getting messages about the headers having already been sent. A: The headers are sent to the browser just before the first piece of content is sent. Content is a) Any text generated by a PHP output function ( such as "print" or "echo" ) b) Any text before, after or between the "" blocks. The usual reason to get this error message, when you would swear blind you aren't outputting anything yet, is white space before outside of the code blocks. Eg: // Broken, Note the blank lines above will be treated as // content and cause the headers to be sent If you changed the above code to and still got the error, then that probably means extra white-space somewhere in "user_logging.inc" At 07:30 25/07/2001 -0600, Nelson Goforth wrote: >This seems simple, but for some reason I can't find what I'm looking for >in books or the archive. Might just be looking for the wrong words. > >I just want to open another page, sending some parameters, at a point in a >script - without the user clicking on anything (I can do this in a form - >I want to do it WITHOUT the form). > >Like:if($test) { > GO_TO_PAGE (http://www.site.dom/page.php?id=838383); > } > >Except with code that actually works, of course. > >I tried "header (Location:...)" but got an error message that I can't add >to the headers. > >What have I missed? > >Thanks, >Nelson >-- > >-- >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] -- 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] Different dates on virtual servers?
Ok - this is a long shot. I'm supporting a PHP3/Apache/Oracle system that has some issues related to the upcoming Sep 3 2001 event when the UNIX timestamp changes from 9 digits to 10. I'd like to run some tests involving a system date after Sep 3 on our Solaris server that houses all of our virtual web servers on Apache. Unfortunately changing the system date would affect all of the other virtual servers too. So I have a 2 part question. Does anyone know if PHP gets its system date from the host web server or the OS. And, if I'm lucky enough for it to be the web server... Is there a way in Apache to add an offset to the system clock for a single virtual server. (So I can make one virtual host think it's September already) I told you it was a long shot :) Anybody?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Why doesn't this simple query work?
True, that's because mySQl doesn't understand it without the signle quotes, or any descent database for that matter. BC -Original Message- From: Jon Yaggie [mailto:[EMAIL PROTECTED]] Sent: woensdag 25 juli 2001 22:12 To: [EMAIL PROTECTED] Subject: Re: [PHP] Why doesn't this simple query work? hmmm i think you need to always have quotes around string regardless of if they are variables . . . $result = mysql_query("SELECT shootID FROM shoots WHERE (location='$location')"); - Original Message - From: "Seb Frost" <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 3:10 AM Subject: [PHP] Why doesn't this simple query work? > Driving me mad. Works if I put a string in quote marks instead of the > variable $location. > > > $result = mysql_query("SELECT shootID FROM shoots WHERE > (location=$location)"); > > > This should work shouldn't it? If it's a problem with the variable being > embedded in the query what's the easiest way to overcome this? > > cheers, > > seb > > -Original Message- > From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] > Sent: 19 July 2001 14:50 > To: php-general > Subject: Re: [PHP] REGEXP > > > I am not sure if I am understanding you... but if you just want to return > the boundary try > > preg_match("|boundary=\"([^\"].+)\"|Uis", $text, $regs ); > $boundary = $regs[1]; > > I am guessing that you want the boundary from the lines > > to avoid regexp (too lazy) but now I want to use it. The final result I > > would need is: B42DA66C4EC07C9B572A58FC so that I can search > > If you are looking for something else let me know > Sheridan > > > -Original Message- > > From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, July 14, 2001 2:54 AM > > To: php general list > > Subject: [PHP] REGEXP > > > > Hi, > > > > I am trying to capture the Header from a mail for my webmail using php > > and > > pop3. The header is something like this: > > Content-Type: multipart/mixed; > > boundary="B42DA66C4EC07C9B572A58FC" > > > > When I use preg_split("/[\d;]*/", $buffer), I get > > Content-Type: multipart/mixed; > > > > What I want is to return the whole line split by the ";". I usually try > > to avoid regexp (too lazy) but now I want to use it. The final result I > > would need is: B42DA66C4EC07C9B572A58FC so that I can search > > in the body of the message for the rest of the parts. > > > > Any pointers would be helpful. > > > > Adrian > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP 4.0.6 on RedHat 6.2: Undefined symbols when using IMAP?!
So sprach »Alexander 'Digital Projects' Skwar« am 2001-07-26 um 00:10:00 +0200 : > Same result. Cannot load /usr/local/apache/libexec/libphp4.so into > server: /usr/local/apache/libexec/libphp4.so: undefined symbol: > krb5_defkeyname Hrmpf, I just installed the latest krb5: krb5-libs-1.2.2-4. However, I'm still getting this. Anyone got a clue about why this is happening? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 3 days 0 hours 11 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] OT--PHP, MySQL, WML and GPS Tracking
Er, surely you need a device with built in GPS recievers? WHich certainly won't be every PDA and mobile phone out there... - seb -Original Message- From: John Monfort [mailto:[EMAIL PROTECTED]] Sent: 26 July 2001 00:22 To: [EMAIL PROTECTED] Subject: [PHP] OT--PHP, MySQL, WML and GPS Tracking Hello everyone, This is slightly off topic, but I'm sure you guys are the best group to answer this. I have a client who needs a wireless website, that interacts with PHP and MySQL. In addition to that, the client wants to be able to track the geographical location, of the user--who will access the site with a cell phone and/or PDA device. Basically, if someone from, say Los Angeles, access the website, we want to be able to (automatically) capture his/her location. This is for internal uses, so the PDA device will be uniformed. That means, I will need to integrate a GPS system/function in the wireless pages. Once the connection is made, I can use php and mysql to handle the rest. My problem is with the GPS functions. I've never worked with any GPS system, so I'm looking for advices, references, and general directions. 1) How do I track a user's PDA device (geographical location)? **- I know some of the WAP enabled phones (like the i1000 by Nextel) doesn't let you do that** **- I think there some legality issues around that, but am not sure. 2) Where can I read up on that? 3) Has anyone work with something on that level? If so, then please help. At this point, the PDA device has not been chosen. We are still in the research stage. As far as I know, Trucking Companies, uses this type of system to track their trucks and drivers. And, off course, any car with a Navigation System is using the same concept. Where can I get some information on this? Has anyone programmed anything related to Global Positioning Systems? If so, then I would appreciate any information that you can share. Any help would be greatly appreciated. Thanks in advance! __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Window size (not PHP?)
I must confess I think this can't be done with PHP because of it being server-side but hell you seem like a friendly and helpful enough bunch of guys anyway so I thought I'd ask you knowledgable ones. So what should I be using? Javascript? I want the size of the window, not the screen resolution. Also is it possible to change the page layout if the user resizes his window whilst looking at the page? Basically I want to create a table of photos from my database. And I want there to be enough columns to fill the viewable size. - seb -Original Message- From: Matthew Loff [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 23:41 To: 'Seb Frost'; [EMAIL PROTECTED]; 'PHP' Subject: RE: [PHP] Regular Expression Question http://www.php.net/manual/en/function.substr.php string substr (string string, int start [, int length]) Substr returns the portion of string specified by the start and length parameters. If start is positive, the returned string will start at the start'th position in string, counting from zero. For instance, in the string 'abcdef', the character at position 0 is 'a', the character at position 2 is 'c', and so forth. Examples: $rest = substr ("abcdef", 1);// returns "bcdef" $rest = substr ("abcdef", 1, 3); // returns "bcd" -Original Message- From: Seb Frost [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 5:09 PM To: [EMAIL PROTECTED]; PHP Subject: RE: [PHP] Regular Expression Question I hope my later message clarifys what I mean. - seb -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 22:05 To: PHP Subject: RE: [PHP] Regular Expression Question Aren't the trims just for white space? Jeff Oien > since you know exactly which 4 characters you want to keep you can use > a simple string trimming routine. I forget the name of the function > in php but it's there and it'll be something like > > trimstring($string,1,5); > > or something like that. No need for complicated regular expressions either > way. > > - seb > > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Sent: 25 July 2001 21:47 > To: PHP > Subject: [PHP] Regular Expression Question > > > I want to replace a string like this 1B335-2G with this B335. So for > all the > strings I want to remove the first character and the last three characters. > I'm not sure which replace function to use or how to go about it. > Thanks. Jeff Oien > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] To > contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 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] OT--PHP, MySQL, WML and GPS Tracking
Hello everyone, This is slightly off topic, but I'm sure you guys are the best group to answer this. I have a client who needs a wireless website, that interacts with PHP and MySQL. In addition to that, the client wants to be able to track the geographical location, of the user--who will access the site with a cell phone and/or PDA device. Basically, if someone from, say Los Angeles, access the website, we want to be able to (automatically) capture his/her location. This is for internal uses, so the PDA device will be uniformed. That means, I will need to integrate a GPS system/function in the wireless pages. Once the connection is made, I can use php and mysql to handle the rest. My problem is with the GPS functions. I've never worked with any GPS system, so I'm looking for advices, references, and general directions. 1) How do I track a user's PDA device (geographical location)? **- I know some of the WAP enabled phones (like the i1000 by Nextel) doesn't let you do that** **- I think there some legality issues around that, but am not sure. 2) Where can I read up on that? 3) Has anyone work with something on that level? If so, then please help. At this point, the PDA device has not been chosen. We are still in the research stage. As far as I know, Trucking Companies, uses this type of system to track their trucks and drivers. And, off course, any car with a Navigation System is using the same concept. Where can I get some information on this? Has anyone programmed anything related to Global Positioning Systems? If so, then I would appreciate any information that you can share. Any help would be greatly appreciated. Thanks in advance! __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Big difference?
Not if there are syntax errors like misplaced quotes (", '). Nathan Cook [EMAIL PROTECTED] - Original Message - From: "Henrik Hansen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 3:54 PM Subject: Re: [PHP] Big difference? > [EMAIL PROTECTED] (Johannes Schill) wrote: > > > Hello Kyle, > > > > The difference between echo and print is that print returns a boolean value, > > so you can check if "blah blah" was successfully printed. > > hmm isen't it always succesfull printed or did I miss something? > > -- > Henrik Hansen > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Regular Expression Question
http://www.php.net/manual/en/function.substr.php string substr (string string, int start [, int length]) Substr returns the portion of string specified by the start and length parameters. If start is positive, the returned string will start at the start'th position in string, counting from zero. For instance, in the string 'abcdef', the character at position 0 is 'a', the character at position 2 is 'c', and so forth. Examples: $rest = substr ("abcdef", 1);// returns "bcdef" $rest = substr ("abcdef", 1, 3); // returns "bcd" -Original Message- From: Seb Frost [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 5:09 PM To: [EMAIL PROTECTED]; PHP Subject: RE: [PHP] Regular Expression Question I hope my later message clarifys what I mean. - seb -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 22:05 To: PHP Subject: RE: [PHP] Regular Expression Question Aren't the trims just for white space? Jeff Oien > since you know exactly which 4 characters you want to keep you can use > a simple string trimming routine. I forget the name of the function > in php but it's there and it'll be something like > > trimstring($string,1,5); > > or something like that. No need for complicated regular expressions either > way. > > - seb > > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Sent: 25 July 2001 21:47 > To: PHP > Subject: [PHP] Regular Expression Question > > > I want to replace a string like this 1B335-2G with this B335. So for > all the > strings I want to remove the first character and the last three characters. > I'm not sure which replace function to use or how to go about it. > Thanks. Jeff Oien > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] To > contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] The BIG Question
That's like saying "What's C++ good for?" Well, not quite... Ha ha... I get a bit carried away... But it's close enough. PHP does what you want it to do... Database-driven sites are covered frequently on this list because PHP's database support is extensive and very easy to use. You shouldn't be thinking "What can I do with PHP on my web site?" you should be thinking "I want my website to do __, how will I accomplish this with PHP?" :) -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 12:23 AM To: [EMAIL PROTECTED] Subject: [PHP] The BIG Question Ok this is the big question, in-depth could someone tell me what PHP could be used for other than aking databases (which i canT do) Thanks -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- 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] Classes : Linked Lists vs Arrays?
I'm looking for opinions on using Linked Lists vs Arrays in PHP. As a little background: I'm developing a calendar that works with LDAP. I've got the following classes defined. Event and Calendar Calendar has methods displayMonthView($timestamp) displayWeekView($timestamp) displayDayView($timestamp) among others... and I'm trying to decide if my Calendar class should have a LinkedList or an Array of Events? Within displayDayView(), I'd like to display all events for that day from the collection of events. Thanks In Advanced. Johnny -- 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] sockets help ...
Hello, simple question: $sock = fsockopen($server_ip, $server_port, $errno, $errstr, 30); while(!feof($sock)) echo fgets($sock,4096); fclose($sock); why does the while() makes an infinite loop, like if FEOF was never found ? thanks Arnauld Dravet [EMAIL PROTECTED]
Re: [PHP] PHP 4.0.6 on RedHat 6.2: Undefined symbols when using IMAP?!
So sprach »Rasmus Lerdorf« am 2001-07-24 um 16:42:12 -0700 : > Add --with-kerbeors to your PHP configure flags Done. I ran: ./configure --enable-bcmath --enable-exif --enable-ftp --enable-dba=shared --enable-dbx --enable-magic-quotes --enable-safe-mode --enable-sysvshm --enable-sysvsem --enable-trans-sid --enable-versioning --with-apxs=/usr/local/apache/bin/apxs --with-gdbm --with-gd --with-jpeg-dir=/usr --with-mysql=/usr --with-openssl --with-png-dir --with-ttf --with-swf=../dist --with-xpm-dir=/usr/X11R6 --with-zlib --with-imap --with-kerbeors Same result. Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: undefined symbol: krb5_defkeyname Someone suggested to compile the kernel without version information for the modules?!? I don't understand - how could this help? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 2 days 22 hours 51 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Session Variables
Thanks! I changed my code to the following and it plugged that hole. :) if (!$PHPSESSID) { $sess_auth = ""; session_register('sess_auth'); } - Original Message - From: "Sascha Schumann" <[EMAIL PROTECTED]> To: "Johnson, Kirk" <[EMAIL PROTECTED]> Cc: "PHP Users" <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 2:10 PM Subject: RE: [PHP] Session Variables > On Wed, 25 Jul 2001, Johnson, Kirk wrote: > > > > Is there anyway to prevent session variables from being > > > overwritten by a get string? > > > > PHP will do this automatically *if* you initialize your session variables to > > *anything* as soon as you register them. For example, > > > > session_register("sess_auth"); > > $sess_auth = ""; > > Note that session_register() will implicitly commence the > session, and thus will automatically instantiate all session > variables. Hence, the above two lines need to be reversed, > otherwise you might overwrite the session variable. > > - Sascha Experience IRCG > http://schumann.cx/http://schumann.cx/ircg > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Big difference?
[EMAIL PROTECTED] (Johannes Schill) wrote: > Hello Kyle, > > The difference between echo and print is that print returns a boolean value, > so you can check if "blah blah" was successfully printed. hmm isen't it always succesfull printed or did I miss something? -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Big difference?
[EMAIL PROTECTED] (Kyle Smith) wrote: > What is the difference between using > print "blah blah" > ?> > > and > echo "blah blah" > ?> print is a simple function that outputs what it's got in, where as echo more or less is the same but can take more paremeters, look at their manual pages for more information. -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] is_file() and is_dir() info
Well, I finally got some time on this and found that is_file() and is_dir() will NOT traverse drectories very well. So, you must chdir(), then execute is_file() is_dir() as needed. -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [EMAIL PROTECTED] > -Original Message- > From: Gonyou, Austin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 25, 2001 3:19 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP] is_file() and is_dir() info > > > Please someone help me on this? > > -- > Austin Gonyou > Systems Architect, CCNA > Coremetrics, Inc. > Phone: 512-796-9023 > email: [EMAIL PROTECTED] > > > -Original Message- > > From: Gonyou, Austin > > Sent: Wednesday, July 25, 2001 12:50 PM > > To: Gonyou, Austin; 'Chris Cocuzzo'; [EMAIL PROTECTED] > > Subject: RE: [PHP] is_file() and is_dir() info > > > > > > Will somone on this list please help me in this? All the > > examples I've come across researching this are WAY too > > complex for getting around this if someone can confirm my > suspicions. > > > > -- > > Austin Gonyou > > Systems Architect, CCNA > > Coremetrics, Inc. > > Phone: 512-796-9023 > > email: [EMAIL PROTECTED] > > > > > -Original Message- > > > From: Gonyou, Austin [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, July 25, 2001 12:08 PM > > > To: 'Chris Cocuzzo'; [EMAIL PROTECTED] > > > Subject: [PHP] is_file() and is_dir() info > > > > > > > > > I've read a lot about the is_file and is_dir functions, but > > > something is > > > still missing. If I call is_file to tell me if something is a > > > file or not, > > > and it must traverse a large path, e.g. ./dir1/dir2/file.txt, > > > it will almost > > > always fail. Can anyone tell me why, and what a possible work > > > around is? I > > > guess I could CHDIR() first or something. > > > > > > -- > > > Austin Gonyou > > > Systems Architect, CCNA > > > Coremetrics, Inc. > > > Phone: 512-796-9023 > > > email: [EMAIL PROTECTED] > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: > > > [EMAIL PROTECTED] > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Big difference?
Hello Kyle, The difference between echo and print is that print returns a boolean value, so you can check if "blah blah" was successfully printed. more info about this: www.php.net/print www.php.net/echo Best regards, Johannes Schill - Original Message - From: "Kyle Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 7:15 AM Subject: [PHP] Big difference? What is the difference between using and -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- 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] string concatenation
OK let's say in variable $search I have the string "color" (without the quote marks). now I want to be able to refer to the variable $color in my code. How in gods name do I do this. I guess somehow I have to combine a "$" with the contents of £search or something...? - seb -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 22:05 To: PHP Subject: RE: [PHP] Regular Expression Question Aren't the trims just for white space? Jeff Oien > since you know exactly which 4 characters you want to keep you can use a > simple string trimming routine. I forget the name of the function in php > but it's there and it'll be something like > > trimstring($string,1,5); > > or something like that. No need for complicated regular expressions either > way. > > - seb > > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Sent: 25 July 2001 21:47 > To: PHP > Subject: [PHP] Regular Expression Question > > > I want to replace a string like this 1B335-2G with this B335. So for all the > strings I want to remove the first character and the last three characters. > I'm not sure which replace function to use or how to go about it. Thanks. > Jeff Oien > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Big difference?
What is the difference between using and -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
RE: [PHP] Session Variables
On Wed, 25 Jul 2001, Johnson, Kirk wrote: > > Is there anyway to prevent session variables from being > > overwritten by a get string? > > PHP will do this automatically *if* you initialize your session variables to > *anything* as soon as you register them. For example, > > session_register("sess_auth"); > $sess_auth = ""; Note that session_register() will implicitly commence the session, and thus will automatically instantiate all session variables. Hence, the above two lines need to be reversed, otherwise you might overwrite the session variable. - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Regular Expression Question
I hope my later message clarifys what I mean. - seb -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 22:05 To: PHP Subject: RE: [PHP] Regular Expression Question Aren't the trims just for white space? Jeff Oien > since you know exactly which 4 characters you want to keep you can use a > simple string trimming routine. I forget the name of the function in php > but it's there and it'll be something like > > trimstring($string,1,5); > > or something like that. No need for complicated regular expressions either > way. > > - seb > > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Sent: 25 July 2001 21:47 > To: PHP > Subject: [PHP] Regular Expression Question > > > I want to replace a string like this 1B335-2G with this B335. So for all the > strings I want to remove the first character and the last three characters. > I'm not sure which replace function to use or how to go about it. Thanks. > Jeff Oien > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] other than 'thawte'/'verisign'?
Anyone know if we in the US can use guys like these? http://www.globalsign.net/digital_certificate/hypersign/index.cfm that's 197 usd (plus some amount of vat?) for a **128** bit certificate. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Regular Expression Question
Aren't the trims just for white space? Jeff Oien > since you know exactly which 4 characters you want to keep you can use a > simple string trimming routine. I forget the name of the function in php > but it's there and it'll be something like > > trimstring($string,1,5); > > or something like that. No need for complicated regular expressions either > way. > > - seb > > -Original Message- > From: Jeff Oien [mailto:[EMAIL PROTECTED]] > Sent: 25 July 2001 21:47 > To: PHP > Subject: [PHP] Regular Expression Question > > > I want to replace a string like this 1B335-2G with this B335. So for all the > strings I want to remove the first character and the last three characters. > I'm not sure which replace function to use or how to go about it. Thanks. > Jeff Oien > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Why doesn't this simple query work?
Thanks for the suggestion but it's too ugly for me :-) I'll just stick with using '. I don't forsee a problem. - seb -Original Message- From: Moriyoshi Koizumi [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 21:59 To: [EMAIL PROTECTED] Subject: Re: [PHP] Why doesn't this simple query work? IMHO $query = "SELECT shoodID FROM shoots WHERE location=\"$location\""; and even $query = "SELECT shoodID FROM shoots WHERE location='$location'"; sometimes cause SQL Syntax Error, because the variable $location may contain quote characters (')(")... since i experienced the same thing i've been doing like this... (the reason is just that i did with 2 byte japanese characters?) $query = sprintf( 'SELECT shootID FROM shoots WHERE location="%s"', AddSlashes( $location ) ); going well, but is this code too ugry? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Regular Expression Question correction
$newstring = substr($string,1,4); FOUR, not FIVE. Doh. -Original Message- From: Seb Frost [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 22:03 To: [EMAIL PROTECTED]; PHP Subject: RE: [PHP] Regular Expression Question since you know exactly which 4 characters you want to keep you can use a simple string trimming routine. $newstring = substr($string,1,5); No need for complicated regular expressions! - seb -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 21:47 To: PHP Subject: [PHP] Regular Expression Question I want to replace a string like this 1B335-2G with this B335. So for all the strings I want to remove the first character and the last three characters. I'm not sure which replace function to use or how to go about it. Thanks. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP scripting
Here's an obvious one: 1. Go to http://www.php.net (or one of its mirrors) 2. Click "Show Source" in the bottom right-hand side of any of the pages on the site. J Tyler Longren wrote: > Also, > px.sklar.com > www.phpbuilder.com > www.hotscripts.com/PHP > > Anyone else? > > Tyler Longren > Captain Jack Communications > [EMAIL PROTECTED] > www.captainjack.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Why doesn't this simple query work?
IMHO $query = "SELECT shoodID FROM shoots WHERE location=\"$location\""; and even $query = "SELECT shoodID FROM shoots WHERE location='$location'"; sometimes cause SQL Syntax Error, because the variable $location may contain quote characters (')(")... since i experienced the same thing i've been doing like this... (the reason is just that i did with 2 byte japanese characters?) $query = sprintf( 'SELECT shootID FROM shoots WHERE location="%s"', AddSlashes( $location ) ); going well, but is this code too ugry? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Regular Expression Question
since you know exactly which 4 characters you want to keep you can use a simple string trimming routine. $newstring = substr($string,1,5); No need for complicated regular expressions! - seb -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 21:47 To: PHP Subject: [PHP] Regular Expression Question I want to replace a string like this 1B335-2G with this B335. So for all the strings I want to remove the first character and the last three characters. I'm not sure which replace function to use or how to go about it. Thanks. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP scripting
Those scripts do "stuff". Some of us have submitted code to those places. Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com - Original Message - From: "Kyle Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 11:57 PM Subject: Re: [PHP] PHP scripting > just scripts that do anything? but ones that people actually use > > > -legokiller666- > http://www.StupeedStudios.f2s.com > New address new site > > ICQ: 115852509 > MSN: [EMAIL PROTECTED] > AIM: legokiller666 > > > - Original Message - > From: "Lara J. Fabans" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, July 25, 2001 1:46 PM > Subject: Re: [PHP] PHP scripting > > > > to do what? > > > > There's tons of sample scripts out there on > > www.weberdev.com > > www.zend.com > > www.devshed.com > > > > if you just want to go absorb knowledge > > > > Lara > > > > > > - Original Message - > > From: "Kyle Smith" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, July 25, 2001 9:40 PM > > Subject: [PHP] PHP scripting > > > > > > Could some of you people please send me some scripts you have made (not > too > > complicated) as i find it easier to learn from hands on experience =) > > > > > > Thanks > > -legokiller666- > > http://www.StupeedStudios.f2s.com > > New address new site > > > > ICQ: 115852509 > > MSN: [EMAIL PROTECTED] > > AIM: legokiller666 > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP scripting
just scripts that do anything? but ones that people actually use -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 - Original Message - From: "Lara J. Fabans" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 1:46 PM Subject: Re: [PHP] PHP scripting > to do what? > > There's tons of sample scripts out there on > www.weberdev.com > www.zend.com > www.devshed.com > > if you just want to go absorb knowledge > > Lara > > > - Original Message - > From: "Kyle Smith" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, July 25, 2001 9:40 PM > Subject: [PHP] PHP scripting > > > Could some of you people please send me some scripts you have made (not too > complicated) as i find it easier to learn from hands on experience =) > > > Thanks > -legokiller666- > http://www.StupeedStudios.f2s.com > New address new site > > ICQ: 115852509 > MSN: [EMAIL PROTECTED] > AIM: legokiller666 > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Session Variables
> Is there anyway to prevent session variables from being > overwritten by a get string? PHP will do this automatically *if* you initialize your session variables to *anything* as soon as you register them. For example, session_register("sess_auth"); $sess_auth = ""; If you do this, then session variables will overwrite GET/POST variables, and the latter will need to be retrieved from the $HTTP_(GET/POST)_VARS arrays. Another approach is to turn register_globals off in php.ini. This is a long one to explain, but has been covered quite bit here- search the archive. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP scripting
Also, px.sklar.com www.phpbuilder.com www.hotscripts.com/PHP Anyone else? Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com - Original Message - From: "Lara J. Fabans" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 3:46 PM Subject: Re: [PHP] PHP scripting > to do what? > > There's tons of sample scripts out there on > www.weberdev.com > www.zend.com > www.devshed.com > > if you just want to go absorb knowledge > > Lara > > > - Original Message - > From: "Kyle Smith" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, July 25, 2001 9:40 PM > Subject: [PHP] PHP scripting > > > Could some of you people please send me some scripts you have made (not too > complicated) as i find it easier to learn from hands on experience =) > > > Thanks > -legokiller666- > http://www.StupeedStudios.f2s.com > New address new site > > ICQ: 115852509 > MSN: [EMAIL PROTECTED] > AIM: legokiller666 > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Regular Expression Question
I want to replace a string like this 1B335-2G with this B335. So for all the strings I want to remove the first character and the last three characters. I'm not sure which replace function to use or how to go about it. Thanks. Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP scripting
to do what? There's tons of sample scripts out there on www.weberdev.com www.zend.com www.devshed.com if you just want to go absorb knowledge Lara - Original Message - From: "Kyle Smith" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 25, 2001 9:40 PM Subject: [PHP] PHP scripting Could some of you people please send me some scripts you have made (not too complicated) as i find it easier to learn from hands on experience =) Thanks -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] The BIG Question
> What else? Do you have a particular application that you think might be > able to use php for? I used PHP to create a web-based interface to a list of Transport Tycoon saved games, etc, that previously was only available as part of one of my apps. (I've now created a new PHP and MySQL-driven site containing everything that was on there plus more). -- Owen Rudge http://www.owenrudge.co.uk/ http://www.gamearchive.uk.tt/ -- 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] Session Variables
Is there anyway to prevent session variables from being overwritten by a get string? I'm wanting to use sessions for security/login, but I'm finding that I can bypass this very easily. For example, I want to hide menu items based on security level, so I use something like this: if ($HTTP_SESSION_VARS["sess_auth"] > 2) { print "News Editor"; }; which works, however, it can be bypassed if someone just enters the value in the url like so: http://secured.site.com/index.php?sess_auth=admin is there any way around this using sessions? Is there a far more suitable method? Thanks! Jason Bell
[PHP] PHP scripting
Could some of you people please send me some scripts you have made (not too complicated) as i find it easier to learn from hands on experience =) Thanks -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
Re: [PHP] The BIG Question
It can be used for (nearly) anything, it seems. Sure, making dynamic web sites is cool... not necessarily database driven, but perhaps driven by user input. I'm currently using PHP as my primary shell scripting language... I have a collection of scripts that manipulate directories full of digital images that I've taken (or scanned from my film photography)... I can be used to create web-based interfaces to traditionally command-line tasks... for instance, another project I'm working on (that unfortunately will need to be moved to java due to the need for multiple threads and draw-anywhere capabilities) is a website that monitors machines on my network that are out in the field... queries them for the temperature, status of some services, etc etc... the command execution functions (system(), exec(), etc) really make PHP incredibly powerful. What else? Do you have a particular application that you think might be able to use php for? Ben On Wed, 25 Jul 2001, Kyle Smith wrote: > Ok this is the big question, in-depth could someone tell me what PHP could be used >for other than aking databases (which i canT do) > > Thanks > -legokiller666- > http://www.StupeedStudios.f2s.com > New address new site > > ICQ: 115852509 > MSN: [EMAIL PROTECTED] > AIM: legokiller666 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Why doesn't this simple query work?
Ah thank you Jon! I was using double quotes (tried with and without escape slashes). Forgot about single quotes compeletly... - seb -Original Message- From: Jon Yaggie [mailto:[EMAIL PROTECTED]] Sent: 25 July 2001 21:12 To: [EMAIL PROTECTED] Subject: Re: [PHP] Why doesn't this simple query work? hmmm i think you need to always have quotes around string regardless of if they are variables . . . $result = mysql_query("SELECT shootID FROM shoots WHERE (location='$location')"); - Original Message - From: "Seb Frost" <[EMAIL PROTECTED]> To: "php-general" <[EMAIL PROTECTED]> Sent: Thursday, July 26, 2001 3:10 AM Subject: [PHP] Why doesn't this simple query work? > Driving me mad. Works if I put a string in quote marks instead of the > variable $location. > > > $result = mysql_query("SELECT shootID FROM shoots WHERE > (location=$location)"); > > > This should work shouldn't it? If it's a problem with the variable being > embedded in the query what's the easiest way to overcome this? > > cheers, > > seb > > -Original Message- > From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] > Sent: 19 July 2001 14:50 > To: php-general > Subject: Re: [PHP] REGEXP > > > I am not sure if I am understanding you... but if you just want to return > the boundary try > > preg_match("|boundary=\"([^\"].+)\"|Uis", $text, $regs ); > $boundary = $regs[1]; > > I am guessing that you want the boundary from the lines > > to avoid regexp (too lazy) but now I want to use it. The final result I > > would need is: B42DA66C4EC07C9B572A58FC so that I can search > > If you are looking for something else let me know > Sheridan > > > -Original Message- > > From: Adrian D'Costa [mailto:[EMAIL PROTECTED]] > > Sent: Saturday, July 14, 2001 2:54 AM > > To: php general list > > Subject: [PHP] REGEXP > > > > Hi, > > > > I am trying to capture the Header from a mail for my webmail using php > > and > > pop3. The header is something like this: > > Content-Type: multipart/mixed; > > boundary="B42DA66C4EC07C9B572A58FC" > > > > When I use preg_split("/[\d;]*/", $buffer), I get > > Content-Type: multipart/mixed; > > > > What I want is to return the whole line split by the ";". I usually try > > to avoid regexp (too lazy) but now I want to use it. The final result I > > would need is: B42DA66C4EC07C9B572A58FC so that I can search > > in the body of the message for the rest of the parts. > > > > Any pointers would be helpful. > > > > Adrian > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Exec !?!
Hi! I need to run an exe program inside my PHP page. To run this program I do "addcours.exe c toto" in DOS. All my dll's and exe are in the folder C:/WINNT/system32/ My php pages are in the folder C:/WEB/PHP/ Code of my PHP page : ... exec("C:/WINNT/system32/addcours.exe c toto"); ... But it doesn't work!!! Why? I wait for your advices! Thanks, Melanie -- 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] reading from file
I am using the script include below to read the content of a file and output it. When I load this script with the adress of a plain html file it outputs everything like expected, except there are some extra characters spread over the file. They come in little string like '40d' or '1000' and appear on positions where there is 'nothing' in the original source file. Any idea what could cause that behavior? Stefan \n"; } else { fputs($fp,$request); while(!feof($fp)) { $line=fgets($fp,4096); echo $line; } fclose($fp); } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] The BIG Question
Ok this is the big question, in-depth could someone tell me what PHP could be used for other than aking databases (which i canT do) Thanks -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
RE: [PHP] is_file() and is_dir() info
Please someone help me on this? -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [EMAIL PROTECTED] > -Original Message- > From: Gonyou, Austin > Sent: Wednesday, July 25, 2001 12:50 PM > To: Gonyou, Austin; 'Chris Cocuzzo'; [EMAIL PROTECTED] > Subject: RE: [PHP] is_file() and is_dir() info > > > Will somone on this list please help me in this? All the > examples I've come across researching this are WAY too > complex for getting around this if someone can confirm my suspicions. > > -- > Austin Gonyou > Systems Architect, CCNA > Coremetrics, Inc. > Phone: 512-796-9023 > email: [EMAIL PROTECTED] > > > -Original Message- > > From: Gonyou, Austin [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 25, 2001 12:08 PM > > To: 'Chris Cocuzzo'; [EMAIL PROTECTED] > > Subject: [PHP] is_file() and is_dir() info > > > > > > I've read a lot about the is_file and is_dir functions, but > > something is > > still missing. If I call is_file to tell me if something is a > > file or not, > > and it must traverse a large path, e.g. ./dir1/dir2/file.txt, > > it will almost > > always fail. Can anyone tell me why, and what a possible work > > around is? I > > guess I could CHDIR() first or something. > > > > -- > > Austin Gonyou > > Systems Architect, CCNA > > Coremetrics, Inc. > > Phone: 512-796-9023 > > email: [EMAIL PROTECTED] > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]