RE: [PHP] Counter Help
Actually, I couldn't find the article number for that tutorial. I did, however, place a comment directly into that specific web page with the fix. Here is a direct link to the tutorial (I left the frames out): http://www.weberdev.com/ViewArticle.php3?ArticleID=30. Thanks. Navid -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 12:50 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help WeberDev will fix it ASAP if you tell it the number of the example :) Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Navid Yar [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 6:25 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help Chris, It worked! Thanks so much! Weberdev needs to fix it too. Navid -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 4:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Counter Help change $row[count] to $row['count'] it thinks the work [count] is some kind of conastant, it doesnt know you mean (string) 'count' -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Navid Yar"" [EMAIL PROTECTED] wrote in message 000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]... Can someone help me with this script? It is an example from weberdev.com. I ran it and it gave me the following error... -- Warning: Use of undefined constant count - assumed 'count' in c:\windows\desktop\localhost\examples\counter\counter1.php on line 27 25 The number 25 is the correct number for the counter, but how do I get rid of that error message that keeps coming up before the counter number (25)? I am testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL 3.23.33. Here is the script: HTML HEAD TITLE/TITLE /HEAD BODY !-- This example from http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg -- ?php $hostname = 'localhost'; $username = 'username'; $password = 'password'; $dbName = 'database'; MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database"); @mysql_select_db("$dbName") or die("Unable to select database"); $name = "$SCRIPT_NAME"; $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $row = mysql_fetch_array($result); if($row){ MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $count = $row[count]; }else{ MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad query: ".mysql_error()); $count = '1'; } echo $count; ? /BODY /HTML -- Navid -- 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] apache+php on MacOSX
Hi, I started running MacOSX beta on my mac, and noted that apache what present (and used as web sharing extention). The configuration made to apache from MacOSX beta out of the box is pretty basic, BUT I noticed that their where plenty of modules (mod_ssl, mod_perl, mod_dav, mod_php4, etc) installed but not configured. I tried to change the config of apache to load php as module: --- LoadModule php4_module libexec/libphp4.so AddModule mod_php4.c AddType application/x-httpd-php .php --- From the server-info and server-status pages I get the confirmation that PHP iss loaded, but if I start using a script, I get a parse error at the first line of code. The test file is a simple ?php echo phpinfo(); ?. Can anyone help me out on this? Does the php modile need extra libraries installed somewhere? Can I figure out why I get a parse error. I can't yet recompile things on MacOSX beta, so I need to find out how to get the prepackaged module -- Thierry Coopman - [EMAIL PROTECTED] My opinions are personal, and have really nothing or nothing to do with Keytrade! Macs suck. All real geeks have a character prompt. -- 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] $submit does not work! strange !!!!!!!!
Hi guys! I'm using a form that refreshes itself when submitting it! however when it's submitted i make a condition on the value of $submit so as to make some instructions but the problem is that the $submit is always empty but i can see that the page is reloaded when i submit the form. Thanks _ 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] PHP / Filemaker?
Hey This is my first question and mail to this list...hope u treat me decent =) My earlier work have been lasso/filemaker (mac) Ive been heard that PHP is coming strongly and I have no reason not to join. How is the relation between PHP/Filemaker? --* [knaSen] icq #23830427 -- 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/midgard midgard.c
davidg Fri Feb 23 01:22:09 2001 EDT Modified files: /php4/ext/midgard midgard.c Log: Removed constants registration, added a conversion table $midgard-types[$objtype] try var_dump($midgard) for more details Index: php4/ext/midgard/midgard.c diff -u php4/ext/midgard/midgard.c:1.14 php4/ext/midgard/midgard.c:1.15 --- php4/ext/midgard/midgard.c:1.14 Thu Feb 22 12:32:20 2001 +++ php4/ext/midgard/midgard.c Fri Feb 23 01:22:08 2001 @@ -1,4 +1,4 @@ -/* $Id: midgard.c,v 1.14 2001/02/22 20:32:20 davidg Exp $ +/* $Id: midgard.c,v 1.15 2001/02/23 09:22:08 davidg Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -72,6 +72,9 @@ MGD_FUNCTION(version); MGD_FUNCTION(get_midgard); MGD_FUNCTION(auth_midgard); +#if YOU_WANT_TO_TEST +MGD_FUNCTION(walk_tree); +#endif /* Every user visible function must have an entry in midgard_functions[]. */ @@ -292,6 +295,9 @@ MGD_FE(snippet, NULL) MGD_FE(eval, NULL) MGD_FE(register_filter, NULL) +#if YOU_WANT_TO_TEST +MGD_FE(walk_tree, NULL) +#endif {NULL, NULL, NULL} /* Must be the last line in midgard_functions[] */ }; @@ -362,11 +368,9 @@ return SUCCESS; } -#define MGD_REGISTER_LONG_CONSTANT(name,lval,flags) zend_register_long_constant((name),strlen(name)+1,(lval),(flags),module_number ELS_CC) /* Remove if there's nothing to do at request start */ PHP_RINIT_FUNCTION(midgard) { - int i; request_rec *r; module *midgard_module; @@ -406,13 +410,6 @@ return SUCCESS; } - /* register Midgard constants */ - for(i = 1; i MIDGARD_OBJECT_COUNT; i++) { - MGD_REGISTER_LONG_CONSTANT((char *)mgd_table_label[i], i, - CONST_CS | CONST_PERSISTENT); - - } - MGDG(mgd) = MGDG(rcfg)-mgd; ALLOC_INIT_ZVAL(MGDG(udf)); if(MGDG(udf)) array_init(MGDG(udf)); @@ -568,9 +565,9 @@ MGD_FUNCTION(get_midgard) { int i; - zval *argv; + zval *argv, *types; char **mm_argv; - long mm_argc; + long mm_argc; midgard *mgd = mgd_handle(); midgard_request_config *rcfg = mgd_rcfg(); @@ -607,6 +604,8 @@ /* EEH {HACK ALERT}: We add this property with hash_update manually since Zend doesn't offer a add_property_array. + DG {END HACK ALERT} TODO: replace by the following line in PHP 4.0.5 + add_property_zval(return_value, "argv", argv); */ zend_hash_update(return_value-value.obj.properties, "argv", 5, argv, sizeof(argv), NULL); @@ -615,6 +614,16 @@ add_property_stringl(return_value, "self", rcfg-req-uri, rcfg-self_len, 1); + + MAKE_STD_ZVAL(types); + array_init(types); + for (i = 1; i MIDGARD_OBJECT_COUNT; i++) { + add_assoc_long(types, (char *)mgd_table_extname[i], i); + } + + //add_property_zval(return_value, "types", types); + zend_hash_update(return_value-value.obj.properties, "types", 6, +types, sizeof(types), NULL); } MGD_FUNCTION(auth_midgard) @@ -740,6 +749,68 @@ zval_dtor(args[1]); } +#if YOU_WANT_TO_TEST +MGD_FUNCTION(walk_tree) +{ + zval **id, **level, **xparam, *xp[2], **order; + zval **midgard_user_call_func_name, **sort = NULL; + zval **tableid, **upfield; + CHECK_MGD; + + switch (ZEND_NUM_ARGS()) { + case 8: + if (zend_get_parameters_ex(8, tableid, upfield, + midgard_user_call_func_name, id, +level, xparam, order, sort) == FAILURE) { + WRONG_PARAM_COUNT; + } + break; + case 7: + if (zend_get_parameters_ex(7, tableid, upfield, + midgard_user_call_func_name, id, +level, xparam, order) == FAILURE) { + WRONG_PARAM_COUNT; + } else { + sort = NULL; + } + break; + case 6: + if (zend_get_parameters_ex(6, tableid, upfield, + midgard_user_call_func_name, id, +level, xparam) == FAILURE) { + WRONG_PARAM_COUNT; + } else { + order = NULL; + sort = NULL; + } + break; + default: + WRONG_PARAM_COUNT; + break; + } + + convert_to_long_ex(tableid); + if(!(*tableid)-value.lval) RETURN_FALSE; + convert_to_string_ex(upfield); + convert_to_string_ex(midgard_user_call_func_name); + convert_to_long_ex(level); + if (order) convert_to_long_ex(order); + convert_to_long_ex(id); + if(sort) convert_to_string_ex(sort); + + xp[0] = (*xparam); + xp[1] = (*midgard_user_call_func_name); + mgd_walk_table_tree(mgd_handle(), mgd_table_name[(*tableid)-value.lval], +
[PHP-CVS] cvs: php4 /ext/mnogosearch php_mnogo.c php_mnogo.h
gluke Fri Feb 23 02:34:49 2001 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c php_mnogo.h Log: Added ispell loading routines and date search limits in mnogosearch module. Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.17 php4/ext/mnogosearch/php_mnogo.c:1.18 --- php4/ext/mnogosearch/php_mnogo.c:1.17 Thu Feb 22 02:40:43 2001 +++ php4/ext/mnogosearch/php_mnogo.cFri Feb 23 02:34:49 2001 @@ -1,5 +1,5 @@ /* $Source: /local/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.17 2001/02/22 10:40:43 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.18 2001/02/23 10:34:49 gluke Exp $ */ /* +--+ @@ -44,26 +44,27 @@ #define UDM_FIELD_CRC 12 /* udm_set_agent_param constants */ -#define UDM_PARAM_PAGE_SIZE1 -#define UDM_PARAM_PAGE_NUM 2 -#define UDM_PARAM_SEARCH_MODE 3 -#define UDM_PARAM_CACHE_MODE 4 -#define UDM_PARAM_TRACK_MODE 5 -#define UDM_PARAM_CHARSET 6 -#define UDM_PARAM_STOPTABLE7 -#define UDM_PARAM_STOPFILE 8 -#define UDM_PARAM_WEIGHT_FACTOR9 -#define UDM_PARAM_WORD_MATCH 10 -#define UDM_PARAM_PHRASE_MODE 11 -#define UDM_PARAM_MIN_WORD_LEN 12 -#define UDM_PARAM_MAX_WORD_LEN 13 -#define UDM_PARAM_ISPELL_MODE 14 +#define UDM_PARAM_PAGE_SIZE1 +#define UDM_PARAM_PAGE_NUM 2 +#define UDM_PARAM_SEARCH_MODE 3 +#define UDM_PARAM_CACHE_MODE 4 +#define UDM_PARAM_TRACK_MODE 5 +#define UDM_PARAM_CHARSET 6 +#define UDM_PARAM_STOPTABLE7 +#define UDM_PARAM_STOPFILE 8 +#define UDM_PARAM_WEIGHT_FACTOR9 +#define UDM_PARAM_WORD_MATCH 10 +#define UDM_PARAM_PHRASE_MODE 11 +#define UDM_PARAM_MIN_WORD_LEN 12 +#define UDM_PARAM_MAX_WORD_LEN 13 +#define UDM_PARAM_ISPELL_PREFIXES 14 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 #define UDM_LIMIT_TAG 2 #define UDM_LIMIT_LANG 3 #define UDM_LIMIT_CAT 4 +#define UDM_LIMIT_DATE 5 /* track modes */ #define UDM_TRACK_ENABLED 1 @@ -73,6 +74,10 @@ #define UDM_PHRASE_ENABLED 1 #define UDM_PHRASE_DISABLED0 +/* prefix modes */ +#define UDM_PREFIXES_ENABLED 1 +#define UDM_PREFIXES_DISABLED 0 + /* udm_get_res_param constants */ #define UDM_PARAM_NUM_ROWS 256 #define UDM_PARAM_FOUND257 @@ -81,6 +86,12 @@ #define UDM_PARAM_FIRST_DOC260 #define UDM_PARAM_LAST_DOC 261 +/* udm_load_ispell_data constants */ +#define UDM_ISPELL_TYPE_AFFIX 1 +#define UDM_ISPELL_TYPE_SPELL 2 +#define UDM_ISPELL_TYPE_DB 3 +#define UDM_ISPELL_TYPE_SERVER 4 + /* True globals, no need for thread safety */ static int le_link,le_res; @@ -91,6 +102,9 @@ PHP_FE(udm_alloc_agent, NULL) PHP_FE(udm_set_agent_param, NULL) + PHP_FE(udm_load_ispell_data,NULL) + PHP_FE(udm_free_ispell_data,NULL) + PHP_FE(udm_add_search_limit,NULL) PHP_FE(udm_clear_search_limits, NULL) @@ -158,28 +172,38 @@ /* udm_set_agent_param constants */ REGISTER_LONG_CONSTANT("UDM_PARAM_PAGE_SIZE", UDM_PARAM_PAGE_SIZE,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_PAGE_NUM",UDM_PARAM_PAGE_NUM,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_SEARCH_MODE", UDM_PARAM_SEARCH_MODE,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_CACHE_MODE", UDM_PARAM_CACHE_MODE,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_TRACK_MODE", UDM_PARAM_TRACK_MODE,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_PHRASE_MODE", UDM_PARAM_PHRASE_MODE,CONST_CS +| CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_CHARSET", UDM_PARAM_CHARSET,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_STOPTABLE", UDM_PARAM_STOPTABLE,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_STOP_TABLE", UDM_PARAM_STOPTABLE,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_STOPFILE",UDM_PARAM_STOPFILE,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_STOP_FILE", UDM_PARAM_STOPFILE,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_WEIGHT_FACTOR",UDM_PARAM_WEIGHT_FACTOR,CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("UDM_PARAM_WORD_MATCH", UDM_PARAM_WORD_MATCH,CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("UDM_PARAM_PHRASE_MODE", UDM_PARAM_PHRASE_MODE,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_WORD_MATCH", UDM_PARAM_WORD_MATCH,CONST_CS +| CONST_PERSISTENT); +
[PHP-CVS] cvs: php4 /ext/mnogosearch test.php
gluke Fri Feb 23 02:53:06 2001 EDT Modified files: /php4/ext/mnogosearch test.php Log: mnogosearch example updated. Index: php4/ext/mnogosearch/test.php diff -u php4/ext/mnogosearch/test.php:1.13 php4/ext/mnogosearch/test.php:1.14 --- php4/ext/mnogosearch/test.php:1.13 Thu Feb 22 02:40:43 2001 +++ php4/ext/mnogosearch/test.php Fri Feb 23 02:53:06 2001 @@ -1,6 +1,6 @@ !-- $Source: /local/repository/php4/ext/mnogosearch/test.php,v $ -$Id: test.php,v 1.13 2001/02/22 10:40:43 gluke Exp $ +$Id: test.php,v 1.14 2001/02/23 10:53:06 gluke Exp $ -- html @@ -22,7 +22,7 @@ // Stage 1: allocate UdmSearch agent, set DBAddr and DBMode // DBMode is optional, "single" by default - $udm=Udm_Alloc_Agent("mysql://udm:udm@localhost/udm/",'crc-multi'); + $udm=Udm_Alloc_Agent("mysql://udm:udm@localhost/udm/",'single'); // Stage 2: set search parameters @@ -38,21 +38,30 @@ // Udm_Set_Agent_Param($udm,UDM_PARAM_STOPTABLE,"stopword"); // Udm_Set_Agent_Param($udm,UDM_PARAM_STOPFILE,"stop.txt"); Udm_Set_Agent_Param($udm,UDM_PARAM_WEIGHT_FACTOR,"F9421"); - Udm_Set_Agent_Param($udm,UDM_PARAM_WORD_MATCH,UDM_MATCH_SUBSTR); + Udm_Set_Agent_Param($udm,UDM_PARAM_WORD_MATCH,UDM_MATCH_WORD); Udm_Set_Agent_Param($udm,UDM_PARAM_PHRASE_MODE,UDM_PHRASE_DISABLED); Udm_Set_Agent_Param($udm,UDM_PARAM_MIN_WORD_LEN,2); - Udm_Set_Agent_Param($udm,UDM_PARAM_MAX_WORD_LEN,5); - - if (!Udm_Set_Agent_Param($udm,UDM_PARAM_ISPELL_MODE,UDM_ISPELL_MODE_DB)) { - printf("Error #%d: '%s'\n",$errno,Udm_Error($udm)); - exit; - } + Udm_Set_Agent_Param($udm,UDM_PARAM_MAX_WORD_LEN,16); + Udm_Set_Agent_Param($udm,UDM_PARAM_PREFIX,UDM_PREFIX_DISABLED); +// if (! Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_DB,'','',1)) { +// printf("Error #%d: '%s'\n",Udm_Errno($udm),Udm_Error($udm)); +// exit; +// } + +// if ((! +Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_AFFIX,'en','/opt/udm/ispell/en.aff',0)) || +// (! +Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_SPELL,'en','/opt/udm/ispell/en.dict',1))) { +// printf("Error #%d: '%s'\n",Udm_Errno($udm),Udm_Error($udm)); +// exit; +// } + + // Stage 3: add search limits // Udm_Add_Search_Limit($udm,UDM_LIMIT_URL,"http://www.mydomain.com/%"); // Udm_Add_Search_Limit($udm,UDM_LIMIT_TAG,"01"); // Udm_Add_Search_Limit($udm,UDM_LIMIT_CAT,"01"); // Udm_Add_Search_Limit($udm,UDM_LIMIT_LANG,"en"); +// Udm_Add_Search_Limit($udm,UDM_LIMIT_DATE,"908012006"); // Udm_Clear_Search_Limits($udm); @@ -79,8 +88,8 @@ printf("Searchtime: ".$searchtime."\n\n"); - printf("Documents %d(%d)-%d(%d) from %d total found; %s\n\n", - $first,$first_doc,$first+$rows-1,$last_doc,$total,$wordinfo); + printf("Documents %d-%d from %d total found; %s\n\n", + $first_doc,$last_doc,$total,$wordinfo); // Fetch all rows for($i=0;$i$rows;$i++){ @@ -102,8 +111,11 @@ // Free result Udm_Free_Res($res); } + +//Stage 6: free ispell data if loaded before +// Udm_Free_Ispell_Data($udm); -//Stage 6: free UdmSearch agent +//Stage 7: free UdmSearch agent Udm_Free_Agent($udm); ? -- 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 /ext/midgard config.m4
davidg Fri Feb 23 03:55:57 2001 EDT Modified files: /php4/ext/midgard config.m4 Log: Added --with-mgd-experimental option to compile experimental stuff (off by defeult) Index: php4/ext/midgard/config.m4 diff -u php4/ext/midgard/config.m4:1.7 php4/ext/midgard/config.m4:1.8 --- php4/ext/midgard/config.m4:1.7 Tue Feb 20 16:57:28 2001 +++ php4/ext/midgard/config.m4 Fri Feb 23 03:55:57 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.7 2001/02/21 00:57:28 emile Exp $ +dnl $Id: config.m4,v 1.8 2001/02/23 11:55:57 davidg Exp $ dnl Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] dnl Copyright (C) 2000 The Midgard Project ry @@ -56,4 +56,12 @@ LFLAGS="$LFLAGS -Pmgd -olex.yy.c" PHP_SUBST(GLIBCONFIG) + + AC_MSG_CHECKING(for midgard experimental functions support) + AC_ARG_WITH(mgd-experimental, + [ --with-mgd-experimental Include midgard 1.4.1 experimental functions +support], PHP_MIDGARD_EXPERIMENTAL=[$]withval, PHP_MIDGARD_EXPERIMENTAL="no") + echo "$PHP_MIDGARD_EXPERIMENTAL"; + if test "$PHP_MIDGARD_EXPERIMENTAL" == "yes"; then +AC_DEFINE(YOU_WANT_TO_TEST, 1, [ ]) + fi fi -- 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] newbie question
Get an SQL database engine and off you go. MySQL is a good place to start, and it comes in a Mac OS/X flavour that you can download at http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.33-apple-rhapsody5.5-po werpc.tar.gz. Check out www.mysql.com for more info. HTH Jon -Original Message- From: knaSen [mailto:[EMAIL PROTECTED]] Sent: 23 February 2001 11:38 To: [EMAIL PROTECTED] Subject: [PHP] newbie question Hello I use macintosh and want to make an sql-database...How do I do? --* [knaSen] icq #23830427 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- 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] trouble getting .php3 files to work in php4.0.4pl1 (static)
It was the latter, which was very strange, but the problem seems to have gone away now. How odd. Thanks for your prompt help!! Much appreciated. Hunter "Hoover, Josh" wrote: Do you mean that index.php3 does not work when you access that page as the index for the directory (http://youripaddress/) or that when you specifically call index.php3 (http://youripaddress/index.php3), it wants to download the script in your browser? Thanks, Josh Hoover KnowledgeStorm, Inc. Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here Hmm okay that works, for most .php3 files, but for some reason, does not work with index.php3. Very strange... H -- 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] Problemas con php
Hola a todos Mi consulta es la siguiente He bajado la versin php-4.0.4pl1-Win32 para Windows 2000 como utilizo esto, es decir como ejecuto un archivo php4? Estoy utilizando Internet informaton server 5 Ojala alguien pueda ayudarme
RE: [PHP] Latest PHP CVS binaries
Does anyone know where I can download some compiled binaries of the latest PHP snapshot (Win32)? Have you got somewhere you can let me put them and Ill build you some otherwise Ill set you up an FTP account later and let you have them. James -- James Moore PHP QA Team [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] Parsing a string
On Friday 23 February 2001 15:46, Hardy Merrill wrote: Look up the "split" and "explode" functions - they both do basically the same thing. $token_list = split(",", $string_to_parse); .. and if that doesn't suffice I can send you a nice'n'powerful CSV parser class :) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- 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] Array Help
I've tried and tried and tried ;-) I have this array; $bikes = array( "Road" = array( "Trek" = array( "Trek 5200" = "road.php?brand=t5200" ), "Schwinn" = array( "Schwinn Fastback Pro" = "road.php?brand=schfp" ), "Moots" = array( "VaMoots" = "road.php?brand=vamoots" ), "Lemond" = array( "Zurich" = "road.php?brand=zurich", "Chambery" = "road.php?brand=chambery", "BuenosAries" = "road.php?brand=bueno", "Tourmalet" = "road.php?brand=tourmalet" ) ) ); I'm trying to list the four brands followed by each brands model and URL. I.E. Trek Schwinn Moots Lemond Trek 5200 Schwinn Fastback Pro etc What am I doing wrong here, if ($cat == 'bikes') { while ( list($type,) = each($bikes["Road"])) { echo "TDA HREF=\"$type\" CLASS=\"menu\"$type/A/TD\n"; } while ( list($typ,) = each($bikes["Road"])) { while (list($val, $key)=each($bikes["Road"][$typ])) { echo "TDIMG SRC=\"images/spacer.gif\" WIDTH=\"25\" HEIGHT=\"1\" ALT=\"\" BORDER=\"0\"/TD\n"; echo "TDA HREF=\"$key\" CLASS=\"menu\"$val/A/TD\n"; } } } The first while loop works but not the second pair. I thought $typ would contain the brand on each pass but this returns nothing... Help... :( -Brian -- 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 execution order?
On Friday 23 February 2001 16:57, Don Johnson wrote: Yup, the data's correct. The new records all have the DownloadedDateTime as '-00-00 00:00:00' It works if you execute only the SELECT (without the UPDATE) ? SELECT * from db_table WHERE (DownloadedDateTime = '-00-00 00:00:00') UPDATE LOW_PRIORITY db_table SET DownloadedDateTime=CURRENT_TIMESTAMP WHERE (DownloadedDateTime = '-00-00 00:00:00') -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- 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] encrypt and decrypt in standard PHP
As the PHP manual indicates, we can use Mcrypt to do the encrypt and decrypt work in PHP, but that needs to download the encrypt module and recompile PHP. Is there any other way to encrypt and decrypt the string in standard PHP4.0.4 without any extension module? Thank you very much! -- 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] array question
On Friday 23 February 2001 17:02, Jeff wrote: Is there better performance/speed instantiating an array with a specified size and then adding elements versus adding elements to an array with no size? Uh, you can't specify the size when instatiating an array ... -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- 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] apache+php on MacOSX
The MacOS X Developer Tools (free from Apple's site with a developer registration) have all the necessary tools. Best regards, Andrew -- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com -Original Message- From: Michael Stearne [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 11:25 AM To: Thierry Coopman Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] apache+php on MacOSX Thierry Coopman wrote: At 8:46 AM -0500 2/23/01, Andrew Hill wrote: Thierry, Not sure if you need that 'echo' in there. with or without echo it doesn't work, the PHP works on Solaris. Also, if you have problems, compiling PHP / apache under MacOS X isn't THAT complicated :) well, yes, if you can find a C compiler that works. In the last beta's (4K50) Apple doesn't seem to include the right platform specific files for that. I would also prefer the fact that PHP is already available and just needs to be configured. Compiling is for most people just too much hassle. \ Since it's so close to realease I wouldn't trust any beta's newer than the Public Beta. When OS X is realease and stable people will release PHP binaries. Michael -- Thierry Coopman - [EMAIL PROTECTED] My opinions are personal, and have really nothing or nothing to do with Keytrade! The first place to look for information is in the section of the manual where you least expect to find it. -- 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] Parsing a string
Yes... you can use the explode function. Example: ? $parts = explode(",",$item); ? if $item where "Hello,There", $parts[0] would = "Hello" and $parts[1] would = "There". Thanks, Mike Ridinger On Fri, 23 Feb 2001, Todd Cary wrote: I have a comma delimited string that I need to parse into an array. Is there a PHP function that will do that ? Many thanks.. Todd -- Todd Cary Ariste Software [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] Parsing a string
Thanks all!! split() works like a champ!! Todd -- Todd Cary Ariste Software [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] Undefinded Index on Mysql Result under Win98/PWS
I am using PHP4 + MySQL + PWS + Windows 98. We are trying to port over a web site to a laptop for remote use. However, when we execute a SQL query on a DB in which a filed of the record contains a NULL value, we get an error. The code is as follows: $GetQuery = mysql_query ("SELECT * FROM ApplicantsTbl WHERE App_ID = $qq"); $AppResult = mysql_fetch_array ($GetQuery); $AppDOB = $AppResult[AppDOB]; The query executes just fine, and PARTS of the $AppResult array get returned. However... We are experiencing TWO problems: First, unless we put quote marks around the index so it reads $AppResult['AppDOB'], we get an undefined constant. This doesn't happen on our Linux/Apache web server. Second, if the field AppDOB contains a NULL value, PHP barks that there is an undefined index. It appears that it won't even create the index. I would appreciate any help you could be. Greg -- 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] Need socket help!!!
This is the first time I have used a new socket connection to send header data *and* then retireve the echoed string. This works fine. I get the result string and I am able to parse out the first element, which is the status code. Now here is where I am stuck! I cannot go to another page! I have tried opening another socket and I have tried creating a Form with Form Action="newpage.php" Method="Post" All of them give me an error. Help! Todd ? /* The $info variable contains the information to send to Authorize.net */ $info = "SID=". $sid . "x_ADC_Delim_Data=TRUE" . "x_Amount=" . urlencode($pu_amount) . "x_Test_Request=" . $test . "x_Card_Num=" . $pu_ccno . "x_Exp_Date=" . $pu_exp . "x_Login=" . $login . "x_ADC_URL=FALSE" . "jump=" . urlencode($jump); /* Now we will open a socket to Authorize.net and send the information using my class, $http */ $http = new http; // This is a class $fp = $http-http_fpost($server, $sendto, $info); /* Read the comma delimited string echoed back */ if($fp) { print 'BASE HREF="' . $url . '"p'; $result = fread($fp,1); fclose($fp); $tokenarray = split(",",$result); $response = $tokenarray[0]; // Response contains "1" which is success } ? Now I cannot go any further. I need to go to a page, password.php!! All efforts give an error message. -- Todd Cary Ariste Software [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] PHP / Filemaker?
Someone said it already, ODBC would be the best way to go. BUT, keep in mind that ODBC support in FileMaker is not by any means complete. Also remember that FileMaker is always going to be your bottleneck - not PHP. I would suggest looking at MySQL (http://www.mysql.com/) and/or PostgreSQL (http://www.postgresql.org/) as alternatives to FileMaker Pro. I think you may also be interested in joining the AMP list at http://www.developersplace.com/ This list has a lot of Mac people on it doing Apache, MySQL, PHP, etc. stuff. There are people there with good Lasso/FileMaker Pro backgrounds, so they can help you out with any problems/questions you may run into. Josh Hoover KnowledgeStorm, Inc. Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here Hey This is my first question and mail to this list...hope u treat me decent =) My earlier work have been lasso/filemaker (mac) Ive been heard that PHP is coming strongly and I have no reason not to join. How is the relation between PHP/Filemaker? --* [knaSen] icq #23830427
[PHP-CVS] cvs: php4 /ext/fribidi config.m4
sas Fri Feb 23 08:49:58 2001 EDT Modified files: /php4/ext/fribidi config.m4 Log: Fix another instance of the == bug. Index: php4/ext/fribidi/config.m4 diff -u php4/ext/fribidi/config.m4:1.2 php4/ext/fribidi/config.m4:1.3 --- php4/ext/fribidi/config.m4:1.2 Wed Dec 6 09:34:55 2000 +++ php4/ext/fribidi/config.m4 Fri Feb 23 08:49:58 2001 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.2 2000/12/06 17:34:55 sas Exp $ +dnl $Id: config.m4,v 1.3 2001/02/23 16:49:58 sas Exp $ dnl config.m4 for extension fribidi dnl don't forget to call PHP_EXTENSION(fribidi) @@ -16,7 +16,7 @@ dnl if module was requested with default path of fribidi installation then dnl $PHP_FRIBIDI will be "yes" - if test "$PHP_FRIBIDI" == "yes"; then + if test "$PHP_FRIBIDI" = "yes"; then PHP_FRIBIDI="/usr/local" fi -- 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] Parsing a string
Mensaje citado por: Todd Cary [EMAIL PROTECTED]: I have a comma delimited string that I need to parse into an array. Is there a PHP function that will do that ? Did you check the string functions? explode for example? Saludos... ;-) System Administration: It's a dirty job, but someone told I had to do it. - Martn Marqus email: [EMAIL PROTECTED] Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/ Administrador de sistemas en math.unl.edu.ar - -- 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] no subject
Yup. Go figure. Don Johnson It works if you execute only the SELECT (without the UPDATE) ? Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) On Friday 23 February 2001 16:57, Don Johnson wrote: Yup, the data's correct. The new records all have the DownloadedDateTime as '-00-00 00:00:00' SELECT * from db_table WHERE (DownloadedDateTime = '-00-00 00:00:00') UPDATE LOW_PRIORITY db_table SET DownloadedDateTime=CURRENT_TIMESTAMP WHERE (DownloadedDateTime = '-00-00 00:00:00') -- 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] Array Help
Addressed to: [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from [EMAIL PROTECTED] Fri, 23 Feb 2001 12:20:12 -0500 I've tried and tried and tried ;-) I have this array; $bikes = array( "Road" = array( "Trek" = array( "Trek 5200" = "road.php?brand=t5200" ), "Schwinn" = array( "Schwinn Fastback Pro" = "road.php?brand=schfp" ), "Moots" = array( "VaMoots" = "road.php?brand=vamoots" ), "Lemond" = array( "Zurich" = "road.php?brand=zurich", "Chambery" = "road.php?brand=chambery", "BuenosAries" = "road.php?brand=bueno", "Tourmalet" = "road.php?brand=tourmalet" ) ), "Dirt" = array( ) ); I would probably do something like: # reset( $Bikes ) while( list( $BikeType, $Manufacturers ) = each( $bikes )) { echo "$BikeTypeBR\n"; # reset( $Manufacturers ); while( list( $Mfr, $Models ) = each( $Manufacturers )) { echo "nbsp;nbsp;$MfrBR\n"; # reset( $Models ); while( list( $Model, $URL ) = each( $Models )) { echo "nbsp;nbsp;nbsp;nbsp;" . "A href=\"$URL\"$Model/ABR\n"; } } } This would give Road Trek Trek -- is a link Schwinn Schwinn Fastback Pro -- is a link Moots VaMoots -- is a link Lemond Zurich -- is a link Chambery -- is a link BuenosAries -- is a link Tourmalet -- is a link Dirt If you realy want Trek Schwinn Moots Lemond Trek -- is a link Schwinn Fastback Pro -- is a link VaMoots -- is a link Zurich -- is a link Chambery -- is a link BuenosAries -- is a link Tourmalet -- is a link You need to do the outer look twice, doing a reset() in it between them, and doing the reset()s I have commented out in the example. Be aware if you go thru the array more than once in the program it will be needed. Rick Widmer Internet Marketing Specialists http://www.developersdesk.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] regex help
Hello, I need to take a string and remove everything from the first "" character to the end of the line. I'm pretty sure I could do this with an ereg_replace(), but I am horrible at regular expressions. Could anyone help me with this? - John Vandebreck - Admin, GameDesign -- 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]
On Friday 23 February 2001 19:27, Don Johnson wrote: Yup. Go figure. Don Johnson It works if you execute only the SELECT (without the UPDATE) ? Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) On Friday 23 February 2001 16:57, Don Johnson wrote: Yup, the data's correct. The new records all have the DownloadedDateTime as '-00-00 00:00:00' SELECT * from db_table WHERE (DownloadedDateTime = '-00-00 00:00:00') UPDATE LOW_PRIORITY db_table SET DownloadedDateTime=CURRENT_TIMESTAMP WHERE (DownloadedDateTime = '-00-00 00:00:00') -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- 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] session question
I have a form that submits to abc.php which then calls db.php and db.php then redirects to a new URL. I have session_start(); on all these files and I'm registering the variables I need. It seems that the session dies or gets lost on it's way through all the included files. I then tried to pass the SID in the URL that the db.php file creates, but the SID is empty once it gets here...though, there is a SID befoer then. Can sessions not be used with multple include files? What could I be doing wrong? This is my first forray into sessions...be gentle! thanks! Some code below, it's prettry straight forward. I still have cookies enabled, as well. Do I need to disable cookies for the SID in URL method to work? index.php where they log in from ? session_start(); //first line of file ? form method="POST" action="main.php" input type="hidden" value="lrlogin" name="form_action" Usernamenbsp;nbsp;input type="text" name="username" class="color"br / Passwordnbsp;nbsp;input class="color" type="password" name="password"br / input type="reset"nbsp;nbsp;nbsp;input type="submit" value="Login" code from main.php ? session_register(); require ("db.php"); if $form_action == "lrlogin" { get_user($username,$password); } ? code from db.php ? session_start(); SQL to select user info from db $access = $row[access_level]; //etc getting vars from db session_register("username"); session_register("password"); session_register("access"); session_register("active"); header("Location:http://www.blah.com/index2.php?=".SID); exit; ? index2.php code ? session_start(); print "Welcome $username"; ? it only prints Welcome ...no username :( -- 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] no subject
Sorry for the other (empty) mail... On Friday 23 February 2001 19:27, Don Johnson wrote: Yup. Go figure. Don Johnson It works if you execute only the SELECT (without the UPDATE) ? Then are you 100% sure that you execute the SELECT first (echo something on each query and check the order)? Perhaps you can also post the actual code.. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- 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] regex help
On Friday 23 February 2001 19:33, John Vanderbeck wrote: I need to take a string and remove everything from the first "" character to the end of the line. I'm pretty sure I could do this with an ereg_replace(), but I am horrible at regular expressions. Could anyone help me with this? Well, I prefer preg_* :) $mystring = preg_replace ('/.*/', '', $mystring); -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- 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] posgres 7 functions not working with PHP4
I've just built Apache 1.3.17 on Free BSD, using php-4.0.1pl2 and linking with the postgres 7.0.3 as a shared object. I also linked in mySQL support, which works correctly. When I try accessing the posgres database by calling pg_Connect(), my web server doesn't even display a page, other than "this page cannot be displayed" (in IE) or "page contains no data" (Netscape). The error log displays: (null): Undefined symbol "_PQsetdbLogin" called from httpd:/com/apache/libexec/libphp4.so at 0x8256498 1) Why isn't the function call resolving? It appears to be in the postgres library. 2) What's with the format of the error message? There isn't a date or error level field. I'm guessing the error occurred somewhere very early in the Apache parsing process. Does Postgres 7.0.3 work with PHP 4? 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] Header Location Frame Question
Is it possible to target a frame in the Location: of a header? Sorry if this has been brought up a million times before. Jeff Oien -- 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] Counter Help
Thank you very much :) -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 4:55 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help Fixed. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Navid Yar [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 10:39 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help Actually, I couldn't find the article number for that tutorial. I did, however, place a comment directly into that specific web page with the fix. Here is a direct link to the tutorial (I left the frames out): http://www.weberdev.com/ViewArticle.php3?ArticleID=30. Thanks. Navid -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 12:50 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help WeberDev will fix it ASAP if you tell it the number of the example :) Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Navid Yar [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 6:25 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Counter Help Chris, It worked! Thanks so much! Weberdev needs to fix it too. Navid -Original Message- From: Chris Lee [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 22, 2001 4:46 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Counter Help change $row[count] to $row['count'] it thinks the work [count] is some kind of conastant, it doesnt know you mean (string) 'count' -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Navid Yar"" [EMAIL PROTECTED] wrote in message 000101c09d2d$135683e0$[EMAIL PROTECTED]">news:000101c09d2d$135683e0$[EMAIL PROTECTED]... Can someone help me with this script? It is an example from weberdev.com. I ran it and it gave me the following error... -- Warning: Use of undefined constant count - assumed 'count' in c:\windows\desktop\localhost\examples\counter\counter1.php on line 27 25 The number 25 is the correct number for the counter, but how do I get rid of that error message that keeps coming up before the counter number (25)? I am testing and learning PHP on Windows ME and am using PHP 4.0.4 with MySQL 3.23.33. Here is the script: HTML HEAD TITLE/TITLE /HEAD BODY !-- This example from http://www.weberdev.com/index.php3?GoTo=ShowShoppingItems.php3%3FMasterCateg -- ?php $hostname = 'localhost'; $username = 'username'; $password = 'password'; $dbName = 'database'; MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database"); @mysql_select_db("$dbName") or die("Unable to select database"); $name = "$SCRIPT_NAME"; $result = MYSQL_QUERY("SELECT * FROM counter WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $row = mysql_fetch_array($result); if($row){ MYSQL_QUERY("UPDATE counter SET count = count+1 WHERE (name = '$name')") or die ("Bad query: ".mysql_error()); $count = $row[count]; }else{ MYSQL_QUERY("INSERT INTO counter VALUES ('', '$name', '2')") or die ("Bad query: ".mysql_error()); $count = '1'; } echo $count; ? /BODY /HTML -- Navid -- 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 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] Explode a variable into each character
I have a string of 1034 and I want to have an array that has each number in an element.(ex: num[0] = 1, num[1] = 0, num[2] = 3 num[3] = 4) Is there a way to explode a string by each character? Just convert it to a string: ie. $foo = (string)$num; echo $foo[1]; -Rasmus -- 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] php (cgi version) with Apache and suexec - help
I've been trying to get the cgi version of php working with Apache and suexec but so far I have not had much success. I've installed the Apache module version of php and it seems to work fine. I then installed the cgi version of php and it too seems to work fine as long as it doesn't run through suexec. Suexec works fine for other (perl, c, etc...) cgi's. Here's what I have in Apache's httpd.conf: AddType application/x-httpd-php .php Action application/x-httpd-php /cgi-bin/php.cgi When I try to access a .php file I get an error about the command not being in the document root. This is one of the tests suexec performs and it is true, the cgi-bin directory (and hence the php binary) is not under the document root (although the .php file is). If I change httpd.conf to this: ScriptAlias /php-bin/ "/local/www/php/" AddType application/x-httpd-php .php Action application/x-httpd-php /php-bin/php.cgi Now the php binary is under the document root but when I try to access a .php file I get an error that the target uid/gid does not match that of the directory or program. This is also true since the php binary is owned by the web server and the .php file is owned by another user. So my question is "What am I missing?". How can I ever get the cgi version of php to work with suexec? The php binary is owned by the web server but the .php files will be owned by other users. Here is some more information about the environment in which I am working in case it is relevant: Solaris 7 Apache 1.3.17 php 4.04pl1 I'm just about ready to give up on this one. Thanks in advance for any and all help. -john -- 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] Re: [PHP-INST] trouble getting .php3 files to work in php4.0.4pl1 (static)
As to the WHY, well, the file extensions are different. It's like the difference between a .DOC file and a .TXT file and a .RTF file. They're all different, and the parser/executable uses the extension to tell it what to expect. Also, after you make changes to your httpd.conf make sure that you STOP and START the Apache daemon. That way, the changes get read from the httpd.conf HTH Geordon - Original Message - From: "Hunter Kelly" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, February 23, 2001 8:46 AM Subject: [PHP-INST] trouble getting .php3 files to work in php4.0.4pl1 (static) Hello, I am having trouble getting .php3 files to work in php4.0.4pl1. .php files work fine, but my browser wants to download the .php3 file. Here are the relevant lines from httpd.conf: AddType application/x-httpd-php .php .php3 AddType application/x-httpd-php-source .phps I'm at a bit of a loss as to why a .php file would work, but a .php3 file does not. Please CC me on any replies, as I'm not subscribed to the lists. Thanks! Hunter -- PHP Install 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] trouble getting .php3 files to work in php4.0.4pl1 (static)
Hmm okay that works, for most .php3 files, but for some reason, does not work with index.php3. Very strange... H "Hoover, Josh" wrote: Try doing this in your httpd.conf (replacing what you have now): AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php-source .phps Josh Hoover KnowledgeStorm, Inc. Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here Hello, I am having trouble getting .php3 files to work in php4.0.4pl1. .php files work fine, but my browser wants to download the .php3 file. Here are the relevant lines from httpd.conf: AddType application/x-httpd-php .php .php3 AddType application/x-httpd-php-source .phps I'm at a bit of a loss as to why a .php file would work, but a .php3 file does not. -- 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] Re: [PHP-INST] Re: [PHP] trouble getting .php3 files to work in php4.0.4pl1 (static)
Find the "DirectoryIndex" line and add "index.php3" to it in the httpd.conf HTH, Geordon - Original Message - From: "Hunter Kelly" [EMAIL PROTECTED] To: "Hoover, Josh" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, February 23, 2001 9:22 AM Subject: [PHP-INST] Re: [PHP] trouble getting .php3 files to work in php4.0.4pl1 (static) Hmm okay that works, for most .php3 files, but for some reason, does not work with index.php3. Very strange... H "Hoover, Josh" wrote: Try doing this in your httpd.conf (replacing what you have now): AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php-source .phps Josh Hoover KnowledgeStorm, Inc. Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here Hello, I am having trouble getting .php3 files to work in php4.0.4pl1. .php files work fine, but my browser wants to download the .php3 file. Here are the relevant lines from httpd.conf: AddType application/x-httpd-php .php .php3 AddType application/x-httpd-php-source .phps I'm at a bit of a loss as to why a .php file would work, but a .php3 file does not. -- PHP Install 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] Undefinded Index on Mysql Result under Win98/PWS
On Fri, Feb 23, 2001 at 11:47:12AM -0700, [EMAIL PROTECTED] wrote: That might be good for a temporary solution, but not having quotes there ia a potential bug waiting to happen. That is why it there is a warning about it. I agree. Since he didn't use the quotes on the live system though, I took it to mean that he wasn't using many if any constants. So it should not be a problem to change the error reporting level. -- Jason Stechschulte [EMAIL PROTECTED] -- There's some entertainment value in watching people juggle nitroglycerin. -- Larry Wall in [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] string question
Use number_format() : http://www.php.net/manual/en/function.number-format.php echo number_format($number); Other options exist with this function, it's pretty useful. Regards Philip Olson http://www.cornado.com/ On Fri, 23 Feb 2001 [EMAIL PROTECTED] wrote: I have a string that contains a number such as: $string = '12345' I want that to read 12,345 though. Is there any way in which I can insert a comma in there in the correct places? -Matt -- 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] Problems sending mail to aol with the mail() function
"Steve Kenshalo" [EMAIL PROTECTED] wrote: I am working on a PHP script for an e-commerce site that mails out calling card pin numbers after somebody purchases them online. Turing testing I not noticed that aol users were not receiving the messages. AOL seems to be filtering them out without sending a bounce or anything. We tried it with My guess is AOL might be filtering out emails that have a Return-Path header of "nobody" or something similar. If PHP is running as an Apache module I don't think there's a way to change this header as I believe it's automatically set to the owner of Apache. Perhaps if you run the script using a CGI install of PHP using a different user AOL will accept it. Have you contacted AOL about the problem? -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.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] Submitting Form Information
Is there a way to simulate a form submission to a cgi-script using PHP? I am trying to write a script that will replace the frontend of another CGI script with a customized one of my own, but I need to be able to pass form data into the next page in the cgi (including a password). Matthew Aznoe Fuzz Technologies [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] file test
I am opening the top level of a a directory structure with dir. I want make a list of the subdirectories, but not the files. Is there a file test operator like perl's -d in php? I will then have to go into the sub directories to perform actions on non directory files -- 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] Error compiling php
During compilation of php4 I have this: What I have to do ? Thanks, Enrico DXML_BYTE_ORDER=12 -g -O2 -c sapi_apache.c sapi_apache.c:32: httpd.h: No such file or directory sapi_apache.c:33: http_config.h: No such file or directory sapi_apache.c:41: http_core.h: No such file or directory sapi_apache.c:42: http_main.h: No such file or directory sapi_apache.c:43: http_protocol.h: No such file or directory sapi_apache.c:44: http_request.h: No such file or directory sapi_apache.c:45: http_log.h: No such file or directory sapi_apache.c:57: util_script.h: No such file or directory -- 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] using DTDs and XML
Does anyone have examples of using DTD's with the xml_parse functions? Regards Mark -- 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] using DTDs and XML
Mark Newnham wrote: Does anyone have examples of using DTD's with the xml_parse functions? http://php.net/xml Example 4 uses an external DTD. Internal DTD's are also possible. -Egon -- SIX Offene Systeme GmbH Stuttgart - Berlin Sielminger Strae 63 D-70771 Leinfelden-Echterdingen Fon +49 711 9909164 Fax +49 711 9909199 http://www.six.de Besuchen Sie uns auf der CeBIT 2001, Halle 6, Stand F62/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] Download PHP from Linux machine?
Hi there, I want to download PHP from my Linux server, but I can't just type "lynx http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gzsource_ site=www.php.net" This is the link in the PHP downloads page, but the shell gets confused by the character. What should I do? Best Regards, Jorge. -- 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] Download PHP from Linux machine?
lynx -source http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gzsource_site=www.php.net php-4.0.4pl1.tar.gz will work - also try wget --Joe On Fri, Feb 23, 2001 at 03:28:14PM -0600, Jorge Alvarez wrote: Hi there, I want to download PHP from my Linux server, but I can't just type "lynx http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gzsource_ site=www.php.net" This is the link in the PHP downloads page, but the shell gets confused by the character. What should I do? Best Regards, Jorge. -- 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] -- --- Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V --- -- 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] chunk_split() doesnt seem to be working
Im running php 4.0.4pl1 Fatal error: Call to undefined function: chunk_split() in /home/httpd/vhosts/myhearingstore/mail.egn on line 33 is there a configure option im supposed to compile in ? -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [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] imagettfbbox and imagettftext
I've gone through the manual and user notes on these functions, and they tend to be highly illogical ;-) The numbers don't coincide, the x/y values are negative when it seems they ought to be positive, etc. If someone has already figured this out, would you post a code snippet that will create an image the size of the ttf bounding box and draw the string of text exactly centered on the image... this should work no matter what string of text is used, what font is used, what font size is used and if letters hang below the baseline or not. Thanks Monte -- 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] How to check if a current session is going?
I have a auth system in the works and if a session is going then they are "logged in". What's the best way to check to see if a session is currently in progress? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to check if a current session is going?
check if your session variable is set. ie, lets say your session variable is called SessionID ?php if (isset($HTTP_SESSION_VARS['SessionID'])) { echo "SET br\n"; } ? -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] "Michael Zornek" [EMAIL PROTECTED] wrote in message news:a05001900b6bc8c348c90@[38.241.81.150]... I have a auth system in the works and if a session is going then they are "logged in". What's the best way to check to see if a session is currently in progress? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 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] php and apache protected directories
I want to open a html file from a php script. The problem is that the html file is located in a password protected directory on an apache web server. I know the user/password for that directory and I want the php script to handle the authentification automaticly. Is there a way to acomplish this ? Thank you, Marius -- 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/db db.c /ext/dbase dbase.c /ext/filepro filepro.c /ext/hyperwave hw.c /ext/standard dir.c file.c filestat.c image.c /ext/zlib zlib.c zlib_fopen_wrapper.c /main Makefile.in main.c php.h /sapi/cgi cgi_main.c /sapi/servlet servlet.c
sas Fri Feb 23 14:07:22 2001 EDT Modified files: /php4/ext/dbdb.c /php4/ext/dbase dbase.c /php4/ext/filepro filepro.c /php4/ext/hyperwave hw.c /php4/ext/standard dir.c file.c filestat.c image.c /php4/ext/zlib zlib.c zlib_fopen_wrapper.c /php4/main Makefile.in main.c php.h /php4/sapi/cgi cgi_main.c /php4/sapi/servlet servlet.c Log: Finish fopen-wrappers rename. Index: php4/ext/db/db.c diff -u php4/ext/db/db.c:1.47 php4/ext/db/db.c:1.48 --- php4/ext/db/db.c:1.47 Wed Nov 22 14:00:39 2000 +++ php4/ext/db/db.cFri Feb 23 14:07:12 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: db.c,v 1.47 2000/11/22 22:00:39 sas Exp $ */ +/* $Id: db.c,v 1.48 2001/02/23 22:07:12 sas Exp $ */ #define IS_EXT_MODULE #if 1 @@ -25,7 +25,7 @@ #include "php.h" #include "php_globals.h" #include "safe_mode.h" -#include "fopen-wrappers.h" +#include "fopen_wrappers.h" #include "ext/standard/flock_compat.h" #include "ext/standard/info.h" Index: php4/ext/dbase/dbase.c diff -u php4/ext/dbase/dbase.c:1.34 php4/ext/dbase/dbase.c:1.35 --- php4/ext/dbase/dbase.c:1.34 Thu Nov 2 15:08:04 2000 +++ php4/ext/dbase/dbase.c Fri Feb 23 14:07:13 2001 @@ -24,7 +24,7 @@ #include "php.h" #include "safe_mode.h" -#include "fopen-wrappers.h" +#include "fopen_wrappers.h" #include "php_globals.h" #if DBASE Index: php4/ext/filepro/filepro.c diff -u php4/ext/filepro/filepro.c:1.28 php4/ext/filepro/filepro.c:1.29 --- php4/ext/filepro/filepro.c:1.28 Thu Nov 2 15:08:05 2000 +++ php4/ext/filepro/filepro.c Fri Feb 23 14:07:13 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: filepro.c,v 1.28 2000/11/02 23:08:05 andi Exp $ */ +/* $Id: filepro.c,v 1.29 2001/02/23 22:07:13 sas Exp $ */ /* filePro 4.x support developed by Chad Robinson, [EMAIL PROTECTED] @@ -28,7 +28,7 @@ #include "php.h" #include "safe_mode.h" -#include "fopen-wrappers.h" +#include "fopen_wrappers.h" #include string.h #ifdef PHP_WIN32 #include windows.h Index: php4/ext/hyperwave/hw.c diff -u php4/ext/hyperwave/hw.c:1.77 php4/ext/hyperwave/hw.c:1.78 --- php4/ext/hyperwave/hw.c:1.77Thu Feb 22 01:38:58 2001 +++ php4/ext/hyperwave/hw.c Fri Feb 23 14:07:13 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: hw.c,v 1.77 2001/02/22 09:38:58 steinm Exp $ */ +/* $Id: hw.c,v 1.78 2001/02/23 22:07:13 sas Exp $ */ #include stdlib.h #include errno.h @@ -26,7 +26,7 @@ #include "ext/standard/php_standard.h" #include "ext/standard/head.h" #include "ext/standard/info.h" -#include "fopen-wrappers.h" +#include "fopen_wrappers.h" #include "SAPI.h" #ifdef PHP_WIN32 Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.56 php4/ext/standard/dir.c:1.57 --- php4/ext/standard/dir.c:1.56Wed Feb 14 21:21:27 2001 +++ php4/ext/standard/dir.c Fri Feb 23 14:07:14 2001 @@ -17,12 +17,12 @@ +--+ */ -/* $Id: dir.c,v 1.56 2001/02/15 05:21:27 sas Exp $ */ +/* $Id: dir.c,v 1.57 2001/02/23 22:07:14 sas Exp $ */ /* {{{ includes/startup/misc */ #include "php.h" -#include "fopen-wrappers.h" +#include "fopen_wrappers.h" #include "php_dir.h" Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.142 php4/ext/standard/file.c:1.143 --- php4/ext/standard/file.c:1.142 Tue Feb 20 23:18:28 2001 +++ php4/ext/standard/file.cFri Feb 23 14:07:14 2001 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: file.c,v 1.142 2001/02/21 07:18:28 sas Exp $ */ +/* $Id: file.c,v 1.143 2001/02/23 22:07:14 sas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -69,7 +69,7 @@ #include sys/time.h #endif #include "fsock.h" -#include "fopen-wrappers.h" +#include "fopen_wrappers.h" #include "php_globals.h" #ifdef HAVE_SYS_FILE_H Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.54 php4/ext/standard/filestat.c:1.55 --- php4/ext/standard/filestat.c:1.54 Tue Feb 20 23:18:28 2001 +++ php4/ext/standard/filestat.cFri Feb 23 14:07:14 2001 @@ -16,11 +16,11 @@ +--+ */ -/* $Id: filestat.c,v 1.54 2001/02/21 07:18:28 sas Exp $ */ +/* $Id: filestat.c,v 1.55 2001/02/23 22:07:14 sas Exp $ */ #include "php.h" #include "safe_mode.h" -#include "fopen-wrappers.h" +#include "fopen_wrappers.h" #include "php_globals.h" #include stdlib.h Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.26 php4/ext/standard/image.c:1.27 --- php4/ext/standard/image.c:1.26 Tue Feb 20 10:00:44 2001 +++ php4/ext/standard/image.c Fri Feb 23 14:07:14 2001 @@ -15,7 +15,7 @@ |
Re: [PHP] session question
some comments on sessions - $PHPSESSID will only be set after the first page refresh. - SID will only be set if your not using cookies. - sessions with not transfer across multiple domain names. - sessions without cookies will not transfer accross full urls. ?php if (isset($PHPSESSID)) session_start($PHPSESSID); else session_start(); $PHPSESSID = session_id(); $SID = "PHPSESSID=$PHPSESSID"; ? use this code and - sessions will transfer across full urls when using $SID - sessions will transer across multiple domain names on the same server using $SID - both $PHPSESSID and $SID are set allways set. remember that header redirects *require* full urls so you will have to use $SID. header("Location: http://$SERVER_NAME/index.php?$SID"); -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Jon Rosenberg"" [EMAIL PROTECTED] wrote in message 001301c09dc9$fc471c80$[EMAIL PROTECTED]">news:001301c09dc9$fc471c80$[EMAIL PROTECTED]... I have a form that submits to abc.php which then calls db.php and db.php then redirects to a new URL. I have session_start(); on all these files and I'm registering the variables I need. It seems that the session dies or gets lost on it's way through all the included files. I then tried to pass the SID in the URL that the db.php file creates, but the SID is empty once it gets here...though, there is a SID befoer then. Can sessions not be used with multple include files? What could I be doing wrong? This is my first forray into sessions...be gentle! thanks! Some code below, it's prettry straight forward. I still have cookies enabled, as well. Do I need to disable cookies for the SID in URL method to work? index.php where they log in from ? session_start(); //first line of file ? form method="POST" action="main.php" input type="hidden" value="lrlogin" name="form_action" Usernamenbsp;nbsp;input type="text" name="username" class="color"br / Passwordnbsp;nbsp;input class="color" type="password" name="password"br / input type="reset"nbsp;nbsp;nbsp;input type="submit" value="Login" code from main.php ? session_register(); require ("db.php"); if $form_action == "lrlogin" { get_user($username,$password); } ? code from db.php ? session_start(); SQL to select user info from db $access = $row[access_level]; //etc getting vars from db session_register("username"); session_register("password"); session_register("access"); session_register("active"); header("Location:http://www.blah.com/index2.php?=".SID); exit; ? index2.php code ? session_start(); print "Welcome $username"; ? it only prints Welcome ...no username :( -- 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 /win32 php4dll.dsp php4dllts.dsp
sbergmann Fri Feb 23 14:55:29 2001 EDT Modified files: /php4/win32 php4dll.dsp php4dllts.dsp Log: That should do the trick. Index: php4/win32/php4dll.dsp diff -u php4/win32/php4dll.dsp:1.8 php4/win32/php4dll.dsp:1.9 --- php4/win32/php4dll.dsp:1.8 Fri Jan 5 10:06:24 2001 +++ php4/win32/php4dll.dsp Fri Feb 23 14:55:28 2001 @@ -128,7 +128,7 @@ # End Source File # Begin Source File -SOURCE="..\main\fopen-wrappers.c" +SOURCE="..\main\fopen_wrappers.c" # End Source File # Begin Source File Index: php4/win32/php4dllts.dsp diff -u php4/win32/php4dllts.dsp:1.31 php4/win32/php4dllts.dsp:1.32 --- php4/win32/php4dllts.dsp:1.31 Wed Feb 21 15:52:57 2001 +++ php4/win32/php4dllts.dspFri Feb 23 14:55:28 2001 @@ -157,7 +157,7 @@ # End Source File # Begin Source File -SOURCE="..\main\fopen-wrappers.c" +SOURCE="..\main\fopen_wrappers.c" # End Source File # Begin Source File @@ -242,7 +242,7 @@ # End Source File # Begin Source File -SOURCE="..\main\fopen-wrappers.h" +SOURCE="..\main\fopen_wrappers.h" # End Source File # Begin Source File -- 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] file test
Addressed to: "Kevin Beckford" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "Kevin Beckford" [EMAIL PROTECTED] Fri, 23 Feb 2001 15:42:26 -0500 I am opening the top level of a a directory structure with dir. I want make a list of the subdirectories, but not the files. Is there a file test operator like perl's -d in php? I will then have to go into the sub directories to perform actions on non directory files I bet there is... http://www.php.net/manual/en/ref.filesystem.php Would be a good place to find out. Hint: look for is_file() or is_dir(). Rick Widmer Internet Marketing Specialists http://www.developersdesk.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 /ext/midgard config.m4 preparser.c
davidg Fri Feb 23 15:14:42 2001 EDT Modified files: /php4/ext/midgard preparser.c config.m4 Log: - workaround for the function mgd_eval() to return a value like the PHP eval(). - changed --with-mgd-experimental to --enable-mgd-experimental Index: php4/ext/midgard/preparser.c diff -u php4/ext/midgard/preparser.c:1.5 php4/ext/midgard/preparser.c:1.6 --- php4/ext/midgard/preparser.c:1.5Tue Feb 20 03:14:55 2001 +++ php4/ext/midgard/preparser.cFri Feb 23 15:14:42 2001 @@ -1,4 +1,4 @@ -/* $Id: preparser.c,v 1.5 2001/02/20 11:14:55 emile Exp $ +/* $Id: preparser.c,v 1.6 2001/02/23 23:14:42 davidg Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -345,6 +345,77 @@ mgd_free_pool(pool); } +/* DG {HACK ALERT}: Since the function zend_eval_string does not behave like + * the statement eval(), thie following function is the exact copy of the + * function zend_eval_string with some lines commented out. + * This is necessary to keep the compatibility between eval() and mgd_eval() + */ +static int mgd_eval_string(char *str, zval *retval_ptr, char *string_name CLS_DC +ELS_DC) +{ + zval pv; + zend_op_array *new_op_array; + zend_op_array *original_active_op_array = EG(active_op_array); + zend_function_state *original_function_state_ptr = EG(function_state_ptr); + int original_handle_op_arrays; + int retval; + +// if (retval_ptr) { +// pv.value.str.len = strlen(str)+sizeof("return ;")-1; +// pv.value.str.val = emalloc(pv.value.str.len+1); +// strcpy(pv.value.str.val, "return "); +// strcat(pv.value.str.val, str); +// strcat(pv.value.str.val, " ;"); +// } else { + pv.value.str.len = strlen(str); + pv.value.str.val = estrndup(str, pv.value.str.len); +// } + pv.type = IS_STRING; + + /*printf("Evaluating '%s'\n", pv.value.str.val);*/ + + original_handle_op_arrays = CG(handle_op_arrays); + CG(handle_op_arrays) = 0; + new_op_array = compile_string(pv, string_name CLS_CC); + CG(handle_op_arrays) = original_handle_op_arrays; + + if (new_op_array) { + zval *local_retval_ptr=NULL; + zval **original_return_value_ptr_ptr = EG(return_value_ptr_ptr); + zend_op **original_opline_ptr = EG(opline_ptr); + + EG(return_value_ptr_ptr) = local_retval_ptr; + EG(active_op_array) = new_op_array; + EG(no_extensions)=1; + + zend_execute(new_op_array ELS_CC); + + if (local_retval_ptr) { + if (retval_ptr) { + COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr); + } else { + zval_ptr_dtor(local_retval_ptr); + } + } else { + if (retval_ptr) { + INIT_ZVAL(*retval_ptr); + } + } + + EG(no_extensions)=0; + EG(opline_ptr) = original_opline_ptr; + EG(active_op_array) = original_active_op_array; + EG(function_state_ptr) = original_function_state_ptr; + destroy_op_array(new_op_array); + efree(new_op_array); + EG(return_value_ptr_ptr) = original_return_value_ptr_ptr; + retval = SUCCESS; + } else { + retval = FAILURE; + } + zval_dtor(pv); + return retval; +} + MGD_FUNCTION(eval) { zval **string, **name; @@ -370,20 +441,9 @@ WRONG_PARAM_COUNT; } if((*string)-value.str.len) { -#ifdef MGD_PREPARSER_LOG - zend_syntax_highlighter_ini syntax_highlighter_ini; - php_get_highlight_struct(syntax_highlighter_ini); -// highlight_string(*string, syntax_highlighter_ini, tmp); -#endif pool = mgd_alloc_pool(); value = php_eval_midgard(pool, tmp, (*string)-value.str.val, 0); -#ifdef MGD_PREPARSER_LOG -MGD_LOG_START("mgd_eval(%s) '%s'\n\n\n\n\n\n\n\n") - MGD_LOG_ARG(tmp) - MGD_LOG_ARG(value) -MGD_LOG_END() -#endif - if(zend_eval_string(value, NULL /* return_value */, tmp CLS_CC ELS_CC) != SUCCESS) { + if(mgd_eval_string(value, return_value, tmp CLS_CC ELS_CC) != SUCCESS) +{ /* DG: we probably want to turn that off when stable and ready to release * or at least offer the user an option to turn it off, as it exposes the * PHP source (security issue here) @@ -449,4 +509,5 @@ } } } + #endif /* HAVE_MIDGARD */ Index: php4/ext/midgard/config.m4 diff -u php4/ext/midgard/config.m4:1.9 php4/ext/midgard/config.m4:1.10 ---
Re: [PHP] Parsing a string
From: "Todd Cary" [EMAIL PROTECTED] Thanks all!! split() works like a champ!! Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] If you're just tokenising by a comma, don't use split(), use explode(). split() accepts a regular expression for the separator, whereas explode() accepts just a normal string. The difference is, split() is slower. Cheers Simon Garner -- 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/midgard preparser-parser.y preparser-scanner.l
davidg Fri Feb 23 16:01:00 2001 EDT Modified files: /php4/ext/midgard preparser-parser.y preparser-scanner.l Log: passing include()'ed files thru the preparser. Index: php4/ext/midgard/preparser-parser.y diff -u php4/ext/midgard/preparser-parser.y:1.4 php4/ext/midgard/preparser-parser.y:1.5 --- php4/ext/midgard/preparser-parser.y:1.4 Tue Feb 20 03:14:55 2001 +++ php4/ext/midgard/preparser-parser.y Fri Feb 23 16:00:59 2001 @@ -1,5 +1,5 @@ %{ -/* $Id: preparser-parser.y,v 1.4 2001/02/20 11:14:55 emile Exp $ +/* $Id: preparser-parser.y,v 1.5 2001/02/24 00:00:59 davidg Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -42,7 +42,7 @@ %token MGD_SNIP %token MGD_SNIPE %token MGD_EVAL -%token MGD_EVALE +%token MGD_INCLUDE %% @@ -183,6 +183,17 @@ mgd_append_output_buffer_const("mgd_eval("); mgd_append_output_buffer_data($2); mgd_append_output_buffer_const(")"); + mgd_free_buffer($2); + } + | MGD_INCLUDE STRING { +#ifdef PARSER_DEBUG + mgd_append_output_buffer_const("parsed include: "); + mgd_append_output_buffer_data($2); +#endif + mgd_append_output_buffer_const("$midgard-pp_tmp=\"?\"." + + "implode(\"\\n\",file("); + mgd_append_output_buffer_data($2); + mgd_append_output_buffer_const(")).\"?\";mgd_eval($midgard-pp_tmp);"); mgd_free_buffer($2); } ; Index: php4/ext/midgard/preparser-scanner.l diff -u php4/ext/midgard/preparser-scanner.l:1.4 php4/ext/midgard/preparser-scanner.l:1.5 --- php4/ext/midgard/preparser-scanner.l:1.4Thu Feb 22 17:08:43 2001 +++ php4/ext/midgard/preparser-scanner.lFri Feb 23 16:00:59 2001 @@ -1,6 +1,6 @@ %{ -/* $Id: preparser-scanner.l,v 1.4 2001/02/23 01:08:43 davidg Exp $ +/* $Id: preparser-scanner.l,v 1.5 2001/02/24 00:00:59 davidg Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -48,6 +48,9 @@ %x IN_EVAL %x IN_EVALQ %x IN_EVALQQ +%x IN_INCLUDE +%x IN_INCLUDEQ +%x IN_INCLUDEQQ %option stack %option noyywrap @@ -259,6 +262,67 @@ } IN_EVAL{ANY} { + if(yytext[0] == '(') par_stack++; + if(yytext[0] == ')') par_stack--; + if(par_stack 0) { +yy_pop_state(); +return STRING; + } + mgd_append_byte(mgdlval.gstring, mgdtext); +} + +IN_PHP[^a-zA-Z0-9_]"include"{WHITESPACE}*"(" { +/* TODO: change the [^_] to make it conditional, so it's not part of the match + */ + mgd_append_byte(mgd_output_buffer, mgdtext); + yy_push_state(IN_INCLUDE); + par_stack=0; + in_string = 0; + mgdlval.gstring = g_byte_array_new(); + return MGD_INCLUDE; +} + +IN_INCLUDE{quote} { + yy_push_state(IN_INCLUDEQ); + in_string = mgdtext[0]; + mgd_append_byte(mgdlval.gstring, mgdtext); +} + +IN_INCLUDE{dquote} { + yy_push_state(IN_INCLUDEQQ); + in_string = mgdtext[0]; + mgd_append_byte(mgdlval.gstring, mgdtext); +} + +IN_INCLUDEQ[\\]{quote} { + mgd_append_byte(mgdlval.gstring, mgdtext); + mgd_append_byte(mgdlval.gstring, mgdtext+1); +} + +IN_INCLUDEQ{quote} { + mgd_append_byte(mgdlval.gstring, mgdtext); + yy_pop_state(); +} + +IN_INCLUDEQ{ANY} { + mgd_append_byte(mgdlval.gstring, mgdtext); +} + +IN_INCLUDEQQ[\\]{dquote} { + mgd_append_byte(mgdlval.gstring, mgdtext); + mgd_append_byte(mgdlval.gstring, mgdtext+1); +} + +IN_INCLUDEQQ{dquote} { + mgd_append_byte(mgdlval.gstring, mgdtext); + yy_pop_state(); +} + +IN_INCLUDEQQ{ANY} { + mgd_append_byte(mgdlval.gstring, mgdtext); +} + +IN_INCLUDE{ANY} { if(yytext[0] == '(') par_stack++; if(yytext[0] == ')') par_stack--; if(par_stack 0) { -- 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] chunk_split() doesnt seem to be working
ok, works now, strange stuff, cut and paste from opera and you'll get problems like this, strange strange -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Chris Lee"" [EMAIL PROTECTED] wrote in message 976kjm$8cl$[EMAIL PROTECTED]">news:976kjm$8cl$[EMAIL PROTECTED]... Im running php 4.0.4pl1 Fatal error: Call to undefined function: chunk_split() in /home/httpd/vhosts/myhearingstore/mail.egn on line 33 is there a configure option im supposed to compile in ? -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [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] PHP not proccessing input?
Help! I am trying to post some info to my php script using the microsoft internet control: strurl = http://www.myserver.com/test.asp strdata = "lah=sddta=test Inet1.Execute strurl, "POST", strdata PHP returns HTTP_POST_VARS as being empty. Yet, if I use PERL, I can read the posted info just fine. PHP does work fine with normal php forms. Why can PERL recognize my data, but PHP not, how are they handling the posted info differently? Is there a way I can get PHP to display the raw data that the script receives so I can see what is happening? Thanks for any help, Chris
[PHP] problems with mail()
mail seems to be just throwing the 'extra headers' in with the body... $email_text_body = "Hello {$people-people_name[$pos]} how are you today?"; $email_html_body = "html"; $email_html_body .= "body"; $email_html_body .= "table"; $email_html_body .= "tr bgcolor=ee"; $email_html_body .= "td"; $email_html_body .= "font size=+2 face=ffHello {$people-people_name[$pos]} How are you today?/font"; $email_html_body .= "/td"; $email_html_body .= "/tr"; $email_html_body .= "/table"; $email_html_body .= "/body"; $email_html_body .= "/html"; $email_boundary = uniqid('HTML'); $email_headers = "From: MyHearingStore.com [EMAIL PROTECTED]\r\n"; $email_headers .= "Return-Path: [EMAIL PROTECTED]\r\n"; $email_headers .= "MIME-Version: 1.0\r\n"; $email_headers .= "Content-Type: multipart/alternative;\r\n boundary='$email_boundary'\r\n"; $email_headers .= "This is a multi-part message in MIME format.\r\n\r\n"; $email_body = "--$email_boundary\r\n"; $email_body .= "Content-Type: text/plain;\r\n charset='ISO-8859-1'\r\n"; $email_body .= "Content-Transfer-Encoding: ISO-8859-1\r\n\r\n"; $email_body .= $email_text_body; $email_body .= "--$email_boundary\r\n"; $email_body .= "Content-Type: text/html;\r\n charset=ISO-8859-1\r\n"; $email_body .= "Content-Transfer-Encoding: ISO-8859-1\r\n\r\n"; $email_body .= $email_html_body; mail($people-people_email[$pos], 'An HTML Message', $email_body, $email_headers); outputs this. Return-Path: nobody Received: (from nobody@localhost) by server.mediawaveonline.com (8.9.3/8.9.3) id PAA30279; Fri, 23 Feb 2001 15:55:53 -0800 Date: Fri, 23 Feb 2001 15:55:53 -0800 From: Nobody [EMAIL PROTECTED] Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Status: Subject: An HTML Message From: MyHearingStore.com [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: multipart/alternative; boundary='HTML3a96f889828b4' This is a multi-part message in MIME format. --HTML3a96f889828b4 Content-Type: text/plain; charset='ISO-8859-1' Content-Transfer-Encoding: ISO-8859-1 Hello test how are you today?--HTML3a96f889828b4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: ISO-8859-1 htmlbodytabletr bgcolor=eetdfont size=+2 face=ffHello test How are you today?/font/td/tr/table/body/html its supposed to be this. Return-Path: nobody Received: (from nobody@localhost) by server.mediawaveonline.com (8.9.3/8.9.3) id PAA30279; Fri, 23 Feb 2001 15:55:53 -0800 Date: Fri, 23 Feb 2001 15:55:53 -0800 From: Nobody [EMAIL PROTECTED] Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: An HTML Message From: MyHearingStore.com [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: multipart/alternative; boundary='HTML3a96f889828b4' This is a multi-part message in MIME format. Status: --HTML3a96f889828b4 Content-Type: text/plain; charset='ISO-8859-1' Content-Transfer-Encoding: ISO-8859-1 Hello test how are you today?--HTML3a96f889828b4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: ISO-8859-1 htmlbodytabletr bgcolor=eetdfont size=+2 face=ffHello test How are you today?/font/td/tr/table/body/html any idea's ??? -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [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 /ext/midgard mgd_preparser.h
davidg Fri Feb 23 16:48:44 2001 EDT Modified files: /php4/ext/midgard mgd_preparser.h Log: Fixed some potential and real segfaults. Index: php4/ext/midgard/mgd_preparser.h diff -u php4/ext/midgard/mgd_preparser.h:1.4 php4/ext/midgard/mgd_preparser.h:1.5 --- php4/ext/midgard/mgd_preparser.h:1.4Tue Feb 20 03:29:52 2001 +++ php4/ext/midgard/mgd_preparser.hFri Feb 23 16:48:43 2001 @@ -1,4 +1,4 @@ -/* $Id: mgd_preparser.h,v 1.4 2001/02/20 11:29:52 emile Exp $ +/* $Id: mgd_preparser.h,v 1.5 2001/02/24 00:48:43 davidg Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -43,15 +43,15 @@ } \ } -#define mgd_free_buffer(buffer) g_byte_array_free((buffer), TRUE) -#define mgd_append_buffer(buffer, str) if(strlen(str) 0 )\ - g_byte_array_append((buffer), (str), strlen(str)); -#define mgd_append_output_buffer_const(str) if(sizeof(str) 0 )\ - g_byte_array_append(mgd_output_buffer, (str), (sizeof(str) == 1) ? 1 : sizeof(str)-1 ); -#define mgd_append_output_buffer(str) if(strlen(str) 0 )\ - g_byte_array_append(mgd_output_buffer, (str), strlen(str)); -#define mgd_append_output_buffer_data(gstr) if((gstr)-len 0 )\ - g_byte_array_append(mgd_output_buffer, (gstr)-data, (gstr)-len); +#define mgd_free_buffer(buffer) {if(buffer) g_byte_array_free((buffer), TRUE);} +#define mgd_append_buffer(buffer, str) { if(str strlen(str) 0 )\ + g_byte_array_append((buffer), (str), strlen(str)); } +#define mgd_append_output_buffer_const(str) { if(sizeof(str) 0 )\ + g_byte_array_append(mgd_output_buffer, (str), (sizeof(str) == 1) ? 1 : +sizeof(str)-1 ); } +#define mgd_append_output_buffer(str) { if(str strlen(str) 0 )\ + g_byte_array_append(mgd_output_buffer, (str), strlen(str)); } +#define mgd_append_output_buffer_data(gstr) { if(gstr (gstr)-len 0 )\ + g_byte_array_append(mgd_output_buffer, (gstr)-data, (gstr)-len); } //#define MGD_PREPARSER_LOG -- 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] Order by Date (Newbie)
Ok, I must be missing something, but does anyone have a script that will order by the closest date in the future that hasn't been here yet. Did that make sense? Brian -- 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] Ok, this might make more sense
Thanks for your help. I do work with MySql and that was going to be my final option. But because I am still in the learning stages of PHP I was hoping for a simple save command. Not to worry. MySql it is. Thanks, Yobro ""Chris Lee"" [EMAIL PROTECTED] wrote in message 9748a0$5o2$[EMAIL PROTECTED]">news:9748a0$5o2$[EMAIL PROTECTED]... : Your asking a huge question and expecting a small answer ie. : : php_save(); : : the anser your looking or is not small, im sorry. your asking a big : question, and with all big questions comes a big answer. : : Do you know how to use db's ? mysql? postgres? I'll assume you do. save you : changes in a db, pull those variables rom the db and arange the client pages : around this data. : : http://phpbuilder.com/columns/jesus19990308.php3 : : has an article on learning to use mysql. : : if you dont have a db you can use, you could use xml, I would recommend : installing a db before you tackeled this, you said you have till monday, : this doesnt leave alot of time to learn xml and all that is assisiated with : it. your going to be pushing it to learn a db language by then. : : when php is run all the variables are rememberd, untill... php stops : running, then all is lost, this is why you need a db, to remember all the : data. you could use sessions, but this is not what your looking for. : sessions are for remebering *one* persons info, not many people's, and not : for long term, short term. : : -- : : Chris Lee : Mediawaveonline.com : : ph. 250.377.1095 : ph. 250.376.2690 : fx. 250.554.1120 : : [EMAIL PROTECTED] : : : ""YoBro"" [EMAIL PROTECTED] wrote in message : 9746nm$gh3$[EMAIL PROTECTED]">news:9746nm$gh3$[EMAIL PROTECTED]... : Hi, : : My last message on this topic was a bit hard to translate. So here is the : thought out version. : : 1.I have a page on a server called admin.php (protected by htaccess : for : admin use only) : 2.This page holds variables that are changed by form elements. : (Checkboxes etc) : And this in turn effects different parts of the site it is being : used : in. : 3.I want to know how to keep the changes to the form. : : Example: If i bring up the admin.php page in my browser and click a : checkbox, it permantly keeps it changed until i decide to change it again. : : 4.Is there some sort of PHP save command, that saves the state of a : page. : 5.Any ideas? : : Please help, I gotta have this worked out by Monday or I'm dead. : : -- : Regards, : : : YoBro : - : DO NOT REPLY TO THIS VIA EMAIL : PLEASE USE THE NEWSGROUP : All emails sent to this address are automatically deleted. : This is to avoid SPAM! : - : : : : -- : 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] Order by Date (Newbie)
To order by dates use SQL select * from news order by PostDate DESC; and then make sure that PostDate is a date or datetime - hell even an int with a unix timestamp (aka time()) will work. --Joe On Fri, Feb 23, 2001 at 07:52:54PM -0500, Brian S. Drexler wrote: Ok, I must be missing something, but does anyone have a script that will order by the closest date in the future that hasn't been here yet. Did that make sense? Brian -- 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] -- --- Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V --- -- 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] Help INSERTing to MySQL
Hello, This is my first attempt, so I'm prolly doing something stupid, but can someone tell me why this doesn't work? All it returns is "Unable to INSERT to database" ---BEGIN--- ? $time = time(); $rand = Random_Password(5); $docid = $time . $rand; if (isset($email) isset($docid)) { mysql_connect("$HOSTNAME", "$DB_USER", "$DB_PASS"); $query = "INSERT INTO documents VALUES ('$docid', '$category', '$subcategory', '$date', '$subject', '$title', '$author', '$email', '$language', '$grade', '$level', '$city', '$state', '$county', '$zip', '$authors_comments', '$teachers_comments', 'N', '$docdata')"; $result = mysql_db_query("$DATABASE", $query) or die("Unable to INSERT to database"); if ($result) { echo "p$docid was added to the database/p"; }}? h1Submit a new document to the database/h1 form Email Address: input type=text name=emailbr Category: select name=category? print "$CATEGORIES" ?/selectbr Sub Category: select name=subcategory? print "$SUBCATEGORIES" ?/selectbr Date Document was written: input type=text name=date (xx-xx-)br Document Subject: input type=text name=subjectbr Document Title: input type=text name=titlebr Document Author: input type=text name=authorbr Document Language: input type=text name=language value=Englishbr Grade Received (Percentage): input type=text name=grade size=3 (xx/100)br Grade Level of Paper: select name=leveloptionHigh School/optionoptionCollege/optionoptionOther/option/selectbr City in which paper was submitted: input type=text name=city value=Jacksonvillebr State in which paper was submitted: input type=text name=state value=FLbr County in which paper was submitted: input type=text name=county value=Duval b(County, not Country!)/bbr School at which paper was submitted: input type=text name=school value="Mandarin High School"br ZIP code: input type=text name=zip size=5 value=32257 b(Put your ZIP code in if you don't know your school's)/bbr Author's Comments: input type=text name=authors_commentsbr Teacher's Comments: input type=text name=teachers_commentsbr Document (ASCII TEXT ONLY):br textarea name=docdata cols=80 rows=30Paste document text here/textarea pinput type=submit value="Submit for verification" /form -END- TIA! Clayton -- 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] Order by Date (Newbie)
On Fri, 23 Feb 2001, Brian S. Drexler wrote: Ok, I must be missing something, but does anyone have a script that will order by the closest date in the future that hasn't been here yet. Did that make sense? Brian $plusten = mktime(0,0,0,date("m"),date("d")+10,date("Y") ); Will take todays day, and add 10 days to it. -- Kind Regards, --- Kyndig Online Text Game Resource Site: http://www.kyndig.com ICQ#10451240 -- 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] Help INSERTing to MySQL
Before your VALUES you need to have a list of the fields ie: insert into table (id,fname,lname) values ('$id','$fname','$lname') --joe On Fri, Feb 23, 2001 at 08:00:30PM -0500, Clayton Dukes wrote: Hello, This is my first attempt, so I'm prolly doing something stupid, but can someone tell me why this doesn't work? All it returns is "Unable to INSERT to database" ---BEGIN--- ? $time = time(); $rand = Random_Password(5); $docid = $time . $rand; if (isset($email) isset($docid)) { mysql_connect("$HOSTNAME", "$DB_USER", "$DB_PASS"); $query = "INSERT INTO documents VALUES ('$docid', '$category', '$subcategory', '$date', '$subject', '$title', '$author', '$email', '$language', '$gr ade', '$level', '$city', '$state', '$county', '$zip', '$authors_comments', '$teachers_comments', 'N', '$docdata')"; $result = mysql_db_query("$DATABASE", $query) or die("Unable to INSERT to database"); if ($result) { echo "p$docid was added to the database/p"; } } ? h1Submit a new document to the database/h1 form Email Address: input type=text name=emailbr Category: select name=category? print "$CATEGORIES" ?/selectbr Sub Category: select name=subcategory? print "$SUBCATEGORIES" ?/selectbr Date Document was written: input type=text name=date (xx-xx-)br Document Subject: input type=text name=subjectbr Document Title: input type=text name=titlebr Document Author: input type=text name=authorbr Document Language: input type=text name=language value=Englishbr Grade Received (Percentage): input type=text name=grade size=3 (xx/100)br Grade Level of Paper: select name=leveloptionHigh School/optionoptionCollege/optionoptionOther/option/selectbr City in which paper was submitted: input type=text name=city value=Jacksonvillebr State in which paper was submitted: input type=text name=state value=FLbr County in which paper was submitted: input type=text name=county value=Duval b(County, not Country!)/bbr School at which paper was submitted: input type=text name=school value="Mandarin High School"br ZIP code: input type=text name=zip size=5 value=32257 b(Put your ZIP code in if you don't know your school's)/bbr Author's Comments: input type=text name=authors_commentsbr Teacher's Comments: input type=text name=teachers_commentsbr Document (ASCII TEXT ONLY):br textarea name=docdata cols=80 rows=30Paste document text here/textarea pinput type=submit value="Submit for verification" /form -END- TIA! Clayton -- 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] -- --- Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V --- -- 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] Help INSERTing to MySQL
Hello, This is my first attempt, so I'm prolly doing something stupid, but can someone tell me why this doesn't work? All it returns is "Unable to INSERT to database" Change : or die("Unable to INSERT to database"); To : or die(mysql_error()); And see what it tells you. Odds are there's a field not being accounted for. When not designating columns (just values) it's important to make sure all columns are accounted for. See : http://www.sqlcourse.com/ It'll provide some basic SQL help. It's recommended to write out columns and values (easier to make sense of). Regards, Philip Olson http://www.cornado.com/ ---BEGIN--- ? $time = time(); $rand = Random_Password(5); $docid = $time . $rand; if (isset($email) isset($docid)) { mysql_connect("$HOSTNAME", "$DB_USER", "$DB_PASS"); $query = "INSERT INTO documents VALUES ('$docid', '$category', '$subcategory', '$date', '$subject', '$title', '$author', '$email', '$language', '$gr ade', '$level', '$city', '$state', '$county', '$zip', '$authors_comments', '$teachers_comments', 'N', '$docdata')"; $result = mysql_db_query("$DATABASE", $query) or die("Unable to INSERT to database"); if ($result) { echo "p$docid was added to the database/p"; } } ? -- 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] URGENT: IE pops-up an Error and File Download Fails. Needs to be fixed NOW. Please advise.
Read the http://php.net/FAQ about the NULL character problem. I'm betting you have some funky character that confuses that browser in the output that the other browsers just ignore. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Boaz Yahav [EMAIL PROTECTED] Newsgroups: php.general Sent: Wednesday, February 21, 2001 12:59 AM Subject: RE: [PHP] URGENT: IE pops-up an Error and File Download Fails. Needs to be fixed NOW. Please advise. What do you see in your web server logs? what webserver do you use? Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 21, 2001 8:59 AM To: 'PHP General List. (E-mail)' Subject: [PHP] URGENT: IE pops-up an Error and File Download Fails. Needs to be fixed NOW. Please advise. Hello guys, This is that time when I am in trouble ... One of our internal databases receives inputs from all kind of different places and stores them for later reviews. Since it's creation it was all going perfectly well, but now it has a little problem: The Internet Explorer gives me this error while listing one of databases' tables: (it is a pop up message of internet explorer) Internet Explorer Cannot Open the internet site http://that.damn.db/database.php http://that.damn.db/database.php ?db=opp_post The download of the specified resource has filed. What is it, PHP or IE? I suppose something is wrong with IE (5.01 for instance), but so far couldn't come with any solution. The output is simply not there, source shows cuted off at the very beginning of file - after few hundreds of bytes. This suggests me that one of the entries in Database is somehow corrupting IE. But I have not found anything strange. What to look for, guys? I tested it on Opera and Netscape - no probs whatsoever. I also tested it on Linux, and Mac (Opera, Netscape) - no probs whatsoever. ...and (listen to this one)... I tested it on Mac, MSIE 5.(01)? (just the version I have on my Win2k) -- and It gave me no errors at all. Why MSIE 5.01 of Win2k gives that message and breaks download? I've seen this messages already while browsing the web, and that's the reason I'm asking you: anyone had to fix that before? What are your guesses on my problem? It is quite urgent since the database is not usable and I don't have much time for researches on this issue. The sad thing is that our office uses the exactly same configured machines (MSIE5 - Win2k) and no one can view the database from their PCs. All the sales and coordinators are staying here in line near my MAC while I am writing you this. Any help is greatly appreciated! Cheers, Maxim Maletsky P.S: if any friends of Bill are around the list, please forward him my happy moments and eventual sweet words. Maxim Maletsky - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Webmaster, J-Door.com / J@pan Inc. LINC Media, Inc. TEL: 03-3499-2175 x 1271 FAX: 03-3499-3109 http://www.j-door.com http://www.j-door.com/ http://www.japaninc.net http://www.japaninc.net/ http://www.lincmedia.co.jp http://www.lincmedia.co.jp/ -- 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] smtp protocol
Hi...anybody can help me about sending email directly using local smtp port (25). I've read some articles, still, i don't have a clear explanation. i.e : some using \n to separate between each header, but others use \r\n. The ones using \n haven't read the spec very carefully, and are using Un*x mail servers that are forgiving. The ones that use \r\n either read the spec, or are using very rigid unforgiving Microsoft products. Use the \r\n ones if you care about portability. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] cURL library and auto-loggin to a site
Does anyone know if it is possible to use PHP and cURL to auto-login into a site (which sets a cookie) and then fill in a form to send an sms message? I need to do this to test a site automatically and check response times for sending the SMS. I have no idea what SMS is. You *can* probably use PHP and cURL to send and receive the appropriate data to initiate and continue a cookie session to fake out the server and fill out the form. You just might have to work at it a bit. Tip: Set up a page that works the way you think their page works, and then use ?php phpinfo();? in it to figure out what a "normal" browser sends to a server that's doing what you think they are doing. Send exactly the same stuff to their server that worked on your server, and see what happens. If you work hard enough at it, there is *no* *way* they can detect that your program is not a human. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Database Paging using MSSQL 2000
I wanted to know if there is some syntax in the MSSQL Select statement which can allow me to limit the no. of records being returned. I am lookin at functionality which is similar to LIMIT in Mysql. Look up "cursor" in your MS SQL documentation. It's not as mind-numbingly simple as LIMIT, but it works. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Apache php as a DSO module woes!
apxs:Break: Command failed with rc=65536 Search the mailing list archives for "rc=65536" -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] fopen
I'm trying to fopen a URL that I have no problems getting to if I just past it into the address field of my browser. However, when I use it in my fopen() function call, I'm getting an "Error 0" (zero) message. I've looked all over the documentation and I could not find what 'Error 0' means. Your browser is probably configured to use "anonymous/youremailhere" as usename/password to FTP. Are you using those values in your PHP code? -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Encryption
I am trying to do a simple encryption on a credit card number to store in a mysql text field. I also have to de-crypt the number after exporting to an access db. I tried to use xor encryption, but it seems to only work half the time, the other half, I can't seem to de-crypt the # properly, some of the numbers end up screwed. Is this because of the way mysql is storing the field? Mabye it can't recognize some of the characters that are generated from the xor encryption? Ex: 123456789123 may end up 1 YdR and then de-crypts to 1234(*$8912# Is it the that are the problem? Or is the the access database that isn't properly storing the ? Yes, those are the problems. You are XOR-ing and getting invalid characters. You could URLEncode/URLDecode it, or Base64_Encode/Base64_Decode or some other way of guaranteeing that your databases don't have to deal with funky characters. Is there a better way to do this? This is a *really* bad idea, all around. Either the place you are storing the credit card numbers is "secure enough" that encrypting them is pointless, or it's not secure enough at all, and your encryption won't stop anybody who wants those numbers. You shouldn't be storing nor transporting credit card numbers insecurely. XOR-encryption is not secure, by definition. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] fread over ftp
if( !($fd = @fopen($ftp_url, "r")) ){ $error = true; $error_msg = "Unable to connect to server."; } else { $file_contents = fread($fd, 10); fclose($fd); } if( empty($file_contents) ){ $error = true; $error_msg = "Did not read file."; } The problem is that the fread doesn't always succeed; about about half the time the $file_contents string tests as empty. There is never a problem with the fopen, and there doesn't seem to be any consistancy in the failure... The same file may be loaded into the string on run one, and missing the next. The remote server is NT-based. Does anybody know what is going wrong here? I don't have to add any logic to "wait" for the fread to complete, do I? You do not need to "wait" for fread(). It blocks by default. Unless you've messed around with set_socket_blocking() somewhere else in your code?... What *exactly* is the value of $file_contents when it fails? echo "'$file_contents' ", gettype($file_contents), "BR\n"; If it is 0 or 'false' you can at least detect the problem and try again a time or two... -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Saving changes to a file
I am trying to make am admin page for a few other pages in PHP but I dont know how to save the changes made. ie. The page has a few checkboxes select boxes that when changed, change some variables that are then used in other pages. However I want the changes in the admin page to be permanent, until they are changed again. Not just for that session or user, but if the change is made it stays changed until the administrator decideds to go back in and change it again. How do you save the changes in that file on the server, by just using a browser? The *easiest* way to do this is to store those changable values and their possible settings in a database. Really. Even if you've never used a database before, it's the easiest. Honest. Then just have the pages access the database to get their settings. *HOWEVER*, if you are not already using a database, opening a database connection can be expensive time and resource-wise. So, if you don't already use a database, and *IF* (*huge* *IF* there) you can guarantee that no two administrators will attempt to alter settings at the same time, and *IF* you really, really need to worry about performance, you could fopen() the file to write the current settings to it. This comes with a security penalty -- You have a file somewhere on your file system that PHP's user (usually 'nobody') can write to and that gets read by all your pages to set your variables. In an ideal world, you should *at* *least* make sure that: o This file is *not* in your web-tree, but is somewhere else o This file does *not* have .php extension o All settings are explicitly checked for by the reader code, not this file. To further explain this third point: You *could* (bad idea) just have your file look like this: - settings.inc - ?php $forecolor = 'FF'; ? And you *could* (bad idea) just include() it in your scripts. But, this file is essentially world-writable. (Well, okay, it's only 'nobody' writable, but any other person on your server can write to that, so it's pretty darn close to world-writable.) So, they could put all sorts of malicious code in there. Far better to have your nobody-writable settings file look like this: -- settings.ini --- forecolor = 'FF' backcolor = '00FF00' And have another file you include() that looks like this: ?php $settings = file('/full/path/to/settings.ini'); while (list(,$line) = each($settings)){ list($var, $val) = explode('=', $line); switch ($var){ case 'forecolor': $forecolor = $val; break; case 'backcolor': $backcolor = $val; break; default: mail('[EMAIL PROTECTED]', 'HACKER ALERT', 'Somebody has altered settings.ini!'); break; } } ? You can even be more cautious by validating the individual inputs for the settings. IE, forecolor should be exactly 8 characters, starting with ' and ending with ' and only [0-9a-fA-F] in between. (Regex is your buddy here.) The point is to make it harder for a hacker to exploit this file they can all too easily write into. *YOU* make sure that the data you have there is what you expect, and you are only setting variables you expect, not just executing what is essentially arbitrary code that anybody else on your server could alter. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Trans sid and form posts
Can anyone tell me if trans sid is supposed to work through form posts, It is supposed to work. and if so how to make it work right? It is working fine through normal links, but we have quite a few posts, and they lose the session. :( Use "View Source" in your browser on one of your FORM pages. I forget if trans sid puts the ID into the URL (ie, mixes GET/POST) or adds it as a INPUT TYPE=HIDDEN form element... If, as I suspect, it is being put into the URL, you may be accidentally not getting the mixed GET/POST data... Perhaps just adding enctype=multipart/form-data would help... Or maybe something in your web-server is tromping on the mixed data types. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] file upload error w/internet exploder!
I've created a simple form that uploads file to my server. I noticed that I'm having problems when I use Internet Explorer 4.5 and 5.0 on the Mac (I haven't checked it yet on the pc). It may have something to do with the path to the file. When I use Netscape, the entire path is displayed in the form field prior to upload. IE only displays the file name, no path. Is there a way that I could force the path along, echo maybe? You aren't necessarily supposed to see the full path or not, nor does your script need it. You should only get the filename by the time it reaches PHP. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Cookie stored but cannot trigger the function...
Before redirecting it will also store a cookie in the browser named camefrom. SO then On the login.php page a user enters username and pasword and Submits.. if user is found then It has to get the Cookie value like this: $goto = $HTTP_COOKIE_VARS['camefrom']; header ("Location: $goto"); Only some browsers will accept a Cookies *and* a redirect in the headers in a single page. Don't use a cookie to do the "camefrom". Use $HTTP_REFERER or use: header("Location: login.php?camefrom=thispage.php"); -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Alternate 2 schedules...
I' m searching a way to programmatically alternate 2 schedules each sunday at 00:00. Schedule1 start on first sunday and seven days later, schedule2 replace schedule1,and seven days later, schedule1 replace schedule2 etc... The *easiest* thing to do would be to run a cron job every Sunday at midnight to flip something... But, assuming you want to avoid that: ?php $now = time() $weeknumber = $now % 52; #So now I know which week of the year it is... #How do I know if it's "before" or "after" Sunday? #Easy: $dayofweek = date("w", $now); #So, now $dayofweek is either 0, for Sunday, or 1 for Monday, or... #Problem, how to mix and match $weeknumber and $dayofweek to "change" on Sundays #Well, did this year start on a Wednesday, or what? $newyeardayofweek = date("w", mktime(0, 0, 0, 1, 1, date("Y", $now))); #This formula makes a lot more sense if you look at sample data: /* Format is: The Day of week (Sun-Sat) The day of the year 1-365 $weeknumber/$dayofweek The right-hand column is 1/2 based on which schedule we want. | | v Thu Fri Sat 1 2 3 1 0/4 0/5 0/6 Sun Mon Tue Wed Thu Fri Sat 4 5 6 7 8 9 10 2 0/0 0/1 0/2 0/3 1/4 1/5 1/6 Sun Mon Tue Wed Thu Fri Sat 11 12 13 14 15 16 17 1 1/0 1/1 1/2 1/3 2/4 2/5 2/6 Sun Mon Tue Wed Thu Fri Sat 18 19 20 21 22 23 24 2 2/0 2/1 2/2 2/3 3/4 3/5 3/6 */ #So, the "trick" is to switch on whether our day of the week is before or after #the day that started the year off. if ((($weeknumber % 2) ($dayofweek = $newyeardayofweek)) || (!($weeknumber % 2) ($dayofweek $newyeardayofweek))){ include 'schedule1'; } else{ include 'schedule2'; } ? Somebody else probably has a one-line answer. Oh well. :-) -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] cached fasttemplates permissions prob
You may need chmod 666 instead, for the cache directory... ./menu.cache needs to be *WRITABLE*, not *exectuable*. Seems pretty scary to me to have world-writable files in your web-site though... -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Peter Van Dijck [EMAIL PROTECTED] Newsgroups: php.general Sent: Thursday, February 22, 2001 11:05 AM Subject: [PHP] cached fasttemplates permissions prob I'm trying to get cachedfasttemplates to work. I chmodded the entire directory and everything in it 775 (using -R), I still get Warning: fopen("./menu.cache","w") - Permission denied in ../includes/classes/fasttemplate/cachedfasttemplate.class.php on line 73 Any ideas at all? I've been stuck on this for the entire afternoon... thanks Peter ~ http://liga1.com ,a weblog on: - Localisation - Internationalisation - Globalisation - Accessibility -- 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] I have a great problem with sessions, can anybody help me!!!
?php session_start(); if( !isset( $c)) { session_register("c"); $c = 1; } echo $c . "br"; ? a href="index.php"reload/A In the new machine this code every show 1, don't save session data. I see in /tmp and all the sess_* files are empty. I check configuration, etc, and don't found anything. I check the same code in other machine with the same configuration, and works fine. Can anybody help me?? Move the session_register() outside (before) the if() -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] security and php
I am a system administrator and currently we are playing to migrate all our CGI (written in C) to php! But playing a little with php i got worried about how services that need to keep username/password are handled by php, for instance: For starters, you *could* have PHP running as a CGI wrapped by suExec (http://apache.org) Performance, however, would be not-so-hot, particularly after custom C code as your previous experience. Rumor had it at one point that Apache 2.0 would allow Modules to execute in a similar fashion to suExec -- Whether this feature has survived development/debug/QA phases is unknown to me. But it *might* be worth checking out. WARNING: You'd be way past the envelope of tested source code at that point. Not just with Apache as Beta software, but with PHP/Apache/MySQL interaction. OpenSource QA mostly consists of quantity of users pounding on stuff, versus a planned organized QA team. You *could* write a tiny C-module using PEAR, or even alter PHP's source code, to have the passord encoded as part of your PHP Module binary. Your username/password would then be buried somewhere in the binary of that module, so only a C disassembler would get it out. I *think* libphp4.so just needs to be executable for Apache, right?... Many admins set up different username/passwords for MySQL, depending on what "classes" of users need select/update/insert/delete access to which tables -- And the one username/password combo that is for general everyday access through your public site is stored in a file that the PHP user (default 'nobody') can read, but is in a directory tree that is not in the web tree and that other users cannot 'cd' to. PHP can http://php.net/include such a file, even though it is not visible in the web-tree via a browser, if the include_path is set properly in php.ini. Still, other users on the same server can read that file using PHP or Perl or anything else than can run as user 'nobody', so it's not great protection. Another option would be to buy the Zend Encoder, and encode the file that contains username/password info. Rather expensive for what you need right now, but it would save you writing/testing the C code to bury the username/password in a large enough block of binary, and you can move on to your "real" application. Of course, if at some point you want to install PHP code on somebody else's server, or just keep a lot of files on your own server protected, the Zend Encoder price becomes more reasonable. Again, only somebody with a lot of time on their hands, a thorough knowledge of the Zend engine, and a disassembler is going to be able to reverse-engineer this. Still, if they want it bad enough, they *can* -- There's pretty much *no* *way* to have your web server capable of reading/executing a file, and yet not have some other user on that machine capable of doing the same to masquerade as that MySQL user, if they work at it enough. It will be as as good as your CGI programs were, but no better. Well, maybe a little better, since C crackers/disassembler-experts exist, but I don't think there are any ZendEncoder cracker specialists yet... All our CGI programs execute sql queries to a mysql server, they contains the user name and password in order to login into the database. Since these programs need only to be executed its read flags are turned off. I need such a funcionality with php, but how can this be done? It seems to me though, that the barrier difference between nobody-executable and nobody-readable is not *that* different: If I can write a Perl/PHP script to execute your connect.cgi, it ain't all that more difficult from being able to read the username/password in your connect.php. Yeah, I have to write a little shell script. Not that big a deal, really, in most real-world scenarios. PHP scripts not owned by the user that runs the web server are required to have the read flag for all tuned on, ok? this makes its contents readable by all my system users, right ? So how to put user name/password information into such script in order to get it accessing mysql, but without allowing any other user to get into its contents and reading login/password information ? It doesn't have to be *world* readable -- You can chown -R your site to be the user that PHP runs as, and chomd -R 400 it. See ?php phpinfo();? to find out what that user is, and edit httpd.conf to change it with "User" directive. So now, only people who can su to 'nobody' or who have access to write PHP/Perl/C code on your server are able to snarf those passwords. Let's face it -- If they can write PHP/Perl/C code and execute it on your server, your MySQL passwords for data that web-surfers can read is probably not your biggest worry. Also, check out "safe mode" That makes it harder for one user on a shared server to read another user's files with username/password info in them. This is more for use in a VirtualHost ISP environment, which I get the feeling you're
Re: [PHP] is there a way to set apache's auth_user from php?
I would like to have the authenticated user name appear in my apache access web logs but I am not using HTTP authentication. I am using phplib to have better control over the authentication process. Is there a way to set this apache api variable from php code so that apache will log these user names? I think not. That variable is sent/set by the *browser* to Apache on each URL request. What you *could* do is log stuff yourself from PHP using http://php.net/error-log You could log the time, their IP, and their user_agent using that, and then later mix-and-match those entries with Apache entries to figure out who asked for what. For that matter, you could turn off Apache logging, and use PHP's to log everything you need. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] php_self
Why does php self always show php4/php.exe? how do i take it off? This is a known bug under *some* Win32 installations. Use ?php phpinfo();? to figure out which variable has what you need in it, and use that variable. If you need to deploy on multiple platforms, you'll have to compare/contrast the two server's ?php phpinfo();? outputs and find a common variable with the info you need, or using some sort of if/else with the other variables to detect which platform is running. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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.sock
can someone please send me mysql.sock ( unix redhat 6.2 ) i had a crash - reinstalled the rpm 3.22.32 but this file is missing Unless I'm grossly mistaken, that file should only exist while MySQL is actually running, and should contain the socket number that MySQL happens to be using at the moment. So, (A) their mysql.sock is not going to do you any good, and (B) it will get created when you start MySQL, and (C) you really don't want to try to change it by hand. You may need to *delete* the old mysql.sock file, if MySQL didn't "know" the computer crashed, and is complaining about that old one being there. It's basically just MySQL thinking that MySQL must already be running since you have one of those files. Or, you may just need to start MySQL to have a mysql.sock file show up where you think there should be one. Or, *maybe* the *path* where MySQL wants to store mysql.sock somehow got trashed/changed during your RPM install, since it is configurable, and you just need to create the directory where mysql.sock wants to live. WARNING: If you messed this up with your RPM, you may have also not told the new MySQL install where your databases live. Don't panic if you fire up MySQL and all your databases are "gone". You probably just need to configure MySQL to look for the database files in the right place. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] session question
index.php where they log in from ? session_start(); file://first line of file Okay. ? form method="POST" action="main.php" input type="hidden" value="lrlogin" name="form_action" Usernamenbsp;nbsp;input type="text" name="username" class="color"br / br/ ? You been typing too much XML?... :-) Shouldn't hurt. Passwordnbsp;nbsp;input class="color" type="password" name="password"br / input type="reset"nbsp;nbsp;nbsp;input type="submit" value="Login" code from main.php ? session_register(); Register what? You're supposed to register a variable name... require ("db.php"); if $form_action == "lrlogin" { get_user($username,$password); } ? code from db.php ? session_start(); Doing this after you registered a variable is bogus -- The session_register() automatically calls this if you haven't yet. SQL to select user info from db $access = $row[access_level]; file://etc getting vars from db session_register("username"); session_register("password"); session_register("access"); session_register("active"); header("Location:http://www.blah.com/index2.php?=".SID); Doing session_start() (and, by extension, session_register()) in the same file as a header("Location:") won't work on some browsers. You'll either get the cookie but no redirection or vice versa, depending on which browser you are using. And there should be a space after 'Location:' And you probably need SID= for the SID to get passed on. header("Location: http://www.blah.com/index2.php?SID=".SID); exit; ? index2.php code ? session_start(); print "Welcome $username"; ? it only prints Welcome ...no username :( -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Need socket help!!!
Now I cannot go any further. I need to go to a page, password.php!! All efforts give an error message. What error message? Would it perchance, be the one about "headers already sent"? You need to *NOT* have *ANY* output to the browser before you attempt to do: header("Location: password.php"); Output includes "echo" or "print" statements, error messages, HTML, or *EVEN* (and this is the killer) blank lines outside ?php ? tags. Specifically, if you include a file, and that file has a newline after the ? at the end, you can't do a header after that. Get rid of the trailing newline. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] encrypt and decrypt in standard PHP
You could use popen() to execute http://gnupg.org or PGP... It would be easier to recompile PHP, though, and performance on popen() is going to suck. You *might* be able to compile just the encryption module, and use dl("mcrypt.so") in your PHP script to load it up rather than recompile all of PHP, but again, it's going to be harder, and performance will suffer. Compiling PHP the *second* time is *way* easier than the first time, especially if you've saved your previous PHP source tree and all the other source trees -- There's a file in the PHP source tree called config.status, and some other config.* files, that "remember" what you did last time. So, copy those somewhere safe, and then look at them. You'll probably be able to copy config.status to config.zhu, and then edit that to add --with-mcrypt (or whatever it is), and do: chmod 755 config.zhu ./config.zhu -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Zhu George-CZZ010 [EMAIL PROTECTED] Newsgroups: php.general Sent: Friday, February 23, 2001 11:07 AM Subject: [PHP] encrypt and decrypt in standard PHP As the PHP manual indicates, we can use Mcrypt to do the encrypt and decrypt work in PHP, but that needs to download the encrypt module and recompile PHP. Is there any other way to encrypt and decrypt the string in standard PHP4.0.4 without any extension module? Thank you very much! -- 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 Frame Question
Is it possible to target a frame in the Location: of a header? Sorry if this has been brought up a million times before. No. You *can* pass enough information to the FRAMESET page that it will load the right content for each sub-FRAME. http://yoursite.com/main.php?nav=a.phptop=b.phpcontent=c.php main.php --- FRAMESET ... FRAME SRC=?php echo $nav;? ... FRAME SRC=?php echo $top;? ... FRAME SRC=?php echo $content;? ... /FRAMESET In essence, you are "losing" the feature of frames that lets only one change on a given HTTP interchange, but you still have frames (God knows why you want them) and each FRAME gets the right content in it... -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] php (cgi version) with Apache and suexec - help
Don't use safe-mode in your suExec PHP CGI configure. suExec pretty much does everything safe mode does anyway, and more. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: [EMAIL PROTECTED] Newsgroups: php.general Sent: Friday, February 23, 2001 1:18 PM Subject: [PHP] php (cgi version) with Apache and suexec - help I've been trying to get the cgi version of php working with Apache and suexec but so far I have not had much success. I've installed the Apache module version of php and it seems to work fine. I then installed the cgi version of php and it too seems to work fine as long as it doesn't run through suexec. Suexec works fine for other (perl, c, etc...) cgi's. Here's what I have in Apache's httpd.conf: AddType application/x-httpd-php .php Action application/x-httpd-php /cgi-bin/php.cgi When I try to access a .php file I get an error about the command not being in the document root. This is one of the tests suexec performs and it is true, the cgi-bin directory (and hence the php binary) is not under the document root (although the .php file is). If I change httpd.conf to this: ScriptAlias /php-bin/ "/local/www/php/" AddType application/x-httpd-php .php Action application/x-httpd-php /php-bin/php.cgi Now the php binary is under the document root but when I try to access a .php file I get an error that the target uid/gid does not match that of the directory or program. This is also true since the php binary is owned by the web server and the .php file is owned by another user. So my question is "What am I missing?". How can I ever get the cgi version of php to work with suexec? The php binary is owned by the web server but the .php files will be owned by other users. Here is some more information about the environment in which I am working in case it is relevant: Solaris 7 Apache 1.3.17 php 4.04pl1 I'm just about ready to give up on this one. Thanks in advance for any and all help. -john -- 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] Submitting Form Information
Search the net for Rasmus Lerdorf's "posttohost" function from long, long ago. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: "Matthew Aznoe" [EMAIL PROTECTED] Newsgroups: php.general Sent: Friday, February 23, 2001 2:37 PM Subject: [PHP] Submitting Form Information Is there a way to simulate a form submission to a cgi-script using PHP? I am trying to write a script that will replace the frontend of another CGI script with a customized one of my own, but I need to be able to pass form data into the next page in the cgi (including a password). Matthew Aznoe Fuzz Technologies [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] file test
I am opening the top level of a a directory structure with dir. I want make a list of the subdirectories, but not the files. Is there a file test operator like perl's -d in php? I will then have to go into the sub directories to perform actions on non directory files http://php.net/is_dir -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] chunk_split() doesnt seem to be working
Im running php 4.0.4pl1 Fatal error: Call to undefined function: chunk_split() in /home/httpd/vhosts/myhearingstore/mail.egn on line 33 is there a configure option im supposed to compile in ? What version of PHP does ?php phpinfo();? claim you are running?... -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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]