[PHP] Repost URGENT: Can't see picture!!!!!!!!
Hi, this is a repost and nothing i've tried is working. Basically, I allow people to upload pictures and they all go to the proper directories but I can't see the picture. I can see the pictures great on my windows server but no one else can see it. Obviously the path to the images is screwed but I can't figure it out. The $picdir i've tried are: $picdir = "./userpics"; $picdir = "c:/phpweb/userpics/" $picdir = "/userpics"; $picdir = "../userpics"; All of the above don't work. I'll post my code below: ?PHP session_start(); include("dblib.inc"); ? !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" html head titleUploading your potrait/title Link href="arial.css" rel=stylesheet title=arial type=text/css body img src="pics/logo.gif" BR H3Portrait Picture/h3 ?PHP //defines location $filedir = "c:/phpweb/userpics"; $picdir = "./userpics"; //check for jpeg image type if($fupload_type =="image/pjpeg") { //copies picture to new directory and renames to username if(copy($fupload,"$filedir/$CUserName.jpg")) { print ("BHey Goodlooking! Your picture has been uploaded correctly/bBRBR"); print "table border=1 TR TD height=\"300\" width=\"300\" align=\"center\""; print ("img src=\"$picdir/$CUserName.jpg\""); print"/td /tr/table"; print "BRBa href=\"memberprofile.php?$PHPSESSID\"Home/a/b"; print " Ba href=\"fupload.php\"Upload again/a/bBR"; //adds 'yes' to database so user can search only profiles with pictures. $query="UPDATE clients SET CPicture='yes' WHERE CUserName='$CUserName'"; //FAILED PROCESS if(!mysql_query($query)) { print "A process has failed during the update. Please report this incident to the Web Master a href=\"mailto:[EMAIL PROTECTED]\"[EMAIL PROTECTED]/aBRBR"; print "BRBa href=\"memberprofile.php?$PHPSESSID\"Home/a/b"; return false; } return true; } die ("Error in uploading. Please try again"); } else { //PRINTS IF PICTURE IS ANYTHING BUT JPEG FORMAT print "In order to show off your qualities to the fullest extent.BR LDSAlberta.com currently only acceptes pictures in JPEG format which have the highest color quality and in turn show you off the best!"; print "BRBa href=\"memberprofile.php?$PHPSESSID\"Home/a/b"; print " Ba href=\"fupload.php\"Upload again/a/bBR"; } unlink($fupload); mysql_close(); ? /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variables problem
Hi! I have a quite big form to fill out a calendar. The form has six fields for every day in a month to make it possible to set up tree apointments (the target of the meeting and Locataion), this makes a total of about ~180 fields so I created them with a for-loop. Now I got this 180 fields named tar1-1, loc1-1, tar2-1, loc2-1 a.s.o. where the first tree letters tells what information it is, the 4th witch meeting it is (1-3) and the digits after the minus-sign tells the day of the month (1-31) The problem is to get the value out of the variable so i can store it in my mySQL database. it no problem to create a variable that holds the name of the variable that contains the data, but then??? The value of the variable $q is 'tar1-1' and I want to access the variable $tar1-1. I can't find any way to solve this, can you? Someone most have created a calendar like this before... Please respond to [EMAIL PROTECTED] /Per Kallin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Classes and Object Oriented Programming
Is there a good tutorial on Classes? I looked at countless class codes but I don't understand how they are implemented (not to mention countless books too). Can someone point me to a good tutorial or explain to me whats going on ? --- David Chua ---
Re: [PHP] Login System with access levels
Thanks for all your help. I've settled for an enum field for the time being. I'm going to try something more complex at a later stage. Thanks again, Cheers, Jord -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Require vs include
Hi Check out : http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=22 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: NGUYEN DINH Quoc Huy [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 17, 2001 9:44 AM To: [EMAIL PROTECTED] Subject: [PHP] Require vs include Hi Can someone explain me what's the difference between include() and require() ?? I did not catch the explanation in the docs. When should I use include() and when should I use require() ?? I'm not on the list so reply me to: [EMAIL PROTECTED] Thnx -- = NGUYEN DINH Quoc Huy (SnAKes) http://www.snakesbox.com/ [EMAIL PROTECTED] - ICQ# 3398187 telnet://snakesbox.com:/ -- Puissance 4 = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Zend?
Chris Anderson wrote: I've heard alot about the Zend Encoder. [..] Does it require any extra server settings etc? It requires the Zend Optimizer to be installed. regards Wagner -- Assumption is the mother of all fuck-ups. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Associative vs normal arrays
what do you mean? all arrays are associative. even the simple $arr = array(1,2,3,4,5); has key/value pairs associated with it.. similar to doing: $arr = array(0=1,1=2,2=3,3=4,4=5); --- Joe [EMAIL PROTECTED] wrote: Is there a way to determine if an array is associative or not? Maybe something similar to the is_array() function ?? Thanks, JOE __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Webmin
Michael Kimsal wrote: Although I somewhat agree with the webmin sentiment, after having tried to do simple maintenance on a cobalt for someone, it seems a real dog for anything outside the normal scope of what they want you to do. We needed to edit an httpd.conf file, but there doesn't seem to be a way to do it. Ditto for restarting Apache. Add a MIME type? No dice. Webmin is not the slickest interface, but seems to offer a lot of flexibility. Rather than rewriting something, perhaps you could vounteer to design a better interface for existing webmin stuff. A PHP-based version of webmin would be nice, but it's already a rather developed project, and after considering how to do it myself, I realized there's a whole hell of a lot of configurations and systems to have to consider beyond my few linux distros. John Huggins wrote: You mention a large desire for a good web based administrator. I wonder if there is a version of a web based system administrator available that works like Cobalt, but can be installed on any hosting setup. Have you folks heard of such a thing? I am aware of Webmin, but am not too impressed with it yet. I have toyed with the idea of writing my own. Jamie, what items do you feel must be controllable in a web hosting account administration panel? Yes, we all know the basics, like email, dns, etc. but a bulleted list would be a good start at organizing a development effort. Ive written something in php - lets you edit your apache, dns email etc. But its for qmail/vmailngr and tinydns set up. It lets the people on my server do all their dns, apache etc without hassling me about it. A whole webmin type thing in php would be a real pain. The interface is useful when you have a large number of domains and want others to administer them - the people on my server have around 50 + domains each - so having a web interface for it is actually pretty quick. For a few domains it's overkill. at 4php.com there are some screenshots of it. It's not that hard to put something together similar yourself. I absolutely hate control panels and have vowed never to touch my code again. Write one and it will drive you mad. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/standard credits.c credits.h info.h
jmoore Sat Mar 17 04:21:28 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4/ext/standard credits.c credits.h info.h Log: MFH for website team credits. Index: php4/ext/standard/credits.c diff -u php4/ext/standard/credits.c:1.5 php4/ext/standard/credits.c:1.5.2.1 --- php4/ext/standard/credits.c:1.5 Sun Feb 25 22:07:17 2001 +++ php4/ext/standard/credits.c Sat Mar 17 04:21:21 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: credits.c,v 1.5 2001/02/26 06:07:17 andi Exp $ */ +/* $Id: credits.c,v 1.5.2.1 2001/03/17 12:21:21 jmoore Exp $ */ #include "php.h" #include "info.h" @@ -95,6 +95,14 @@ php_info_print_table_start(); php_info_print_table_header(1, "PHP Quality Assurance Team"); php_info_print_table_row(1, "Andre Langhorst, Hellekin O. Wolf, Jalal Pushman, James Moore, Jani Taskinen, Joey Smith, Olivier Cahagne, Phil Driscoll, Sebastian Bergmann, Zak Greant"); + php_info_print_table_end(); + } + + if (flag PHP_CREDITS_WEB) { + /* Website Team */ + php_info_print_table_start(); + php_info_print_table_header(1, "PHP Website Team"); + php_info_print_table_row(1, "Hojtsy Gabor, Colin Viebrock, Jim +Winstead"); php_info_print_table_end(); } Index: php4/ext/standard/credits.h diff -u php4/ext/standard/credits.h:1.2 php4/ext/standard/credits.h:1.2.2.1 --- php4/ext/standard/credits.h:1.2 Sun Feb 25 22:07:17 2001 +++ php4/ext/standard/credits.h Sat Mar 17 04:21:22 2001 @@ -17,16 +17,26 @@ +--+ */ -/* $Id: credits.h,v 1.2 2001/02/26 06:07:17 andi Exp $ */ +/* $Id: credits.h,v 1.2.2.1 2001/03/17 12:21:22 jmoore Exp $ */ +#ifndef CREDITS_H +#define CREDITS_H +#ifndef HAVE_CREDITS_DEFS +#define HAVE_CREDITS_DEFS + #define PHP_CREDITS_GROUP (10) #define PHP_CREDITS_GENERAL(11) #define PHP_CREDITS_SAPI (12) #define PHP_CREDITS_MODULES(13) #define PHP_CREDITS_DOCS (14) #define PHP_CREDITS_FULLPAGE (15) +#define PHP_CREDITS_QA (16) +#define PHP_CREDITS_WEB(17) #define PHP_CREDITS_ALL0x +#endif /* HAVE_CREDITS_DEFS */ + PHPAPI void php_print_credits(int flag); +#endif Index: php4/ext/standard/info.h diff -u php4/ext/standard/info.h:1.21 php4/ext/standard/info.h:1.21.2.1 --- php4/ext/standard/info.h:1.21 Sun Feb 25 22:07:17 2001 +++ php4/ext/standard/info.hSat Mar 17 04:21:22 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: info.h,v 1.21 2001/02/26 06:07:17 andi Exp $ */ +/* $Id: info.h,v 1.21.2.1 2001/03/17 12:21:22 jmoore Exp $ */ #ifndef INFO_H #define INFO_H @@ -35,6 +35,8 @@ #define PHP_INFO_LICENSE (16) #define PHP_INFO_ALL 0x +#ifndef HAVE_CREDITS_DEFS +#define HAVE_CREDITS_DEFS #define PHP_CREDITS_GROUP (10) #define PHP_CREDITS_GENERAL(11) @@ -43,7 +45,10 @@ #define PHP_CREDITS_DOCS (14) #define PHP_CREDITS_FULLPAGE (15) #define PHP_CREDITS_QA (16) +#define PHP_CREDITS_WEB (17) #define PHP_CREDITS_ALL0x + +#endif /* HAVE_CREDITS_DEFS */ #define PHP_LOGO_GUID"PHPE9568F34-D428-11d2-A769-00AA001ACF42" #define PHP_EGG_LOGO_GUID "PHPE9568F36-D428-11d2-A769-00AA001ACF42" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /win32 php4ts.dsw
dbeuSat Mar 17 04:30:28 2001 EDT Modified files: /php4/win32 php4ts.dsw Log: fix dependencys Index: php4/win32/php4ts.dsw diff -u php4/win32/php4ts.dsw:1.6 php4/win32/php4ts.dsw:1.7 --- php4/win32/php4ts.dsw:1.6 Thu Nov 23 06:34:09 2000 +++ php4/win32/php4ts.dsw Sat Mar 17 04:30:27 2001 @@ -3,7 +3,7 @@ ### -Project: "TSRM"=..\TSRM\TSRM.dsp - Package Owner=4 +Project: "TSRM"="..\TSRM\TSRM.dsp" - Package Owner=4 Package=5 {{{ @@ -15,7 +15,7 @@ ### -Project: "ZendTS"=..\Zend\ZendTS.dsp - Package Owner=4 +Project: "ZendTS"="..\Zend\ZendTS.dsp" - Package Owner=4 Package=5 {{{ @@ -30,7 +30,7 @@ ### -Project: "libmysql"=..\ext\mysql\libmysql\libmysql.dsp - Package Owner=4 +Project: "libmysql"="..\ext\mysql\libmysql\libmysql.dsp" - Package Owner=4 Package=5 {{{ @@ -42,7 +42,7 @@ ### -Project: "php4aolserver"=..\sapi\aolserver\php4aolserver.dsp - Package Owner=4 +Project: "php4aolserver"="..\sapi\aolserver\php4aolserver.dsp" - Package Owner=4 Package=5 {{{ @@ -57,7 +57,7 @@ ### -Project: "php4apache"=..\sapi\apache\php4apache.dsp - Package Owner=4 +Project: "php4apache"="..\sapi\apache\php4apache.dsp" - Package Owner=4 Package=5 {{{ @@ -72,7 +72,7 @@ ### -Project: "php4dllts"=.\php4dllts.dsp - Package Owner=4 +Project: "php4dllts"=".\php4dllts.dsp" - Package Owner=4 Package=5 {{{ @@ -84,19 +84,16 @@ Project_Dep_Name ZendTS End Project Dependency Begin Project Dependency -Project_Dep_Name TSRM -End Project Dependency -Begin Project Dependency Project_Dep_Name libmysql End Project Dependency Begin Project Dependency -Project_Dep_Name bindlib +Project_Dep_Name TSRM End Project Dependency }}} ### -Project: "php4isapi"=..\sapi\isapi\php4isapi.dsp - Package Owner=4 +Project: "php4isapi"="..\sapi\isapi\php4isapi.dsp" - Package Owner=4 Package=5 {{{ @@ -111,7 +108,7 @@ ### -Project: "php4nsapi"=..\sapi\nsapi\php4nsapi.dsp - Package Owner=4 +Project: "php4nsapi"="..\sapi\nsapi\php4nsapi.dsp" - Package Owner=4 Package=5 {{{ @@ -126,7 +123,7 @@ ### -Project: "php4ts"=.\php4ts.dsp - Package Owner=4 +Project: "php4ts"=".\php4ts.dsp" - Package Owner=4 Package=5 {{{ @@ -137,14 +134,11 @@ Begin Project Dependency Project_Dep_Name php4dllts End Project Dependency -Begin Project Dependency -Project_Dep_Name mysql -End Project Dependency }}} ### -Project: "servlet"=..\sapi\servlet\servlet.dsp - Package Owner=4 +Project: "servlet"="..\sapi\servlet\servlet.dsp" - Package Owner=4 Package=5 {{{ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4(PHP_4_0_5) / ltconfig
avsmSat Mar 17 05:13:56 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4 ltconfig Log: Update libtool to support OpenBSD 2.8+ wrt shared libraries and library dependencies. Tested on i386/sparc. Index: php4/ltconfig diff -u php4/ltconfig:1.20 php4/ltconfig:1.20.4.1 --- php4/ltconfig:1.20 Fri Nov 3 18:42:10 2000 +++ php4/ltconfig Sat Mar 17 05:13:55 2001 @@ -1105,6 +1105,9 @@ with_gnu_ld=no fi ;; +openbsd*) + with_gnu_ld=no + ;; esac @@ -1402,10 +1405,21 @@ ;; openbsd*) -archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' -hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no +case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then + export_dynamic_flag_spec='${wl}-E' + fi + ;; +esac ;; os2*) @@ -2019,13 +2033,10 @@ openbsd*) version_type=sunos - if test "$with_gnu_ld" = yes; then -need_lib_prefix=no -need_version=no - fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH + deplibs_check_method='pass_all' ;; os2*) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Undefined Variable
Hi there, I get this error every time I try to use a variable that has not been declared. Is this new to PHP4? I do not recall this error in the past, echo $MYVAR echoed nothing if $MYVAR was not set but no error was raised. How can I revert PHP behavior to 'no-error' with undeclared variables? Many thanks in advance, Jorge Alvarez PHP4 new user -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Headers
I'm sure everyone's seen the following: Warning: Cannot add header information - headers already sent by (output started But, How can I add check to see if the header information has notbeen sent and add it if it hasn't (else just print without the header info)? TIA! Clayton Dukes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Headers
Clayton, PHP has a function for that: headers_sent (PHP 3= 3.0.8, PHP 4 = 4.0b2) headers_sent -- Returns true if headers have been sent Description boolean headers_sent (void) This function returns true if the HTTP headers have already been sent, false otherwise. See also header() Cheers, Gianluca CD I'm sure everyone's seen the following: CD Warning: Cannot add header information - headers already sent by (output started CD But, CD How can I add check to see if the header information has not been sent and add it if it hasn't (else just print without the header info)? CD TIA! CD Clayton Dukes -- ALBASOFTWARE C/ Mallorca 186 - 3 1 08036 Barcelona (Spain) Tel. +34 93454009 - +34 934549324 Fax. +34 934541979 @@ ICQ 47323154 @@ [EMAIL PROTECTED] http://www.albasoftware.com http://www.phpauction.org http://www.gianlucabaldo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Headers
Thanks, How do I do something like: if headers_sent=false include header.inc else some other thing Please forgive my inexperience, I'm still learning :-) Clayton Dukes - Original Message - From: "Gianluca Baldo" [EMAIL PROTECTED] To: "Clayton Dukes" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, March 17, 2001 8:55 AM Subject: Re: [PHP] Headers Clayton, PHP has a function for that: headers_sent (PHP 3= 3.0.8, PHP 4 = 4.0b2) headers_sent -- Returns true if headers have been sent Description boolean headers_sent (void) This function returns true if the HTTP headers have already been sent, false otherwise. See also header() Cheers, Gianluca CD I'm sure everyone's seen the following: CD Warning: Cannot add header information - headers already sent by (output started CD But, CD How can I add check to see if the header information has not been sent and add it if it hasn't (else just print without the header info)? CD TIA! CD Clayton Dukes -- ALBASOFTWARE C/ Mallorca 186 - 3 1 08036 Barcelona (Spain) Tel. +34 93454009 - +34 934549324 Fax. +34 934541979 @@ ICQ 47323154 @@ [EMAIL PROTECTED] http://www.albasoftware.com http://www.phpauction.org http://www.gianlucabaldo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Headers
How do I do something like: if headers_sent=false include header.inc if (headers_sent() == false)include 'header.inc'; be sure and check the manual to make sure that "header_sent()" is the correct format. Brett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 17 Mar 2001 14:29:15 -0000 Issue 572
php-general Digest 17 Mar 2001 14:29:15 - Issue 572 Topics (messages 44352 through 44388): Re: Associative vs normal arrays 44352 by: Alexander Wagner 44380 by: Yev Zend? 44353 by: Chris Anderson 44379 by: Alexander Wagner PSpell? 44354 by: Jonathan Sharp header:(location) error 44355 by: stas 44358 by: Brett Running script on remote server 44356 by: Patrick Dunford Re: Putting php at end of html? 44357 by: Richard Lynch metabase docs and DB abstraction 44359 by: Dean Hall Re: mail() implementation problem 44360 by: Tim Frank Re: XML Newbie.! 44361 by: Nik Gare 44362 by: Rick St Jean 44366 by: Nik Gare 44369 by: Rick St Jean Re: articles to install Red Hat server, mysql, php 44363 by: Nyon Invalid or Valid because the same. 44364 by: techzeus.pacific.net.sg 44365 by: techzeus.pacific.net.sg 44368 by: techzeus.pacific.net.sg 44370 by: Jason Lotito 44371 by: Jack Dempsey 44372 by: Jason Lotito 44373 by: techzeus.pacific.net.sg Require vs include 44367 by: NGUYEN DINH Quoc Huy 44378 by: Boaz Yahav Repost URGENT: Can't see picture 44374 by: Mike Yuen Variables problem 44375 by: Per Kallin Classes and Object Oriented Programming 44376 by: techzeus.pacific.net.sg Re: Login System with access levels 44377 by: Jordan Elver Re: Webmin 44381 by: mwaples.waples.net Undefined Variable 44382 by: Jorge Alvarez Headers 44383 by: Clayton Dukes 44384 by: Gianluca Baldo 44385 by: Clayton Dukes 44386 by: Brett How no-cache some object? 44387 by: Mig 44388 by: Brett 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] -- [EMAIL PROTECTED] wrote: There are only assotiative arrays in PHP. PHP has associative and numeric (normal) arrays. But is_array() says only if it is an array or not. The distinction could only be made if you look at keys. Keys can be integers or strings. I hope this was correct, if not, Andrei can correct me :) If I'm not completely mistaken, PHP has only associative arrays, which can act more or less like "normal" indexed arrays when numbers are used as keys, which is the default when no keys are set explicitly, like in: $arr = array('a', 'b', 'c'); which equals $arr = array(0 = 'a', 1 = 'b', 2 = 'c'); But they are still associative, afaik. However, I agree, the only way to make a distinction is to look if the keys are integers. regards Wagner -- Assumption is the mother of all fuck-ups. what do you mean? all arrays are associative. even the simple $arr = array(1,2,3,4,5); has key/value pairs associated with it.. similar to doing: $arr = array(0=1,1=2,2=3,3=4,4=5); --- Joe [EMAIL PROTECTED] wrote: Is there a way to determine if an array is associative or not? Maybe something similar to the is_array() function ?? Thanks, JOE __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ I've heard alot about the Zend Encoder. Using it can I encode I file so that php still executes it, but a person cannot read my source by looking at the file? I'm programming components for people and would prefer if they could use it, but not see my source. Does it require any extra server settings etc? Chris Anderson wrote: I've heard alot about the Zend Encoder. [..] Does it require any extra server settings etc? It requires the Zend Optimizer to be installed. regards Wagner -- Assumption is the mother of all fuck-ups. I have checked my phpinfo() and it shows that PSPell is enabled. But when i run the following script (per php.net/manual/ example) i get the following (following) error... $pspell_link = pspell_new ("en"); if (pspell_check ($pspell_link, "testt")) { echo "This is a valid spelling"; } else { echo "Sorry, wrong spelling"; } "Warning: PSPELL couldn't open the dictionary. reason: I'm sorry I can't find any sutable word lists for the language-tag "en". in /parte/htdocs/public_html/pspell/test1.php on line 10 Warning: 0 is not an PSPELL result index in /parte/htdocs/public_html/pspell/test1.php on line 12 Sorry, wrong spelling " I have pspell-.11.2 Thanks, -Jonathan Hello, I am receiving the following error from my app, and I'd be gratefull if somebody would point out the usual cause of it. I am doing a redirect based on a form validation routine. Thank you. Warning: Cannot add header information - headers already sent in
RE: [PHP] How no-cache some object?
Hi Check out : http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=62 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Brett [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 17, 2001 4:33 PM To: PHP Subject: Re: [PHP] How no-cache some object? Hello, this probably no related to PHP, but I don't know where to ask. When retrieving and updating images from MySql record, I noticed Netscape sometimes fooled by cache values, then it won't show correct image but previous image instead. How can say to browsers 'hey, please don't cache this img src statement"? Note inside src there is PHP program img src="show.php?image= I read entire chapter 14.9 "cache control" from http doc but didn't understand . Thanks Mig Hello, Do a search for no cache in the archives or on google. I don't recall the exact code, but it has been covered a lot in this list. Brett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Classes and Object Oriented Programming
Is there a good tutorial on Classes? http://www.zend.com/zend/tut/class-intro.php That's a really good one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/mcrypt mcrypt.c
derick Sat Mar 17 06:55:24 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4/ext/mcryptmcrypt.c Log: - MFH (memleak fix) Index: php4/ext/mcrypt/mcrypt.c diff -u php4/ext/mcrypt/mcrypt.c:1.45 php4/ext/mcrypt/mcrypt.c:1.45.2.1 --- php4/ext/mcrypt/mcrypt.c:1.45 Sun Feb 25 22:07:02 2001 +++ php4/ext/mcrypt/mcrypt.cSat Mar 17 06:55:24 2001 @@ -1211,7 +1211,7 @@ int block_size, max_key_length, use_key_length, i, count, iv_size; unsigned long int data_size; int *key_length_sizes; - char *key_s, *iv_s; + char *key_s = NULL, *iv_s; char *data_s; MCRYPT td; MCLS_FETCH(); @@ -1309,6 +1309,8 @@ mcrypt_generic_end (td); if (iv_s != NULL) efree (iv_s); + if (key_s != NULL) + efree (key_s); efree (data_s); mcrypt_module_close (td); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] header:(location) error
Brett, I only have conditional logic above my header() call... this page is processing form input and does a redirect based on the result? Will this not work? Thank you [EMAIL PROTECTED] ("Brett") wrote in 02b401c0aea2$34676460$e1214ed8@bcnu: I am receiving the following error from my app, and I'd be gratefull if somebody would point out the usual cause of it. I am doing a redirect based on a form validation routine. Thank you. Warning: Cannot add header information - headers already sent in /usr/home/stas/html/cathedral/scripts/act_save_resume.php on line 175 Make sure you have no whitespace above your ? ? tags. If any output is sent to the browser then you can not add a header, session, cookie. Brett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Headers
Thanks :-) Clayton Dukes - Original Message - From: "Brett" [EMAIL PROTECTED] To: "PHP" [EMAIL PROTECTED] Sent: Saturday, March 17, 2001 9:17 AM Subject: Re: [PHP] Headers How do I do something like: if headers_sent=false include header.inc if (headers_sent() == false)include 'header.inc'; be sure and check the manual to make sure that "header_sent()" is the correct format. Brett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] header:(location) error
Do you have any white space outside of your ?php ? tags? That is considered as output by the parser. - Original Message - From: Stas Newdel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 17, 2001 6:56 AM Subject: Re: [PHP] header:(location) error Brett, I only have conditional logic above my header() call... this page is processing form input and does a redirect based on the result? Will this not work? Thank you [EMAIL PROTECTED] ("Brett") wrote in 02b401c0aea2$34676460$e1214ed8@bcnu: I am receiving the following error from my app, and I'd be gratefull if somebody would point out the usual cause of it. I am doing a redirect based on a form validation routine. Thank you. Warning: Cannot add header information - headers already sent in /usr/home/stas/html/cathedral/scripts/act_save_resume.php on line 175 Make sure you have no whitespace above your ? ? tags. If any output is sent to the browser then you can not add a header, session, cookie. Brett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] header:(location) error
Brett, I only have conditional logic above my header() call... this page is processing form input and does a redirect based on the result? Will this not work? If there is a single empty line above your first ? tag then that will cause the error. If you post yor code it will be more helpful to understand. Brett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Form problem...
Hi all, I am currently having problems with my PHP form I have made. The form is working fine, and does everything I want it to, except for one minor problem that only I can see. The output to the user is fine, but when I recieve the contents of the users data from the form, and they have things like quotation marks, it appears in the text. For example, if they wrote; "it's" It is outputted as: "it/'s" in my email. How do I get rid of this? I have tried several things stripslashes, addslashes, htmlspecialchars etc... But I'm not quite sure how to go about it. Any help would be appreciated. Thanks, Regards, SK _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear Cache.php /pear/Cache Output.php
chregu Sat Mar 17 08:06:31 2001 EDT Modified files: /php4/pear Cache.php /php4/pear/CacheOutput.php Log: GarbageCollection was moved into a PEAR-Deconstructor Index: php4/pear/Cache.php diff -u php4/pear/Cache.php:1.7 php4/pear/Cache.php:1.8 --- php4/pear/Cache.php:1.7 Thu Mar 8 12:41:39 2001 +++ php4/pear/Cache.php Sat Mar 17 08:06:31 2001 @@ -16,7 +16,7 @@ // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // -// $Id: Cache.php,v 1.7 2001/03/08 20:41:39 uw Exp $ +// $Id: Cache.php,v 1.8 2001/03/17 16:06:31 chregu Exp $ require_once "Cache/Error.php"; @@ -25,12 +25,16 @@ * * TODO: Simple usage example goes here. * +* WARNING: No File/DB-Table-Row locking is implemented yet, +* it's possible, that you get corrupted data-entries under +* bad circumstances (especially with the file container) +* * @author Ulf Wendel [EMAIL PROTECTED] -* @version $Id: Cache.php,v 1.7 2001/03/08 20:41:39 uw Exp $ +* @version $Id: Cache.php,v 1.8 2001/03/17 16:06:31 chregu Exp $ * @package Cache -* @access public +* @access public */ -class Cache { +class Cache extends PEAR { /** * Disables the caching. @@ -45,8 +49,8 @@ /** * Garbage collection: probability in seconds * -* If set to a value above 0 a garbage collection will -* flush all cache entries older than the specified number +* If set to a value above 0 a garbage collection will +* flush all cache entries older than the specified number * of seconds. * * @var integer @@ -68,35 +72,40 @@ /** * Storage container object. -* +* * @var object Cache_Container -*/ +*/ var $container; // // public methods // -/** +/** * * @paramstring Name of storage container class * @paramarray Array with storage class dependend config options */ function Cache($storage_driver, $storage_options = "") { +$this-PEAR(); $storage_driver = strtolower($storage_driver); $storage_class = 'Cache_Container_' . $storage_driver; $storage_classfile = 'Cache/Container/' . $storage_driver . '.php'; include_once $storage_classfile; $this-container = new $storage_class($storage_options); +} + +//deconstructor +function _Cache() +{ $this-garbageCollection(); - } /** * Returns the requested dataset it if exists and is not expired -* +* * @paramstring dataset ID * @paramstring cache group * @return mixed cached data or NULL on failure @@ -105,16 +114,16 @@ function get($id, $group = "default") { if ($this-no_cache) return ""; - + if ($this-isCached($id, $group) !$this-isExpired($id, $group)) return $this-load($id, $group); - -return NULL; + +return NULL; } // end func get /** * Stores the given data in the cache. -* +* * @paramstring dataset ID used as cache identifier * @parammixed data to cache * @paraminteger lifetime of the cached data in seconds - 0 for endless @@ -125,13 +134,13 @@ function save($id, $data, $expires = 0, $group = "default") { if ($this-no_cache) return true; - + return $this-container-save($id, $data, $expires, $group, ""); } // end func save /** * Stores a dataset without additional userdefined data. -* +* * @paramstring dataset ID * @parammixed data to store * @paramstring additional userdefined data @@ -151,16 +160,16 @@ /** * Loads the given ID from the cache. -* +* * @paramstring dataset ID * @paramstring cache group -* @return mixed cached data or NULL on failure +* @return mixed cached data or NULL on failure * @access public */ function load($id, $group = "default") { if ($this-no_cache) return ""; - + return $this-container-load($id, $group); } // end func load @@ -176,13 +185,13 @@ function getUserdata($id, $group = "default") { if ($this-no_cache) return ""; - + return $this-container-getUserdata($id, $group); } // end func getUserdata /** * Removes the specified dataset from the cache. -* +* * @paramstring dataset ID * @paramstring cache group * @return boolean @@ -191,28 +200,28 @@ function delete($id, $group = "default") { if ($this-no_cache) return true; - + return $this-container-delete($id, $group); } // end func delete /**
[PHP] submit button
IS there a way of making sure that a submit button cant be pressed twice.I am using a form to send an email and dont want two emails showing up. TIA george -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache/Container file.php
chregu Sat Mar 17 08:07:42 2001 EDT Modified files: /php4/pear/Cache/Container file.php Log: GarbageCollection didn't work properly (wanted to delete files, relative paths don't work in deconstructors) Index: php4/pear/Cache/Container/file.php diff -u php4/pear/Cache/Container/file.php:1.8 php4/pear/Cache/Container/file.php:1.9 --- php4/pear/Cache/Container/file.php:1.8 Thu Mar 8 12:39:16 2001 +++ php4/pear/Cache/Container/file.php Sat Mar 17 08:07:42 2001 @@ -16,7 +16,7 @@ // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // -// $Id: file.php,v 1.8 2001/03/08 20:39:16 uw Exp $ +// $Id: file.php,v 1.9 2001/03/17 16:07:42 chregu Exp $ require_once 'Cache/Container.php'; @@ -24,29 +24,29 @@ * Stores cache contents in a file. * * @author Ulf Wendel [EMAIL PROTECTED] -* @version $Id: file.php,v 1.8 2001/03/08 20:39:16 uw Exp $ +* @version $Id: file.php,v 1.9 2001/03/17 16:07:42 chregu Exp $ */ class Cache_Container_file extends Cache_Container { /** * Directory where to put the cache files. -* +* * @var string Make sure to add a trailing slash */ var $cache_dir = ""; /** * Filename prefix for cache files. -* +* * You can use the filename prefix to implement a "domain" based cache or just -* to give the files a more descriptive name. The word "domain" is borroed from -* a user authentification system. One user id (cached dataset with the ID x) +* to give the files a more descriptive name. The word "domain" is borroed from +* a user authentification system. One user id (cached dataset with the ID x) * may exists in different domains (different filename prefix). You might want * to use this to have different cache values for a production, development and * quality assurance system. If you want the production cache not to be influenced * by the quality assurance activities, use different filename prefixes for them. -* -* I personally don't think that you'll never need this, but 640kb happend to be +* +* I personally don't think that you'll never need this, but 640kb happend to be * not enough, so... you know what I mean. If you find a useful application of the * feature please update this inline doc. * @@ -56,7 +56,7 @@ /** * Creates the cache directory if neccessary -* +* * @paramarray Config options: ["cache_dir" = ..., "filename_prefix" = ...] */ function Cache_Container_file($options = "") { @@ -65,6 +65,11 @@ clearstatcache(); +//make relative paths absolute for use in deconstructor. +// it looks like the deconstructor has problems with relative paths +if (preg_match("/\.+/",$this-cache_dir)) +$this-cache_dir=realpath(getcwd()."/".$this-cache_dir)."/"; + if (!file_exists($this-cache_dir) || !is_dir($this-cache_dir)) mkdir($this-cache_dir, 0755); } // end func contructor @@ -92,7 +97,7 @@ /** * Stores a dataset. -* +* * WARNING: If you supply userdata it must not contain any linebreaks, * otherwise it will break the filestructure. */ @@ -119,7 +124,7 @@ return true; } // end func save - + function delete($id, $group) { $this-flushPreload($id, $group); @@ -147,20 +152,20 @@ function idExists($id, $group) { return file_exists($this-getFilename($id, $group)); - + } // end func idExists /** * Deletes all expired files. -* +* * Garbage collection for files is a rather "expensive", "long time" -* operation. All files in the cache directory have to be examined which -* means that they must be opened for reading, the expiration date has to be +* operation. All files in the cache directory have to be examined which +* means that they must be opened for reading, the expiration date has to be * read from them and if neccessary they have to be unlinked (removed). * If you have a user comment for a good default gc probability please add it to * to the inline docs. -* -* @paramstring directory to examine - don't sets this parameter, it's used for a +* +* @paramstring directory to examine - don't sets this parameter, it's used +for a * recursive function call! */ function garbageCollection($dir = "") { @@ -177,8 +182,10 @@ continue; $file = $dir . $file; -if (is_dir($file)) +if (is_dir($file)) { $this-garbageCollection($file . "/"); +continue; +} // skip trouble makers but inform the user if (!($fh = @fopen($file, "rb"))) { @@ -186,7 +193,7 @@ continue;
[PHP] Re: Can you recommend an ISP with the following?
I've started using javapie.com. Weird name and terrible site design. But they are cheap and provide all you're asking for below. Their tech support is responsive. They have always responded within a day. You have to send the a picture id to get ssh access. I'm looking to move from an old Web host (stormweb.net) that has entirely stopped responding to customer support emails. I liked what they had to offer, before they became unresponsive, so I'm looking for a similar ISP with: *PHP4 *MySQL *Telnet access *Decent Support *Preferably a Cobalt server (or one with a VERY good Web-based administrator, most other types of Web administrators I've seen have been clunky and a PITA) *Pretty Cheap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mySQL - Swap data in a field between two rows
There must be an easy way, but it escapes me. How can I switch the data in a feild of one row with the data in that field of another row? example: row: id=1 fname=John lname=Doe row: id=2 fname=Mary lname=Poppins to: row: id=2 fname=John lname=Doe row: id=1 fname=Mary lname=Poppins Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] URL parsing
I have heard that the new standard for URLS is ...test.php?op=3;op2=6... using the semi colon as a seperator. Is this currently supported by php 4.0.3? Cheers Dave Smith -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] urlencode
Help - I've a problem when using urlencode/decode functions (same with rawurl...). If I encode : mnemonic = "lnkphoto" I get: mnemonic+%3D++%22lnkphoto%22 And if decode it during the same script execution it converts back to exactly: mnemonic = "lnkphoto" which is what I'd expect. However, if I pass this value as a URL argument and decode it in the receiving script I get: mnemonic = \"lnkphoto\" which causes me all sorts of problems! Is this a "feature" or have I misunderstood the way this should work? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] urlencode
You have magic_quotes_runtime enabled which causes this behaviour. You can disable it by turning it off in your PHP.ini. See http://php.net/manual "rkirk.com Mail" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Help - I've a problem when using urlencode/decode functions (same with rawurl...). If I encode : mnemonic = "lnkphoto" I get: mnemonic+%3D++%22lnkphoto%22 And if decode it during the same script execution it converts back to exactly: mnemonic = "lnkphoto" which is what I'd expect. However, if I pass this value as a URL argument and decode it in the receiving script I get: mnemonic = \"lnkphoto\" which causes me all sorts of problems! Is this a "feature" or have I misunderstood the way this should work? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mySQL - Swap data in a field between two rows
I don't mean to be argumentative, but why would you need to do this? A key field is usually intended to uniquely identify a row and nothing more, the actual value of the key (whether the id is 1 or 2) *should* be immaterial. I'm probably over simplifying this, but are you sure you really need to do this? Regards, Gary H. ""Vincent P. Cocciolone"" [EMAIL PROTECTED] wrote in message 001001c0aeff$ce098dc0$[EMAIL PROTECTED]">news:001001c0aeff$ce098dc0$[EMAIL PROTECTED]... There must be an easy way, but it escapes me. How can I switch the data in a feild of one row with the data in that field of another row? example: row: id=1 fname=John lname=Doe row: id=2 fname=Mary lname=Poppins to: row: id=2 fname=John lname=Doe row: id=1 fname=Mary lname=Poppins Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] avoiding redirect
From memory, 3 will delay 3 seconds before redirect. Change to : printf ("meta http-equiv=\"refresh\" content=\"0;URL=http://coolsite/test/newfile.html\""); mat t [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a form that allows user to either upload a file from the client to the server or take the contents of the textarea and dump it in a new file on the server. Unfortunately I have tried to make the form write the new file to the server and at the same time redirect to the this new file. It seems that php takes a second to write the new file and therefore only works if I delay the process by redirecting as follows: printf ("meta http-equiv=\"refresh\" content=\"3;URL=http://coolsite/test/newfile.html\""); Is there any better process I can use? _ Pick up your email anywhere in the world --- http://www.remail.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] submit button
You will have to use JavaScript. Use the following: document.poster.action.disabled=true; // Disable Submit Preview button Or, if you aren't having it within a form, put the javascript in the end of the page and write: document.btnSend.disabled=true; Note that the first code disables ALL "action" buttons... - Richard ""george"" [EMAIL PROTECTED] wrote in message 99029b$78h$[EMAIL PROTECTED]">news:99029b$78h$[EMAIL PROTECTED]... IS there a way of making sure that a submit button cant be pressed twice.I am using a form to send an email and dont want two emails showing up. TIA george -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] urlencode
No, its set to "off". -Original Message- From: John Lim [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 17, 2001 5:14 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] urlencode You have magic_quotes_runtime enabled which causes this behaviour. You can disable it by turning it off in your PHP.ini. See http://php.net/manual "rkirk.com Mail" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Help - I've a problem when using urlencode/decode functions (same with rawurl...). If I encode : mnemonic = "lnkphoto" I get: mnemonic+%3D++%22lnkphoto%22 And if decode it during the same script execution it converts back to exactly: mnemonic = "lnkphoto" which is what I'd expect. However, if I pass this value as a URL argument and decode it in the receiving script I get: mnemonic = \"lnkphoto\" which causes me all sorts of problems! Is this a "feature" or have I misunderstood the way this should work? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] JDBC? Was: [PHP] Hello! PHP
I'm not quite sure what you mean. You use a JDBC driver to connect your java program to an sql db. PHP has an abstracted db layer which parallels the function of JDBC for the php environment. PHP also has db-specific API's, which tend to be somewhat faster and can take advantage of specific db features. Does that help? J on 3/16/01 7:36 PM, andrew at [EMAIL PROTECTED] wrote: On a related noted, does PHP have JDBC support? I'm unable to find anything about this - anyone know if it's possible? regards, andrew -- Julian Wood Learning Technologies and Digital Media University of Calgary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] JDBC? Was: [PHP] Hello! PHP
actually, just wondering if PHP can use JDBC drivers to connect to databases. what is the 'abstracted db layer' that you mention? regards, andrew On 3/17/01 2:52 PM, "Julian Wood" [EMAIL PROTECTED] wrote: I'm not quite sure what you mean. You use a JDBC driver to connect your java program to an sql db. PHP has an abstracted db layer which parallels the function of JDBC for the php environment. PHP also has db-specific API's, which tend to be somewhat faster and can take advantage of specific db features. Does that help? J on 3/16/01 7:36 PM, andrew at [EMAIL PROTECTED] wrote: On a related noted, does PHP have JDBC support? I'm unable to find anything about this - anyone know if it's possible? regards, andrew -- Julian Wood Learning Technologies and Digital Media University of Calgary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] include() suggestion
I didn't know where else to post feature requests so I'll post it here. Could we get included files to not merely be sucked in to the file that is including it but still think of it as a distinctive file in terms of getting debug output for errors. The reasons for this are 2 fold: 1) You could see all the files run by a particular page and not have to trace through files to see all the files which are called during a request to the server. 2) For error messages, it would give you the line number of the particular file that has the error and not the line number of the merged single file. For anyone who has used Cold Fusion, you'll know what I mean by how this should work. This would be a MAJOR improvement for making debugging during development easier. Thanks. Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/standard php_string.h
svanegmond Sat Mar 17 12:35:38 2001 EDT Modified files: /php4/ext/standard php_string.h Log: fixed a (C++) warning about implicit conversion from void* Index: php4/ext/standard/php_string.h diff -u php4/ext/standard/php_string.h:1.36 php4/ext/standard/php_string.h:1.37 --- php4/ext/standard/php_string.h:1.36 Sun Feb 25 22:07:23 2001 +++ php4/ext/standard/php_string.h Sat Mar 17 12:35:38 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php_string.h,v 1.36 2001/02/26 06:07:23 andi Exp $ */ +/* $Id: php_string.h,v 1.37 2001/03/17 20:35:38 svanegmond Exp $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ @@ -122,7 +122,7 @@ char *s = NULL; for(; p = end - needle_len - (s = memchr(p, *needle, end - p - needle_len + 1)); p = s + 1) { + (s = (char*)memchr(p, *needle, end - p - needle_len + 1)); p = +s + 1) { if(memcmp(s, needle, needle_len) == 0) return s; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] JDBC? Was: [PHP] Hello! PHP
No - PHP has it's own drivers, just like perl has it's own (DBI), and java has it's own (JDBC). As for PHP's abstraction layer, PHP comes built with one for dbm style db's (http://www.php.net/manual/en/ref.dba.php), but not for sql type db's. Several abstraction layer projects for sql db's have been mentioned on the list - I have never used any of them - just the db-specific API's. Try ADODB - there's a tutorial here: http://php.weblogs.com/adodb_tutorial J on 3/17/01 1:10 PM, andrew at [EMAIL PROTECTED] wrote: actually, just wondering if PHP can use JDBC drivers to connect to databases. what is the 'abstracted db layer' that you mention? regards, andrew On 3/17/01 2:52 PM, "Julian Wood" [EMAIL PROTECTED] wrote: I'm not quite sure what you mean. You use a JDBC driver to connect your java program to an sql db. PHP has an abstracted db layer which parallels the function of JDBC for the php environment. PHP also has db-specific API's, which tend to be somewhat faster and can take advantage of specific db features. Does that help? J on 3/16/01 7:36 PM, andrew at [EMAIL PROTECTED] wrote: On a related noted, does PHP have JDBC support? I'm unable to find anything about this - anyone know if it's possible? regards, andrew -- Julian Wood Learning Technologies and Digital Media University of Calgary -- Julian Wood Learning Technologies and Digital Media University of Calgary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] form post without pathinfo
Hi :-) How can I convert from this: form method=POST action="? echo $PHP_SELF; ?/approve" /form ...snip } elseif ($pathinfo == "/approve") { do something... to something that posts to itself without altering the path? My problem is, I'm using themes which are dependent on the path, so if I post using the method above, the path changes and screws up the images, colors, etc after the user submits. TIA! Clayton Dukes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Executing a string with both html and php inside it..
Hey! Shaun, I'm really glad to say that I finally solved the problem I had with "executing a string that contains both HTML and PHP inside it", and it's all thanks to you! Thank you very much - Aviv Revach At 10:37 15/03/01 -0500, you wrote: Hey, I glanced over your message, and you can use eval to execute php/html, but you have to open and close the ? ? tags when you use it because eval is in php mode, not html mode. eval('?" . $htmlandphp . '?'); On Wed, 14 Mar 2001, Aviv Revach wrote: Hey! I would like to thank you and Mark for your quick reply. What am I trying to accomplish is the following: I have created an engine which separates my website's code and design. The code is stored in one file(code.txt) and the design in another(design.txt). The engine loads up parts of each file in order to create the final result, meaning - * It prints the "htmlhead" etc.. * It prints DESIGN.TXT's head * It prints CODE.TXT's head * It prints "/headbody" etc.. * It prints part of DESIGN.TXT's body * It prints CODE.TXT's body * It prints the second-part of the DESIGN.TXT's body * It prints "/body/html" That's the general idea of what the engine does, but it's doing other things as well. The engine works the way it does because I wanted to have the entire content and the entire design all in 2 separate files. Most of the engines I've seen so far, used 3 different files for the design, and included them in different places inside their content. I don't wish to do that.. Now, all worked fine until a while go, I used the 'echo' command in order to print the strings that contain content/design HTML code. The troubles began when I added PHP code to my content - The PHP tags were IGNORED... ! Now, after I've told you all the things you should know, I ask for your assistance. What do you suggest me to do? Thank you in advance - Aviv Revach At 13:26 15/03/01 +0100, Christian Reiniger wrote: On Wednesday 14 March 2001 12:50, you wrote: My string contains HTML tags with PHP code inside(in '?php' and '?' tags), not only PHP as eval() requires. Do you have any other suggestion? AFAIK there's no other way than using include(). Why do you need that anyway? What should I do in order to execute the next string: $str = "html\n" $str .= "blabla\n"; $str .= " ?php echo \"hello!\"; ?\n"; $str .= "blabla\n"; $str .= "/html\n"; When I tried using 'echo' with the string, but the php code didn't work... -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Pretty cool, the kind of power information technology puts in our hands these days. - Securityfocus on probing 3600 hosts for known problems in 3 weeks BRILLIANeT Website - http://www.brillianet.com/ -- BRILLIANeT Website - http://www.brillianet.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Combining Perl and PHP
Has anyone heard of calling Perl libraries from PHP? I have seen it done with Java classes but it would be great if there was a way to do it with Perl. Thanks! Matthew Hanna [EMAIL PROTECTED]
RE: [PHP] include() suggestion
On 17-Mar-01 Steve Wardell wrote: I didn't know where else to post feature requests so I'll post it here. Could we get included files to not merely be sucked in to the file that is including it but still think of it as a distinctive file in terms of getting debug output for errors. The reasons for this are 2 fold: 1) You could see all the files run by a particular page and not have to trace through files to see all the files which are called during a request to the server. 2) For error messages, it would give you the line number of the particular file that has the error and not the line number of the merged single file. Errm ... Not sure what you mean by 'the line number of the merged single file.' ? a syntax error will mention the correct file unless you don't close a block. For trace debuging i use (in common.php): function debug($fl, $ln, $msg='') { global $debug; if (! empty($debug)) printf("DIV ALIGN=\"LEFT\"FONT SIZE=\"-1\"%s %s:\n%s/FONT/DIV", $fl , $ln ,$msg); } and used as : $qry="select id, name, contact, email, addr1, addr2, city, state, 1zip, country, left(datesigned,10) as ds from webmaster where id=$qwid"; debug(__FILE__,__LINE__, $qry); $res = mysql_query($qry); if ( $res) { ... just add debug=1 to the url to trace out execution. Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the bureaucrats won't. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /main main.c php_ini.c php_ini.h
zeevSat Mar 17 15:35:32 2001 EDT Modified files: /php4/main main.c php_ini.c php_ini.h Log: Recode delayed loading in a much simpler way (switched back to php_ini.c 1.49) Index: php4/main/main.c diff -u php4/main/main.c:1.356 php4/main/main.c:1.357 --- php4/main/main.c:1.356 Wed Mar 7 08:33:13 2001 +++ php4/main/main.cSat Mar 17 15:35:32 2001 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.356 2001/03/07 16:33:13 fmk Exp $ */ +/* $Id: main.c,v 1.357 2001/03/17 23:35:32 zeev Exp $ */ #include stdio.h @@ -870,10 +870,7 @@ which is always an internal extension and to be initialized ahead of all other internals */ - if (php_startup_loaded_extensions() == FAILURE) { - php_printf("Unable to start loaded modules\n"); - return FAILURE; - } + php_ini_delayed_modules_startup(); /* disable certain functions as requested by php.ini */ php_disable_functions(); Index: php4/main/php_ini.c diff -u php4/main/php_ini.c:1.54 php4/main/php_ini.c:1.55 --- php4/main/php_ini.c:1.54Tue Mar 6 03:38:55 2001 +++ php4/main/php_ini.c Sat Mar 17 15:35:32 2001 @@ -1,18 +1,18 @@ /* +--+ - | PHP version 4.0 | + | PHP version 4.0 + | +--+ - | Copyright (c) 1997-2001 The PHP Group| + | Copyright (c) 1997-2001 The PHP Group + | +--+ - | This source file is subject to version 2.02 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at + | + | http://www.php.net/license/2_02.txt. + | | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | [EMAIL PROTECTED] so we can mail you a copy immediately. | + | obtain it through the world-wide-web, please send a note to | + | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ - | Author: Zeev Suraski [EMAIL PROTECTED] | + | Author: Zeev Suraski [EMAIL PROTECTED] + | +--+ */ @@ -24,15 +24,19 @@ #include "ext/standard/dl.h" #include "zend_extensions.h" -/* True globals */ -static HashTable configuration_hash; -PHPAPI char *php_ini_opened_path=NULL; typedef struct _php_extension_lists { zend_llist engine; zend_llist functions; } php_extension_lists; + +/* True globals */ +static HashTable configuration_hash; +PHPAPI char *php_ini_opened_path=NULL; +static php_extension_lists extension_lists; + + static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type) { if (ini_entry-displayer) { @@ -121,9 +125,8 @@ } } -static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg_list) +static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, void +*arg) { - php_extension_lists *extension_lists =(php_extension_lists * )arg_list; switch (callback_type) { case ZEND_INI_PARSER_ENTRY: { zval *entry; @@ -132,12 +135,16 @@ break; } if (!strcasecmp(Z_STRVAL_P(arg1), "extension")) { /* load function module */ - char *extension_name = estrndup(Z_STRVAL_P(arg2), Z_STRLEN_P(arg2)); - zend_llist_add_element(extension_lists-functions, extension_name); + zval copy; + + copy = *arg2; + zval_copy_ctor(copy); + copy.refcount = 0; +
Re: [PHP] include() suggestion
Say you have index.php and 20 lines into index.php you include file.inc and there's an error on line 30 of file.inc, but I'm pretty sure PHP would say there was an error on line 50 of index.php and not like 30 of file.inc. It doesn't keep track of included files as separate files that are called but rather sort of merges it in memory into one file to run it seems. Steve "Don Read" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On 17-Mar-01 Steve Wardell wrote: I didn't know where else to post feature requests so I'll post it here. Could we get included files to not merely be sucked in to the file that is including it but still think of it as a distinctive file in terms of getting debug output for errors. The reasons for this are 2 fold: 1) You could see all the files run by a particular page and not have to trace through files to see all the files which are called during a request to the server. 2) For error messages, it would give you the line number of the particular file that has the error and not the line number of the merged single file. Errm ... Not sure what you mean by 'the line number of the merged single file.' ? a syntax error will mention the correct file unless you don't close a block. For trace debuging i use (in common.php): function debug($fl, $ln, $msg='') { global $debug; if (! empty($debug)) printf("DIV ALIGN=\"LEFT\"FONT SIZE=\"-1\"%s %s:\n%s/FONT/DIV", $fl , $ln ,$msg); } and used as : $qry="select id, name, contact, email, addr1, addr2, city, state, 1zip, country, left(datesigned,10) as ds from webmaster where id=$qwid"; debug(__FILE__,__LINE__, $qry); $res = mysql_query($qry); if ( $res) { ... just add debug=1 to the url to trace out execution. Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the bureaucrats won't. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4(PHP_4_0_5) /main main.c php_ini.c php_ini.h
zeevSat Mar 17 16:11:16 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4/main main.c php_ini.c php_ini.h Log: MFH Index: php4/main/main.c diff -u php4/main/main.c:1.356 php4/main/main.c:1.356.2.1 --- php4/main/main.c:1.356 Wed Mar 7 08:33:13 2001 +++ php4/main/main.cSat Mar 17 16:11:15 2001 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.356 2001/03/07 16:33:13 fmk Exp $ */ +/* $Id: main.c,v 1.356.2.1 2001/03/18 00:11:15 zeev Exp $ */ #include stdio.h @@ -870,10 +870,7 @@ which is always an internal extension and to be initialized ahead of all other internals */ - if (php_startup_loaded_extensions() == FAILURE) { - php_printf("Unable to start loaded modules\n"); - return FAILURE; - } + php_ini_delayed_modules_startup(); /* disable certain functions as requested by php.ini */ php_disable_functions(); Index: php4/main/php_ini.c diff -u php4/main/php_ini.c:1.54 php4/main/php_ini.c:1.54.2.1 --- php4/main/php_ini.c:1.54Tue Mar 6 03:38:55 2001 +++ php4/main/php_ini.c Sat Mar 17 16:11:15 2001 @@ -1,18 +1,18 @@ /* +--+ - | PHP version 4.0 | + | PHP version 4.0 + | +--+ - | Copyright (c) 1997-2001 The PHP Group| + | Copyright (c) 1997-2001 The PHP Group + | +--+ - | This source file is subject to version 2.02 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is| - | available at through the world-wide-web at | - | http://www.php.net/license/2_02.txt. | + | This source file is subject to version 2.02 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at + | + | http://www.php.net/license/2_02.txt. + | | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | [EMAIL PROTECTED] so we can mail you a copy immediately. | + | obtain it through the world-wide-web, please send a note to | + | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ - | Author: Zeev Suraski [EMAIL PROTECTED] | + | Author: Zeev Suraski [EMAIL PROTECTED] + | +--+ */ @@ -24,15 +24,19 @@ #include "ext/standard/dl.h" #include "zend_extensions.h" -/* True globals */ -static HashTable configuration_hash; -PHPAPI char *php_ini_opened_path=NULL; typedef struct _php_extension_lists { zend_llist engine; zend_llist functions; } php_extension_lists; + +/* True globals */ +static HashTable configuration_hash; +PHPAPI char *php_ini_opened_path=NULL; +static php_extension_lists extension_lists; + + static void php_ini_displayer_cb(zend_ini_entry *ini_entry, int type) { if (ini_entry-displayer) { @@ -121,9 +125,8 @@ } } -static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg_list) +static void php_config_ini_parser_cb(zval *arg1, zval *arg2, int callback_type, void +*arg) { - php_extension_lists *extension_lists =(php_extension_lists * )arg_list; switch (callback_type) { case ZEND_INI_PARSER_ENTRY: { zval *entry; @@ -132,12 +135,16 @@ break; } if (!strcasecmp(Z_STRVAL_P(arg1), "extension")) { /* load function module */ - char *extension_name = estrndup(Z_STRVAL_P(arg2), Z_STRLEN_P(arg2)); - zend_llist_add_element(extension_lists-functions, extension_name); + zval copy; + + copy = *arg2; + zval_copy_ctor(copy); + copy.refcount = 0; +
[PHP-CVS] cvs: pear /PEAR pear.c
ssb Sat Mar 17 16:34:31 2001 EDT Modified files: /pear/PEAR pear.c Log: * whoops, zend_is_callable suddenly got two more args Index: pear/PEAR/pear.c diff -u pear/PEAR/pear.c:1.4 pear/PEAR/pear.c:1.5 --- pear/PEAR/pear.c:1.4Thu Mar 15 20:57:02 2001 +++ pear/PEAR/pear.cSat Mar 17 16:34:30 2001 @@ -213,7 +213,7 @@ PHP_MINFO_FUNCTION(pear) { php_info_print_table_start(); - php_info_print_table_header(2, "PEAR", " $Revision: 1.4 $"); + php_info_print_table_header(2, "PEAR", " $Revision: 1.5 $"); php_info_print_table_end(); /* DISPLAY_INI_ENTRIES(); */ @@ -422,7 +422,7 @@ #define FIND_DEFAULT(h,p,v) (zend_hash_find((h), (p), sizeof(p), (void **) (v)) == SUCCESS Z_TYPE_PP(v) != IS_NULL) switch (Z_LVAL_PP(mode)) { case PEAR_ERROR_CALLBACK: -if ((Z_TYPE_PP(options) == IS_NULL || !zend_is_callable(*options)) +if ((Z_TYPE_PP(options) == IS_NULL || !zend_is_callable(*options, 0, +NULL)) !FIND_DEFAULT(this-value.obj.properties, "_default_error_callback", options) !FIND_DEFAULT(EG(symbol_table), "_PEAR_default_error_callback", options)) { @@ -647,7 +647,7 @@ efree(tmpstr); } if (Z_LVAL_PP(mode) PEAR_ERROR_CALLBACK) { -if (zend_is_callable(*options)) { +if (zend_is_callable(*options, 1, NULL)) { zval *retval, **args[1]; args[0] = this; if (call_user_function_ex(EG(function_table), NULL, *options, retval, 1, args, 1, NULL) == FAILURE) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: CVSROOT / avail cvsusers gen_acl_file.m4
rasmus Sat Mar 17 16:37:01 2001 EDT Modified files: /CVSROOTavail cvsusers gen_acl_file.m4 Log: CVS account for Fredrik Öhrn Index: CVSROOT/avail diff -u CVSROOT/avail:1.119 CVSROOT/avail:1.120 --- CVSROOT/avail:1.119 Thu Mar 15 17:15:02 2001 +++ CVSROOT/avail Sat Mar 17 16:37:01 2001 @@ -2,12 +2,12 @@ unavail avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane|CVSROOT avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,cmv,tcobb,gareth,jah,eschmid,ronabop,derick,sterling,stas,phildriscoll,jmoore,andre,sniper,david,lyric,zimt,mk,goba,zak,jmcastagnetto|phpweb -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective|php4/pear,pearweb,pear -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber|php4,php3,php31,phpfi -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,hholzgra|functable +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,jon,rael,jlp,sbergmann,troels,urs,jpm,adaniel,tuupola,mj,ssb,metallic,heyesr,aj,andre,zimt,uw,jeichorn,bjoern,chregu,bkelly,tfromm,subjective|php4/pear,pearweb,pear +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn|php4,php3,php31,phpfi +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,ohrn,hholzgra|functable avail|rasmus,sterling,jimw|pres avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin,cnewbill|qaweb -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,sasha,camber,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash,berto,leobopp,tcr,subjective|phpdoc
Re: [PHP] include() suggestion
On 18-Mar-01 Steve Wardell wrote: Say you have index.php and 20 lines into index.php you include file.inc and there's an error on line 30 of file.inc, but I'm pretty sure PHP would say there was an error on line 50 of index.php and not like 30 of file.inc. It doesn't keep track of included files as separate files that are called but rather sort of merges it in memory into one file to run it seems. just tried it, hitstats.php -- require('secure.php'); authuser("Statistics"); include('history.php'); include('fpstats.php'); if (isset($lint)) error_reporting(31); ... fpstats.php --- removed a semi-colon. browser output --- br bParse error/b: parse error in bfpstats.php/b on line b130/bbr -- PHP/3.0.18 (maybe a 4.0 thing ?) Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the bureaucrats won't. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Anyone good with Java??
I know php can't do this but I hoped somehere would know how. I have a page with many select boxes(drop downs). I want it so that if someone selects a value, it is removed from all the others. And if they change it, the old value is returned to the other boxes. Any help would be appreciated
[PHP] how do i get a variable type?
hello all, let's say i have this: $a="varone=hello world|vartwo=2.44|varthree=100|"; now i do this: $b=explode('|',$a); $z=count($b); for ($x=0;$x$z;$x++) { $tmp=explode('=',$b[$x]); and i want to find out if $tmp[1] is a string or an integer (that's really all I need to determine so i can put together an SQL statement that puts single quotes around strings and none around integers). Obviously i won't know at design time all of the variables and their values. Thank you. -dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Oracle + PHP + RH 6.2 (and 7.0)
Hi, I was wondering if anyone has some links about articles, code snippets or tips regarding the use of oracle as rdbms and php. I have experience with mysql so I am considering the use of an abstraction layer to access so I could easily por existing apps. BTW. Does anybody know If the latest 8.1.7 works with RedHat 7.0 ? Is it possible to install just the necessary libs to compile and run php+apache with oracle support ? My web server is in a different machine than the actual db server and I would not like to install the whole package uncessary. Thanks. __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /main SAPI.c SAPI.h
zeevSat Mar 17 18:32:04 2001 EDT Modified files: /php4/main SAPI.c SAPI.h Log: These functions are not necessary - that's what sapi_register_post_entry() and sapi_unregister_post_entry() are for... Also, please maintain KR code layout, it's very messy to have different styles intermixed in the same codebase, and especially in the same files! Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.100 php4/main/SAPI.c:1.101 --- php4/main/SAPI.c:1.100 Sun Feb 25 22:07:30 2001 +++ php4/main/SAPI.cSat Mar 17 18:32:04 2001 @@ -538,49 +538,6 @@ zend_hash_del(known_post_content_types, post_entry-content_type, post_entry-content_type_len+1); } -SAPI_API int sapi_add_post_entry(char *content_type -, void (*post_reader)(SLS_D) -, void (*post_handler)(char *content_type_dup -, void *arg SLS_DC)) { - - sapi_post_entry *post_entry = (sapi_post_entry *)malloc(sizeof(sapi_post_entry)); - if(!post_entry) return 0; - - post_entry-content_type = strdup(content_type); - if(post_entry-content_type == NULL) return 0; - post_entry-content_type_len = strlen(content_type); - post_entry-post_reader = post_reader; - post_entry-post_handler = post_handler; - - return zend_hash_add(known_post_content_types -, post_entry-content_type -, post_entry-content_type_len+1 -, (void *) post_entry -, sizeof(sapi_post_entry) -, NULL -); -} - -SAPI_API void sapi_remove_post_entry(char *content_type) { - sapi_post_entry *post_entry; - - zend_hash_find(known_post_content_types - ,content_type - ,strlen(content_type)+1 - ,(void **)post_entry - ); - - if(post_entry != NULL) { - zend_hash_del(known_post_content_types - ,content_type - ,strlen(content_type)+1 - ); - free(post_entry-content_type); - free(post_entry); - } else { - php_error(E_WARNING,"unregister post handler failed in fdf"); - } -} SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(SLS_D)) { Index: php4/main/SAPI.h diff -u php4/main/SAPI.h:1.67 php4/main/SAPI.h:1.68 --- php4/main/SAPI.h:1.67 Sun Feb 25 22:07:31 2001 +++ php4/main/SAPI.hSat Mar 17 18:32:04 2001 @@ -146,10 +146,6 @@ SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entry); SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry); -SAPI_API int sapi_add_post_entry(char *content_type -, void (*post_reader)(SLS_D) -, void (*post_handler)(char *content_type_dup, void *arg SLS_DC)); -SAPI_API void sapi_remove_post_entry(char *content_type); SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry); SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(SLS_D)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Cant configure php4 from within shell script
OK - this one really is stumping me. I have a shell script that I'm running through bash on my linux server it includes: ./configure \ --with-apache=../apache_1.3.17 \ --with-gd \ --with-mysql \ --with-gdbm \ --with-mhash \ --enable-safe-mode \ --enable-magic-quotes \ --enable-apc \ --enable-ftp \ --enable-debug=no \ --enable-memory-limit=yes \ --enable-xml \ --enable-track-vars When I run it as part of the script, I get this: checking for working makeinfo... found Updated php_version.h checking whether to enable maintainer-specific portions of Makefiles... no checking host system type... Configuration name missing. Usage: ./config.sub CPU-MFR-OPSYS or ./config.sub ALIAS where ALIAS is a recognized configuration type. checking for gawk... gawk checking for bison... bison -y checking bison version... 1.25 (ok) checking for gcc... gcc checking whether the C compiler (gcc ) works... yes but when I run the same (cut and pasted from the shell script) ./configuration... command I get: checking for working makeinfo... found Updated php_version.h checking whether to enable maintainer-specific portions of Makefiles... no checking host system type... i686-pc-linux-gnu checking for gawk... gawk checking for bison... bison -y checking bison version... 1.25 (ok) checking for gcc... gcc checking whether the C compiler (gcc ) works... yes What gives? System is Linux 5.2 (Linux version 2.0.36 ), bash version is GNU bash, version 1.14.7(1) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/fdf fdf.c
zeevSat Mar 17 18:35:10 2001 EDT Modified files: /php4/ext/fdf fdf.c Log: Fix reference to nuked function Index: php4/ext/fdf/fdf.c diff -u php4/ext/fdf/fdf.c:1.39 php4/ext/fdf/fdf.c:1.40 --- php4/ext/fdf/fdf.c:1.39 Sun Feb 25 22:06:54 2001 +++ php4/ext/fdf/fdf.c Sat Mar 17 18:35:10 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: fdf.c,v 1.39 2001/02/26 06:06:54 andi Exp $ */ +/* $Id: fdf.c,v 1.40 2001/03/18 02:35:10 zeev Exp $ */ /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from http://beta1.adobe.com/ada/acrosdk/forms.html. */ @@ -115,7 +115,16 @@ { NULL, 0, NULL } }; +#define FDF_POST_CONTENT_TYPE "application/vnd.fdf" +static sapi_post_entry php_fdf_post_entry ={ + FDF_POST_CONTENT_TYPE, + sizeof(FDF_POST_CONTENT_TYPE)-1, + sapi_read_standard_form_data, + php_std_post_handler +}; + + PHP_MINIT_FUNCTION(fdf) { @@ -123,9 +132,9 @@ FDF_GLOBAL(le_fdf) = zend_register_list_destructors_ex(phpi_FDFClose, NULL, "fdf", module_number); /* add handler for Acrobat FDF form post requests */ - sapi_add_post_entry("application/vnd.fdf", php_default_post_reader, fdf_post_handler); + sapi_register_post_entry(php_fdf_post_entry); - /* Constants used by fdf_set_opt() */ + /* Constants used by fdf_set_opt() */ REGISTER_LONG_CONSTANT("FDFValue", FDFValue, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FDFStatus", FDFStatus, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FDFFile", FDFFile, CONST_CS | CONST_PERSISTENT); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 18 Mar 2001 02:35:17 -0000 Issue 573
php-general Digest 18 Mar 2001 02:35:17 - Issue 573 Topics (messages 44389 through 44421): Re: How no-cache some object? 44389 by: Boaz Yahav Re: Classes and Object Oriented Programming 44390 by: Derek Sivers Re: header:(location) error 44391 by: Stas Newdel 44393 by: Data Driven Design 44394 by: Brett Re: Headers 44392 by: Clayton Dukes Form problem... 44395 by: Good Fella 44400 by: rm submit button 44396 by: george 44405 by: Richard Re: Can you recommend an ISP with the following? 44397 by: Robert Morse mySQL - Swap data in a field between two rows 44398 by: Vincent P. Cocciolone 44403 by: Gary Huntress URL parsing 44399 by: Dave Smith urlencode 44401 by: rkirk.com Mail 44402 by: John Lim 44406 by: rkirk.com Mail Re: avoiding redirect 44404 by: John Lim Re: JDBC?Was: [PHP] Hello! PHP 44407 by: Julian Wood 44408 by: andrew 44410 by: Julian Wood include() suggestion 44409 by: Steve Wardell 44414 by: Don Read 44415 by: Steve Wardell 44416 by: Don Read form post without pathinfo 44411 by: Clayton Dukes Re: Executing a string with both html and php inside it.. 44412 by: Aviv Revach Combining Perl and PHP 44413 by: Matthew Hanna Anyone good with Java?? 44417 by: Chris Anderson how do i get a variable type? 44418 by: phpman 44420 by: Don Read Oracle + PHP + RH 6.2 (and 7.0) 44419 by: Robert Mena Cant configure php4 from within shell script 44421 by: Scott Brown 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] -- Hi Check out : http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=62 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Brett [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 17, 2001 4:33 PM To: PHP Subject: Re: [PHP] How no-cache some object? Hello, this probably no related to PHP, but I don't know where to ask. When retrieving and updating images from MySql record, I noticed Netscape sometimes fooled by cache values, then it won't show correct image but previous image instead. How can say to browsers 'hey, please don't cache this img src statement"? Note inside src there is PHP program img src="show.php?image= I read entire chapter 14.9 "cache control" from http doc but didn't understand . Thanks Mig Hello, Do a search for no cache in the archives or on google. I don't recall the exact code, but it has been covered a lot in this list. Brett -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Is there a good tutorial on Classes? http://www.zend.com/zend/tut/class-intro.php That's a really good one. Brett, I only have conditional logic above my header() call... this page is processing form input and does a redirect based on the result? Will this not work? Thank you [EMAIL PROTECTED] ("Brett") wrote in 02b401c0aea2$34676460$e1214ed8@bcnu: I am receiving the following error from my app, and I'd be gratefull if somebody would point out the usual cause of it. I am doing a redirect based on a form validation routine. Thank you. Warning: Cannot add header information - headers already sent in /usr/home/stas/html/cathedral/scripts/act_save_resume.php on line 175 Make sure you have no whitespace above your ? ? tags. If any output is sent to the browser then you can not add a header, session, cookie. Brett Do you have any white space outside of your ?php ? tags? That is considered as output by the parser. - Original Message - From: Stas Newdel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, March 17, 2001 6:56 AM Subject: Re: [PHP] header:(location) error Brett, I only have conditional logic above my header() call... this page is processing form input and does a redirect based on the result? Will this not work? Thank you [EMAIL PROTECTED] ("Brett") wrote in 02b401c0aea2$34676460$e1214ed8@bcnu: I am receiving the following error from my app, and I'd be gratefull if somebody would point out the usual cause of it. I am doing a redirect based on a form validation routine. Thank you. Warning: Cannot add header information - headers already sent in /usr/home/stas/html/cathedral/scripts/act_save_resume.php on line 175 Make sure you have no whitespace above your ? ? tags. If any output is sent to the browser then you can not add a
[PHP-CVS] cvs: php4(PHP_4_0_5) /main SAPI.c SAPI.h
zeevSat Mar 17 18:36:27 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4/main SAPI.c SAPI.h Log: MFH Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.100 php4/main/SAPI.c:1.100.2.1 --- php4/main/SAPI.c:1.100 Sun Feb 25 22:07:30 2001 +++ php4/main/SAPI.cSat Mar 17 18:36:27 2001 @@ -538,49 +538,6 @@ zend_hash_del(known_post_content_types, post_entry-content_type, post_entry-content_type_len+1); } -SAPI_API int sapi_add_post_entry(char *content_type -, void (*post_reader)(SLS_D) -, void (*post_handler)(char *content_type_dup -, void *arg SLS_DC)) { - - sapi_post_entry *post_entry = (sapi_post_entry *)malloc(sizeof(sapi_post_entry)); - if(!post_entry) return 0; - - post_entry-content_type = strdup(content_type); - if(post_entry-content_type == NULL) return 0; - post_entry-content_type_len = strlen(content_type); - post_entry-post_reader = post_reader; - post_entry-post_handler = post_handler; - - return zend_hash_add(known_post_content_types -, post_entry-content_type -, post_entry-content_type_len+1 -, (void *) post_entry -, sizeof(sapi_post_entry) -, NULL -); -} - -SAPI_API void sapi_remove_post_entry(char *content_type) { - sapi_post_entry *post_entry; - - zend_hash_find(known_post_content_types - ,content_type - ,strlen(content_type)+1 - ,(void **)post_entry - ); - - if(post_entry != NULL) { - zend_hash_del(known_post_content_types - ,content_type - ,strlen(content_type)+1 - ); - free(post_entry-content_type); - free(post_entry); - } else { - php_error(E_WARNING,"unregister post handler failed in fdf"); - } -} SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(SLS_D)) { Index: php4/main/SAPI.h diff -u php4/main/SAPI.h:1.67 php4/main/SAPI.h:1.67.2.1 --- php4/main/SAPI.h:1.67 Sun Feb 25 22:07:31 2001 +++ php4/main/SAPI.hSat Mar 17 18:36:27 2001 @@ -146,10 +146,6 @@ SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entry); SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry); -SAPI_API int sapi_add_post_entry(char *content_type -, void (*post_reader)(SLS_D) -, void (*post_handler)(char *content_type_dup, void *arg SLS_DC)); -SAPI_API void sapi_remove_post_entry(char *content_type); SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry); SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(SLS_D)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: Anyone good with Java??
I know php can't do this but I hoped somehere would know how. I have a page with many select boxes(drop downs). I want it so that if someone selects a value, it is removed from all the others. And if they change it, the old value is returned to the other boxes. Any help would be appreciatedI think you need Javascript? And I'd love s similar thing, select one and it changes other to appropriate sub menus. So, so selecting pets would get you dogscatsetc in the next pull down over. selelecting dogs would get you bysizebyfunction in the next pull down over. and selecting one of those would get the categories below that, etc, in the next pull down over. Pets Dogs bysize Poodles Pekinese Minatures small medium large huge byfunction indoor pet rodent catching hunting small animals hunting birds hunting big animals shepharding guard dogs Cats etc -- Sites by friends of mine: http://www.myhiddentreasures.com/ WARNING personal propaganda signature TAKE WHAT YOU LIKE AND LEAVE THE REST SINCE OUR GOVERNMENT WON'T PRESERVE OUR CLIMATE, IT'S UP TO US! Imagine ** yourself ** and your kids now an endangered species 1Inflate automobile tires to near maximum in summer, -2psi in winter 2add insulation to house and hot water heater, and refrigerator, 3combine trips in cars, make less of them 4buy cars, sports vehicles and recreational vehicles with good if not best mileage 4put awnings over windows is summer, remove in winter. 5 add solar hot water heating. 6Push for energy recycling clothes dryers 7 walk more, play outside with your kids! 8 let your grass grow to 3-4 inches, chokes weeds, saves water and energy, keeps house cooler 9 Put WHITE or REFLECTIVE materials on roofs to send energy back into space. 10 Vote for burial of logging slash onsite in logging areas for better watersheds and less burned vegetation. 11 compost your leaves and grass, bury in flower beds, lawns, gardens, or give away. 12 VOTE for energy and CO2 ratings on ALL products and foods. KNOW how much damage your purchases do to the climate. 13 Give your kids less stuff and more of you. 14 recycle everything you can 15 limit your children to an average 1 per adult between all your marriages. (Only REPLACE yourself, not expand the population) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Anyone good with Java??
[Chris] I know php can't do this but I hoped somehere would know how. I have a page with many select boxes(drop downs). I want it so that if someone selects a value, it is removed from all the others. And if they change it, the old value is returned to the other boxes. Any help would be appreciated -- Ryan Grove [EMAIL PROTECTED] http://wonko.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Editing Variables from another script.
I'm trying to create a form whereby I can edit the variables with just the form. It will be something like a form for me to change the database details(username,server,password) in a .inc I'm using. Is there anyway for me to pass information into another file's variable and have it saved in there? If anyone have seen Newspro (CGI) before, when you edit some parts in a form, the information will be saved. How can it be done in PHP? -- David Chua -
Re: [PHP] urlencode
Sorry, its magic_quotes_gpc -- i got confused. The magic_quotes_runtime one is for databases. Regards, John "Richard Kirk" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... No, its set to "off". -Original Message- From: John Lim [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 17, 2001 5:14 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] urlencode You have magic_quotes_runtime enabled which causes this behaviour. You can disable it by turning it off in your PHP.ini. See http://php.net/manual "rkirk.com Mail" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Help - I've a problem when using urlencode/decode functions (same with rawurl...). If I encode : mnemonic = "lnkphoto" I get: mnemonic+%3D++%22lnkphoto%22 And if decode it during the same script execution it converts back to exactly: mnemonic = "lnkphoto" which is what I'd expect. However, if I pass this value as a URL argument and decode it in the receiving script I get: mnemonic = \"lnkphoto\" which causes me all sorts of problems! Is this a "feature" or have I misunderstood the way this should work? Thanks -- -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] command that gives current location of script
I though in flipping through the manual that I had come across a command that gives the location of where the script is being run from, but I have been searching for half an hour and can't find it now. Isn't it something like $php_self? Anyone kow what I am talking about? Thanks, Andrew V. Romero to reply personally, remove all numbers from address. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /ext/fdf fdf.c
sniper Sat Mar 17 21:52:41 2001 EDT Modified files: /php4/ext/fdf fdf.c Log: Fix the fix. Plus killed some compile warnings. Index: php4/ext/fdf/fdf.c diff -u php4/ext/fdf/fdf.c:1.40 php4/ext/fdf/fdf.c:1.41 --- php4/ext/fdf/fdf.c:1.40 Sat Mar 17 18:35:10 2001 +++ php4/ext/fdf/fdf.c Sat Mar 17 21:52:40 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: fdf.c,v 1.40 2001/03/18 02:35:10 zeev Exp $ */ +/* $Id: fdf.c,v 1.41 2001/03/18 05:52:40 sniper Exp $ */ /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from http://beta1.adobe.com/ada/acrosdk/forms.html. */ @@ -108,20 +108,13 @@ (void)FDFClose(fdf); } -static sapi_post_entry supported_post_entries[] = { -#if HAVE_FDFLIB - { "application/vnd.fdf",sizeof("application/vnd.fdf")-1, php_default_post_reader, fdf_post_handler}, -#endif - { NULL, 0, NULL } -}; - #define FDF_POST_CONTENT_TYPE "application/vnd.fdf" static sapi_post_entry php_fdf_post_entry ={ FDF_POST_CONTENT_TYPE, sizeof(FDF_POST_CONTENT_TYPE)-1, sapi_read_standard_form_data, - php_std_post_handler + fdf_post_handler }; @@ -185,7 +178,7 @@ FDFErc err; /* remove handler for Acrobat FDF form post requests */ - sapi_remove_post_entry("application/vnd.fdf"); + sapi_unregister_post_entry(php_fdf_post_entry); #ifdef PHP_WIN32 return SUCCESS; @@ -778,10 +771,9 @@ char *name=NULL,*value=NULL,*p; int name_len=0,value_len=0; char *lastfieldname =NULL; - char *strtok_buf = NULL; char *filename = NULL; FDFErc err; - ASInt32 nBytes, datalen; + ASInt32 nBytes; zval *array_ptr = (zval *) arg; ELS_FETCH(); PLS_FETCH(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Expire data from form
Hi, I have set up a form to register the users to the site. The users are allowed to register only once. When the user submits the form the same script will check the validity of the form and displays error messages and if okay, updates the database. I want to set up an option in the form in which when the user once submits and after that if they click on the back button (browser back) it should say the 'page expired' as I have seen with some Perl scripts. The users should not be allowed to go back to the page and resubmit. Can any body suggest a way to accomplish this. thanks Sheni R Meledath [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] TraceRoute
Hi, Anyone able to tell me where i can get a traceroute php script from? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /main SAPI.c
sniper Sun Mar 18 00:00:10 2001 EDT Modified files: /php4/main SAPI.c Log: Fix possible crash if content-type is not set. Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.101 php4/main/SAPI.c:1.102 --- php4/main/SAPI.c:1.101 Sat Mar 17 18:32:04 2001 +++ php4/main/SAPI.cSun Mar 18 00:00:10 2001 @@ -97,7 +97,7 @@ SAPI_API void sapi_handle_post(void *arg SLS_DC) { - if (SG(request_info).post_entry) { + if (SG(request_info).post_entry SG(request_info).content_type_dup) { SG(request_info).post_entry-post_handler(SG(request_info).content_type_dup, arg SLS_CC); if (SG(request_info).post_data) { efree(SG(request_info).post_data); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] phpMyAdmin edit function not working
I've got mysql php running in a windows millenium system (yes, sad, I know), and I'm running phpmyadmin 2.1.0 Anyway, I have a database with three cells of information: item_name item_list item_description Each cell contains numerous pieces of data seperated by a symbol (for exploding into an array). There is alot of data in each cell, and when I go to choose "edit" or "delete" the browser does nothing. I thought it was just an IE error, but the same happens in Netscape 6.0 and Netscape 4.8. So I skimmed through the source, copied the URL and pasted it into a new window. Only about half of the URL pasted. The only thing I can figure is that the address is too long. If this is the case, I'm trying to find out if anyone has tried converting phpmyadmin to use form buttons as opposed to parsing the data directly through the URL as a way to bypass this. Or if no one has tried that (and god I hope you have) does anyone know of another database management program like this that DOES use form buttons? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]