[PHP] Re: magic quotes
Hello, When magic_quotes_gpc is on, addslashes() will be automatically applied on all data from GET, POST, COOKIES by PHP. When magic_quotes_runtime is on, addslashes() will be automatically applied on all data collected form database (ex: when you execute a SELECT statement). Therefore when magic_quotes_runtime is on, you need to use stripslashes() on data colected from database. It is not only apply to data collected from database, others as well. I believe there is a details guide in the php documentation at php.net. Foong "Justin French" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > Can I just have a quick head check on magic quotes runtime (&gpc)? > > I have them both set to Off currently, and my pages work fine. However, > when I set them to on, I end up with slashes throughout the mysql data. > > Is this the expected behaviour? Seems counter-intuitive to me, but I've > never really cared about it 'till today, because i've never had a problem!! > > > What is a common setting for these two directives, so that I can have my LAN > server *reasonably* "normal". > > TIA > Justin > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] *Umlauts/UTF-8
Hello, I am having a problem with umlauts in utf-8 encoded txt file, which is being read by my script. Instead of umlauts I get ? or squares or anything else, but not those umlauts. What is the problem, can anybody help, please? Thanks. ps. I've chosen utf-8, because I have to have Western European _and_ Cyrillic characters on the same page. utf-8 seems to be the only encoding to let me do that. pps. originally posted at php.lang, but it seems that no one lives there anymore :-/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can php run as a script?
Read this: http://www.php.net/features.commandline > PHP can run as a script indeed. > > #!/usr/bin/php > > Do that like you would perl and then make it executable. Should work. Yes, assuming that's the name and location of the CLI or CGI PHP (and one exists). Typing 'whereis php' or 'which php' in bash should help. Also, it might be called something else so try names like php4 too. > Note that any errors will be chucked back to the terminal in HTML. Sometimes this is true, depends on the html_errors directive which defaults to OFF in CLI. CLI is the wave of the future, CGI is so old school :) Regards, Philip > > > > On 4/2/2003, "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> wrote: > > >Hi, > > > >This might be a newbie question but I can't find an answer anywhere I > >search. I know php can be excuted by a web browser, but can it run as a > >script like Perl? > > > >The reason i ask is, I need to write a php script that updates a database > in > >a server. And this script needs to be running in the background as a > >service, that's why i was wondering if I can excute it like a perl script. > > > >If it can't, do you guys know if I can use perl to call up a php script? > > > >Please advise. > > > >Thanks, > >Kelvin > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > Edd Barrett > (http://www.filibusta.net) > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] magic quotes
On Thu, 3 Apr 2003, Justin French wrote: > Hi all, > > Can I just have a quick head check on magic quotes runtime (&gpc)? > > I have them both set to Off currently, and my pages work fine. However, > when I set them to on, I end up with slashes throughout the mysql data. This means you essentially ran addslashes() twice before insertion. Don't do that. You should never ever have to strip slashes from data already in the database. > Is this the expected behaviour? Seems counter-intuitive to me, but I've > never really cared about it 'till today, because i've never had a problem!! No, only add slashes once. Do this with a function like addslashes() OR do it magically. Once. > What is a common setting for these two directives, so that I can have my LAN > server *reasonably* "normal". Defaults to on so I guess that's "normal". See also get_magic_quotes_gpc()... Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can php run as a script?
PHP can run as a script indeed. #!/usr/bin/php Do that like you would perl and then make it executable. Should work. Note that any errors will be chucked back to the terminal in HTML. On 4/2/2003, "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> wrote: >Hi, > >This might be a newbie question but I can't find an answer anywhere I >search. I know php can be excuted by a web browser, but can it run as a >script like Perl? > >The reason i ask is, I need to write a php script that updates a database in >a server. And this script needs to be running in the background as a >service, that's why i was wondering if I can excute it like a perl script. > >If it can't, do you guys know if I can use perl to call up a php script? > >Please advise. > >Thanks, >Kelvin > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > > Edd Barrett (http://www.filibusta.net) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] magic quotes
Hi all, Can I just have a quick head check on magic quotes runtime (&gpc)? I have them both set to Off currently, and my pages work fine. However, when I set them to on, I end up with slashes throughout the mysql data. Is this the expected behaviour? Seems counter-intuitive to me, but I've never really cared about it 'till today, because i've never had a problem!! What is a common setting for these two directives, so that I can have my LAN server *reasonably* "normal". TIA Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini not being used?
On Thu, 3 Apr 2003, Justin French wrote: > Hi, > > I can't believe I've never bothered to learn this stuff, so I apologise for > being totally dumb in advance :P > > phpinfo() tells me my php.ini is being read from /usr/local/lib, however, > there's definitely NOT a php.ini file there. That faq mentions that if only a directory is listed from phpinfo() then php.ini is NOT being read. For example, from phpinfo(): BAD - not being read /usr/local/lib/ GOOD - oh yeah, it's being read /usr/local/lib/php.ini > So, I went hunting and found this on > http://www.php.net/manual/en/faq.installation.php > > " > 12. How do I know if my php.ini is being found and read? It seems like it > isn't as my changes aren't being implemented. > > To be sure your php.ini is being read by PHP, make a call to phpinfo() and > near the top will be a listing called Configuration File (php.ini). This > will tell you where PHP is looking for php.ini and whether or not it's being > read. If just a directory PATH exists than it's not being read and you > should put your php.ini in that directory. If php.ini is included within the > PATH than it is being read. > > If php.ini is being read and you're running PHP as a module then be sure to > restart PHP after making changes to php.ini > " > My questions are: > > 1. if there's no php.ini in /usr/local/lib, is php using a default set of > settings, or another file (if so, where?)? Yes, the defaults. > > 2. how do I tell php to look somewhere else, or is the solution to > create/copy a php.ini into /usr/local/lib and restart apache? There are a few options. The easiest is to just put a php.ini in the directory it lists. Or, you could set the PHPRC environment variable, or you could use the --with-config-file-path option during compile. Search around for more information on these options. Regards, Philip p.s. I wrote that faq but apparently not good enough :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chill out
Hi, I'd have to agree with the original poster on this topic - I've been on this list for about 3 years now, at times it is helpful - and then there's every other day. Granted, there are guru's out there that know all there is to know about PHP, and then there's the new kid that has no idea what it is, but either wants to learn or has to learn. And it is quite possible that not everyone is as adept at finding information online - if you're new to server-side programming languages in general - how or why would you know of the great many repositories of information available online? Sarcasm is one thing, gawd knows I use it on a by the minute basis ... but when a newbie posts a question that may seem simple to some - yet utterly impossible to others, is it constructive to tell them to go back and RTFM in a violent manner? Suggesting that they review the manual again may help, or better yet - if you think it's not worth your time, that's what the trash can button is for. In general, I've had great luck with this list - it just seems the majority of puter ppl don't have super ppl skills ;) Now back to work -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chill out
My two cents, I`ve been on the list a month now and I think it`s really cool that this type of thing exists. I`m new to PHP, read all the posts that come through, and 98% of the time don`t have a clue what is being spoken about, so the flaming and other comments provide a welcome relief from my daily stress of working this PHP thing out. I learned the ins and outs of the list by reading all the posts, so I guess this has helped me do my homework before simply requesting someone give me an answer to a problem I could have solved simply by RTFM. Anyone who can`t handle sarcasm.well.that`s another thing On Thu, 2003-04-03 at 07:20, Jason Wong wrote: > On Thursday 03 April 2003 11:14, [EMAIL PROTECTED] wrote: > > > We subscribe to a few email lists on various languages. > > > > This list would have to be the worst for anyone learning > > - the amount of sarcasm and flaming that goes on is huge. > > Try subscribing to the qmail list for a day or two. > > > Just try and remember - everyone has to learn, > > Exactly ... > > > if you feel a question is off topic > > ... that is why people need to learn that this list is for the discussion of > PHP and not HTML/Javascript/Whathaveyou. > > > or stupid > > Off-topic is pretty easy to define. 'Stupid' posts are more subjective, but > ... > > - ignore it, > > ... the OP usually feels the urge to repost and repost. In any case this list > is tolerant enough that people usually get the answer that they're looking > for. > > > theres no need to make the poster feel like an idiot. > > If you feel like an idiot when someone points out something wrong with your > post then you have pretty low self-esteem. > > > We all know your smarter than the rest of us ;-) > > I hope you don't think I'm making you stupid, but I think you mean "you're". > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > Tact in audacity is knowing how far you can go without going too far. > -- Jean Cocteau > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Chris Blake Office : (011) 782-0840 Cell : 083 985 0379 Linux vs. Windows is a no-WIN situation. eggs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] QUESTION - user management
Keeping track of the last time each username / IP address has viewed a page, and assuming that any user who was seen less than 5 minutes (or so) ago is online. [EMAIL PROTECTED] wrote: How do applications know how many users are logged into the system? For example postnuke will tell you '3 users online, 2 members'. Im gussing it uses sessions, but how? Edd Barrett (http://www.filibusta.net) -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Deleting Objects
yes, that's what I meant :) sorry if I was unclear... if any references to a given variable still exist then the variable is not destroied in memory. -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Thursday, April 03, 2003 12:55 AM To: John Coggeshall Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Deleting Objects Not exactly true. unset() destroys the reference to the value, not the value itself. For instance, error_reporting(E_ALL); $var1 = "foo"; $var2 = &$var1; print "$var1\n$var2\n\n"; unset($var1); print "$var1\n$var2"; will output: foo foo Notice: Undefined variable: var1 in PHPDocument1 on line 7 foo In other words, unsetting $var1 will NOT destroy $var2. John Coggeshall wrote: If you want to force a variable to be destroied, just unset() it. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
Re: [PHP] Deleting Objects
Not exactly true. unset() destroys the reference to the value, not the value itself. For instance, error_reporting(E_ALL); $var1 = "foo"; $var2 = &$var1; print "$var1\n$var2\n\n"; unset($var1); print "$var1\n$var2"; will output: foo foo Notice: Undefined variable: var1 in PHPDocument1 on line 7 foo In other words, unsetting $var1 will NOT destroy $var2. John Coggeshall wrote: If you want to force a variable to be destroied, just unset() it. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.
RE: [PHP] QUESTION - user management
>> How do applications know how many users are logged into the system? >For >> example postnuke will tell you '3 users online, 2 members'. >Im gussing >it >> uses sessions, but how? Basically it keeps track of the active sessions for the total user #, and then determines how many of those sessions are 'logged in' John -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >-Original Message- >From: Matt Giddings [mailto:[EMAIL PROTECTED] >Sent: Thursday, April 03, 2003 12:31 AM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: RE: [PHP] QUESTION - user management > > >Someone recently posted code for this exact topic on >phpclasses.org, follow the link below. > >http://phpclasses.mirrors.nyphp.org/browse.html/package/1018.html > >Matt > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: Wednesday, April 02, 2003 5:58 AM >> To: [EMAIL PROTECTED] >> Subject: [PHP] QUESTION - user management >> >> >> How do applications know how many users are logged into the system? >For >> example postnuke will tell you '3 users online, 2 members'. >Im gussing >it >> uses sessions, but how? >> >> >> >> Edd Barrett >> (http://www.filibusta.net) >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >> >> --- >> Incoming mail is certified Virus Free. >> Checked by AVG anti-virus system (http://www.grisoft.com). >> Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 >> > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Deleting Objects
>How does one delete an object? For example: > > $object = new Class(...); > . > $object = new Class(...); PHP deletes any variable which is no longer referenced in memory.. So in this case the first object that the variable $object pointed to will automatically be destroied. If you want to force a variable to be destroied, just unset() it. So No it's not possible to "orphan" any object or variable in PHP. John -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Thursday, April 03, 2003 12:07 AM >To: [EMAIL PROTECTED] >Subject: [PHP] Deleting Objects > > >How does one delete an object? For example: > > $object = new Class(...); > . > $object = new Class(...); > >I want to throw away the old object and create a new, freshly >initialized one using the same variable. Is the above >adequate or will >this orphan the first object? If so is an unset($object) prior to the >second "new" the appropriate approach? > >Thanks, > > -- > Tom Rawson > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Deleting Objects
That will work perfectly. [EMAIL PROTECTED] wrote: How does one delete an object? For example: $object = new Class(...); . $object = new Class(...); I want to throw away the old object and create a new, freshly initialized one using the same variable. Is the above adequate or will this orphan the first object? If so is an unset($object) prior to the second "new" the appropriate approach? Thanks, -- Tom Rawson -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] QUESTION - user management
Someone recently posted code for this exact topic on phpclasses.org, follow the link below. http://phpclasses.mirrors.nyphp.org/browse.html/package/1018.html Matt > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 5:58 AM > To: [EMAIL PROTECTED] > Subject: [PHP] QUESTION - user management > > > How do applications know how many users are logged into the system? For > example postnuke will tell you '3 users online, 2 members'. Im gussing it > uses sessions, but how? > > > > Edd Barrett > (http://www.filibusta.net) > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Email Attachment problem
On Wednesday 02 April 2003 04:19, Michael Arena wrote: > the only difference in the server setup is on my remote server it's a RAQ > and locally i'm using Xitami with PHP. I don't understand why it won't > send. I get the email over the RAQ but no attachment... Have you checked that the file actually gets uploaded? > are there any other > settings that could differ that I would need to set? Like in the php.ini > file? Have you enabled file_uploads in php.ini? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Our ISP is having {switching,routing,SMDS,frame relay} problems */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chill out
On Thursday 03 April 2003 11:14, [EMAIL PROTECTED] wrote: > We subscribe to a few email lists on various languages. > > This list would have to be the worst for anyone learning > - the amount of sarcasm and flaming that goes on is huge. Try subscribing to the qmail list for a day or two. > Just try and remember - everyone has to learn, Exactly ... > if you feel a question is off topic ... that is why people need to learn that this list is for the discussion of PHP and not HTML/Javascript/Whathaveyou. > or stupid Off-topic is pretty easy to define. 'Stupid' posts are more subjective, but ... - ignore it, ... the OP usually feels the urge to repost and repost. In any case this list is tolerant enough that people usually get the answer that they're looking for. > theres no need to make the poster feel like an idiot. If you feel like an idiot when someone points out something wrong with your post then you have pretty low self-esteem. > We all know your smarter than the rest of us ;-) I hope you don't think I'm making you stupid, but I think you mean "you're". -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Tact in audacity is knowing how far you can go without going too far. -- Jean Cocteau */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] chill out
Actually this list has maintained a high level of professionalism compared to many other lists I'm a member of, join a VB or any other support list for a MS product and you'll see what I mean. Only within the last few days have I seen the list (or members of the list) fail to uphold its status. I've been a member of this list for about two years now, and I have seen a few questionable posts, but over all it has been one of the best lists I had the honor of belonging to. Matt > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 10:15 PM > To: [EMAIL PROTECTED] > Subject: [PHP] chill out > > We subscribe to a few email lists on various languages. > > This list would have to be the worst for anyone learning > - the amount of sarcasm and flaming that goes on is huge. > > Just try and remember - everyone has to learn, > if you feel a question is off topic or stupid - ignore it, > theres no need to make the poster feel like an idiot. > > We all know your smarter than the rest of us ;-) > > Steve > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Deleting Objects
How does one delete an object? For example: $object = new Class(...); . $object = new Class(...); I want to throw away the old object and create a new, freshly initialized one using the same variable. Is the above adequate or will this orphan the first object? If so is an unset($object) prior to the second "new" the appropriate approach? Thanks, -- Tom Rawson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chill out
This one time, at band camp, <[EMAIL PROTECTED]> wrote: > We subscribe to a few email lists on various languages. > > This list would have to be the worst for anyone learning > - the amount of sarcasm and flaming that goes on is huge. fu2 -- __ (_ \ _) ) | / / _ ) / _ | / ___) / _ ) | | ( (/ / ( ( | |( (___ ( (/ / |_| \) \_||_| \) \) Kevin Waterson Port Macquarie, Australia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini not being used?
Ok, that's what I figured! Thanks! Justin on 03/04/03 2:43 PM, Leif K-Brooks ([EMAIL PROTECTED]) wrote: > It's using default settings. You'll have to recompile PHP to change > where it looks for php.ini, or you can move your php.ini file into that > location. > > Justin French wrote: > >> Hi, >> >> I can't believe I've never bothered to learn this stuff, so I apologise for >> being totally dumb in advance :P >> >> phpinfo() tells me my php.ini is being read from /usr/local/lib, however, >> there's definitely NOT a php.ini file there. >> >> So, I went hunting and found this on >> http://www.php.net/manual/en/faq.installation.php >> >> " >> 12. How do I know if my php.ini is being found and read? It seems like it >> isn't as my changes aren't being implemented. >> >> To be sure your php.ini is being read by PHP, make a call to phpinfo() and >> near the top will be a listing called Configuration File (php.ini). This >> will tell you where PHP is looking for php.ini and whether or not it's being >> read. If just a directory PATH exists than it's not being read and you >> should put your php.ini in that directory. If php.ini is included within the >> PATH than it is being read. >> >> If php.ini is being read and you're running PHP as a module then be sure to >> restart PHP after making changes to php.ini >> " >> >> >> My questions are: >> >> 1. if there's no php.ini in /usr/local/lib, is php using a default set of >> settings, or another file (if so, where?)? >> >> 2. how do I tell php to look somewhere else, or is the solution to >> create/copy a php.ini into /usr/local/lib and restart apache? >> >> >> TIA >> >> Justin >> >> >> >> >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini not being used?
It's using default settings. You'll have to recompile PHP to change where it looks for php.ini, or you can move your php.ini file into that location. Justin French wrote: Hi, I can't believe I've never bothered to learn this stuff, so I apologise for being totally dumb in advance :P phpinfo() tells me my php.ini is being read from /usr/local/lib, however, there's definitely NOT a php.ini file there. So, I went hunting and found this on http://www.php.net/manual/en/faq.installation.php " 12. How do I know if my php.ini is being found and read? It seems like it isn't as my changes aren't being implemented. To be sure your php.ini is being read by PHP, make a call to phpinfo() and near the top will be a listing called Configuration File (php.ini). This will tell you where PHP is looking for php.ini and whether or not it's being read. If just a directory PATH exists than it's not being read and you should put your php.ini in that directory. If php.ini is included within the PATH than it is being read. If php.ini is being read and you're running PHP as a module then be sure to restart PHP after making changes to php.ini " My questions are: 1. if there's no php.ini in /usr/local/lib, is php using a default set of settings, or another file (if so, where?)? 2. how do I tell php to look somewhere else, or is the solution to create/copy a php.ini into /usr/local/lib and restart apache? TIA Justin -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chill out
It's not people who don't know everything I have a problem. It's people who ask questions when the answer is right in front of their nose. [EMAIL PROTECTED] wrote: We subscribe to a few email lists on various languages. This list would have to be the worst for anyone learning - the amount of sarcasm and flaming that goes on is huge. Just try and remember - everyone has to learn, if you feel a question is off topic or stupid - ignore it, theres no need to make the poster feel like an idiot. We all know your smarter than the rest of us ;-) Steve -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php.ini not being used?
at the bash prompt type "where is php.ini" and it will tell you exactly where it's at. cheers, - Sebastian - Original Message - From: "Justin French" <[EMAIL PROTECTED]> | Hi, | | I can't believe I've never bothered to learn this stuff, so I apologise for | being totally dumb in advance :P | | phpinfo() tells me my php.ini is being read from /usr/local/lib, however, | there's definitely NOT a php.ini file there. | | So, I went hunting and found this on | http://www.php.net/manual/en/faq.installation.php | | " | 12. How do I know if my php.ini is being found and read? It seems like it | isn't as my changes aren't being implemented. | | To be sure your php.ini is being read by PHP, make a call to phpinfo() and | near the top will be a listing called Configuration File (php.ini). This | will tell you where PHP is looking for php.ini and whether or not it's being | read. If just a directory PATH exists than it's not being read and you | should put your php.ini in that directory. If php.ini is included within the | PATH than it is being read. | | If php.ini is being read and you're running PHP as a module then be sure to | restart PHP after making changes to php.ini | " | | | My questions are: | | 1. if there's no php.ini in /usr/local/lib, is php using a default set of | settings, or another file (if so, where?)? | | 2. how do I tell php to look somewhere else, or is the solution to | create/copy a php.ini into /usr/local/lib and restart apache? | | | TIA | | Justin | | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, visit: http://www.php.net/unsub.php | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] chill out
for a list that is not moderated i think it's doing quite well. this isn't a service so you get what you pay for ;) cheers, - Sebastian - Original Message - From: <[EMAIL PROTECTED]> | We subscribe to a few email lists on various languages. | | This list would have to be the worst for anyone learning | - the amount of sarcasm and flaming that goes on is huge. | | Just try and remember - everyone has to learn, | if you feel a question is off topic or stupid - ignore it, | theres no need to make the poster feel like an idiot. | | We all know your smarter than the rest of us ;-) | | Steve | | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, visit: http://www.php.net/unsub.php | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php.ini not being used?
Hi, I can't believe I've never bothered to learn this stuff, so I apologise for being totally dumb in advance :P phpinfo() tells me my php.ini is being read from /usr/local/lib, however, there's definitely NOT a php.ini file there. So, I went hunting and found this on http://www.php.net/manual/en/faq.installation.php " 12. How do I know if my php.ini is being found and read? It seems like it isn't as my changes aren't being implemented. To be sure your php.ini is being read by PHP, make a call to phpinfo() and near the top will be a listing called Configuration File (php.ini). This will tell you where PHP is looking for php.ini and whether or not it's being read. If just a directory PATH exists than it's not being read and you should put your php.ini in that directory. If php.ini is included within the PATH than it is being read. If php.ini is being read and you're running PHP as a module then be sure to restart PHP after making changes to php.ini " My questions are: 1. if there's no php.ini in /usr/local/lib, is php using a default set of settings, or another file (if so, where?)? 2. how do I tell php to look somewhere else, or is the solution to create/copy a php.ini into /usr/local/lib and restart apache? TIA Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] chill out
We subscribe to a few email lists on various languages. This list would have to be the worst for anyone learning - the amount of sarcasm and flaming that goes on is huge. Just try and remember - everyone has to learn, if you feel a question is off topic or stupid - ignore it, theres no need to make the poster feel like an idiot. We all know your smarter than the rest of us ;-) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit Image Button
AwesomeThank you so much. Cheers. Thomas "John Coggeshall" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Well you can ignore it if you don't need the X/Y cord... But you can use > it to make sure the button was clicked: > > If(!$_GET['sub_x'] || !_GET['sub_y']) { > // display form > } else { > // it was submitted > > -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- > John Coggeshall > john at coggeshall dot org http://www.coggeshall.org/ > -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- > > > >-Original Message- > >From: Thomas [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, April 02, 2003 9:39 PM > >To: [EMAIL PROTECTED] > >Subject: Re: [PHP] Submit Image Button > > > > > >ok, sorry I'm a newb...what do I do with that info? I saw > >that page, but it makes no sense to me > > > >Thomas > > > > > >"John Coggeshall" <[EMAIL PROTECTED]> wrote in message > >news:[EMAIL PROTECTED] > >> > >> http://www.php.net/manual/en/language.variables.external.php > >> > >> > >> > >> This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing > >> the X/Y cordinate where the button was clicked (assuming it was GET > >> method form submission) > >> > >> John > >> > >> > >-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- > >> John Coggeshall > >> john at coggeshall dot org > >http://www.coggeshall.org/ > >> > >-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- > >> > >> > >> >-Original Message- > >> >From: Thomas [mailto:[EMAIL PROTECTED] > >> >Sent: Wednesday, April 02, 2003 9:27 PM > >> >To: [EMAIL PROTECTED] > >> >Subject: [PHP] Submit Image Button > >> > > >> > > >> >I have a problem with my php. > >> > > >> >I have a form and in that form there is an image submit > >button. When > >> >I click on it, it won't tell me if the submit button is clicked. It > >> >works fine with a normal one. > >> > > >> >sample: > >> > > >> > >> > if (!$submit) { > >> >?> > >> > > >> > > >> > > >> > >> >src="../News/themes/xFClan/button_submit.gif" > >> >border="0" name="submit" value="Login" width="55" height="19" > >> >alt="Submit"> > >> > > >> > > >> > >> >} else { > >> >echo "you clicked"; > >> >} > >> >?> > >> > > >> >If I use This works finedo > >I need to > >> >do something else with the code? Help is very appreciated. > >> > > >> >Cheers. > >> > > >> > > >> > > >> > > >> >-- > >> >PHP General Mailing List (http://www.php.net/) > >> >To unsubscribe, visit: http://www.php.net/unsub.php > >> > > >> > > >> > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit Image Button
Well you can ignore it if you don't need the X/Y cord... But you can use it to make sure the button was clicked: If(!$_GET['sub_x'] || !_GET['sub_y']) { // display form } else { // it was submitted -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >-Original Message- >From: Thomas [mailto:[EMAIL PROTECTED] >Sent: Wednesday, April 02, 2003 9:39 PM >To: [EMAIL PROTECTED] >Subject: Re: [PHP] Submit Image Button > > >ok, sorry I'm a newb...what do I do with that info? I saw >that page, but it makes no sense to me > >Thomas > > >"John Coggeshall" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> >> http://www.php.net/manual/en/language.variables.external.php >> >> >> >> This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing >> the X/Y cordinate where the button was clicked (assuming it was GET >> method form submission) >> >> John >> >> >-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >> John Coggeshall >> john at coggeshall dot org >http://www.coggeshall.org/ >> >-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >> >> >> >-Original Message- >> >From: Thomas [mailto:[EMAIL PROTECTED] >> >Sent: Wednesday, April 02, 2003 9:27 PM >> >To: [EMAIL PROTECTED] >> >Subject: [PHP] Submit Image Button >> > >> > >> >I have a problem with my php. >> > >> >I have a form and in that form there is an image submit >button. When >> >I click on it, it won't tell me if the submit button is clicked. It >> >works fine with a normal one. >> > >> >sample: >> > >> >> > if (!$submit) { >> >?> >> > >> > >> > >> >> >src="../News/themes/xFClan/button_submit.gif" >> >border="0" name="submit" value="Login" width="55" height="19" >> >alt="Submit"> >> > >> > >> >> >} else { >> >echo "you clicked"; >> >} >> >?> >> > >> >If I use This works finedo >I need to >> >do something else with the code? Help is very appreciated. >> > >> >Cheers. >> > >> > >> > >> > >> >-- >> >PHP General Mailing List (http://www.php.net/) >> >To unsubscribe, visit: http://www.php.net/unsub.php >> > >> > >> > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit Image Button
ok, sorry I'm a newb...what do I do with that info? I saw that page, but it makes no sense to me Thomas "John Coggeshall" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > http://www.php.net/manual/en/language.variables.external.php > > > > This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing the > X/Y cordinate where the button was clicked (assuming it was GET method > form submission) > > John > > -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- > John Coggeshall > john at coggeshall dot org http://www.coggeshall.org/ > -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- > > > >-Original Message- > >From: Thomas [mailto:[EMAIL PROTECTED] > >Sent: Wednesday, April 02, 2003 9:27 PM > >To: [EMAIL PROTECTED] > >Subject: [PHP] Submit Image Button > > > > > >I have a problem with my php. > > > >I have a form and in that form there is an image submit > >button. When I click on it, it won't tell me if the submit > >button is clicked. It works fine with a normal one. > > > >sample: > > > > > if (!$submit) { > >?> > > > > > > > > >src="../News/themes/xFClan/button_submit.gif" > >border="0" name="submit" value="Login" width="55" height="19" > >alt="Submit"> > > > > > > >} else { > >echo "you clicked"; > >} > >?> > > > >If I use This works finedo I > >need to do something else with the code? Help is very appreciated. > > > >Cheers. > > > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit Image Button
http://www.php.net/manual/en/language.variables.external.php This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing the X/Y cordinate where the button was clicked (assuming it was GET method form submission) John -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshall john at coggeshall dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >-Original Message- >From: Thomas [mailto:[EMAIL PROTECTED] >Sent: Wednesday, April 02, 2003 9:27 PM >To: [EMAIL PROTECTED] >Subject: [PHP] Submit Image Button > > >I have a problem with my php. > >I have a form and in that form there is an image submit >button. When I click on it, it won't tell me if the submit >button is clicked. It works fine with a normal one. > >sample: > > if (!$submit) { >?> > > > >src="../News/themes/xFClan/button_submit.gif" >border="0" name="submit" value="Login" width="55" height="19" >alt="Submit"> > > >} else { >echo "you clicked"; >} >?> > >If I use This works finedo I >need to do something else with the code? Help is very appreciated. > >Cheers. > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Submit Image Button
I have a problem with my php. I have a form and in that form there is an image submit button. When I click on it, it won't tell me if the submit button is clicked. It works fine with a normal one. sample: If I use This works finedo I need to do something else with the code? Help is very appreciated. Cheers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] asynchronous processing?
I want to POST data to a server and get back an immediate response. Independently, I want the action to cause the server to submit its own POST request to another server. I do not want the original POST to block while waiting for the second POST to complete. I recently read an article [1] that said that register_shutdown_function was not capable of doing this (it causes the original request to block) and that a new function called apache_register_shutdown_function would allow this. Unfortunately, I don't see my host upgrading to 4.3.1 anytime soon (assuming that the function is even in that version). So are there any alternative methods? --- Seairth Jacobs [EMAIL PROTECTED] [1] http://www.php.net/manual/en/function.register-shutdown-function.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Making it so the .php isn't needed
yeah pretty cool, there are no limits on what you can do. cheers, - Sebastian - Original Message - From: "daniel" <[EMAIL PROTECTED]> | this is funny , you could have any extension u like say , i'm a synth freak , | i luv the word "303" so on some of my musik pages i have pages called | something.303 | | so | | AddType application/x-httpd-php .303 :D | >= Original Message From "Sebastian" <[EMAIL PROTECTED]> = | >Hello, | > | >read this: | >http://php.benscom.com/manual/en/security.hiding.php | > | >:) | > | >cheers, | >- Sebastian | > | >- Original Message - | >From: "Teren Sapp" <[EMAIL PROTECTED]> | > | > | >Hi, I had it setup on my server before i reloaded it, but what i need to | >have happen is so that when i'm passing variables to a php file, I don't | >have to include the .php in the link...so i can have | > | >http://www.my-domain.com/page1?var1=3&var2=4 | >instead of | >http://www.my-domain.com/page1.php?var1=3&var2=4 | > | >Anybody know how i can make this work? THanks | > | >Teren | > | > | > | > | >-- | >PHP General Mailing List (http://www.php.net/) | >To unsubscribe, visit: http://www.php.net/unsub.php | | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php 3 to 4.3
REGISTER_GLOBALS, REGISTER_GLOBALS, REGISTER_GLOBALS Do you always upgrade your programs without reading anything about the changes in the new version If so, I have a new version of that I'd like you to load on your computers. Please contact me off-line... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Jennifer Fountain [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 8:18 PM To: [EMAIL PROTECTED] Subject: [PHP] php 3 to 4.3 Has anyone had issues with their php scripts not working after upgrading php from 3 to 4.3? I have simple page that inserts data into mysql db. The scripts worked fine until after the upgrade. Below is one of my php scripts. When I hit submit, nothing is added to the db :( Add Record value1: value2: Female Male thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 3 to 4.3
http://www.php.net/manual/en/language.variables.scope.php http://www.php.net/manual/en/language.variables.external.php Before PHP 4.2.0 the default value for register_globals was on. And, in PHP 3 it was always on. The PHP community is encouraging all to not rely on this directive as it's preferred to assume it's off and code accordingly. Jennifer Fountain wrote: Has anyone had issues with their php scripts not working after upgrading php from 3 to 4.3? I have simple page that inserts data into mysql db. The scripts worked fine until after the upgrade. Below is one of my php scripts. When I hit submit, nothing is added to the db :( Add Record // code that will be executed if the form has been submitted: if ($submit) { // connect to the database include 'pwinfo.php'; $db = MYSQL_CONNECT($host,$user,$password); mysql_select_db("DB", $db); $sql = "INSERT INTO DB (value1, value2) VALUES ('$value1', '$value2')"; $result = mysql_query($sql); print ("Thank you! Information entered.\n"); MYSQL_CLOSE($db); } else { // else show the form to submit new data: ?> value1: value2: Female Male } ?> thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php 3 to 4.3
Has anyone had issues with their php scripts not working after upgrading php from 3 to 4.3? I have simple page that inserts data into mysql db. The scripts worked fine until after the upgrade. Below is one of my php scripts. When I hit submit, nothing is added to the db :( Add Record // code that will be executed if the form has been submitted: if ($submit) { // connect to the database include 'pwinfo.php'; $db = MYSQL_CONNECT($host,$user,$password); mysql_select_db("DB", $db); $sql = "INSERT INTO DB (value1, value2) VALUES ('$value1', '$value2')"; $result = mysql_query($sql); print ("Thank you! Information entered.\n"); MYSQL_CLOSE($db); } else { // else show the form to submit new data:?> value1: value2: Female Male } ?> thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Making it so the .php isn't needed
this is funny , you could have any extension u like say , i'm a synth freak , i luv the word "303" so on some of my musik pages i have pages called something.303 so AddType application/x-httpd-php .303 :D >= Original Message From "Sebastian" <[EMAIL PROTECTED]> = >Hello, > >read this: >http://php.benscom.com/manual/en/security.hiding.php > >:) > >cheers, >- Sebastian > >- Original Message - >From: "Teren Sapp" <[EMAIL PROTECTED]> > > >Hi, I had it setup on my server before i reloaded it, but what i need to >have happen is so that when i'm passing variables to a php file, I don't >have to include the .php in the link...so i can have > >http://www.my-domain.com/page1?var1=3&var2=4 >instead of >http://www.my-domain.com/page1.php?var1=3&var2=4 > >Anybody know how i can make this work? THanks > >Teren > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] trying to write sql query as a function
You need to call it such as: $variable = query("field","table"); Where $variable is an arbitrary name and is what you'd later use in the mysql_fetch_*() functions... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: scott [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 7:06 PM > To: [EMAIL PROTECTED] > Subject: [PHP] trying to write sql query as a function > > hi > > I'm trying to write a simple MySQL query in a php function so that I can > just call it and pass arguments, but I'm missing something :o( > > there are 2 files, index.php and common.php, commom.php contains all the > functions, and is included at the beginning of index.php > > the first function called in index.php is db_connect, which calls the > function to create a connect to the MySQL database, this would seem to be > working correctly > > the second part (here's where I crap out) is the actual query. the > function > is written as follows > > function query($strField, $strTable) { > $sql = "select $strField from strTable"; > $result = mysql_query($sql); > return $result; > } > > I call it with query(my_field, my_table) for example, and I would hope it > would return $result back to the calling page for further us, but the rest > of index.php > >print ""; >while ($line = mysql_fetch_row($result)) >{ > foreach ($line as $value) >{ > print " } > print ">$value"; >} > mysql_close($my_conn); > print ""; > > simply renders an empty list box :o( if I take the code out of a function > and place it in index.php like this > > $sql = "select my_field from my_table"; > $result = mysql_query($sql); >print ""; >while ($line = mysql_fetch_row($result)) >{ > foreach ($line as $value) >{ > print " } > print ">$value"; >} > mysql_close($my_conn); > print ""; > > then it works fine ?? what am I missing here ? > > thanks > > _scott > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: printing a php file as a text file
Chris Sano wrote: How would I go outputting my PHP file as a text file -- for example, I have a set of scripts that I plan to release to the public and would like to make this script viewable through PHP without having to call a text file. I know I have seen this somewhere and I'm wondering if any of you guys know how to do this.. In case the above was confusing, I want to have a link that will allow the user to view the source code (and have it print out the code without executing it). Chris one way is: another is to call the file "filename.phps" instead of "filename.php" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Printing help
Jay Mitchell wrote: I need to know if there is a way to send output to a users local printer using a browser accessed database. Will php3 do this? IfSo how? Thanks in dvance Jay http://www.php.net/manual/en/ref.printer.php I believe that you can find something usefull there. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Phorum 3.4.2 Released - SECURITY NOTICE
Today, we released another bug fix for the Phorum 3.4 branch, version 3.4.2. Among other things, it fixes a Cross Site Scripting Vunerability. Here is the changelog: Phorum 3.4.2 Changelog More Postgres fixes. (tomaz) better date formatting for newer Postgres verions. (tomaz) Attempted to fix new flag issue. Could never duplicate, but found some buggy code. (blm) added script to clean up orphaned messages (blm) fixed disabling post-editing for users in non-threaded (ts) removed unneeded escape of ' in forum.php (blm) replaced striptags with a preg. Strip tags does not strip just tags (blm) Fixed some bad HTML in read.php (blm) Fixed horiz scroll in IE (blm) fixed tab order in form.php (blm) removed \r in secure script (blm) download.php works with non-apache and CGI now. (blm) escape ' in the quote word. (blm) fixed parse error in phorummail (blm) Fixed Forum List Url in moderator.php (blm) corrected upgrade30.php-script (ts) Strip tags and from author, subject and email (blm) That last item is what addresses the recent XSS exploit reported in the support forums. Ironicly, had I realized that was the case, we would have released something when I fixed that a while back. Brian Moon Phorum Dev Team -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] trying to write sql query as a function
hi I'm trying to write a simple MySQL query in a php function so that I can just call it and pass arguments, but I'm missing something :o( there are 2 files, index.php and common.php, commom.php contains all the functions, and is included at the beginning of index.php the first function called in index.php is db_connect, which calls the function to create a connect to the MySQL database, this would seem to be working correctly the second part (here's where I crap out) is the actual query. the function is written as follows function query($strField, $strTable) { $sql = "select $strField from strTable"; $result = mysql_query($sql); return $result; } I call it with query(my_field, my_table) for example, and I would hope it would return $result back to the calling page for further us, but the rest of index.php print ""; while ($line = mysql_fetch_row($result)) { foreach ($line as $value) { print "$value"; } mysql_close($my_conn); print ""; simply renders an empty list box :o( if I take the code out of a function and place it in index.php like this $sql = "select my_field from my_table"; $result = mysql_query($sql); print ""; while ($line = mysql_fetch_row($result)) { foreach ($line as $value) { print "$value"; } mysql_close($my_conn); print ""; then it works fine ?? what am I missing here ? thanks _scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Making it so the .php isn't needed
Hello, read this: http://php.benscom.com/manual/en/security.hiding.php :) cheers, - Sebastian - Original Message - From: "Teren Sapp" <[EMAIL PROTECTED]> Hi, I had it setup on my server before i reloaded it, but what i need to have happen is so that when i'm passing variables to a php file, I don't have to include the .php in the link...so i can have http://www.my-domain.com/page1?var1=3&var2=4 instead of http://www.my-domain.com/page1.php?var1=3&var2=4 Anybody know how i can make this work? THanks Teren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help in sorting
It looks sorted to me. You get message 12, 23, and then 25. How exactly do you want it to look? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: Haseeb Iqbal [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 9:17 PM > To: PHP General > Subject: [PHP] Help in sorting > > hi, > i want to sort messages in a sequence > the sequence is "23,12,25" (these are message nos) > now when i call like this > > $nMsgSeq="23,12,25"; > imap_fetch_overview($pIMAP,$nMsgSeq,0); > i get an array sorted like > > Array > ( > [0] => stdClass Object > ( > [uid] => 21 > [msgno] => 12 > [recent] => 0 > [flagged] => 0 > [answered] => 0 > [deleted] => 0 > [seen] => 1 > [draft] => 0 > ) > > [1] => stdClass Object > ( > [uid] => 34 > [msgno] => 23 > [recent] => 0 > [flagged] => 0 > [answered] => 0 > [deleted] => 1 > [seen] => 1 > [draft] => 0 > ) > > [2] => stdClass Object > ( > [uid] => 36 > [msgno] => 25 > [recent] => 0 > [flagged] => 0 > [answered] => 0 > [deleted] => 1 > [seen] => 1 > [draft] => 0 > ) > > ) > > i want the array just like the sequence what should i do? > > Friendship is always a sweet responsibility, never an opportunity. > HaSeEb IqBaL. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] One form - two db's?
> Is it feasible to have a php form update two different MySQL DB's at the > same time, with all info going to one DB, and just certain info going to > the second? Yes... make your connection, select the first database, do your insert, select the second database, and do your final insert. Isn't rocket science, eh? Use mysql_select_db() to change databases... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Making it so the .php isn't needed
at a guess would say have something to do with the line in ur server config ... eg in apache the httpd.conf file ... and where you tell it what to run thru the php engine Teren Sapp wrote: Hi, I had it setup on my server before i reloaded it, but what i need to have happen is so that when i'm passing variables to a php file, I don't have to include the .php in the link...so i can have http://www.my-domain.com/page1?var1=3&var2=4 instead of http://www.my-domain.com/page1.php?var1=3&var2=4 Anybody know how i can make this work? THanks Teren -- Peter Houchin Sun Rentals STR Manager Phone: 03 9869 6452 Fax: 03 9866 2511 Mobile:0438 789 220 [EMAIL PROTECTED] http://www.sunrentals.com.au/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Making it so the .php isn't needed
You can accomplish this by enabling multiviews in your httpd.conf > -Original Message- > From: Teren Sapp [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 3:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Making it so the .php isn't needed > > > Hi, I had it setup on my server before i reloaded it, but what i > need to have happen is so that when i'm passing variables to a > php file, I don't have to include the .php in the link...so i can have > > http://www.my-domain.com/page1?var1=3&var2=4 > instead of > http://www.my-domain.com/page1.php?var1=3&var2=4 > > Anybody know how i can make this work? THanks > > Teren > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nested select options from database.
--- Krista <[EMAIL PROTECTED]> wrote: > Hi everyone, > > Is it possible, using just PHP, to pull a select > menu from a DB, then when > the person makes a selection have it populate a > second drop down select > menu, and again for a third one? Would javascript > need to be involved here > to keep it all on the same page? > No but you could retrieve all of this information at once and use it in your javascript > I'm in pretty desperate need of some code that can > do this to select > categories for products to go into, and I'm not sure > how to make it work. > There are way too many categories to have top level, > second and third in the > same drop down anymore - we only want people to be > able to add the products > to the third level. > here are a several options http://www.jsexamples.com/example/?ex=290&mode=2 http://www.jsexamples.com/example/?ex=728&mode=2 http://www.jsexamples.com/example/?ex=536&mode=2 http://www.jsexamples.com/example/?ex=458&mode=2 olinux __ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Making it so the .php isn't needed
Hi, I had it setup on my server before i reloaded it, but what i need to have happen is so that when i'm passing variables to a php file, I don't have to include the .php in the link...so i can have http://www.my-domain.com/page1?var1=3&var2=4 instead of http://www.my-domain.com/page1.php?var1=3&var2=4 Anybody know how i can make this work? THanks Teren
[PHP] Nested select options from database.
Hi everyone, Is it possible, using just PHP, to pull a select menu from a DB, then when the person makes a selection have it populate a second drop down select menu, and again for a third one? Would javascript need to be involved here to keep it all on the same page? I'm in pretty desperate need of some code that can do this to select categories for products to go into, and I'm not sure how to make it work. There are way too many categories to have top level, second and third in the same drop down anymore - we only want people to be able to add the products to the third level. Krista -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] One form - two db's?
Is it feasible to have a php form update two different MySQL DB's at the same time, with all info going to one DB, and just certain info going to the second? Just dreaming of ways to make my life easier. Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: parse_str()
> "Jose" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > I might be wrong here, but with the code below I would expect $_GET to be > filled and the script to output the next line: > >$example_string = 'action=kick&item=me'; >parse_str($example_string); >var_dump($_GET); >?> > > // expected output: > // > // array(2) { ["action"]=> string(4) "kick" ["item"]=> string(2) "me" } > // > > Is my assumption wrong? What would be the workaround? Your assumption is way wrong. $_GET will only contain data that actually passed through a GET-method request. Decoding a URL-encoded string doesn't suddenly make it GET data. It will simply create entries in your global symbol table, or alternatively you can pass a second argument which is an array it will put the data into. As per the docs. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: parse_str()
I think you mean: $example_string = '?action=kick&item=me'; "Jose" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I might be wrong here, but with the code below I would expect $_GET to be filled and the script to output the next line: // expected output: // // array(2) { ["action"]=> string(4) "kick" ["item"]=> string(2) "me" } // Is my assumption wrong? What would be the workaround? Thanks, Jose -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So many functions!
Try $languages = array_keys($lang); This will create an array $languages = array("english","francais"); Matt - Original Message - From: Vincent M. <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 4:58 PM Subject: [PHP] So many functions! > Hello, > > There so many functions in php that I can't find the one I need. I have > a table like that: > > $lang["english"]["category"]= "Category" ; > $lang["english"]["backpage"]= "Go to the back page" ; > $lang["english"]["nextpage"]= "Go to the next page" ; > ... > $lang["francais"]["category"]= "Catégorie" ; > $lang["francais"]["backpage"]= "Aller à la page précédente" ; > $lang["francais"]["nextpage"]= "Aller à la page suivante" ; > ... > > And I need to extract "english" and "francais". > As it, when I will add another language such as "espanol", it will be > automatic... > Any idea ? > > Thanks, > Vincent. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So many functions!
Vincent M. wrote: Hello, There so many functions in php that I can't find the one I need. I have a table like that: $lang["english"]["category"]= "Category" ; $lang["english"]["backpage"]= "Go to the back page" ; $lang["english"]["nextpage"]= "Go to the next page" ; ... $lang["francais"]["category"]= "Catégorie" ; $lang["francais"]["backpage"]= "Aller à la page précédente" ; $lang["francais"]["nextpage"]= "Aller à la page suivante" ; ... And I need to extract "english" and "francais". As it, when I will add another language such as "espanol", it will be automatic... Any idea ? Try while(list($key, $val) = each($lang)) { echo $key." : ".$val; } -- Burhan Khalid phplist[at]meidomus[dot]com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Html forms to php scripts
Ford, Mike [LSS] wrote: -Original Message- From: VanZee, Timothy [mailto:[EMAIL PROTECTED] Sent: 02 April 2003 17:31 Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: Php file (input.php) looks like this: I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 registered_globals is off by default in your version of PHP (its in the release notes) so, try replacing your echo statement with echo $_POST['ttt']; and see if that helps. -- Burhan Khalid phplist[at]meidomus[dot]com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mailing forms and input into MySQL
> From: "Scott Miller" <[EMAIL PROTECTED]> > > I have a current php script that allows me to add/remove customer information > from a particular MySQL Database. What I would like to do, is when an > employee adds a customer, have some (if not all) of that information e-mailed > to a particular e-mail address. > > I've created scripts that e-mail info, and ones that just enter info into a > database, but have not attempted combining them. > > Anyone have any ideas, or is anyone doing this? If so, could you give me a > quick how-to or point me in the direction of some online documentation? > There's nothing tricky about it. Just do the database insert and then send the email. I suggest returning a simple success/failure from the database insert so that if it fails you can note that in the email (probably going to a site administrator). I build strings for $subject, $headers and $message (from the values that were used in the insert) like so: $message = "SUBMITTED:\n\n"; $message .= "First name: $first\n"; $message .= "Last name: $last\n\n"; $message .= "Address: $address1\n"; if ($address2 != "") { $message .= "Address: $address2\n"; } etc. Then send it and report failure or success to the user like so: if ([EMAIL PROTECTED]("$send_to_name<$sendto>", $subject, $message, $headers)) { // report failure to send confirming email } else { // thanks for submitting } HTH -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Menu from Directory
Ben Whitehead wrote: I am trying to sort an image menu system which is passed a directory name, and can count and name the files in a menu from simply seeing which files are in this directory. It would be ideal if it can just do this just by looking at the files in the directory, and their file names, but if that is not possible, could it us the information in a text file I have created and placed in this directory? Anyway help would be greatly received! (I'm new to PHP, so simple help would be even more appreciated!) :S I wrote some code that might be what you want. It was for a reference download system. Here is what it does : 1. Scans a directory for all sub-directories 2. Scans those subdirectoties for files 3. Creates a drop down box with the appropriate categories (sub dir name ), and file listing. You can see it in action at http://www.meidomus.com (top left, marked REFERENCE DOWNLOAD) Let me know if this is what you were after and I will post the code. Its just two functions. -- Burhan Khalid phplist[at]meidomus[dot]com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading entire directory, with or without compression...
Jason Wong wrote: On Wednesday 02 April 2003 22:08, Kenn Murrah wrote: yes, of course they can ... but i'm looking for a way to automate the process for them (a method which may not exist) .. i suppose i can give them the option to upload multiple files using multiple input fields, but I'd really like to find a way to select an entire folder instead ... Can't be done. You can investigate the use of client-side scripting. *can't* do it with PHP, but ... If this is a real priority, you can write some sort of ActiveX component that you can use to upload. However, you will have to ask the client for security permissions, since client apps do not have access to the remote file system (for good reason). Either that, or you can write a Java applet to do it. Bottom line, no way to do it with PHP, but if you really want it done, look to other languages. -- Burhan Khalid phplist[at]meidomus[dot]com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: question: installing PHP with mysql isn't working?
you can try just straight --with-mysql without the = and it may be in the default path... >>> Don<[EMAIL PROTECTED]> 04/02/03 03:18PM >>> Hi, Trying to install PHP with the ability to interact with MySQL. In my configuration, I've included the option: --with-mysql=shared,/usr There are no compile errors. Any idea why PHP is not recognizing any MySQL functions? Thanks, Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Ok, problem found, but that makes way for another...
ok, my last post stated that i've tried reconfigureing.making/makeinstalling php 4.3.1 a tons of times. well, today when i typed php -v it told me that version 4.2.2 was the one that was installed. so apparently my installing has not been taking the place of the old one. The original root is that the original compile of php (not done by me) was installed w/out mysql and i need mysql for what i'm working on. now that i know the problem here, any suggestions? I'm running apache for what i'm working on, tomcat for other things that this server does, and the latest version of mysql now how do i get rid of hte old php and make sure this new one goes into its place? P.S.- i'm not a total linux newb but i'm not, NOT a newb either. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] So many functions!
What I would do is first read a cookie that you set on the clients machine that follows the accept language guidelines.. so just the first two letters then if that is not set, then take the browsers languages $HTTP_ACCEPT_LANGUAGE and use them. So instead of english you would have 'en', espanol = 'es', german = 'de' $lang["en"]["category"] So you just take that one variable and it will know which array to use.. Cheers! Rick He who draws noble delights from the sentiments of poetry is a true poet, though he has never written a line in all his life. - George Sand > From: "Vincent M." <[EMAIL PROTECTED]> > Date: Wed, 02 Apr 2003 16:58:06 -0500 > To: [EMAIL PROTECTED] > Subject: [PHP] So many functions! > > Hello, > > There so many functions in php that I can't find the one I need. I have > a table like that: > > $lang["english"]["category"]= "Category" ; > $lang["english"]["backpage"]= "Go to the back page" ; > $lang["english"]["nextpage"]= "Go to the next page" ; > ... > $lang["francais"]["category"]= "Catégorie" ; > $lang["francais"]["backpage"]= "Aller à la page précédente" ; > $lang["francais"]["nextpage"]= "Aller à la page suivante" ; > ... > > And I need to extract "english" and "francais". > As it, when I will add another language such as "espanol", it will be > automatic... > Any idea ? > > Thanks, > Vincent. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] question: installing PHP with mysql isn't working?
Hi, Trying to install PHP with the ability to interact with MySQL. In my configuration, I've included the option: --with-mysql=shared,/usr There are no compile errors. Any idea why PHP is not recognizing any MySQL functions? Thanks, Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml parse error?
I'm trying to parse a simple xml file, but I keep getting a strange error at $node->name which returns #text. Is this normal or am I doing something wrong? >From what I understand, the $node->name should return "branch" but it returns #text. TIA Jon --- PHP Code - root(); $node = array_shift($root->children()); print $node->name; ?> --- xml_navigation.xml File - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] So many functions!
Hello, There so many functions in php that I can't find the one I need. I have a table like that: $lang["english"]["category"]= "Category" ; $lang["english"]["backpage"]= "Go to the back page" ; $lang["english"]["nextpage"]= "Go to the next page" ; ... $lang["francais"]["category"]= "Catégorie" ; $lang["francais"]["backpage"]= "Aller à la page précédente" ; $lang["francais"]["nextpage"]= "Aller à la page suivante" ; ... And I need to extract "english" and "francais". As it, when I will add another language such as "espanol", it will be automatic... Any idea ? Thanks, Vincent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mailing forms and input into MySQL
There is no trick to it. Query the database, build a string, send it off. $value) { $body .= "$column : $value\n"; } $body .= "\n"; } mail($to, $subject, $body, $headers); ?> HTH, Kevin - Original Message - From: "Scott Miller" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 12:05 PM Subject: [PHP] mailing forms and input into MySQL Hi all, I have a current php script that allows me to add/remove customer information from a particular MySQL Database. What I would like to do, is when an employee adds a customer, have some (if not all) of that information e-mailed to a particular e-mail address. I've created scripts that e-mail info, and ones that just enter info into a database, but have not attempted combining them. Anyone have any ideas, or is anyone doing this? If so, could you give me a quick how-to or point me in the direction of some online documentation? Thanks, Scott Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php.ini doesn't exit
If it doesn't exist, it will use default settings. To see where it's looking for php.ini, use phpinfo(). Javier Carreras wrote: Hi all, Where does PHP get its settings if php.ini file doesn't exist? BTW- I want to enable sockets that are not enabled. Could I do that without creating a php.ini file? Regards, Javi. -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mailing forms and input into MySQL
Hi all, I have a current php script that allows me to add/remove customer information from a particular MySQL Database. What I would like to do, is when an employee adds a customer, have some (if not all) of that information e-mailed to a particular e-mail address. I've created scripts that e-mail info, and ones that just enter info into a database, but have not attempted combining them. Anyone have any ideas, or is anyone doing this? If so, could you give me a quick how-to or point me in the direction of some online documentation? Thanks, Scott Miller
Re: [PHP] Theme selector?
At 4/1/2003 08:49 PM, [EMAIL PROTECTED] wrote: > Also, I've not convinced anyone where I'm at now to use smarty. In my > mind they are penny-wise and pound foolish. The real little extra > time you might need to use a template system is richly rewarded in > code re-use and future changes to the site not to mention, imho, > thinking better about what one is doing. You haven't convinced me either. Changing the included CSS file, if you're using CSS-P for your layouts, lets you re-use *all* of your PHP code. Including extra files for templates in sub-directories sounds like a terrible waste of server space to me. Plus, once you've created the CSS files, the rendering overhead is shifted to the client, saving your server the extra processing for a template. And as for better thinking, CSS-P lets me debug a lot faster because the individual sections are truly modular in both the PHP code and the finished output. I was hoping for some convincing reasoning for using Smarty templates over CSS, but "code re-use and future changes" aren't doing it for me since I get both of those in spades with CSS-P. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with PHP and MySQl after install
1) Installed MySQL 4.0.12 2) Installed PHP 4.3.1 One of my config options was --with-mysql=shared,/usr 3) added the following to /etc/ld.so.conf and ran ldconfig: /usr/lib/libmysqlclient.so /usr/lib/mysql 4) When I try to run phpmyadmin, I get the following error: cannot load MySQL extension, please check PHP Configuration. 5) Looking at the explanation of the errro still leaves me baffled on how to proceed: [1.20] I receive the error "cannot load MySQL extension, please check PHP Configuration". To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". This extension may be part of the PHP server (compiled-in), otherwise it needs to be loaded dynamically. Its name is probably mysql.so or mysql.dll. phpMyAdmin tried to load the extension but failed. What was I missing fom my install that is causing my problem? Thanks, Don --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can php run as a script?
I used to use wget and run cleanup scripts from cron in the usual way. Some people also used to use lynx to do it, I believe. But the best way would be to install latest version of PHP, IMHO. - Original Message - From: "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> To: "'Tim Burden'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 12:35 PM Subject: RE: Can php run as a script? > Thanks! > > but the thing is I have php 4.2.2 version installed in that server. And > since it is not 4.3.0 therefore CLI isn't on by default. How can I check if > CLI is on or not? If it is not on, I won't be able to excute the php as a > script in another other way? > > THnaks@ > > -Original Message- > From: Tim Burden [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 12:02 PM > To: Kelvin Poon > Cc: [EMAIL PROTECTED] > Subject: Re: Can php run as a script? > > > Look for PHP CLI in google. > > Recent versions of PHP install at CLI PHP executable by default. > e.g I ended up with one in: > > /usr/local/apache/bin/php > > [EMAIL PROTECTED] root]# /usr/local/apache/bin/php -v > PHP 4.3.1 (cli) (built: Feb 20 2003 14:09:35) > Copyright (c) 1997-2002 The PHP Group > Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies > > > - Original Message - > From: "Kelvin Poon" <[EMAIL PROTECTED]> > Newsgroups: php.general > To: <[EMAIL PROTECTED]> > Sent: Wednesday, April 02, 2003 11:43 AM > Subject: Can php run as a script? > > > > Hi, > > > > This might be a newbie question but I can't find an answer anywhere I > > search. I know php can be excuted by a web browser, but can it run as a > > script like Perl? > > > > The reason i ask is, I need to write a php script that updates a database > in > > a server. And this script needs to be running in the background as a > > service, that's why i was wondering if I can excute it like a perl script. > > > > If it can't, do you guys know if I can use perl to call up a php script? > > > > Please advise. > > > > Thanks, > > Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can php run as a script?
find / -name php -print - Original Message - From: "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> To: "'Tim Burden'" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 12:35 PM Subject: RE: Can php run as a script? > Thanks! > > but the thing is I have php 4.2.2 version installed in that server. And > since it is not 4.3.0 therefore CLI isn't on by default. How can I check if > CLI is on or not? If it is not on, I won't be able to excute the php as a > script in another other way? > > THnaks@ > > -Original Message- > From: Tim Burden [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 02, 2003 12:02 PM > To: Kelvin Poon > Cc: [EMAIL PROTECTED] > Subject: Re: Can php run as a script? > > > Look for PHP CLI in google. > > Recent versions of PHP install at CLI PHP executable by default. > e.g I ended up with one in: > > /usr/local/apache/bin/php > > [EMAIL PROTECTED] root]# /usr/local/apache/bin/php -v > PHP 4.3.1 (cli) (built: Feb 20 2003 14:09:35) > Copyright (c) 1997-2002 The PHP Group > Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies > > > - Original Message - > From: "Kelvin Poon" <[EMAIL PROTECTED]> > Newsgroups: php.general > To: <[EMAIL PROTECTED]> > Sent: Wednesday, April 02, 2003 11:43 AM > Subject: Can php run as a script? > > > > Hi, > > > > This might be a newbie question but I can't find an answer anywhere I > > search. I know php can be excuted by a web browser, but can it run as a > > script like Perl? > > > > The reason i ask is, I need to write a php script that updates a database > in > > a server. And this script needs to be running in the background as a > > service, that's why i was wondering if I can excute it like a perl script. > > > > If it can't, do you guys know if I can use perl to call up a php script? > > > > Please advise. > > > > Thanks, > > Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Can php run as a script?
Thanks! but the thing is I have php 4.2.2 version installed in that server. And since it is not 4.3.0 therefore CLI isn't on by default. How can I check if CLI is on or not? If it is not on, I won't be able to excute the php as a script in another other way? THnaks@ -Original Message- From: Tim Burden [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 12:02 PM To: Kelvin Poon Cc: [EMAIL PROTECTED] Subject: Re: Can php run as a script? Look for PHP CLI in google. Recent versions of PHP install at CLI PHP executable by default. e.g I ended up with one in: /usr/local/apache/bin/php [EMAIL PROTECTED] root]# /usr/local/apache/bin/php -v PHP 4.3.1 (cli) (built: Feb 20 2003 14:09:35) Copyright (c) 1997-2002 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies - Original Message - From: "Kelvin Poon" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 11:43 AM Subject: Can php run as a script? > Hi, > > This might be a newbie question but I can't find an answer anywhere I > search. I know php can be excuted by a web browser, but can it run as a > script like Perl? > > The reason i ask is, I need to write a php script that updates a database in > a server. And this script needs to be running in the background as a > service, that's why i was wondering if I can excute it like a perl script. > > If it can't, do you guys know if I can use perl to call up a php script? > > Please advise. > > Thanks, > Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Warning Extract
I meant there is no row in table members where username='$logname', whatever value $logname contains. Don't forget to run session_start() at the begining of every script. Andy wrote: logname is not in my database. It is a session variable used to hold the members login name. In the form it is session_register('logname'); which is then set to a variable with this code: if ($num2 > 0) { // password is correct $auth="yes"; $logname=$fusername; $today = date("Y-m-d h:m:s"); $sql = "INSERT INTO login (username,loginTime) VALUES ('$logname','$today')"; does that make any sense? Andy "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Andy wrote: (and Marek fixed) $connection = mysql_connect($host, $user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $sql = "SELECT name FROM members WHERE username='$logname'"; $result = mysql_query($sql) or die("Couldn't execute query 1."); if($row = mysql_fetch_array($result,MYSQL_ASSOC)) extract($row); if $logname is not in members table, then your query returns zero rows and mysql_fetch_array returns false. First argument to extract (see manual) must be an array, but is false in your case, and php warns you about that. echo " New Member Welcome etc Thank you all again Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Email Attachment Problem....
Hello, I want to send an email attachment using PHP and the below code works locally but when i upload to my RAQ Cobalt server it doesn't send the attachment and i can't figure out why. If you can offer me any guidance as to why this is happening it is greatly appreciated. **The sendmail is a custom function listed below also, not the one inherent to PHP.** Thanks, Mike -Begin Code-- case("send_message"): // Obtain file upload vars $fileatt = $_FILES['fileatt']['tmp_name']; $fileatt_type = $_FILES['fileatt']['type']; $fileatt_name = $_FILES['fileatt']['name']; $from = "[EMAIL PROTECTED]"; if (is_uploaded_file($fileatt)) { // Read the file to be attached ('rb' = read binary) $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); // Generate a boundary string $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; // Add the headers for a file attachment $messaggio = "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; // Add a multipart boundary above the plain message $messaggio .= "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $messaggio . "\n\n"; // Base64 encode the file data $data = chunk_split(base64_encode($data)); // Add file attachment to the message $messaggio .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . //"Content-Disposition: attachment;\n" . //" filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n" . "--{$mime_boundary}--\n"; } // Send the message include("header.php"); SendMail($ml, $member_mail, $oggetto, $messaggio, $linkpage); echo"$message_success\n"; break; ---Sendmail Function- function SendMail($from_address, $to_address, $subject_mail, $message_mail, $site_address){ $from="$from_address"; $to ="$to_address"; $subject="$subject_mail"; $message="$message_mail"; // removes html tags and whitespace from input data $to =strip_tags(trim($to)); $subject =strip_tags(trim($subject)); $from =strip_tags(trim($from)); $message .="\n\n"; $message .="\n-\n"; $message .=" $site_address\n"; $message .=" $headers\n"; $from_address="[EMAIL PROTECTED]"; @$send=mail($to,$subject,$message,"From: $from_address\r\nReply-To: $from_address\r\nX-Mailer: ADP_FormMail"); } ---End Sendmail function ---End Code -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Html forms to php scripts
It's an Apache 2 / PHP bug. I think if you use $_POST['ttt'], you'll get the correct value, but I'm not sure. Try turning register globals off or using a stable version of Apache that works with PHP (the 1.3 series). ---John Holmes... - Original Message - From: "VanZee, Timothy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 11:31 AM Subject: FW: [PHP] Html forms to php scripts Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: Php file (input.php) looks like this: I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Html forms to php scripts
What version of Apache are you using? Can you point us to a phpinfo() file? - Original Message - From: "Timothy Vanzee" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 11:31 AM Subject: FW: [PHP] Html forms to php scripts Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: Php file (input.php) looks like this: I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Warning Extract
logname is not in my database. It is a session variable used to hold the members login name. In the form it is session_register('logname'); which is then set to a variable with this code: if ($num2 > 0) { // password is correct $auth="yes"; $logname=$fusername; $today = date("Y-m-d h:m:s"); $sql = "INSERT INTO login (username,loginTime) VALUES ('$logname','$today')"; does that make any sense? Andy "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Andy wrote: (and Marek fixed) > > >$connection = mysql_connect($host, $user,$password) > > or die ("Couldn't connect to server."); > >$db = mysql_select_db($database, $connection) > > or die ("Couldn't select database."); > >$sql = "SELECT name FROM members > > WHERE username='$logname'"; > >$result = mysql_query($sql) > > or die("Couldn't execute query 1."); > >if($row = mysql_fetch_array($result,MYSQL_ASSOC)) extract($row); > > > if $logname is not in members table, then your query returns zero rows > and mysql_fetch_array returns false. First argument to extract (see > manual) must be an array, but is false in your case, and php warns you > about that. > > > echo " > >New Member Welcome etc > > > >Thank you all again > > > >Andy > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can php run as a script?
Look for PHP CLI in google. Recent versions of PHP install at CLI PHP executable by default. e.g I ended up with one in: /usr/local/apache/bin/php [EMAIL PROTECTED] root]# /usr/local/apache/bin/php -v PHP 4.3.1 (cli) (built: Feb 20 2003 14:09:35) Copyright (c) 1997-2002 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies - Original Message - From: "Kelvin Poon" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 11:43 AM Subject: Can php run as a script? > Hi, > > This might be a newbie question but I can't find an answer anywhere I > search. I know php can be excuted by a web browser, but can it run as a > script like Perl? > > The reason i ask is, I need to write a php script that updates a database in > a server. And this script needs to be running in the background as a > service, that's why i was wondering if I can excute it like a perl script. > > If it can't, do you guys know if I can use perl to call up a php script? > > Please advise. > > Thanks, > Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can php run as a script?
Yes, you definitely can... http://www.php.net/manual/en/features.commandline.php -- Aaron Gould Web Developer Parts Canada - Original Message - From: "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 11:43 AM Subject: [PHP] Can php run as a script? > Hi, > > This might be a newbie question but I can't find an answer anywhere I > search. I know php can be excuted by a web browser, but can it run as a > script like Perl? > > The reason i ask is, I need to write a php script that updates a database in > a server. And this script needs to be running in the background as a > service, that's why i was wondering if I can excute it like a perl script. > > If it can't, do you guys know if I can use perl to call up a php script? > > Please advise. > > Thanks, > Kelvin > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Html forms to php scripts
> -Original Message- > From: VanZee, Timothy [mailto:[EMAIL PROTECTED] > Sent: 02 April 2003 17:31 > > Repost because no one replied originally. Are there any other lists > that anyone knows of for php that could be more helpful? I'm quite > disappointed in this one because I thought this was a fairly easy > question for those who have been working with php for a while. > > I have the following issue between my html forms and php scripts. > > Html file (input.html) looks like this: > > > > > > Php file (input.php) looks like this: > echo $ttt; > ?> > > I can input text (i.e. superman) and then click submit. The resulting > php page returns: > > supermanttt=superman > > It seems to me that it must be something in the php.ini file > that needs > to be changed, but I can't identify what exactly. Any help would be > appreciated. > > php 4.2.2 I'm pretty sure that this is an Apache 2 problem that's fixed in a later version of PHP and/or Apache. Try searching the bug database for more details. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: FW: [PHP] Html forms to php scripts
VanZee, Timothy wrote: Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. Sorry, but this is not an easy question. I have been working with php for a while and I don't have any answer for you. Your example works for me so the only thing that comes to my mind is try echo $_POST['ttt'] or print_r($GLOBALS). I hope this will help you somehow. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: Php file (input.php) looks like this: I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can php run as a script?
Hi, This might be a newbie question but I can't find an answer anywhere I search. I know php can be excuted by a web browser, but can it run as a script like Perl? The reason i ask is, I need to write a php script that updates a database in a server. And this script needs to be running in the background as a service, that's why i was wondering if I can excute it like a perl script. If it can't, do you guys know if I can use perl to call up a php script? Please advise. Thanks, Kelvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Warning Extract
Andy wrote: (and Marek fixed) $connection = mysql_connect($host, $user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $sql = "SELECT name FROM members WHERE username='$logname'"; $result = mysql_query($sql) or die("Couldn't execute query 1."); if($row = mysql_fetch_array($result,MYSQL_ASSOC)) extract($row); if $logname is not in members table, then your query returns zero rows and mysql_fetch_array returns false. First argument to extract (see manual) must be an array, but is false in your case, and php warns you about that. echo " New Member Welcome etc Thank you all again Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP] Html forms to php scripts
Repost because no one replied originally. Are there any other lists that anyone knows of for php that could be more helpful? I'm quite disappointed in this one because I thought this was a fairly easy question for those who have been working with php for a while. I have the following issue between my html forms and php scripts. Html file (input.html) looks like this: Php file (input.php) looks like this: I can input text (i.e. superman) and then click submit. The resulting php page returns: supermanttt=superman It seems to me that it must be something in the php.ini file that needs to be changed, but I can't identify what exactly. Any help would be appreciated. php 4.2.2 Tim Van Zee ITS Network Specialist Governors State University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Warning Extract
Help AGAIN!!! Thank you for all the help so far, i am close to getting this members section working correctly now i think! I think i would have given up by now if it were not for the help i get from you all, thank you. I have a warning that i don't understand: Warning: extract() expects first argument to be an array in /home/.sites//New_member.php on line 23 I also find that although i get through to the new members page OK when filling in the form it does not write to the mysql database with the new details, yet if i enter a username that already exists it tells me, so the php and mysql must be interacting. Here is the code for the warning message, hope it helps: $connection = mysql_connect($host, $user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $sql = "SELECT name FROM members WHERE username='$logname'"; $result = mysql_query($sql) or die("Couldn't execute query 1."); $row = mysql_fetch_array($result,MYSQL_ASSOC); extract($row); echo " New Member Welcome etc Thank you all again Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Check For Space
if(strpos($string, ' ') === false) { //space found } if you don't want any white character: if(ereg('\s',$string)) { //white character found } shaun wrote: Hi, How can i make sure a value sent from a form has no spaces in it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Check For Space
At 17:16 2-4-03, you wrote: Hi, How can i make sure a value sent from a form has no spaces in it? Before sending: javascript that prevents this on sending or even while typing. Check the javascript form faqs on www.irt.org for this. After sending: Detect spaces with if (!(strpos(' ', $string)===false) {ECHO "bloody idiot, i told you not to do that. Stupid User!";} In PHP you can remove spaces at start and end of the entry with trim(...). Remove all spaces in a string with $string=str_replace(...) (replace " " with ""). (see manual www.php.net/manual for proper use of these functions.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP
You are right! :-) Other question: When I try to put a file as an anonymous user, I always receipt this error: "Permission denied on server. (Upload)." Does some form exists of allowing to anonymous users upload files or it is impossible? Thank you very much, Tom. "Jon Haworth" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > Hi Tomás, > > > What's the meaning of this error?: FTP_PUT: Could not > > determine CWdir: No such directory. >^ > Are you trying to save a file in a directory that doesn't exist? > > Cheers > Jon > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another Problem installing PHP 4.3.1 - won't compile due to error.
Yup, you were correct. the 7.10.3 rpm was installed but I forgot to install the 7.10.3 development rpm. I did so and all compiles fine now. Thanks, Don > My guess you have a mess in your curl library installation. For example > you use header from version 7.9.5 and specify that you have version > 7.10.3. Find all libcurl.so and curl.h files on your system and check if > they are really the version you think they are. You may try running rpm > -V libcurl(-devel), this verifys if any file has changed > > Don wrote: > > >Ok, that problem solved but now another one pops up when I run 'make'. > >Please note that it is complaining about code that came with the PHP tarball > >and I haven't changed anything. Below are the errors for your viewing > >(dis)pleasure. Any guidance would be appreciated. This isn't supposed to > >be so hard. > > > > > > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Check For Space
Hi, How can i make sure a value sent from a form has no spaces in it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OCINewcollection fails after being used more then once
I am trying to use the ocicollection functions. Initially everything works fine, but after reloading the page for the second time I get the following error: OCITypeByName: OCI-22303: type "SISTRUT"."MENSERRO" not found When I try half a minute later, I do manage reload the page without any error. I'm using php-4.2.2 on solaris 2.6 as a module of apache_1.3.26. The php-code I used for this test follows: $v ) print "$v "; print "\n"; } } ocifreecursor($curs); ?> the PL/SQL code for the function: create or replace type menserro is varray(20) of varchar2(100); function sel(p_cursor out ufcurtyp, p_cod_uf in uf.cod_uf%type ) return menserro is v_sql varchar2(200); v_menserro menserro := menserro(); begin v_sql := 'select * from uf'; if p_cod_uf is not null then v_sql := v_sql || ' where cod_uf='''|| p_cod_uf || ; end if; v_sql := v_sql || ' order by nom_uf'; open p_cursor for v_sql; return null; exception when others then begin v_menserro.extend; v_menserro(v_menserro.count) := 'Erro na execução do select'; return v_menserro; end; end sel; Andries Algera CSR - IBAMA SAIN L4, Lote 4, Ed. IBAMA Sede 70800.200 Brasilia / DF BRASIL ph: +5561 316-1326 316-1453 fax:+5561 223-7108 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_SERVER[REMOTE_ADDR]
It isn't always possible to get the visitor's real IP address, if the user's traffic is proxied the REMOTE_ADDR will be the proxy IP address, some proxies set the forwarded for header but for security and privacy some do not. If you are not being directed through a proxy REMOTE_ADDR does show the real user IP address. Also be aware dns lookups are expensive, rather than resolving their ip address when they visit you should consider resolving them when you need them in host format. Jason John wrote: Makes me think.. what exactly the $_SERVER[REMOTE_ADDR] is doing Cause it does not really show the actual IP address instead IP address within its range e.g. 66.87.25.122 output 66.87.25.2 any idea how to get their actual IP add and if possible the name of their computer Also, is it also possible to get or trace the IP add? many thanks, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading entire directory, with or without compression ...
At 16:15 2-4-03, you wrote: Um, i had a look at the FTP options, (I honestly have no idea about the security implications) but i saw only directory functions for the server. http://www.php.net/manual/en/ref.ftp.php but maybe one of the finished applications: http://nanoftpd.sourceforge.net/ (i never tried it) found a solution. Or maybe, i am just thinking aloud, you need to write some javascript that explores the directory on the local PC (can javascript see them?) and sends the list of names in a hidden formfield, with that you could try to make a form page that you send to them, with the file fields already filled out, and that is then automagically submitted immediately. At 16:08 2-4-03, you wrote: yes, of course they can ... but i'm looking for a way to automate the process for them (a method which may not exist) .. i suppose i can give them the option to upload multiple files using multiple input fields, but I'd really like to find a way to select an entire folder instead ... - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Kenn Murrah" <[EMAIL PROTECTED]> Cc: "php list" <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 7:47 AM Subject: Re: [PHP] uploading entire directory, with or without compression ... > Your clients can zip the folder, upload the zip file, and then you can > on the server side use PclZip class to read the content > > Kenn Murrah wrote: > > >Greetings. > > > >I have a web site which permits my clients to upload a file via php4, and it > >works great ... however, some clients have requested that they be able to > >upload entire directories from their windows or macintosh computers ... that > >is, to select the entire folder rather than doing one file at a time. > > > >Is this possible? > > > >And perhaps related: could a script be contructed to create an archive file > >on the client side which, in turn, could be uploaded? That would achieve > >the same effect by allowing the client to create an archive with multiple > >files. > > > >I can't really see how that would be possible in PHP, but I'm hoping one of > >you much more experienced folks could see a solution. > > > >Thanks in advance. > > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading entire directory, with or without compression ...
i was afraid you were gonna say that, jason ... but i was hoping i had overlooked something ... anyway, thanks for your response ... i'm familiar enough with your input to this list that, if you say it can't be done, i'll look no farther ... thanks again, - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 8:14 AM Subject: Re: [PHP] uploading entire directory, with or without compression ... > On Wednesday 02 April 2003 22:08, Kenn Murrah wrote: > > yes, of course they can ... but i'm looking for a way to automate the > > process for them (a method which may not exist) .. i suppose i can give > > them the option to upload multiple files using multiple input fields, but > > I'd really like to find a way to select an entire folder instead ... > > Can't be done. > > You can investigate the use of client-side scripting. > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > -- > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > -- > /* > Revolution, n.: > A form of government abroad. > */ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] accessing protected remote files
Check examples and user notes in the manual: http://www.php.net/manual/en/function.fsockopen.php David Feldman wrote: How would that work? --Dave On Monday, March 31, 2003, at 09:27 AM, Marek Kilimajer wrote: You need to use socket functions and check the response headers David Feldman wrote: I have a script that needs to open a remote file on another Web server, which may or may not be protected (for example, by an htaccess file). What would be the best way to check if it's protected, and if so, prompt the user for username and password to open it? Thanks. --Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading entire directory, with or without compression ...
On Wednesday 02 April 2003 22:08, Kenn Murrah wrote: > yes, of course they can ... but i'm looking for a way to automate the > process for them (a method which may not exist) .. i suppose i can give > them the option to upload multiple files using multiple input fields, but > I'd really like to find a way to select an entire folder instead ... Can't be done. You can investigate the use of client-side scripting. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Revolution, n.: A form of government abroad. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading entire directory, with or without compression ...
yes, of course they can ... but i'm looking for a way to automate the process for them (a method which may not exist) .. i suppose i can give them the option to upload multiple files using multiple input fields, but I'd really like to find a way to select an entire folder instead ... - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Kenn Murrah" <[EMAIL PROTECTED]> Cc: "php list" <[EMAIL PROTECTED]> Sent: Wednesday, April 02, 2003 7:47 AM Subject: Re: [PHP] uploading entire directory, with or without compression ... > Your clients can zip the folder, upload the zip file, and then you can > on the server side use PclZip class to read the content > > Kenn Murrah wrote: > > >Greetings. > > > >I have a web site which permits my clients to upload a file via php4, and it > >works great ... however, some clients have requested that they be able to > >upload entire directories from their windows or macintosh computers ... that > >is, to select the entire folder rather than doing one file at a time. > > > >Is this possible? > > > >And perhaps related: could a script be contructed to create an archive file > >on the client side which, in turn, could be uploaded? That would achieve > >the same effect by allowing the client to create an archive with multiple > >files. > > > >I can't really see how that would be possible in PHP, but I'm hoping one of > >you much more experienced folks could see a solution. > > > >Thanks in advance. > > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php