Re: [PHP] ODBC_EXECUTE has a DANGEROUS 'feature'!!!
*Always* validate your data. If you validate your data and never trust anything which comes from the client side of the connection, your problem goes away. I mean, you wouldn't pass user data to exec() or fopen() without some serious checking, would you? ;) Sure, PHP could try to prevent every possible problem from cropping up, but that would make the language pretty useless. It's up to the coder to not program security flaws. -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 I understand you try to 'protect' your own product, but you have to stay a bit realistic about some things. Ofcourse I check the input. But you know... there's absolutely nothing wrong with allowing quotes to be stored in the database. It's just that awful 'feature' that makes it rather dangerous to do. If that feature/bug was documented _anywhere_ it would still not be good, but at least someone would know that PHP does this. But no... it's not documented, not anywhere! You can't check user input on stuff you don't know it can harm anything. Like I said... quotes are very normal to be allowed in the database. It would be a good thing if you guys do something of: 1. Good rid of the bug(/feature) right a way or 2. Document it clearly. Eg. in the documentation of odbc_execute(). -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating an array with a file
Scott, I am seeking some thoughts on if this is the way I should tackle this problem. I have two files, both of them tab delimited text files that I need to combine and then output a new file. My idea was to put both files in an array, calling the fields I need, i.e. $field[0], $field[1] and so on. I need to loop through the entire file and output on each loop. My concern is the overhead by creating the array's. Any thoughts. A justifiable concern. You don't mention HOW the files are to be combined, so it is reasonable to assume that there is no criteria. It is also assumed that each file is 'complete' in its format (else you might need to insert something specifically 'between' the contents of the two original files to make the data 'flow' as a single file). There is no need to use arrays/cycle through the data twice, at all - such would be an 'overhead'. Take a look at http://www.php.net/manual/en/ref.filesystem.php. Open fileA to write-append Open fileB Read chunk of fileB Write chunk to fileA until have dealt with entire file Close fileA Close fileB The chunk bit could be binary and it could be done all in one read, depending upon expected file sizes. If by new file you mean that it must be a third file and have a different name to the two input files, then you will need to modify the above, to open a fileC for output, and perform one filecopy for each of files AB. Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with my image
Help! I have attached the code with which I am having difficulty (I have also attached the php configuration of my host provider). What is happening is that I can call up a jpeg file from ./maps and see that it makes it through to the next page, and I can then call the next jpeg file in the sequence, from the same sub-directory, and I get a broken link (error 500 page). The jpeg's I'm working with are 30 to 100 KB , not overly large, and they have names like grid_a.jpg, grid_b.jpg ... grid_l.jpg. The jpeg files view fine in PhotoShop5.5 and are whole files with proper termination. It is the inconsistancy of the problem that is driving me nutz. I work on it for a while and get some images to pass, and then for no reason I can fathom, they stop going through. At one time, I thought it could be a path problem so I did a copy(./maps/$map,$map) to get the image file in the same directory as the image program. The jpegs were delivered, but I still had problems with getting images out. I also thought it could be a database problem, so I stripped all the records from the table. Still no change, some jpegs got through some delivered the error 500 page. If anyone is familiar with using the gd files I can certainly use your help. I'm dead in the water on this. Thanks, Hugh ?php // this is the top line in the page; there are no lines or spaces above here! header(content-type: image/jpg); $font=fonts/arial.ttf; $font2=fonts/wingding.ttf; $im_size = GetImageSize(./maps/$map); $imWidth = $im_size[0]; $imHeight = $im_size[1]; $image=imageCreate($imWidth,$imHeight); $white=imagecolorallocate($image,255,255,255); $red=imagecolorallocate($image,255,100,100); $orange=imagecolorallocate($image,255,200,0); $yellow=imagecolorallocate($image,233,233,0); $green=imagecolorallocate($image,80,255,80); $lt_blue=imagecolorallocate($image,180,180,255); $blue=imagecolorallocate($image,120,120,255); $dk_blue=imagecolorallocate($image,0,0,200); $purple=imagecolorallocate($image,200,100,200); $brown=imagecolorallocate($image,190,160,150); $black=imagecolorallocate($image,0,0,0); $image2=imagecreatefromjpeg(./maps/$map); ImageCopy($image,$image2,0,0,0,0, $imWidth, $imHeight); // database call works $db=museum; $pass=yah_sure_I'm_gonna_tell; $link=mysql_connect(localhost,,$pass); if (! $link) die(Can't log in at this time); mysql_select_db($db,$link) or die (Can't log in at this time); $query=SELECT * FROM heritage where map_name='$map' ORDER BY bldg_name ; $results=mysql_query($query); if (!$results) die(mysql_error()); mysql_close($link); // end database call while ($heritage=mysql_fetch_array($results)) { $coordinate_x=$heritage['x']; $coordinate_y=$heritage['y']; $bldg_use=stripslashes($heritage['bldg_use']); if ($bldg_use==Commercial Bldg.) $var_color=$red; if ($bldg_use==Government Bldg.) $var_color=$orange; if ($bldg_use==other) $var_color=$green; if ($bldg_use==Home) $var_color=$lt_blue; imagettftext($image, 5, 0,$coordinate_x-3, $coordinate_y-4, $black, $font2, l); imagettftext($image, 19, 0,$coordinate_x-7, $coordinate_y+4, $black, $font2, l); imagettftext($image, 17, 0,$coordinate_x-6, $coordinate_y+2, $black,$font2,l); imagettftext($image, 17, 0,$coordinate_x-6, $coordinate_y+2, $var_color, $font2, l); imagettftext($image, 5, 0,$coordinate_x-3, $coordinate_y-4, $white, $font2, l); } imagejpeg($image,./maps2/$map,100); ImageDestroy($image); ImageDestroy($image2); header(location: user_map.php?map=$map); ? // This is the last line of the page; there are no lines below here. Configure command: './configure' '--with-config-file-path=/etc' '--enable-safe-mode=yes' '--enable-force-cgi-redirect=yes' '--with-gdbm' '--with-mysql' '--with-exec-dir=/www/cgi-bin' '--bindir=/www/cgi-bin' '--enable-ftp' '--enable-trans-sid' '--with-gd=/usr' '--with-zlib=/usr' '--with-jpeg-dir=/usr' '--enable-gd-native-ttf' '--with-png-dir=/usr' '--with-ttf=/usr/lib' When the only tool you have is a hammer, everything looks like a nail.
[PHP] how can i pass a javascript variable into a PHP variable?
Hi, does anyone has an idea and example how to get the value of a js variable into a PHP variable, preferably working with sessionvariables or a hiddenform? thank you! Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to get IP address?
Hi friends, I would like to get or extract the IP address from the URL in to a variable. How can I do that? Any help very appreciable. Thanks in advance -Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Printing from a PHP program
Hello, I'd like to send prints from a PHP program but I see there are Printer Functions only for Windows (http://www.php.net/manual/en/ref.printer.php). I'm running on Linux and would like to stay in that environment. Any suggestions on automated printing under Linux? Dennis
[PHP] Making apps
I remeber a while ago there was a question asking if you could make standalone applications but written in PHP rather than VisualBasic or C etc and somebody replied with a website which could help. Could someone re-post the message please! I can't find it in the archives! I think GTK might be what I'm looking for but I'd like alternatives if it isn't. LJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to pass URL??
How to pass the current URL to this function? parse_url (string url) This function call is in calling file ... say some http://10.145.2.68/auto/test.php test.php contains the parse_url funcction. I want to pass the same URL to this function. Because IP address changes every time. Please help out me. Thanks in advance -Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IP - URL
No Renze, what I really want is in the calling php file itself I want to get the IP address. Say some test.php..I call this file like http://10.145.2.23/test.php I want to get 10.145.2.23 in test.php file itself. I think parse_url will help me. But I don't know how to pass the current URL itself to test.php file. Thanks in advance -Balaji -Original Message- From: * RzE: [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:13 PM To: Balaji Ankem Subject: IP - URL Hi there, I just found out I probably sent you the wrong answer to your question. What I sent you was how to get the IP-address of the user of your website. But you want to get the IP-address of some URL? So you want the IP of a website? I think it should be something like: ---[php-code]--- if (preg_match (#^([^:]*://){0,1}[^/]+#, $the_url, $matches)) { $base_url = $matches[1]; $the_ip = gethostbyname($base_url); } else { // Oops... no base URL! } ---[end of php-code]--- I must tell you, though, that I just typed this in this email. I have never use this, and I haven't tested this. So it might need some finetuning and stuff. But I guess it's a good start for solving your problem. Let me know... -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] i need a free php/mysql host with no ads!
Hi! I need a free php/mysql host with no ads! Thanks for your answer! __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] i need a free php/mysql host with no ads!
Okay, you're looking for somewhere to try out your PHP and MySQL skills, correct? I can host these for you on my server, I'm preparing to be a proper host for these things, but not yet ready, therefore there may be some problems. Send me an email back (make sure it doesn't go to the PHP mailing list aswell) with a desired username and password, and I'll make you the following: - An SQL database - A subdomain (http://username.operationenigma.net/) - PHP 4.1.1 access - An FTP account - Unlimited email addresses (POP as well as webmail) - 93% uptime (99% once I've finished upgrading my servers, in a few weeks) You do not have to advertise on your site, and I do not require you to put anything on there about me or my hosting system. If you feel nice you can always put something in there, but it's not required. If you have a proper Domain name, I will host that on my DNS server as well. www.fearfulright.com and www.stupidcomics.com are currently being hosted by me. All that I ask is that you're kind to my system, because I haven't set up a huge amount of security on my webserver just yet. The old saying, don't bite the hand that feeds you. Please don't abuse the system, because if you do, I won't even consider doing anything like this in the future. Also, anyone else out there that needs a platform to test their stuff on, email me and I'll see what I can do. Cheers, Liam - Original Message - From: Balazs Laszlo [EMAIL PROTECTED] To: Liam MacKenzie [EMAIL PROTECTED] Sent: Monday, February 11, 2002 8:08 PM Subject: Re: [PHP] i need a free php/mysql host with no ads! so plz help me! --- Liam MacKenzie [EMAIL PROTECTED] wrote: I can help you... - Original Message - From: Balazs Laszlo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 7:56 PM Subject: [PHP] i need a free php/mysql host with no ads! Hi! I need a free php/mysql host with no ads! Thanks for your answer! __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] i need a free php/mysql host with no ads!
Ok, I don't need a server, as I have plenty. But I just had to say that we need more people like you in our world. You're a very nice guy, Liam. Take it easy... :) -Original Message- From: Liam MacKenzie [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 4:19 AM To: Balazs Laszlo; [EMAIL PROTECTED] Subject: Re: [PHP] i need a free php/mysql host with no ads! Okay, you're looking for somewhere to try out your PHP and MySQL skills, correct? I can host these for you on my server, I'm preparing to be a proper host for these things, but not yet ready, therefore there may be some problems. Send me an email back (make sure it doesn't go to the PHP mailing list aswell) with a desired username and password, and I'll make you the following: - An SQL database - A subdomain (http://username.operationenigma.net/) - PHP 4.1.1 access - An FTP account - Unlimited email addresses (POP as well as webmail) - 93% uptime (99% once I've finished upgrading my servers, in a few weeks) You do not have to advertise on your site, and I do not require you to put anything on there about me or my hosting system. If you feel nice you can always put something in there, but it's not required. If you have a proper Domain name, I will host that on my DNS server as well. www.fearfulright.com and www.stupidcomics.com are currently being hosted by me. All that I ask is that you're kind to my system, because I haven't set up a huge amount of security on my webserver just yet. The old saying, don't bite the hand that feeds you. Please don't abuse the system, because if you do, I won't even consider doing anything like this in the future. Also, anyone else out there that needs a platform to test their stuff on, email me and I'll see what I can do. Cheers, Liam - Original Message - From: Balazs Laszlo [EMAIL PROTECTED] To: Liam MacKenzie [EMAIL PROTECTED] Sent: Monday, February 11, 2002 8:08 PM Subject: Re: [PHP] i need a free php/mysql host with no ads! so plz help me! --- Liam MacKenzie [EMAIL PROTECTED] wrote: I can help you... - Original Message - From: Balazs Laszlo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 7:56 PM Subject: [PHP] i need a free php/mysql host with no ads! Hi! I need a free php/mysql host with no ads! Thanks for your answer! __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.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
[PHP] Re: cookie problem
Hi all, Perhaps some one can help me. If I send a cookie like setcookie(+ACI-cookie+AF8-agtpasswd+ACI-,+ACQ-form+AF8-agent+AF8-pass, time()+-1200, +ACI-/+ACI-)+ADs- it does not work on the terminal which has a new version of windows 2000 and with IE6. The browser does not store the cookie. but if I use setcookie(+ACI-cookie+AF8-agtpasswd+ACI-,+ACQ-form+AF8-agent+AF8-pass)+ADs- I can retrive the cookie variable. This happens on a few terminal but for others with win 2000, both cookie sends above works fine. Has anyone come across this problem? Has anyone got any suggestions. Is this a problem of the win 2000 or the browser setting. thanks, Hasan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Solaris 2.6 make problem - php_network.h:47: parse error before ` socklen_t'
I´m using [EMAIL PROTECTED] since php-install seems dead :-) Hi, I am using: * SunOS wcsw707 5.6 Generic_105181-26 sun4u sparc SUNW,Ultra-60 * php-4.1.1.tar.gz * apache_1.3.23 I am trying to use DSO in apache. I have done: ./configure --prefix=/home/eraonel/apache_1.3.23 --enable-module=so make make clean make install That works ok! Then I do in dir. php4.1.1: * ./configure --with-apxs=/home/eraonel/apache_1.3.23/bin/apxs * make clean * make Here is my problem: Making all in main make[1]: Entering directory `/home/eraonel/php-4.1.1/main' make[2]: Entering directory `/home/eraonel/php-4.1.1/main' /bin/sh /home/eraonel/php-4.1.1/libtool --silent --mode=compile gcc -I. -I/home/eraonel/php-4.1.1/main -I/home/eraonel/php-4.1.1/main -I/home/eraonel/php-4.1.1 -I/home/eraonel/apache_1.3.23/include -I/home/eraonel/php-4.1.1/Zend -I/home/eraonel/php-4.1.1/ext/mysql/libmysql -I/home/eraonel/php-4.1.1/ext/xml/expat -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=260 -DUSE_EXPAT -I/home/eraonel/php-4.1.1/TSRM -g -O2 -prefer-pic -c main.c In file included from /home/eraonel/php-4.1.1/ext/standard/fsock.h:32, from /home/eraonel/php-4.1.1/ext/standard/php_standard.h:43, from main.c:52: php_network.h:47: parse error before `socklen_t' make[2]: *** [main.lo] Error 1 make[2]: Leaving directory `/home/eraonel/php-4.1.1/main' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/eraonel/php-4.1.1/main' make: *** [all-recursive] Error 1 Anyone with a hint? I checked the file php_network.h ( in same directory as main.c) and found the following line: 47 PHPAPI int php_connect_nonb(int sockfd, struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout); //Mikael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FATAL ERROR
Hy, I have install this weekend PHP 4.10 and Microsoft SQL Server Developper on Windows XP professionnal. I use IIS for the web server. When I test the Web Site I have this message: FATAL_ERROR unientify command mssql_connect(); Anyone know what does it means. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IP - URL
Hi $HTTP_SERVER_VARS[SERVER_ADDR] ? Girish -- www.girishnath.co.uk - Original Message - From: Balaji Ankem [EMAIL PROTECTED] To: * RzE: [EMAIL PROTECTED] Cc: Php-General [EMAIL PROTECTED] Sent: Monday, February 11, 2002 10:00 AM Subject: [PHP] IP - URL No Renze, what I really want is in the calling php file itself I want to get the IP address. Say some test.php..I call this file like http://10.145.2.23/test.php I want to get 10.145.2.23 in test.php file itself. I think parse_url will help me. But I don't know how to pass the current URL itself to test.php file. Thanks in advance -Balaji -Original Message- From: * RzE: [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:13 PM To: Balaji Ankem Subject: IP - URL Hi there, I just found out I probably sent you the wrong answer to your question. What I sent you was how to get the IP-address of the user of your website. But you want to get the IP-address of some URL? So you want the IP of a website? I think it should be something like: ---[php-code]--- if (preg_match (#^([^:]*://){0,1}[^/]+#, $the_url, $matches)) { $base_url = $matches[1]; $the_ip = gethostbyname($base_url); } else { // Oops... no base URL! } ---[end of php-code]--- I must tell you, though, that I just typed this in this email. I have never use this, and I haven't tested this. So it might need some finetuning and stuff. But I guess it's a good start for solving your problem. Let me know... -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- 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] Libre !!!!
Salut, olivier, ca va ??? bon, tiens, une adresse qui m'est arrivé ce matin : http://interactif.lemonde.fr/article/0,5611,2861-7110-261386-0,FF.html Dis, une idée pour les cours de Linux que tu donne aux AMI's : Fais leur donc installer LFS (Linux From Scratch, http://linuxfromscratch.org ) ;-D Cela m'a beaucoup appris ... même si c'est un peu par hasard que mes agetty's se lancent correctement au démarrage (J'y ai passé un week-end rienque pour ca ...) . Résultat, un distro encore plus dépouillée que la slackware, du pur martea-burin ... bon, ok, il faut une semaine pour l'installer sur un P233MMx, mais bon ... Sinon, comment va le boulot à la fac ??? @+++ -- ( ° Nicolas Costes //\\ IUT de La Roche / Yon / \/ ) [EMAIL PROTECTED] `- http://luxregina.free.fr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Libre !!!!
Ay! Me no speak no French! - Original Message - From: Nicolas Costes [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 11, 2002 9:36 PM Subject: [PHP] Libre Salut, olivier, ca va ??? bon, tiens, une adresse qui m'est arrivé ce matin : http://interactif.lemonde.fr/article/0,5611,2861-7110-261386-0,FF.html Dis, une idée pour les cours de Linux que tu donne aux AMI's : Fais leur donc installer LFS (Linux From Scratch, http://linuxfromscratch.org ) ;-D Cela m'a beaucoup appris ... même si c'est un peu par hasard que mes agetty's se lancent correctement au démarrage (J'y ai passé un week-end rienque pour ca ...) . Résultat, un distro encore plus dépouillée que la slackware, du pur martea-burin ... bon, ok, il faut une semaine pour l'installer sur un P233MMx, mais bon ... Sinon, comment va le boulot à la fac ??? @+++ -- ( ° Nicolas Costes //\\ IUT de La Roche / Yon / \/ ) [EMAIL PROTECTED] `- http://luxregina.free.fr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, SQL and all that stuff...
Ok guys, I've been pondering over setting up a free PHP/SQL hosting service for some time now, but never really actually done it. It looks like just the mention of it got some seriously positive feedback, so I'm keen to actually do it properly. But... I need some help with security. With a bit of luck you'll all understand where i'm coming from. This is my personal system too, and I don't particularly wish for someone test script to go awfully wrong and wipe my entire webserver! That would put me out of business for quite a while! If there's anyone out there who's good with this kind of thing, PLEASE email me because I'd love to get this hosting system going! I'd also like to provide shell access, but at the moment that is way way way out of the question. I'm not the most experianced person in Linux, and handing out Shell access at the moment is not wise. But with your help, I can provide you all with these services, free of charge and advertising! If you're willing to help, please email me! Thank you! - Lum
[PHP] ereg
Hi there! Is there any mean to tell PHP to use ereg etc. greedy? Thanx, Kiko - It's not a bug, it's a feature. [.nfq] christoph starkmann tel.: 0821 / 56 97 94 34 fax.: 0821 / 56 97 94 38 http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can i pass a javascript variable into a PHP variable?
You can add hidden field in form and before posting set it value to js variable value that can be easily used by PHP script Valentin Petruchek (aki Zliy Pes) *** Cut the beginning *** http://zliypes.com.ua mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Making apps
Laserjetter said something on 11 Feb 2002, in php.general: I remeber a while ago there was a question asking if you could make standalone applications but written in PHP rather than VisualBasic or C etc and somebody replied with a website which could help. Could someone re-post the message please! I can't find it in the archives! I think GTK might be what I'm looking for but I'd like alternatives if it isn't. LJ PHP-GTK is a PHP extension which allows you to write PHP program using a graphical user interface. You can use Glade for a VB style of designing the GUI. http://gtk.php.net/ is the address. Regards, David --- http://php.warpedweb.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] escaping ?
this should work $contents = str_replace(?xml version=\1.0\?, , $contents); btw. a welformed xml documented uses a space between 1.0 and ? -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 10, 2002 11:07 PM To: 'Steven Jarvis'; [EMAIL PROTECTED] Subject: RE: [PHP] escaping ? what about this? $contents = str_replace('?xml version=1.0?'.'', '', $contents); -Original Message- From: Steven Jarvis [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 09, 2002 8:46 AM To: [EMAIL PROTECTED] Subject: [PHP] escaping ? I'm trying to do some string replaces on XML files to import them into a prprietary db that doesn't understand XML. I need to strip the XML tags out of the file. However, when I use this line: $contents = str_replace('?xml version=1.0?', '', $contents); The ? in the string ends my php block. I know there's an easy answer to this, and I'm probably just suffering from Friday afternoon burnout, but can someone let me know how to escape those so that I can search for them in the string? thanks, Steven -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The information contained in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, production, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. Please notify the sender immediately. The content of the email is not legally binding unless confirmed by letter bearing two authorized signatures. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help - to get client IP
Someone please help me of how I could get the client IP using PHP, when i use $remote_addr it gives me the server IP, Kindly help how I could get the IP of clients who are connected to my server or website. Regards Kris
Re: [PHP] help - to get client IP
$remote_addr returns exactly client ip; but if user is behind proxy then $remote_addr will return you proxy ip and you can do nothing with it Valentin Petruchek (aki Zliy Pes) *** Cut the beginning *** http://zliypes.com.ua mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error in PHP installation/execution
I am getting the following error after upgrading from PHP4.0.3 to PHP4.1.1 on Apache 1.3.9 and RedHat Linux 6.1. Complied as a dynamic module. Cannot load /usr/modules/libphp4.so into server: /usr/modules/libphp4.so: undefined symbol: ssl_onceonlyinit Could anyone indicate why I may possibly be getting this error and how I could correct it. Regards, Maurice -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Airport location database
This may be slightly off the topic, but I imagine there may be someone interested here. I've just put together an SQL table from the data of a little more than 8000 airports around the world. It has most of the stuff you'd find useful, including the three-letter airport codes, two-letter country codes, airport names and of course the locations. The database is in the public domain, and you can download it from this url: http://homepage.mac.com/marko/airports.html Have fun! --Marko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] backslashes added to POST value
At 12:34 PM 2/11/2002 -0600, news.php.net wrote: My post values have backslashes added to them (such as to protect a double-quote). All the magic_quote_* settings are turned off in php.ini. Any ideas why this is happening? As someone else has already mentioned, this setting could be coming from either an .htaccess file or httpd.conf if you're using Apache. If you're using IIS on Win32 it's also possible to configure settings on a per-virtual server basis in the system registry. The easiest way to check for this is to use phpinfo() inside the directory that is causing you a problem and see if those magic_quote_* settings are indeed off, for both the local value and the master value. If the local value is different then you have something in some other location that is overriding your master value. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MsSQL PASSWORD()
At 06:34 PM 2/11/2002 +0200, val petruchek wrote: Hello, list! I'm looking for analog of Mysql password() func in MsSQL. My goal is not to store certain field (i.e. user passwords) as a clear text. I don't know the equivalent off the top of my head, but a coworker of mine has used it before. Let me know if no one gets back to you and I'll ask him what it is. I do remember that he said it was unsupported and undocumented, at least in SQL Server 7. Alternatively you can do what I do and use the PHP md5() to hash the password before you store it, and then md5() any supplied password and compare it against the stored hash. In other words, you can accomplish the exact same thing that MySQL does, only you do it in PHP and not MySQL... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Includes in your document root (was: Re: [PHP] MsSQL PASSWORD())
In that case, forget what I said ';) But since you can't say this enough, here is it once more: *** Always remember to keep those includes *out of* your document root; This prevents accidental displaying of source code or (which I heard on this list could even be worse) out-of-context execution. bvr. On Tue, 12 Feb 2002 10:09:38 +1000, Liam MacKenzie wrote: I think by saying under the webserver root, he means any directory below it. For instance, if you webserver root was /www/root, put it here: /www -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] A MYSQL COUNTER
This is too much for a text file. You should definitely use MySQL for this. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] A MYSQL COUNTER I need a way of tracking what user was logged in when vieweing a particular member page, so I'm thinking of having EVERY unique page view of each member page added to a MySQL database, which just the ip, time and date, server name and browser, stuff like that. Is this too much for a MySQL DB??? Should I just write all the info to a textfile??? TANX -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] REMOTE_ADDR probs
At 09:41 AM 2/11/2002 -0600, cyberskydive wrote: $user = getenv('REMOTE_ADDR'); [...] It works great on windows running apache php 4.0.1 but on solaris php 4.06 if I add a print($first); it returns the servers IP address, but everywhere else it returns the users IP address. On the Solaris machine, are you running PHP as an Apache module or as a CGI? Check the output of phpinfo() on your solaris machine...see if using $HTTP_SERVER_VARS[REMOTE_ADDR] or $HTTP_ENV_VARS[REMOTE_ADDR] give you the expected results... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Funny stiff in my logs
Hello, I am running only php with apache on a OSX 10.1.2 machine, in my apache error log, I have some odd lines in there statfs failed because: No such file or directory Here is a summarization of where I am at now First I did a grep -r 'statfs\ failed' / To see if any files on the entire apache server had that line in it, if it did, I could see where any why it was reporting this to to apache log, nothing showed up. I thought maybe it was in a binary and I would not be able to read it with grep, so off to download the source :-) Got source on Perl, Php, Apache Grepped out all those, and nothing at all either. I ran tail on the error_log while watching the site requests, and I saw nothing that corresponds with the lines in the error logs. Generally, a apachectl graceful, will restart the server, and then, in about 15 seconds, I get 4 lines in the error_log statfs failed because: No such file or directory statfs failed because: No such file or directory statfs failed because: No such file or directory statfs failed because: No such file or directory Then nothing for a while, maybe 5 minutes, then a few more, sometimes more than 4, sometimes less. Had a few friends look into their error logs, all on OSX 10.1, and they also are having this as well. I am going to make a guess here, all apple OSX boxes are going to have this, any ideas where to go next? --- Scott Haneda [EMAIL PROTECTED] http://www.newgeo.com Novato, California 94949 --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Implement @-domains with PHP?
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Christian Blichmann) wrote: Anybody got some code how to access the first part of a URI (the string just before the @)? I don't want to use HTTP-authentication and I'm using Win2k with IIS as CGI... Example: http:[EMAIL PROTECTED]/myPathTo/myFile.ending I'd like to retrieve the http://someReallyWeirdAtDomain-part. http://php.net/parse-url -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] can I sandwich html docs with PHP
Hi, With mod_perl I can set a handler to handle any documents so it's quite easy to dump a database where each select output is saved to a file. I can have my handler take any file in the output directory and create the html page on the fly (where the contents of the file can be manipulated, used to determine nature of page wrapper, etc.). How can I do this with PHP? I want the urls to be like: http:://www.mydomain.com/page.html http:://www.mydomain.com/page2.html http:://www.mydomain.com/page3.html etc. One motive is to be sure that no search engines are discouraged from indexing my site plus I'm going to create pages and nav snippets with links to all those pages. Peter --- Reality is that which, when you stop believing in it, doesn't go away. -- Philip K. Dick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can I sandwich html docs with PHP
At 04:46 PM 2/11/2002 -0600, Peter J. Schoenster wrote: How can I do this with PHP? I want the urls to be like: http:://www.mydomain.com/page.html http:://www.mydomain.com/page2.html http:://www.mydomain.com/page3.html etc. One motive is to be sure that no search engines are discouraged from indexing my site plus I'm going to create pages and nav snippets with links to all those pages. I'm not sure I really know what you're asking, but if you are asking if you can use PHP code within HTML files (with *.html extensions) then the answer is yes. If you're running Apache, add the following to your httpd.conf: AddType application/x-httpd-php .html This will make the web server send *.html files to the PHP parser as well. This way you don't have to have your scripts end with *.php. The drawback is that every single *.html file will be sent to the PHP engine for parsing, even if it doesn't contain any code, so your web server will have that extra overhead to deal with. If you have a large site that gets a great many hits a day you may not want to do this for performance reasons... Please disregard if this is not what you were asking... :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Novice question - please help
use str_replace() instead of ereg_replace() ...in the same way described - Original Message - From: brendan conroy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 9:15 PM Subject: [PHP] Novice question - please help Hi, THANK YOU for reading this.I would really appreciate it if someone could please email me if they know any easy way or an existing function for removing an unknown ammount of space characters from an array. Iam having an awful lot of trouble trying to remove multiple space characters from an array, ie. x + y 123456789 where there are three or more spaces in a row(rep'd above by 234 678), basically weird user input. I have written code already, but I cant see where Ive gone wrong, here it is if you care to look at it, and have a good chuckle, told you I was a novice! I included the start page that allows you to see what the code does, in you want to look at it. Thank you for your time, I'd really appreciate any replies! HTML BODY ? $x = 0; $ay=array(); $g=array(); $c = explode (' ', $a); for($q=0;$q=count($c);$q++) { echofont color=green; echo$c[$q]; echoHR; echo/font; } $c=array_reverse($c); for($w = 0;$wcount($c);$w++) { echo $w; $e=array_pop($c); if(($e == ' ')||($e == NULL)) { echohi space; array_push($ay,$e); echoHR; } else { echohi no space; array_push($g,$e); } } echo(count($g)); for($x=0;$x=(count($g));$x++) { echoBR; echo$g[$x]; echoHR; } ? /BODY /HTML == start page code == html head titlenpage.php/title /head body bgcolor=#FF text=#00 form action=newplan2.php method=post enter polynomial ? echo $i;? here:input type=text name=a input type=submit name=submit value=Submit Pols! /body /html _ Chat with friends online, try MSN Messenger: http://messenger.msn.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
[PHP] image generation issues
Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php ?php Header (Content-type: image/png); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, fonts/arial.ttf,Testing... Omega: #937;); ImagePng ($im); ImageDestroy ($im); ? and i call it with img src=button.php border=0 alt=
RE: [PHP] configuring webhost
we're using a Windows 2000 server here... So after we install PHPTriad, what configurations do we need to make? //mm fernandez From: Rick Emery [EMAIL PROTECTED] To: 'mm fernandez' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] configuring webhost Date: Mon, 11 Feb 2002 08:38:28 -0600 If you're using Red hat Linux, it's so easy, even I was able to do it, including PHP and MYSQL. If you're using Windows, then PHPTRIAD is your ticket to glory -Original Message- From: mm fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 1:34 AM To: [EMAIL PROTECTED] Subject: [PHP] configuring webhost hi. i'm new here and i'm also new to php. thing is though, i'd like to ask something with regard to configuring the web host to make it support php. see, i work for a company which also offers web hosting but due to lack of technical people here, we're not sure how to configure our server to support php. i know how to install and configure php on a local pc but i don't know anything about configuring a web host. hmm...i'm not so technical myselfcan anyone help? _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.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 _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file reading and array's
Hi gang: In my constant effort to improve my perl conversion project, I have a question regarding file reading. I am taking two files and combining them in an array and then writing out a new file. Is there a way to: a)strip out the first line of the second file b)test for conditions based on what is on the next line on the file An example, I start the array on file one, then mid-way I start another array on the second file (this array within in the first). I need to check the next line in the file for a condition to exist. I have tried this, but run into the pointer resetting on each pass. Any thoughts would be appreciated. Thanks in advance. -Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] configuring webhost
http://www.e-gineer.com/instructions/index.phtml Follow this man's instructions carefully and you'll have your system set up in no time! It's an extremely good tutorial. Good luck, - Liam - Original Message - From: mm fernandez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 12:22 PM Subject: RE: [PHP] configuring webhost we're using a Windows 2000 server here... So after we install PHPTriad, what configurations do we need to make? //mm fernandez From: Rick Emery [EMAIL PROTECTED] To: 'mm fernandez' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] configuring webhost Date: Mon, 11 Feb 2002 08:38:28 -0600 If you're using Red hat Linux, it's so easy, even I was able to do it, including PHP and MYSQL. If you're using Windows, then PHPTRIAD is your ticket to glory -Original Message- From: mm fernandez [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 1:34 AM To: [EMAIL PROTECTED] Subject: [PHP] configuring webhost hi. i'm new here and i'm also new to php. thing is though, i'd like to ask something with regard to configuring the web host to make it support php. see, i work for a company which also offers web hosting but due to lack of technical people here, we're not sure how to configure our server to support php. i know how to install and configure php on a local pc but i don't know anything about configuring a web host. hmm...i'm not so technical myselfcan anyone help? _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.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 _ Chat with friends online, try MSN Messenger: http://messenger.msn.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] image generation issues
when you say it doesn't work, do you mean that you get an error message or it just doesn't write the text to the image? -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP] image generation issues Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php ?php Header (Content-type: image/png); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, fonts/arial.ttf,Testing... Omega: #937;); ImagePng ($im); ImageDestroy ($im); ? and i call it with img src=button.php border=0 alt=
Re: [PHP] image generation issues
Adrian, If you're using the code displayed, you need to use $im before you destroy it. If you want to deal with it as a .png then use: ImagePNG($im,some_name.png,100); and then pick up the file anytime using img src=some_name.png You can later remove it from the server using: unlink(some_name.png); hope this helps. Hugh - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Adrian Murphy' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 11, 2002 6:36 PM Subject: RE: [PHP] image generation issues when you say it doesn't work, do you mean that you get an error message or it just doesn't write the text to the image? -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP] image generation issues Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php ?php Header (Content-type: image/png); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, fonts/arial.ttf,Testing... Omega: #937;); ImagePng ($im); ImageDestroy ($im); ? and i call it with img src=button.php border=0 alt= -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Massive amounts of data to SQL
Hi everyone, I know this is a relatively simple question, but what would be the most efficient way of entering the contents of a large form (nearly 400 fields) into a MySQL database? Every day the form must be able Please provide an example script that I can use to refer to if you have time. Or show me a page that has a tutorial for a similar task. Thankyou very much for your help! Liam
Re: [PHP] image generation issues
i get 'Could not read font in..' i set permissions to 777 on both file and folder - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Adrian Murphy' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 2:36 AM Subject: RE: [PHP] image generation issues when you say it doesn't work, do you mean that you get an error message or it just doesn't write the text to the image? -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP] image generation issues Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php ?php Header (Content-type: image/png); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, fonts/arial.ttf,Testing... Omega: #937;); ImagePng ($im); ImageDestroy ($im); ? and i call it with img src=button.php border=0 alt= -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Funny stiff in my logs
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hello, I am running only php with apache on a OSX 10.1.2 machine, in my apache error log, I have some odd lines in there statfs failed because: No such file or directory Here is a summarization of where I am at now First I did a grep -r 'statfs\ failed' / To see if any files on the entire apache server had that line in it, if it did, I could see where any why it was reporting this to to apache log, nothing showed up. I thought maybe it was in a binary and I would not be able to read it with grep, so off to download the source :-) Got source on Perl, Php, Apache Grepped out all those, and nothing at all either. I ran tail on the error_log while watching the site requests, and I saw nothing that corresponds with the lines in the error logs. Generally, a apachectl graceful, will restart the server, and then, in about 15 seconds, I get 4 lines in the error_log statfs failed because: No such file or directory statfs failed because: No such file or directory statfs failed because: No such file or directory statfs failed because: No such file or directory Then nothing for a while, maybe 5 minutes, then a few more, sometimes more than 4, sometimes less. Had a few friends look into their error logs, all on OSX 10.1, and they also are having this as well. I am going to make a guess here, all apple OSX boxes are going to have this, any ideas where to go next? If you do man statfs, you'll see that it is a function to return statistics on a mounted filesystem. [NB I am not a C programmer!] That being the case,it's probably called through a header file, rather than in the actual code of whatever. It might be that apache is attempting to determine whether a non-essential file exists, and hsppily going on its way after finding that the file isn't there? [Guessing here - corrections from knowledgable persons welcome] I can't check statfs without rebooting this thing into Linux, but I'd hazard a guess that the error message you are getting is returned by statfs, as there is no log level in the message; apache error log entries seem to have levels like [notice], [warn] etc. So if it is just apache checking for the existence of something, I would venture to say that it might be nothing to worry about, _if_ everything else is working OK. -- David Robley Temporary Kiwi! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: image generation issues
In article 00ce01c1b36b$46c0d640$02646464@ade, [EMAIL PROTECTED] says... Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php ?php Header (Content-type: image/png); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, fonts/arial.ttf,Testing... Omega: #937;); ImagePng ($im); ImageDestroy ($im); ? and i call it with img src=button.php border=0 alt= I think you will find that the font path in ImageTTFText needs to be an absolute path, or relative to the current working directory. It certainly isn't relative to the web root. To be absolutely certain, especially if you are likely to call this from anywhere in your web file structure, make the path absolute! -- David Robley Temporary Kiwi! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] image generation issues
unfortunately, the unix php version I've got access to doesn't have support for TTFs :( but the Windows box does - I have to specify the full path to the font - try that and see if that helps. -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 2:04 PM To: Martin Towell; [EMAIL PROTECTED] Subject: Re: [PHP] image generation issues i get 'Could not read font in..' i set permissions to 777 on both file and folder - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Adrian Murphy' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 2:36 AM Subject: RE: [PHP] image generation issues when you say it doesn't work, do you mean that you get an error message or it just doesn't write the text to the image? -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP] image generation issues Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php ?php Header (Content-type: image/png); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, fonts/arial.ttf,Testing... Omega: #937;); ImagePng ($im); ImageDestroy ($im); ? and i call it with img src=button.php border=0 alt=
Re: [PHP] image generation issues
tried everything suggested and still get 'could not read font' oh well thanx. - Original Message - From: hugh danaher [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 3:00 AM Subject: Re: [PHP] image generation issues Adrian, If you're using the code displayed, you need to use $im before you destroy it. If you want to deal with it as a .png then use: ImagePNG($im,some_name.png,100); and then pick up the file anytime using img src=some_name.png You can later remove it from the server using: unlink(some_name.png); hope this helps. Hugh - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Adrian Murphy' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 11, 2002 6:36 PM Subject: RE: [PHP] image generation issues when you say it doesn't work, do you mean that you get an error message or it just doesn't write the text to the image? -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP] image generation issues Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php ?php Header (Content-type: image/png); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, fonts/arial.ttf,Testing... Omega: #937;); ImagePng ($im); ImageDestroy ($im); ? and i call it with img src=button.php border=0 alt= -- 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] Form Data History
Hi, I'm having some problems with form data disappearing and wondered if anyone has experience with this. On a secure server I'm using PHP to handle form data to collect personal information. If data is missing or incorrect, the user is alerted to 'go back'... but upon going back in history, all the data that was in the form is lost. This did not occur on my regular not-secure web server. Does anyone know what may cause this? Thank you! Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] image generation issues
Thanx for all the help.I discovered the STUPID little problem.my ftp software was set so it uploded .ttf in ascii instead of binary.all works now. thanks again - Original Message - From: Tom Rogers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 3:38 AM Subject: Re: [PHP] image generation issues Hi Some of MS fonts wont work, try downloading some freeware fonts. Tom At 01:24 PM 2/12/02, Adrian Murphy wrote: tried everything suggested and still get 'could not read font' oh well thanx. - Original Message - From: hugh danaher [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 3:00 AM Subject: Re: [PHP] image generation issues Adrian, If you're using the code displayed, you need to use $im before you destroy it. If you want to deal with it as a .png then use: ImagePNG($im,some_name.png,100); and then pick up the file anytime using img src=some_name.png You can later remove it from the server using: unlink(some_name.png); hope this helps. Hugh - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Adrian Murphy' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 11, 2002 6:36 PM Subject: RE: [PHP] image generation issues when you say it doesn't work, do you mean that you get an error message or it just doesn't write the text to the image? -Original Message- From: Adrian Murphy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP] image generation issues Hi, I'm using the code in the manual to draw text on a png. but Its not working - ImageString() works but not ImageTTFText() I uploaded arial.ttf from windows to fonts/ folder Any Ideas: as a side note: PNG's - any real disadvantage to using them instead of gifs - not withstanding the compuserve issue and old browsers. the code button.php ?php Header (Content-type: image/png); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, fonts/arial.ttf,Testing... Omega: #937;); ImagePng ($im); ImageDestroy ($im); ? and i call it with img src=button.php border=0 alt= -- 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] Cache Being Bad
I have a text box on my page and a submit button. The text box value is whatever it grabs from the database. If the user deletes what is in the text box and puts in his own text, then hits submit, the script updates that field with whatever the user inputs. Problem is, after the user hits submit, it APPEARS as though the new text was not submitted because the old text is still in the box. Yet when he refreshes the page it shows the new text. Does that make sense? How do I make it so the new text shows up without him having to refresh. Also I don't want to do a redirect because I want to print a message Info submitted when the user hits submit. I have tried: function cache_control($maxage=0) { $Modified = Last-modified: .gmdate(D, d M Y H:i:s, time()). GMT; $Expires = Expires: .gmdate(D, d M Y H:i:s, time() + $maxage). GMT; $CacheControl = Cache-Control: must-revalidate, max-age=.$maxage., ; $CacheControl.= s-max-age=.$maxage; Header($CacheControl); Header($Modified); Header($Expires); } cache_control(0); Thanks so much for reading, Nate
Re: [PHP] Form Data History
Howdy Steven: Steven Walker wrote: If data is missing or incorrect, the user is alerted to 'go back'... but upon going back in history, all the data that was in the form is lost. This did not occur on my regular not-secure web server. Page caching. You can alter that through the header() function. But, a cleaner way handle user validation problems is to reprint the form and data on the present page. I like to have both the initiating form and the form validation take place in the same script. Put the form itself in a function or an include file. The form should use PHP variables in the value. If there are validation problems, tell the user what's up and have the script re-display the form and the data they just entered will be filled in! An example of such an input element would be... input type=text name=foo value=?php echo $foo; ? / Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232v: 718-854-0335f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] My php goes poof.
Hi phpeople. Can anyone tell me why my php just stops working periodically? I have a win32/apache/php4.1/mysql set up. I can do things here for about an hour or so and then all of a sudden I get nothing but html remains. I need to take down apache and restart it for the php parsing to kick back in. Floyd -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] My php goes poof.
I'd be willing to bet that it's a M$ thing! As it says in all the documentation, neither apache, mysql nor php were designed for M$ systems. Other than bag M$, I can't help you, sorry! ;-) - Original Message - From: Floyd Baker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 2:16 PM Subject: [PHP] My php goes poof. Hi phpeople. Can anyone tell me why my php just stops working periodically? I have a win32/apache/php4.1/mysql set up. I can do things here for about an hour or so and then all of a sudden I get nothing but html remains. I need to take down apache and restart it for the php parsing to kick back in. Floyd -- -- 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] REMOTE_ADDR probs
I will try to call with the other meythodds you suggested and see what happens. I may have not been really clear. on windows everythings working fine on solaris it logs the IP address as the users/visitors (on a nother page) but when using the code I included in my first post to check for a matching IP, its returning the servers IP, thus searching the logged IP list for the servers IP, instead of the users. So on one part of the site it works fine, but on another it doesnt-lol Michael Sims [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 09:41 AM 2/11/2002 -0600, cyberskydive wrote: $user = getenv('REMOTE_ADDR'); [...] It works great on windows running apache php 4.0.1 but on solaris php 4.06 if I add a print($first); it returns the servers IP address, but everywhere else it returns the users IP address. On the Solaris machine, are you running PHP as an Apache module or as a CGI? Check the output of phpinfo() on your solaris machine...see if using $HTTP_SERVER_VARS[REMOTE_ADDR] or $HTTP_ENV_VARS[REMOTE_ADDR] give you the expected results... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] can I sandwich html docs with PHP
On 11 Feb 2002, at 19:30, Michael Sims wrote: I'm not sure I really know what you're asking, but if you are asking if you can use PHP code within HTML files (with *.html extensions) then the answer is yes. If you're running Apache, add the following to your httpd.conf: Please disregard if this is not what you were asking... :) No, thanks. It tells me I wasn't clear. Using mod_perl I can write a module for any phase that Apache goes through while handling a request. Based upon any variables I want, I can tell Apache to have my module handle one of those phases. So when you request this url for example: http://www.mydomain.com/joe.html My module can take joe.html and insert it as the body of a template and then return that to your browser or if you request something else like http://www.mydomain.com/image_of_joe.gif then my module just declines to handle that and apache continues through it's phases. Here is an example (bad execution of an example though) http://161.58.230.66/images/ I have the following .htaccess file in that directory: SetHandler perl-script PerlHandler Apache::Schoenster_Gallery PerlSetVar DOCROOT /usr/local/etc/httpd/htdocs/images PerlSetVar URL_PATH /images I can stick this .htaccess file in any directory (only makes sense where I have images) and it uses those 2 variables above to determine where to read for images and where to write the files which produces the frame-set that you see (the module looks in that file for templates to parse so I can have different looks in different places wihout changing the module). I say it's a bad execution because I'm using imagemagick to resize (regardless of original size). If I add new images it will automatically create a thumbnail (which can currently be larger than the original :) of that. I use a db file to cache thumbnails already created but it does check file modification date to see if it should resize the image or not. But what I want to do is to do this with html files where I'll have a few templates (header,footer,navigation,boxes) that will be created on the fly depending upon variables when a client requests an html file and I want to know if I can do this in PHP without rewriting the url (which is not such a bad option perhaps). Peter --- Reality is that which, when you stop believing in it, doesn't go away. -- Philip K. Dick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] function? variable?
Is there a way to set a variable or is there a function that takes the information between the title tags and prints to the screen where you command? ei: //head //title // ?php // echo ?witakr home? // ? // //LINK REL=stylesheet HREF=css/sCSS.css TYPE=text/css ///title ///head where as i would want the word home from the echo ?witakr home? (or what ever word that may be in place of the word home) to print to say.. a certain place in the body of the page? Jason Whitaker -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cache Being Bad
Nevermind everyone. I was just being an idiot and fetching from the database BEFORE updating it. Well maybe this will at least help some people not make the same stupid mistake. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 11, 2002 8:19 PM Subject: [PHP] Cache Being Bad I have a text box on my page and a submit button. The text box value is whatever it grabs from the database. If the user deletes what is in the text box and puts in his own text, then hits submit, the script updates that field with whatever the user inputs. Problem is, after the user hits submit, it APPEARS as though the new text was not submitted because the old text is still in the box. Yet when he refreshes the page it shows the new text. Does that make sense? How do I make it so the new text shows up without him having to refresh. Also I don't want to do a redirect because I want to print a message Info submitted when the user hits submit. I have tried: function cache_control($maxage=0) $Modified = Last-modified: .gmdate(D, d M Y H:i:s, time()). GMT; $Expires = Expires: .gmdate(D, d M Y H:i:s, time() + $maxage). GMT; $CacheControl = Cache-Control: must-revalidate, max-age=.$maxage., ; $CacheControl.= s-max-age=.$maxage; Header($CacheControl); Header($Modified); Header($Expires); } cache_control(0); Thanks so much for reading, Nate -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: function? variable?
I just saw something with my code there.. i have my link tag inside the title tag.. i will have to fix that :) -- Jason Whitaker Jason Whitaker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : Is there a way to set a variable or is there a function that takes the : information between the title tags and prints to the screen where you : command? : : ei: : : //head : //title : // ?php : // echo ?witakr home? : // ? : // : //LINK REL=stylesheet HREF=css/sCSS.css TYPE=text/css : ///title : ///head : : where as i would want the word home from the echo ?witakr home? (or : what ever word that may be in place of the word home) to print to say.. a : certain place in the body of the page? : : : Jason Whitaker : : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Calendar - loop 365 times?
Hello there, I have a task to modify a quite problematic calendar that wasn't created by me -- currently only weeks and months are shown (for that, all days of the week/month are looped through). For every day, 7 queries are done -- one for each table (there are different tables for weekly, monthly, annually etc recurring events). When there is an event for that day in a particular table, then the DetailsID will be returned and the details table will be queried about closer information regarding the event (time, name, desc etc). I don't really think that looping though the entire year would be such a wise idea (that would be 365 * 7 queries sent to mySQL database). Can you think of an alternative? The queries are as shown below. /// nr. 1 SELECT CalendarDetailsID FROM phpCalendar_Daily WHERE .$LocQuery. AND Active = '1' AND ( ('$queryDate' = StartDate AND StopDate = '-00-00') OR (StopDate != '-00-00' AND '$queryDate' BETWEEN StartDate AND StopDate) ) /// nr. 2 SELECT CalendarDetailsID FROM phpCalendar_Daily WHERE .$LocQuery. AND Active = '1' AND ( ('$queryDate' = StartDate AND StopDate = '-00-00') OR (StopDate != '-00-00' AND '$queryDate' BETWEEN StartDate AND StopDate) ) /// nr. 3 SELECT CalendarDetailsID, DaysOfWeek FROM phpCalendar_Weekly WHERE .$LocQuery. AND Active = '1' AND ( ('$queryDate' = DisplayStart AND DisplayStop = '-00-00') OR (DisplayStop != '-00-00' AND '$queryDate' BETWEEN DisplayStart AND DisplayStop) ) /// nr. 4 SELECT CalendarDetailsID FROM phpCalendar_Monthly WHERE .$LocQuery. AND Active = '1' AND DayOfMonth = '$q' AND ( ('$queryDate' = DisplayStart AND DisplayStop = '-00-00') OR (DisplayStop != '-00-00' AND '$queryDate' BETWEEN DisplayStart AND DisplayStop) ) /// nr. 5 SELECT CalendarDetailsID FROM phpCalendar_Yearly WHERE .$LocQuery. AND Active = '1' AND DayOfMonth = '$q' AND Month = '$Month' AND ( ('$queryDate' = DisplayStart AND DisplayStop = '-00-00') OR (DisplayStop != '-00-00' AND '$queryDate' BETWEEN DisplayStart AND DisplayStop) ) /// nr. 6 SELECT CalendarDetailsID, WeekDays FROM phpCalendar_PeriodicalMonthly WHERE .$LocQuery. AND Active = '1' AND WeekNumber = '$numOfTodays' AND ( ('$queryDate' = DisplayStart AND DisplayStop = '-00-00') OR (DisplayStop != '-00-00' AND '$queryDate' BETWEEN DisplayStart AND DisplayStop) ) /// nr. 7 SELECT CalendarDetailsID, WeekDays FROM phpCalendar_PeriodicalYearly WHERE .$LocQuery. AND Active = '1' AND WeekNumber = '$numOfTodays' AND Month = '$Month' AND ( ('$queryDate' = DisplayStart AND DisplayStop = '-00-00') OR (DisplayStop != '-00-00' AND '$queryDate' BETWEEN DisplayStart AND DisplayStop) ) Are there any wiser ways to solve this instead of making 2555 queries per time the calendar will be requested by a visitor??? TIA Yours, Lauri -- Tharapita Creations [dynamic web applications] [EMAIL PROTECTED] Mobile: +372 53 410 610 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] My php goes poof.
On Tue, 12 Feb 2002 14:25:17 +1000, you wrote: I'd be willing to bet that it's a M$ thing! As it says in all the documentation, neither apache, mysql nor php were designed for M$ systems. Other than bag M$, I can't help you, sorry! ;-) I have better docs... Mine say cross platform. g But I'm losing ms on my *next* machine. Just can't do it now. So I'll need a different fix. Tnx for the suggestion. :-) - Original Message - From: Floyd Baker [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 2:16 PM Subject: [PHP] My php goes poof. Hi phpeople. Can anyone tell me why my php just stops working periodically? I have a win32/apache/php4.1/mysql set up. I can do things here for about an hour or so and then all of a sudden I get nothing but html remains. I need to take down apache and restart it for the php parsing to kick back in. Floyd -- -- 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] Re: function? variable?
Can you be more specific? I am just guessing here but is this what you want: ? $title = home; ? html head title ? echo $title; ? /title /head body ? echo $title; ? /body /html Perhaps, I am not getting what you are asking for. On 11 Feb 2002 at 23:34, Jason Whitaker wrote: I just saw something with my code there.. i have my link tag inside the title tag.. i will have to fix that :) -- Jason Whitaker Jason Whitaker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : Is there a way to set a variable or is there a function that takes the : information between the title tags and prints to the screen where you : command? : : ei: : : //head : //title : // ?php : // echo ?witakr home? : // ? : // : //LINK REL=stylesheet HREF=css/sCSS.css TYPE=text/css : ///title : ///head : : where as i would want the word home from the echo ?witakr home? (or : what ever word that may be in place of the word home) to print to say.. a : certain place in the body of the page? : : : Jason Whitaker : : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: function? variable?
Jason, If I understand your question, you want to display the contents of a variable to screen? Try this: html head title/title /head body ? $test_variable = this is a test; echo Here is what it says: $test_variable; ? /body /html Also note that you do not need to use the PHP tags twice: echo ?witakr home? //incorrect echo wtakr home; //correct Steven J. Walker Walker Effects www.walkereffects.com [EMAIL PROTECTED] On Monday, February 11, 2002, at 09:34 PM, Jason Whitaker wrote: I just saw something with my code there.. i have my link tag inside the title tag.. i will have to fix that :) -- Jason Whitaker Jason Whitaker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... : Is there a way to set a variable or is there a function that takes the : information between the title tags and prints to the screen where you : command? : : ei: : : //head : //title : // ?php : // echo ?witakr home? : // ? : // : //LINK REL=stylesheet HREF=css/sCSS.css TYPE=text/css : ///title : ///head : : where as i would want the word home from the echo ?witakr home? (or : what ever word that may be in place of the word home) to print to say.. a : certain place in the body of the page? : : : Jason Whitaker : : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] preserving variable values across pages.
Found this on the php.net, querying the PHP mailing list: test.php -- $blah=10; include whatever.php; whatever.php - echo The value of blah is: {$blah}; It just keeps the variable since it's global.. When ur using a function. It can be different, since you have to import these variables. HTH, Andy - Original Message - From: Tehn Yit Chin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 1:22 AM Subject: [PHP] preserving variable values across pages. Hi all, If I have the following code, ?php global $some_var FORM action=next_page.php method=post type=submit name=submit value=foobar /FORM ? When the user hits the submit button, the value in some_var disappears? Is there a way of perserving the value in $some_var. thanks in advance. cheers, Tehn Yit -- 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] preserving variable values across pages.
Hi all, If I have the following code, ?php global $some_var FORM action=next_page.php method=post type=submit name=submit value=foobar /FORM ? When the user hits the submit button, the value in some_var disappears? Is there a way of perserving the value in $some_var. thanks in advance. cheers, Tehn Yit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] preserving variable values across pages.
You could do it a number of ways. 1. Use a hidden input field in your form,. input type=hidden name=some_var value=? echo $some_var; ? 2. Put $some_var in a session variable. 3. Pass the value of some_var in the url. Each has it's advantages/disadvantages. Just remember that just because you say something is global doesn't mean it's global to every page, it's global on that page. global can be used as follows: ? $var = 1; function dude() { global $var print Dude that's a $var; } ? If I didn't specify global $var inside the function the function wouldn't be able to see the $var variable I defined outside the function and would have just printed Dude that's a instead of Dude that's a 1 Hope that helps. On 12 Feb 2002 at 17:22, Tehn Yit Chin wrote: Hi all, If I have the following code, ?php global $some_var FORM action=next_page.php method=post type=submit name=submit value=foobar /FORM ? When the user hits the submit button, the value in some_var disappears? Is there a way of perserving the value in $some_var. thanks in advance. cheers, Tehn Yit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php K E I T H V A N C E Web Developer, IT Professional http://www.vanceconsulting.net [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] preserving variable values across pages.
On Tuesday 12 February 2002 14:22, Tehn Yit Chin wrote: Hi all, If I have the following code, ?php global $some_var FORM action=next_page.php method=post type=submit name=submit value=foobar /FORM ? When the user hits the submit button, the value in some_var disappears? Is there a way of perserving the value in $some_var. GLOBAL in php is not the same as global in ASP. It is only global within the lifetime of the script. What you need is a hidden element in your form holding the value of $some_var. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] a user_auth script. The Script
On Tuesday 12 February 2002 07:11, Matthew Darcy wrote: spotted 1 error already missing the starting after the printf statment. Any more ? -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: 11 February 2002 23:09 To: Roy Cabaniss; php Subject: RE: [PHP] a user_auth script. The Script ?php include(../dbconnect.php); if ($submit == sign!) { $admin_string_auth=(select account_name, account_password, account_admin_level from account_details where account_name='$login_name') or die (Cant run auth string); [snip] In cases like these, it is always a good idea to point out which is the line in question. Earlier posts mentioned line 55, but without manually counting, how are we going to know which is line 55? Plus, after going through the mail system, what was originally line 55, may not be line 55 anymore. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* George Orwell 1984. Northwestern 0. -- Chicago Reader 10/15/82 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MsSQL PASSWORD()
My current project runs on Win2k, MsSQL 2k, and PHP 4.0.6 My problem is that i can not enable md5 extension because of Unable to load dynamic library 'c:\windows\php\extensions/php_mcrypt.dll' - The specified procedure could not be found. in Unknown on line 0 So,... Valentin Petruchek (aki Zliy Pes) *** Cut the beginning *** http://zliypes.com.ua mailto:[EMAIL PROTECTED] - Original Message - From: Michael Sims [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 2:29 AM Subject: Re: [PHP] MsSQL PASSWORD() At 06:34 PM 2/11/2002 +0200, val petruchek wrote: Hello, list! I'm looking for analog of Mysql password() func in MsSQL. My goal is not to store certain field (i.e. user passwords) as a clear text. I don't know the equivalent off the top of my head, but a coworker of mine has used it before. Let me know if no one gets back to you and I'll ask him what it is. I do remember that he said it was unsupported and undocumented, at least in SQL Server 7. Alternatively you can do what I do and use the PHP md5() to hash the password before you store it, and then md5() any supplied password and compare it against the stored hash. In other words, you can accomplish the exact same thing that MySQL does, only you do it in PHP and not MySQL... -- 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