php-general Digest 20 Dec 2001 23:58:35 -0000 Issue 1064
Topics (messages 78314 through 78368): Re: PHP3 NOT being parsed for SSI!! HELP!! 78314 by: dimok Re: Size of array in bytes 78315 by: Bogdan Stancescu 78316 by: Stefan Rusterholz PHP / SSL 78317 by: Richard Black 78321 by: TD - Sales International Holland B.V. 78322 by: Shane Wright 78323 by: Jon Farmer Convert tif --> jpg 78318 by: Roman 78319 by: Bogdan Stancescu 78320 by: Roman 78330 by: Miles Thompson Re: Signing Files with PGP 78324 by: Brian Clark 78326 by: Jon Farmer Uploading Word Document problem 78325 by: Alexis Antonakis Limit script memory usage !! 78327 by: Nicolas Guilhot 78328 by: Jerry Verhoef (UGBI) Help with Sessions - Should be easy =] 78329 by: Tomasz Jachimczak 78338 by: Fred Re: $PHP_SELF not working -please help 78331 by: Alawi 78332 by: Alawi 78344 by: Phillip Oertel How can I have CVS ? 78333 by: Alawi 78342 by: Nathan Cassano compressed content and output buffering 78334 by: Shane Wright Need another verse 78335 by: bill 78345 by: Kevin Stone 78351 by: bill Re: PHP 4.1.0 patch for Quanta IDE, The Sequel 78336 by: J Smith 78339 by: Mike Eheler 78341 by: Jack Dempsey 78343 by: Mike Eheler rrd tool's graphing and png 78337 by: Lancashire, Pete fsockopen / fopen 78340 by: James Cox Images 78346 by: PHP List 78350 by: PHP List 78352 by: Joel Boonstra undefined function: ftp_connect() 78347 by: Sam Schenkman-Moore 78353 by: Chris Lee 78357 by: Mike Eheler Re: Quanta IDE - PHP Highlighing for 4.0.1 78348 by: Austin Gonyou List all session currently associated with a web site 78349 by: Alex Shi SSL Connection with cURL 78354 by: Roman Eich 78355 by: Gerard Onorato <none> 78356 by: Arsen Kirillov Issues with fopen & long file names? 78358 by: Javier Muniz web server crashing with either 4.1.0 or 4.0.6 78359 by: Ian McNish Suggestions for the next php 78360 by: Stephano Mariani Translate question 78361 by: Mehmet Kamil ERISEN MS Word text pasted into forms 78362 by: jimtronic 78363 by: Gerard Onorato How to check if a session exists 78364 by: Alex Shi Global Arrays ? 78365 by: Jason Rennie 78367 by: Bogdan Stancescu 78368 by: Jason Rennie New Object Oriented Programming (OOP) mailing list for PHP programmers 78366 by: Manuel Lemos Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
--- Begin Message ---Hello, For including file you can use function "virtual()" with the file to include as parameter. This work under Apache only. Hope, it'll be useful for you. dimok ----- Original Message ----- From: "Thomas Edison Jr." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 19, 2001 11:09 PM Subject: [PHP] PHP3 NOT being parsed for SSI!! HELP!! > Folks, > > I have a serious problem and i don't know what to do. > > We have a fixed template for each intranet page. > Now the template consists of a header, a left > navigation and a footer. The body would contain > my pages content. > > What we are doing at present is that the header, the > left navigation and the footer is included in the page > using SSI. The header is a static include file. > However the footer and the left navigation are > customizable, and hence are dynamic pages (cgi > scripts) which generate the appropriate code depending > on the command line parameters. > > Now the problem is that php3 pages are not being > parsed for SSI. I looked up on the web , and > found that only one of two can be used at the same > time. > > Can anyone suggest a Possible Solution? We are running > a Solaris machine! > > Thanks, > T. Edison Jr. > > ===== > Rahul S. Johari (Director) > ****************************************** > Abraxas Technologies Inc. > Homepage : http://www.abraxastech.com > Email : [EMAIL PROTECTED] > Tel : 91-4546512/4522124 > ******************************************* > > __________________________________________________ > Do You Yahoo!? > Check out Yahoo! Shopping and Yahoo! Auctions for all of > your unique holiday gifts! Buy at http://shopping.yahoo.com > or bid at http://auctions.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > >--- End Message ---
--- Begin Message ---Had the same problem not long ago and I didn't find a simple solution either. My solution at the time was the painfully slow one - walking the array and storing strlen for both key and value. Since you have a large array, this probably doesn't do for you. A faster but less accurate solution would be storing round(strlen(serialize($array))*$coefficient), where you should approximate $coefficient for your average array (the less the average array element size, the smaller the coefficient). I know, these are both rudimentary and ugly solutions but I didn't find any better - these are the solutions I considered when I had the same problem. Bogdan Stefan Rusterholz wrote: > Hi > > I have a rather large array in my script and I was interested how much > memory it uses. Is there a way to get the size of an array in bytes? > BTW: I did RTFM and didn't find an accomidating function, so if there is > one, please point me to it... > > TIA > Stefan Rusterholz > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Hm, I thought about that way - technically it was indeed a way to go since I don't want to perform this action everytime but only for testing purposes (so time doesn't matter). But aren't arrays in PHP internally stored in a hash-like system which's size doesn't have to be equal to the sum of it's content? I'm more interested in how many kbytes of RAM my array is using than the size in bytes of it's content... But thank you anyway for helping me! best regards Stefan Rusterholz > Had the same problem not long ago and I didn't find a simple solution > either. My solution at the time was the painfully slow one - walking the > array and storing strlen for both key and value. Since you have a large > array, this probably doesn't do for you. > > A faster but less accurate solution would be storing > round(strlen(serialize($array))*$coefficient), where you should approximate > $coefficient for your average array (the less the average array element > size, the smaller the coefficient). > > I know, these are both rudimentary and ugly solutions but I didn't find any > better - these are the solutions I considered when I had the same problem. > > Bogdan > > Stefan Rusterholz wrote: > > > Hi > > > > I have a rather large array in my script and I was interested how much > > memory it uses. Is there a way to get the size of an array in bytes? > > BTW: I did RTFM and didn't find an accomidating function, so if there is > > one, please point me to it... > > > > TIA > > Stefan Rusterholz > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > >--- End Message ---
--- Begin Message ---Hi, Bit off topic this, but I thought I'd ask anyway... I've been implementing a financial reporting system, in PHP, which will be running on the internet. Obviously, therefore, security is an issue. The system itself implements a username/password login system, but I want to be able to run it using SSL for obvious reasons. My problem is this: The server we have (Red Hat 7.0, Apache 1.3.14-3, open-ssl 0.9.5a-14, mod_ssl 2.7.1-3) came with ssl preconfigured and ready to use. It runs at 128 bit encryption which is fine as far as I'm concerned. The people who will be using the system, however, have a company standard browser which is IE 4 and only supports 40 bit encryption. And for various political reasons they don't want to upgrade all the browsers. So what I want to know is how easy it is to "turn down" the encryption level, and how to go about it. Any suggestions, pointers??? All the documentation I've come across thus far doesn't really cover anything like this.... Richy ========================================== Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---On Thursday 20 December 2001 14:58, you wrote: I urge you strongly to advise against that. Although it might be possible to downgrade your encryption to 40bit I'd like to make you aware of the fact that DES which is 56 bit encryption if I'm not mistaken was cracked several times by brute force in UNDER 22 hours by the distributed.net people (www.distributed.net). Therefore I would NOT consider 40 bits encryption safe and I feel obligated to make you aware of that. You are warned now :-) so do as you please. Kind regards, Ferry van Steen PS I'm also on distributed.net's mailing list. I once asked why it wouldn't be safe then, since distributed.net has a huge load processing power due to the number of people that participate. Appearantly it's fairly easy for a lot of companies/governments/etc to EASILY!! match that computational power. > Hi, > Bit off topic this, but I thought I'd ask anyway... > > I've been implementing a financial reporting system, in PHP, which will be > running on the internet. > > Obviously, therefore, security is an issue. The system itself implements a > username/password login system, but I want to be able to run it using SSL > for obvious reasons. > > My problem is this: The server we have (Red Hat 7.0, Apache 1.3.14-3, > open-ssl 0.9.5a-14, mod_ssl 2.7.1-3) came with ssl preconfigured and ready > to use. It runs at 128 bit encryption which is fine as far as I'm > concerned. > > The people who will be using the system, however, have a company standard > browser which is IE 4 and only supports 40 bit encryption. And for various > political reasons they don't want to upgrade all the browsers. So what I > want to know is how easy it is to "turn down" the encryption level, and how > to go about it. > > Any suggestions, pointers??? All the documentation I've come across thus > far doesn't really cover anything like this.... > > Richy > > > ========================================== > Richard Black > Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com > Tel: 0141 435 3504 > Email: [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Hang on, correct me if I'm wrong, but isn't 56bit DES significantly different from 40-bit SSL (which uses a 40bit key for the public key crypto and something like a 3000bit key for the symmetric cipher used for the actual data transfer). What I mean is, DES is significantly weaker than the weakest part of standard 40bit SSL yes? If I'm wrong, arent a lot of people putting a lot of confidence in something that really isnt secure (i.e. all SSL sessions...)?? -- Shane On Thursday 20 Dec 2001 9:07 pm, TD - Sales International Holland B.V. wrote: > On Thursday 20 December 2001 14:58, you wrote: > > I urge you strongly to advise against that. Although it might be possible > to downgrade your encryption to 40bit I'd like to make you aware of the > fact that DES which is 56 bit encryption if I'm not mistaken was cracked > several times by brute force in UNDER 22 hours by the distributed.net > people (www.distributed.net). Therefore I would NOT consider 40 bits > encryption safe and I feel obligated to make you aware of that. You are > warned now :-) so do as you please. > > Kind regards, > > Ferry van Steen > > PS I'm also on distributed.net's mailing list. I once asked why it wouldn't > be safe then, since distributed.net has a huge load processing power due to > the number of people that participate. Appearantly it's fairly easy for a > lot of companies/governments/etc to EASILY!! match that computational > power. > > > Hi, > > Bit off topic this, but I thought I'd ask anyway... > > > > I've been implementing a financial reporting system, in PHP, which will > > be running on the internet. > > > > Obviously, therefore, security is an issue. The system itself implements > > a username/password login system, but I want to be able to run it using > > SSL for obvious reasons. > > > > My problem is this: The server we have (Red Hat 7.0, Apache 1.3.14-3, > > open-ssl 0.9.5a-14, mod_ssl 2.7.1-3) came with ssl preconfigured and > > ready to use. It runs at 128 bit encryption which is fine as far as I'm > > concerned. > > > > The people who will be using the system, however, have a company standard > > browser which is IE 4 and only supports 40 bit encryption. And for > > various political reasons they don't want to upgrade all the browsers. So > > what I want to know is how easy it is to "turn down" the encryption > > level, and how to go about it. > > > > Any suggestions, pointers??? All the documentation I've come across thus > > far doesn't really cover anything like this.... > > > > Richy > > > > > > ========================================== > > Richard Black > > Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com > > Tel: 0141 435 3504 > > Email: [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---> I urge you strongly to advise against that. Although it might be possible to > downgrade your encryption to 40bit I'd like to make you aware of the fact > that DES which is 56 bit encryption if I'm not mistaken was cracked several > times by brute force in UNDER 22 hours by the distributed.net people > (www.distributed.net). Therefore I would NOT consider 40 bits encryption safe > and I feel obligated to make you aware of that. You are warned now :-) so do > as you please. Erm, yeah true.... but by their own admission they used the equivalant of 160000 PII 266Mhz machines to accomplish this. If you think someone is going to want your data and has those kinda resources available then yeah go for higher. However if thats your worry where are you going to stop in the length of your key? If your that paranoid then it shouldn't be using public networks in the first place!! -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key--- End Message ---
--- Begin Message ---Please help me. I need convert image from tif format to the jpg format, exist any php function to do this ? Thank you Roman--- End Message ---
--- Begin Message ---If you work under Linux you might want to check out the man page for mogrify and perform an <? exec("mogrify -format jpeg $filein $fileout"); ?> for example. Bogdan > Please help me. I need convert image from tif format to the jpg format, > exist any php function to do this ? > > Thank you > > Roman--- End Message ---
--- Begin Message ---No, I need convert format of image in windows system. -----Original Message----- From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 3:14 PM To: Roman; Php-General Subject: Re: [PHP] Convert tif --> jpg If you work under Linux you might want to check out the man page for mogrify and perform an <? exec("mogrify -format jpeg $filein $fileout"); ?> for example. Bogdan > Please help me. I need convert image from tif format to the jpg format, > exist any php function to do this ? > > Thank you > > Roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Any number of image manipulation programs do that, However, try installing CygWin and see if mogrify will run. Miles Thompson At 03:20 PM 12/20/2001 +0100, Roman wrote: >No, I need convert format of image in windows system. > > >-----Original Message----- >From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] >Sent: Thursday, December 20, 2001 3:14 PM >To: Roman; Php-General >Subject: Re: [PHP] Convert tif --> jpg > > >If you work under Linux you might want to check out the man page for mogrify >and perform an <? exec("mogrify -format jpeg $filein $fileout"); ?> for >example. > >Bogdan > > > Please help me. I need convert image from tif format to the jpg format, > > exist any php function to do this ? > > > > Thank you > > > > Roman > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---* J.Mueller, pro.vider.de GmbH ([EMAIL PROTECTED]) [Dec 20. 2001 04:17]: > Hello List, Howdy.. > I try to setup a script which automatically > signs a file with PGP. [...] > When I use something like > $command="/usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt"; > exec("$command",$answer); > obviously nothing is happening cause the pass phrase was > not given. One way is to use popen() to execute the command and fputs() to write out the passphrase. <http://download.php.net/manual/en/function.popen.php> -- Brian Clark | Avoiding the general public since 1805! Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 Variables won't.... constants aren't.--- End Message ---
--- Begin Message ---The -z option allows you to pass the passphrase on the command line -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key ----- Original Message ----- From: "Brian Clark" <[EMAIL PROTECTED]> To: "PHP is not a drug." <[EMAIL PROTECTED]> Sent: Thursday, December 20, 2001 2:37 PM Subject: Re: [PHP] Signing Files with PGP > * J.Mueller, pro.vider.de GmbH ([EMAIL PROTECTED]) [Dec 20. 2001 04:17]: > > > Hello List, > > Howdy.. > > > I try to setup a script which automatically > > signs a file with PGP. > > [...] > > > When I use something like > > > $command="/usr/local/bin/pgps -u Juergen -ato test1.sig ~/test1.txt"; > > exec("$command",$answer); > > > obviously nothing is happening cause the pass phrase was > > not given. > > One way is to use popen() to execute the command and fputs() to write > out the passphrase. > > <http://download.php.net/manual/en/function.popen.php> > > -- > Brian Clark | Avoiding the general public since 1805! > Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 > Variables won't.... constants aren't. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >--- End Message ---
--- Begin Message ---Hi All, I have a site whereby you can upload a Resume in Word or Text format, but for certain Word documents, the upload process just times out. Has anyone else come across this problem, and if so any suggestions? Many Thanks Alexis--- End Message ---
--- Begin Message ---Hi all, I need to limit the amount of memory that a script can use. Is there a function that I can use to tell the script to die if its memory usage becomes greater than $MAX_MEMORY ! Or maybe, I could use a cron job to monitor processes and kill them if they become too big ? Thanks for your help. Nicolas--- End Message ---
--- Begin Message ---There is a setting in de php.ini called "memory_limit". Remember it is in bytes! Jerry -----Original Message----- From: Nicolas Guilhot [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 4:09 PM To: Php General MailingList Subject: [PHP] Limit script memory usage !! Hi all, I need to limit the amount of memory that a script can use. Is there a function that I can use to tell the script to die if its memory usage becomes greater than $MAX_MEMORY ! Or maybe, I could use a cron job to monitor processes and kill them if they become too big ? Thanks for your help. Nicolas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures.--- End Message ---
--- Begin Message ---I am coming from an asp background, and am used to setting session variables very easily, but I cannot work them out here with all the different commands. I would like to store in a session variable output from a mysql db (Got the db bit working fine) but cannot for the life of me store or retrieve anything from a session variable. (more information if required) I am retreiving user information from a database after verification, and would like to place certain feilds into a session variable for easy access/retreival. I can get the information out of the database, but cannot place it into any sort of variable that will store on the page. I have the latest official PHP, running with IIS on a Windows 2K server with IIS. More questions to follow no doubt, Thanks in advance, - Tomasz--- End Message ---
--- Begin Message ---Why don't you give us a code snippet so we know how you are trying to do it. Fred Tomasz Jachimczak <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am coming from an asp background, and am used to setting session variables > very easily, but I cannot work them out here with all the different > commands. > > I would like to store in a session variable output from a mysql db (Got the > db bit working fine) but cannot for the life of me store or retrieve > anything from a session variable. > > (more information if required) > > I am retreiving user information from a database after verification, and > would like to place certain feilds into a session variable for easy > access/retreival. I can get the information out of the database, but cannot > place it into any sort of variable that will store on the page. > > I have the latest official PHP, running with IIS on a Windows 2K server with > IIS. > > More questions to follow no doubt, > > Thanks in advance, > > - Tomasz > >--- End Message ---
--- Begin Message ---USE PHPSELF in windows not $PHP_SELF--- End Message ---
--- Begin Message ---sorry $PHPSELF not $PHP_SELF in windows I forget $ :) ----- Original Message ----- From: "Alawi" <[EMAIL PROTECTED]> To: "PHP genral" <[EMAIL PROTECTED]> Sent: Thursday, December 20, 2001 6:34 PM Subject: [PHP] Re: $PHP_SELF not working -please help > > > USE PHPSELF in windows not $PHP_SELF > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > >--- End Message ---
--- Begin Message ---Alawi wrote: > use $PHPSELF not $PHP_SELF in windows BAD IDEA. what happens if one day you (or even worse: someone else) wants to run your scripts on a different server? one of the nicest things about PHP that you can run it on many different any OS's. phil.--- End Message ---
--- Begin Message ---and log to it from windows ?--- End Message ---
--- Begin Message ---And the answer is... WinCVS Check it our at. http://www.cvsgui.org/ -----Original Message----- From: Alawi [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 20, 2001 7:51 AM To: PHP genral Subject: [PHP] How can I have CVS ? and log to it from windows ?--- End Message ---
--- Begin Message ---Hi The way output buffering and output compression work, all the output is buffered until script termination, at which point it's compressed and then all sent to the browser. Is there any way having it compressed but not buffering it? gzip is a stream based algorithm, so there shouldn't be any problem theoretically. I imagine mod_gzip would help in this respect - but I'd like it to be switched on and off within PHP. Anyone know a nice way of doing this? Thanks -- Shane--- End Message ---
--- Begin Message ---To the tune of "Let it Be", with apologies to the Beatles and all those who have gone before: When I find my code in tons of trouble, Then the newsgroups come to me, Speaking words of wisdom: "PHP" As the deadline fast approaches, And the bugs are all I see, Somewhere, someone whispers" "PHP" PHP, PHP, PHP, PHP. Client-side is dead and buried, PHP. I used to write a lot of markup, writing each page manually. Learn to do it more dynamic! PHP. Tie it to your database, and you can change it endlessly, there will be an answer PHP PHP, PHP, PHP, yeah, PHP. Only wimps use Front Page. PHP. PHP, PHP, PHP, oh, PHP. ASP just won't cut it. PHP., PHP, PHP, PHP. Avoiding MS agony, PHP.--- End Message ---
--- Begin Message ---Okay you need to interject some emotion into your song... try something like... Now PERL's been sending emails, She sais she's feeling jealousy, Because I have a new friend, PHP -Kevin ----- Original Message ----- From: "bill" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 20, 2001 9:14 AM Subject: [PHP] Need another verse > To the tune of "Let it Be", > with apologies to the Beatles and all those who have gone before: > > When I find my code in tons of trouble, > Then the newsgroups come to me, > Speaking words of wisdom: > "PHP" > > As the deadline fast approaches, > And the bugs are all I see, > Somewhere, someone whispers" > "PHP" > > PHP, PHP, > PHP, PHP. > Client-side is dead and buried, > PHP. > > I used to write a lot of markup, > writing each page manually. > Learn to do it more dynamic! > PHP. > > Tie it to your database, > and you can change it endlessly, > there will be an answer > PHP > > PHP, PHP, > PHP, yeah, PHP. > Only wimps use Front Page. > PHP. > > PHP, PHP, > PHP, oh, PHP. > ASP just won't cut it. > PHP., PHP, > PHP, PHP. > Avoiding MS agony, > PHP. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >--- End Message ---
--- Begin Message ---Ooh, good. That's what it needed. Maybe even some tragedy: How-to books mourn unused, dusty, having ceased with Java Beans, Now I program quickly, PHP Kevin Stone wrote: > Okay you need to interject some emotion into your song... try something > like... > > Now PERL's been sending emails, > She sais she's feeling jealousy, > Because I have a new friend, > PHP > > -Kevin > > ----- Original Message ----- > From: "bill" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, December 20, 2001 9:14 AM > Subject: [PHP] Need another verse > > > To the tune of "Let it Be", > > with apologies to the Beatles and all those who have gone before: > > > > When I find my code in tons of trouble, > > Then the newsgroups come to me, > > Speaking words of wisdom: > > "PHP" > > > > As the deadline fast approaches, > > And the bugs are all I see, > > Somewhere, someone whispers" > > "PHP" > > > > PHP, PHP, > > PHP, PHP. > > Client-side is dead and buried, > > PHP. > > > > I used to write a lot of markup, > > writing each page manually. > > Learn to do it more dynamic! > > PHP. > > > > Tie it to your database, > > and you can change it endlessly, > > there will be an answer > > PHP > > > > PHP, PHP, > > PHP, yeah, PHP. > > Only wimps use Front Page. > > PHP. > > > > PHP, PHP, > > PHP, oh, PHP. > > ASP just won't cut it. > > PHP., PHP, > > PHP, PHP. > > Avoiding MS agony, > > PHP. > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >--- End Message ---
--- Begin Message ---I sumbitted a similar patch to the Quanta team about a week ago. It may appear in an upcoming release, possibly Quanta 3, which will come with KDE 3.0. A few other additions I made: - highlighting is now case-insensitive for everything. I believe older versions were case-sensitive for keywords, like function, class, etc. - support for ASP-style opening and closing tags (<% and %> instead of <?php, <?, etc.) I'm also working on porting a newer editor from Kate/ktexteditor into Quanta. It's been slow going, but things have picked up (it compiles and runs now, albeit with a bunch of segfaults). This will make adding syntax highlighting instructions much easier, as the latest versions of Kate allow you to define highlighting rules in XML files, and the highlighting instructions are set up at run-time rather than compile time. Maybe over the XMas break I'll be able to finish it up. J Mike Eheler wrote: > http://sourceforge.net/tracker/index.php?func=detail&aid=495239&group_id=4113&atid=304113 > > Download the attached file, and run > > patch -p1 -i quanta-2.0.1-php-4.1.0.diff > > That will patch your source tree.. then just configure, make, install. > > I've actually tested this one, so go nuts people. :) Please let me know > if you find any functions that should be keywords or keywords that > shouldn't be keywords, or functions/keywords that just plain aren't in > the list. > > Mike--- End Message ---
--- Begin Message ---Cool, however PHP is not case sensitive, nor is ASP or HTML for that matter, therefore case sensitive syntax highlighting will not be good for these languages. Mike J Smith wrote: > I sumbitted a similar patch to the Quanta team about a week ago. It may > appear in an upcoming release, possibly Quanta 3, which will come with KDE > 3.0. > > A few other additions I made: > > - highlighting is now case-insensitive for everything. I believe older > versions were case-sensitive for keywords, like function, class, etc. > > - support for ASP-style opening and closing tags (<% and %> instead of > <?php, <?, etc.) > > I'm also working on porting a newer editor from Kate/ktexteditor into > Quanta. It's been slow going, but things have picked up (it compiles and > runs now, albeit with a bunch of segfaults). This will make adding syntax > highlighting instructions much easier, as the latest versions of Kate allow > you to define highlighting rules in XML files, and the highlighting > instructions are set up at run-time rather than compile time. > > Maybe over the XMas break I'll be able to finish it up. > > J > > > Mike Eheler wrote: > > > >http://sourceforge.net/tracker/index.php?func=detail&aid=495239&group_id=4113&atid=304113 > >>Download the attached file, and run >> >>patch -p1 -i quanta-2.0.1-php-4.1.0.diff >> >>That will patch your source tree.. then just configure, make, install. >> >>I've actually tested this one, so go nuts people. :) Please let me know >>if you find any functions that should be keywords or keywords that >>shouldn't be keywords, or functions/keywords that just plain aren't in >>the list. >> >>Mike >> >--- End Message ---
--- Begin Message ---really? <? $THIS_IS_A_VARIABLE=1; $this_is_a_variable=2; echo "$THIS_IS_A_VARIABLE\n"; echo "$this_is_a_variable\n"; ?> seems sensitive to me... Mike Eheler wrote: > Cool, however PHP is not case sensitive, nor is ASP or HTML for that > matter, therefore case sensitive syntax highlighting will not be good > for these languages. > > Mike > > J Smith wrote: > > > I sumbitted a similar patch to the Quanta team about a week ago. It may > > appear in an upcoming release, possibly Quanta 3, which will come with KDE > > 3.0. > > > > A few other additions I made: > > > > - highlighting is now case-insensitive for everything. I believe older > > versions were case-sensitive for keywords, like function, class, etc. > > > > - support for ASP-style opening and closing tags (<% and %> instead of > > <?php, <?, etc.) > > > > I'm also working on porting a newer editor from Kate/ktexteditor into > > Quanta. It's been slow going, but things have picked up (it compiles and > > runs now, albeit with a bunch of segfaults). This will make adding syntax > > highlighting instructions much easier, as the latest versions of Kate allow > > you to define highlighting rules in XML files, and the highlighting > > instructions are set up at run-time rather than compile time. > > > > Maybe over the XMas break I'll be able to finish it up. > > > > J > > > > > > Mike Eheler wrote: > > > > > > >http://sourceforge.net/tracker/index.php?func=detail&aid=495239&group_id=4113&atid=304113 > > > >>Download the attached file, and run > >> > >>patch -p1 -i quanta-2.0.1-php-4.1.0.diff > >> > >>That will patch your source tree.. then just configure, make, install. > >> > >>I've actually tested this one, so go nuts people. :) Please let me know > >>if you find any functions that should be keywords or keywords that > >>shouldn't be keywords, or functions/keywords that just plain aren't in > >>the list. > >> > >>Mike > >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---<? echo (null == Null); eCho (NULL == NuLl); eCHo (FALSE == false); prINt("<pre>"); Print_R(GET_defined_VaRs()); sPrinTF('%s','</pre>'); ?> Variable names are the *only* exception. So yes, $var != $Var; And variable names are not syntax highlighted specifically (other than the fact that variables are highlighted). So by case-sensitizing keyword and function references, that is making a lot of scripts *not* syntax highlight properly, because only people who use FALSE will be highlighted, while people who use False or false or even FalsE will be left in the dark. Or perhaps you prefer to code using MySQL_Connect().. people driven to PHP from ASP might code like this when they start. Mike Jack Dempsey wrote: > really? > <? > $THIS_IS_A_VARIABLE=1; > $this_is_a_variable=2; > > echo "$THIS_IS_A_VARIABLE\n"; > echo "$this_is_a_variable\n"; > ?> > > seems sensitive to me... > > Mike Eheler wrote: > > >>Cool, however PHP is not case sensitive, nor is ASP or HTML for that >>matter, therefore case sensitive syntax highlighting will not be good >>for these languages. >> >>Mike >> >>J Smith wrote: >> >> >>>I sumbitted a similar patch to the Quanta team about a week ago. It may >>>appear in an upcoming release, possibly Quanta 3, which will come with KDE >>>3.0. >>> >>>A few other additions I made: >>> >>>- highlighting is now case-insensitive for everything. I believe older >>>versions were case-sensitive for keywords, like function, class, etc. >>> >>>- support for ASP-style opening and closing tags (<% and %> instead of >>><?php, <?, etc.) >>> >>>I'm also working on porting a newer editor from Kate/ktexteditor into >>>Quanta. It's been slow going, but things have picked up (it compiles and >>>runs now, albeit with a bunch of segfaults). This will make adding syntax >>>highlighting instructions much easier, as the latest versions of Kate allow >>>you to define highlighting rules in XML files, and the highlighting >>>instructions are set up at run-time rather than compile time. >>> >>>Maybe over the XMas break I'll be able to finish it up. >>> >>>J >>> >>> >>>Mike Eheler wrote: >>> >>> >>>http://sourceforge.net/tracker/index.php?func=detail&aid=495239&group_id=4113&atid=304113 >>> >>> >>>>Download the attached file, and run >>>> >>>>patch -p1 -i quanta-2.0.1-php-4.1.0.diff >>>> >>>>That will patch your source tree.. then just configure, make, install. >>>> >>>>I've actually tested this one, so go nuts people. :) Please let me know >>>>if you find any functions that should be keywords or keywords that >>>>shouldn't be keywords, or functions/keywords that just plain aren't in >>>>the list. >>>> >>>>Mike >>>> >>>> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >>To contact the list administrators, e-mail: [EMAIL PROTECTED] >> > -- Long life is in store for you.--- End Message ---
--- Begin Message ---I must be doing something wrong that is really simple hence I can't figure out what I'm doing wrong. I'm using a package called rrd tool, one of its (unix) command line programs has the option to output to stdout a png image. I'm trying to get that output feed in to ImagePNG to display the image within an HTML page. the png lib is running ok, tested by one of the examples from the Image function doc's. Any suggestions ... Thanks -pete Pete Lancashire Unix Systems Administration Columbia Sportswear Co. Inc. [EMAIL PROTECTED] (503) 985-4173--- End Message ---
--- Begin Message ---Anyone know what errno 0 is for fsockopen? Thanks, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . James Cox :: Senior Support Engineer Wherewithal, Inc. e: [EMAIL PROTECTED] Wherewithal. Capture Creative Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .--- End Message ---
--- Begin Message ---Hi, I am trying to do something like this: <img src="image.php?image=1"> The code is like this: <script language="php"> $szPicture = "myimage.gif"; $url = "http://www.mysite.com/" . $szPicture; header("Content-type: image/gif"); header("Content-Length: " . strlen($url)); echo $url; </script> But nothing happens, I just get the broken image. My logs show nothing about a script failure or about a file not being found. I tried without the header("Content-Length: " . strlen($url)); but no diff. Thanks for any help.--- End Message ---
--- Begin Message ---Thanks, but my html is valid, and what you are doing is not what I want to do. I want to display a random image included in the page, just like a banner program would work. I do not allow php execution on the page so the only way to get the image is to call the script with the img src tag, just like a banner program would. > First of all your HTML is not valid. Secondly I believe you're making it > more complex than it needs to be. And since this is ending up in HTML > anyway you don't need to concern yourself with the headers. Start off with > something simple like what I have below, and go from there. > > <html> > <a href="show_image.php?image=1">Display myPicture.gif</a> > > <? // show_image.php script > if ($image) {echo "<img src=\"http://www.myurl.com/mypicture.gif\">;} > ?> > </html> > > Hope this helps, > Kevin > > > Hi, > > I am trying to do something like this: > > <img src="image.php?image=1"> > > > > The code is like this: > > > > <script language="php"> > > $szPicture = "myimage.gif"; > > > > $url = "http://www.mysite.com/" . $szPicture; > > header("Content-type: image/gif"); > > header("Content-Length: " . strlen($url)); > > echo $url; > > </script> > > > > But nothing happens, I just get the broken image. > > My logs show nothing about a script failure or about a file not being > found. > > I tried without the header("Content-Length: " . strlen($url)); but no > diff. > > > > Thanks for any help. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > >--- End Message ---
--- Begin Message ---> > > <img src="image.php?image=1"> > > > > > > The code is like this: > > > > > > <script language="php"> > > > $szPicture = "myimage.gif"; > > > > > > $url = "http://www.mysite.com/" . $szPicture; > > > header("Content-type: image/gif"); > > > header("Content-Length: " . strlen($url)); > > > echo $url; > > > </script> You're properly printing out the Content-type header, but not the actual image data. You need to get the get the binary data (probably using a binary-safe read) from the image file you want to display (in $url), and then print that data out after the content-type header. Right now, a browser would get sent a content-type header for a gif, and then the following string: http://www.mysite.com/myimage.gif and that's not valid contents for a .gif file. Joel -- [ joel boonstra | [EMAIL PROTECTED] ]--- End Message ---
--- Begin Message ---I've compiled php 4.0.6 on Darwin as CGI. "--with-ftp" shows up in the php configuration display but I still get this message: undefined function: ftp_connect() I've read a couple past articles with people having this problem but I did not spot a solution. Any suggestions? Thanks, Sam--- End Message ---
--- Begin Message ---run phpinfo() is ftp support in there? if not run configure like you normally do and scroll up to the ftp section, are there any errors in there? if so what are they? -- Chris Lee [EMAIL PROTECTED] "Sam Schenkman-Moore" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I've compiled php 4.0.6 on Darwin as CGI. "--with-ftp" shows up in the php > configuration display but I still get this message: > > undefined function: ftp_connect() > > I've read a couple past articles with people having this problem but I did > not spot a solution. > > Any suggestions? > > Thanks, Sam >--- End Message ---
--- Begin Message ---You need to compile with ftp support. --with-ftp is not the right command, it should be --enable-ftp Mike Sam Schenkman-Moore wrote: > I've compiled php 4.0.6 on Darwin as CGI. "--with-ftp" shows up in the php > configuration display but I still get this message: > > undefined function: ftp_connect() > > I've read a couple past articles with people having this problem but I did > not spot a solution. > > Any suggestions? > > Thanks, Sam > >--- End Message ---
--- Begin Message ---So is glimmer. On Wed, 2001-12-19 at 17:27, Mike Eheler wrote: > Attached is a text file that will update Quanta IDE 2.0.1 syntax > highlighting for PHP. > > Simply use your favourite text edit quanta/kwrite/highlight.cpp in your > quanta-2.0.1 source tree, and paste the text from this attached file > overtop of the phpKeywords and phpTypes variables. > > If anyone knows how I can make a real patch (diff or whatever) lemme > know cuz I've never done it before. > > Also if you notice anything that shouldn't be a keyword, or is missing > from either keywords or functions (currently there are 2499 functions > defined in this file) let me know. > > Mike > > > ---- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-698-7250 email: [EMAIL PROTECTED] "Have regard for your name, since it will remain for you longer than a great store of gold." Ecclesiastes, Aprocrypha--- End Message ---
signature.asc
Description: This is a digitally signed message part
--- Begin Message ---Hi, I 'd like to know how can we list all the sessions concurrently active on a web site. If anyone out there knows how to do the trick please help. Thanks in advance! Alex--- End Message ---
--- Begin Message ---Hi NG, i want to establish an SSL connection with cURL. I used two different scripts, 1) $URL="ssl.server.com/path/file.ext"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://$URL"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS , "$data"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); $x = curl_errno($ch); print("$x<br>$result"); curl_close ($ch); and get exitcode 1 2) function cURL ($URL, $options="") { $command="/usr/local/bin/curl"; $options.=" --stderr"; $execstring=escapeshellcmd($command." ".$URL." ".$options); exec($execstring, $stdout, $errorcode); $output = implode ("\n", $stdout); if ($errorcode<>0) $output=""; return $output; } $URL="https://ssl.server.com/path/file.ext"; $options=" -d $data"; $data = cURL ($URL, $options); and get exitcode 2 Why i get two different exitcodes and why i get in the second version exitcode 2? Can anyone help me to solve this problem? -- Roman--- End Message ---
--- Begin Message ---Roman, This is certainly not the exact answer you are looking for however... We had a lot of trouble using the PHP curl commands directly. We are currently doing a large volume of transactions using cURL with great success by shelling to it. I am attaching a very simple example of what we are doing below. Most of this code is straight out of the cURL web site. function call_CURL($data) { $URL="www.foo.com/cgi-bin/blah.pl?submit"; exec("/path_to_curl/curl -m 120 -d \"$data\" https://$URL -L",$return_message_array, $return_number); for ($i = 0; $i < count($return_message_array); $i++) { $results = $results.$return_message_array[$i]; } return $results; } I hope this helps some. Gerard On Thu, 20 Dec 2001 21:14:35 +0100, Roman Eich wrote: >Hi NG, > >i want to establish an SSL connection with cURL. I used two different >scripts, >1) >$URL="ssl.server.com/path/file.ext"; >$ch = curl_init(); >curl_setopt($ch, CURLOPT_URL,"https://$URL"); >curl_setopt($ch, CURLOPT_POST, 1); >curl_setopt($ch, CURLOPT_POSTFIELDS , "$data"); >curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); >$result = curl_exec($ch); >$x = curl_errno($ch); >print("$x<br>$result"); >curl_close ($ch); > >and get exitcode 1 > >2) >function cURL ($URL, $options="") > { > $command="/usr/local/bin/curl"; > $options.=" --stderr"; > $execstring=escapeshellcmd($command." ".$URL." ".$options); > exec($execstring, $stdout, $errorcode); > $output = implode ("\n", $stdout); > if ($errorcode<>0) $output=""; > return $output; > } >$URL="https://ssl.server.com/path/file.ext"; > $options=" -d $data"; > $data = cURL ($URL, $options); > >and get exitcode 2 > >Why i get two different exitcodes and why i get in the second version >exitcode 2? >Can anyone help me to solve this problem? > >-- >Roman > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > >--- End Message ---
--- Begin Message ---Ok i am in test--- End Message ---
--- Begin Message ---I'm trying to open a file using php 4.1.0 under windows 2k server. The script uses fopen and the filename is long (approx 40 characters + extension). I'm getting the error: Warning: fopen("c:\_file_345176fo90301b70374d2f30e5a11d5b.ext ", "r") - Invalid argument in file.php on line 127 can fopen not handle long file names, or am I doing something wrong? The script uses \\ not \, so that's not the problem (even though only one \) is displayed above. if fopen can't display long file names, is there a function that will return the short (i.e. _file_~1.ext) format? any help is appreciated. Javier Muniz Granicus, LTD. (www.granicus.com) Tel: (415) 522-5216 Fax: (415) 522-5215--- End Message ---
--- Begin Message ---when trying at access any php scripts my web server is crashing. i'm experiencing this problem with both php 4.0.6 and 4.1.0 on iplanet enterprise 6.0sp1 on solaris 8. my web server is logging the following error: catastrophe (21929): Server crash detected (signal SIGSEGV) info (21929): Crash occurred in NSAPI SAF php4_execute info (21929): Crash occurred in function _pthread_mutex_lock from module /usr/lib/libthread.so.1 i'm getting this behavior with php code as simple as: <?php phpinfo(); ?> any help would be appreciated.--- End Message ---
--- Begin Message ---Hi! I have been a PHP user since version 3.0 came out, and have seen it develop a lot along the way, but theres some things I find it lacks that it really should not. If people agree, I'll glady contribute to the PHP codebase. For example, multi-threading. Looking at the PHP sources, I can see this would be fairly easy to implement on some most server modules. Before I get fried by people for suggesting this, I know there are many functions that are not thread safe, such the ob_* functions. But as far as I can see threading would be well suited to some PHP tasks... I'd like to hear users thoughts on this. TIA, Stephano Mariani--- End Message ---
--- Begin Message ---Hello, I am trying to transalte entry in Turkish Characters to English Characters. I wrote the following code. function translate_turkish($string) { $estring = strtr($string, "ç", "c"); $estring = strtr($string, "ç", "c"); $estring = strtr($estring, "ð", "g"); $estring = strtr($estring, "G", "G"); $estring = strtr($estring, "þ", "s"); $estring = strtr($estring, "S", "S"); $estring = strtr($estring, "ý", "i"); $estring = strtr($estring, "I", "XX"); ********* $estring = strtr($estring, "ü", "u"); $estring = strtr($estring, "Ü", "U"); $estring = strtr($estring, "ö", "o"); $estring = strtr($estring, "Ö", "O"); return ($estring) ; } Capital i (not I but it shows at the line where you see the XX) is causing a problem. I can not translate. from cap i to I. Can you please suggest any help? ===== Mehmet Erisen http://www.erisen.com __________________________________________________ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com--- End Message ---
--- Begin Message ---Occasionally, I have a problem dealing with some of the special characters from text authored in MS Word, and then pasted into a web form. It seems that somewhere something bad happens and what eventually gets put into mysql via php is not correct. In particular, I have trouble with apostrophes and accented vowels. Is the solution to disallow users (it's an admin, so this is realistic) from pasting from MS Word? -- Jim Musil --------- Multimedia Programmer Nettmedia ------------- 212-629-0004 [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Jim, Have you tried a regular expression. Something like ereg_replace("[^[:alnum:]|[:space:]|[:punct:]@]", "", $string); to clean the string? Gerard O On Thu, 20 Dec 2001 17:02:58 -0500, jimtronic wrote: > >Occasionally, I have a problem dealing with some of the special >characters from text authored in MS Word, and then pasted into a web >form. It seems that somewhere something bad happens and what >eventually gets put into mysql via php is not correct. > >In particular, I have trouble with apostrophes and accented vowels. > >Is the solution to disallow users (it's an admin, so this is >realistic) from pasting from MS Word? > >-- >Jim Musil >--------- >Multimedia Programmer >Nettmedia >------------- >212-629-0004 >[EMAIL PROTECTED] > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > >--- End Message ---
--- Begin Message ---If a sesson_id is known, how can check if the session exists? Alex--- End Message ---
--- Begin Message ---Hi all, I've got an array in the global scope called $g_months which oddly enough contains the names of the months. Now when I try to import this into a function as global $g_months; it doesn't work. When php prints out the array as an option box I just wind up with no options. Any ideas why this is the case ? Am I doing something wrong ? Jason -- Hofstadter's Law : "It always takes longer than you expect, even when you take Hofstadter's Law into account."--- End Message ---
--- Begin Message ---Sounds quite odd - you may try an "echo(serialize($g_months))" in the function and see what you get... It may be that the code generating the option box has problems - this way you make sure $g_months is empty indeed. Bogdan Jason Rennie wrote: > Hi all, > > I've got an array in the global scope called $g_months which oddly enough > contains the names of the months. > > Now when I try to import this into a function as > > global $g_months; > > it doesn't work. When php prints out the array as an option box I just > wind up with no options. > > Any ideas why this is the case ? Am I doing something wrong ?--- End Message ---
--- Begin Message ---> Sounds quite odd - you may try an "echo(serialize($g_months))" in the > function and see what you get... It may be that the code generating the > option box has problems - this way you make sure $g_months is empty indeed. Thanks for that. IT appears to be a problem with the function itself, as the array is full of stuff. I guess the next question is, what am i doing wrong here, that lets it work with a local array but not a global one ? function html_option_months($selected_month) { global $g_months; echo(serialize($g_months)); $result = ""; while (list($key, $val) = each($g_months)) { $result .= html_option($key,$val, ($selected_month == $key)); } return $result; } Jason -- Hofstadter's Law : "It always takes longer than you expect, even when you take Hofstadter's Law into account."--- End Message ---
--- Begin Message ---Hello, Despite I already created this list a long time ago, only now I am announcing it as a general purpose forum for discussing matters related with Object Oriented Programming done in PHP. Everybody is invited and to join all you need to do is to send a message to [EMAIL PROTECTED] or go to the page http://groups.yahoo.com/group/php-objects/ . If you send the message to the above address I think you do not need to have a Yahoo account if you don't have one and don't want to subscribe to it. Regards, Manuel Lemos--- End Message ---