Re: [PHP] Multiple INI Files

2002-01-28 Thread David Otton
On Mon, 28 Jan 2002 12:10:02 -0600, you wrote: We host many sites with PHP. Is there any way to have each site use a different php.ini? You can put seperate PHP directives in Apache's .htaccess file for each site you host. djo -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Opening an URL on an new window

2002-01-29 Thread David Otton
On Tue, 29 Jan 2002 09:46:39 -0200, you wrote: There is a way to open an URL in a new window a href=blah target=_blank/a using JAVASCRIP commands as such as window.open [windowVar = ][window].open(URL, windowName, [windowFeatures]) Where windowFeatures is a comma-separated list of any of the

Re: [PHP] include redirects

2002-01-29 Thread David Otton
On Tue, 29 Jan 2002 12:51:15 +0100, you wrote: Do you know a solution to insert remote content handling eventual redirects in the remote? Something like a browser. fopen() the file you're trying to include, and handle the response from the server yourself. If it returns 301 or 302, you have to

Re: [PHP] Novice question - Please Help

2002-01-30 Thread David Otton
On Wed, 30 Jan 2002 12:10:14 +, you wrote: Could someone please email me and tell me how to split a string into different arrays ? /* this is our start string */ $str = this:is:a:test:string; /* split accepts a regular expression and a string, and returns an array

Re: [PHP] http error 405

2002-01-30 Thread David Otton
On Wed, 30 Jan 2002 21:27:14 +0800, you wrote: Dear all I had made a login page for user, but once when you user had login failed, there will be a error appear which is HTTP ERROR 405, could someone pls tell me what is that mean on that error?

Re: [PHP] Pregenerating Script

2002-01-31 Thread David Otton
On Thu, 31 Jan 2002 22:28:59 +0530, you wrote: I want a php script which takes 4 parameters : - header file - body file - footer file - OUTPUT file What it should do is combine 1. header, 2. body, and 3. footer and save it as 4. OUTPUT file Is cat header body footer output

Re: [PHP] Connect() function

2002-02-01 Thread David Otton
On Fri, 01 Feb 2002 11:46:27 +0100, you wrote: I m using PHP 4.0.5 and I try to create a function called connect : function connect() { ... } My problem is I get this : Fatal error: Cannot redeclare connect() in /opt2/htdocs/www.mydomain.com/html/connexion.php on line 6 In connexion.php

Re: [PHP] is there a way to get the content type with php

2002-02-01 Thread David Otton
On Fri, 1 Feb 2002 12:37:24 +0100, you wrote: Hi all i have a skript that sends out various files after versifying tat the user is authenticated. can i determine the content type of a file with php? like using it on pdf and it return applicatin/pdf etc? That information is in

Re: [PHP] using HTML objects into PHP code

2002-02-04 Thread David Otton
On Mon, 04 Feb 2002 09:32:31 -0200, you wrote: First, you need to fix those tags : select name=~x~ select name=x option A option option A /option How can a access ~x~ content into a PHP variable ? It happens automatically. When you submit a form, PHP variables are created for the

Re: [PHP] Insert or update in Oracle database

2002-02-04 Thread David Otton
On Mon, 4 Feb 2002 09:23:24 - , you wrote: Hello, To these that use the PHP by integrating an Oracle database, I wanted to know how made you your idea to be able to make the update or insert in your database. http://www.php.net/manual/en/function.ociexecute.php or maybe

Re: [PHP] hiding submitted variable values in location bar of browser !

2002-07-09 Thread David Otton
On Tue, 9 Jul 2002 22:09:58 -0400 (EDT), you wrote: Is there any way to hide my form submitted variables (like passwords etc) in the location bar http://somedomain.org/checkpassword.php? password=mypassword or atleast show in an encypted form n the location bar. You could use POST rather than

Re: [PHP] Functions list

2002-07-09 Thread David Otton
On Tue, 9 Jul 2002 15:05:21 -0300, you wrote: I have the PHP manual in my PDA but its extraordinary large to search for a function. Does anybody know a Functions list that I can download for my PDA? I’m looking for something which shows the function and a short description of what it works for.

Re: [PHP] Re: Working under Apache 1.3 but not Under IIS (Problem Resolved But its too Slow)...

2002-07-09 Thread David Otton
On Tue, 9 Jul 2002 16:31:50 -0230, you wrote: http://www.coop.mun.ca/verification.php Try and Type in any Name... As it should simply Step through the Database not find it and Respit the Page... However this does not happn... Please Help... if (function_exists(odbc_fetch_array))

Re: [PHP] Dos Paths

2002-07-10 Thread David Otton
On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: I've got an application that requires dos folder names (8.3 standard) as input. I also have PHP, which quite happily can cope with both. Can someone help me write a function to translate full paths to dos paths You may have to drop down to C/C++

Re: [PHP] Dos Paths

2002-07-10 Thread David Otton
On Wed, 10 Jul 2002 13:35:50 +0100, you wrote: David Otton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wed, 10 Jul 2002 13:14:44 +0100, you wrote: I've got an application that requires dos folder names (8.3 standard) as input. I also have PH

Re: [PHP] Generating word documents based on fields in a browser

2002-07-10 Thread David Otton
On Wed, 10 Jul 2002 15:53:36 +0100, you wrote: I want to create a form, similar to an invoicing system that generates a word document that the user can print out You may have better luck with RTF (http://www.phpbuilder.com/columns/nair20020523.php3) or PDF

Re: [PHP] Generating word documents based on fields in a browser

2002-07-10 Thread David Otton
On Wed, 10 Jul 2002 16:13:53 +0100, you wrote: David Otton [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wed, 10 Jul 2002 15:53:36 +0100, you wrote: I want to create a form, similar to an invoicing system that generates a word document that the

Re: [PHP] fopen() ??

2002-07-10 Thread David Otton
On Wed, 10 Jul 2002 11:33:52 -0400, you wrote: Scott Fletcher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thanks a million!!! Didn't I read the article somewhere on PHP.net that said that? Using fopen() to open a file, does it attempt to create a file

Re: [PHP] Character Array

2002-07-11 Thread David Otton
On Thu, 11 Jul 2002 12:08:59 +0100, you wrote: Is there an easy way to get an array of characters from a string? $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); from http://www.php.net/manual/en/function.preg-split.php djo -- PHP General Mailing

Re: [PHP] Execute script then output image.

2002-07-11 Thread David Otton
On Thu, 11 Jul 2002 21:00:36 +1000, you wrote: How do I output a static image through a php script? it had something to do with headers but I can't remember exactly what. You need to output the correct content-type header for the image (eg image/gif), take it's size and output it as

Re: [PHP] Character Array

2002-07-11 Thread David Otton
On Thu, 11 Jul 2002 13:50:59 +0200, you wrote: Is there an easy way to get an array of characters from a string? $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); A string is already an array of chars : $toto=test; echo $toto[0]; // prints t echo

Re: [PHP] Execute script then output image.

2002-07-11 Thread David Otton
On Thu, 11 Jul 2002 22:01:03 +1000, you wrote: You need to output the correct content-type header for the image (eg image/gif), take it's size and output it as content-length, and suppress error reporting. Then output the image data. There was a much simpler way. It just said the location of

Re: [PHP] How to set focus in a form field

2002-07-11 Thread David Otton
On Thu, 11 Jul 2002 11:25:50 -0400, you wrote: Is there anyway to automate this, so that when a page loads it automatically goes to the first field, and 'highlights' the entry area? (Btw, I tried 'tabindex=1' but it still does not do what I'd like it to. Javascript, not PHP. Look up the

[PHP] printing comma-delimited lists

2001-10-04 Thread David Otton
What I'm doing here is fairly obvious (build a comma-delimited string). $arr = array(1,2,3,4,5); for ($i=0; $i sizeof($arr); $i++) { $lis = $lis . $arr[$i]; if ($i != (sizeof($arr)-1)) { $lis = $lis . ','; } } Question is, is there a more elegant way?

Re: [PHP] printing comma-delimited lists

2001-10-04 Thread David Otton
On Thu, 4 Oct 2001 16:27:11 +0200 (CEST), you wrote: You could try implode() $lis = implode(,, $arr); That'll do it; thanks. djo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

Re: [PHP] Downloading Images

2001-10-04 Thread David Otton
On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote: I have added a download button to a web-site that enables users to download images to their local drives. (I'm using a button as I want to wrap some logic round this function) I have the following (simplified code )that will be called from the

Re: [PHP] Downloading Images

2001-10-04 Thread David Otton
On Thu, 4 Oct 2001 07:51:59 -0700 (PDT), you wrote: different length, (3k as opposed to the original 9k) I originally did have an error message appended to the downloaded image but that no longer appears to be the case. However the image is definitely truncated. Any All the JPEGs I have here

[PHP] language question

2001-10-22 Thread David Otton
why does this work: foreach ($table as $row) list ($a, $b) = $row; but this doesn't? foreach ($table as list ($a, $b)); it seems to me that the two are equivalent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: [PHP] language question

2001-10-23 Thread David Otton
On Mon, 22 Oct 2001 16:47:56 +0200, you wrote: On Monday 22 October 2001 14:28, David Otton wrote: why does this work: foreach ($table as $row) list ($a, $b) = $row; but this doesn't? foreach ($table as list ($a, $b)); because the correct syntax is foreach

[PHP] Different include paths for different virtualhosts?

2001-11-16 Thread David Otton
Hi - my sysadmin tells me that PHP is compiled in, rather than loaded as an Apache module. I need to use VirtualHost foo php_value include_path .:/www/includes/foo /VirtualHost to get different include paths for different sites. How do I accomplish this? The manual says When using PHP

[PHP] Problem with PHP_SELF

2001-09-03 Thread David Otton
Hi, small problem : phpinfo() shows all kinds of useful variables like PHP_SELF, PATH_INFO, etc etc but I can't see them from my script. I get a error - Warning: Undefined variable: PATH_INFO in [scriptname] on line 13 Is there any situation where such variables would be available to

Re: [PHP] Problem with PHP_SELF

2001-09-03 Thread David Otton
On Mon, 03 Sep 2001 15:11:04 -0700, you wrote: Following up my own post (in case someone finds this in the archives): Is there any situation where such variables would be available to phpinfo(), but not the rest of the script? You can't see $PHP_SELF within a function until you declare it

Re: [PHP] Problem with PHP_SELF

2001-09-03 Thread David Otton
On Mon, 3 Sep 2001 09:16:00 -0700, you wrote: I couldn't help but frown at this message... This is typical of this and hundreds of other lists... instead of learning the language, people just jump in, try to write code, and then when something doesn't work, it's the language's fault... It

Re: [PHP] PHP_SELF NEW.....?????Continue2

2001-09-04 Thread David Otton
On Mon, 3 Sep 2001 17:15:25 -0700, you wrote: So, with the PHP_self (in my hangman game) I probably can send the value of my variable to the same page. now my next question is: How do i maintain the content of the page which is build based on the value passed from the previous submision? Do I

Re: [PHP] Refreshing form with submittd data

2001-09-06 Thread David Otton
On Thu, 6 Sep 2001 13:46:59 +0100, you wrote: I have 3 radio buttons, and I want the one selected by the user to show as selected when the page reloads. The form uses POST and points to itself. How can I make this better? With a text field I can just do input type=\text\ name=\foo\

Re: [PHP] suming up in MySQL

2001-09-11 Thread David Otton
On Tue, 11 Sep 2001 11:51:05 +0200, you wrote: How to sum up all the values from a MySQL row ex. id - price 1 1000 2 300 3 200 How to sum up price row ? SELECT SUM(price) unsurprisingly enough... djo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail:

Re: [PHP] variables

2001-09-11 Thread David Otton
On Tue, 11 Sep 2001 11:10:20 +0200, you wrote: Is it possible to transfer certain variables to a new scripts, but not doing this as uri-parameters (../bla.php?var1=varvar2=var#) method=post forms cookies I need it for Usernames and passwords and when the pages get cached the usernames and

Re: [PHP] Anagram Solution in PHP

2001-09-11 Thread David Otton
On Mon, 10 Sep 2001 01:25:36 -0700, you wrote: So let's say the word 'acronym' A + C + R + 0 + N + Y + M 26 + 24 + 9 + 12 + 13 + 2 + 14 = 100 My thoughts were to download a list of words in the dictionary, then read the file and somehow replace each letter by its number, then add each

Re: [PHP] how to ?

2001-09-11 Thread David Otton
On Tue, 11 Sep 2001 08:40:05 -0400, you wrote: is there a way to tell if an insert failed while a in a loop. I tried this: $query = my query; if (!$query) { logic here } but this is not working... is this even possible? By query, are you talking about SQL? I'm assuming you're trying to do run

Re: [PHP] Storing Images in a Database

2001-09-12 Thread David Otton
On Wed, 12 Sep 2001 13:45:06 +0200, you wrote: Any good tutorials or references on how to select and display these images from a database (MySQL, Access, SQLServer) with PHP? I know how to get it in, thats the easy partbut getting it out I'm listening! You need to output the correct

Re: [PHP] How do I inserting the content of a TEXT file into a PHP document?

2001-09-12 Thread David Otton
On Wed, 12 Sep 2001 14:37:59 +0200, you wrote: I would like to insert the HTML code in a TXT document. How do I do this? On a normal website I'd make an SHTML site with the !--#include virtual=news.txt -- Can't you still do this? but since the PHP engine (as far as I know) doesn't initiate SSL

Re: [PHP] in_array

2001-09-13 Thread David Otton
On Thu, 13 Sep 2001 14:17:12 +0300, you wrote: i wrote php scripts with php 4. but my server's php version is php 3. i used in_array function while i was writing the scripts. i used that function to check posted variables is available or not. is there an another way to check this posted

Re: [PHP] Email checking

2001-09-13 Thread David Otton
On Thu, 13 Sep 2001 11:28:01 -0700, you wrote: like to be able to check to see that: the email is in the correct format and the domain actually exists. Can anyone lend a hand? [putting the try it this way bit first] The only way to validate an email address is to try to send email to it. If

Re: [PHP] redirect to php problem

2001-09-15 Thread David Otton
On Sun, 16 Sep 2001 09:57:14 +0200, you wrote: I'm having a problem with following : I'd like to activate a php file as a home page, but without pointing directly to it(http://www.smth.com/file.php). I'd like to know if it is possible to call it from a html file(index.htm for exp. )

Re: [PHP] recognize the URL

2001-09-17 Thread David Otton
On Mon, 17 Sep 2001 12:08:31 +0300, you wrote: i have a html form and it is posted a php script. but how can i recognize the url that only posted from my html file? Simple answer: $HTTP_REFERER Complicated answer: You can't. Not reliably, anyway.

Re: [PHP] random record?

2001-09-20 Thread David Otton
On Thu, 20 Sep 2001 10:35:59 -0400, you wrote: i'm looking to select a random record from a sql table. I remember seeing code for it on the list but fail to find it now. any help? SELECT columns FROM table ORDER BY RAND() LIMIT 1 djo -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] IE - View Source

2001-07-26 Thread David Otton
On Thu, 26 Jul 2001 08:17:28 -0700, you wrote: Please try to read any of the browser printed text in this URL(I can't do it in NS): http://rwchat.com/DigiLink1/index.html html head meta http-equiv=Content-Language content=en-us meta http-equiv=Content-Type content=text/html;

Re: [PHP] disappearing array?

2007-09-20 Thread David Otton
On Thu, 20 Sep 2007 12:58:28 -0600, you wrote: I am not sure what the heck is going with this but here is my problem. I am trying to validate the contents of an array, then determine if the errors are with the array or another form submitted variable. The problem is after the code validates the

Re: [PHP] Run script every 30 seconds

2006-10-30 Thread David Otton
On Mon, 30 Oct 2006 21:26:29 +0300, Ahmad Al-Twaijiry wrote: The right way to do this, as others have mentioned, is with a daemon. Having said that... is it possible to link the script to my php interface (the one that the users is using it) and if the php interface page will run the script (IN

Re: [PHP] Assigning functions

2008-05-02 Thread David Otton
2008/5/2 Philip Thompson [EMAIL PROTECTED]: Hi all. I have several classes. Within each class, a new class is called. Is there a way to assign a function in a *deeper* class to be called in the first class? Example to follow.. ?php class A { function __construct () {

Re: [PHP] How to create accessible by PHP

2008-05-03 Thread David Otton
2008/5/3 Todd Cary [EMAIL PROTECTED]: Are there any examples of creating a dll that can be placed in the dll directory of php that can be accessed by php? My language would be Delphi, however an example in C would suffice. Custom PHP extensions. I don't know of any Delphi-specific examples,

Re: [PHP] Recursion... Sort of...

2008-05-08 Thread David Otton
2008/5/8 Matt Neimeyer [EMAIL PROTECTED]: Is there a way to tell if a function has been called that has resulted in a call to the same function? debug_backtrace() Can't comment on performance, though. Its an inelegant solution. We have an in-house CRM app that has a function that draws a

Re: [PHP] Improving development process / help with developer setup

2008-05-10 Thread David Otton
2008/5/10 robert mena [EMAIL PROTECTED]: I am looking for tips regarding improving the development process. I'll explain my current setup and please feel free to comment. My developers all use windows + eclipse PDT, the workspace is hosted (via samba) in a Linux server with

Re: [PHP] Month with leading zeros

2008-05-10 Thread David Otton
2008/5/10 Ron Piggott [EMAIL PROTECTED]: I am wanting to change echo option value=\ . $months[$month] . \; to output the month number, between 01 and 12 --- DATE value m, the month with leading 0's. How do I do this? $months is an array, as I have shown below. Ron ?php $months

Re: [PHP] Month with leading zeros

2008-05-10 Thread David Otton
for ($i = 1; $i = 12; $i++) I'm an idiot. for ($i = 1; $i = 12; $i++) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Good XML Parser

2008-05-12 Thread David Otton
2008/5/12 Waynn Lue [EMAIL PROTECTED]: What's the best way to pull down XML from a URL? fopen($URL), then using xml_parse? Or should I be using XML_Parser or SimpleXML? XML parsers fall into two general camps - DOM and SAX. DOM parsers represent an entire XML document as a tree, in-memory,

Re: [PHP] Good XML Parser

2008-05-12 Thread David Otton
2008/5/12 Waynn Lue [EMAIL PROTECTED]: So if I'm looking to parse certain attributes out of an XML tree, if I use SAX, it seems that I would need to keep track of state internally. E.g., if I have a tree like head a b/b /a a b/b /a /head and say I'm interested in all that's

Re: [PHP] SCanning text of PDF documents

2008-05-15 Thread David Otton
2008/5/15 Angelo Zanetti [EMAIL PROTECTED]: A client of ours wants a solution that when a PDF document is uploaded that we use PHP to scan the documents contents and save it in a DB. I know you can do this with normal text documents using the file commands and functions. Is it

Re: [PHP] strcmp($var1, $var2) versus if ($var1 $var2)

2008-05-28 Thread David Otton
2008/5/28 C.R.Vegelin [EMAIL PROTECTED]: $var1 = 01011090; $var2 = 010190; // 2 strings if ($var1 $var2) ECHO var1 var2; else ECHO var1 = var2; echo br /; $r = strcmp ( $var1 , $var2 ); if ($r 0) ECHO var1 var2, br /; 2nd line says: $var1 = $var2 4th line says: $var1 $var2 Implicit

Re: [PHP] [PHP Header] Right-Click Download in Firefox showing php filename

2008-08-04 Thread David Otton
2008/8/4 Will [EMAIL PROTECTED]: I am trying to have users download a file named 'Setup.msi', however under a PHP file with the sent header information, the default name to $forcename = ApplicationSetup_v1_0.msi; $filename = Setup.msi; header(Content-Type: application/force-download);

Re: [PHP] Number of duplicates in an array?

2008-08-18 Thread David Otton
2008/8/18 tedd [EMAIL PROTECTED]: Anyone have a cool method of finding duplicate items in an array and the number of times they appear? I'm doing it in a way that is probably less than optimum. I want to see how you guys solve it. Hmm. Assuming the following inputs and outputs:

Re: [PHP] Timing problem, putting PNG into PDF

2008-08-21 Thread David Otton
2008/8/12 Brian Dunning [EMAIL PROTECTED]: I'm using GD to crop save an uploaded image, and then embedding it into a PDF made with FPDI. It works great when the image is small or low-res. When the uploaded file is bigger, more than a couple hundred K or so, it fails. I think that the image

Re: [PHP] Which Exception to use ....

2008-08-23 Thread David Otton
2008/8/22 Jochem Maas [EMAIL PROTECTED]: still leaves the questions as to what a DomainException and a ErrorException is meant to model. A domain exception is thrown when a value is valid according to its type, but not within the domain of the function that it is being passed to. For example

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread David Otton
2008/8/23 Ólafur Waage [EMAIL PROTECTED]: Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. And thanks for the reply also Ashley but as i said in my first post, i had tried $_SERVER with limited results If checking the output

Re: [PHP] newbie Q: How to say, if the fileNAME is equal to..., or better yet, if the fileNAME ends with '.jpg'?

2008-08-25 Thread David Otton
2008/8/24 Govinda [EMAIL PROTECTED]: $ThisDir = getcwd()./thumbs; $DirHandle = opendir($ThisDir); if ($DirHandle = opendir($ThisDir)) { echo Directory handle: $DirHandle\n; echo Files:br /hr width=\25\%\ align=\left\ /; while ((false !== ($file = readdir($DirHandle))) 1) { if

Re: [PHP] newbie Q: How to say, if the fileNAME is equal to..., or better yet, if the fileNAME ends with '.jpg'?

2008-08-25 Thread David Otton
2008/8/25 David Otton [EMAIL PROTECTED]: You can check the manual for full details, but briefly, sql_regcase() returns a case-insensitive regular expression, and glob() returns an array of filenames that match the path given to it (in this case ./thumbs/*.jpg). I should have mentioned

Re: [PHP] comments function being spammed, how do I stop it?

2008-08-25 Thread David Otton
2008/8/25 Barnaby Walters [EMAIL PROTECTED]: my comments function for my website (at www.waterpigs.co.uk/php/phpTest.php) is being spammed, what would be your sugguestions of a way to deal with it? I was thinking of something to do with searching the strings of comments contained in the

Re: [PHP] Remote File download is very slow

2008-08-25 Thread David Otton
2008/8/25 Shiplu [EMAIL PROTECTED]: Hello folks, I have written a method to download file from remote server. normally those fill will be huge in size. from 1MB to 400MB. I am using fsockopen and curl to download the file. But the problem is its too slow. Very very slow. What happens when

Re: [PHP] Remote File download is very slow

2008-08-25 Thread David Otton
2008/8/25 Shiplu [EMAIL PROTECTED]: Nothing works. I was using curl actually. It was hell slow. Then I added the fsockeopen option. Its slwo too. now I am thinking to add socket_* functions. But If dont know what is the problem how can I resolve it. change scheme may not solve it. :( Ok,

Re: [PHP] grab the complete commandline used ...

2008-08-28 Thread David Otton
2008/8/28 Jochem Maas [EMAIL PROTECTED]: anyone know if it's possible to grab the entire commandline that was used to start up a php script on the CLI, an example of what I'm looking to grab from within the script (test.php in this example): php -qC -ddisplay_errors=1 ./test.php -o -d -e

Re: [PHP] grab the complete commandline used ...

2008-08-29 Thread David Otton
2008/8/28 Jochem Maas [EMAIL PROTECTED]: I have a feeling I'm out of luck - probably security issues that keep you from doing such a thing as well. I did have the idea of grabbing the PID and then grepping the output of ps via exec() ... that would do it, but I reckon it smells. :-) That

Re: [PHP] _SERVER['DOCUMENT_ROOT'] not set?

2008-08-29 Thread David Otton
2008/8/29 Saurabh Agrawal [EMAIL PROTECTED]: In one of the examples, I am supposed to access _SERVER['DOCUMENT_ROOT']. However, when I am seeing its value in the debug stack, I am getting it to be null! Even phpinfo() is showing that this particular variable does not even exist, though there

Re: [PHP] grab the complete commandline used ...

2008-08-29 Thread David Otton
2008/8/29 Jochem Maas [EMAIL PROTECTED]: in what sense won't it work? the complete line is in the output of ps somewhere albeit after wildcard/shell expansion. With the pipe? I'd really like to see an example, beacuse I couldn't coax it out of ps, and it might be handy someday. if life were

Re: [PHP] class constructor overloading

2008-10-23 Thread David Otton
2008/10/23 Alain Roger [EMAIL PROTECTED]: is it possible to overload the class construct(or) ? if yes, how ? class A { function __construct() { echo A; } } class B extends A { function __construct() { echo B;

Re: [PHP] class constructor overloading

2008-10-23 Thread David Otton
2008/10/23 Alain Roger [EMAIL PROTECTED]: thanks a lot, this is exactly what i needed. if the construct of based class A accept arguments, i guess that construct of class B must have the sames. No, you can change the signature of a method when you overload it. Below, B::__construct() accepts 1

Re: [PHP] Building an array, kind of?

2008-10-24 Thread David Otton
2008/10/24 Dan Shirah [EMAIL PROTECTED]: How would I go about putting that in a variable to equal 1234,1235,1236,1237,1238,1239 ? Pseudocode: $t = array(); foreach($resultset as $row) $t[] = $row; $t = join(',',$t); -- http://www.otton.org/ -- PHP General Mailing List

[PHP] PHP 4.3.11, call_user_func and instances of classes

2006-04-26 Thread David Otton
A bit of an oddity, this. There's some example code attached which illustrates my problem. I am attempting to call a method of an instance of an class from outside that instance, using call_user_func(). What's happening is that my attempt to call array ($this, 'AddOne') is silently being

Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread David Otton
On Tue, 6 Jun 2006 08:52:46 +0100, Robin Vickery wrote: On 06/06/06, Rob W. [EMAIL PROTECTED] wrote: Say I have a variable setting an ip address of 192.168.100.0 I want to be able to remove the last to chr's of that variable ie: .0 What would be my best solution to do that? Remove the last

Re: [PHP] Cannot read variables

2006-06-06 Thread David Otton
On Tue, 6 Jun 2006 10:36:12 +0300, you wrote: I just set up a test box for PHP/MySQL on a WinXP box and now I'm having trouble with variables passed to browser from a link. For example I have a link that outputs this: http://localhost/index.php?team=CF10b. Now the CF10b cannot be user in the

Re: [PHP] MySQL/PHP problem.

2003-07-22 Thread David Otton
On Tue, 22 Jul 2003 17:08:50 -0400, you wrote: I am trying to count in mySQL the number of entries in the field day where day=2 or 3. Then I want to check just to see if that returned a value greater than 0 or not. I am using the code below, but having a problem, I keep getting 0 as the total

Re: [PHP] Using $PHP_SELF

2003-07-31 Thread David Otton
On Thu, 31 Jul 2003 15:38:41 -0500, you wrote: I am having problems while transfering information to another page. I am using $PHP_SELF and I am getting errors here is a bit of code so you can see what I am saying: echo a href='$PHP_SELF?file=$filedir=.$mydir.'$file/aBR\n; This is what the

Re: [PHP] headline news retriever

2003-07-31 Thread David Otton
On Thu, 31 Jul 2003 20:26:25 -0400, you wrote: Does anyone know any headline news retrieving script/library specially something able to check with several news sites? I'm planing to roll my own but I want to see different approaches. RSS. The BBC (for example) have RSS feeds, and most journal

Re: [PHP] Invalid Characters, XML...

2003-08-04 Thread David Otton
On Sun, 3 Aug 2003 21:51:53 -0400 (EDT), you wrote: Im using PHP to write to XML files, but I am having some problems. A lot of users are cutting and pasting content from text editors like word, which uses odd quotation marks, dashes, etc. which PHP writes to the XML file, and then the XML parser

Re: [PHP] problem looping through records

2003-08-10 Thread David Otton
On Sun, 10 Aug 2003 22:11:09 +0100, you wrote: I have a sql statement which brings about 15 records... inside the while loop i am trying to get data from another table by passing an id, the problem is i am only getting the first record .. not the whole 15 records.. any suggestion?? function

Re: [PHP] Container functions....

2003-08-11 Thread David Otton
On Sun, 10 Aug 2003 10:50:03 -0400, you wrote: In a language that I used to program in - for development we used to be able to make a function that basically just executed everything inbetween: hidecode Print This is html printed some programming code Print this is more code; /hidecode So

Re: [PHP] How to point at a spot and get relevant information?

2003-08-14 Thread David Otton
On Thu, 7 Aug 2003 10:59:01 -0500 , you wrote: Thank you for your reponses. The problem is there are thousands of spots on the plot. The locations are random. This may be one of those you can't get there from here problems, and you'll have to rethink the presentation of your data. What's the

Re: [PHP] Why Redirection works on 1 machine but not on another

2003-08-14 Thread David Otton
On Sun, 10 Aug 2003 17:32:21 +0800, you wrote: I have this peculiar problem, my header header( Refresh:2;url=$g_prog_path/$l_refresh_url ); is set up correctly to be the FULL pathname. It works on some PC but now on some others. I'm using IE on win98/2000. The offending one is IE6

Re: [PHP] Class Design Question...

2003-08-14 Thread David Otton
On Wed, 6 Aug 2003 11:33:54 -0500, you wrote: Basically in the class I have methods that perform a task, and return true on success, or false on failure. Easy enough. If it returns false however, I want to display errors for the user. The best way I can think of doing this is adding a member

Re: [PHP] Attention everyone 0-t

2003-08-14 Thread David Otton
On Thu, 7 Aug 2003 02:17:21 +0200, you wrote: for some reason over 90% of all posters to this list has been blacklisted by spamcop... And how do you know this? I use mailwasher pro which queries spamcop for all mail i recieve and automatically blacklists it so i wont have to bother looking

Re: [PHP] counting files, choosing at random

2003-08-14 Thread David Otton
On Wed, 13 Aug 2003 10:54:58 +0200, you wrote: I want to choose a file at random from a directory which adheres to certain naming scheme. I can't get it to work. It's probably something simple...Here is a relevant snippet: img src=/szukaj/images/i ? chdir('./szukaj/images/'); echo

Re: [PHP] Container Functions Continued.....

2003-08-14 Thread David Otton
On Sun, 10 Aug 2003 18:04:00 -0400, you wrote: First of all, I understand the argument about having a testing, development and live servers, however, in the real world not every client can afford that hardware and it is not always feasable for smaller websites to have all the equipment. The

Re: [PHP] how to change index.php?passwd to index.php in the address bar

2003-08-14 Thread David Otton
On Wed, 13 Aug 2003 16:03:43 +0530, you wrote: Thanks for the message. Actually I tried only html files in the beginning. Let me explain my problem. I want to open a new window in a link with a function as function newwindow() { window.open(/home.php?userid=user1,Homepage); } This is

Re: [PHP] how to change index.php?passwd to index.php in the address bar

2003-08-14 Thread David Otton
On Wed, 13 Aug 2003 14:18:13 +0530, you wrote: In your first post you say When go to a new page from login page the address bar has localhost/regsuccess.php?password=ASD But in your second, Method Not Allowed The requested method POST is not allowed for the URL /products.html.

Re: [PHP] Category and sub-category logic

2003-08-14 Thread David Otton
On Fri, 15 Aug 2003 00:20:58 +0200, you wrote: Hi, I am thinking of making a program for personal use which does a very simple thing, just displays listings under categories, eg: under main category Auto there would be cars,bikes etc under banking there would be financing,loans etc (I as admin

Re: [PHP] call function as variable

2003-08-16 Thread David Otton
On Sat, 16 Aug 2003 07:58:27 +0200, you wrote: I have folowing function which they are a member in a class. function foo(){ something } function zoo(){ something else } and i have a array such: $test = array(1=foo,2=zoo); and i want to call the fuction foo() and zoo something like;

Re: [PHP] Nestled 'while's or 'for's or 'foreach's -- I'm lost

2003-08-17 Thread David Otton
On Sun, 17 Aug 2003 15:47:04 -0400, you wrote: I'm trying to take a paged result set and divide it into two chunks for displaying on the page. Basically making something that looks like a typical thumbnail gallery. I'm limiting my result set to 6 records and want to display it as 2 rows of 3

Re: [PHP] How do they do that?

2003-08-17 Thread David Otton
On Sun, 17 Aug 2003 23:13:24 -0400, you wrote: I was wondering. http://www.php.net/date gives me/redirects to: http://www.php.net/manual/en/function.date.php How do they do that? What $_post[??] is that? Or is it a sevrer (Apache, I suppose?) thing? I don't know how php.net does it, but I know

Re: [PHP] Removing empty array values.

2003-08-18 Thread David Otton
On Mon, 18 Aug 2003 08:03:25 -0400, you wrote: How do I remove empty array values? That could mean a lot of things. I'm going to assume you have a simple indexed array and want to remove any entries where array[index] == FALSE, and reindex the array. The most elegant way is to copy all the

Re: FW: [PHP] pop3 functions

2003-08-19 Thread David Otton
On Tue, 19 Aug 2003 08:15:00 -0500, you wrote: I will definitely agree that there are a few inconsistencies in the function naming... more than likely due to the many many contributors, and a lack of strict naming conventions. My pet hate: bool array_walk (array, function) array array_map

Re: [PHP] in the middle of shift and pop

2003-08-19 Thread David Otton
On Wed, 20 Aug 2003 00:25:32 +0200, you wrote: is it possible to remove an element of an indexed array such as this exemple $A = array('a', 'b', 'c', 'd', 'e', 'f'); in a way that we can optain this result : $A = array('a', 'b', 'd', 'e', 'f'); something like that perhaps ?

  1   2   3   4   >