php-general Digest 18 Jan 2005 10:52:40 -0000 Issue 3234

Topics (messages 206593 through 206627):

Re: php editor
        206593 by: M Saleh EG
        206596 by: Daniel Lahey
        206609 by: The Disguised Jedi

Re: PHP in MS-DOS
        206594 by: Andrew Kreps

Re: Phonetic speller function
        206595 by: Greg Donald
        206599 by: Jochem Maas

Re: $_POST array not being populated
        206597 by: Jochem Maas

Re: Socket_connect producing errors that show no reason
        206598 by: Jochem Maas
        206601 by: Adam Hubscher

PHP application for knowledge management?
        206600 by: Murray . PlanetThoughtful
        206608 by: Jonel Rienton
        206616 by: Matthew Weier O'Phinney

.Net Web services
        206602 by: Michael Leung
        206613 by: Zareef Ahmed

NT Auto Authentication?
        206603 by: Adrian Madrid
        206605 by: Jochem Maas
        206610 by: Manuel Lemos

mail() function on linux
        206604 by: Nicolae Serban

anyone has successful to use a PHP SoapClient talking with .Net Web services?
        206606 by: Michael Leung

Writing static file from dynamic PHP page
        206607 by: Chris Bruce
        206614 by: Bret Hughes
        206615 by: Matthew Weier O'Phinney

Echoing Variables Names
        206611 by: Phillip S. Baker
        206612 by: Greg Donald
        206617 by: John Holmes
        206618 by: Jochem Maas

Execute shell script from PHP
        206619 by: Khan
        206624 by: Tom
        206625 by: Khan

Textarea and Php
        206620 by: Ross Hulford
        206621 by: Hugh Danaher

strtotime time zone trouble
        206622 by: Marcus Bointon
        206627 by: Tom

Re: Persistent PHP web application?
        206623 by: Zouari Fourat

Re: which is best php editor?
        206626 by: pf.sistemasdinamicos.com.ar

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 ---
Zend.... Especialy with Zend 4.0 beta and Zend platform.... wow...
that's all i'm gonna say. I had day on Zend 3.5 where I used to see
.Net programmers openning Visual Studio.net and playing with their DB
on their left hand panels on the same IDE and I used to say
man......god help me with mySQLCC and Query Browser.... now with Zend
4.0 (beta) i'm experiencing the magic of having all the stuff
together....
Profiling, Debugin, Code Completion and Syntax highliting, maaaan it's
just what I needed to have. Abit expensive but realy worth it! I
wouldnt like programming on any programming language if I had a poor
IDE or Editor.... n maybe that's me.

M.Saleh.EG
+97150-4779817

--- End Message ---
--- Begin Message --- I use Dreamweaver and I absolutely love it. It's a bit pricey, though. In the latest newsletter from Apple Developer Connection, there is a notice about skEdit, which is only $20. It looks pretty nice, though I haven't tried it. Eclipse is very good, too, and it's free (phpEclipse is an extension for Eclipse). Not terribly easy to get set up, though. At least, I found it to be so. Here's the URL for skEdit: http://www.skti.org/skEdit.php
--- End Message ---
--- Begin Message ---
I use jEdit...
www.jedit.org

It understands most every language and you can even download a php
parser plugin that checks your syntax when you save the file and
underlines problems.

I LOVE jEdit!!!!

best of all, it is FREE & OPEN-SOURCE!!


--
The Disguised Jedi
[EMAIL PROTECTED]

PHP rocks!
"Knowledge is Power.  Power Corrupts.  Go to school, become evil"

Disclaimer: Any disclaimer attached to this message may be ignored.
This message is Certified Virus Free


-- 
The Disguised Jedi
[EMAIL PROTECTED]

PHP rocks!
"Knowledge is Power.  Power Corrupts.  Go to school, become evil"

Disclaimer: Any disclaimer attached to this message may be ignored.
This message is Certified Virus Free

--- End Message ---
--- Begin Message ---
On Mon, 17 Jan 2005 09:45:59 -0600, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
> Thanks, but I'm not running Windows, I'm running just MS-DOS from a
> bootable floppy.  Hence my question :-)
> 
> PHP seems to actually be the php5ts.dll.  Would there be binaries for
> MS-DOS or is there a way to get this working?
> 

In my PHP 5 installation on Windows, there's a php.exe in the CLI
folder which is used to execute scripts from the command line.  It's
only 24k, so it likely invokes a DLL, as you suspect.   I'd suggest
copying that exe to a floppy and trying it, maybe it will give you a
useful error message.

I hex edited php.exe and found the 'This program does not run in DOS
mode' error message that usually appears in 32-bit apps, so this may
not even be possible.  Good luck!

--- End Message ---
--- Begin Message ---
On Mon, 17 Jan 2005 23:43:48 +0200, Dotan Cohen
<[EMAIL PROTECTED]> wrote:
> I looked at the 'sound like' modules in php (leveshtien, soundex) but they are
> for comparing 2 strings, not creating a string based on what we already have.

You're looking at it from the wrong end.

With soundex you create soundex values for _all_ your known words, and
you stick them in a db.. then you find the soundex value for the word
in question and you do a lookup in your db to find other words with
the closest values.  You're right that you don't create any new
strings based on the word.  Instead you would provide a listing of
similar words from the db lookup.  It's all up to you what words go
into the db to pick from.

I read somewhere most English speaking folks only use about 80K words or so.


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

--- End Message ---
--- Begin Message ---
Dotan,


Greg Donald wrote:
On Mon, 17 Jan 2005 23:43:48 +0200, Dotan Cohen
<[EMAIL PROTECTED]> wrote:

I looked at the 'sound like' modules in php (leveshtien, soundex) but they are
for comparing 2 strings, not creating a string based on what we already have.


You're looking at it from the wrong end.

With soundex you create soundex values for _all_ your known words, and
you stick them in a db.. then you find the soundex value for the word
in question and you do a lookup in your db to find other words with
the closest values.  You're right that you don't create any new
strings based on the word.  Instead you would provide a listing of
similar words from the db lookup.  It's all up to you what words go
into the db to pick from.

good example of text search/matching but he has the problem that he still needs to create the words which brings him back to the original problem... how do you create:


cayac
kayac
cayak

from: kayak

...he seemed to want to generate permutations - regardless of whether they are actually in the dictionary.

well you would start off with a set of zero or more replacement chars for each letter in the alphabet (bare in mind that character (set?) encoding plays a part here). e.g. :

$repl = array(
        'a' => null,
        'b' => null,
        'c' => array('k'),
        'd' => null;
        'e' => array('i'),
        /*
         * and so on..
         */
);

then onto the string:

$str = str_split("kayak");
var_dump($str);

str_split() will give you an array, each element containing one letter of the original string.

now you need a loop! I leave the magic to build the permutations up to you


I read somewhere most English speaking folks only use about 80K words or so.

programmers use more :-)

rgds,
Jochem

--- End Message ---
--- Begin Message --- Jay Blanchard wrote:
[snip]
I am new to the PHP world so don't give me too much grief if this has a simple solution. My problem is that the $_POST array is not being populated. I have created a form and the method of that form is "POST".
I have started the session using session_start() but still nothing. When
I try to display what is in the array using print_r($_POST) all I get is Array(). Did I screw up the PHP configuration?


PLEASE HELP!  This is driving me mad...
[/snip]

You didn't provide much information, but try a simple script with one
item to post and then print_r($_POST)

and if that fails:

var_dump($GLOBALS);



--- End Message ---
--- Begin Message --- Adam Hubscher wrote:
The code looks like this:

if(($sock = socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) < 0){
print("Couldn't Create Socket: " . socket_strerror(socket_last_error()). "\n");
}
socket_set_option($sock, SOL_SOCKET,SO_RCVTIMEO, array('sec' => 1, 'usec' => 0));
$output = '';
for($i = 0; $i < count($file); $i++){
$servernum = $file[$i];
$i++;
$servername = $file[$i];
$serverport = $file2[$i];
$serverport = preg_replace('/\s/','',$serverport);


// Test if server online - if not, output offline. If yes, output Online.
if(!socket_connect($sock, $ip, $mapport)){
print("Couldn't Create Socket: " . socket_strerror(socket_last_error()). "\n"); // Debug
$output .= "Server Name: " . $servername. " ~~ Offline <br />";
continue;
}
else{
$output .= "Server Name: " . $servername. " ~~ Online <br />";
}
}


My problem now is that as it runs through the loop - it has a connection error. Warning: socket_connect() [function.socket-connect]: unable to connect [106]: Transport endpoint is already connected in status.php on line 17


maybe you should close the socket before trying to open it again?
also where is $ip being set?


Even looking at examples, I cannot figure out why this error is being produced. I cannot close the socket at the end of the loop, as it would make any further attempts for online status impossible.


The socket_close($sock) is directly after the loop.

Thanks for any help!


--- End Message ---
--- Begin Message --- Jochem Maas wrote:
Adam Hubscher wrote:

The code looks like this:

if(($sock = socket_create(AF_INET,SOCK_STREAM,SOL_TCP)) < 0){
print("Couldn't Create Socket: " . socket_strerror(socket_last_error()). "\n");
}
socket_set_option($sock, SOL_SOCKET,SO_RCVTIMEO, array('sec' => 1, 'usec' => 0));
$output = '';
for($i = 0; $i < count($file); $i++){
$servernum = $file[$i];
$i++;
$servername = $file[$i];
$serverport = $file2[$i];
$serverport = preg_replace('/\s/','',$serverport);


// Test if server online - if not, output offline. If yes, output Online.
if(!socket_connect($sock, $ip, $mapport)){
print("Couldn't Create Socket: " . socket_strerror(socket_last_error()). "\n"); // Debug
$output .= "Server Name: " . $servername. " ~~ Offline <br />";
continue;
}
else{
$output .= "Server Name: " . $servername. " ~~ Online <br />";
}
}


My problem now is that as it runs through the loop - it has a connection error. Warning: socket_connect() [function.socket-connect]: unable to connect [106]: Transport endpoint is already connected in status.php on line 17



maybe you should close the socket before trying to open it again? also where is $ip being set?


Even looking at examples, I cannot figure out why this error is being produced. I cannot close the socket at the end of the loop, as it would make any further attempts for online status impossible.


The socket_close($sock) is directly after the loop.

Thanks for any help!



Hm. Thats interesting. I attempted that the other day, however at that time it produced results that are... very similar to an infinite loop (continuously "loading page" on status bar, and when I hit stop the page had nothing loaded). I expected it to be the same - however it worked this time, beautifully in fact.

Thanks, you pushed me to try a second time :P

Thats interesting as well, however... I consulted one of my PHP books for when I was learning the changes in PHP5 and looked at the example for socket_connect, it shows an example for querying the Return to Castle Wolfenstein master server, storing the data in an array, and then without utilizing socket_close in any of the loops - it continues to conect to each server and query it for its status (players, settings, etc). That is why I didnt see much error in my code - the example showed it to be correct in my eyes.

Anyways, yea, thanks for the help!

($ip was set just above that codeblock, for testing purposes I was using a local IP - 192.168.1.68 to test for functionality.)
--- End Message ---
--- Begin Message ---
Hi All,

 

Just wondering if anyone can recommend an open php source application
suitable for knowledge management for a small development team? We have 3
coders with different responsibilities, but often have to cover each other
if unexpected things happen. We're hoping to implement a knowledge
management tool of some sort in which we can store business logic, code
snippets, back-end table / stored procedure descriptions and so forth. We're
hoping to find something that allows us to extensively categorize / keyword
entries, in which content is easy to maintain, expand etc, and which has
extensive search capabilities. Our ultimate (if perhaps unlikely) goal is to
be able to place a new coder into our environment with a tool that enables
him or her to get up to speed with our environment in the shortest time
possible.

 

Any suggestions / pointers welcome!

 

Much warmth,

 

planetthoughtful


--- End Message ---
--- Begin Message ---
Hi murray,

I have used phpBB2, i know, it's a forum application but it does the job of storing information about my projects, the search is pretty cool, it works out of the box for me, maybe it will help you too.

http://jonel.road14.com
--
I not know English well, but I know 7 computer languages.
                                                                ----anonymous


On Jan 17, 2005, at 5:08 PM, Murray @ PlanetThoughtful wrote:

Hi All,



Just wondering if anyone can recommend an open php source application
suitable for knowledge management for a small development team? We have 3
coders with different responsibilities, but often have to cover each other
if unexpected things happen. We're hoping to implement a knowledge
management tool of some sort in which we can store business logic, code
snippets, back-end table / stored procedure descriptions and so forth. We're
hoping to find something that allows us to extensively categorize / keyword
entries, in which content is easy to maintain, expand etc, and which has
extensive search capabilities. Our ultimate (if perhaps unlikely) goal is to
be able to place a new coder into our environment with a tool that enables
him or her to get up to speed with our environment in the shortest time
possible.




Any suggestions / pointers welcome!



Much warmth,



planetthoughtful


--- End Message ---
--- Begin Message ---
* Murray @ PlanetThoughtful <[EMAIL PROTECTED]>:
> ------=_NextPart_000_0023_01C4FCA6.721CFE90
> Just wondering if anyone can recommend an open php source application
> suitable for knowledge management for a small development team? We have 3
> coders with different responsibilities, but often have to cover each other
> if unexpected things happen. We're hoping to implement a knowledge
> management tool of some sort in which we can store business logic, code
> snippets, back-end table / stored procedure descriptions and so forth. We're
> hoping to find something that allows us to extensively categorize / keyword
> entries, in which content is easy to maintain, expand etc, and which has
> extensive search capabilities. Our ultimate (if perhaps unlikely) goal is to
> be able to place a new coder into our environment with a tool that enables
> him or her to get up to speed with our environment in the shortest time
> possible.

I've always found WikiWikiWebs ideal for this very type of thing -- its
exactly what they were created for. phpwiki is quite nice, I've heard
good things about yawiki, and there's several other PHP wiki packages
out there.

-- 
Matthew Weier O'Phinney           | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org

--- End Message ---
--- Begin Message ---
Hi all, 
   I have a parameter passing problem by using PHP SOAP extension.
.Net web services seem not to be read the parameters.

yours,
Michael

--- End Message ---
--- Begin Message ---
Hi Michael, 

   It would be helpful if you elaborate  your problem with details 
like PHP version, OS, Service etc. It will increase the chances of a
good response.


zareef ahmed


On Tue, 18 Jan 2005 11:06:16 +1000, Michael Leung
<[EMAIL PROTECTED]> wrote:
> Hi all,
>    I have a parameter passing problem by using PHP SOAP extension.
> .Net web services seem not to be read the parameters.
> 
> yours,
> Michael
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net

--- End Message ---
--- Begin Message --- Anybody figured out how to auto authenticate into a windows server? I need to have some users log through NT Authentication on their browser without typing their username and password. I was wondering if I could use PHP + COM or something like that but I can't find anything. I have found some scripts that validate against NTLM but I have not been able to find a script that would actually validate the browser/session against a NT server. Help!

--
Adrian Madrid
HyperX Inc. Mobile: 801.815.1870
Office: 801.566.0670 [EMAIL PROTECTED] www.hyperxmedia.com


9000 S. 45 W.
Sandy, UT 84070

--- End Message ---
--- Begin Message --- Adrian Madrid wrote:
Anybody figured out how to auto authenticate into a windows server? I

no but... have a look at this: http://uranus.it.swin.edu.au/~jn/linux/php/php_smbauth.htm

need to have some users log through NT Authentication on their browser without typing their username and password. I was wondering if I could use PHP + COM or something like that but I can't find anything. I have found some scripts that validate against NTLM but I have not been able to find a script that would actually validate the browser/session against a NT server. Help!

with regard to automatically logging in onto the server:
http://iamjochem.com/login_for_IE_people.jpg
I have no idea if the setting works and you will have to add the site to the intranet/trusted zone on each PC.





--- End Message ---
--- Begin Message ---
Hello,

on 01/17/2005 11:53 PM Adrian Madrid said the following:
Anybody figured out how to auto authenticate into a windows server? I need to have some users log through NT Authentication on their browser without typing their username and password. I was wondering if I could use PHP + COM or something like that but I can't find anything. I have found some scripts that validate against NTLM but I have not been able to find a script that would actually validate the browser/session against a NT server. Help!

Just configure your Web server to require NTLM authentication for accessing the PHP scripts that you intend to be restricted. GetEnv("LOGON_USER"); will return the authenticated user name.


--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html

--- End Message ---
--- Begin Message ---
I have this code to send an e-mail !!!

$ok=mail($dest, $subject, $mesaj,
             "From: $expe\r\n"
              ."Reply-To: $expe\r\n"
              ."X-Mailer: PHP/" . phpversion());

It works on windows, i must change something to work on linux ????

Thanks

--- End Message ---
--- Begin Message ---
Hi all,
anyone has successful to use a PHP SoapClient talking with .Net Web services?
at this moment, that seem to no success for my testes. If anyone has
successful to do this, please tell me.

yours,
Michael

--- End Message ---
--- Begin Message ---
Hi,

I am looking for a way to write to a file what the browser would see (raw html) when viewing a dynamic PHP page. I have numerous include files, MySQL db queries, loops etc. and I want to generate the static result of that file and save it as an html page. I have toyed a little with output buffering to no avail.

Is there an easy way to do this?

Thanks,

Chris
--- End Message ---
--- Begin Message ---
On Mon, 2005-01-17 at 21:16, Chris Bruce wrote:
> Hi,
> 
> I am looking for a way to write to a file what the browser would see 
> (raw html) when viewing a dynamic PHP page. I have numerous include 
> files, MySQL db queries, loops etc. and I want to generate the static 
> result of that file and save it as an html page. I have toyed a little 
> with output buffering to no avail.
> 
> Is there an easy way to do this?

Interesting requirement.  I suppose something other than view source 
from the browser or wget is needed?

Bret

--- End Message ---
--- Begin Message ---
* Chris Bruce <[EMAIL PROTECTED]>:
> I am looking for a way to write to a file what the browser would see 
> (raw html) when viewing a dynamic PHP page. I have numerous include 
> files, MySQL db queries, loops etc. and I want to generate the static 
> result of that file and save it as an html page. I have toyed a little 
> with output buffering to no avail.

The key to doing this sort of thing is to *NOT* echo everything as you
receive it. Store content in variables and echo once you've finished.

If this is not an option, I've seen any number of good threads on using
output buffering in recent weeks on this list; peruse them, see what has
worked for others, and try those methods; if they don't work, ask the
list for help -- and include that information (what you tried, what you
expected, what you received).

If it *is* an option, Cache_Lite from PEAR is an excellent class for
doing exactly what you're trying to do.

-- 
Matthew Weier O'Phinney           | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org

--- End Message ---
--- Begin Message ---
Greetings All,

I am generating some variable variables.
I am interested for testing purposes in finding out the names of the
variables that are actually being generated. Since I want to make sure that
that my following conditional statements are working properly and the values
are set.

So is there a way to print out the name of the variables?
Thanks.

--
Blessed Be

Phillip

--- End Message ---
--- Begin Message ---
On Mon, 17 Jan 2005 19:55:12 -0800, Phillip S. Baker
<[EMAIL PROTECTED]> wrote:
> I am generating some variable variables.

Don't use variable variables, use arrays.

> I am interested for testing purposes in finding out the names of the
> variables that are actually being generated. Since I want to make sure that
> that my following conditional statements are working properly and the values
> are set.
> 
> So is there a way to print out the name of the variables?

print_r( $array );



-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

--- End Message ---
--- Begin Message --- Phillip S. Baker wrote:
I am generating some variable variables.
I am interested for testing purposes in finding out the names of the
variables that are actually being generated. Since I want to make sure that
that my following conditional statements are working properly and the values
are set.

So is there a way to print out the name of the variables?

I agree with the recommendation to just use an array. Variable variables are almost always just a workaround for an array.


That being said, if you're creating the variable then you can create the name. If you're saying

$a = 'x';
$b = 'y';
$c = 'z';
$xyz = 'foobar';

//Get name of "variable"
$name = $a.$b.$c; // $name = "xyz"

//Get value of variable
$value = ${$a.$b.$c}; // $value = "foobar"

Show some code if that doesn't clue you in.

--

---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message --- Phillip S. Baker wrote:
Greetings All,

I am generating some variable variables.
I am interested for testing purposes in finding out the names of the
variables that are actually being generated. Since I want to make sure that
that my following conditional statements are working properly and the values
are set.

$var="var";/* nothing */echo "\$".$var."\n";/* like */$var=${"var"}; echo "\$$var\n";/* varvars */${$var."1"}="$var";${$$var}=$var; echo "\$".${$$var}."1";echo "\n";/* to */echo "\$".${${$$var}."1"}; echo "\n";/*really */echo "\$".${"var1"}."\n";/* f*** */ echo "\$".${${$var}."1"}."\n";echo "\$".${${${${${$var}}}}}."\n"; /* your */${"var"} = ${$$var}."1";echo "\$".$$var."\n";/* day */

to illustrate gregs point :-)


So is there a way to print out the name of the variables? Thanks.

--
Blessed Be

Phillip


--- End Message ---
--- Begin Message ---
Hello,

I have a shell script for ading users to LDAP. It looks like this:

#!/bin/bash
MUID=userlogin
FULLNAME="First Last"
LASTNAME="Last"
DOMAIN=example.org
SERVER=qmail.example.org
PASS=userpass
cat > .ldif.tmp.$MUID << EOF
dn: uid=$MUID,ou=accounts,dc=example,dc=org
cn: $FULLNAME
sn: $LASTNAME
objectclass: top
objectclass: person
objectclass: inetOrgPerson
objectclass: qmailUser
mail: [EMAIL PROTECTED]
mailhost: $DOMAIN
mailMessageStore: /var/qmail/maildirs/$MUID/Maildir
userPassword: $PASS
uid: $MUID
accountStatus: enabled
EOF
ldapadd -x -v -w secret -D "cn=Manager,dc=example,dc=org" \
                -f .ldif.tmp.$MUID
rm .ldif.tmp.$MUID

How Can I run (trigger) this script from PHP so I could create web form for adding users.

TNX
--- End Message ---
--- Begin Message ---
shell_exec()

Tom
Khan wrote:

Hello,

I have a shell script for ading users to LDAP. It looks like this:

#!/bin/bash
MUID=userlogin
FULLNAME="First Last"
LASTNAME="Last"
DOMAIN=example.org
SERVER=qmail.example.org
PASS=userpass
cat > .ldif.tmp.$MUID << EOF
dn: uid=$MUID,ou=accounts,dc=example,dc=org
cn: $FULLNAME
sn: $LASTNAME
objectclass: top
objectclass: person
objectclass: inetOrgPerson
objectclass: qmailUser
mail: [EMAIL PROTECTED]
mailhost: $DOMAIN
mailMessageStore: /var/qmail/maildirs/$MUID/Maildir
userPassword: $PASS
uid: $MUID
accountStatus: enabled
EOF
ldapadd -x -v -w secret -D "cn=Manager,dc=example,dc=org" \
            -f .ldif.tmp.$MUID
rm .ldif.tmp.$MUID

How Can I run (trigger) this script from PHP so I could create web form for adding users.

TNX


--- End Message ---
--- Begin Message --- Tom wrote:
shell_exec()

yes, I have try that but nothing happenes. here is my code. Is this correct?

<?php
shell_exec('/test/acct.sh');
?>

--- End Message ---
--- Begin Message ---
Is there a way to add and remove lines of text to a textarea inside a form?


Thanks


Ross 

--- End Message ---
--- Begin Message --- Ross,
Try something like this in your form:
<textarea name=description rows=4 cols=40>$description</textarea>
You can then edit the contents of the cell
Hope this helps.
Hugh
----- Original Message ----- From: "Ross Hulford" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, January 18, 2005 12:15 AM
Subject: [PHP] Textarea and Php



Is there a way to add and remove lines of text to a textarea inside a form?


Thanks


Ross -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005





-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005

--- End Message ---
--- Begin Message ---
How is this not a bug?

<?php
print date('Y-m-d H:i:s', strtotime('now UTC'))."\n";
print date('Y-m-d H:i:s', strtotime('now PST'))."\n";
?>

outputs:
2005-01-18 09:58:09 (correct)
2005-01-18 17:58:09 (incorrect)

The time zone correction is applied in the wrong direction. Does it in both current PHP 4 and 5.

Named time zones like these are supposedly deprecated, but the suggested alternative in the docs doesn't work at all:

print date('Y-m-d H:i:s', strtotime('now UTC-0800'))."\n";

1970-01-01 00:59:59

using 08:00 doesn't work either

Ideas?

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[EMAIL PROTECTED] | http://www.synchromedia.co.uk

--- End Message ---
--- Begin Message ---
Marcus Bointon wrote:

How is this not a bug?

<?php
print date('Y-m-d H:i:s', strtotime('now UTC'))."\n";
print date('Y-m-d H:i:s', strtotime('now PST'))."\n";
?>

outputs:
2005-01-18 09:58:09 (correct)
2005-01-18 17:58:09 (incorrect)

PST = UTC - 8, therefore if you ask for strtotime in PST it will give you now + 8. This is standard in most languages, you are just reading the functionality back to front.
ie when you say strtotome('now PST'), what you are asking for is the current local time (UTC in your instance) given an input date in PST



The time zone correction is applied in the wrong direction. Does it in both current PHP 4 and 5.


Named time zones like these are supposedly deprecated, but the suggested alternative in the docs doesn't work at all:

print date('Y-m-d H:i:s', strtotime('now UTC-0800'))."\n";

try print date('Y-m-d H:i:s', strtotime('now') -0800)."\n";

Tom
--- End Message ---
--- Begin Message ---
can u explain a bit more : The answer would be Application-Scope
vars.... wish we had it in PHP


On Tue, 18 Jan 2005 02:42:46 +0400, M Saleh EG <[EMAIL PROTECTED]> wrote:
> The answer would be Application-Scope vars.... wish we had it in PHP
> 
> M.Saleh.E.G
> 97150-4779817
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--- End Message ---
--- Begin Message ---
> What's the purpose of your coding?
> Applications? Just some sort of dynamic code here n there? or Huge OOP
> application with a team of programmers?
>
> I started with PHPEdit, Moved to Magna and then tried Dreaweaver to
> communicate with designers. And then came Zend 2.5 n then Got shocked
> with Zend 3.5 and now i'm on the Zend 4.0 Beta.  In all the cases I'd
> recommand Zend if you wish to buy rather than using a free one.
>
> But it all depends on u & the amount of work you want to get done with
> ur editor or IDE.
>
> HTH
>
> M.Saleh.E.G
> 97150-4779817
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Coding since about 4 years, never got a better editor than EditPlus 2. And
sometime ago I was decided to get a very good Dev Env, no one did it, i
was back to EditPlus in a week.

--- End Message ---

Reply via email to