php-general Digest 10 Apr 2002 10:27:56 -0000 Issue 1278
Topics (messages 92311 through 92358): Re: Manipulate the address field in the browser? 92311 by: Dan Harrington 92313 by: Maxim Maletsky Re: AS/400 data access 92312 by: Dan Vande More 92316 by: Matt auth,perm,content management 92314 by: Dennis Gearon splitting array values into usable chunks.. 92315 by: phplists.woodenpickle.com 92317 by: phplists.woodenpickle.com shopping cart suggestions 92318 by: Eugene Lee 92319 by: phplists.woodenpickle.com Re: includes 92320 by: Tom Rogers 92343 by: Tom Rogers Re: Downloading files 92321 by: Jim Koutoumis 92340 by: Jason Wong Re: Php/Pdf application 92322 by: Justin French PHP 4.2.0 RC2 + Apache 2.0.35 .. DirectoryIndex problem 92323 by: Adam Plocher 92324 by: Rasmus Lerdorf 92328 by: Austin Gonyou PCRE - catching a caracter set in a negative class 92325 by: Maxim Maletsky 92332 by: CC Zona Dealing with Query String 92326 by: Vladislav Kulchitski 92330 by: Maxim Maletsky 92333 by: Vladislav Kulchitski 92335 by: Maxim Maletsky LOBS with CURSOR_SHARING=FORCE gives core dump on Oracle 8.1.7.2 92327 by: Prince Help, anyone else using GD2 & php 4.1.2 ? 92329 by: Mark W. Humphries 92336 by: Matt Parlane LOBS with CURSOR_SHARING=FORCE gives core dumpf 92331 by: Prince php 4.0.6 file upload security fix 92334 by: peter Empty HTML problem 92337 by: ayukawa 92358 by: K.Tomono Scoping functions in PHP 92338 by: Eric Starr how to send an email to everone listed in a file 92339 by: Police Trainee 92350 by: David Robley no mod_dbase on FreeBSD? 92341 by: Jeff D. Hamann Weird Session headers 92342 by: S.Murali Krishna Re: sablotron XMl XSLT 92344 by: Yasuo Ohgaki unserialize_callback_func 92345 by: Ian allowed tags reg exp 92346 by: Justin French chmod error? 92347 by: John Weez 92348 by: Henrik Hudson Re: file locks 92349 by: rarmin MySQL connection from non-localhost 92351 by: David Johansen 92352 by: David Robley Php + Mysql Hosting problem 92353 by: Simonk Re: XML HELP 92354 by: Michael Virnstein session variables and unset 92355 by: Valdas Andrulis Re: How creat image pointer from JPG/GIF string? 92356 by: M using php for keywords 92357 by: Marc 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] ----------------------------------------------------------------------
--- Begin Message ---Sounds to me like an Apache Alias Directive is what you need. can you get at your apache configuration? :-) http://httpd.apache.org/docs/mod/mod_alias.html > -----Original Message----- > From: Erik Price [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 09, 2002 4:22 PM > To: Kevin Stone > Cc: PHP-general > Subject: Re: [PHP] Manipulate the address field in the browser? > > > > On Tuesday, April 9, 2002, at 05:44 PM, Kevin Stone wrote: > > > Here's a crazy question. Say I have a script (such as a bulliten board > > script) that is run by many clients (other websites) off of one location > > on my web account. Think of it as a service of some kind. Is there > > anyway to trick the browser into displaying the client's domain rather > > than my own? I would want it to look as though you've never left their > > website when in fact you are now on mine. Possible? > > My domain name registrar uses a neat trick called "stealth forwarding". > It's probably explained in some tutorial on the web, so I won't > speculate on how it's done, but the principle is this -- > > You have a web page hosted at a certain ISP... where the domain name is > something like http://isp.com/~eprice/index.html > > But you just purchased a fancy domain name from an independent domain > name registrar (not thru your ISP) and you want to point the new domain > name to the old domain name. Unfortunately, the ISP didn't give you a > dedicated IP address and they won't give you a virtual host, so you have > no way to map your shiny new domain name to your web site. > > Stealth forwarding essentially makes the entire browser window into one > giant new frame. The contents of the frame are > http://isp.com/~eprice/index.html, but because the frameset is hosted by > the indie domain name registrar, and they have your shiny new domain > name mapped to a virtual host on their servers or something, it looks > like (judging from the URL bar) a user is browsing > http://shinynewdomainname.com, not http://isp.com/~eprice/index.html. > > The only problem is that (a) it relies on frames, so it might not work > for all browsers (and definitely won't work for scripts), and (b) the > URL never changes -- the domain name registrar is hosting the frameset, > not the site, so all the URL bar ever shows is the name of the master > frameset -- http://shinynewdomainname.com. > > My registrar is easyDNS, maybe they have information about how it's done > if you can't find it elsewhere but I'd be surprised if you couldn't. > > > Erik > > > > ---- > > Erik Price > Web Developer Temp > Media Lab, H.H. Brown > [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---I don't think this is his case. Say, some site on geocities wants to get on and manipulate his BB while showing it's own Geocities URL. What would it have to do with apache? It is rather like using frames. (or JavaScript of some kind) Maxim Maletsky > -----Original Message----- > From: Dan Harrington [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 12:25 AM > To: Erik Price > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Manipulate the address field in the browser? > > > Sounds to me like an Apache Alias Directive is what you need. > can you get at your apache configuration? :-) > > http://httpd.apache.org/docs/mod/mod_alias.html > > > > > -----Original Message----- > > From: Erik Price [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, April 09, 2002 4:22 PM > > To: Kevin Stone > > Cc: PHP-general > > Subject: Re: [PHP] Manipulate the address field in the browser? > > > > > > > > On Tuesday, April 9, 2002, at 05:44 PM, Kevin Stone wrote: > > > > > Here's a crazy question. Say I have a script (such as a bulliten board > > > script) that is run by many clients (other websites) off of one location > > > on my web account. Think of it as a service of some kind. Is there > > > anyway to trick the browser into displaying the client's domain rather > > > than my own? I would want it to look as though you've never left their > > > website when in fact you are now on mine. Possible? > > > > My domain name registrar uses a neat trick called "stealth forwarding". > > It's probably explained in some tutorial on the web, so I won't > > speculate on how it's done, but the principle is this -- > > > > You have a web page hosted at a certain ISP... where the domain name is > > something like http://isp.com/~eprice/index.html > > > > But you just purchased a fancy domain name from an independent domain > > name registrar (not thru your ISP) and you want to point the new domain > > name to the old domain name. Unfortunately, the ISP didn't give you a > > dedicated IP address and they won't give you a virtual host, so you have > > no way to map your shiny new domain name to your web site. > > > > Stealth forwarding essentially makes the entire browser window into one > > giant new frame. The contents of the frame are > > http://isp.com/~eprice/index.html, but because the frameset is hosted by > > the indie domain name registrar, and they have your shiny new domain > > name mapped to a virtual host on their servers or something, it looks > > like (judging from the URL bar) a user is browsing > > http://shinynewdomainname.com, not http://isp.com/~eprice/index.html. > > > > The only problem is that (a) it relies on frames, so it might not work > > for all browsers (and definitely won't work for scripts), and (b) the > > URL never changes -- the domain name registrar is hosting the frameset, > > not the site, so all the URL bar ever shows is the name of the master > > frameset -- http://shinynewdomainname.com. > > > > My registrar is easyDNS, maybe they have information about how it's done > > if you can't find it elsewhere but I'd be surprised if you couldn't. > > > > > > Erik > > > > > > > > ---- > > > > Erik Price > > Web Developer Temp > > Media Lab, H.H. Brown > > [EMAIL PROTECTED] > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Thanks Mr. Collins, I wish that would have been about 7 months ago when I did everything:) I used those three articles and a couple more to get it done, but the directions look great. -----Original Message----- From: Collins, Robert [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 3:24 PM To: 'Matt Schroebel'; Collins, Robert; 'Rance Hall'; [EMAIL PROTECTED] Subject: RE: [PHP] AS/400 data access Thanks. Unfortunately this project is on a windows based platform, but this may head me in the right direction. Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -----Original Message----- From: Matt Schroebel [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 2:46 PM To: 'Collins, Robert'; 'Rance Hall'; [EMAIL PROTECTED] Subject: RE: [PHP] AS/400 data access I just did this on a Linux box running Red Hat 7.2 last Friday. I used several sources on the web and wrote up my exact steps and posted them at http://www.php-faq.com/as400.html The other sources are quoted in that document. Keep in mind, it's not the final version of the document, and I'd appreciate any feedback. After I get my app running, I'm going to move it to a FreeBSD box and document that setup. I was close to getting it to work on FreeBSD last week, but decided to get it working with Redhat since that's what the original docs describe. I have written a couple of simple scripts that query the db on the AS/400 and display the results. The performance seems fine. I did find that I had to explictly state the library name the table is in as part of the sql. For instance: $sql = "select field1, field2 from library.table where key=$id"; If you create a collection with the same name as the user php is connecting with then you don't need to specify the library. I need to read up a lot because there is a way to set the path to multiple libraries such that I saw in one of the IBM SQL books which is $query = "SET path library1, library2"; But it wouldn't work for me. If either of you find the solution in the maze of IBM docs, let me know and I'll add it to the instructions. Also, you can't single quote numerics like you can in MySQL. As I said, I just got it working, and will update the document as I learn more about the pecularities of the AS/400. Oh, make sure to grab the replacement odbc_fetch_array code in the user notes at http://www.php.net/manual/en/function.odbc-fetch-array.php > -----Original Message----- > From: Collins, Robert [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 09, 2002 2:13 PM > To: 'Rance Hall'; [EMAIL PROTECTED] > Subject: RE: [PHP] AS/400 data access > > > I am also trying to access data on an AS/400 have you gotten > it to work, if > so can you send an example? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Then, why not install the IBM odbc driver that comes with Client Access for Windows and use it? ----- Original Message ----- From: "Collins, Robert" <[EMAIL PROTECTED]> To: "'Matt Schroebel'" <[EMAIL PROTECTED]>; "Collins, Robert" <[EMAIL PROTECTED]>; "'Rance Hall'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, April 09, 2002 5:23 PM Subject: RE: [PHP] AS/400 data access > Thanks. Unfortunately this project is on a windows based platform, but this > may head me in the right direction.--- End Message ---
--- Begin Message ---So where is the PHP world headed right now regarding: Database abstraction Authorization Permissions Content Management How is PHPLib doing versus PEAR? Are the database abstractions schemes, (metabase), etc, still duking it out? I'm about to start a site that needs all these, one at a time, in the order above, so I wonder what I should use? -- If You want to buy computer parts, see the reviews at: http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!! http://sysopt.earthweb.com/userreviews/products/--- End Message ---
--- Begin Message ---I have got this almost all the way where I need it.. Partly from the php.net function list and partly from searching the archives here.. Now I'm at a point where I don't quite know how to finish it.. Any help would be greatly appreciated. I use functions to gather the subdirectory names in the cwd using getCwd() and put them into an array. They are in the form of /home/httpd/html/phptemp/dirname and I am able to use the following to print them to the page: for( $x = 0; $x < sizeof( $resultArray ); $x++ ) { echo( "<a href=\"$resultArray[$x]\">$resultArray[$x]</a><br>\n" ); } What I would like to figure out is how to split or explode the values in the array with the "/" char just before the echo so I end up with separate vars for home, httpd, html, phptemp, dirname. So I could then just print out the value of dirname as the link (see above). I've been trying to learn this PHP stuff for a couple weeks now and it's coming along nicely.. And I appreciate all the help I've found in the posts to the group here.. Thanks in advance for any help.. Later, Bob -- Bob Weaver, Manager Custom PC & Web Design, LC http://www.custompcweb.com 801-400-1320--- End Message ---
--- Begin Message ---Nevermind.. I wasn't being very smart.. I got it.. Thanks, Bob <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have got this almost all the way where I need it.. Partly from the php.net > function list and partly from searching the archives here.. Now I'm at a > point where I don't quite know how to finish it.. Any help would be greatly > appreciated. > > I use functions to gather the subdirectory names in the cwd using getCwd() > and put them into an array. They are in the form of > /home/httpd/html/phptemp/dirname and I am able to use the following to print > them to the page: > > for( $x = 0; $x < sizeof( $resultArray ); $x++ ) { > echo( "<a href=\"$resultArray[$x]\">$resultArray[$x]</a><br>\n" ); > } > > What I would like to figure out is how to split or explode the values in the > array with the "/" char just before the echo so I end up with separate vars > for home, httpd, html, phptemp, dirname. So I could then just print out the > value of dirname as the link (see above). > > I've been trying to learn this PHP stuff for a couple weeks now and it's > coming along nicely.. And I appreciate all the help I've found in the posts > to the group here.. Thanks in advance for any help.. > > Later, > Bob > > -- > Bob Weaver, Manager > Custom PC & Web Design, LC > http://www.custompcweb.com > 801-400-1320 > >--- End Message ---
--- Begin Message ---Apologies if this is an oft-repeated question, but could anyone recommend a PHP/MySQL shopping cart (free or commercial) that works pretty well, decently customizable, and doesn't depend on additions beyond the standard PHP distribution (e.g. PHPlib). The PHP Knowledge Base <http://php.faqts.com/> lists only 2: FishCart <http://www.fishcart.org/> FreeTrade <http://www.working-dogs.com/freetrade/> (dead link) freshmeat <http://freshmeat.net/> lists 16 (looks like FreeTrade moved here). HotScripts.com <http://hotscripts.com/> lists 48, but not all of the scripts are rated. Any suggestions or comments are welcome. Much thanks in advance! -- Eugene Lee [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Check out the cart at survivalherbs.com.. It's all just php... It uses a template for the page look (which hasn't been edited on that site yet). "Eugene Lee" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Apologies if this is an oft-repeated question, but could anyone > recommend a PHP/MySQL shopping cart (free or commercial) that works > pretty well, decently customizable, and doesn't depend on additions > beyond the standard PHP distribution (e.g. PHPlib). > > The PHP Knowledge Base <http://php.faqts.com/> lists only 2: > > FishCart <http://www.fishcart.org/> > FreeTrade <http://www.working-dogs.com/freetrade/> (dead link) > > freshmeat <http://freshmeat.net/> lists 16 (looks like FreeTrade moved here). > > HotScripts.com <http://hotscripts.com/> lists 48, but not all of the > scripts are rated. > > Any suggestions or comments are welcome. Much thanks in advance! > > > -- > Eugene Lee > [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Hi You can do something like this: ini_set ("include_path",ini_get("include_path").":second_include_path"); Tom At 07:05 AM 10/04/2002, Robert Abbate wrote: >I have a directory with php files that I incorporate into my website as >libraries via a php_include() call, I would like the path to include my >library directory so I can include the library files from any directory. >There is no way to overload php's include path on a user by user basis? > > >Thanks > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Hi That goes into each php page. It gets the standard phpinclude directory then appends your local one using ":" as the seperator. It does not affect any other php pages only the one it is used in. Tom Where do you place that function call? In the script you're running, or in the php.ini file? Thanks!--- End Message ---
--- Begin Message ---Using this method,.. works OK if you choose to save the file, however if you choose to open the file you get a weird behaviour where IE says it can't find the file and a subsequent prompt to create a new one. Does anyone know why it does this and how to overcome it ? At this stage I've resorted to using some simple javascript to prevent a user clicking on a file and advising them to use right-click save-as until I come up with a more reliable method. "Scott Houseman" <[EMAIL PROTECTED]> wrote in message 003e01c1dfdf$7b3a6490$0b01a8c0@scotth">news:003e01c1dfdf$7b3a6490$0b01a8c0@scotth... > Try this: > > <?php > // Open the file to send. > $sFilePath = "/home/scott/public_html/TEST.doc"; > $iFilePointer = fopen( $sFilePath, "r" ); > // Get file content. > $sContents = fread( $iFilePointer, filesize( $sFilePath ) ); > // Close the file. > fclose( $iFilePointer ); > // Send HTTP headers. > header( "Expires: 0" ); > header( "Cache-Control: no-cache" ); > header( "Content-Type: application/save-as" ); > header( "Content-Disposition: attachment; filename=".basename( > $sFilePath ).";"); > header( "Content-Length: ".filesize( $sFilePath ) ); > // Feed file to client. > echo $sContents; > ?> > > As you give the client Content-Type: application/save-as - it will not know > what mime type the file is, > and the browser will give the user a save-as prompt. > This works in explorer - I haven't checked it in Mozilla etc - so you might > have to tweak it a bit. > > Cheers > > Scott > ----- Original Message ----- > From: "Declan Kenny" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April 09, 2002 1:20 PM > Subject: [PHP] Downloading files > > > > Hi folks, > > > > Ok I am trying to make a download area for files (including word files). > > How do I force a download of a word document rather than have it opening > in > > IE? > > > > Declan > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > >--- End Message ---
--- Begin Message ---On Wednesday 10 April 2002 08:54, Jim Koutoumis wrote: > Using this method,.. works OK if you choose to save the file, however if > you choose to open the file you get a weird behaviour where IE says it > can't find the file and a subsequent prompt to create a new one. Does > anyone know why it does this and how to overcome it ? > > At this stage I've resorted to using some simple javascript to prevent a > user clicking on a file and advising them to use right-click save-as until > I come up with a more reliable method. Try removing the "Expires" & "Cache-Control" headers. I doubt you'll be able to find a reliable way that works under all flavours of IE. Some versions of IE tries to open file regardless of what you tell it to do. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* While most peoples' opinions change, the conviction of their correctness never does. */--- End Message ---
--- Begin Message ---I don't believe you can do "1", and i'm not clear on what you're asking in "2". I've found Adobe's security stuff to be perfectly adequate. It gives you the options on what to allow them to do -- separate passwords can be assigned for viewing and modifying the file, and you can prevent any/all of the following: Printing the file Changing the file Selecting Text and Graphics Adding Notes and Form Fields I have never seen any issues on the web regarding this being insecure, and use it frequently. I have also tried to open/modify protected files in Illustrator and other PDF-native programs, without any luck. Why re-invent the wheel? Justin French -------------------- Creative Director http://Indent.com.au -------------------- on 10/04/02 2:36 AM, Geoff Hankerson ([EMAIL PROTECTED]) wrote: > I am wondering if one or more of you can point me in the right direction on > this one. > Our company has intellectual property (legal forms) that is in the form of > a pdf. We want to sell this over the Web but a regular pdf is not secure and > it would allow users to make unlimited copies and have unlimited use. I know > Adobe gives you the ability to assign a password to a PDF so it cannot be > altered but I don't think this will suffice. We need to either: > 1. Let the user print the PDF from the browser without displaying it to the > screen (not sure this is feasible) > or > 2. Do a server side "mail-merge" without using Acrobat form fields. > > Just looking for a pointer in the right direction. Thanks in advance for any > and all help >--- End Message ---
--- Begin Message ---So I just got PHP 4.2.0 RC2 and Apache 2.0.35 almost completely working. The only problem I am having now, is Apache's DirectoryIndex option. Whenever I add index.php to that (like I would do in Apache 1.3), I get a 403 error every time I visit my site. When I look in my errorlog I see this: [Sun Apr 07 00:51:34 2002] [error] [client xxx.xxx.xxx.xxx] Directory index forbidden by rule: /home/apache2/htdocs/site1/index.php AFAIK this should work, I've set this up a billion times in Apache 1.3. Here is my DirectoryIndex line: DirectoryIndex index.php index.phtml index.html index.html.var I realize this isn't really a programming question, so it may be a little off-topic, but if anybody could help me, I'm sure you guys could. Thanks a lot. -Adam--- End Message ---
--- Begin Message ---Sounds like an Apache bug to me. On Tue, 9 Apr 2002, Adam Plocher wrote: > So I just got PHP 4.2.0 RC2 and Apache 2.0.35 almost completely working. > The only problem I am having now, is Apache's DirectoryIndex option. > Whenever I add index.php to that (like I would do in Apache 1.3), I get a > 403 error every time I visit my site. When I look in my errorlog I see > this: > > [Sun Apr 07 00:51:34 2002] [error] [client xxx.xxx.xxx.xxx] Directory index > forbidden by rule: /home/apache2/htdocs/site1/index.php > > AFAIK this should work, I've set this up a billion times in Apache 1.3. > Here is my DirectoryIndex line: > > DirectoryIndex index.php index.phtml index.html index.html.var > > I realize this isn't really a programming question, so it may be a little > off-topic, but if anybody could help me, I'm sure you guys could. > Thanks a lot. > > -Adam >--- End Message ---
--- Begin Message ---do you have the SetInputFilter and SetOutputFilter lines set? On Tue, 2002-04-09 at 15:56, Adam Plocher wrote: > So I just got PHP 4.2.0 RC2 and Apache 2.0.35 almost completely working. > The only problem I am having now, is Apache's DirectoryIndex option. > Whenever I add index.php to that (like I would do in Apache 1.3), I get > a > 403 error every time I visit my site. When I look in my errorlog I see > this: > > [Sun Apr 07 00:51:34 2002] [error] [client xxx.xxx.xxx.xxx] Directory > index > forbidden by rule: /home/apache2/htdocs/site1/index.php > > AFAIK this should work, I've set this up a billion times in Apache 1.3. > Here is my DirectoryIndex line: > > DirectoryIndex index.php index.phtml index.html index.html.var > > I realize this isn't really a programming question, so it may be a > little > off-topic, but if anybody could help me, I'm sure you guys could. > Thanks a lot. > > -Adam -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-698-7250 email: [EMAIL PROTECTED] "It is the part of a good shepherd to shear his flock, not to skin it." Latin Proverb--- End Message ---
signature.asc
Description: This is a digitally signed message part
--- Begin Message ---Hi all, I was scratching my head to accomplish the following perl regular expression. It doesn't want to catch me [^\{php}]. From what I understood reading the docs this is because in a negative class the caracters are being taken litteraly one by one and not as a set. I tied to enclose them by () by that didn't work eigher. What is the work around for this? here's a sample code: $text = ' some text ... {php} echo "some funcy code to include he{re"; {/php} more text.... '; $out = preg_split("/(\{php}[^\{php}]*\{\/php})/i", $text, -1, PREG_SPLIT_DELIM_CAPTURE); Thanks, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) www.PHPBeginner.com [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Maxim Maletsky) wrote: > I was scratching my head to accomplish the following perl regular > expression. It doesn't want to catch me [^\{php}]. From what I understood > reading the docs this is because in a negative class the caracters are being > taken litteraly one by one and not as a set. I tied to enclose them by () by > that didn't work eigher. What is the work around for this? The section of the PCRE Syntax page that you want is the part dealing with "lookaheads" and "lookbehinds". -- CC--- End Message ---
--- Begin Message ---Hi, I need some help with query string. Basically what I am doing is I am sorting my table, much like you sort columns in OUTLOOK EXPRESS for instance with a little arrow... http://www.kulchitski.com/btl/btl.php?lang=eng&page=talkroom_show&sort=s ex So all I need a function that will grab this query and will change sort= and another new variable (desc/asc) and will return the same string but with new values for certain variables... I ran across some function like this before when Ididn't need it, but just now when I need it badly - can't seem to be able to find it. Hope someone out there can help. Thank you much. Vlad--- End Message ---
--- Begin Message ---In your PHP: On every click collect two variables: $by and $order then, call for this query: Select field from table where this=that order by $by $order; Make sure both variables have their default values in case there was nothing selected. You don't really need a function for this, just a few variables preset before calling mySQL. Do pobachennya, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com > -----Original Message----- > From: Vladislav Kulchitski [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 3:49 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Dealing with Query String > > > Hi, > > I need some help with query string. Basically what I am doing is I am > sorting my table, much like you sort columns in OUTLOOK EXPRESS for > instance with a little arrow... > > http://www.kulchitski.com/btl/btl.php?lang=eng&page=talkroom_show&sort=s > ex > > So all I need a function that will grab this query and will change sort= > and another new variable (desc/asc) and will return the same string but > with new values for certain variables... I ran across some function like > this before when Ididn't need it, but just now when I need it badly - > can't seem to be able to find it. Hope someone out there can help. > > Thank you much. > Vlad > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Privit Maxim, I understand your approach... i.e. I can hardcode it in the links, but what if I will add more variables in a query string... note in the query string there are variables that are not really related to the operation with the table, rather language ($lang=), page ($page=)... for now I guess I will wind up doing it HARD-CODEed way... Thanks, Vlad p.s. if anyone knows how to solve my problems, let me know... I think the function that would be suitable is parse_str().... less suitable but still doable would be explode()... p.p.s. for MAXIM: I am doing it with languages switching as you can see on the top of the template.. I am using explode() -----Original Message----- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 10:04 PM To: Vladislav Kulchitski; [EMAIL PROTECTED] Subject: RE: [PHP] Dealing with Query String In your PHP: On every click collect two variables: $by and $order then, call for this query: Select field from table where this=that order by $by $order; Make sure both variables have their default values in case there was nothing selected. You don't really need a function for this, just a few variables preset before calling mySQL. Do pobachennya, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com > -----Original Message----- > From: Vladislav Kulchitski [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 3:49 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Dealing with Query String > > > Hi, > > I need some help with query string. Basically what I am doing is I am > sorting my table, much like you sort columns in OUTLOOK EXPRESS for > instance with a little arrow... > > http://www.kulchitski.com/btl/btl.php?lang=eng&page=talkroom_show&sort=s > ex > > So all I need a function that will grab this query and will change sort= > and another new variable (desc/asc) and will return the same string but > with new values for certain variables... I ran across some function like > this before when Ididn't need it, but just now when I need it badly - > can't seem to be able to find it. Hope someone out there can help. > > Thank you much. > Vlad > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php--- End Message ---
--- Begin Message ---Once your query (whatever it is) was composed, append this: " order by $by $order"; so, in this example it could be looking to you something like this: $query = 'bla bla language and page'; if(!$by) { $by = 'name_field'; if(!$order) $order = 'desc'; } $query .= " $by $order"; and that is your function. It will look for $by and $order variables passed to it via GET and will add it to your query. If not passed any it will use the default ones. Just add these values to your links and that is it. Obviously, the security there is up to you. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com > -----Original Message----- > From: Vladislav Kulchitski [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 4:09 AM > To: Maxim Maletsky > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Dealing with Query String > > Privit Maxim, > > I understand your approach... i.e. I can hardcode it in the links, but > what if I will add more variables in a query string... note in the query > string there are variables that are not really related to the operation > with the table, rather language ($lang=), page ($page=)... for now I > guess I will wind up doing it HARD-CODEed way... > > Thanks, > Vlad > p.s. if anyone knows how to solve my problems, let me know... I think > the function that would be suitable is parse_str().... less suitable but > still doable would be explode()... > p.p.s. for MAXIM: I am doing it with languages switching as you can see > on the top of the template.. I am using explode() > > -----Original Message----- > From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 09, 2002 10:04 PM > To: Vladislav Kulchitski; [EMAIL PROTECTED] > Subject: RE: [PHP] Dealing with Query String > > > > In your PHP: > > On every click collect two variables: > > $by and $order > > then, call for this query: > > Select field from table where this=that order by $by $order; > > > Make sure both variables have their default values in case there was > nothing selected. > You don't really need a function for this, just a few variables preset > before calling mySQL. > > > > Do pobachennya, > > Maxim Maletsky > Founder, Chief Developer > > PHPBeginner.com (Where PHP Begins) > [EMAIL PROTECTED] > www.phpbeginner.com > > > > > -----Original Message----- > > From: Vladislav Kulchitski [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, April 10, 2002 3:49 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Dealing with Query String > > > > > > Hi, > > > > I need some help with query string. Basically what I am doing is I am > > sorting my table, much like you sort columns in OUTLOOK EXPRESS for > > instance with a little arrow... > > > > > http://www.kulchitski.com/btl/btl.php?lang=eng&page=talkroom_show&sort=s > > ex > > > > So all I need a function that will grab this query and will change > sort= > > and another new variable (desc/asc) and will return the same string > but > > with new values for certain variables... I ran across some function > like > > this before when Ididn't need it, but just now when I need it badly - > > can't seem to be able to find it. Hope someone out there can help. > > > > Thank you much. > > Vlad > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---I have the following php code. If I add the parameter CURSOR_SHARING=FORCE in my init.ora and while executing the program I get the "Segmentation fault". $ /usr/local/php4/bin/php -q curshare.php Segmentation fault (core dumped) Is there any work-around for this? Is this a bug? This seems to be happening only when LOB with returning clause is present. I tested a similar program from "C" program and is fine. Note: currently I have set the parameter (CURSOR_SHARING=FORCE ) only in the program/session level. Thanks, Prince. $ cat curshare.php #!/usr/local/php4/bin/php -q <? //program name curshare.php $conn = OCILogon($dbuser, $dbpass, $dbname); //This is added to affect only the current session. $sql = "alter session set cursor_sharing=force"; $stmt = ociparse($conn,$sql); OCIExecute($stmt,OCI_DEFAULT); $lob = OCINewDescriptor($conn, OCI_D_LOB); $sqlstmt = "insert into blob_test ( packageid, packagebody ) values('12344321123efd', EMPTY_BLOB()) returning packagebody into :packagebody"; $stmt = OCIParse($conn, $sqlstmt) ; OCIBindByName($stmt, ':packagebody', &$lob, -1, OCI_B_BLOB); OCIExecute($stmt, OCI_DEFAULT); OCICommit($conn); OCIFreeDesc($lob); OCIFreeStatement($stmt); OCILogoff($conn); ?>--- End Message ---
--- Begin Message ---Any help with this problem would be greatly appreciated. I'm running PHP 4.1.2 on Win 2000 and Apache. The following snippet runs perfectly when I use php_gd.dll but generates a garbled warning message when I switch the extension to php_gd2.dll. The only change I make to my setup is the corresponging extension directive in the php.ini file. I get the following error message, similar ones appear for any of the trutype related functions I call in the rest of my code. "Warning: @Ép in c:\program files\apache group\apache\htdocs\test.php on line 10" (line 10 being the imageTTFText call in the following code: $image = imagecreate(500, 500); define( 'BEIGE', imagecolorallocate($image, 245, 245, 220) ); # Background color define( 'BLACK', imagecolorallocate($image, 0, 0, 0) ); imageTTFText($image, 32, 0, 100, 100, BLACK, 'c:/WINNT/Fonts/times.ttf','HELLO'); header('Content-type: image/png'); imagepng($image); Cheers, Mark--- End Message ---
--- Begin Message ---http://bugs.php.net/bug.php?id=15568 This bug has been fixed in the latest RC - if you really need this functionality, you could use RC2 available at www.php.net/~derick or wait until 4.2.0 is realeased which is due to be on the 22nd of this month. Matt "Mark W. Humphries" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Any help with this problem would be greatly appreciated. > > I'm running PHP 4.1.2 on Win 2000 and Apache. > > The following snippet runs perfectly when I use php_gd.dll but generates a > garbled warning message when I switch the extension to php_gd2.dll. The only > change I make to my setup is the corresponging extension directive in the > php.ini file. > I get the following error message, similar ones appear for any of the > trutype related functions I call in the rest of my code. > > "Warning: @Ép in c:\program files\apache group\apache\htdocs\test.php on > line 10" > (line 10 being the imageTTFText call in the following code: > > $image = imagecreate(500, 500); > > define( 'BEIGE', imagecolorallocate($image, 245, 245, 220) ); # Background > color > define( 'BLACK', imagecolorallocate($image, 0, 0, 0) ); > > imageTTFText($image, 32, 0, 100, 100, BLACK, > 'c:/WINNT/Fonts/times.ttf','HELLO'); > > header('Content-type: image/png'); > imagepng($image); > > Cheers, > Mark >--- End Message ---
--- Begin Message ---I have the following php code. If I add the parameter CURSOR_SHARING=FORCE in my init.ora and while executing the program I get the "Segmentation fault". /usr/local/php4/bin/php -q curshare.php Segmentation fault (core dumped) Is there any work-around for this? Is this a bug? This seems to be happening only when LOB with returning clause is present. I tested a similar program from "C" program and is fine. Note: currently I have set the parameter (CURSOR_SHARING=FORCE ) only in the program/session level. Thanks, Prince. $cat curshare.php #!/usr/local/php4/bin/php -q <? //program name curshare.php $conn = OCILogon($dbuser, $dbpass, $dbname); //This is added to affect only the current session. $sql = "alter session set cursor_sharing=force"; $stmt = ociparse($conn,$sql); OCIExecute($stmt,OCI_DEFAULT); $lob = OCINewDescriptor($conn, OCI_D_LOB); $sqlstmt = "insert into blob_test ( packageid, packagebody ) values('12344321123efd', EMPTY_BLOB()) returning packagebody into :packagebody"; $stmt = OCIParse($conn, $sqlstmt) ; OCIBindByName($stmt, ':packagebody', &$lob, -1, OCI_B_BLOB); OCIExecute($stmt, OCI_DEFAULT); OCICommit($conn); OCIFreeDesc($lob); OCIFreeStatement($stmt); OCILogoff($conn); ?>--- End Message ---
--- Begin Message ---I have been running a php script via a web interface that included mkdir() with a chmod to 775 and a subsequent file upload via a form to the newly created directory. It had been running fine without problems for over a year. Now, although I can mkdir(), the chmod defaults to 755 and the I receive the error message "unable to open for reading. file does not exist". I suspect it has something to do with the recently released file upload security fix that my ISP has installed. Does anyone know if this is indeed the root of the problem and can you offer a solution? thanks peter ps Server is running Free BSD, PHP 4.0.6 ----- End Message ---
--- Begin Message ---Hello, I have a big problem around login script. I made an authentication site with PHP using PHP session. I use my own session handler that store session data into MySQL DB. It worked well on Win2000+Apache. But the problem occured when I put the scripts on TurboLinuxServer7+ Apache. login authentication script output nothing but -------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=shift_jis"></ HEAD> <BODY></BODY></HTML> -------------------------------------------------- It is almost empty HTML I have never expected!! Does anyone know about this kind of matter? Please HELP ME!!! I made php.ini as same as one of Windows. Regards, Hiroshi Ayukawa http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php--- End Message ---
--- Begin Message ---Hello. Would you try to confirm your server's native response as below? telnet your.server 80 GET /your/authentication_code.php HTTP/1.0 Authorization: Basic base64encoded_ID/PW -- (request header ends with \n * 2) > -------------------------------------------------- > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; > charset=shift_jis"></ > HEAD> > <BODY></BODY></HTML> > -------------------------------------------------- Do you use I.E? The above HTML may be the auto made by IE... I think I saw the same above when the server's respons is nothing... ,unless this is your own writing. :) and it seems that Apache's behavior rather differs between on Windows and Unix(Linux) HYH ---------------- K.Tomono > -----Original Message----- > From: ayukawa [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 10, 2002 12:17 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Empty HTML problem > > > Hello, > I have a big problem around login script. > > I made an authentication site with PHP using PHP session. > I use my own session handler that store session data into MySQL DB. > > It worked well on Win2000+Apache. > But the problem occured when I put the scripts on TurboLinuxServer7+ > Apache. > > login authentication script output nothing but > -------------------------------------------------- > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; > charset=shift_jis"></ > HEAD> > <BODY></BODY></HTML> > -------------------------------------------------- > > It is almost empty HTML I have never expected!! > > Does anyone know about this kind of matter? > Please HELP ME!!! > > I made php.ini as same as one of Windows. > > Regards, > Hiroshi Ayukawa > http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---I am a Java programmer learning PHP. In Java you can have a class that contains public and private functions. Only the public functions are accessible outside of the class. Does PHP have a way to hide functions within a class (i.e. make the private)? My concern is that there are some functions that you don't want anyone being able to call...only local functions within the same class should be able to call it. I'll give an example below: <?php // myClass.php3 class myClass { function f1 // I want this one to be public { f2(); } function f2 // I want this one to be private {} } ?> <?php include 'myClass.php3'; $p = new myClass(); $p->f1(); // I want this to be a valid function call $p->f2(); // I want this to be an invalid function call ?> Any help would be greatly appreciated. Eric Starr--- End Message ---
--- Begin Message ---Hi all. I really wish I could contribute here and help people out too but i don't know a fraction of the stuff that you gurus do. I try not to bug you all with too many questions and try to figure it out/learn on my own as much as possible. I am trying to figure out how i could send an email to everyone listed in a file. the file contains a name followed by a space followed by their email followed by a carriage return. the number of entries in the file changes. i would like to send the newletter to everyone in the file and have their name put in the email as well. (since i don't endorse spam I assure you this isn't for such purpose). >From what i'm able to figure out on my own, I think i'm going to need something that reads the file into some array which separates each entry based on the \n and the space and some sort of loop (for, while, etc). I have no idea how complex of a task this is but i would appreciate any help or ideas! thanks! (note: i'm on php4.0.4pl1) -mark __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/--- End Message ---
--- Begin Message ---In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi all. I really wish I could contribute here and help > people out too but i don't know a fraction of the > stuff that you gurus do. > I try not to bug you all with too many questions and > try to figure it out/learn on my own as much as > possible. > > I am trying to figure out how i could send an email to > everyone listed in a file. the file contains a name > followed by a space followed by their email followed > by a carriage return. the number of entries in the > file changes. i would like to send the newletter to > everyone in the file and have their name put in the > email as well. (since i don't endorse spam I assure > you this isn't for such purpose). > > From what i'm able to figure out on my own, I think > i'm going to need something that reads the file into > some array which separates each entry based on the \n > and the space and some sort of loop (for, while, etc). > I have no idea how complex of a task this is but i > would appreciate any help or ideas! thanks! (note: i'm > on php4.0.4pl1) > file() will read the file into an array; you could then use explode() on each element of the array to extract the email address, and mail() to send the message. -- David Robley Temporary Kiwi! Quod subigo farinam--- End Message ---
--- Begin Message ---PHP Group: I'm having a devil of a time adding additional modules to php using the ports method. Since I'm a little new to FreeBSD, I thought thew ports method would be the easiest. I attempt to do a Make install (cleanly) and get the box that comes up asking which modules to install, I select the Dbase on (as well as the others MySQL, etc) and it seems to only add the follwing modules: openssl, mysql, gd, zlib, apache, pcre, posix, sockets, session, but no dbase! Is there something I'm missing. I'm sure there is. This is the mod_php4 (4.0.6) on FreeBSD 4.4. Is there a way for me to get the latest and greatest (using the ports?) Thanks, Jeff. -- Jeff D. Hamann Hamann, Donald & Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 [EMAIL PROTECTED] www.hamanndonald.com--- End Message ---
--- Begin Message ---Hi! In short the problem Iam facing is this. When I send a excel file to IE browser using php, Iam using the following header info. header ( "Content-Type: application/x-msexcel" ); Its all ok. but when I send this header along with SESSION HANDLING HEADERS, IE was unable download the file and saying "unable to locate the file" Is anything to be done on php side. ? Any Help would be appreciated. <[EMAIL PROTECTED]> ------------------------------------------------------------------- We must use time wisely and forever realize that the time is always ripe to do right." -- Nelson Mandela ---------------------------------------------------------------------- End Message ---
--- Begin Message ---Matthew Luchak wrote: > Thanks Ray .... but what I need to know is if there is indeed a better way than what >I've tried to test if sablotron has been complied or not. http://www.php.net/manual/en/function.get-loaded-extensions.php http://www.php.net/manual/en/function.get-extension-funcs.php You are probably looking for these. -- Yasuo Ohgaki--- End Message ---
--- Begin Message ---i am using the following to try to pull in php classes from separate files based on their names using unserialize_callback_func. I cant seem to get it to work with 4.1.6 on redhat (should work). I notice that it isnt shown under variables available for unset() but it is shown for unserialize() from which Ive adapted the following script: ini_set('unserialize_callback_func','thecallback'); function thecallback($classname) { echo "calling back"; $filename="includez/".$classname.".cls.php"; include($filename); } I would think i'd atleast get an acknowledgement that the function indeed fired. Has this not yet been implemented?--- End Message ---
--- Begin Message ---Hi all, Further to a discussion we had yesterday about the danger of onLoad, onMouseOver, etc etc of allowed tags when using strip_tags(), I've decided to look at the issue from another angle. For the limited set of tags I usually allow on user input, <B><I><U>, I'm going take the approach of deleting anything I don't specifically TRUST, rather than deleting things I don't trust. For such simple tags, It seems to me to be a smarter move to delete anything in the tag apart from the actual tag. <B"anything else"> becomes <B> This eliminates the danger of people putting anything evil like onmouseover="javascript:self.close();" into my small set of allowed tags. So, I'd like a regexp which looks for multiple occurences of a tag (let's take <B> for an example), and throw out anything not needed. In English, I guess it looks like: look for a "<" followed by a "b" (case insensitive), then throw away anything up to the first ">" we find. Better still would be a regexp or function that checks for b|i|u, or a passed set of tags. I'm aware that this type of hard-line approach will prevent <B id="foo">, and I will also have problems on things like <FONT face="something"> and <A HREF="foo.php">, but I plan to devise some psuedo tags for links, and don't require font tags, image tags, etc etc. Many thanks in advance, Justin French--- End Message ---
--- Begin Message ---Hi all...I want to change the ownership of a file that is created via php..so i uses chmod command in my php script.. Upon execution of the script i get an error saying command not permitted with a line number pointing to my chmod command. I'm running apache as user nobody for security reasons. any hints as to how i can get chmod to work would be great... John--- End Message ---
--- Begin Message ---Hello. First off, to change ownership you want "chown", not "chmod". Also, chown isn't always permitted depending on the cicrumstances of who owns the directory or the specific file to begin with. If you're web server is running as nobody it will only be able to create files in a directory owned by nobody (or world writable...but that's stupid) or modify a file that already exists and owned by nobody. If I may ask, what are you trying to change the ownership for / to? Henrik On Wednesday 10 April 2002 02:06, John Weez wrote: > Hi all...I want to change the ownership of a file that is created via > php..so i uses chmod command in my php script.. Upon execution of the > script i get an error saying command not permitted with a line number > pointing to my chmod command. > > I'm running apache as user nobody for security reasons. > > any hints as to how i can get chmod to work would be great... > > John -- ---------------------- Henrik Hudson [EMAIL PROTECTED]--- End Message ---
--- Begin Message ---Liam Gibbs wrote: > <<Is there a way for a script to tell if the file it's > trying to access is locked by other script (via > flock()) or not. I need to make script wait untill > other script running in a parallel thread releases the > lock on the file.>> > > Without testing, would this work? Just a suggestion > (read: shot in the dark) that may work. > > while(!$filehandle) { > $filehandle = @fopen("file_in_question", > "r/w/whatever"); > } > > > <<Tnx in advance.>> > > You're welcome in advance. :) > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Tax Center - online filing with TurboTax > http://taxes.yahoo.com/ How is it possible that the file locked with exclusive lock can be opened by another call to fopen in the same script? Am i getting it all wrong, or the second call to fopen in the next code should fail? $fp=fopen("somefile", "w"); flock($fp, LOCK_EX); $fp1=fopen("somefile", "w"); I'm using php 4.1.2 windows version on apache 1.2.23. Armin--- End Message ---
--- Begin Message ---I was just wondering if there was a way to connect to a MySQL server on a server other than the one that your php script is on. I tried just putting in the URL of the site in place of localhost but that didn't work. Is there anything special that I have to do to get it to work? Thanks, Dave--- End Message ---
--- Begin Message ---In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I was just wondering if there was a way to connect to a MySQL server on a > server other than the one that your php script is on. I tried just putting > in the URL of the site in place of localhost but that didn't work. Is there > anything special that I have to do to get it to work? Thanks, > Dave Are the grants of the remote host set to accept anything other than localhost? -- David Robley Temporary Kiwi! Quod subigo farinam--- End Message ---
--- Begin Message ---I have made a web site containing Php and Mysql script And I have applied for a free web hosting account in www.spaceports.com there are two folder i can use: Public_html Cgi-bin which one i should put mysql files in? and what user name and password should i use for connecting mysql server? the current setting is mysql_connect ("localhost", "Administrator"); thank you! and which free hosting is recommanded for php + mysql? I can only found this spaceports free! Thank you very much! __________________________________________________________________ ¦èªù³½ SeeMon Simonk ICQ#: 25943733 Current ICQ status: + More ways to contact me i See more about me: __________________________________________________________________--- End Message ---
--- Begin Message ---Why don't you use this class...it's really good! http://sourceforge.net/projects/phpxpath/ "Analysis & Solutions" <[EMAIL PROTECTED]> schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hey Christopher: > > On Mon, Apr 08, 2002 at 09:14:08PM -0400, Christopher J. Crane wrote: > > ok I tried this at your suggestion.... > > Not exactly. As mentioned, you've got all sorts of unneded stuff going > on. To make sure you're on the right track, start with a new script > with just the basics: > > > <?php > > $Symbols[] = 'ek'; > $Symbols[] = 'et'; > > $URI = 'http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol='; > > > function StartHandler($Parser, $ElementName, $Attr='') { > } > > function CharacterHandler($Parser, $Line) { > } > > function EndHandler($Parser, $ElementName, $Attr='') { > } > > > while ( list(,$Sym) = each($Symbols) ) { > $Contents = implode( '', file("$URI$Sym") ); > > $Parser = xml_parser_create('ISO-8859-1'); > xml_set_element_handler($Parser, 'StartHandler', 'EndHandler'); > xml_set_character_data_handler($Parser, 'CharacterHandler'); > > if ( xml_parse($Parser, $Contents) ) { > echo 'YES!'; > } else { > echo 'NO!'; > } > > xml_parser_free($Parser); > > } > > ?> > > > Now, if that works, start flushing out the element/character handlers. > Do it little by little to make sure each of your steps are correct. > > Enjoy, > > --Dan > > -- > PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409--- End Message ---
--- Begin Message ---Hello, I have 3 scripts: ## i2.php <?php session_start(); $counter = 1; session_register("counter"); header("Location: /i.php"); ?> ## i.php <?php session_start(); $counter = 0; ### uncomment this to see the difference # session_unregister("counter"); session_register("counter"); unset($counter); $counter = 4; session_register("counter"); header("Location: /i1.php"); ?> ## i1.php <?php session_start(); print $counter; ?> When I open http://host/i2.php on my browser I get 0, though I expect it to be 4. If I uncomment session_unregister("counter"); I get 4 as expected. PHP version 4.1.2. Anyone can explain this behavior? Also can anyone try this with say 4.0.5 or older version of PHP? Good luck, Valdas--- End Message ---
--- Begin Message ---Robert Cummings wrote: > M wrote: > > > > I have stored lot of images into BLOB Mysql fields, and need recover it > > to resize. How can I create some image pointer from string stored into > > BLOB field? > > > > Thanks > > > > Miguel > > imagecreatefromstring() seems to be the candidate... however a comment > attached to the help page indicates it is buggy. I suggest trying it out > and if that fails then pull your image from the database, write to a > temporary file, and then use imagecreatefromjpeg() as per usual. > > Cheers, > Rob. Hello Rob, just to inform that function ImageCreateFromString works ok Thanks for your valuable info Miguel--- End Message ---
--- Begin Message ---hi how can i use php to list keywords in search engines ?!? how to index a website keywords via php =) plz mail thx--- End Message ---