[PHP] Re: How to schedule a run for a php script.
Sorry this is late, If you do not have PHP compiled for command line use then use crontabs and wget. There are security issues, but some checks like the browser and IP address can be used to protect yourself a bit. HTH Henry Yc Nyon [EMAIL PROTECTED] wrote in message news:003201c25b3a$c2248800$7bcc97ca@domain... I want to run a php script at specific intervals, say every 4 hours. In Cold Fusion, i can use the CFschedule tag but how about php? TIA Nyon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] COOKIE Question.
I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't seem to retrieve data from them. First I set the cookie like so: setcookie (Access, Test_Value,time()+31536000); Then I check my Cookies in Netscape and I can see that I have the cookie stored. But when I go to the page that has print $HTTP_COOKIE_VARS[Access]; print $_COOKIE[$Access]; and even print $Access; I don't get the value set in the cookie, and I don't know why...any help, please? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] COOKIE Question.
First of all, the second try should be print $_COOKIE[Access]; with no second $. But, more importantly, I would reccomend you change the cookie name to access. This may not be the problem, but case in names seems to generally cause problems. Tom Ray wrote: I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't seem to retrieve data from them. First I set the cookie like so: setcookie (Access, Test_Value,time()+31536000); Then I check my Cookies in Netscape and I can see that I have the cookie stored. But when I go to the page that has print $HTTP_COOKIE_VARS[Access]; print $_COOKIE[$Access]; and even print $Access; I don't get the value set in the cookie, and I don't know why...any help, please? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: COOKIE Question.
First I set the cookie like so: setcookie (Access, Test_Value,time()+31536000); Then I check my Cookies in Netscape and I can see that I have the cookie stored. But when I go to the page that has print $HTTP_COOKIE_VARS[Access]; print $_COOKIE[$Access]; and even print $Access; What about $_COOKIE[Access] ??? Grtz Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] COOKIE Question.
I do the print $_COOKIE[Acccess]; and I still don't see any data print. Leif K-Brooks wrote: First of all, the second try should be print $_COOKIE[Access]; with no second $. But, more importantly, I would reccomend you change the cookie name to access. This may not be the problem, but case in names seems to generally cause problems. Tom Ray wrote: I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't seem to retrieve data from them. First I set the cookie like so: setcookie (Access, Test_Value,time()+31536000); Then I check my Cookies in Netscape and I can see that I have the cookie stored. But when I go to the page that has print $HTTP_COOKIE_VARS[Access]; print $_COOKIE[$Access]; and even print $Access; I don't get the value set in the cookie, and I don't know why...any help, please? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to choose a crypt-standard in crypt()?
Hi, is it possible to tell php which crypting it should use in crypt()? My problem: The program is running on a linux-server (of course) and there is DES available and MD5; crypt() uses MD5. At home I'm developing on a win98 machine and there seems only DES to be available. Of course it would be usefull to use both times the same encryption - but how to tell the server to use DES?? Thank's for any help, Uwe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix.
I'm posting this here to give this BUG attention. It's a pretty serious one for Win32 users, and it would be great if it could be fixed *very quickly* -- I posted this in the Bug Reports on PHP.net on May 27th, 2002. Here's the link: http://bugs.php.net/bug.php?id=17461 I need to use this function to perform certain *required* tasks on a Timeout -- however (and please read the Bug Report, before replying) the Timeout functionality of this function DOES NOT work on Win32 builds. If your a C/C++ / PHP contributor and have a moment to look into this -- it would be great -- I would love to see this fixed in release 4.2.4 !!! Thanks Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to choose a crypt-standard in crypt()?
Uwe Birkenhain wrote: Hi, is it possible to tell php which crypting it should use in crypt()? My problem: The program is running on a linux-server (of course) and there is DES available and MD5; crypt() uses MD5. At home I'm developing on a win98 machine and there seems only DES to be available. Of course it would be usefull to use both times the same encryption - but how to tell the server to use DES?? You should use a 2 character string as salt, to tell PHP that it should use DES instead of MD5. Quote from http://www.php.net/crypt: Some operating systems support more than one type of encryption. In fact, sometimes the standard DES-based encryption is replaced by an MD5-based encryption algorithm. The encryption type is triggered by the salt argument. At install time, PHP determines the capabilities of the crypt function and will accept salts for other encryption types. If no salt is provided, PHP will auto-generate a standard two character salt by default, unless the default encryption type on the system is MD5, in which case a random MD5-compatible salt is generated. PHP sets a constant named CRYPT_SALT_LENGTH which tells you whether a regular two character salt applies to your system or the longer twelve character salt is applicable. HTH Erwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] jpeg thumbnail errors
Warwick, There are different ways of compiling PHP which will determine which elements it can support. The first error you report shows that the particular build of PHP being used hasn't been compiled to create images from JPEGS. The remaining errors flow on from this as no image has been supplied to them. You would need to recompile PHP so that such support is offered - no mean feat from my own experiences. I gave up :-( Michael Egan -Original Message- From: Warwick Berg [mailto:[EMAIL PROTECTED]] Sent: 17 September 2002 00:08 To: [EMAIL PROTECTED] Subject: [PHP] jpeg thumbnail errors Hi all I know very little about PHP and am enquiring for a mate who's got some problems. Could some kind soul tell me what the errors below might mean? He's using PHP 4.1.2. I can supply the scripts that cause the error if that will help? He says they occur when a jpeg is being uploaded and created into a thumbnail. Thanks in advance. Thanks Warwick When a jpeg is being uploaded and created into a thumbnail: Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 167 Warning: Supplied argument is not a valid Image resource in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 168 Warning: Supplied argument is not a valid Image resource in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 169 Warning: Supplied argument is not a valid Image resource in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 171 Warning: ImageJpeg: No JPG support in this PHP build in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 172 Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 167 Warning: Supplied argument is not a valid Image resource in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 168 Warning: Supplied argument is not a valid Image resource in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 169 Warning: Supplied argument is not a valid Image resource in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 171 Warning: ImageJpeg: No JPG support in this PHP build in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line 172 Warning: Cannot add header information - headers already sent by (output started at /home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php:167) in /home/hsphere/local/home/nexcen0/datnet.org/classifieds/account.php on line 91 -- 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] Problem with REMOTE_ADDR
Whenever I use REMOTE_ADDR, it gives me the IP of the server. Of course, I am not interested in this and want the IP of the client. I put this code in to resolve it and it still didnt work. What am I doing wrong? Try HTTP_CLIENT_IP. It is set in some situations. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] COOKIE Question.
I'm having some issue's with $_COOKIE and $HTTP_COOKIE_VARS, I can't seem to retrieve data from them. First I set the cookie like so: setcookie (Access, Test_Value,time()+31536000); Try this: setcookie(Access, Test_Value,time()+31536000,/); - slash as 4th parametr. -- Krzysztof Dziekiewicz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] adding text to variables
-Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: 16 September 2002 20:44 I'm using PHP, MySql, DreamweaverMX, and PHAkt 2. I want to add a comma ( , ) to the end of a variable, but only if it exists in the database. (Meaning I don't want a comma with no variable.) I seem to remember a format that didn't use an if/else statement that looked something like: ?php echo xxx( $variable, \,) ? This may not be what you were thinking of exactly, but my usual approach to this is to use the ?: ternary operator thusly: echo isset($variable)?$variable,:''; or, to omit empty strings and zero values also: echo empty($variable)?'':$variable,; 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
[PHP] Re: Creating Images (.GIF) with PHP from Text?
Jason Caldwell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... How can I create a dynamic image with PHP? Here's what I want to do; I have a counter (kinda) on my website.. and this counter appears in a certain font -- which most computer systems will not have on their systems. So -- I want my PHP script to take a variable value; say 34,000 and save that as a .GIF or .JPG with a Blue Background, and White OCR A Extended 12point non-aliased Font. With the word Counter: in-front of the value. Is this possible with PHP (I hope...!) Or, is there a *command line* utility out there for the Win32 platform that does this? Yes Jason it possible if you have GD library (http://www.boutell.com/gd/) . but i'm not sure if it had in the Win32 platform. For the tutorial read this article http://www.phpbuilder.com/columns/rasmus19990124.php3. With my simple code but with unix host and use TTF font. (read another function at http://th2.php.net/manual/en/ref.image.php) ?PHP header (Content-type: image/png); $im = imagecreate (100, 20); $bg = imagecolorallocate ($im, 0, 0, 255); $white = imagecolorallocate ($im, 255, 255, 255); imagettftext ($im, 12, 0, 5, 14, $white, /home/your_directoty/fonts/ARIAL.TTF, Counter:34000); imagepng ($im); imagedestroy ($im); ? PS. Yes GIF is removed from gd because of copyright protect but you can use PNG. ? Thanks Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 17 Sep 2002 09:43:56 -0000 Issue 1590
php-general Digest 17 Sep 2002 09:43:56 - Issue 1590 Topics (messages 116569 through 116608): global vs. per-site php.ini settings 116569 by: Tomasz Orzechowski Re: Problem with REMOTE_ADDR 116570 by: Leif K-Brooks 116573 by: Kevin S. Dome 116574 by: Kevin Stone 116575 by: Chris Cook 116605 by: Krzysztof Dziekiewicz Search for a string between two end points 116571 by: Christopher J. Crane 116572 by: Kevin Stone jpeg thumbnail errors 116576 by: Warwick Berg 116577 by: John Holmes 116578 by: Warwick Berg 116582 by: Peter Houchin 116604 by: Michael Egan Regex for split() to split by , which is not in ()s? 116579 by: Leif K-Brooks Wanna crash PHP4 easily? 116580 by: George Hester Re: How to do Recurring Credit Card Charges? 116581 by: Jonathan Rosenberg Re: php's 27/10/2002 problem Important 116583 by: Jim Winstead Cookies 116584 by: Matt Giddings Re: Problems with php and qmail 116585 by: Rick Widmer can you get the name of an object from within it's own class? 116586 by: Simon McKenna Flash and PHP 116587 by: Resarch and Development 116588 by: Justin French A problem with Sessions: Developing and App inside PostNuke 116589 by: Ricardo Fitzgerald 116590 by: Ed Carp 116593 by: Kelly Firkins Re: How do I upgrade my version of PHP? 116591 by: David Robley Re: What unzip program to use? 116592 by: YC Nyon Browscap.ini new crashes PHP 4 newest 116594 by: George Hester ImageTTFText - absolute versus relative path names 116595 by: thomas.emde.scaleon.de Re: How to schedule a run for a php script. 116596 by: Henry COOKIE Question. 116597 by: Tom Ray 116598 by: Leif K-Brooks 116599 by: Erwin 116600 by: Tom Ray 116606 by: Krzysztof Dziekiewicz How to choose a crypt-standard in crypt()? 116601 by: Uwe Birkenhain 116603 by: Erwin REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix. 116602 by: Jason Caldwell Re: adding text to variables 116607 by: Ford, Mike [LSS] Re: Creating Images (.GIF) with PHP from Text? 116608 by: Paonarong Buachaiyo 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] -- ---BeginMessage--- Greetings, while it is easy to set the php-as-module settings on a per-vhost case using php_admin_flag and php_admin_value it seems to be much harder to achieve same for CGI. I have gotten PHP/CGI to read site-specific INI files, but it then subsequently ignores the 'global' INI settings set in the php.ini file referenced by --with-config-file-path ./configure parameter - which is exactly opposite to what I would like it to do. questions: - is there a way to make PHP/CGI parse _multiple_ .ini files if so - in what what overrides what, what is the sequence? - is there a way to 'include' a 'global' .ini file into the per-site files, other that of putting the statements from the global one in the site-specific one? i don't want to have to change every site-specific config when/if i need to change a 'global' setting (register_globals comes to mind) any help will be most appreciated, thank you in advance -- Tomasz Orzechowski [EMAIL PROTECTED] APK.net systems administration teamTO630 ---End Message--- ---BeginMessage--- Have you tried a web site such as www.getmyipaddress.com to see if it's on your end or your script's? Chris Cook wrote: Hello all, Whenever I use REMOTE_ADDR, it gives me the IP of the server. Of course, I am not interested in this and want the IP of the client. I put this code in to resolve it and it still didnt work. What am I doing wrong? Thanks for any help in advance, Chris if (getenv(HTTP_X_FORWARDED_FOR)) { $ip = getenv('HTTP_X_FORWARD_FOR'); $host = gethostbyaddr($ip); } else { $ip = getenv('REMOTE_ADDR'); $host = gethostbyaddr($ip); } _ Send and receive Hotmail on your mobile device: http://mobile.msn.com ---End Message--- ---BeginMessage--- This is the string I use to display a user their ip address, I am not sure if this is what you are looking for but I figured I would drop my 2 cents in. ?php echo $_SERVER['REMOTE_ADDR']? On Mon, 16 Sep 2002, Leif K-Brooks wrote: Have you tried a web site such as www.getmyipaddress.com to see if it's on your end or your script's? Chris Cook wrote: Hello all, Whenever I use REMOTE_ADDR, it gives me the IP of
Re: [PHP] can you get the name of an object from within it's ownclass?
It's not possible, imagine $firstname = new flashPash(); $secondname = $firstname; Now is the log name secondname.log or firstname.log. Use new property. Simon McKenna wrote: Hi all, I'm new to the php world and have just finished building my first class, It works pretty well, but i've run into a quandary adding debug code, my problem is thus: Many objects get created by this class, often in the same php script, and the debug log is an actual file. At the moment i'm naming the file after the name of the class, but what I would really like to do is name the log file after the name of the object instantiated from the class. e.g. class flashPash { $this-fpLog = fopen(flashPash.log,w+); function debugLog($LogMsg) { if (($this-debug == true) (!empty($this-fpLog))) fwrite($this-fpLog,$LogMsg.\n); } } $fpObject = new flashPash(); $fpObject-debug = true; so...is there a way I can get the variable name fpObject from within flashPash itself? i.e. so I can make the logfile fpObject.log instead of flashPash.log I realise it would be trivial to create a new property of the class to store the debug log filename, but i'm hoping I can avoid this? get_object_vars get_class appear to be heading in the right direction...but not quite...so...any ideas? is this actually possible? I kinda want to go down the hierarchical tree, instead of going up it :) thanks for any help. php rocks! si -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to send gzip content
Hi, this question is not about compressing HTML content, but SVG or VRML! i want to compress the entire output with gzip before sending it to the client. I found the function ob_start('ob_gzhandler') but this seems to compress only in special cases. (Actually I don't see if the content is compressed, how can I check this out?) But for my SVG or VRML content the plugins always support compressed files, even if the browser doesn't. Therefore I want to ensure sending compressed content. Then I found the gzencode -- Create a gzip compressed string function. I tried to use it like this: ?php ob_start(); ? SVG or VRML content ?php $sContent = ob_get_contents(); ob_end_clean(); echo gzencode($sContent); ? But now I get this error: Fatal error: Call to undefined function: gzencode() ... What do I need to do to use the Zlib Compression Functions? System: PHP Version 4.2.2 Windows NT 5.0 build 2195 Apache/1.3.24 HTTP_ACCEPT_ENCODING: gzip, deflate -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: What unzip program to use?
Don't think windowed version will work, but try to get some new 32-bit command line version that understands long filenames. YC Nyon wrote: My application lets users to upload a zip file into the server. Once done, i will use php execute function to run a command line to unzip the uploaded file into a sub-directory. I don't know what zip/unzip software to use. Will a old pkunzip (from dos days) work or can i get the winzip or pkzip (windows version) to work as a command line. TIa Nyon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can you get the name of an object from within it's own class?
even more... what if I create $c1 as a global instance and then $c1 as a local instance (inside a function) ? won't c1.log overwrite c1.log ? Elias Marek Kilimajer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It's not possible, imagine $firstname = new flashPash(); $secondname = $firstname; Now is the log name secondname.log or firstname.log. Use new property. Simon McKenna wrote: Hi all, I'm new to the php world and have just finished building my first class, It works pretty well, but i've run into a quandary adding debug code, my problem is thus: Many objects get created by this class, often in the same php script, and the debug log is an actual file. At the moment i'm naming the file after the name of the class, but what I would really like to do is name the log file after the name of the object instantiated from the class. e.g. class flashPash { $this-fpLog = fopen(flashPash.log,w+); function debugLog($LogMsg) { if (($this-debug == true) (!empty($this-fpLog))) fwrite($this-fpLog,$LogMsg.\n); } } $fpObject = new flashPash(); $fpObject-debug = true; so...is there a way I can get the variable name fpObject from within flashPash itself? i.e. so I can make the logfile fpObject.log instead of flashPash.log I realise it would be trivial to create a new property of the class to store the debug log filename, but i'm hoping I can avoid this? get_object_vars get_class appear to be heading in the right direction...but not quite...so...any ideas? is this actually possible? I kinda want to go down the hierarchical tree, instead of going up it :) thanks for any help. php rocks! si -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] can you get the name of an object from within it's own class?
Hehe why break your brain- give the class an id property - then you can have a getid method and do something like this $id = $this-getid(); $this-fpLog = fopen($id.log,w+); get_object_vars only seems to return properties so its not gonna help you. I'm currently working on an object thang as well and what ive done where I have whole bunch of similar objects is to chuck them into a name=value array as they get created so I can find them and fiddle with them again. I have no idea if that helps you, or if its even good coding practice (formal training - wots that?) hey im also a n00b so don't take my word on it - actual mileage may vary :-P Cheers Will -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] Sent: 17 September 2002 11:49 AM To: PHP Subject: Re: [PHP] can you get the name of an object from within it's own class? It's not possible, imagine $firstname = new flashPash(); $secondname = $firstname; Now is the log name secondname.log or firstname.log. Use new property. Simon McKenna wrote: Hi all, I'm new to the php world and have just finished building my first class, It works pretty well, but i've run into a quandary adding debug code, my problem is thus: Many objects get created by this class, often in the same php script, and the debug log is an actual file. At the moment i'm naming the file after the name of the class, but what I would really like to do is name the log file after the name of the object instantiated from the class. e.g. class flashPash { $this-fpLog = fopen(flashPash.log,w+); function debugLog($LogMsg) { if (($this-debug == true) (!empty($this-fpLog))) fwrite($this-fpLog,$LogMsg.\n); } } $fpObject = new flashPash(); $fpObject-debug = true; so...is there a way I can get the variable name fpObject from within flashPash itself? i.e. so I can make the logfile fpObject.log instead of flashPash.log I realise it would be trivial to create a new property of the class to store the debug log filename, but i'm hoping I can avoid this? get_object_vars get_class appear to be heading in the right direction...but not quite...so...any ideas? is this actually possible? I kinda want to go down the hierarchical tree, instead of going up it :) thanks for any help. php rocks! si -- 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] jpeg thumbnail errors
tir, 2002-09-17 kl. 09:53 skrev Michael Egan: You would need to recompile PHP so that such support is offered - no mean feat from my own experiences. I gave up :-( What's your exact problem, Michael? I'm so new to PHP4 (done nothing at all with PHP for the last 3-4 years, now I need to), that I'm reading, practicing reading etc. I don't even have any questions, yet, I'm so green. But I *do* know that I have compiled in jpg and png support to PHP 4.2.3 (phpinfo). On Red Hat 7.2 +++, './configure --with-gd' - and other things, of course. Best, Tony -- Tony Earnshaw Tha can allway tell a Yorkshireman, but tha canna tell 'im much. e-post: [EMAIL PROTECTED] www:http://www.billy.demon.nl gpg public key: http://www.billy.demon.nl/tonni.armor Telefoon: (+31) (0)172 530428 Mobiel: (+31) (0)6 51153356 GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981 3BE7B981 signature.asc Description: Dette er en digitalt signert meldingsdel
[PHP] class Problem
I create a Instance fo the Class MenueItem in Menue. I change the value of one of its variables. But when i call the function within MenueItem there seems not to be a value: The intresting thing is it works with Other variables, even i cant echo them, they have a value Thanks for help class Menue { function Makechilde($somvalue) { echo Next_ID: . $Parent_ID . BR; //Works $MI-Parent_ID = $Parent_ID; echo Parent_ID: . $MI-Parent_ID . BR;//correct output $MI-write(); } } class MenueItem { var $ID_Menue; var $Name; var $Parent_ID; var $Next_ID; var $Prev_ID; function Write() { echo Parent_ID: . $MI-Parent_ID . BR; //(no output at all!) } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] jpeg thumbnail errors
Tony, When I first began dabbling with PHP a year or more ago I did try to reconfigure PHP to gain support for PDF files. I was using SUSE 7.0 at the time. I was determined to get to grips with configuring packages such as PHP, Apache and MySQL but I seemed to run into one problem after another. I'm determined to have another go at this. With this in mind I've set one computer up with an older Linux distribution and intend to have a go at LFS over the next few weeks. Hopefully I will eventually overcome my fears of configuring software on a Linux system. Thanks for the help. Michael Egan -Original Message- From: Tony Earnshaw [mailto:[EMAIL PROTECTED]] Sent: 17 September 2002 11:44 To: Michael Egan Cc: [EMAIL PROTECTED] Subject: RE: [PHP] jpeg thumbnail errors tir, 2002-09-17 kl. 09:53 skrev Michael Egan: You would need to recompile PHP so that such support is offered - no mean feat from my own experiences. I gave up :-( What's your exact problem, Michael? I'm so new to PHP4 (done nothing at all with PHP for the last 3-4 years, now I need to), that I'm reading, practicing reading etc. I don't even have any questions, yet, I'm so green. But I *do* know that I have compiled in jpg and png support to PHP 4.2.3 (phpinfo). On Red Hat 7.2 +++, './configure --with-gd' - and other things, of course. Best, Tony -- Tony Earnshaw Tha can allway tell a Yorkshireman, but tha canna tell 'im much. e-post: [EMAIL PROTECTED] www:http://www.billy.demon.nl gpg public key: http://www.billy.demon.nl/tonni.armor Telefoon: (+31) (0)172 530428 Mobiel: (+31) (0)6 51153356 GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981 3BE7B981 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: class Problem
Hi, when you want to access class member variables prefix them with $this- , otherwise they will be treated as local vars. hope that helps. Elias David Eggler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I create a Instance fo the Class MenueItem in Menue. I change the value of one of its variables. But when i call the function within MenueItem there seems not to be a value: The intresting thing is it works with Other variables, even i cant echo them, they have a value Thanks for help class Menue { function Makechilde($somvalue) { echo Next_ID: . $Parent_ID . BR; //Works $MI-Parent_ID = $Parent_ID; echo Parent_ID: . $MI-Parent_ID . BR;//correct output $MI-write(); } } class MenueItem { var $ID_Menue; var $Name; var $Parent_ID; var $Next_ID; var $Prev_ID; function Write() { echo Parent_ID: . $MI-Parent_ID . BR; //(no output at all!) } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] class Problem
Hi there. Try doing it this way: You need to access the class's variable using the $this identifier e.g. class MenueItem { var $ID_Menue; var $Name; var $Parent_ID; var $Next_ID; var $Prev_ID; function Write() { echo Parent_ID: . $this-Parent_ID . BR;// Not $MI //(no output at all!) } Regards -Scott David Eggler wrote: I create a Instance fo the Class MenueItem in Menue. I change the value of one of its variables. But when i call the function within MenueItem there seems not to be a value: The intresting thing is it works with Other variables, even i cant echo them, they have a value Thanks for help class Menue { function Makechilde($somvalue) { echo Next_ID: . $Parent_ID . BR; //Works $MI-Parent_ID = $Parent_ID; echo Parent_ID: . $MI-Parent_ID . BR;//correct output $MI-write(); } } class MenueItem { var $ID_Menue; var $Name; var $Parent_ID; var $Next_ID; var $Prev_ID; function Write() { echo Parent_ID: . $MI-Parent_ID . BR; //(no output at all!) } } -- //// // Scott Houseman // // Jam Warehouse http://www.jamwarehouse.com/ // // Smart Business Innovation // // +27 21 4477440 / +27 82 4918021// //// -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Illegal characters in HTML form element names.
-Original Message- From: Jared Williams [mailto:[EMAIL PROTECTED]] Sent: 11 September 2002 14:03 To: [EMAIL PROTECTED] Subject: [PHP] Illegal characters in HTML form element names. Hi, The HTML standard defines the set of characters that are valid in form element names. It does not include [ or ] Incorrect. I used to think that, but was corrected by a kindly member of the PHP development team. If you take a good look at the HTML 4.0 specification, the name attribute is defined as CDATA, which basically means it can contain any character. and yet this seems to be the only way to get a set of form elements grouped into an array for server side processing. Why doesnt PHP do (Perl/ASP) automatically create an array when there is more than one form element with the same name in the post/get data? So that there will be no uncertainty over whether a particular named element will be an array or a scalar, thus avoiding the need to spatter is_array() tests (or (array) casts) all over the place. However, the HTML 4.0 spec also says of name that This attribute has been included for backwards compatibility. Applications should use the id attribute to identify elements, and the id attribute *is* restricted as you mention -- so perhaps this is still an issue to be resolved in the future. (I haven't checked what the XHTML spec says!) 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: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix.
I'm not sure if that's a bug, it's more of a feature request. ---John Holmes... -Original Message- From: Jason Caldwell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 3:24 AM To: [EMAIL PROTECTED] Subject: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix. I'm posting this here to give this BUG attention. It's a pretty serious one for Win32 users, and it would be great if it could be fixed *very quickly* -- I posted this in the Bug Reports on PHP.net on May 27th, 2002. Here's the link: http://bugs.php.net/bug.php?id=17461 I need to use this function to perform certain *required* tasks on a Timeout -- however (and please read the Bug Report, before replying) the Timeout functionality of this function DOES NOT work on Win32 builds. If your a C/C++ / PHP contributor and have a moment to look into this -- it would be great -- I would love to see this fixed in release 4.2.4 !!! Thanks Jason -- 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] COOKIE Question.
I do the print $_COOKIE[Acccess]; and I still don't see any data print. Did you typo in your code like you did here?? Try to dump the whole $_COOKIE[] array and see what's in it. print_r($_COOKIE); Did you mention what version of PHP you were using? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Illegal characters in HTML form element names.
Hmm http://www.w3.org/TR/html4/types.html#type-name 'ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:), and periods (.).' Seems to me, the rules for valid IDs NAMEs are the same... -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]] Sent: 17 September 2002 12:43 To: 'Jared Williams'; [EMAIL PROTECTED] Subject: RE: [PHP] Illegal characters in HTML form element names. -Original Message- From: Jared Williams [mailto:[EMAIL PROTECTED]] Sent: 11 September 2002 14:03 To: [EMAIL PROTECTED] Subject: [PHP] Illegal characters in HTML form element names. Hi, The HTML standard defines the set of characters that are valid in form element names. It does not include [ or ] Incorrect. I used to think that, but was corrected by a kindly member of the PHP development team. If you take a good look at the HTML 4.0 specification, the name attribute is defined as CDATA, which basically means it can contain any character. and yet this seems to be the only way to get a set of form elements grouped into an array for server side processing. Why doesnt PHP do (Perl/ASP) automatically create an array when there is more than one form element with the same name in the post/get data? So that there will be no uncertainty over whether a particular named element will be an array or a scalar, thus avoiding the need to spatter is_array() tests (or (array) casts) all over the place. However, the HTML 4.0 spec also says of name that This attribute has been included for backwards compatibility. Applications should use the id attribute to identify elements, and the id attribute *is* restricted as you mention -- so perhaps this is still an issue to be resolved in the future. (I haven't checked what the XHTML spec says!) 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: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix.
Hey, Jason, since you really need this BUG fixed, and the PHP developers would welcome good, well-documented, and tested code ... Why not devote some of your precious time to helping them along? If _you_ write, document, and test the code, and then pass the code to the development team you'll stand a much better chance of getting it included in a future version - along with solving your current problem _and_ getting your name in the list of contributors. Mark C. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 8:12 AM To: 'Jason Caldwell'; [EMAIL PROTECTED] Subject: RE: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix. I'm not sure if that's a bug, it's more of a feature request. ---John Holmes... -Original Message- From: Jason Caldwell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 3:24 AM To: [EMAIL PROTECTED] Subject: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix. I'm posting this here to give this BUG attention. It's a pretty serious one for Win32 users, and it would be great if it could be fixed *very quickly* -- I posted this in the Bug Reports on PHP.net on May 27th, 2002. Here's the link: http://bugs.php.net/bug.php?id=17461 I need to use this function to perform certain *required* tasks on a Timeout -- however (and please read the Bug Report, before replying) the Timeout functionality of this function DOES NOT work on Win32 builds. If your a C/C++ / PHP contributor and have a moment to look into this -- it would be great -- I would love to see this fixed in release 4.2.4 !!! Thanks Jason -- 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
[PHP] Re: error: loading extensions / php_xslt.dll on win32
hi horst, i think your're problem is that you'll need to get the new libexpat.dll provided from james clark. visit http://sourceforge.net/projects/expat/ to get the latest expat v1.95.5 (which includes the new libexpat.dll - the older version was called: expat.dll, provided with expat v1.95.2) you probably have a newer php4ts.dll / php_xslt.dll (came up with new php 4.2.3) on your machine telling dependancy checker to call for libexpat.dll, so don't worry. good luck! additionaly, i didn't found an official installation procedure yet, because i think, the php.net core team supports php on linux with more power, than php on win32 systems. due to this, the documentation process for php on linux is always two steps ahead. greetzalot, - marco mail[EMAIL PROTECTED]/mail urlhttp://www.remslakecity.de/url - Original Message - From: HL [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:12 PM Subject: Re: error: loading extensions / php_xslt.dll on win32 I get this 'module not found'-errors all the time and could not find a solution up to now. i tried everything this group recommends, but the problem gets weirder and weirder. I even tried DependencyMaker and it says a libexpat.dll is missing. This dll is not included to the php-4.2.3-distribution. (somebody suggested expat.dll will do - NOT on my machine) i found a rersolution to the php_xslt.dll extension installting problem you're lucky! in your php.ini, you have to write: extension_dir = c:/php/extensions would be d:/php/extensions on my machine. does NOT solve the problem. copy the 4 following .dll's to your windows/system32 directory - php/php4ts.dll - php/extensions/php_xslt.dll - php/dlls/expat.dll - php/dlls/sablot.dll all done. does NOT solve the problem. I am using IIS 5 on WIN2000/SP3 . But this is definitely not a server-related problem i think. To me it seems very much as a bug in the php-module-implementation or in the php_xslt.dll itself. Btw: is there somehing like an official installation procedure? any help would be very appreciated. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] UCD-SNMP 4.2.5 and PHP-SNMP
I have an application that uses php's snmp support to gather some information. I run several servers that are using this application and all of the servers are running redhat-7.2. In redhat 7.2 the OS initially ships with ucd-snmp-4.2.1-7.i386.rpm. This works fine with my applications. I make every effort to keep these servers patched and up to date, and unfortunately redhat has released some ucd-snmp patches that bring the version up to ucd-snmp-4.2.5-7.72.0.i386.rpm. When I try to install that version of snmp, the snmp support breaks in php. The output is completely whacked, and I wish I could explain more, but generally output that used to poll correctly now shows 0 and certain items show the OIDspacevalue instead of just the value. So I'll have a column in the app that has (ucd-snmp 4.2.1 output) valuea 25 (ucd-snmp 4.2.5 output) valuea transmission.1.3.5.blah 2 The output is all over the place. One thing that I do know has changed with this release of ucd-snmp is that it now comes with libwrap support. Any way that could affect it. I've tried recompiling php with the new includes. Of course there are some patches that are dependent upon this working, so if anyone has any insight on how to proceed I would appreciate it. Any suggestions on how to get the most up to date ucd-snmp patches. At this time my option is not to upgrade and it doesn't appear that there is a bug fix or anything else that is required in that newest release, however, the new redhat-7.3 boxes that I need to deploy in place of the redhat-7.2 boxes are going to probably have the same problem. Thanks, Brian Seppanen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() question
Hi, I am trying to send an email by using the function mail(). Although I use in a form of mail($to, $subject, $message, $headers), it is giving this error: Failed to Connect So I think I am missing something ... Can anybody help me ?.. thanks alot meltem demirkus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() question
Meltem What is you system set up? OS etc? Cheers John Wards SportNetwork.net - Original Message - From: Meltem Demirkus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:35 PM Subject: [PHP] mail() question Hi, I am trying to send an email by using the function mail(). Although I use in a form of mail($to, $subject, $message, $headers), it is giving this error: Failed to Connect So I think I am missing something ... Can anybody help me ?.. thanks alot meltem demirkus -- 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] mail() question
windows 2000 by the way my whole code is this: ? $msg = Sender Name:\t$_POST[sender_name]\n; $msg .= Sender E-Mail:\t$_POST[sender_email]\n; $msg .= Message:\t$_POST[message]\n\n; $recipient = mailto:[EMAIL PROTECTED]; $subject = Web Site Feedback; $mailheaders = From: My Web Site \n; $mailheaders .= Reply-To: $_POST[sender_email]\n\n; mail($recipient, $subject, $msg, $mailheaders); echo HTMLHEADTITLEForm Sent!/TITLE/HEADBODY; echo H1 align=centerThank You, $_POST[$sender_name]/H1; echo P align=centerYour feedback has been sent./P; echo /BODY/HTML; ? - Original Message - From: John Wards [EMAIL PROTECTED] To: Meltem Demirkus [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 4:40 PM Subject: Re: [PHP] mail() question Meltem What is you system set up? OS etc? Cheers John Wards SportNetwork.net - Original Message - From: Meltem Demirkus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:35 PM Subject: [PHP] mail() question Hi, I am trying to send an email by using the function mail(). Although I use in a form of mail($to, $subject, $message, $headers), it is giving this error: Failed to Connect So I think I am missing something ... Can anybody help me ?.. thanks alot meltem demirkus -- 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] mail() question
Have you set up you php.ini file correctly? You need to set up your SMTP settings and your sendmail_from settings John - Original Message - From: Meltem Demirkus [EMAIL PROTECTED] To: John Wards [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:43 PM Subject: Re: [PHP] mail() question windows 2000 by the way my whole code is this: ? $msg = Sender Name:\t$_POST[sender_name]\n; $msg .= Sender E-Mail:\t$_POST[sender_email]\n; $msg .= Message:\t$_POST[message]\n\n; $recipient = mailto:[EMAIL PROTECTED]; $subject = Web Site Feedback; $mailheaders = From: My Web Site \n; $mailheaders .= Reply-To: $_POST[sender_email]\n\n; mail($recipient, $subject, $msg, $mailheaders); echo HTMLHEADTITLEForm Sent!/TITLE/HEADBODY; echo H1 align=centerThank You, $_POST[$sender_name]/H1; echo P align=centerYour feedback has been sent./P; echo /BODY/HTML; ? - Original Message - From: John Wards [EMAIL PROTECTED] To: Meltem Demirkus [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 4:40 PM Subject: Re: [PHP] mail() question Meltem What is you system set up? OS etc? Cheers John Wards SportNetwork.net - Original Message - From: Meltem Demirkus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:35 PM Subject: [PHP] mail() question Hi, I am trying to send an email by using the function mail(). Although I use in a form of mail($to, $subject, $message, $headers), it is giving this error: Failed to Connect So I think I am missing something ... Can anybody help me ?.. thanks alot meltem demirkus -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() question
You need to edit you php.ini file Depending on you instlation it should be fount in either c:\windows\php.ini or c:\winnt\php.ini If it is not search for php.ini Then edit the values: [mail function] ; For Win32 only. SMTP = localhost ; For Win32 only. sendmail_from = [EMAIL PROTECTED] Your SMTP setting would be what ever you send your mail with currently. Looking at you email address somthing like mail.momentum-dmt.com and your sendmail_from setting would just be your email address Cheers John - Original Message - From: Meltem Demirkus [EMAIL PROTECTED] To: John Wards [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:55 PM Subject: Re: [PHP] mail() question how can I do them?..I am sorry maybe I am asking silly questions .It is because I am new on php... thnaks .. meltem - Original Message - From: John Wards [EMAIL PROTECTED] To: Meltem Demirkus [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 4:50 PM Subject: Re: [PHP] mail() question Have you set up you php.ini file correctly? You need to set up your SMTP settings and your sendmail_from settings John - Original Message - From: Meltem Demirkus [EMAIL PROTECTED] To: John Wards [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:43 PM Subject: Re: [PHP] mail() question windows 2000 by the way my whole code is this: ? $msg = Sender Name:\t$_POST[sender_name]\n; $msg .= Sender E-Mail:\t$_POST[sender_email]\n; $msg .= Message:\t$_POST[message]\n\n; $recipient = mailto:[EMAIL PROTECTED]; $subject = Web Site Feedback; $mailheaders = From: My Web Site \n; $mailheaders .= Reply-To: $_POST[sender_email]\n\n; mail($recipient, $subject, $msg, $mailheaders); echo HTMLHEADTITLEForm Sent!/TITLE/HEADBODY; echo H1 align=centerThank You, $_POST[$sender_name]/H1; echo P align=centerYour feedback has been sent./P; echo /BODY/HTML; ? - Original Message - From: John Wards [EMAIL PROTECTED] To: Meltem Demirkus [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 4:40 PM Subject: Re: [PHP] mail() question Meltem What is you system set up? OS etc? Cheers John Wards SportNetwork.net - Original Message - From: Meltem Demirkus [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:35 PM Subject: [PHP] mail() question Hi, I am trying to send an email by using the function mail(). Although I use in a form of mail($to, $subject, $message, $headers), it is giving this error: Failed to Connect So I think I am missing something ... Can anybody help me ?.. thanks alot meltem demirkus -- 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 -- 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] Test
Test message -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() question
is that definatly your SMTP mail connection? I notice that you are using outlook. Do this to make sure: Click tools(in outlook) then Accounts the click on your default acount the click properties. CLick the server tab then note down the value in the Out going mail server box and use this in your SMTP seting in php.ini. Also have you restarted apache(or what ever server u are using) since you changed the php.ini file - Original Message - From: Meltem Demirkus [EMAIL PROTECTED] To: John Wards [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 3:14 PM NCOMP Subject: Re: [PHP] mail() question Date: Tue, 17 Sep 2002 17:15:15 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 I changed it like this... but still not conneting problem occurs . [mail function] ; For Win32 only. SMTP = mail.momentum-dmt.com ; For Win32 only. sendmail_from = [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Test
It looks it worked, but php.tests is there for that. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Tom Ray [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Test message -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] stripslahes() | Common pitfalls?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm using cookies to pre fill a form and, I can't work out why I can't get the stripslashes() function to work? Are there any common pitfalls you can think of, I've tried just about everything... - -- Nick Wilson // www.tioka.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9h0AHHpvrrTa6L5oRAul4AKCqT9chEyTRVhuW3hK5vAlP/kaF/wCgrRxg vBIkxWV9akJqQUDiKEmyzdI= =Tir9 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] stopping repeated posts to a Bulletin Board
What is the best way to avoid the repeated comment/post syndrome caused by the user clicking the submit button one too many times because he/she did not wait for the browser to return a confirmation page or the script took too long to execute. Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stopping repeated posts to a Bulletin Board
Hi, What is the best way to avoid the repeated comment/post syndrome caused by the user clicking the submit button one too many times The canonical way is to attach a token to the form (a random number will usually do) and insert that into the table along with the comment/post, after checking first to make sure that a row containing this token isn't already in the table. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stopping repeated posts to a Bulletin Board
Use some javascritp to blank out the submit button when its clicked. is a quick and easyway. Also try storing the sent data in sessions and compairing any new data sent to the previous data. John Wards SportNetwork.net - Original Message - From: Resarch and Development [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 2:52 PM Subject: [PHP] stopping repeated posts to a Bulletin Board What is the best way to avoid the repeated comment/post syndrome caused by the user clicking the submit button one too many times because he/she did not wait for the browser to return a confirmation page or the script took too long to execute. 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
RE: [PHP] stopping repeated posts to a Bulletin Board
What is the best way to avoid the repeated comment/post syndrome caused by the user clicking the submit button one too many times because he/she did not wait for the browser to return a confirmation page or the script took too long to execute. Along with the other suggestions, You can use a processing page that doesn't output anything and just does the insert and then redirects to a success page. Then, if they hit refresh, then it will only refresh the success page, not the processing page. You can also restrict the user to only posting once every XX seconds. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stripslahes() | Common pitfalls?
I'm using cookies to pre fill a form and, I can't work out why I can't get the stripslashes() function to work? Are there any common pitfalls you can think of, I've tried just about everything... Show some code. What's the actual value of the cookie before you stripslashes() it? I'll guess that you're not assigning the result to anything. Are you doing this? stripslashes($_COOKIE['value']); instead of $new_value = stripslashes($_COOKIE['value']); ?? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: alphabetical order?
Hello Rudolf, Thank you for responding to my post, I really appreciate it. I ran the script you sent me, and then I tried looking up the syntax to try to figure out what it means. As it would be pointless for me just to take suggestions that people send me and then not learn what they mean. The resulkt of your code does in fact alphabatize the teams in the select list, however there is a little problem with the end result. your code: ?php include (C:\Program Files\EasyPHP\www\florentiaviola.com\control\config.php); $fd = fopen ($teams, r); while (!feof ($fd)) { $list = fgets($fd, 4096); $squads = explode(|, $list); $alphabetical[] = $squads[1]; } sort ($alphabetical); reset ($alphabetical); for ($i = 0; $i = count($alphabetical) - 1; $i++) { echo 'OPTION VALUE='. $alphabetical[$i][0].''.$alphabetical[$i].'/OPTION'.\n; } fclose ($fd); ? returns the follwoing html: OPTION VALUE=AAglianese/OPTION OPTION VALUE=BBrescello/OPTION OPTION VALUE=CCasteldisangro/OPTION OPTION VALUE=CCastelnuovo/OPTION OPTION VALUE=FFano/OPTION OPTION VALUE=FFlorentia Viola/OPTION OPTION VALUE=FForlì/OPTION OPTION VALUE=GGrosseto/OPTION OPTION VALUE=GGualdo/OPTION It is returning the first letter of $squads[1]. so the id variable is getting lost.That variable is $squads[0]. So in effect that vairable is getting lost because when i modify the line echo 'OPTION VALUE='. $alphabetical[$i][0].''.$alphabetical[$i].'/OPTION'.\n; to read echo 'OPTION VALUE='. $squads[0].''.$alphabetical[$i].'/OPTION'.\n; then the HTML output becomes OPTION VALUE=19Aglianese/OPTION OPTION VALUE=19Brescello/OPTION OPTION VALUE=19Casteldisangro/OPTION OPTION VALUE=19Castelnuovo/OPTION OPTION VALUE=19Fano/OPTION OPTION VALUE=19Florentia Viola/OPTION OPTION VALUE=19Forlì/OPTION OPTION VALUE=19Grosseto/OPTION OPTION VALUE=19Gualdo/OPTION In other words what I am trying to do is something to the effect of $alphabetical = $squads[1][0]. Then I want to sort that only by $squads[1]. When the html is returned, I want to be able to echo the $squads[0] as the Value of the select dropdown. Thanks again, -Tree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stripslahes() | Common pitfalls?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then John Holmes declared Show some code. What's the actual value of the cookie before you stripslashes() it? Well, that got me on the right track ;-) Now I do this: setcookie('val', stripslashes($_POST['val']); and all is cool! Thanks very mucn... - -- Nick Wilson // www.tioka.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD4DBQE9h0y8HpvrrTa6L5oRAhd6AJY4UEp63qtfp25j/ZghCNT7ffCPAKCmdyML iGLvRSAh7RSiHSuL60rdTw== =YIVc -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Illegal characters in HTML form element names.
-Original Message- From: Jared Williams [mailto:[EMAIL PROTECTED]] Sent: 17 September 2002 13:20 Hmm http://www.w3.org/TR/html4/types.html#type-name 'ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:), and periods (.).' Seems to me, the rules for valid IDs NAMEs are the same... But the value of the name attribute of a form element is not a NAME token. http://www.w3.org/TR/html401/interact/forms.html#adef-name-FORM 'name = cdata [CI] 'This attribute names the element so that it may be referred to from style sheets or scripts.' followed by the note I quoted previously. On the other hand, the value of the id attribute *is* a NAME token, so is restricted as per your quote above. 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: [PHP] stopping repeated posts to a Bulletin Board
The page that actually validates the user input and inserts into the database shouldn't actually be a page that gets sent to the browser -- it should be a script with no output, which then redirects to a thanks page. That way there is no chance of the user hitting refresh and double posting... of course they can still click back and submit again, but you remove the biggest problem, hitting refresh. form.php: user fills in and clicks submit validate.php validates form content if good, insert, and redirect with header(Location: thanks.php) else if bad, show the form again With a bit of work, this can all happen within one php file. Clicking submit twice, or click back and re-submitting is a little trickier, but you could always search the database's most recent 2-5 rows, to see if there is identical data (email address, username, heading, message text, etc) before inserting... if okay, cool, otherwise, spit out an error. Justin French on 17/09/02 11:52 PM, Resarch and Development ([EMAIL PROTECTED]) wrote: What is the best way to avoid the repeated comment/post syndrome caused by the user clicking the submit button one too many times because he/she did not wait for the browser to return a confirmation page or the script took too long to execute. Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagettftext function does not handle combining character properly
We installed php 4.2.2 with freetype 1.3.1 on our solaris 2.8 machine. We are using function imagettftext to convert UTF8 string to image file for Internet display. However, it seems that this function does not handle the combining characters properly. For instance, the sequence of unicode characters U+0061(a) and U+0308 (combining diacritics) is display as two characters: a and a square indicating not displayable. The correct result should be a character identical to U+00E4. We are wondering where the normalization is handled in this case, freetype library or inside imagettftext php function? Is it a bug in freetype library? If not, how can we fix it? Thanks, Ziying Sherwin P.S. I am not on the mailing list, please send your response to [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagettftext function does not handle combining characterproperly
That's done in Freetype. First thing I would try would be upgrading to GD2/Freetype2 and see if it is handled better with that combination. -Rasmus On Tue, 17 Sep 2002, Ziying Sherwin wrote: We installed php 4.2.2 with freetype 1.3.1 on our solaris 2.8 machine. We are using function imagettftext to convert UTF8 string to image file for Internet display. However, it seems that this function does not handle the combining characters properly. For instance, the sequence of unicode characters U+0061(a) and U+0308 (combining diacritics) is display as two characters: a and a square indicating not displayable. The correct result should be a character identical to U+00E4. We are wondering where the normalization is handled in this case, freetype library or inside imagettftext php function? Is it a bug in freetype library? If not, how can we fix it? Thanks, Ziying Sherwin P.S. I am not on the mailing list, please send your response to [EMAIL PROTECTED] -- 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] Redirecting - header location - sometimes not work
I have the php script with the command Header(Location: https://$SERVER_NAME$path;); which redirect from the script file1.php to the script file2.php. If I fill the form in the www page file1.php and click the Submit button, the script file1.php save the information to database and then redirect to the page file2.php. This redirecting is functional, but not always. In some www browser the first redirecting not work, and if I return to the www page file1.php and if I click the Submit button again, the redirecting working. Do you have some help, please? (Using Linux, Apache/1.3.23 PHP 4.1.2) Much thanks! Jana Konickova -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] stopping repeated posts to a Bulletin Board
On 2002. szeptember 17. 15:52, Resarch and Development wrote: What is the best way to avoid the repeated comment/post syndrome caused by the user clicking the submit button one too many times because he/she did not wait for the browser to return a confirmation page or the script took too long to execute. Hello! The best way i think is not the 'redirecting to success page' solsution. It may be flooded with back button. It's easy solution to add a unique id to every generated form in a hidden field. Unique id may be generated with uniqid() function or with apaches UNIQUE_ID envireoment variable, if mod_unique_id compiled. Check $_SERVER['UNIQUE_ID']; Before storing data you can check the presence og that id somewhere (separate used-id storing table, or in an additional field in your target table). If check shows that ID was used, do nothing with data, if that check is negative, store the data. I prefer separate dup-store table, with an expire_date field. Expiration time may be from half our to a week. You can purge old ID-s from cron daily or more frequently. I have an oop class named dupkiller to handle that problem, if you interested. Heilig (Cece) Szabolcs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix.
It's a bug. spoke to Rasmus at some length about just before i posted it in the bug report. The online help page is inaccurate in describing the full functionality of the function: http://www.php.net/manual/en/function.register-shutdown-function.php REGISTER_SHUTDOWN_FUNCTION() is suppose to kick-off when any one of the following things happen -- Exit, Error, TIMEOUT or User Abort. According to Rasmus, the TIMEOUT functionality of this function works fine under Linux -- however, it's not working under Win32 ! There apparently is another bug with this function -- you are suppose to be able to call more than one REGISTER_SHUTDOWN_FUNCTION(), and they are suppose to executed in-order... some people are reporting that only the first encountered REGISTER_SHUTDOWN_FUNCTION() is executed, then the script exits. Someone needs to go through this function, pretty thoroughly, and get it working correctly. Being able to run code on a timeout, user-abort or error is critical. Jason John Holmes [EMAIL PROTECTED] wrote in message 000401c25e43$7237e240$b402a8c0@mango">news:000401c25e43$7237e240$b402a8c0@mango... I'm not sure if that's a bug, it's more of a feature request. ---John Holmes... -Original Message- From: Jason Caldwell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 3:24 AM To: [EMAIL PROTECTED] Subject: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix. I'm posting this here to give this BUG attention. It's a pretty serious one for Win32 users, and it would be great if it could be fixed *very quickly* -- I posted this in the Bug Reports on PHP.net on May 27th, 2002. Here's the link: http://bugs.php.net/bug.php?id=17461 I need to use this function to perform certain *required* tasks on a Timeout -- however (and please read the Bug Report, before replying) the Timeout functionality of this function DOES NOT work on Win32 builds. If your a C/C++ / PHP contributor and have a moment to look into this -- it would be great -- I would love to see this fixed in release 4.2.4 !!! Thanks Jason -- 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] new PHP chat room (with Flash interface)
here's a chat room that I made in PHP/MySQL with a Flash 5 front-end. All the other PHP chat rooms that I've found have an annoying click every few seconds when the webpage is refreshed. http://www.tufat.com/chat/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] new PHP chat room (with Flash interface)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Darren Gates declared here's a chat room that I made in PHP/MySQL with a Flash 5 front-end. All the other PHP chat rooms that I've found have an annoying click every few seconds when the webpage is refreshed. http://www.tufat.com/chat/ Well I just get some dodgy html code showing up on your demo pages... - -- Nick Wilson // www.tioka.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9h2VcHpvrrTa6L5oRAlF4AJ0bh2uoBHIXFgYJgnD5BVwjdRrnlwCglXxQ qtS4MmCBNkcCUc+ESs8/13E= =wZOc -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: A problem with Sessions: Developing and App inside PostNuke
I also use the phpnuke. But I am gonna drop the whole thing. It causes nothing but trouble. You have to follow all the rules (not to mention the copyright lines) and can't find much information on them so you need to start and learn the nuke style. Ok this is not a real problem but since a couple off weeks my nukesite has totally gone mad. I didn't receive any new members and new emails in twee weeks so i figured out the thing is bugged. Maybe cuz I put some fixes on there and some addons. Well I am fed up with the nuke and I am going to write something that meets my needs better. The way I like it (or the way I am able to write it). Since I am a newbie it's gonna take me some time to figure out all the hard pieces off code. If you are interested in helping designing a hiphop communtiy site. You can mail me at [EMAIL PROTECTED] also visit my site at www.hiphhopstore.be Kelly Firkins [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED]... Ricardo, Your problem is with PHP, look up in that manual for Header already sent Kelly On Monday, September 16, 2002, at 10:42 PM, Ricardo Fitzgerald wrote: Hi to all, I'm developing different applications using PHP and MySQL within PNuke, because PN API is very complex and I didn't have time to deeply study it I decide the best aproach to my application, was to create an independent user (from that in PN member), with it's own session and login method, so I developed such a system and it works outside PostNuke, but because PN creates their own sessions, when I add PN header and footer, and try to execute my app I got Warning: Cannot Session cookie - headers already sent by ... and Warning: Cannot send Session cache limiter - headers already sent ..., I understand this happened because this is within PN there are already headers sent and that's why when I call my session I got this error message, so my question is if there is a way to overcome this ? Regards, Rick AXIS Computers - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] retrieving custom email headers
Can PHP retrieve custom headers? If, for example, someone sends me an email with the custom header Internet-card:, can I get it's value via PHP? The imap_header, AFAIK, gets only prespecified headers (fromaddress, Subject, date, etc.). I have tried searching via google but all I got were about adding custom headers, not getting them. - AJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Large uploads
Hi, I have been trying to upload files using PHP 4.1.2. Everything works OK until the filesize gets above 10MB. I have set all the paramaters upload filesize and max postsize in PHP and Apache ini-files but it still doesn't work. The server seems to just drop the connection since IE just tells me that the server didn't respond. Please help. Rickard. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: stopping repeated posts to a Bulletin Board
Resarch And Development [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What is the best way to avoid the repeated comment/post syndrome caused by the user clicking the submit button one too many times because he/she did not wait for the browser to return a confirmation page or the script took too long to execute. Assign a unique key to each submission form (as a hiiden field). Once the form is submitted, you can stop any replays by testing to see if the key was already used or not. -- --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array trim
Hello, is their a way to go through the $_POST array and do a str_replace on each one so i do not have to do this $_POST[]=str_replace(,$_POST[]); to each of the POST variables? Thanks Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] any new form builders
Hello, Are there any new scripts out there that will build an html from based on the schema of a database (mysql, postgresql). hate to be lazy but this is getting repetative. -- Vincent Stoessel Linux Systems Developer vincent xaymaca.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Redirecting - header location - sometimes not work
It's curious that it should be working some times and not others. This may be overkill but you might try a double redundent redirect where if the Header() function does not do the job then the script falls down into a Javascript which attempts the same thing. ? .. rest of script.. header(Location:$SERVER_NAME$path); ? s cript top.location.href = ?echo https://$SERVER_NAME$path;?; /s cript -Kevin - Original Message - From: jana konickova [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 17, 2002 10:03 AM Subject: [PHP] Redirecting - header location - sometimes not work I have the php script with the command Header(Location: https://$SERVER_NAME$path;); which redirect from the script file1.php to the script file2.php. If I fill the form in the www page file1.php and click the Submit button, the script file1.php save the information to database and then redirect to the page file2.php. This redirecting is functional, but not always. In some www browser the first redirecting not work, and if I return to the www page file1.php and if I click the Submit button again, the redirecting working. Do you have some help, please? (Using Linux, Apache/1.3.23 PHP 4.1.2) Much thanks! Jana Konickova -- 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] callbacks to methods inside a class/object
Is there a clean way to make use of PHP builtins that use callbacks and point those call backs to a method inside the class/object: A good example would be: ... class XMLClass { var $parser; function XMLClass() { $this-parser = xml_parser_create(); xml_parser_set_option($this-parser, XML_OPTION_CASE_FOLDING, TRUE); xml_set_element_handler($this-parser, $this-start, $this-end); xml_set_character_data_handler($this-parser, $this-data); } function goodbye() { // a manual destructor xml_parser_free($this-parser); // other things possibly too } function start($p2, $name, $attr) { // do things here } function data($p2, $data) { // do some more here } function end($p2, $name) { // do even more things here } [... and so on ...] ... But since there is no way to set a callback to $this-[function_name] one must create a global function that uses a global object and passes things to the method inside the class.. Is the a way to address this? or perhaps a better way to deal with callback function names? --Douglas Marsh _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] strange bug(?) when opening lots of files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi One of my pages opens ~100 files, reads from them, and closes them, (only one file open at a time). The problem is that the page just dies mid-way through execution - no errors, no segfault, it just dies and returns a blank page to the user. the problem goes away if I reduce the number of files accessed. its a build of PHP 4.1.2 on Linux running as an Apache module, (if it makes any odds, the configure line is below). I can't see anything on bugs.php.net about this - has anyone seen this before (and, of course, the crucial question; what can I do to fix it?) Any help appreciated, Thanks - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc './configure' '--with-gd' '--enable-gd-native-ttf' '--enable-track-vars' '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar' '--with-zlib' '--prefix=/opt/php-4.1' '--with-config-file-path=/usr/local/etc/httpd/conf' '--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr' '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml' '--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp' '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl' '--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6' '--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr' '--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr' '--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv' '--with-kerberos' '--enable-xslt' '--with-xslt-sablot' '--with-freetype-dir=/usr' '--with-apxs=/usr/sbin/apxs' -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3 STUVeNEID6bzu4+hq+PqCI4= =zZqL -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 17 Sep 2002 22:14:52 -0000 Issue 1591
php-general Digest 17 Sep 2002 22:14:52 - Issue 1591 Topics (messages 116609 through 116665): Re: can you get the name of an object from within it's own class? 116609 by: Marek Kilimajer 116612 by: lallous 116613 by: Will Steffen How to send gzip content 116610 by: Heiko Mundle Re: What unzip program to use? 116611 by: Marek Kilimajer Re: jpeg thumbnail errors 116614 by: Tony Earnshaw 116616 by: Michael Egan class Problem 116615 by: David Eggler 116617 by: lallous 116618 by: Scott Houseman Re: Illegal characters in HTML form element names. 116619 by: Ford, Mike [LSS] 116622 by: Jared Williams 116643 by: Ford, Mike [LSS] Re: REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix. 116620 by: John Holmes 116623 by: Mark Charette 116649 by: Jason Caldwell Re: COOKIE Question. 116621 by: John Holmes Re: error: loading extensions / php_xslt.dll on win32 116624 by: Marco Siegl UCD-SNMP 4.2.5 and PHP-SNMP 116625 by: Brian E. Seppanen mail() question 116626 by: Meltem Demirkus 116627 by: John Wards 116628 by: Meltem Demirkus 116629 by: John Wards 116630 by: John Wards 116632 by: John Wards Test 116631 by: Tom Ray 116633 by: nicos.php.net stripslahes() | Common pitfalls? 116634 by: Nick Wilson 116639 by: John Holmes 116642 by: Nick Wilson stopping repeated posts to a Bulletin Board 116635 by: Resarch and Development 116636 by: Jon Haworth 116637 by: John Wards 116638 by: John Holmes 116644 by: Justin French 116648 by: Heilig (Cece) Szabolcs 116655 by: Seairth Jacobs Re: alphabetical order? 116640 by: Chad Winger Is there any way to make this faster? 116641 by: Mike imagettftext function does not handle combining character properly 116645 by: Ziying Sherwin 116646 by: Rasmus Lerdorf Redirecting - header location - sometimes not work 116647 by: jana konickova 116661 by: Kevin Stone new PHP chat room (with Flash interface) 116650 by: Darren Gates 116651 by: Nick Wilson Re: A problem with Sessions: Developing and App inside PostNuke 116652 by: Thomas Goeminne retrieving custom email headers 116653 by: Andres Montiel Large uploads 116654 by: Rickard Dahlstrand array trim 116656 by: icgphp.icecoldgold.com 116658 by: Kevin Stone 116662 by: John Holmes any new form builders 116657 by: Vincent Stoessel code review 116659 by: Joseph W. Stein PHPLIB w/o 'register globals' 116660 by: Dennis Gearon callbacks to methods inside a class/object 116663 by: Douglas Marsh 116664 by: John Holmes strange bug(?) when opening lots of files 116665 by: Shane Wright 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] -- ---BeginMessage--- It's not possible, imagine $firstname = new flashPash(); $secondname = $firstname; Now is the log name secondname.log or firstname.log. Use new property. Simon McKenna wrote: Hi all, I'm new to the php world and have just finished building my first class, It works pretty well, but i've run into a quandary adding debug code, my problem is thus: Many objects get created by this class, often in the same php script, and the debug log is an actual file. At the moment i'm naming the file after the name of the class, but what I would really like to do is name the log file after the name of the object instantiated from the class. e.g. class flashPash { $this-fpLog = fopen(flashPash.log,w+); function debugLog($LogMsg) { if (($this-debug == true) (!empty($this-fpLog))) fwrite($this-fpLog,$LogMsg.\n); } } $fpObject = new flashPash(); $fpObject-debug = true; so...is there a way I can get the variable name fpObject from within flashPash itself? i.e. so I can make the logfile fpObject.log instead of flashPash.log I realise it would be trivial to create a new property of the class to store the debug log filename, but i'm hoping I can avoid this? get_object_vars get_class appear to be heading in the right direction...but not quite...so...any ideas? is this actually possible? I kinda want to go down the hierarchical tree, instead of going up it :) thanks for any help. php rocks! si ---End Message--- ---BeginMessage--- even more... what if I create $c1 as a global instance and then $c1 as a local instance (inside a function) ? won't c1.log overwrite c1.log ? Elias Marek Kilimajer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL
Re: [PHP] strange bug(?) when opening lots of files
How long does the script tend to run before it just quits? Perhaps a timeout is set too low in php.ini. Take a look at max_execution_time in php.ini tyler On Tue, 17 Sep 2002 23:14:46 +0100 Shane Wright [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi One of my pages opens ~100 files, reads from them, and closes them, (only one file open at a time). The problem is that the page just dies mid-way through execution - no errors, no segfault, it just dies and returns a blank page to the user. the problem goes away if I reduce the number of files accessed. its a build of PHP 4.1.2 on Linux running as an Apache module, (if it makes any odds, the configure line is below). I can't see anything on bugs.php.net about this - has anyone seen this before (and, of course, the crucial question; what can I do to fix it?) Any help appreciated, Thanks - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc './configure' '--with-gd' '--enable-gd-native-ttf' '--enable-track-vars' '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar' '--with-zlib' '--prefix=/opt/php-4.1' '--with-config-file-path=/usr/local/etc/httpd/conf' '--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr' '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml' '--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp' '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl' '--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6' '--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr' '--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr' '--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv' '--with-kerberos' '--enable-xslt' '--with-xslt-sablot' '--with-freetype-dir=/usr' '--with-apxs=/usr/sbin/apxs' -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3 STUVeNEID6bzu4+hq+PqCI4= =zZqL -END PGP SIGNATURE- -- 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] Please, Help dynamicaly creating an Array
I am trying to populate array values and keys from a variable with no luck. Lets say I have the following array. $data1 = array('ONE'=1,'TWO'=2,'THREE'=3,'FOUR'=4); And I want to create part of the array with the string below: $str= 'THREE'=3, 'FOUR'=4; $data2 = array('ONE'=1,'TWO'=2,$str); How can I create $data2 to work the same as $data1. When I try the above for $data2 a new key is created ([0]) for $str. And I end up with ...'TWO'=2, [0] = 'THREE'=3, 'FOUR'=4. It doesn't interpret the variable how I expect it to, instead it see's $str as a value. I guess the question is how can I make php use the string literally. I've tried everything I can think of and I think my head is about to explode :). Is it possible to create an Array this way? Any help is appreciated!! print_r($data1): Array ( [ONE] = 1 [TWO] = 2 [THREE] = 3 [FOUR] = 4 ) print_r($data2): Array ( [ONE] = 1 [TWO] = 2 [0] = 'THREE'=3, 'FOUR'=4 ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strange bug(?) when opening lots of files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for the input - but its definately not that; time limit is set to 600 seconds and it dies inside 1 second :( (i should have added this to the original mail, but it seems to supply the page but keep the connection open, strange...) S On Wednesday 18 September 2002 12:01 am, Tyler Longren wrote: How long does the script tend to run before it just quits? Perhaps a timeout is set too low in php.ini. Take a look at max_execution_time in php.ini tyler On Tue, 17 Sep 2002 23:14:46 +0100 Shane Wright [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi One of my pages opens ~100 files, reads from them, and closes them, (only one file open at a time). The problem is that the page just dies mid-way through execution - no errors, no segfault, it just dies and returns a blank page to the user. the problem goes away if I reduce the number of files accessed. its a build of PHP 4.1.2 on Linux running as an Apache module, (if it makes any odds, the configure line is below). I can't see anything on bugs.php.net about this - has anyone seen this before (and, of course, the crucial question; what can I do to fix it?) Any help appreciated, Thanks - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc './configure' '--with-gd' '--enable-gd-native-ttf' '--enable-track-vars' '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar' '--with-zlib' '--prefix=/opt/php-4.1' '--with-config-file-path=/usr/local/etc/httpd/conf' '--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr' '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml' '--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp' '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl' '--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6' '--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr' '--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr' '--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv' '--with-kerberos' '--enable-xslt' '--with-xslt-sablot' '--with-freetype-dir=/usr' '--with-apxs=/usr/sbin/apxs' -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3 STUVeNEID6bzu4+hq+PqCI4= =zZqL -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9h8Q85DXg6dCMBrQRApEbAKCIewL9fgwPT1ey3byL2t2pg1BPRACfWJwN rUT+B2yFqGn6e2IO3XAGqeM= =qz1m -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strange bug(?) when opening lots of files
Can't you upgrade to 4.2.3 many bugs were fixed. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Shane Wright [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks for the input - but its definately not that; time limit is set to 600 seconds and it dies inside 1 second :( (i should have added this to the original mail, but it seems to supply the page but keep the connection open, strange...) S On Wednesday 18 September 2002 12:01 am, Tyler Longren wrote: How long does the script tend to run before it just quits? Perhaps a timeout is set too low in php.ini. Take a look at max_execution_time in php.ini tyler On Tue, 17 Sep 2002 23:14:46 +0100 Shane Wright [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi One of my pages opens ~100 files, reads from them, and closes them, (only one file open at a time). The problem is that the page just dies mid-way through execution - no errors, no segfault, it just dies and returns a blank page to the user. the problem goes away if I reduce the number of files accessed. its a build of PHP 4.1.2 on Linux running as an Apache module, (if it makes any odds, the configure line is below). I can't see anything on bugs.php.net about this - has anyone seen this before (and, of course, the crucial question; what can I do to fix it?) Any help appreciated, Thanks - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc './configure' '--with-gd' '--enable-gd-native-ttf' '--enable-track-vars' '--enable-sysvsem' '--enable-sysvshm' '--enable-calendar' '--with-zlib' '--prefix=/opt/php-4.1' '--with-config-file-path=/usr/local/etc/httpd/conf' '--enable-memory-limit' '--with-db2=/usr' '--with-db3=/usr' '--with-gdbm=/usr' '--with-ndbm=/usr' '--with-dbase' '--with-xml' '--with-expat-dir=/usr' '--enable-debugger' '--enable-ftp' '--with-ttf' '--with-jpeg-dir=/usr' '--enable-bcmath' '--with-openssl' '--enable-trans-sid' '--with-mysql=/usr' '--with-xpm-dir=/usr/X11R6' '--with-png' '--with-png-dir=/usr' '--with-imap' '--with-dom=/usr' '--with-bz2' '--with-curl' '--with-mhash=/usr' '--with-mcrypt=/usr' '--with-pgsql' '--with-gmp' '--with-gettext' '--with-iconv' '--with-kerberos' '--enable-xslt' '--with-xslt-sablot' '--with-freetype-dir=/usr' '--with-apxs=/usr/sbin/apxs' -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9h6lW5DXg6dCMBrQRAhhiAKCIo1xdyyDtx7fT8SO8Xz4bfWOg7QCfdjE3 STUVeNEID6bzu4+hq+PqCI4= =zZqL -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9h8Q85DXg6dCMBrQRApEbAKCIewL9fgwPT1ey3byL2t2pg1BPRACfWJwN rUT+B2yFqGn6e2IO3XAGqeM= =qz1m -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strange bug(?) when opening lots of files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi my ISP keeps a little behind the curve - sometimes thats a good thing, but sometimes not. :( We could install our own PHP, but unless this is a known issue that has been fixed since I'd rather not risk any others by installing a new version (and having to deal with the update issues that causes with my ISPs updates) Thanks Shane On Wednesday 18 September 2002 1:20 am, [EMAIL PROTECTED] wrote: Can't you upgrade to 4.2.3 many bugs were fixed. - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9h8gz5DXg6dCMBrQRArHKAJ4w3TjYJpI4ZaRSIi1cXWqOj7DzdwCgu1et ofTLnvU/I9C4RQMNnpvwXIY= =JLHf -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strange bug(?) when opening lots of files
Well, yes many issues about that we were fixed on the 4.2.3 and you should have anyway the latest version of PHP, if your ISP doesn't want to update it, change. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Shane Wright [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi my ISP keeps a little behind the curve - sometimes thats a good thing, but sometimes not. :( We could install our own PHP, but unless this is a known issue that has been fixed since I'd rather not risk any others by installing a new version (and having to deal with the update issues that causes with my ISPs updates) Thanks Shane On Wednesday 18 September 2002 1:20 am, [EMAIL PROTECTED] wrote: Can't you upgrade to 4.2.3 many bugs were fixed. - -- Shane http://www.shanewright.co.uk/ Public key: http://www.shanewright.co.uk/files/public_key.asc -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9h8gz5DXg6dCMBrQRArHKAJ4w3TjYJpI4ZaRSIi1cXWqOj7DzdwCgu1et ofTLnvU/I9C4RQMNnpvwXIY= =JLHf -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] adding unix account via system command
php4.2.3 apache mod linux rh7.2 --- I am trying to add unix system account user via a simple php and shell script ? system(/usr/bin/add.sh timtom752002 timtom752002 /home/timtom752002,$r) or die ( $r user creation fail); print success; ? when i ran add.php on my browser, i get 254 user creation fail I created my add.sh file in /usr/bin and I have setuid it: -rwsr-xr-x1 root devel 216 Sep 18 08:54 add.sh It looks like: #!/bin/sh username=$1 password=$2 homedir=$3 # create user /usr/sbin/useradd -m -d $homedir $username # change the password ( echo $password sleep 1 echo $password sleep 1 echo $password )|passwd $username When I ran the add.sh from the command line, it works ok: $ /usr/bin/add.sh n n /home/n Changing password for user n passwd: all authentication tokens updated successfully (i tried login in with uid=n and passwd=n and it was ok) What's wrong with those scripts. It DOESN'T even create the user timtom752002. Please help -- tim __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Conditionally include file based on document location
I would like to know how to conditionally included a file based on the document location. The purpose is for placement of location-specific navigation menus. I'm not interested in DHTML hierarchical drop-down menus, rather inserting ready made HTML files using perhaps (?) DOCUMENT_URI (?) and error checking logic. EXAMPLE If DOCUMENT_URI is / (home) then the following file included: URL: http://www.globalhemp.com/includes/apple.html If DOCUMENT_URI is /quicktime/ then the following file included: URL: http://www.globalhemp.com/includes/quicktime.html If DOCUMENT_URI is /quicktime/download/ then the following file included: URL: http://www.globalhemp.com/includes/quicktime_download.html The error checking logic would be for child directories that don't have their own include file and thus would use a parent directory include file. If a parent directory file doesn't exist, it would include the top-level (home) include file. The closest PHP example that I have found thus far follows: [INCOMPLETE] PHP CONDITIONAL INCLUDE EXAMPLE Extracted from: http://www.jwweb.com/20010629.html ?php if ($location == quicktime) { include(quicktime.inc); if ($location == quicktime/download) { include(download.inc); } else { include(home.inc); } ? THANKS! Eric C. Pollitt, Founder 401 E. Illinois Ave. Peoria, IL 61603 Global Hemp - Portal to the hemp community http://www.globalhemp.com/ Create like a god. Command like a king. Work like a slave! -- Constantin Brancusi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help.....still stuck after 3 days :/
Hello Rudolf, Thank you for responding to my post, I really appreciate it. I ran the script you sent me, and then I tried looking up the syntax to try to figure out what it means. As it would be pointless for me just to take suggestions that people send me and then not learn what they mean. The resulkt of your code does in fact alphabatize the teams in the select list, however there is a little problem with the end result. your code: ?php include (C:\Program Files\EasyPHP\www\florentiaviola.com\control\config.php); $fd = fopen ($teams, r); while (!feof ($fd)) { $list = fgets($fd, 4096); $squads = explode(|, $list); $alphabetical[] = $squads[1]; } sort ($alphabetical); reset ($alphabetical); for ($i = 0; $i = count($alphabetical) - 1; $i++) { echo 'OPTION VALUE='. $alphabetical[$i][0].''.$alphabetical[$i].'/OPTION'.\n; } fclose ($fd); ? returns the follwoing html: OPTION VALUE=AAglianese/OPTION OPTION VALUE=BBrescello/OPTION OPTION VALUE=CCasteldisangro/OPTION OPTION VALUE=CCastelnuovo/OPTION OPTION VALUE=FFano/OPTION OPTION VALUE=FFlorentia Viola/OPTION OPTION VALUE=FForlì/OPTION OPTION VALUE=GGrosseto/OPTION OPTION VALUE=GGualdo/OPTION It is returning the first letter of $squads[1]. so the id variable is getting lost.That variable is $squads[0]. So in effect that vairable is getting lost because when i modify the line echo 'OPTION VALUE='. $alphabetical[$i][0].''.$alphabetical[$i].'/OPTION'.\n; to read echo 'OPTION VALUE='. $squads[0].''.$alphabetical[$i].'/OPTION'.\n; then the HTML output becomes OPTION VALUE=19Aglianese/OPTION OPTION VALUE=19Brescello/OPTION OPTION VALUE=19Casteldisangro/OPTION OPTION VALUE=19Castelnuovo/OPTION OPTION VALUE=19Fano/OPTION OPTION VALUE=19Florentia Viola/OPTION OPTION VALUE=19Forlì/OPTION OPTION VALUE=19Grosseto/OPTION OPTION VALUE=19Gualdo/OPTION In other words what I am trying to do is something to the effect of $alphabetical = $squads[1][0]. Then I want to sort that only by $squads[1]. When the html is returned, I want to be able to echo the $squads[0] as the Value of the select dropdown. Thanks again, -Tree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Microsoft Office
Can you use PHP to add appts to my microsoft outlook calendar or open up a document in ms word? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] adding unix account via system command
you need to make sure that the web has permission to use that file .. my guess is it don't have permission hence why you can run add.sh from the command line (where your not your web user I'm assuming). -Original Message- From: tim tom [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 18 September 2002 10:56 AM To: [EMAIL PROTECTED] Subject: [PHP] adding unix account via system command php4.2.3 apache mod linux rh7.2 --- I am trying to add unix system account user via a simple php and shell script ? system(/usr/bin/add.sh timtom752002 timtom752002 /home/timtom752002,$r) or die ( $r user creation fail); print success; ? when i ran add.php on my browser, i get 254 user creation fail I created my add.sh file in /usr/bin and I have setuid it: -rwsr-xr-x1 root devel 216 Sep 18 08:54 add.sh It looks like: #!/bin/sh username=$1 password=$2 homedir=$3 # create user /usr/sbin/useradd -m -d $homedir $username # change the password ( echo $password sleep 1 echo $password sleep 1 echo $password )|passwd $username When I ran the add.sh from the command line, it works ok: $ /usr/bin/add.sh n n /home/n Changing password for user n passwd: all authentication tokens updated successfully (i tried login in with uid=n and passwd=n and it was ok) What's wrong with those scripts. It DOESN'T even create the user timtom752002. Please help -- tim __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- 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] adding unix account via system command
Dear Pete, Yes, apache runs as nobody. But I have setuid add.sh. Wouldn't that be sufficient ? -- tim --- Peter Houchin [EMAIL PROTECTED] wrote: you need to make sure that the web has permission to use that file .. my guess is it don't have permission hence why you can run add.sh from the command line (where your not your web user I'm assuming). __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] adding unix account via system command
I am not sure to be totally honest ... but i would have thought you setuid on add.sh to allow it to add the users but i don't think it would work for user nobody. ..what if you tried something like this user nobody (Apache) calls add.sh (initially started by user nobody) add.sh changes user to say user admin useradd runs add.sh exits user admin add.sh ends either that or make sure user nobody is a member of the devel group.. but that could lead to security issues. -Original Message- From: tim tom [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 18 September 2002 12:14 PM To: Peter Houchin; [EMAIL PROTECTED] Subject: RE: [PHP] adding unix account via system command Dear Pete, Yes, apache runs as nobody. But I have setuid add.sh. Wouldn't that be sufficient ? -- tim --- Peter Houchin [EMAIL PROTECTED] wrote: you need to make sure that the web has permission to use that file .. my guess is it don't have permission hence why you can run add.sh from the command line (where your not your web user I'm assuming). __ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Regex for split() to split by , which is not in ()s?
In article [EMAIL PROTECTED], eurleif@buyer- brokerage.com says... I'm looking for a regex which splits a string by commas, but only if the comma is not in parenthesis. I know I'm being lazy and should write it myself, but that's just it... I'm lazy! Well, as it happens I'm too lazy to write it for you :-) -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] hidden PATH_INFO
Hi there. I'm trying to come up with a way to do PATH_INFO urls without having to call a script. Let me explain. I know how to make it work with a url like this: http://foo.com/bar.php/arg1/arg2/etc or even: http://foo.com/bar/arg1/arg2/etc What I'm trying to figure out is how to make it call index.php without specifying it, like this: http://foo.com/arg1/arg2/etc Any pointers? Thanks. __ Do you Yahoo!? Yahoo! News - Today's headlines http://news.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-GTK] problems with socket
Fwd-ing to correct list .. Hi I hope someone can help me I have made a program with a servercomponent And this program connects to a PHP script on a webserver and the script makes a socket connection to this servercomponent and I want that this script logs into a database (or whatever) the logintime and when the program disconnects it works fine but if my internetconnection interrupts (for example my provider makes a IP change) the script doesn't recognize it what can I do?? my script: $fp = fsockopen($ip, $port, $err_num, $err_msg, 10); if ($fp) { $daten = GET / HTTP/1.0\r\nUser-Agent: TestClient\r\n\r\n; fputs($fp, $daten); // Database Entry ONLINE! while (!feof($fp)) { $zwdaten .= fgets($fp, 1); } // Database Entry OFFLINE! } MFG Günther Leitgeb [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] ICQ: 104677570 -- 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
[PHP] PHP and Flash
Hi all, I've never combined PHP with Flash, but I do know there's some possibilities. I'm wondering if I can make a dynamic-PHP-site which controls Flash. I need the administrator to be able to upload a new product to a DB, and then be seen by the visitors in Flash... is this possible? I want to do something like www.rolex.com but don't want to make new pages every time a new product is added... Is this possble? Where can I find the documentation? Thanks in advance, César Aracena On Dial-Up mail2web - Check your email from the web at http://mail2web.com/ . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Flash
php.net/ming On Wed, 18 Sep 2002, [EMAIL PROTECTED] wrote: Hi all, I've never combined PHP with Flash, but I do know there's some possibilities. I'm wondering if I can make a dynamic-PHP-site which controls Flash. I need the administrator to be able to upload a new product to a DB, and then be seen by the visitors in Flash... is this possible? I want to do something like www.rolex.com but don't want to make new pages every time a new product is added... Is this possble? Where can I find the documentation? Thanks in advance, César Aracena On Dial-Up mail2web - Check your email from the web at http://mail2web.com/ . -- 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] callbacks to methods inside a class/object
Hi, Wednesday, September 18, 2002, 7:15:36 AM, you wrote: DM Is there a clean way to make use of PHP builtins that use callbacks and DM point those call backs to a method inside the class/object: DM A good example would be: DM ... DM class XMLClass { DM var $parser; DM function XMLClass() { DM $this-parser = xml_parser_create(); DM xml_parser_set_option($this-parser, XML_OPTION_CASE_FOLDING, TRUE); DM xml_set_element_handler($this-parser, $this-start, $this-end); DM xml_set_character_data_handler($this-parser, $this-data); DM } DM function goodbye() { // a manual destructor DM xml_parser_free($this-parser); DM // other things possibly too DM } DM function start($p2, $name, $attr) { DM // do things here DM } DM function data($p2, $data) { DM // do some more here DM } DM function end($p2, $name) { DM // do even more things here DM } DM [... and so on ...] DM ... DM But since there is no way to set a callback to $this-[function_name] one DM must create a global function that uses a global object and passes things to DM the method inside the class.. DM Is the a way to address this? or perhaps a better way to deal with callback DM function names? DM --Douglas Marsh Here is a skeleton of a parser class, note the uses of '' to avoid generating copies of the object: class xml_parser { var $xml_parser; // constructor function xml_parser() { $this-xml_parser = xml_parser_create(); xml_set_element_handler($this-xml_parser, array($this,start_element),array($this,end_element)); xml_set_character_data_handler($this-xml_parser,array($this,character_data)); } function character_data($parser, $data) { } function start_element($parser, $name, $attrs) { } function end_element($parser, $name) { } function parse() { } } //usage $xml = new xml_parser(); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can you get the name of an object from within it's own class?
Yeah, my brain is broke enough already, i'll just give the class an optional 'name' property. Thanks all! Will Steffen [EMAIL PROTECTED] wrote in message 003101c25e34$2a049950$8000a8c0@william">news:003101c25e34$2a049950$8000a8c0@william... Hehe why break your brain- give the class an id property - then you can have a getid method and do something like this $id = $this-getid(); $this-fpLog = fopen($id.log,w+); get_object_vars only seems to return properties so its not gonna help you. I'm currently working on an object thang as well and what ive done where I have whole bunch of similar objects is to chuck them into a name=value array as they get created so I can find them and fiddle with them again. I have no idea if that helps you, or if its even good coding practice (formal training - wots that?) hey im also a n00b so don't take my word on it - actual mileage may vary :-P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] any new form builders
Check out the source of phpMyAdmin -- they do this, and do it well :) Also, check out the mysql_* functions in the manual -- field_type for example. Justin on 18/09/02 4:33 AM, Vincent Stoessel ([EMAIL PROTECTED]) wrote: Hello, Are there any new scripts out there that will build an html from based on the schema of a database (mysql, postgresql). hate to be lazy but this is getting repetative. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Messaging Solution
Messaging Solution I want to develop a web-based Messaging System where the clients needs the messages and server keeps sending the messages based on Technical Request from the client. I need to write a php script for responding to the client's Request. How do I go about this job, is there already PHP Classes or Open Source Solution Ready which I might take and go about this job or I need to do this from the scratch. Kindly guide me on this. karthikeyan.
[PHP] mid-level PHP/MySQL people in Los Angeles?
I'm looking for 1 or 2 people with good PHP/MySQL experience in the Los Angeles area. I have a few steady projects that pay $20/hr. (All of them 100% PHP/MySQL. All of them fun/non-corporate music-based sites.) If interested, please email my personal address: [EMAIL PROTECTED] Include your contact info any sites/projects you've worked on. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php