RE: [PHP] linking classes together
Your need to define $db as a property of your sessions class. e.g. class sessions { var $db; function sessions { $this->db = new mysql_connect; } function testprint() { $this->db->connect() } } $sess = new sessions; $sess-> testprint(); -Original Message- From: Tobias Talltorp [mailto:[EMAIL PROTECTED]] Sent: 21 March 2001 22:38 To: [EMAIL PROTECTED] Subject: [PHP] linking classes together I have two classes, one with mysql-connections and one with session-stuff. The session-class relies on the mysql to check if the user is registered and such. What is the proper way to connect/link these classes together? I got it working if I created a $db = new mysql_connect; in the function, but there are other functions that need to be able to connect to a database aswell. Putting the $db = new mysql_connect; in the constructor did not work. (See code below) // This works ---> class sessions function testprint() { $db = new mysql_connect; $db-> connect() } } $sess = new sessions; $sess-> testprint(); // This does not work --> class sessions { function sessions { $db = new mysql_connect; } function testprint() { $db-> connect() } } $sess = new sessions; $sess-> testprint(); Any thoughts? // Tobias -- 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] Installing PEAR
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes >Ok, IM a bit confused as to how PEAR is installed. I read through the README >file in the php source but found no explanation. > >I am tryin to use the PEARs DB abstracion. I have DB.php and DB/ in >/usr/local/lib/php. I added: 'include_once(DB/mysql.php);' to the top of my >script but it failed since it is not finding it. Do I need to assign a path in >the php.ini file or have I missed an installation step? > >Can somebody please explain or point me to some docs on how I get up and going >with PEAR. Hi, Try something like: query ($sql))) handle_db_error ($result); else $resultArray = $result -> fetchRow (DB_FETCHMODE_ASSOC); $db_con -> commit(); if ($db_con && (! $usePersistentConnects)) $db_con -> disconnect(); ?> I hope the line wraps still leave the above readable. I made a separate function of my own, handle_db_error (), to handle errors - you might like to do something like: echo DB::errorMessage($result); ... instead. I recommend putting all the db connection stuff in a file which resides outside of the document root and including it where you need it. The following links may prove useful - the user comments in the phpbuilder article were particularly helpful in pointing me in the right direction. http://cvs.php.net/viewcvs.cgi/php4/pear/DB/ http://www.phpdoc.de/pear/index2.html http://www.phpbuilder.com/columns/allan20010115.php3 http://pear.php.net http://www.php.net/manual/en/pear.php All the best, -- Paul Rees Web Application Programmer/Developer surfEU.com GmbH -- 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] big problem
You need to set the permissions in that folder so that you can write. PHP acts like IUSR(computernmae), so set IUSR(computername) permission to write. This is Windows, by the way... // Tobias ""Salim Meethoo"" <[EMAIL PROTECTED]> wrote in message 99c90k$83u$[EMAIL PROTECTED]">news:99c90k$83u$[EMAIL PROTECTED]... > hello there, > can somebody help me out with my scripts while running this: > .. > $myfile = fopen("data.txt","w"); > .etc; > ?> > i get the following error message: > Warning: fopen("compteur","w") - Permission denied in cmguestcount.inc.php3 > on line 11 > i'm using php3 and this scripts are for a counter of my page . > thanks > Salim > > > > > -- > 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] PAM authentification
Hi there! I wonder if there is someone out there who can help me out with some advices regarding authentification with PAM (Pluggable Authentication Modules) using PHP. The main reason for using PAM is that I want to connect to Novell NDS/eDirectory to get info about a user based on a supplied username and password. This info will then be presented to the user on a web page when they are logged in. We are currently running freeBSD on our webservers, but may consider to set up a machine with Linux if necessary. So, if any of you people could help me out here, that would be really appreciated! /Daniel -- 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] dbm support broken? Please help!
I'm trying to build php 4.0.4pl1 with dbm support on my RedHat Linux 6.2 box. I need it to be able to work with apache 1.3.14 mod_auth_dbm. Each time I run: ./configure \ --with-zlib=shared \ --with-xml=shared \ --with-gd=shared \ --with-interbase=shared \ --with-db \ --enable-dba=shared \ --with-dbm \ --with-gdbm \ --with-ndbm \ --with-db2 \ --with-imap=shared \ --with-openssl=/usr \ --with-config-file-path=/etc/httpd/conf \ --enable-versioning \ --with-apxs=/usr/sbin/apxs \ --enable-memory-limit \ --enable-trans-sid \ --enable-sysvsem \ --enable-sysvshm \ --enable-gd-imgstrttf \ --enable-track-vars I get the following error: configure: error: cannot find necessary header file(s) If I remove the line "--with-dbm" everything works fine. What should I do or what should I need to build dbm support into php? I need "dbm", since looks like other formats are not compatible with mod_auth_dbm (and ... Yes, dbmmanage works fine). Thanks P.S. I've also tried with php-4.0.5RC1 but the result was still the same. -- 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] Simple question about mail() limitations (if any :)
< on IIS it is much better solution for more than few mails is to put them < simply in pickup directory of smtp server, I am also sure that there is a < similar possibility on linux How can I identify the location of the pickup directory for the smtp server (on NT)? Euan Greig Technical Consultant BRANN DATA [EMAIL PROTECTED] 01285 645997 ** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. ** -- 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 delete a row from MySql
curious of Hither Green writes: > printf("(DELETE)", $PHP_SELF, $myrow["id"]); Is there a reason why you're not using interpolation? This looks simpler to me, and I thought that a lot of effort went into optimising PHP interpolation. echo "Delete $myrow[id]"; cheers, Jeff -Original Message- From: Peter Houchin [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 4:38 AM To: YoBro; [EMAIL PROTECTED] Subject: RE: [PHP] How to delete a row from MySql db connection here if ($delete){ $rs = "DELETE FROM users WHERE id=$id"; $result = mysql_query($rs); echo "Record Deleted "; } $id = $myrow["id"]; printf("(DELETE)", $PHP_SELF, $myrow["id"]); -Original Message- From: YoBro [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 3:29 PM To: [EMAIL PROTECTED] Subject: [PHP] How to delete a row from MySql Hello, Does anybody know how to make a text link delete items from a MySql Database. I have a PHP page that reads from the database and displays the results, but i want to include an option at then end of each row to delete that information. Alot like in phpMyAdmin. I have looked at that code, but can't figure it out. Any help on this would be really great. -- 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]
[PHP] XML Problems
Hi Folks Has anyone had problems with thej xml parser causing an Internal server error? I'm running IIS5 with the ISAPI module Thnx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Oracle, Win2000, Apache, OCI
< I have seen -many- messages and spent an entire day reading, and haven't < found < what I'm looking for so i hope this is the correct place to ask. < When I try to make an ora_logon or ocilogon, I get < the error: Fatal error: Call to undefined function: ora_logon() < Is this an incorrect PHP setup or is this due to the fact that I don't have < Oracle 8.1.6 installed? < (I have 7.x) < I have uncommented the php_oracle and php_oci8.dll lines in the php.ini < file. Do I need to do more than that? < (I am using the latest php4 windows binary). I too have had a lot of "fun" with this. I seem to have finally got it cracked, with help from this list, and from searches on the web. First, have you checked the setting of your extension directory in php.ini? It should point to the location of php_oracle.dll etc. I think there is something about the distribution of php from php.net that doesn't enable oracle properly. Try downloading it from http://php.weblogs.com/easywindows. The following post (from this list) may help with your next problem! ie Net80/SqlNet. It also helps to install at least the client software for Oracle 8.1.6. I have successfully connected to a 7.3.4 database using ora_logon, but haven't tried ocilogon, as I think this is intended for v8. From: Leon Santos Filho [mailto:[EMAIL PROTECTED]] Sent: 13 March 2001 16:15 To: Herbert Groot Jebbink; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Can't connect to Oracle Hi! I get this code here and it works very well. It was a Jean-Christophe suggestion. You can obtain TNS string from file TNSNAMES.ORA. Good Luck! Leon "); while(OCIFetch($result)) { $CC = OCIResult($result,1); $CCNome = OCIResult($result,2); echo('' . $CC . '' . $CCNome . ''); } echo(""); Euan Greig Technical Consultant BRANN DATA [EMAIL PROTECTED] 01285 645997 ** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. ** -- 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] Ack! Cookie Problems!
Why not just set the session start time in a session variable and then test against that? Something like: session_start(); # This array contains all the session items if (!isset($sesh)) { $sesh = array(); session_register('sesh'); $sesh[start] = time(); } if ( $PHP_SELF == '/login') { if (login_ok()) { $sesh[start] = time(); } } elseif ( time()-$sesh[start] > 60 ) { headers("Location: /login"); exit; } -Original Message- From: Michael Champagne [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 1:25 AM To: PHP General Mailing List Subject: [PHP] Ack! Cookie Problems! Ok, I'm going through a cookie nightmare. I'm trying to create a session and then cut the user off from the session by setting the expiration of the cookie that I send out using session_set_cookie_params(). Here's my code: /* Start session and unset any previous session variables */ session_start(); session_unset(); session_set_cookie_params(time() + $cookie_expire * 60); // Parameter is in seconds The cookie never expires though! I set $cookie_expire to 1 (should expire in one minute) and I can keep right on accessing pages. BTW, all the pages do a session_start and check for a variable at the beginning and redirect to the login page if the var is not found. Does anyone know what's up with this? Thanks for your help in advance. -- Michael Champagne, Software Engineer Capital Institutional Services, Inc. wk: [EMAIL PROTECTED] hm: [EMAIL PROTECTED] ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- 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] Getting a header without ANY mime type
On Thursday 22 March 2001 02:32, you wrote: > I've got a situation where I'm interested in returning a header without > ANY mime type specified. It looks like the default Mime type is set by > the server (plain text)? Or at least when I don't specify the type It's set by PHP (text/html) > that's what my server is returning. I'd also like to ensure that there > is no content length returned. Is this possible? So you want to give the browser something and make really sure that it has no chance of interpreting it correctly? Perhaps I miss something, but unless your visitors are masochists with too much time on their hands that's a sure way to lose them really quickly. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...to paraphrase Churchill, while representative democracy may be terrible, it's still the best system that large corporations can buy. - David Weinberger JOHO January 25, 2000 -- 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] trim string - try array/join()
You have a hidden issue with the extra trailing comma. When I want a list of things, I prefer this approach: $db = mysql_select_db("tkenet_db"); $query = "SELECT app_name,status FROM approval_list where doc_no='6'"; $result = mysql_query($query,$db); $ccs=array(); while( $data = mysql_fetch_row($result) ){ $ccs[] = trim($h->get_email($data[0])); } $cc = join(",",$ccs); It seems happy with large arrays (10,000s). Regards Jeff -Original Message- From: Mark Maggelet [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 12:20 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] trim string On Wed, 21 Mar 2001 18:09:47 +0800, Wen Ni Leong ([EMAIL PROTECTED]) wrote: >I need help in this basic string function. >I query from the database by using while loop and the result in in >array. I separated them by using "," . > >I want at the end of the string to be trim off. Unfortunately I >tried >all the string function such as chop,trim and substr but they seem >like >can't manage to trim the end of the string. Please help me. > >my coding are: > >$db = mysql_select_db("tkenet_db"); >$query = "SELECT app_name,status FROM approval_list where >doc_no='6'"; >$result = mysql_query($query,$db); >while($data = mysql_fetch_row($result)){ > > $cc .= $h->get_email($data[0]).","; > > if ($data[1] != 'Y') > { $all_yes = 1;} > } > trim($cc); this doesn't do anything to $cc, you have to catch the return value: $cc=trim($cc); -- 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] files with html extension
Jeff Armstrong wrote: > This is exactly why http://www.w3.org recommend that you DONT > SPECIFY A FILE TYPE TYPE in your HREFs. But doth that actually work - how many web servers are able to handle this type of link correctly? Ummm... and what happens (or is supposed to happen) to resolve xxx.html and xxx.php? -- Regards, Harshdeep Singh Jawanda. -- 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/dbx CREDITS INSTALL LICENSE Makefile.in config.m4 dbx.c dbx.dsp dbx.h dbx_mysql.c dbx_mysql.h dbx_odbc.c dbx_odbc.h php_dbx.h
mboeren Thu Mar 22 03:07:04 2001 EDT Added files: /php4/ext/dbx CREDITS INSTALL LICENSE Makefile.in config.m4 dbx.c dbx.dsp dbx.h dbx_mysql.c dbx_mysql.h dbx_odbc.c dbx_odbc.h php_dbx.h Log: Added dbx module (database abstraction) to the repositorty (/ext/dbx). Compiles under Linux (--enable-dbx) and Windows. Supports MySQL and ODBC modules (more to be added later). @ Added dbx module (database abstraction) to the repository. (Marc) Index: php4/ext/dbx/Makefile.in +++ php4/ext/dbx/Makefile.in LTLIBRARY_NAME = libdbx.la LTLIBRARY_SOURCES = dbx.c dbx_mysql.c dbx_odbc.c LTLIBRARY_SHARED_NAME = dbx.la include $(top_srcdir)/build/dynlib.mk Index: php4/ext/dbx/config.m4 +++ php4/ext/dbx/config.m4 PHP_ARG_ENABLE(dbx,whether to enable dbx support, [ --enable-dbxEnable dbx]) if test "$PHP_DBX" != "no"; then PHP_EXTENSION(dbx, $ext_shared) fi Index: php4/ext/dbx/dbx.c +++ php4/ext/dbx/dbx.c /* +--+ | stentor module version 1.0 | +--+ | Copyright (c) 2001 Guidance Rotterdam BV | +--+ | This source file is subject to version 1.0 of the STENTOR license, | | that is bundled with this package in the file LICENSE, and is| | available through the world-wide-web at | | http://www.guidance.nl/php/dbx/license/1_00.txt. | | If you did not receive a copy of the STENTOR license and are unable | | to obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ | Author : Marc Boeren <[EMAIL PROTECTED]> | +--+ */ #include "php.h" #include "php_ini.h" #include "php_config.h" #include "php_dbx.h" #include "ext/standard/info.h" // defines for supported databases #define DBX_UNKNOWN 0 #define DBX_MYSQL 1 #define DBX_ODBC 2 // includes for supported databases #include "dbx.h" #include "dbx_mysql.h" #include "dbx_odbc.h" // support routines int module_exists(char * module_name) { zend_module_entry * zme; int r; r = zend_hash_find(&module_registry, module_name, strlen(module_name)+1, (void **) &zme); return r==0?1:0; } int get_module_identifier(char * module_name) { if (!strcmp("mysql", module_name)) return DBX_MYSQL; if (!strcmp("odbc", module_name)) return DBX_ODBC; return DBX_UNKNOWN; } int split_dbx_handle_object(zval ** dbx_object, zval *** pdbx_handle, zval *** pdbx_module) { convert_to_object_ex(dbx_object); if (zend_hash_find((*dbx_object)->value.obj.properties, "handle", 7, (void **) pdbx_handle)==FAILURE || zend_hash_find((*dbx_object)->value.obj.properties, "module", 7, (void **) pdbx_module)==FAILURE) { return 0; } return 1; } // from dbx.h, to be used in support-files (dbx_mysql.c etc...) void dbx_call_any_function(INTERNAL_FUNCTION_PARAMETERS, char * function_name, zval ** returnvalue, int number_of_arguments, zval *** params) { zval * zval_function_name; MAKE_STD_ZVAL(zval_function_name); ZVAL_STRING(zval_function_name, function_name, 1); if (call_user_function_ex(EG(function_table), NULL, zval_function_name, returnvalue, number_of_arguments, params, 0, NULL) == FAILURE) { zend_error(E_ERROR, "function '%s' not found", zval_function_name->value.str.val); } zval_dtor(zval_function_name); // to free stringvalue memory FREE_ZVAL(zval_function_name); } // switch_dbx functions declarations // each must be supported in the x/dbx_module files as dbx_module_function, // e.g. switch_dbx_connect expects a dbx_mysql_connect in de x/dbx_mysql files // all params except the dbx_module param are passed on // each must return the expected zval * 's in the rv parameter, which are passed on unmodified // do NOT use the return_value parameter from INTERNAL_FUNCTION_PARAMETERS // you can additionally return 0 or 1 for failure or success which will also be returned by the switches int switch_dbx_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); // returns connection handle as resource on success or 0 as long on failure int switch_dbx_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); // returns persistent connection handle as resource on success or 0 as long on failure int switch_dbx_close(zval *
[PHP] please help with this simple problem
i am coding a simple script to post a text area into a file. it works, but it posts it at the bottom and i wanted to have it post to the top of the text already there.. here's a snip of the important part of the script: $fp = fopen (basename($PHP_SELF) . ".comment", "a"); fwrite ($fp, $message); fclose ($fp); } any help would be much appreciated -- 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: SV: [PHP] Booking by Date/Time in mySQL
Jon, not sure if I agree with you: locking - almost always a bad idea, atomicity is much faster and safer and usually indicates a better relational design. SQL is fundamentally set oriented, but newbies are almost always row oriented. mySQL locks table automagically, but it doesn't do row level locking, and transactions are only recently added. generate ids - let the db do this with ids. Almost all the number fountains I have seen are because of the inability of a 3GL to recieve the generated id efficiently, this is not a problem in mySQL. I do agree with you though if you are refering to having a decent relational data model Jeffs DB Maxims: In my db experience OS [DOS/WIN32/Unix/Mini/Mainframe] Type [relational/post-relational/object/network/hierarchical] * NEVER write SQL that requires programatic locking * minimise use of transactions [redesign! think lateral] * use sql atomicity whenever possible * don't be a pessimistic locker - optimism is so much more user friendly. * apply the twelve of codd with intelligence rather than obsession * all updates should be safely repeatable * 3NF is generally cool, but 14NF is overboard. [soapbox.off] Kiora -Original Message- From: Jon Snell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 21, 2001 10:54 PM To: Thomas Edison Jr. Cc: [EMAIL PROTECTED] Subject: RE: SV: [PHP] Booking by Date/Time in mySQL Yes, I would recommend locking your tables before doing this just in case. Another solution would be to create a unique-key based on the bed field and date field. This way you are guaranteed never to double book, and can just check for errors after insert rather than do an additional select statement and worry about race conditions... -- 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] please help with this simple problem
You need to copy the contents of the current file. Then recreate the file by writing the new message then writing back the original contents. e.g. $fname = basename($PHP_SELF). ".comment"; $fsize = filesize($fname); fp = fopen(basename($fname)); $data = fread($fp,fsize); fwrite($fp,$message); fwrite($fp,$data); fclose($fp); -Stewart -Original Message- From: adam [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 11:17 To: [EMAIL PROTECTED] Subject: [PHP] please help with this simple problem i am coding a simple script to post a text area into a file. it works, but it posts it at the bottom and i wanted to have it post to the top of the text already there.. here's a snip of the important part of the script: $fp = fopen (basename($PHP_SELF) . ".comment", "a"); fwrite ($fp, $message); fclose ($fp); } any help would be much appreciated -- 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] multiple selection dropdown lists
Title: Clear Day Hi we've got a dropdown list from a select statement, after you choose an option from there it creates another dropdown list also from a select statement. We want to know how to be able to select multiple values from the 2nd one and send them through to the next page for display. Below are the two dropdown lists we have. {//begin if ($GetMAPTypeRow[0] == $schemenumber) {//begin $SetInitial = "selected"; }//end else {//begin $SetInitial = ""; }//end ?> > {//begin?> }//end ?> LIST OF MEDICAL AID SCHEMES FROM SEARCH: {//begin$SelectedQuotationSchemeName = $GetSelectedTypeRow[1];if ($GetSelectedTypeRow[0] == $schemenumberSelected){//begin $SetInitial = "selected"; }//endelse {//begin $SetInitial = ""; }//end ?> > {//begin$SelectedQuotationSchemeName = $GetSelectedTypeRow[1];if ($GetSelectedTypeRow[0] == $schemenumberSelected){//begin $SetInitial = "selected"; }//endelse {//begin $SetInitial = ""; }//end ?> >
Re: [PHP] URIs as variables
Nope. That gave me: I'd need to enumerate $HTTP_GET_VARS variable _keys_ too, but I don't know how... Also, how can I get it to work for both GET & POST methods? Is that possible? Thanks, Issac ""almir"" <[EMAIL PROTECTED]> wrote in message 99b66u$q0o$[EMAIL PROTECTED]">news:99b66u$q0o$[EMAIL PROTECTED]... > try with > > uri= > > > ""Issac Goldstand"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > 99at42$5be$[EMAIL PROTECTED]">news:99at42$5be$[EMAIL PROTECTED]... > > Newbie question here. I am trying to pass a varaible containing a URI > > across a few scripts. Basically, the first script get's a query string > > including the URI (eg > > http://foo.bar/script1.php?url=script2.php?var1=a&var2=b). > > Now, script1 contains a form pointing to script3 so basically, I have the > > user form and then: > > > > > echo ""; > > ?> > > > > (I have register-gloabls enabled and am not sure whether the call to > script1 > > will be POST or GET) > > > > This creates a slight problem, as, using the above example once again, PHP > > will send the browser the line: > > > > > > > > But it totally chops off everything from the "&" and onwards. How can I > fix > > it to get the entire URI? > > > > Thanks, > > Issac > > > > > > -- > > Internet is a wonderful mechanism for making a fool of > > yourself in front of a very large audience. > > --Anonymous > > > > Moving the mouse won't get you into trouble... Clicking it might. > > --Anonymous > > > > PGP Key 0xE0FA561B - Fingerprint: > > 7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B > > > > > > > > > > -- > > 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] Lostpassword script Error
Nobody can help? - Original Message - From: <[EMAIL PROTECTED]> To: "'PHP General List. (E-mail)'" <[EMAIL PROTECTED]> Sent: Wednesday, March 21, 2001 8:29 PM Subject: [PHP] Lostpassword script Error Hi there, I need some help here. I have uploaded all the files necessary into my server. grab it at www.frozened.com/zeus/lostpassword.zip This is a lostpassword script whereby when the user inputs his email address, the script will check if his email is a valid email ( [EMAIL PROTECTED] ) after which it will use the database to search for the email and if there his email is in the db, it will send him a mail telling him so. In this script I haven't add the mail() but replaced it with a echo() so that I know that the form has been processed. When I run the script and input a 'non-valid' email address ( no @ sign ), the errormsg will appear as normal but when I type a valid email or a email that is in the database, the form will just clear it self and reappear. Mind if someone help me debug (I'm new to PHP). Thanks :) Zeus -- 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] multiple selection dropdown lists
You need to add '[]' to the selects name which informs php that the select field will have more than one value. Once your form has been submitted an array called $comboResultPlan will be available containing the selected options. -Stewart -Original Message- From: Angie Bauer [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 11:31 To: [EMAIL PROTECTED] Subject: [PHP] multiple selection dropdown lists Hi we've got a dropdown list from a select statement, after you choose an option from there it creates another dropdown list also from a select statement. We want to know how to be able to select multiple values from the 2nd one and send them through to the next page for display. Below are the two dropdown lists we have. _ > LIST OF MEDICAL AID SCHEMES FROM SEARCH: > > _ -- 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] please help with this simple problem
i tryed it and it ended up having an error that was caused originally by a lack of a $ on the 3rd line variable... after i fixed that it said wrong perameter count for fopen() on the third line, and "Warning: Supplied argument is not a valid File-Handle resource" for the remaining lines below that in that block of code. i'm sorry, i'm kinda new to this : ( "Stewart Taylor" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You need to copy the contents of the current file. > Then recreate the file by writing the new message then writing back the > original contents. > > e.g. > $fname = basename($PHP_SELF). ".comment"; > $fsize = filesize($fname); > fp = fopen(basename($fname)); > $data = fread($fp,fsize); > fwrite($fp,$message); > fwrite($fp,$data); > fclose($fp); > > -Stewart > > -Original Message- > From: adam [mailto:[EMAIL PROTECTED]] > Sent: 22 March 2001 11:17 > To: [EMAIL PROTECTED] > Subject: [PHP] please help with this simple problem > > > i am coding a simple script to post a text area into a file. it works, but > it posts it at the bottom and i wanted to have it post to the top of the > text already there.. > > here's a snip of the important part of the script: > > $fp = fopen (basename($PHP_SELF) . ".comment", "a"); > fwrite ($fp, $message); > fclose ($fp); > } > > any help would be much appreciated > > > > -- > 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] files with html extension
Yes it works in Apache - try it! You could also read the Apache documentation on Content Negotiation. The following is a quote - Note on hyperlinks and naming conventions If you are using language negotiation you can choose between different naming conventions, because files can have more than one extension... Looking at the table above you will notice that it is always possible to use the name without any extensions in an hyperlink (e.g., foo). The advantage is that you can hide the actual type of a document rsp. file and can change it later, e.g., from html to shtml or cgi without changing any hyperlink references. - On how it resolves conflicts? Not documented, but a quick fiddle seems to indicate that it does the following: if (no_specific_type_requested()) { get list of possible files in ALPHABETICAL order if (file_is_recognised_mime_type()) return this file recognised mime types come from /etc/mime.types Regards Jeff -Original Message- From: Harshdeep S Jawanda [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:06 AM To: Jeff Armstrong Cc: [EMAIL PROTECTED] Subject: Re: [PHP] files with html extension Jeff Armstrong wrote: > This is exactly why http://www.w3.org recommend that you DONT > SPECIFY A FILE TYPE TYPE in your HREFs. But doth that actually work - how many web servers are able to handle this type of link correctly? Ummm... and what happens (or is supposed to happen) to resolve xxx.html and xxx.php? -- Regards, Harshdeep Singh Jawanda. -- 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] URIs as variables
try this $myurl=urlencode(base64_encode($url)); in the input type echo ""; On 22-Mar-2001 Issac Goldstand wrote: > Nope. That gave me: > > > > I'd need to enumerate $HTTP_GET_VARS variable _keys_ too, but I don't know > how... > Also, how can I get it to work for both GET & POST methods? Is that > possible? > > Thanks, > Issac > > ""almir"" <[EMAIL PROTECTED]> wrote in message > 99b66u$q0o$[EMAIL PROTECTED]">news:99b66u$q0o$[EMAIL PROTECTED]... >> try with >> >> uri= >> >> >> ""Issac Goldstand"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag >> 99at42$5be$[EMAIL PROTECTED]">news:99at42$5be$[EMAIL PROTECTED]... >> > Newbie question here. I am trying to pass a varaible containing a URI >> > across a few scripts. Basically, the first script get's a query string >> > including the URI (eg >> > http://foo.bar/script1.php?url=script2.php?var1=a&var2=b). >> > Now, script1 contains a form pointing to script3 so basically, I have > the >> > user form and then: >> > >> > > > echo ""; >> > ?> >> > >> > (I have register-gloabls enabled and am not sure whether the call to >> script1 >> > will be POST or GET) >> > >> > This creates a slight problem, as, using the above example once again, > PHP >> > will send the browser the line: >> > >> > >> > >> > But it totally chops off everything from the "&" and onwards. How can I >> fix >> > it to get the entire URI? >> > >> > Thanks, >> > Issac >> > >> > >> > -- >> > Internet is a wonderful mechanism for making a fool of >> > yourself in front of a very large audience. >> > --Anonymous >> > >> > Moving the mouse won't get you into trouble... Clicking it might. >> > --Anonymous >> > >> > PGP Key 0xE0FA561B - Fingerprint: >> > 7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B >> > >> > >> > >> > >> > -- >> > 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] Rui Barreiros Software Developer WEBSOLUT - Soluções Internet Emailto: [EMAIL PROTECTED] Personal Info: http://websolut.net/people/rui.html As informações contidas neste email são confidenciais e destinam-se apenas à(s) pessoa(s) a quem foi enviado: http://websolut.net/confidencialidade-responsabilidade.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] URIs as variables
Instead of using a HIDDEN form field (I assume you don't use this in any client side javascript), why not just use a session variable. Add this to the top of the relevant pages using include: You can then use $sesh[url] in any php block to find what this value was set to on the first page. Regards Jeff -Original Message- From: Issac Goldstand [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] URIs as variables Nope. That gave me: I'd need to enumerate $HTTP_GET_VARS variable _keys_ too, but I don't know how... Also, how can I get it to work for both GET & POST methods? Is that possible? Thanks, Issac ""almir"" <[EMAIL PROTECTED]> wrote in message 99b66u$q0o$[EMAIL PROTECTED]">news:99b66u$q0o$[EMAIL PROTECTED]... > try with > > uri= > > > ""Issac Goldstand"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > 99at42$5be$[EMAIL PROTECTED]">news:99at42$5be$[EMAIL PROTECTED]... > > Newbie question here. I am trying to pass a varaible containing a URI > > across a few scripts. Basically, the first script get's a query string > > including the URI (eg > > http://foo.bar/script1.php?url=script2.php?var1=a&var2=b). > > Now, script1 contains a form pointing to script3 so basically, I have the > > user form and then: > > > > > echo ""; > > ?> > > > > (I have register-gloabls enabled and am not sure whether the call to > script1 > > will be POST or GET) > > > > This creates a slight problem, as, using the above example once again, PHP > > will send the browser the line: > > > > > > > > But it totally chops off everything from the "&" and onwards. How can I > fix > > it to get the entire URI? > > > > Thanks, > > Issac > > > > > > -- > > Internet is a wonderful mechanism for making a fool of > > yourself in front of a very large audience. > > --Anonymous > > > > Moving the mouse won't get you into trouble... Clicking it might. > > --Anonymous > > > > PGP Key 0xE0FA561B - Fingerprint: > > 7E18 C018 D623 A57B 7F37 D902 8C84 7675 E0FA 561B > > > > > > > > > > -- > > 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] please help with this simple problem
you haven't specified the open type (a = append, w = write, r = read only , etc etc) solution $fp=fopen(basename($fname), "a"); just to match your example. On 22-Mar-2001 adam wrote: > i tryed it and it ended up having an error that was caused originally by a > lack of a $ on the 3rd line variable... after i fixed that it said wrong > perameter count for fopen() on the third line, and "Warning: Supplied > argument is not a valid File-Handle resource" for the remaining lines below > that in that block of code. > > i'm sorry, i'm kinda new to this : ( > > "Stewart Taylor" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> You need to copy the contents of the current file. >> Then recreate the file by writing the new message then writing back the >> original contents. >> >> e.g. >> $fname = basename($PHP_SELF). ".comment"; >> $fsize = filesize($fname); >> fp = fopen(basename($fname)); >> $data = fread($fp,fsize); >> fwrite($fp,$message); >> fwrite($fp,$data); >> fclose($fp); >> >> -Stewart >> >> -Original Message- >> From: adam [mailto:[EMAIL PROTECTED]] >> Sent: 22 March 2001 11:17 >> To: [EMAIL PROTECTED] >> Subject: [PHP] please help with this simple problem >> >> >> i am coding a simple script to post a text area into a file. it works, but >> it posts it at the bottom and i wanted to have it post to the top of the >> text already there.. >> >> here's a snip of the important part of the script: >> >> $fp = fopen (basename($PHP_SELF) . ".comment", "a"); >> fwrite ($fp, $message); >> fclose ($fp); >> } >> >> any help would be much appreciated >> >> >> >> -- >> 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] Rui Barreiros Software Developer WEBSOLUT - Soluções Internet Emailto: [EMAIL PROTECTED] Personal Info: http://websolut.net/people/rui.html As informações contidas neste email são confidenciais e destinam-se apenas à(s) pessoa(s) a quem foi enviado: http://websolut.net/confidencialidade-responsabilidade.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] please help with this simple problem
Sorry I missed "w+" from the fopen function $fname = basename($PHP_SELF). ".comment"; $fsize = filesize($fname); $fp = fopen(basename($fname),"w+"); <--- added "w+" $data = fread($fp,$fsize); fwrite($fp,$message); fwrite($fp,$data); fclose($fp) -Stewart -Original Message- From: adam [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 12:00 To: [EMAIL PROTECTED] Subject: Re: [PHP] please help with this simple problem i tryed it and it ended up having an error that was caused originally by a lack of a $ on the 3rd line variable... after i fixed that it said wrong perameter count for fopen() on the third line, and "Warning: Supplied argument is not a valid File-Handle resource" for the remaining lines below that in that block of code. i'm sorry, i'm kinda new to this : ( "Stewart Taylor" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You need to copy the contents of the current file. > Then recreate the file by writing the new message then writing back the > original contents. > > e.g. > $fname = basename($PHP_SELF). ".comment"; > $fsize = filesize($fname); > fp = fopen(basename($fname)); > $data = fread($fp,fsize); > fwrite($fp,$message); > fwrite($fp,$data); > fclose($fp); > > -Stewart > > -Original Message- > From: adam [mailto:[EMAIL PROTECTED]] > Sent: 22 March 2001 11:17 > To: [EMAIL PROTECTED] > Subject: [PHP] please help with this simple problem > > > i am coding a simple script to post a text area into a file. it works, but > it posts it at the bottom and i wanted to have it post to the top of the > text already there.. > > here's a snip of the important part of the script: > > $fp = fopen (basename($PHP_SELF) . ".comment", "a"); > fwrite ($fp, $message); > fclose ($fp); > } > > any help would be much appreciated > > > > -- > 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] please help with this simple problem
it works now, only it's earasing everything and then writing to the file. i think we have almost got this figured out. here's what the code looks like for the entire tag... --- ", $message); $date = date("l, F j Y, h:i a"); $message = "mailto:$email>$name -- $date\n \n $message\n \n\n"; $fname = basename($PHP_SELF) . ".comment"; $fsize = filesize($fname); $fp = fopen(basename($fname),"w+"); $data = fread($fp,$fsize); fwrite($fp,$message); fwrite($fp,$data); fclose($fp); } @readfile(basename(($PHP_SELF . ".comment"))); ?> ""adam"" <[EMAIL PROTECTED]> wrote in message 99cmfj$mai$[EMAIL PROTECTED]">news:99cmfj$mai$[EMAIL PROTECTED]... > i am coding a simple script to post a text area into a file. it works, but > it posts it at the bottom and i wanted to have it post to the top of the > text already there.. > > here's a snip of the important part of the script: > > $fp = fopen (basename($PHP_SELF) . ".comment", "a"); > fwrite ($fp, $message); > fclose ($fp); > } > > any help would be much appreciated > > > > -- > 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-CVS] cvs: php4 /ext/domxml php_domxml.c
When I still remember..I'm getting a lot of error messages into my error_log, e.g.: Unknown(0) : Warning - Constant xpath_boolean already defined And I think you have PHP_MINIT and PHP_RINIT mixed.. ie. Index: php_domxml.c === RCS file: /repository/php4/ext/domxml/php_domxml.c,v retrieving revision 1.33 diff -u -r1.33 php_domxml.c --- php_domxml.c2001/03/22 06:58:13 1.33 +++ php_domxml.c2001/03/22 12:13:37 @@ -667,12 +667,12 @@ return(wrapper); } -PHP_MINIT_FUNCTION(domxml) +PHP_RINIT_FUNCTION(domxml) { return SUCCESS; } -PHP_RINIT_FUNCTION(domxml) +PHP_MINIT_FUNCTION(domxml) { zend_class_entry ce; le_domxmldocp = zend_register_list_destructors_ex(php_free_xml_doc, NULL, "domdocument", module_number); -- 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] please help with this simple problem
it works now, only it's earasing everything and then writing to the file. i think we have almost got this figured out. here's what the code looks like for the entire tag... --- ", $message); $date = date("l, F j Y, h:i a"); $message = "mailto:$email>$name -- $date\n \n $message\n \n\n"; $fname = basename($PHP_SELF) . ".comment"; $fsize = filesize($fname); $fp = fopen(basename($fname),"w+"); $data = fread($fp,$fsize); fwrite($fp,$message); fwrite($fp,$data); fclose($fp); } @readfile(basename(($PHP_SELF . ".comment"))); ?> -- 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] Only 5 lines
Hi all, im using the following scripts: "; $numOfRows = mysql_num_rows ($result); for ($i = 0; $i < $numOfRows; $i++){ $threadid = mysql_result ($result, $i, "threadid"); $posts = mysql_result ($result, $i, "title"); $postusername = mysql_result ($result, $i, "postusername"); echo "$posts$postusername"; } echo ""; } else{ echo mysql_errno().": ".mysql_error().""; } mysql_close (); ?> Everything works perfect, but it prints out 6 lines, cause there are 6 lines it grabbed from the source. What I want to do is print only 5 lines, cause that would look a lot better in my page lay-out. Can someone give me a hint? THx H0RNET ps, can u also tell me if I posted this in the right newsgroup? -- 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] Only 5 lines
surely it should be limit 0,4 (0,1,2,3,4) = 5 items! remember 0 is row 1 not 1 ""Dennis Haller"" <[EMAIL PROTECTED]> wrote in message 99cs5b$bj4$[EMAIL PROTECTED]">news:99cs5b$bj4$[EMAIL PROTECTED]... > Hi all, im using the following scripts: > > include("connect.php"); > > $query = "SELECT threadid, title, postusername FROM thread order by threadid > DESC LIMIT 0,5"; > $result = mysql_db_query ("vbdforum", $query); > > if ($result){ > echo ""; > > $numOfRows = mysql_num_rows ($result); > for ($i = 0; $i < $numOfRows; $i++){ > $threadid = mysql_result ($result, $i, "threadid"); > $posts = mysql_result ($result, $i, "title"); > $postusername = mysql_result ($result, $i, "postusername"); > echo " href=_forum/showthread.php?threadid=$threadid > target="_blank">$posts width=\"50%\">$postusername"; > } > echo ""; > } > else{ > echo mysql_errno().": ".mysql_error().""; > } > > mysql_close (); > > ?> > > Everything works perfect, but it prints out 6 lines, cause there are 6 lines > it grabbed from the source. What I want to do is print only 5 lines, cause > that would look a lot better in my page lay-out. Can someone give me a hint? > > THx > H0RNET > > ps, can u also tell me if I posted this in the right newsgroup? > > > > -- > 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] Only 5 lines
if this message duplicates - sorry. some weirdness on my news client! dennis, i think your limit should read 0,4 because 0 is actually row 1 (we count from 0 not 1) so limit 0,4 gives you rows 0,1,2,3,4 - which is 5! not 4! ""Dennis Haller"" <[EMAIL PROTECTED]> wrote in message 99cs5b$bj4$[EMAIL PROTECTED]">news:99cs5b$bj4$[EMAIL PROTECTED]... > Hi all, im using the following scripts: > > include("connect.php"); > > $query = "SELECT threadid, title, postusername FROM thread order by threadid > DESC LIMIT 0,5"; > $result = mysql_db_query ("vbdforum", $query); > > if ($result){ > echo ""; > > $numOfRows = mysql_num_rows ($result); > for ($i = 0; $i < $numOfRows; $i++){ > $threadid = mysql_result ($result, $i, "threadid"); > $posts = mysql_result ($result, $i, "title"); > $postusername = mysql_result ($result, $i, "postusername"); > echo " href=_forum/showthread.php?threadid=$threadid > target="_blank">$posts width=\"50%\">$postusername"; > } > echo ""; > } > else{ > echo mysql_errno().": ".mysql_error().""; > } > > mysql_close (); > > ?> > > Everything works perfect, but it prints out 6 lines, cause there are 6 lines > it grabbed from the source. What I want to do is print only 5 lines, cause > that would look a lot better in my page lay-out. Can someone give me a hint? > > THx > H0RNET > > ps, can u also tell me if I posted this in the right newsgroup? > > > > -- > 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] Only 5 lines (now with the right script :/ )
The question I asked before was for this script: http://nu.nl/deeplink_html", "r"); $read = fread($open, 1000); fclose($open); $search = eregi("nieuws.hoofd(.*)nieuws.overig< /B>", $read, $printing); $printing[1] = str_replace("", "", $printing[1]); $printing[1] = str_replace("", "", $printing[1]); $printing[1] = str_replace(" So is it posible to get only 5 lines out of this script? Thx again -- 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] Only 5 lines
Thx Michael, but as u can see I already posted a new msg cause I copy pasted the wrong script :) THx for ure reply - Original Message - From: ""Michael Bartlett"" <[EMAIL PROTECTED]> Newsgroups: php.general Sent: Thursday, March 22, 2001 1:52 PM Subject: Re: [PHP] Only 5 lines > if this message duplicates - sorry. some weirdness on my news client! > > dennis, i think your limit should read 0,4 > because 0 is actually row 1 (we count from 0 not 1) > so limit 0,4 gives you rows 0,1,2,3,4 - which is 5! > not 4! > > > ""Dennis Haller"" <[EMAIL PROTECTED]> wrote in message > 99cs5b$bj4$[EMAIL PROTECTED]">news:99cs5b$bj4$[EMAIL PROTECTED]... > > Hi all, im using the following scripts: > > > > > include("connect.php"); > > > > $query = "SELECT threadid, title, postusername FROM thread order by > threadid > > DESC LIMIT 0,5"; > > $result = mysql_db_query ("vbdforum", $query); > > > > if ($result){ > > echo ""; > > > > $numOfRows = mysql_num_rows ($result); > > for ($i = 0; $i < $numOfRows; $i++){ > > $threadid = mysql_result ($result, $i, "threadid"); > > $posts = mysql_result ($result, $i, "title"); > > $postusername = mysql_result ($result, $i, "postusername"); > > echo " > href=_forum/showthread.php?threadid=$threadid > > target="_blank">$posts > width=\"50%\">$postusername"; > > } > > echo ""; > > } > > else{ > > echo mysql_errno().": ".mysql_error().""; > > } > > > > mysql_close (); > > > > ?> > > > > Everything works perfect, but it prints out 6 lines, cause there are 6 > lines > > it grabbed from the source. What I want to do is print only 5 lines, cause > > that would look a lot better in my page lay-out. Can someone give me a > hint? > > > > THx > > H0RNET > > > > ps, can u also tell me if I posted this in the right newsgroup? > > > > > > > > -- > > 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] Free Web Space
Is there any place in the internet gives free hosting like (freeservers.com,geocities.com ..) supporting PHP/MySQL? Alaiddin -- 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/dbx EXPERIMENTAL
mboeren Thu Mar 22 04:26:24 2001 EDT Added files: /php4/ext/dbx EXPERIMENTAL Log: no comment :) -- 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] try catch in php?
Java have error handling like C and not C as Java, and Java is C like and so is PHP. ""Jason Cox"" <[EMAIL PROTECTED]> wrote in message 002501c0a06d$4ce48ce0$[EMAIL PROTECTED]">news:002501c0a06d$4ce48ce0$[EMAIL PROTECTED]... > No, PHP doesn't have the extensive error handling that Java does. It's a > bit more like C. > > Jason > > - Original Message - > From: "Jeff" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 26, 2001 6:30 PM > Subject: [PHP] try catch in php? > > > > Is there any equivalent java try catch syntax in php ? > > > > Thanks, > > > > Jeff > > > > > > -- > > 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] Free Web Space
Head on over to http://members.evolt.org/ and have a look at what the wonderful folks over there are offering. HTH Jon -Original Message- From: PIS Alaiddin Tayeh [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 13:23 To: [EMAIL PROTECTED] Subject: [PHP] Free Web Space Is there any place in the internet gives free hosting like (freeservers.com,geocities.com ..) supporting PHP/MySQL? Alaiddin -- 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]
[PHP-CVS] cvs: php4 /ext/sockets sockets.c
sniper Thu Mar 22 05:16:58 2001 EDT Modified files: /php4/ext/sockets sockets.c Log: Fix bugs: #9920, #9190 Index: php4/ext/sockets/sockets.c diff -u php4/ext/sockets/sockets.c:1.32 php4/ext/sockets/sockets.c:1.33 --- php4/ext/sockets/sockets.c:1.32 Sun Feb 25 22:07:16 2001 +++ php4/ext/sockets/sockets.c Thu Mar 22 05:16:58 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: sockets.c,v 1.32 2001/02/26 06:07:16 andi Exp $ */ +/* $Id: sockets.c,v 1.33 2001/03/22 13:16:58 sniper Exp $ */ #include "php.h" @@ -1130,6 +1130,7 @@ if (sock_type->sa_family == AF_UNIX) { struct sockaddr_un *sa = (struct sockaddr_un *) sock_type; memset(sa, 0, sizeof(sa_storage)); /* This is safe -> sock_type = &sa_storage -> sa = sock_type */ + sa->sun_family = AF_UNIX; snprintf(sa->sun_path, 108, "%s", Z_STRVAL_PP(arg1)); ret = bind(Z_LVAL_PP(arg0), (struct sockaddr *) sa, SUN_LEN(sa)); } else if (sock_type->sa_family == AF_INET) { -- 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] LDAP problem
ok i am usng php3.0.11 ,IIS4 and NT4 trying to connect to ldap server but i get a error Fatal error: Call to unsupported or undefined function ldap_connect() in ... i have included php3_ldap.dll in my php3.ini, i have even tried to include it dinamicaly with dl but then i get Fatal error: Unable to load dynamic library './php3_ldap.dll' yes the file is THERE i have tested it and that is the right directory i tested it with other .dll-s and it works just fine but this one is making problems i had a similar problem with oracle oci81 where i had to restart the server but in this case I realy dont know what to do I also tryied with two different files from php 3.0.11 and 3.0.17 both of them are 56k (could be the same) but none of them works -almir -- 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] Oracle, Win2000, Apache, OCI
Thanks guys. I'm going to try and tackle this later today. I was s happy just to get ODBC and oracle working yesterday. I had to install the oracle 8.1.6 client. Then i rolled back to php3. Works fine. I'm going to try the OCI stuff later, i'll letcha know. -ken -Original Message- From: Greig, Euan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 5:37 AM To: [EMAIL PROTECTED] Subject: [PHP] Oracle, Win2000, Apache, OCI < I have seen -many- messages and spent an entire day reading, and haven't < found < what I'm looking for so i hope this is the correct place to ask. < When I try to make an ora_logon or ocilogon, I get < the error: Fatal error: Call to undefined function: ora_logon() < Is this an incorrect PHP setup or is this due to the fact that I don't have < Oracle 8.1.6 installed? < (I have 7.x) < I have uncommented the php_oracle and php_oci8.dll lines in the php.ini < file. Do I need to do more than that? < (I am using the latest php4 windows binary). I too have had a lot of "fun" with this. I seem to have finally got it cracked, with help from this list, and from searches on the web. First, have you checked the setting of your extension directory in php.ini? It should point to the location of php_oracle.dll etc. I think there is something about the distribution of php from php.net that doesn't enable oracle properly. Try downloading it from http://php.weblogs.com/easywindows. The following post (from this list) may help with your next problem! ie Net80/SqlNet. It also helps to install at least the client software for Oracle 8.1.6. I have successfully connected to a 7.3.4 database using ora_logon, but haven't tried ocilogon, as I think this is intended for v8. From: Leon Santos Filho [mailto:[EMAIL PROTECTED]] Sent: 13 March 2001 16:15 To: Herbert Groot Jebbink; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Can't connect to Oracle Hi! I get this code here and it works very well. It was a Jean-Christophe suggestion. You can obtain TNS string from file TNSNAMES.ORA. Good Luck! Leon "); while(OCIFetch($result)) { $CC = OCIResult($result,1); $CCNome = OCIResult($result,2); echo('' . $CC . '' . $CCNome . ''); } echo(""); Euan Greig Technical Consultant BRANN DATA [EMAIL PROTECTED] 01285 645997 ** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. ** -- 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] Oracle ODBC sql [ORA-00972: identifier is too long]
I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine. here is the code i'm trying to use. $td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34 i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database? (I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track? thanks! -ken -- 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: Oracle ODBC sql [ORA-00972: identifier is too long]
I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas: The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error? The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'. Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it? -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 14:04 To: 'Greig, Euan'; [EMAIL PROTECTED] Subject: Oracle ODBC sql [ORA-00972: identifier is too long] I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine. here is the code i'm trying to use. $td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34 i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database? (I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track? thanks! -ken ** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. ** -- 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] Only 5 lines (now with the right script :/ )
I'm guessing you are getting an extra blank If you get a result back in $headlines = sizeof($content) of 5, then you have 5 lines, but in your script you have the value of $i as ZERO ($i = 0; $i < $headlines; $i++) meaning 0,1,2,3,4,5 which is 6 lines, simply set your $i=1 and it should be correct. Let me know. I did execute your script off of my server and resulted in only 1 line printing the value of "1" nothing else Jack Dennis Haller wrote: > The question I asked before was for this script: > > $open = fopen("http://nu.nl/deeplink_html", "r"); > > $read = fread($open, 1000); > > fclose($open); > > $search = > eregi("nieuws.hoofd(.*)nieuws.overig< > /B>", $read, $printing); > > $printing[1] = str_replace("", "", $printing[1]); > $printing[1] = str_replace("", "", $printing[1]); > $printing[1] = str_replace(" > $headlines = sizeof($content); > > for ($i = 0; $i < $headlines; $i++) { > > print "$content[$i] $headlines[$i]"; > > } > ?> > > So is it posible to get only 5 lines out of this script? > > Thx again > > -- > 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] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
I only mentioned the part about the access, just to prove that I know i have a select statement working with an ODBC source. I know that I am connecting to the Oracle database, because if i put in a bogus user/pass i get an error stating so, when I supply the correct credentials I get no errors. So that just leaves something to do with possibly the table names. The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS by my count that is 32 characters. That could be a problem. Any way around that, or to alias a name to that? (Mind you, i don't have access to that database to change the table names). I can only query from it. The exact offending line number that is returned is 37. 36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where ATMID = 'PN2000'"; 37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); -ken -Original Message- From: Greig, Euan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:21 AM To: Brooks, Ken Cc: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas: The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error? The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'. Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it? -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 14:04 To: 'Greig, Euan'; [EMAIL PROTECTED] Subject: Oracle ODBC sql [ORA-00972: identifier is too long] I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine. here is the code i'm trying to use. $td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34 i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database? (I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track? thanks! -ken ** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. ** -- 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] Form help
Hi All, I currently have a small problem with my PHP form. I have made two PHP files (application.php and process_application.php). On submitting the form, you then move to process_application.php. Any errors will force the form NOT to be submitted to me. However, how do I stop people from accessing process_application.php directly? You can still type in the URL of this address without filling in any details. Although it serves up an error, is there anyway I can prevent people from getting to this page unless they press "Submit" on the actual form on application.php? Thanks, SK _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4(PHP_4_0_5) /ext/sockets sockets.c
sniper Thu Mar 22 05:20:35 2001 EDT Modified files: (Branch: PHP_4_0_5) /php4/ext/sockets sockets.c Log: MFH Index: php4/ext/sockets/sockets.c diff -u php4/ext/sockets/sockets.c:1.32 php4/ext/sockets/sockets.c:1.32.2.1 --- php4/ext/sockets/sockets.c:1.32 Sun Feb 25 22:07:16 2001 +++ php4/ext/sockets/sockets.c Thu Mar 22 05:20:35 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: sockets.c,v 1.32 2001/02/26 06:07:16 andi Exp $ */ +/* $Id: sockets.c,v 1.32.2.1 2001/03/22 13:20:35 sniper Exp $ */ #include "php.h" @@ -1130,6 +1130,7 @@ if (sock_type->sa_family == AF_UNIX) { struct sockaddr_un *sa = (struct sockaddr_un *) sock_type; memset(sa, 0, sizeof(sa_storage)); /* This is safe -> sock_type = &sa_storage -> sa = sock_type */ + sa->sun_family = AF_UNIX; snprintf(sa->sun_path, 108, "%s", Z_STRVAL_PP(arg1)); ret = bind(Z_LVAL_PP(arg0), (struct sockaddr *) sa, SUN_LEN(sa)); } else if (sock_type->sa_family == AF_INET) { -- 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] Free Web Space
Check out this list : http://www.faqts.com/knowledge-base/view.phtml/aid/4058/fid/27 Regards, Philip On Thu, 22 Mar 2001, PIS Alaiddin Tayeh wrote: > Is there any place in the internet gives free hosting like > (freeservers.com,geocities.com ..) supporting PHP/MySQL? > > Alaiddin > > -- > 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-CVS] cvs: php4 /pear/HTML Common.php
["Martin Jansen" <[EMAIL PROTECTED]>] > On Thu, 22 Mar 2001 04:14:43 -, Adam Daniel wrote: > > >* @copyright Copyright 2001 Ethicon Endo-Surgery > > Isn't this a contradiction to the copyright notice of > the license in the head of the file? IMHO: who owns the copyright doesn't matter as long as the license is ok. - Stig -- Stig Sæther Bakken <[EMAIL PROTECTED]> Fast Search & Transfer ASA, Trondheim, Norway -- 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] Form help
You could have a check for the HTTP_REFERER variable, if it doesn't contain "application.php", chances are they didn't come from that page. There might be a neater way to do it, but I don't know it :-) HTH Jon -Original Message- From: Good Fella [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 14:34 To: [EMAIL PROTECTED] Subject: [PHP] Form help Hi All, I currently have a small problem with my PHP form. I have made two PHP files (application.php and process_application.php). On submitting the form, you then move to process_application.php. Any errors will force the form NOT to be submitted to me. However, how do I stop people from accessing process_application.php directly? You can still type in the URL of this address without filling in any details. Although it serves up an error, is there anyway I can prevent people from getting to this page unless they press "Submit" on the actual form on application.php? Thanks, SK _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ** '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] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
Lets start at the basics. What is the easiest way to *make sure* that i am connecting to that oracle db? Anyway I can just list the tables, or something. odbc_tables or something like that?.. -ken -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I only mentioned the part about the access, just to prove that I know i have a select statement working with an ODBC source. I know that I am connecting to the Oracle database, because if i put in a bogus user/pass i get an error stating so, when I supply the correct credentials I get no errors. So that just leaves something to do with possibly the table names. The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS by my count that is 32 characters. That could be a problem. Any way around that, or to alias a name to that? (Mind you, i don't have access to that database to change the table names). I can only query from it. The exact offending line number that is returned is 37. 36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where ATMID = 'PN2000'"; 37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); -ken -Original Message- From: Greig, Euan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:21 AM To: Brooks, Ken Cc: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas: The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error? The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'. Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it? -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 14:04 To: 'Greig, Euan'; [EMAIL PROTECTED] Subject: Oracle ODBC sql [ORA-00972: identifier is too long] I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine. here is the code i'm trying to use. $td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34 i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database? (I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track? thanks! -ken ** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. ** -- 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 PROT
[PHP-CVS] cvs: php4 /pear/Cache/Container dbx.php
chregu Thu Mar 22 06:29:02 2001 EDT Added files: /php4/pear/Cache/Container dbx.php Log: a new container, which uses the new dbx extension of php as db-abstraction Index: php4/pear/Cache/Container/dbx.php +++ php4/pear/Cache/Container/dbx.php http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Christian Stocker <[EMAIL PROTECTED]> | // +--+ // // $Id: dbx.php,v 1.1 2001/03/22 14:29:01 chregu Exp $ require_once 'Cache/Container.php'; /** * ext/dbx Cache Container. * * WARNING: Other systems might or might not support certain datatypes of * the tables shown. As far as I know there's no large binary * type in SQL-92 or SQL-99. Postgres seems to lack any * BLOB or TEXT type, for MS-SQL you could use IMAGE, don't know * about other databases. Please add sugestions for other databases to * the inline docs. * * The field 'changed' has no meaning for the Cache itself. It's just there * because it's a good idea to have an automatically updated timestamp * field for debugging in all of your tables. * * For _MySQL_ you need this DB table: * * CREATE TABLE cache ( * id CHAR(32) NOT NULL DEFAULT '', * cachegroup VARCHAR(127) NOT NULL DEFAULT '', * cachedata BLOB NOT NULL DEFAULT '', * userdataVARCHAR(255) NOT NULL DEFAULT '', * expires INT(9) NOT NULL DEFAULT 0, * * changed TIMESTAMP(14) NOT NULL, * * INDEX (expires), * PRIMARY KEY (id, cachegroup) * ) * * @author Christian Stocker <[EMAIL PROTECTED]> * @version $Id: dbx.php,v 1.1 2001/03/22 14:29:01 chregu Exp $ * @package Cache */ class Cache_Container_dbx extends Cache_Container { /** * Name of the DB table to store caching data * * @see Cache_Container_file::$filename_prefix */ var $cache_table = ''; /** * DBx module to use * * at the moment only mysql or odbc * * @var string */ var $module = ''; /** * DB host to use * * @var string */ var $host = ''; /** * DB database to use * * @var string */ var $db = ''; /** * DB username to use * * @var string */ var $username = ''; /** * DB password to use * * @var string */ var $password = ''; /** * PEAR DB object * * @var object PEAR_DB */ var $db; function Cache_Container_dbx($options) { if (!is_array($options) ) { return new Cache_Error('No options specified!', __FILE__, __LINE__); } $this->setOptions($options, array('module','host','db','username','password', 'cache_table')); if (!$this->module) return new Cache_Error('No module specified!', __FILE__, __LINE__); $this->db = dbx_connect($this->module,$thos->host,$this->db,$this->username,$this->password); if (dbx_error($this->db)) { return new Cache_Error('DBx connect failed: ' . dbx_error($this->db), __FILE__, __LINE__); } else { //not implemented yet in dbx //$this->db->setFetchMode(DB_FETCHMODE_ASSOC); } } function fetch($id, $group) { $query = sprintf("SELECT cachedata, userdata, expires FROM %s WHERE id = '%s' AND cachegroup = '%s'", $this->cache_table, addslashes($id), addslashes($group) ); $res = dbx_query($this->db,$query); if (dbx_error($this->db)) return new Cache_Error('DBx query failed: ' . dbx_error($this->db), __FILE__, __LINE__); $row = $res->data[0]; if (is_array($row)) return array($row['expires'], $this->decode($row['cachedata']), $row['userdata']); } /** * Stores a dataset. * * WARNING: we use the SQL command REPLACE INTO this might be * MySQL specific. As MySQL is very popular the method should * work fine for 95% of you. */ function save($id, $data, $expires, $group, $userdata) { $this->flushPreload($id, $group); $query = sprintf("REPLACE INTO %s (userdata, cachedata, expires, id, cachegroup) VALUES ('%s', '%s', %d, '%s', '%s')", $this->cache_table, addslashes($userdata), addslashes($this->encode($data)), $this->getExpiresAbsolute($expires) , addslashes($id), addslashes($group) );
Re: [PHP] Form help
A common way is to add a check for the pressing of the submit button, so assuming : if ( isset($submit) ) { // process form } else { echo 'oh dear, you did not use form.'; } I usually use a hidden field instead as at times the submit button can be "skipped" as the user presses enter vs. clicks the button, not sure what browsers or setups allow this behavior but some do (maybe someone can expand on this thought). So, try something like : if ( $form_submitted == true ) { That should do the job. Also doing an is_array check somewhere in there works if the form names are an array, like : Other considerations apply but if $form is an array then most likely the user used the form. So : if ( is_array($form) ) { Regards, Philip Olson http://www.cornado.com/ On Thu, 22 Mar 2001, Good Fella wrote: > Hi All, > > I currently have a small problem with my PHP form. I have made two PHP > files (application.php and process_application.php). > > On submitting the form, you then move to process_application.php. Any > errors will force the form NOT to be submitted to me. > > However, how do I stop people from accessing process_application.php > directly? You can still type in the URL of this address without filling in > any details. > > Although it serves up an error, is there anyway I can prevent people from > getting to this page unless they press "Submit" on the actual form on > application.php? > > Thanks, > > SK > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP 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] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
I got it. I had the table name listed as aradmin_eps_service_instructions when in fact it should have been aradmin.eps_service_instructions (with the dot). I did not know this because all of the tables I had seen linked to this before used _ ,but the actual name (which i normally don't have priveledge to even view) uses the . Whee! -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] Lets start at the basics. What is the easiest way to *make sure* that i am connecting to that oracle db? Anyway I can just list the tables, or something. odbc_tables or something like that?.. -ken -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I only mentioned the part about the access, just to prove that I know i have a select statement working with an ODBC source. I know that I am connecting to the Oracle database, because if i put in a bogus user/pass i get an error stating so, when I supply the correct credentials I get no errors. So that just leaves something to do with possibly the table names. The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS by my count that is 32 characters. That could be a problem. Any way around that, or to alias a name to that? (Mind you, i don't have access to that database to change the table names). I can only query from it. The exact offending line number that is returned is 37. 36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where ATMID = 'PN2000'"; 37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); -ken -Original Message- From: Greig, Euan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:21 AM To: Brooks, Ken Cc: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas: The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error? The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'. Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it? -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 14:04 To: 'Greig, Euan'; [EMAIL PROTECTED] Subject: Oracle ODBC sql [ORA-00972: identifier is too long] I'm getting this message when i try to run a query on an Oracle database thru ODBC. I can connect to the database just fine. here is the code i'm trying to use. $td_oracle = odbc_connect($dsn, $username, $password) OR DIE("Unable to connect to oracle aradmin database"); $si_oracle_query = "SELECT * FROM SERVICE_INSTRUCTIONS"; $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); the result i get is: Warning: SQL error: [Oracle][ODBC Oracle Driver][Oracle OCI]ORA-00972: identifier is too long., SQL state 37000 in SQLExecDirect in c:\program files\apache group\apache\htdocs\odbc_test.php3 on line 34 i'm connecting to an MSAccess database thru odbc just fine and sending a similar query, it works just fine. do i need to do something different because it is an oracle database? (I read somewhere that oracle uses ' and/or " for Identifiers) Is that on the right track? thanks! -ken ** Any opinions expressed in this email are those of the individual and not necessarily the Company. This email and any files transmitted with it, including replies and forwarded copies (which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe
Re: [PHP] Only 5 lines (now with the right script :/ )
Still doesnt work, I think the problem is that the $content exist out of 1 array. So u cant limit it like in a SELECT query. The script sees the content of that array as 1 and therefor can not be splitted. THx for ure afford "Jack Sasportas" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm guessing you are getting an extra blank > > If you get a result back in $headlines = sizeof($content) of 5, then you have 5 > lines, but in your script you have the value of $i as ZERO ($i = 0; $i < > $headlines; $i++) > meaning 0,1,2,3,4,5 which is 6 lines, simply set your $i=1 and it should be > correct. > > Let me know. > I did execute your script off of my server and resulted in only 1 line printing > the value of "1" nothing else > > Jack > > Dennis Haller wrote: > > > The question I asked before was for this script: > > > > > $open = fopen("http://nu.nl/deeplink_html", "r"); > > > > $read = fread($open, 1000); > > > > fclose($open); > > > > $search = > > eregi("nieuws.hoofd(.*)nieuws.overig< > > /B>", $read, $printing); > > > > $printing[1] = str_replace("", "", $printing[1]); > > $printing[1] = str_replace("", "", $printing[1]); > > $printing[1] = str_replace(" > > > $headlines = sizeof($content); > > > > for ($i = 0; $i < $headlines; $i++) { > > > > print "$content[$i] $headlines[$i]"; > > > > } > > ?> > > > > So is it posible to get only 5 lines out of this script? > > > > Thx again > > > > -- > > 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] regexp on us tele number
i'm still getting the hang of regexps, however i have on small problem - I can't seem to make one to work on a US telephone number. does anyone have something similar that i could work from? ~kurth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/HTML Table.php
mj Thu Mar 22 06:32:51 2001 EDT Modified files: /php4/pear/HTML Table.php Log: - Fixed bug reported by Bertrand Mansion. Index: php4/pear/HTML/Table.php diff -u php4/pear/HTML/Table.php:1.2 php4/pear/HTML/Table.php:1.3 --- php4/pear/HTML/Table.php:1.2Wed Mar 21 22:23:38 2001 +++ php4/pear/HTML/Table.phpThu Mar 22 06:32:51 2001 @@ -17,7 +17,7 @@ // | Bertrand Mansion <[EMAIL PROTECTED]> | // +--+ // -// $Id: Table.php,v 1.2 2001/03/22 06:23:38 mj Exp $ +// $Id: Table.php,v 1.3 2001/03/22 14:32:51 mj Exp $ require_once "PEAR.php"; require_once "HTML/Common.php"; @@ -419,7 +419,7 @@ */ function setColAttributes($col, $attributes=null) { - for ($i = 0; $i < $this->_cols; $i++) { + for ($i = 0; $i < $this->_rows; $i++) { $this->setCellAttributes($i,$col,$attributes); } } // end func setColAttributes @@ -432,7 +432,7 @@ */ function updateColAttributes($col, $attributes=null) { - for ($i = 0; $i < $this->_cols; $i++) { + for ($i = 0; $i < $this->_rows; $i++) { $this->updateCellAttributes($i,$col,$attributes); } } // end func updateColAttributes -- 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/standard basic_functions.c
elixer Thu Mar 22 06:43:50 2001 EDT Modified files: /php4/ext/standard basic_functions.c Log: Fixed prototype. Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.319 php4/ext/standard/basic_functions.c:1.320 --- php4/ext/standard/basic_functions.c:1.319 Wed Mar 21 05:53:38 2001 +++ php4/ext/standard/basic_functions.c Thu Mar 22 06:43:48 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.319 2001/03/21 13:53:38 elixer Exp $ */ +/* $Id: basic_functions.c,v 1.320 2001/03/22 14:43:48 elixer Exp $ */ #include "php.h" #include "php_main.h" @@ -919,7 +919,7 @@ /* }}} */ -/* {{{ proto int ip2long(string ip_address) +/* {{{ proto string ip2long(string ip_address) Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address */ PHP_FUNCTION(ip2long) { -- 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] Form help
> > You could have a check for the HTTP_REFERER variable, if it doesn't > > contain "application.php", chances are they didn't come from that page. > it's not a good idea to rely on $HTTP_REFERER for anything, and especially > for this. a referer is only reported when the user follows a hyperlink, so > in the hypothetical case given there would be no referer. Isn't that the point? If there's no referer, they didn't come from the first page, so you send them back there. I could be completely wrong here - is HTTP_REFERER empty following a form submission, even if it's to a different page? > what you need to do is combine your two scripts, which is really a neater > way handling forms anyway. point your form action to the same page > ($PHP_SELF works really well for this, since you can rename the file and > it will still run properly), and then add the following code to the top > of your application.php file > > if($GLOBALS["REQUEST_METHOD"] == "POST") { > > include("process_application.php"); > > exit; > > } This is how I would handle it personally, but then he'd mentioned having two pages, so.. Cheers Jon ** '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] Form help
not all browsers support the referrer or some people use software to block that, so that method is unreliable... the only way to do this is with a token. that is time sensitive from the database, even then there is no method that is hackproof. Rick At 03:41 PM 3/22/01 +, Jon Haworth wrote: > > > You could have a check for the HTTP_REFERER variable, if it doesn't > > > contain "application.php", chances are they didn't come from that page. > > > it's not a good idea to rely on $HTTP_REFERER for anything, and especially > > for this. a referer is only reported when the user follows a hyperlink, so > > in the hypothetical case given there would be no referer. > >Isn't that the point? If there's no referer, they didn't come from the first >page, so you send them back there. I could be completely wrong here - is >HTTP_REFERER empty following a form submission, even if it's to a different >page? > > > what you need to do is combine your two scripts, which is really a neater > > way handling forms anyway. point your form action to the same page > > ($PHP_SELF works really well for this, since you can rename the file and > > it will still run properly), and then add the following code to the top > > of your application.php file > > > > if($GLOBALS["REQUEST_METHOD"] == "POST") { > > > > include("process_application.php"); > > > > exit; > > > > } > >This is how I would handle it personally, but then he'd mentioned having two >pages, so.. > >Cheers >Jon > > >** >'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] ## # Rick St Jean, # [EMAIL PROTECTED] # President of Design Shark, # http://www.designshark.com/ # Quick Contact: http://www.designshark.com/messaging.ihtml # Tel: 905-684-2952 ## -- 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] Unwanted signs!
I'm new to php (and from Denmark:-) and I've just made my first guestbook, but I don't want people to be able to write there name like this name How can I delete these signs? Please help!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /ext/dbx CREDITS INSTALL LICENSE Makefile.in config.m4 dbx.c dbx.dsp dbx.h dbx_mysql.c dbx_mysql.h dbx_odbc.c dbx_odbc.h php_dbx.h
You may want to remove the C++ comments "//" and replace with with "/* */" comments. ""Marc Boeren"" <[EMAIL PROTECTED]> wrote in message cvsmboeren985259224@cvsserver">news:cvsmboeren985259224@cvsserver... > mboeren Thu Mar 22 03:07:04 2001 EDT > > Added files: > /php4/ext/dbx CREDITS INSTALL LICENSE Makefile.in config.m4 dbx.c > dbx.dsp dbx.h dbx_mysql.c dbx_mysql.h dbx_odbc.c > dbx_odbc.h php_dbx.h > Log: > Added dbx module (database abstraction) to the repositorty (/ext/dbx). > Compiles under Linux (--enable-dbx) and Windows. > Supports MySQL and ODBC modules (more to be added later). > @ Added dbx module (database abstraction) to the repository. (Marc) > > > -- > 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 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] Unwanted signs!
You can use the strip_tags function to remove HTML tags from the user inputted data e.g. $name = strip_tags($name) -Stewart -Original Message- From: Brian Rosenkrantz [mailto:[EMAIL PROTECTED]] Sent: 22 March 2001 15:50 To: [EMAIL PROTECTED] Subject: [PHP] Unwanted signs! I'm new to php (and from Denmark:-) and I've just made my first guestbook, but I don't want people to be able to write there name like this name How can I delete these signs? Please help!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 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] Unwanted signs!
Check out : http://www.php.net/manual/en/function.strip-tags.php So : $input = 'name'; $input = strip_tags($input); echo $input; // name Regards, Philip Olson http://www.cornado.com/ On Thu, 22 Mar 2001, Brian Rosenkrantz wrote: > I'm new to php (and from Denmark:-) and I've just made my first guestbook, > but I don't want people to be able to write there name like this > name > > How can I delete these signs? > > Please help!! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- 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] True64 installation
Do you know where I can either: 1) download the PHP binaries for Digital True64 OSF1 V5.1 732 alpha or 2) get a OSF specific configuration file for compilation ? My goal is to run latest PHP under apache 1.3.19 with MySQL 3.22.20a on a dec osf. Thanks in advance, John Tran -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear/Cache/Container dbx.php
uw Thu Mar 22 06:57:45 2001 EDT Modified files: /php4/pear/Cache/Container dbx.php Log: - connection data typo - whitespaces Index: php4/pear/Cache/Container/dbx.php diff -u php4/pear/Cache/Container/dbx.php:1.1 php4/pear/Cache/Container/dbx.php:1.2 --- php4/pear/Cache/Container/dbx.php:1.1 Thu Mar 22 06:29:01 2001 +++ php4/pear/Cache/Container/dbx.php Thu Mar 22 06:57:44 2001 @@ -15,7 +15,7 @@ // | Authors: Christian Stocker <[EMAIL PROTECTED]> | // +--+ // -// $Id: dbx.php,v 1.1 2001/03/22 14:29:01 chregu Exp $ +// $Id: dbx.php,v 1.2 2001/03/22 14:57:44 uw Exp $ require_once 'Cache/Container.php'; @@ -50,7 +50,7 @@ * ) * * @author Christian Stocker <[EMAIL PROTECTED]> -* @version $Id: dbx.php,v 1.1 2001/03/22 14:29:01 chregu Exp $ +* @version $Id: dbx.php,v 1.2 2001/03/22 14:57:44 uw Exp $ * @package Cache */ class Cache_Container_dbx extends Cache_Container { @@ -69,7 +69,6 @@ * * @var string */ - var $module = ''; /** @@ -91,7 +90,6 @@ * * @var string */ - var $username = ''; /** @@ -119,7 +117,7 @@ if (!$this->module) return new Cache_Error('No module specified!', __FILE__, __LINE__); -$this->db = dbx_connect($this->module,$thos->host,$this->db,$this->username,$this->password); +$this->db = dbx_connect($this->module, $this->host, $this->db, +$this->username, $this->password); if (dbx_error($this->db)) { return new Cache_Error('DBx connect failed: ' . dbx_error($this->db), __FILE__, __LINE__); @@ -168,7 +166,7 @@ addslashes($group) ); -$res = dbx_query($this->db,$query); +$res = dbx_query($this->db, $query); if (dbx_error($this->db)) { return new Cache_Error('DBx query failed: ' . dbx_error($this->db) , __FILE__, __LINE__); @@ -185,7 +183,7 @@ addslashes($group) ); -$res = dbx_query($this->db,$query); +$res = dbx_query($this->db, $query); if (dbx_error($this->db)) return new Cache_Error('DBx query failed: ' . dbx_error($this->db), __FILE__, __LINE__); @@ -215,7 +213,7 @@ addslashes($group) ); -$res = dbx_query($this->db,$query); +$res = dbx_query($this->db, $query); if (dbx_error($this->db)) return new Cache_Error('DBx query failed: ' . dbx_error($this->db), __FILE__, __LINE__); @@ -237,7 +235,7 @@ time()); -$res = dbx_query($this->db,$query); +$res = dbx_query($this->db, $query); if (dbx_error($this->db)) return new Cache_Error('DBx query failed: ' . dbx_error($this->db), __FILE__, __LINE__); -- 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 /pear/Cache/Container dbx.php
uw Thu Mar 22 07:09:22 2001 EDT Modified files: /php4/pear/Cache/Container dbx.php Log: - added support for persistent connections Index: php4/pear/Cache/Container/dbx.php diff -u php4/pear/Cache/Container/dbx.php:1.2 php4/pear/Cache/Container/dbx.php:1.3 --- php4/pear/Cache/Container/dbx.php:1.2 Thu Mar 22 06:57:44 2001 +++ php4/pear/Cache/Container/dbx.php Thu Mar 22 07:09:21 2001 @@ -15,7 +15,7 @@ // | Authors: Christian Stocker <[EMAIL PROTECTED]> | // +--+ // -// $Id: dbx.php,v 1.2 2001/03/22 14:57:44 uw Exp $ +// $Id: dbx.php,v 1.3 2001/03/22 15:09:21 uw Exp $ require_once 'Cache/Container.php'; @@ -50,7 +50,7 @@ * ) * * @author Christian Stocker <[EMAIL PROTECTED]> -* @version $Id: dbx.php,v 1.2 2001/03/22 14:57:44 uw Exp $ +* @version $Id: dbx.php,v 1.3 2001/03/22 15:09:21 uw Exp $ * @package Cache */ class Cache_Container_dbx extends Cache_Container { @@ -100,11 +100,20 @@ var $password = ''; /** -* PEAR DB object +* DBx handle object * -* @var object PEAR_DB +* @var object DBx handle */ var $db; + + +/** +* Establish a persistent connection? +* +* @var boolean +*/ +var $persistent = true; + function Cache_Container_dbx($options) { @@ -112,12 +121,12 @@ return new Cache_Error('No options specified!', __FILE__, __LINE__); } -$this->setOptions($options, array('module','host','db','username','password', 'cache_table')); +$this->setOptions($options, array('module','host','db','username','password', +'cache_table', 'persistent')); if (!$this->module) return new Cache_Error('No module specified!', __FILE__, __LINE__); -$this->db = dbx_connect($this->module, $this->host, $this->db, $this->username, $this->password); +$this->db = dbx_connect($this->module, $this->host, $this->db, +$this->username, $this->password, $this->persistent); if (dbx_error($this->db)) { return new Cache_Error('DBx connect failed: ' . dbx_error($this->db), __FILE__, __LINE__); -- 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 article.c element.c page.c pageelement.c topic.c
emile Thu Mar 22 07:11:41 2001 EDT Modified files: /php4/ext/midgard article.c element.c page.c pageelement.c topic.c Log: Added update duplicate checks Index: php4/ext/midgard/article.c diff -u php4/ext/midgard/article.c:1.18 php4/ext/midgard/article.c:1.19 --- php4/ext/midgard/article.c:1.18 Wed Mar 21 06:53:28 2001 +++ php4/ext/midgard/article.c Thu Mar 22 07:11:40 2001 @@ -1,4 +1,4 @@ -/* $Id: article.c,v 1.18 2001/03/21 14:53:28 emile Exp $ +/* $Id: article.c,v 1.19 2001/03/22 15:11:40 emile Exp $ Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]> @@ -556,7 +556,8 @@ RETURN_FALSE_BECAUSE(MGD_ERR_ACCESS_DENIED); } - if (mgd_exists_id(mgd_handle(), "article", "topic=$d AND name=$q", + /* skip duplicate check for empty names because the name isn't mandatory */ + if ((*name)->value.str.len && mgd_exists_id(mgd_handle(), "article", "topic=$d AND +name=$q", (*topic)->value.lval, (*name)->value.str.val)) { RETURN_FALSE_BECAUSE(MGD_ERR_DUPLICATE); } @@ -864,7 +865,8 @@ RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS); } - if (mgd_exists_id(mgd_handle(), "article", "topic=$d AND name=$q AND id<>$d", + /* skip duplicate check for empty names because the name isn't mandatory */ + if ((*name)->value.str.len && mgd_exists_id(mgd_handle(), "article", "topic=$d AND +name=$q AND id<>$d", (*topic)->value.lval, (*name)->value.str.val, (*id)->value.lval)) { RETURN_FALSE_BECAUSE(MGD_ERR_DUPLICATE); } Index: php4/ext/midgard/element.c diff -u php4/ext/midgard/element.c:1.7 php4/ext/midgard/element.c:1.8 --- php4/ext/midgard/element.c:1.7 Sat Mar 10 14:43:10 2001 +++ php4/ext/midgard/element.c Thu Mar 22 07:11:40 2001 @@ -1,4 +1,4 @@ -/* $Id: element.c,v 1.7 2001/03/10 22:43:10 emile Exp $ +/* $Id: element.c,v 1.8 2001/03/22 15:11:40 emile Exp $ Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]> @@ -146,6 +146,11 @@ if (!isstyleowner(mgd_idfield(mgd_handle(), "style", "element", (*id)->value.lval))) RETURN_FALSE_BECAUSE(MGD_ERR_ACCESS_DENIED); + + if (mgd_exists_id(mgd_handle(), "element", "style=$d AND name=$q AND id<>$d", + mgd_idfield(mgd_handle(), "style", "element", (*id)->value.lval), + (*name)->value.str.val, (*id)->value.lval)) + RETURN_FALSE_BECAUSE(MGD_ERR_DUPLICATE); php_midgard_update(return_value, "element", "name=$q,value=$q", (*id)->value.lval, Index: php4/ext/midgard/page.c diff -u php4/ext/midgard/page.c:1.12 php4/ext/midgard/page.c:1.13 --- php4/ext/midgard/page.c:1.12Sat Mar 10 14:43:10 2001 +++ php4/ext/midgard/page.c Thu Mar 22 07:11:40 2001 @@ -1,4 +1,4 @@ -/* $Id: page.c,v 1.12 2001/03/10 22:43:10 emile Exp $ +/* $Id: page.c,v 1.13 2001/03/22 15:11:40 emile Exp $ Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]> @@ -255,6 +255,11 @@ if (!mgd_exists_id(mgd_handle(), "person", "id=$d", (*author)->value.lval)) RETURN_FALSE_BECAUSE(MGD_ERR_NOT_EXISTS); + + if (mgd_exists_id(mgd_handle(), "page", "up=$d AND name=$q AND id<>$d", + mgd_idfield(mgd_handle(), "up", "page", (*id)->value.lval), + (*name)->value.str.val, (*id)->value.lval)) + RETURN_FALSE_BECAUSE(MGD_ERR_DUPLICATE); php_midgard_update(return_value, "page", "name=$q,style=$d,title=$q,changed=Curdate()," Index: php4/ext/midgard/pageelement.c diff -u php4/ext/midgard/pageelement.c:1.7 php4/ext/midgard/pageelement.c:1.8 --- php4/ext/midgard/pageelement.c:1.7 Sat Mar 10 14:43:10 2001 +++ php4/ext/midgard/pageelement.c Thu Mar 22 07:11:40 2001 @@ -1,4 +1,4 @@ -/* $Id: pageelement.c,v 1.7 2001/03/10 22:43:10 emile Exp $ +/* $Id: pageelement.c,v 1.8 2001/03/22 15:11:40 emile Exp $ Copyright (C) 1999 Jukka Zitting <[EMAIL PROTECTED]> Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA <[EMAIL PROTECTED]> @@ -145,6 +145,11 @@ if (!ispageowner(mgd_idfield(mgd_handle(), "page", "pageelement", (*id)->value.lval))) RETURN_FALSE_BECAUSE(MGD_ERR_ACCESS_DENIED); + + if (mgd_exists_id(mgd_handle(), "pageelement", "page=$d AND name=$q AND id<>$d", + mgd_idfield(mgd_handle(), "page", "pageelement", (*id)->value.lval), + (*name)->value.str.val, (*id)->value.lval)) + RETURN_FALSE_BECAUSE(MGD_ERR_DUPLICATE); php_midgard_update(return_value, "pageelement", "name=$q,value=$q,info=$d", (*id)->value.lval, Index: php4/ext/midgard/top
[PHP-CVS] cvs: php4 /ext/dbx dbx.c dbx_mysql.c dbx_mysql.h dbx_odbc.c dbx_odbc.h php_dbx.h
mboeren Thu Mar 22 07:14:35 2001 EDT Modified files: /php4/ext/dbx dbx.c dbx_mysql.c dbx_odbc.c dbx_mysql.h dbx_odbc.h php_dbx.h Log: Changed C++ style comments to C-style comments (Marc) #I hope I got 'em all @Changed C++ style comments to C-style comments (Marc) Index: php4/ext/dbx/dbx.c diff -u php4/ext/dbx/dbx.c:1.1 php4/ext/dbx/dbx.c:1.2 --- php4/ext/dbx/dbx.c:1.1 Thu Mar 22 03:07:04 2001 +++ php4/ext/dbx/dbx.c Thu Mar 22 07:14:34 2001 @@ -22,16 +22,16 @@ #include "php_dbx.h" #include "ext/standard/info.h" -// defines for supported databases +/*/ defines for supported databases /*/ #define DBX_UNKNOWN 0 #define DBX_MYSQL 1 #define DBX_ODBC 2 -// includes for supported databases +/*/ includes for supported databases /*/ #include "dbx.h" #include "dbx_mysql.h" #include "dbx_odbc.h" -// support routines +/*/ support routines /*/ int module_exists(char * module_name) { zend_module_entry * zme; int r; @@ -53,7 +53,7 @@ return 1; } -// from dbx.h, to be used in support-files (dbx_mysql.c etc...) +/*/ from dbx.h, to be used in support-files (dbx_mysql.c etc...) /*/ void dbx_call_any_function(INTERNAL_FUNCTION_PARAMETERS, char * function_name, zval ** returnvalue, int number_of_arguments, zval *** params) { zval * zval_function_name; MAKE_STD_ZVAL(zval_function_name); @@ -65,35 +65,35 @@ FREE_ZVAL(zval_function_name); } -// switch_dbx functions declarations -// each must be supported in the x/dbx_module files as dbx_module_function, -// e.g. switch_dbx_connect expects a dbx_mysql_connect in de x/dbx_mysql files -// all params except the dbx_module param are passed on -// each must return the expected zval * 's in the rv parameter, which are passed on unmodified -// do NOT use the return_value parameter from INTERNAL_FUNCTION_PARAMETERS -// you can additionally return 0 or 1 for failure or success which will also be returned by the switches - +/*/ switch_dbx functions declarations +/ / each must be supported in the x/dbx_module files as dbx_module_function, +/ / e.g. switch_dbx_connect expects a dbx_mysql_connect in de x/dbx_mysql files +/ / all params except the dbx_module param are passed on +/ / each must return the expected zval * 's in the rv parameter, which are passed on +unmodified +/ / do NOT use the return_value parameter from INTERNAL_FUNCTION_PARAMETERS +/ / you can additionally return 0 or 1 for failure or success which will also be +returned by the switches +/*/ int switch_dbx_connect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); -// returns connection handle as resource on success or 0 as long on failure +/*/ returns connection handle as resource on success or 0 as long on failure /*/ int switch_dbx_pconnect(zval ** rv, zval ** host, zval ** db, zval ** username, zval ** password, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); -// returns persistent connection handle as resource on success or 0 as long on failure +/*/ returns persistent connection handle as resource on success or 0 as long on +failure /*/ int switch_dbx_close(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); -// returns 1 as long on success or 0 as long on failure +/*/ returns 1 as long on success or 0 as long on failure /*/ int switch_dbx_query(zval ** rv, zval ** dbx_handle, zval ** sql_statement, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); -// returns 1 as long or result identifier as resource on success or 0 as long on failure +/*/ returns 1 as long or result identifier as resource on success or 0 as long on +failure /*/ int switch_dbx_getcolumncount(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); -// returns column-count as long on success or 0 as long on failure +/*/ returns column-count as long on success or 0 as long on failure /*/ int switch_dbx_getcolumnname(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); -// returns column-name as string on success or 0 as long on failure +/*/ returns column-name as string on success or 0 as long on failure /*/ int switch_dbx_getcolumntype(zval ** rv, zval ** result_handle, long column_index, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); -// returns column-type as string on success or 0 as long on failure +/*/ returns column-type as string on success or 0 as long on failure /*/ int switch_dbx_getrow(zval ** rv, zval ** result_handle, INTERNAL_FUNCTION_PARAMETERS, zval ** dbx_module); -// returns array[0..columncount-1] as strings on success or 0 as long on failure +/*/ returns array[0..columncount-1] as strings on success or 0 as long on failure +/*/ int switch_dbx_error(zval ** rv, zval ** dbx_handle, INTERNAL_FUNCTION_PARAMETERS
Re: [PHP-CVS] cvs: php4 /ext/dbx dbx.c dbx_mysql.c dbx_mysql.h dbx_odbc.c dbx_odbc.h php_dbx.h
On Thu, 22 Mar 2001, Marc Boeren wrote: > mboeren Thu Mar 22 07:14:35 2001 EDT > > Modified files: > /php4/ext/dbx dbx.c dbx_mysql.c dbx_odbc.c dbx_mysql.h dbx_odbc.h > php_dbx.h > Log: > Changed C++ style comments to C-style comments (Marc) > #I hope I got 'em all > @Changed C++ style comments to C-style comments (Marc) Since this is a new module, it only needs one NEWS entry, which you already put in. -Andrei * There is no knowledge that is not power. * -- 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-CVS] cvs: php4 /pear/HTML Common.php
>>* @copyright Copyright 2001 Ethicon Endo-Surgery >Isn't this a contradiction to the copyright notice of >the license in the head of the file? >-Martin I apologize for I meant to take that out before I commited it. I can't get into cvs right now if somebody wants they can go ahead and take that comment out. Adam
[PHP-CVS] cvs: php4 /pear/HTML Common.php
mj Thu Mar 22 07:27:07 2001 EDT Modified files: /php4/pear/HTML Common.php Log: - removed wrong copyright notice. Index: php4/pear/HTML/Common.php diff -u php4/pear/HTML/Common.php:1.2 php4/pear/HTML/Common.php:1.3 --- php4/pear/HTML/Common.php:1.2 Wed Mar 21 22:23:38 2001 +++ php4/pear/HTML/Common.php Thu Mar 22 07:27:07 2001 @@ -16,14 +16,13 @@ // | Authors: Adam Daniel <[EMAIL PROTECTED]>| // +--+ // -// $Id: Common.php,v 1.2 2001/03/22 06:23:38 mj Exp $ +// $Id: Common.php,v 1.3 2001/03/22 15:27:07 mj Exp $ /** * Base class for all HTML classes * * @author Adam Daniel <[EMAIL PROTECTED]> * @version 1.3 -* @copyright Copyright 2001 Ethicon Endo-Surgery * @since PHP 4.0.3pl1 */ class HTML_Common { -- 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] Getting a header without ANY mime type
This would be part of a test tool I'd like to create in order to test conditions of an application. I want to send a request and ensure that the response has no set type or known length if possible (eg return some media that is undefined and see how the app handles the response). Anyone? Spunk > > On Thursday 22 March 2001 02:32, you wrote: >> I've got a situation where I'm interested in returning a header without >> ANY mime type specified. It looks like the default Mime type is set by >> the server (plain text)? Or at least when I don't specify the type > > It's set by PHP (text/html) > >> that's what my server is returning. I'd also like to ensure that there >> is no content length returned. Is this possible? > > So you want to give the browser something and make really sure that it > has no chance of interpreting it correctly? Perhaps I miss something, but > unless your visitors are masochists with too much time on their hands > that's a sure way to lose them really quickly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 22 Mar 2001 16:38:22 -0000 Issue 582
php-general Digest 22 Mar 2001 16:38:22 - Issue 582 Topics (messages 45071 through 45136): Installing PEAR 45071 by: RalphGzman.aol.com 45081 by: Paul rees How to delete a row from MySql 45072 by: YoBro 45073 by: Peter Houchin 45086 by: Jeff Armstrong Re: IBill - Can you recommend a script? 45074 by: Rick St Jean Web Directory 45075 by: toto Passthru Question 45076 by: Michael Bartlett Errors caused by php or apache(or buggy explorer)? 45077 by: Vidar Tyldum big problem 45078 by: Salim Meethoo 45082 by: Tobias Talltorp Re: file height and width 45079 by: Kazazic Almir Re: linking classes together 45080 by: Stewart Taylor PAM authentification 45083 by: Daniel Svensson, Coretrek dbm support broken? Please help! 45084 by: AK47 Re: Simple question about mail() limitations (if any :) 45085 by: Greig, Euan XML Problems 45087 by: Niel Zeeman Oracle, Win2000, Apache, OCI 45088 by: Greig, Euan 45117 by: Brooks, Ken Re: Ack! Cookie Problems! 45089 by: Jeff Armstrong Re: Getting a header without ANY mime type 45090 by: Christian Reiniger 45136 by: Spunk S. Spunk III Re: trim string - try array/join() 45091 by: Jeff Armstrong Re: files with html extension 45092 by: Harshdeep S Jawanda 45101 by: Jeff Armstrong please help with this simple problem 45093 by: adam 45095 by: Stewart Taylor 45100 by: adam 45104 by: rui.websolut.net 45105 by: Stewart Taylor 45106 by: adam 45107 by: adam Re: Booking by Date/Time in mySQL 45094 by: Jeff Armstrong multiple selection dropdown lists 45096 by: Angie Bauer 45099 by: Stewart Taylor Re: URIs as variables 45097 by: Issac Goldstand 45102 by: rui.websolut.net 45103 by: Jeff Armstrong Re: Lostpassword script Error 45098 by: techzeus.pacific.net.sg Only 5 lines 45108 by: Dennis Haller 45109 by: Michael Bartlett 45110 by: Michael Bartlett 45112 by: Dennis Haller Only 5 lines (now with the right script :/ ) 45111 by: Dennis Haller 45120 by: Jack Sasportas 45128 by: Dennis Haller Free Web Space 45113 by: PIS Alaiddin Tayeh 45115 by: Jon Haworth 45123 by: Philip Olson Re: try catch in php? 45114 by: elias LDAP problem 45116 by: Kazazic Almir Oracle ODBC sql [ORA-00972: identifier is too long] 45118 by: Brooks, Ken 45119 by: Greig, Euan 45121 by: Brooks, Ken 45125 by: Brooks, Ken 45127 by: Brooks, Ken Form help 45122 by: Good Fella 45124 by: Jon Haworth 45126 by: Philip Olson 45130 by: Jon Haworth 45131 by: Rick St Jean regexp on us tele number 45129 by: Kurth Bemis Unwanted signs! 45132 by: Brian Rosenkrantz 45133 by: Stewart Taylor 45134 by: Philip Olson True64 installation 45135 by: John Tran Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- Ok, IM a bit confused as to how PEAR is installed. I read through the README file in the php source but found no explanation. I am tryin to use the PEARs DB abstracion. I have DB.php and DB/ in /usr/local/lib/php. I added: 'include_once(DB/mysql.php);' to the top of my script but it failed since it is not finding it. Do I need to assign a path in the php.ini file or have I missed an installation step? Can somebody please explain or point me to some docs on how I get up and going with PEAR. Thanks. In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes >Ok, IM a bit confused as to how PEAR is installed. I read through the README >file in the php source but found no explanation. > >I am tryin to use the PEARs DB abstracion. I have DB.php and DB/ in >/usr/local/lib/php. I added: 'include_once(DB/mysql.php);' to the top of my >script but it failed since it is not finding it. Do I need to assign a path in >the php.ini file or have I missed an installation step? > >Can somebody please explain or point me to some docs on how I get up and going >with PEAR. Hi, Try something like: query ($sql))) handle_db_error ($result); else $resultArray = $result -> fetchRow (DB_FETCHMODE_ASSOC); $db_con -> commit(); if ($db_con && (! $usePersistentConnects)) $db_con -> disconnect(); ?> I hope the line wraps still leave the above readable. I made a separate function of my own, handle_db_error (), to handle errors - you might like to do something like: echo DB::errorMessage($result); ... instead. I recommend putting all the db connecti
[PHP] Directory rights: Create and delete is possible but not ccggrp, why?
I posted a message last week on this subject, and I have searched for an answer meanwhile. So i decided to re ask my question a little bit differently since i did not find the answer to my problem: I use a web based application I am making and through this application I create directories. I can create the directories with no problem using PHP with full rights (777). The directories, then, needs to have their group changed to something else and here is my problem, I tried a chgrp (the php function) from php to change it as well as exec('chgrp'...) or exec('chown' ...) and then I tried a system('chgrp'...) and system('chown'...). All this to no success. Someone told me, here on the list, that apache was runing as nobody:nobody, so it had no rights to change rights. We changed the user:group of apache and called it apache:apache. then we re-tried all our experiences, to no avail. I am sure I am having all the rights necessary because I can delete the directories I create with no trouble. Note: If I connect in console mode with the user apache, i can chown the directory as I wish. Any suggestion on how to change rights on directories would be appreciated. (With PHP or any other solution) Thanks in advance Dominique Paquin Galea secured networks -- 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] Freshmeat Ad?
Is there a reason Freshmeat is showing a banner stating "PHP 4.01pl2 is out"? Especially since the binary is up to 4.04pl1. Michael Geier CDMSports Systems Administration EMail: [EMAIL PROTECTED] Phone: 314.991.1511 x 6505 -- 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] Directory rights: Create and delete is possible but notccggrp, why?
I have run into a problem similar to this. Basically what I have found is that there is no way to do this sort of thing using php through apache. I fixed my problem by writting a perl script that creates the directories and sets the permissions/groups correctly. I have php write out a text file and dump it into a directory, the perl script runs from cron and checks the directory every few minutes and creates the appropriate directories based on the data in the files. It a hackish way of doing it, but it actually works quite well. If you didn't want to use cron, you could just have a process running that monitors the directory constantly. There are a number of ways to do this, including using cgi php or C or whatever. There are very good reasons why you can't do what you want to do, you just have to get creative. K E I T H V A N C E Software Engineer n-Link Corporation On Thu, 22 Mar 2001, Dominique Paquin wrote: > I posted a message last week on this subject, and I have searched for an > answer meanwhile. > > So i decided to re ask my question a little bit differently since i did not > find the answer to my problem: > > I use a web based application I am making and through this application I > create directories. I can create the directories with no problem using PHP > with full rights (777). The directories, then, needs to have their group > changed to something else and here is my problem, > > I tried a chgrp (the php function) from php to change it as well as > exec('chgrp'...) or exec('chown' ...) and then I tried a system('chgrp'...) > and system('chown'...). All this to no success. Someone told me, here on the > list, that apache was runing as nobody:nobody, so it had no rights to change > rights. We changed the user:group of apache and called it apache:apache. > then we re-tried all our experiences, to no avail. I am sure I am having all > the rights necessary because I can delete the directories I create with no > trouble. > > Note: If I connect in console mode with the user apache, i can chown the > directory as I wish. > > Any suggestion on how to change rights on directories would be appreciated. > (With PHP or any other solution) > > Thanks in advance > > Dominique Paquin > Galea secured networks > > > > > -- > 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] Probs with PHP4 and MySQL File Upload...
Hello All! Since I upgraded to PHP4, file upload into MySQL tables seems not to work anymore. I am using PHPMyAdmin to access the database. When I try to upload a file there, I get the Error "The file '[tmpdir]/php129947' must be in the database directory or be readable by all" where [tmpdir] is the upload_tmp_dir specified in php.ini. This directory has 777 permissions, so it is readable by all. I'm confused because it worked without any problems with PHP 3. Thanks very much for any hint... Greetz, Kilian -- 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] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
At 09:52 AM 3/22/01 -0500, Brooks, Ken wrote: >Lets start at the basics. > >What is the easiest way to *make sure* that i am connecting to that oracle >db? > >Anyway I can just list the tables, or something. >odbc_tables or something like that?.. To get a list of the tables, you could: SELECT TABLE_NAME FROM ALL_TABLES; ...but, since you're on Oracle anyway, why not do something even quicker? SELECT SYSDATE FROM DUAL; will return the current date. SELECT TO_CHAR(SYSDATE,'DD-MON-YY HH24:MI:SS') FROM DUAL; will return the current date and time. - Brian - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 <[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] A problem under Solaris
Hello all I´m trying to compile PHP 4.0 under Solaris 8.0 - SPARC 250. When I try to configure using the appropiate script, it test for the existence of one package called lex and another called flex, both couldn´t be found and the script can´t continue. Anybody has be in the same trouble? Any idea? What are those packages? Thanks in advance Emiliano
RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long]
At 10:16 AM 3/22/01 -0500, Brooks, Ken wrote: >I got it. ah. :) good >I had the table name listed as aradmin_eps_service_instructions >when in fact it should have been aradmin.eps_service_instructions (with >the dot). > >I did not know this because all of the tables I had seen linked to this >before used _ ,but the actual name (which i normally don't have priveledge >to even view) uses the . Actually, in Oracle parlance, the table name is EPS_SERVICE_INSTRUCTIONS, and it exists in the ARADMIN schema. If there is no public synonym called EPS_SERVICE_INSTRUCTIONS, then you'd need to specify both schema and table name (eg: owner.table_name) in order to view the table. If you didn't have the privs to view a given table, you'd not be able to view it whether you specified the schema or not. :) A list of the tables you can "see" along with their schema (owners) can be obtained by running the following SQL query: SELECT OWNER,TABLE_NAME FROM ALL_TABLES; >Whee! Indeed. :) ..or, try: SELECT OWNER||'.'||TABLE_NAME FROM ALL TABLES; - Brian - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 <[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] Web Based PHP Content Manager Problems
I have tried using multiple PHP content manager programs and cannot seem to get any of them to save files that have been edited over the web interface unless the file permissions are set to let everybody write to them. Of course, we don't want to have out files writeable by the world. I have tried using these different managers in their own directories, even protected the directories with a .htaccess file. The same ID that I allow to access the directory is also the owner of the file. What seems to happen once I get authenticated and allowed into the directory, I may be wrong here, is that my server thinks I am a 'nobody' and so when I submit the file changes I get permissions error. Everything works fine with all of the different programs I've tried; if I simply give everybody write access to the file, but that is not an option. Any help would be greatly appreciated. Thanks, Phil -- 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] ODBC only working for 82 rows
I've kind of hit a wall. I am using the data in an oracle table to create a table in mysql that is equivalent. It only gets thru 82 sometimes 83 records. Doesn't error out or anything, only inserts (and reports back to the screen) 82. There are 134 fields in the table. When i just print out the fieldnames, etc, it prints all of them out. When I try to to alter(add) to the mysql table, it doesn't seem to make it all the way thru. Ideas? -ken Below is the major part of the sql operations. $si_oracle_cols = odbc_num_fields($si_oracle_result); PRINT "Colums: $si_oracle_cols"; /* Print these results to the screen in a nice format */ $i = 1; $result = 0; IF ($si_oracle_cols == 0) : PRINT "No Columns(Fields) returned"; ELSEIF ($si_oracle_cols > 0) : WHILE($i < $si_oracle_cols): $fieldname = odbc_field_name($si_oracle_result, $i); $fieldtype = odbc_field_type($si_oracle_result, $i); IF($fieldtype == "VARCHAR2"): $fieldtype = "VARCHAR"; ENDIF; IF($fieldtype == "NUMBER"): $fieldtype = "INT"; ENDIF; $fieldlen = odbc_field_len($si_oracle_result, $i); PRINT "ColNum: $i "; $mysql_create_si_query = "CREATE TABLE IF NOT EXISTS $si_mysql($fieldname $fieldtype($fieldlen))"; $result = MYSQL_QUERY($mysql_create_si_query); $mysql_alter_si_query = "alter table $si_mysql add($fieldname $fieldtype($fieldlen))"; $alter_result = MYSQL_QUERY($mysql_alter_si_query); $i++; ENDWHILE; PRINT "End of fields"; ENDIF; -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 10:16 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I got it. I had the table name listed as aradmin_eps_service_instructions when in fact it should have been aradmin.eps_service_instructions (with the dot). I did not know this because all of the tables I had seen linked to this before used _ ,but the actual name (which i normally don't have priveledge to even view) uses the . Whee! -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] Lets start at the basics. What is the easiest way to *make sure* that i am connecting to that oracle db? Anyway I can just list the tables, or something. odbc_tables or something like that?.. -ken -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I only mentioned the part about the access, just to prove that I know i have a select statement working with an ODBC source. I know that I am connecting to the Oracle database, because if i put in a bogus user/pass i get an error stating so, when I supply the correct credentials I get no errors. So that just leaves something to do with possibly the table names. The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS by my count that is 32 characters. That could be a problem. Any way around that, or to alias a name to that? (Mind you, i don't have access to that database to change the table names). I can only query from it. The exact offending line number that is returned is 37. 36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where ATMID = 'PN2000'"; 37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); -ken -Original Message- From: Greig, Euan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:21 AM To: Brooks, Ken Cc: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas: The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error? The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' etc. But if you say 'create table "euan"', then you will forever have to say 'select * from "euan"'. Problems can indeed arise when interfacing between Access and Oracle, because I believe that Access is case sensitive by default, and Oracle programmers tend not to expect this. But none of this seems very applicable to your case... or is it? -
Re: [PHP] Directory rights: Create and delete is possible but notccggrp, why?
Thanks a lot for the answer, it's the first constructive response i have for my problem. I was banging my head on the walls with this one. I might just use C/Cron to correct this. If you implemented this could you guide me a little bit in the steps to follow to complete this? Thanks again. Dominique Paquin. "Keith Vance" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have run into a problem similar to this. Basically what I have found is > that there is no way to do this sort of thing using php through apache. > I fixed my problem by writting a perl script that creates the directories > and sets the permissions/groups correctly. I have php write out a text > file and dump it into a directory, the perl script runs from cron and > checks the directory every few minutes and creates the appropriate > directories based on the data in the files. It a hackish way of doing it, > but it actually works quite well. If you didn't want to use cron, you > could just have a process running that monitors the directory constantly. > There are a number of ways to do this, including using cgi php or C or > whatever. > There are very good reasons why you can't do what you want to do, you > just have to get creative. > > K E I T H V A N C E > Software Engineer > n-Link Corporation > > On Thu, 22 Mar 2001, Dominique Paquin wrote: > > > I posted a message last week on this subject, and I have searched for an > > answer meanwhile. > > > > So i decided to re ask my question a little bit differently since i did not > > find the answer to my problem: > > > > I use a web based application I am making and through this application I > > create directories. I can create the directories with no problem using PHP > > with full rights (777). The directories, then, needs to have their group > > changed to something else and here is my problem, > > > > I tried a chgrp (the php function) from php to change it as well as > > exec('chgrp'...) or exec('chown' ...) and then I tried a system('chgrp'...) > > and system('chown'...). All this to no success. Someone told me, here on the > > list, that apache was runing as nobody:nobody, so it had no rights to change > > rights. We changed the user:group of apache and called it apache:apache. > > then we re-tried all our experiences, to no avail. I am sure I am having all > > the rights necessary because I can delete the directories I create with no > > trouble. > > > > Note: If I connect in console mode with the user apache, i can chown the > > directory as I wish. > > > > Any suggestion on how to change rights on directories would be appreciated. > > (With PHP or any other solution) > > > > Thanks in advance > > > > Dominique Paquin > > Galea secured networks > > > > > > > > > > -- > > 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] A problem under Solaris
I got the same problem as you did, Just pick-up flex on a gnu mirror and your problem will be corrected! Regards, Sebastien Roy www.galeasec.com Emiliano Marmonti wrote: > Hello all > > I´m trying to compile PHP 4.0 under Solaris 8.0 - SPARC 250. When I try to >configure using the appropiate script, it test for the existence of one package >called lex and another called flex, both couldn´t be found and the script can´t >continue. Anybody has be in the same trouble? Any idea? What are those packages? > > Thanks in advance > Emiliano -- 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] A problem under Solaris
Thank you Sebastian, but I want to know what is flex (and I don´t know where could I obtain it). Thanks again. Emiliano. -- 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] Date subtraction
Hi! I want to subtract to date times from each other. Like : '2000 12 01 12:12:12' - '2000 11 10 11:39:59' Is there any function to do this subtraction or can i do it with MySQL's SELECT query ? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] LDAP problem
Make sure all the dlls used by php3_ldap.dll are available. I have php4 and the php_ldap.dll requires the libsasl.dll to be available. Brett ""almir"" <[EMAIL PROTECTED]> wrote in message 99d00g$j4h$[EMAIL PROTECTED]">news:99d00g$j4h$[EMAIL PROTECTED]... > ok > i am usng php3.0.11 ,IIS4 and NT4 trying to connect to ldap server but i get > a error > Fatal error: Call to unsupported or undefined function ldap_connect() in ... > i have included php3_ldap.dll in my php3.ini, i have even tried to include > it dinamicaly with dl but then i get > > Fatal error: Unable to load dynamic library './php3_ldap.dll' > -- 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] Web Based PHP Content Manager Problems
In article <99dcc5$vm0$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Phil") wrote: > I have tried using multiple PHP content manager programs and cannot seem to > get any of them to save files that have been edited over the web interface > unless the file permissions are set to let everybody write to them. > > Of course, we don't want to have out files writeable by the world. I have > tried using these different managers in their own directories, even > protected the directories with a .htaccess file. The same ID that I allow to > access the directory is also the owner of the file. > > What seems to happen once I get authenticated and allowed into the > directory, I may be wrong here, is that my server thinks I am a 'nobody' and > so when I submit the file changes I get permissions error. Everything works > fine with all of the different programs I've tried; if I simply give > everybody write access to the file, but that is not an option. Yes, your web server is apparently running as user "nobody", a common configuration. See the manual chapter on security for more info on setting proper file permissions with PHP. -- CC -- 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] .htaccess question
Yo! I need to know how I create a login script that uses the htaccess file to authenticate users. Thankful for any answers! /Broder B
Re: [PHP] A problem under Solaris
If you have the "Bonus Software" pack that came with Solaris8, there is a CD call "Companion". That CD has everything you need form the GNU world. Loads of GNU solaris packages. joe Emiliano Marmonti([EMAIL PROTECTED])@Thu, Mar 22, 2001 at 02:43:25PM -0600: > Thank you Sebastian, > but I want to know what is flex (and I don´t know where could I obtain it). > > Thanks again. > Emiliano. > > > > -- > 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] mail(), how can one specify ?
Greetings. If I would like to use mail(...), how could I make the "from" tag something else? I have not found any solution of specifying that! - Richard -- 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] .htaccess question
At 06:57 PM 3/22/01 +0100, Jimmy Bäckström wrote: >Yo! >I need to know how I create a login script that uses the htaccess file to >authenticate users. >Thankful for any answers! >/Broder B Set up your .htaccess file as usual, pointing to a userfile created with htpasswd. Place the .htaccess file in the directory with your PHP script(s), and users will be automatically prompted for username/password before being served any file in that directory (at least the first time during that session, anyway). Within your PHP script(s), you can determine the user by reading the REMOTE_USER http environment variable: $user = getenv("REMOTE_USER"); - Brian - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 <[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] ODBC only working for 82 rows
Nevermind. I got smart and used CREATE TABLE with a *really* long creation_definition specifying all fields. Works a millions times better/faster. -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 12:28 PM To: Brooks, Ken; [EMAIL PROTECTED] Subject: [PHP] ODBC only working for 82 rows I've kind of hit a wall. I am using the data in an oracle table to create a table in mysql that is equivalent. It only gets thru 82 sometimes 83 records. Doesn't error out or anything, only inserts (and reports back to the screen) 82. There are 134 fields in the table. When i just print out the fieldnames, etc, it prints all of them out. When I try to to alter(add) to the mysql table, it doesn't seem to make it all the way thru. Ideas? -ken Below is the major part of the sql operations. $si_oracle_cols = odbc_num_fields($si_oracle_result); PRINT "Colums: $si_oracle_cols"; /* Print these results to the screen in a nice format */ $i = 1; $result = 0; IF ($si_oracle_cols == 0) : PRINT "No Columns(Fields) returned"; ELSEIF ($si_oracle_cols > 0) : WHILE($i < $si_oracle_cols): $fieldname = odbc_field_name($si_oracle_result, $i); $fieldtype = odbc_field_type($si_oracle_result, $i); IF($fieldtype == "VARCHAR2"): $fieldtype = "VARCHAR"; ENDIF; IF($fieldtype == "NUMBER"): $fieldtype = "INT"; ENDIF; $fieldlen = odbc_field_len($si_oracle_result, $i); PRINT "ColNum: $i "; $mysql_create_si_query = "CREATE TABLE IF NOT EXISTS $si_mysql($fieldname $fieldtype($fieldlen))"; $result = MYSQL_QUERY($mysql_create_si_query); $mysql_alter_si_query = "alter table $si_mysql add($fieldname $fieldtype($fieldlen))"; $alter_result = MYSQL_QUERY($mysql_alter_si_query); $i++; ENDWHILE; PRINT "End of fields"; ENDIF; -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 10:16 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I got it. I had the table name listed as aradmin_eps_service_instructions when in fact it should have been aradmin.eps_service_instructions (with the dot). I did not know this because all of the tables I had seen linked to this before used _ ,but the actual name (which i normally don't have priveledge to even view) uses the . Whee! -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] Lets start at the basics. What is the easiest way to *make sure* that i am connecting to that oracle db? Anyway I can just list the tables, or something. odbc_tables or something like that?.. -ken -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:32 AM To: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I only mentioned the part about the access, just to prove that I know i have a select statement working with an ODBC source. I know that I am connecting to the Oracle database, because if i put in a bogus user/pass i get an error stating so, when I supply the correct credentials I get no errors. So that just leaves something to do with possibly the table names. The exact table name is: ARADMIN_EPS_SERVICE_INSTRUCTIONS by my count that is 32 characters. That could be a problem. Any way around that, or to alias a name to that? (Mind you, i don't have access to that database to change the table names). I can only query from it. The exact offending line number that is returned is 37. 36: $si_oracle_query = "SELECT * FROM ARADMIN_EPS_SERVICE_INSTRUCTIONS where ATMID = 'PN2000'"; 37: $si_oracle_result = odbc_exec($td_oracle, $si_oracle_query); -ken -Original Message- From: Greig, Euan [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 9:21 AM To: Brooks, Ken Cc: [EMAIL PROTECTED] Subject: [PHP] RE: Oracle ODBC sql [ORA-00972: identifier is too long] I haven't used Oracle with ODBC, but nothing leaps out at me from your code. Some comments/ideas: The full meaning of error 0972 is that the name of a schema object (table, view, username etc) is too long (longer than 30 characters, maybe more for Oracle 8). The query statement you are using looks OK. How about displaying $username and $password? And have you isolated which line is causing the error? The relevance of ' and " I suppose is this. By default Oracle is not case sensitive about the names of database objects, but it is if when you create them you enclose the name in double quotes. For instance if you simply say 'create table euan', then you will be able to access it with 'select * from euan', 'select * from EUAN', 'select * from Euan' et
[PHP] Problems uploading Files
Hello again ! , i have a script that uploads a file , when i use the function move_uploaded_file() an error raises ,"Permission denied ." ,but if i upload the same file thru an ftp client it works correctly ! Sebastián Renzi Consultoría & Desarrollo de Sistemas. CODES S.A -- 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 uploading Files
Hello Sebastian, What a timely posting! I am trying to figure out how to allow a user (using any internet-connected pc) to upload a file to my PHP-enabled server. I am trying to use PHP and the FTP functions, but can't figure out how to address the file on the user's machine. Any hints from anyone as to how to do this? Or am I on the wrong track, altogether? Someone else suggested that I use an HTML 'upload', but I can't find anything about this in my HTML documentation. Any help much appreciated!!! John > -Original Message- > From: Renzi, Sebastian [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 22, 2001 1:18 PM > To: PHP General List > Subject: [PHP] Problems uploading Files > > > Hello again ! , i have a script that uploads a file , when i use the > function move_uploaded_file() an error raises ,"Permission denied ." > ,but if i upload the same file thru an ftp client it works correctly ! > > > Sebastián Renzi > Consultoría & Desarrollo de Sistemas. > CODES S.A > > > -- > 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] Problems uploading Files
Renzi, Sebastian <[EMAIL PROTECTED]> wrote: > Hello again ! , i have a script that uploads a file , when i use the > function move_uploaded_file() an error raises ,"Permission denied ." > ,but if i upload the same file thru an ftp client it works correctly ! The user the webserver process runs under may not have the permission to upload the file. In many cases, the webserver runs as nobody. Thus, if you want to upload a file, nobody needs write-access to the directory into which the file should be uploaded. -- Kilian -- 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] Make Script login to password protected web sites
Hello, Can I put the user name and password at the top of my php script so it can loggin to a site that requires authentication? Can i put it anywhere in teh script to amek it do this? Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problems uploading Files
John Almberg <[EMAIL PROTECTED]> wrote: [...] > Someone else suggested > that I use an > HTML 'upload', but I can't find anything about this in my HTML > documentation. -- Kilian -- 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]