php-general Digest 29 Mar 2001 07:23:00 -0000 Issue 595

Topics (messages 45946 through 46029):

search engine
        45946 by: Augusto Cesar Castoldi

Re: Curious
        45947 by: YoBro
        45967 by: Joe Stump

Copy data from one mysql table to another?
        45948 by: Bob Stone
        45949 by: CC Zona
        45950 by: Rodney J. Woodruff

Re: Cookie not getting set in IE 5 but no problem in Netscape
        45951 by: Joe Stump

Re: IP of server?
        45952 by: Lance Lovette
        45955 by: James Moore

Help w/ exec() on Win2k, IIS5.
        45953 by: SHAWN

HTML to Text
        45954 by: Boget, Chris
        45963 by: Data Driven Design
        45972 by: Boget, Chris

question about a loop in a loop
        45956 by: Institute for Social Ecology
        45988 by: Yasuo Ohgaki

No php.ini?
        45957 by: Zhu George-CZZ010
        45959 by: mjriding.wcoil.com
        45960 by: Peter Houchin
        45962 by: James Atkinson
        45964 by: Zhu George-CZZ010
        45965 by: Peter Houchin
        45983 by: David Robley

Re: odd
        45958 by: Peter Houchin

Re: Post but not Post
        45961 by: Peter Houchin
        45969 by: Jason Brooke
        45971 by: Robert Covell
        45975 by: Jason Brooke

CodeCharge? is it any good?
        45966 by: DRN

Re: Passing Special Characters in Query String
        45968 by: Joe Stump

Easy HTML PHP question
        45970 by: Paulson, Joseph V. \"Jay\"
        45974 by: Fabian Raygosa

Re: MySQL Schema
        45973 by: Joe Stump

How do I disable show_source and highlight file?
        45976 by: Sam Goin

Instalation
        45977 by: Augusto Cesar Castoldi
        45978 by: Jack Dempsey
        45981 by: Augusto Cesar Castoldi

Re: install-problem
        45979 by: David Robley

Re: Locating where PHP is on my server.
        45980 by: David Robley

Sessions: what's wrong sith this code?
        45982 by: Christian Dechery
        46017 by: Yasuo Ohgaki

Protect images in directory
        45984 by: Kyutums

Re: remote acces
        45985 by: David Robley

Sessions stopped working with 4.04
        45986 by: Shane Iseminger
        46009 by: Yasuo Ohgaki

Re: pattern match help
        45987 by: Stuart J. Browne

Variable scope problem
        45989 by: Joe Nelson
        45990 by: Jason Lotito

session problems
        45991 by: Jeff Warrington
        45997 by: Jeff Warrington

setting $var= multiple $var's
        45992 by: Peter Houchin
        45993 by: CC Zona

Editing Records
        45994 by: Curtis
        45995 by: Jason Murray

Re: function knows where call came from?
        45996 by: php3.developersdesk.com

Storing data from several forms of the same type in an array
        45998 by: cam k
        46011 by: Yasuo Ohgaki
        46023 by: cam k

Can Anyone Help?
        45999 by: Philip's Domain
        46001 by: Stuart J. Browne
        46002 by: Stuart J. Browne

reading attachment using Imap
        46000 by: magneto

scrolling text box
        46003 by: Randy Johnson
        46004 by: Jason Lotito

Session Problem (Design problem!?)
        46005 by: Jason Lam
        46013 by: Yasuo Ohgaki
        46014 by: Yasuo Ohgaki

What is the difference between session_unset() and session_destroy()?
        46006 by: Carfield Yim
        46028 by: \[Inf\] F!RE-WALL

Getting .gif properties
        46007 by: John Fairley
        46008 by: Gfunk

word docs
        46010 by: christian
        46012 by: David Robley

This PHP list
        46015 by: Ian Harris
        46016 by: Jason Murray
        46020 by: Jason Lotito
        46021 by: Gfunk
        46022 by: David Robley
        46025 by: Peter Houchin
        46029 by: dempsejn.georgetown.edu

Php extension for Ultradev available now !
        46018 by: Ovidiu EFTIMIE

Problem to run java command line with passthru()
        46019 by: nicuc.ac.jp

Which way to make the thumbnail on the fly
        46024 by: nicuc.ac.jp
        46026 by: Brian Clark
        46027 by: nicuc.ac.jp

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]


----------------------------------------------------------------------


I'd like to do a search engine on my homepage. I'll search a cell phone in 
mysql database.

I want to search this cell phone and list in HTML table.

This list of cell phones must have 30 lines and the cell phones that I
found (searched) must be in the middle of the list.

I want to show the cell phones before and after of the one I search
(found), order by cellphone.

How could I do that?





Thanks to everybody for the informative explanation of my curiosity.
It was very helpful, and now I have a better understanding of what I am
doing sometimes.

Thanks

YoBro
---------------------------------------
: Hi,
:
: I am curious to know why you need to use the /n, and what it actually
does,
: because I had a page that used them, and i removed them all and it still
: works fine.
:
: Also, is it seen as good or bad practive to use \" only when required or
all
: the time.
: i.e
: echo "<img src=test.gif>"; //Doesn't need to use \"
: echo "<img src=test.gif alt=\"Test Image\">"; //Only need to use it on the
: alt text.
:
: Just curious, and also keen to learn this with the good practice method.
:
: --
: Regards,
:
:
: YoBro
: -------------------------------------------------------------
: DO NOT REPLY TO THIS VIA EMAIL
: PLEASE USE THE NEWSGROUP
: All emails sent to this address are automatically deleted.
: This is to avoid SPAM!
: -------------------------------------------------------------
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: [EMAIL PROTECTED]
: For additional commands, e-mail: [EMAIL PROTECTED]
: To contact the list administrators, e-mail: [EMAIL PROTECTED]
:






This is where I implement a reversal of quotes depending on what kind of 
quotes I'll be using in it - the draw back is hitting the . key a lot to
concat with variables, but it makes the my code more readable (IMO - no \'s all
over the place.

So like this :

echo '<a href="http://'.$url.'">'.$title.'</a>'."\n";

or

echo "This is Mike's Homepage";

--Joe

On Wed, Mar 28, 2001 at 12:10:02PM +0200, Christian Reiniger wrote:
> On Wednesday 28 March 2001 08:18, you wrote:
> 
> > in general, I avoid using quotes where possible (such as in the
> > following) <font size=3 face=Arial> (instead of <font size=\"3\"
> > face=\"Arial\">)
> 
> Remember that XHTML *requires* quotes around every attribute value.
> 
> -- 
> Christian Reiniger
> LGDC Webmaster (http://sunsite.dk/lgdc/)
> 
> /* you are not expected to understand this */
> 
> - from the UNIX V6 kernel source
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*****************************\
 *    Joe Stump              *
 *    www.Care2.com          *   
 *    Office: 650.328.0198   *
 *    Extension: 122         *
\*****************************/
        www.miester.org

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------





Dear PHP Helpers,

I cannot find any documentation on how to copy the
data from one mysql table to another, i.e. table1,
columnx to table2, columnx.

Can you recommend a way?

Here is the situation.

I have one table called "phone" with two columns. The
first column is called "key_svt_members," the second
is called "phone."

I have a second table called "svt_members." This table
has 17 columns including "key_svt_members" and
"phone." The phone column in this table is currently
empty.

I wish to copy the data that is in phone, phone into
svt_members.

Can you recommend a method?

Thanks in advance,

Bob Stone

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text




In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Bob Stone) wrote:

> Dear PHP Helpers,
> 
> I cannot find any documentation on how to copy the
> data from one mysql table to another, i.e. table1,
> columnx to table2, columnx.

Please don't post the same question to multiple PHP.net lists.  Or at least 
wait until a day or two without response from one list before re-posting to 
another of the PHP.net lists.

(For the answer to your original question, see my response to the PHP-DB 
list.  Where the question, which is really all-MySQL and no-PHP, comes 
closest to being on-topic.)

Thank you.

-- 
CC




Which database are you using?

-- Rodney

Bob Stone wrote:

> Dear PHP Helpers,
>
> I cannot find any documentation on how to copy the
> data from one mysql table to another, i.e. table1,
> columnx to table2, columnx.
>
> Can you recommend a way?
>
> Here is the situation.
>
> I have one table called "phone" with two columns. The
> first column is called "key_svt_members," the second
> is called "phone."
>
> I have a second table called "svt_members." This table
> has 17 columns including "key_svt_members" and
> "phone." The phone column in this table is currently
> empty.
>
> I wish to copy the data that is in phone, phone into
> svt_members.
>
> Can you recommend a method?
>
> Thanks in advance,
>
> Bob Stone
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/?.refer=text
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





Ah yes, the infamous IE cookie problem - look at the expire time - I be it
destroys the cookie as soon as it gets it because the expire time is either on
or before the time the cookie was sent.

--Joe

On Wed, Mar 28, 2001 at 07:16:52PM +0800, Floyd Piedad wrote:
> My program works really well with Netscape.  But with some Internet Explorer
> installs, the cookie does not get remembered?  I already set the Security
> options to Allow Cookies (both).  When I set it to prompted, it even asked me if
> I wanted to accept the cookie, replied yes, but still the cookie cannot be read
> by the PHP program?
> 
> Thanks,
> 
> Floyd
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*****************************\
 *    Joe Stump              *
 *    www.Care2.com          *   
 *    Office: 650.328.0198   *
 *    Extension: 122         *
\*****************************/
        www.miester.org

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------





Thanks, but most variables such as SERVER_ADDR and SERVER_NAME are not set
when you run a PHP script from the command line (or from cron). Write a
script that calls phpinfo() and then use 'php -f' to run it and you'll see
how little environment information you get.

Lance

-----Original Message-----
From: wx [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 5:09 PM
To: Lance Lovette
Subject: Re: [PHP] IP of server?


Why just not use the built in variables:

$SERVER_ADDR
$SERVER_NAME

not that tough, :)

- Rob
----- Original Message -----
From: "Lance Lovette" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 11:27 AM
Subject: [PHP] IP of server?


> I want to base the database a PHP script uses on the IP address of the
> server running the script. What is the fastest way to get the IP address
of
> the server from a script? I could use environment variables but they are
> unreliable (when run from cron for example, the environment doesn't have
all
> the variables you would expect). I wrote the following function based on a
> Perl firewall script that uses ifconfig, but it has too much overhead to
> call every time I connect to the database. All I really want to do is add
a
> conf variable to php.ini that gets read at startup and is cached from then
> on. Any ideas?
>
> Thanks!
> Lance
>
> ----
>
> // string gethostaddress([string])
> //
> // Returns the IP address of a network interface for the local host.
> // Returns false on error or if the address cannot be determined.
> //
> // Note: This function shells the ifconfig command so call sparingly.
> //
> function gethostaddress($interface = "eth0")
> {
> $inetaddr = false; // assume failure
>
> $ifconfig = `/sbin/ifconfig $interface`;
> if (ereg("inet addr:([.0-9]+)", $ifconfig, $ifconfigparts))
> $inetaddr = $ifconfigparts[1];
>
> return ($inetaddr) ? $inetaddr : false;
> }
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]






> I want to base the database a PHP script uses on the IP address of the
> server running the script. What is the fastest way to get the IP
> address of
> the server from a script? I could use environment variables but they are
> unreliable (when run from cron for example, the environment
> doesn't have all
> the variables you would expect). I wrote the following function based on a
> Perl firewall script that uses ifconfig, but it has too much overhead to
> call every time I connect to the database. All I really want to
> do is add a
> conf variable to php.ini that gets read at startup and is cached from then
> on. Any ideas?

Why not test for the enviromental var, if its not there then call your
function, if it is use it?

James
--
James Moore
[EMAIL PROTECTED]
PHP: http://www.php.net/
PHP QA Team: http://qa.php.net/
PHP-GTK: http://gtk.php.net/
VL-SRM: http://www.vl-srm.net/





Using IIS5 on W2K Server, I can't get get the exec() or other similar
commands to work.

This is what I'm doing -

exec( "dir/a-d/b $dir_name", $arFiles )

The array doesn't contain anything! I've tried it with cmd.exe before the
command, but it just seems to get stuck in a loop! Can anyone tell me how to
successfully use this command? Or if not, any other ideas on how to get the
file names inside a directory into an array?

Thanks in Advance,

Shawn Sellars





I've looked various places (the PX, Hotscripts, etc) for
a function that will take a HTML file, strip out all of
the HTML and return just plain text.
Does anyone know if such an animal exists?  Does any
one have a copy of a function that does this?

Thanks for any help you can provide!

Chris




Isn't that what strip_tags() does?

http://www.php.net/manual/en/function.strip-tags.php

Data Driven Design
P.O. Box 1084
Holly Hill, FL 32125-1084

http://www.datadrivendesign.com
http://www.rossidesigns.net
----- Original Message ----- 
From: Boget, Chris <[EMAIL PROTECTED]>
To: Php (E-mail) <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 2:36 PM
Subject: [PHP] HTML to Text


> I've looked various places (the PX, Hotscripts, etc) for
> a function that will take a HTML file, strip out all of
> the HTML and return just plain text.
> Does anyone know if such an animal exists?  Does any
> one have a copy of a function that does this?
> 
> Thanks for any help you can provide!
> 
> Chris
> 





> Isn't that what strip_tags() does?
> http://www.php.net/manual/en/function.strip-tags.php

I looked all over the documentation and I did not see this
function.  Now I feel all stupid.  Especially when most of
my posts to the mailing list refer people to the docs... :p

Thanks.

Chris




hi,

I've been driving myself bonkers trying to figure out wy this code block
does not work as it is supposed to.   am hoping that someone on this list
can shed some light on it.

Whta I am trying to do is evluate two arrays.  One array is populated with
a list.  The other array is populated with list items that are found in
the first array.  Array 2 can have either all of the items found in array
1, some, or none.  I want to create a marker that would tell me which
items in array 2 are found in array 1 and where.

My code so far:

for argument sake lets say:

$add[$key] ($key defined earlier) is equal to "a, b, e, g"
$add[$key] is the second array

$$key is the second array, and it equals "a, b, c, d, e, f, g, h, i"
$$key is the first array.


code block:

            $x = 0;
            do
            {
               for ($y = 0; $y <= count ($add[$key]); $y++)
               {
                  if ($add[$key][$y] == $$key[$x])
                  {
                     $mark[$x] = $x;
                  }
               }
               $x++;
            }while ($x < count ($$key));

So, the idea is that every time $add[$key] at "Y" position is equal to
$$key at X position, a third array is populated with the location value of X.

but this is not what I am getting spti back at me.  $mark is populated
every iteration of the inner loop regardless if $add[$key][$y] ==
$$key[$x]

Any suggestions?

thanks!

Michael





I think array_intersect() and array_diff() is useful for you..

http://www.php.net/manual/en/function.array-intersect.php
http://www.php.net/manual/en/function.array-diff.php

--
Yasuo Ohgaki


"Institute for Social Ecology" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi,
>
> I've been driving myself bonkers trying to figure out wy this code block
> does not work as it is supposed to.   am hoping that someone on this list
> can shed some light on it.
>
> Whta I am trying to do is evluate two arrays.  One array is populated with
> a list.  The other array is populated with list items that are found in
> the first array.  Array 2 can have either all of the items found in array
> 1, some, or none.  I want to create a marker that would tell me which
> items in array 2 are found in array 1 and where.
>
> My code so far:
>
> for argument sake lets say:
>
> $add[$key] ($key defined earlier) is equal to "a, b, e, g"
> $add[$key] is the second array
>
> $$key is the second array, and it equals "a, b, c, d, e, f, g, h, i"
> $$key is the first array.
>
>
> code block:
>
>             $x = 0;
>             do
>             {
>                for ($y = 0; $y <= count ($add[$key]); $y++)
>                {
>                   if ($add[$key][$y] == $$key[$x])
>                   {
>                      $mark[$x] = $x;
>                   }
>                }
>                $x++;
>             }while ($x < count ($$key));
>
> So, the idea is that every time $add[$key] at "Y" position is equal to
> $$key at X position, a third array is populated with the location value of X.
>
> but this is not what I am getting spti back at me.  $mark is populated
> every iteration of the inner loop regardless if $add[$key][$y] ==
> $$key[$x]
>
> Any suggestions?
>
> thanks!
>
> Michael
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Someone else installed the PHP4.0.4, but I couldn't find the php.ini anywhere (I used 
"find" command to search the whole box), however, the PHP is working fine. Is it 
possible that the PHP can still work without php.ini?


Thanks.





You should look in one of the following areas:

/etc
/etc/httpd
/etc/httpd/conf
/user/local

You may also want to use the locate instead of find.  locate php.ini
should do it.

Michael Ridinger

On Wed, 28 Mar 2001, Zhu George-CZZ010 wrote:

> Someone else installed the PHP4.0.4, but I couldn't find the php.ini anywhere (I 
>used "find" command to search the whole box), however, the PHP is working fine. Is it 
>possible that the PHP can still work without php.ini?
> 
> 
> Thanks.
> 
> 





look in either /usr/local/lib or in /etc/lib

-----Original Message-----
From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 9:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP] No php.ini?


Someone else installed the PHP4.0.4, but I couldn't find the php.ini anywhere (I used 
"find" command to search the whole box), however, the PHP is working fine. Is it 
possible that the PHP can still work without php.ini?


Thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Or create a phpinfo file containing

<?php
phpinfo();
?>

And that will tell you the location of php.ini.

- James 


> -----Original Message-----
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: March 28, 2001 3:13 PM
> To: Zhu George-CZZ010; [EMAIL PROTECTED]
> Subject: RE: [PHP] No php.ini?
> 
> 
> look in either /usr/local/lib or in /etc/lib
> 
> -----Original Message-----
> From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 9:06 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] No php.ini?
> 
> 
> Someone else installed the PHP4.0.4, but I couldn't find the 
> php.ini anywhere (I used "find" command to search the whole box), 
> however, the PHP is working fine. Is it possible that the PHP can 
> still work without php.ini?
> 
> 
> Thanks.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 




Thanks to all for the suggestions.

I used 

<?php
phpinfo();
?>

and it shows that php.ini is in /usr/local/lib,  but actually, it's not there. Pretty 
strange.

Thanks.


-----Original Message-----
From: James Atkinson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 5:14 PM
To: Zhu George-CZZ010; [EMAIL PROTECTED]
Subject: RE: [PHP] No php.ini?



Or create a phpinfo file containing

<?php
phpinfo();
?>

And that will tell you the location of php.ini.

- James 


> -----Original Message-----
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: March 28, 2001 3:13 PM
> To: Zhu George-CZZ010; [EMAIL PROTECTED]
> Subject: RE: [PHP] No php.ini?
> 
> 
> look in either /usr/local/lib or in /etc/lib
> 
> -----Original Message-----
> From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 9:06 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] No php.ini?
> 
> 
> Someone else installed the PHP4.0.4, but I couldn't find the 
> php.ini anywhere (I used "find" command to search the whole box), 
> however, the PHP is working fine. Is it possible that the PHP can 
> still work without php.ini?
> 
> 
> Thanks.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 




it maybe a hidden file

-----Original Message-----
From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 9:27 AM
To: 'James Atkinson'; [EMAIL PROTECTED]
Subject: RE: [PHP] No php.ini?


Thanks to all for the suggestions.

I used 

<?php
phpinfo();
?>

and it shows that php.ini is in /usr/local/lib,  but actually, it's not there. Pretty 
strange.

Thanks.


-----Original Message-----
From: James Atkinson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 5:14 PM
To: Zhu George-CZZ010; [EMAIL PROTECTED]
Subject: RE: [PHP] No php.ini?



Or create a phpinfo file containing

<?php
phpinfo();
?>

And that will tell you the location of php.ini.

- James 


> -----Original Message-----
> From: Peter Houchin [mailto:[EMAIL PROTECTED]]
> Sent: March 28, 2001 3:13 PM
> To: Zhu George-CZZ010; [EMAIL PROTECTED]
> Subject: RE: [PHP] No php.ini?
> 
> 
> look in either /usr/local/lib or in /etc/lib
> 
> -----Original Message-----
> From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 9:06 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] No php.ini?
> 
> 
> Someone else installed the PHP4.0.4, but I couldn't find the 
> php.ini anywhere (I used "find" command to search the whole box), 
> however, the PHP is working fine. Is it possible that the PHP can 
> still work without php.ini?
> 
> 
> Thanks.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





On Thu, 29 Mar 2001 08:57, Zhu George-CZZ010 wrote:
> Thanks to all for the suggestions.
>
> I used
>
> <?php
> phpinfo();
> ?>
>
> and it shows that php.ini is in /usr/local/lib,  but actually, it's not
> there. Pretty strange.
>
> Thanks.
>

Actually, it shows where PHP will _look_ for php.ini. If it doesn't find 
it, built in defaults are used. 

The PHP installation process does _not_ install php.ini - you need to do 
that yourself; there are two sample ini files in the distribution that 
you can modify to meet your needs. Make sure you put the in the place 
shown in the phpinfo output, and if running PHP as an Apache module, 
mmake sure you restart apache to cause the ini file to be reread.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




it does .. its the garbage collection /session life if you leave it set to 0 and the 
GC @ 1 it will delete them on close

-----Original Message-----
From: Andrius Lokotash [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 8:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] odd


Hi.

It seems that PHP don't clean up it's temporary session files, is this a
"feature" or bug?

PHP versions used 4.0.1pl1 to 4.0.4-pl1


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






only way i can think of is to use session and pass them across in session varibles .. 
providing your using php4
-----Original Message-----
From: elias [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 5:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Post but not Post


Hello.

we all know that we can send variables to another PHP file via <form> tag
and with post method.
now i wonder if i can send variables from a script to another like POST
method but not using form tags.
like my question is how can i transfer data from form to form like the POST
of the <form> tag, but w/o session variables or cookies, or url parameters
(like the GET method), and w/o forms ofcourse?

Currently, i'm doing this via hidden forms and automatic posting via
JavaScript, but is there is any clean and better way?

Thanks.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





Use fsockopen to send the data:

$host = "your.host";
$port = 80;
$postdata = "field1=value1&field2=value2&field3=value3";

if ($sp = fsockopen($host, $port)) {
  fputs($sp,"POST /path/to/script.php HTTP/1.0\n");
  fputs($sp,"Host: $host\n");
  fputs($sp,"Content-type: application/x-www-form-urlencoded\n");
  fputs($sp,"Content-length: ".strlen($postdata)."\n");
  fputs($sp,"Connection: close\n\n");
  fputs($sp,$postdata);
  fclose($sp);
}

jason


> Hello.
>
> we all know that we can send variables to another PHP file via <form> tag
> and with post method.
> now i wonder if i can send variables from a script to another like POST
> method but not using form tags.
> like my question is how can i transfer data from form to form like the
POST
> of the <form> tag, but w/o session variables or cookies, or url parameters
> (like the GET method), and w/o forms ofcourse?
>
> Currently, i'm doing this via hidden forms and automatic posting via
> JavaScript, but is there is any clean and better way?
>
> Thanks.







I was just doing this a while back and ran into problems when going to 443.
Any ideas on that?  A regular fsockopen failed because of the security
needed.

-Bob

-----Original Message-----
From: Jason Brooke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 5:55 PM
To: Peter Houchin; [EMAIL PROTECTED]
Subject: Re: [PHP] Post but not Post


Use fsockopen to send the data:

$host = "your.host";
$port = 80;
$postdata = "field1=value1&field2=value2&field3=value3";

if ($sp = fsockopen($host, $port)) {
  fputs($sp,"POST /path/to/script.php HTTP/1.0\n");
  fputs($sp,"Host: $host\n");
  fputs($sp,"Content-type: application/x-www-form-urlencoded\n");
  fputs($sp,"Content-length: ".strlen($postdata)."\n");
  fputs($sp,"Connection: close\n\n");
  fputs($sp,$postdata);
  fclose($sp);
}

jason


> Hello.
>
> we all know that we can send variables to another PHP file via <form> tag
> and with post method.
> now i wonder if i can send variables from a script to another like POST
> method but not using form tags.
> like my question is how can i transfer data from form to form like the
POST
> of the <form> tag, but w/o session variables or cookies, or url parameters
> (like the GET method), and w/o forms ofcourse?
>
> Currently, i'm doing this via hidden forms and automatic posting via
> JavaScript, but is there is any clean and better way?
>
> Thanks.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






> I was just doing this a while back and ran into problems when going to
443.
> Any ideas on that?  A regular fsockopen failed because of the security
> needed.
>
> -Bob

Probably because you weren't following the SSL protocol
You'll find the curl functions useful for SSL posting - or even non SSL

jason







Hi, I am a newbie in the field oh php and databasing, but I would like
to learn a bit to create a database driven site. I want to have a
database with products, and the html pages for the products and
categories are 'built' automatically from templates.

First of all, am I right in thinking that PHP (and a database) is the
way to do this?

Secondly is CodeCharge [ http://www.codecharge.com ] any good? I was
thinking of trying it, but I want to make sure that it is not a
"FrontPage" type program (generating bad code). I don't want to try to
understand code that is wrong.

Are there any other programs that will create the php code for me?

Any help / pointers / suggestions much appreciated,

Cheers, Donald






> try rawurlencode()

Or just plain urlencode() - remember to use urldecode() on the other side if
you plan on putting it in the DB.

--Joe


> 
> -- 
> Christian Reiniger
> LGDC Webmaster (http://sunsite.dk/lgdc/)
> 
> /* you are not expected to understand this */
> 
> - from the UNIX V6 kernel source
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*****************************\
 *    Joe Stump              *
 *    www.Care2.com          *   
 *    Office: 650.328.0198   *
 *    Extension: 122         *
\*****************************/
        www.miester.org

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------





Hello everyone-
I have a pretty easy question that I can't seem to answer myself so I'm
coming to you all.  Below you'll see some html code for a form.  Now what
happens is that when I click on one of the images to submit the form (either
on the update_event.gif image or the delete_event.gif image) the form goes
to redirect.php.  The problem I am having is that I have a switch statement
which runs off the variable "button" on the redirect.php page (hence the
name="button" in the form).  However, you would think if you clicked on the
update_event.gif that "button" would be set to "updateEvent" on the
redirect.php page.  Well it isn't set to anything at all!  Here's the other
problem, since I have two different acctions I can do on the same page I
can't do Hidden variables on this page because I can't have button being two
different values.

Anyway, what I need is when a user clicks on the image to submit the form I
need the button to be set to the correct value.  Any suggestions on how to
do this??

<form action="redirect.php" method="post">

<input type="image" border="0" name="button" src="images/update_event.gif"
value="updateEvent">

<input type="image" border="0" name="button" src="images/delete_event.gif"
value="deleteEvent">

</form>

Thanks!
Jay Paulson
Developer, Web Technologies
Viatel, Inc.
http://www.viatel.com




For images i think its different, i don't think you can force the image name
that value
instead the value gets turned into "button_x" and "button_y" with relation
to where the mouse clicked on the image. In any event try using GET method
instead of POST method to see whats displayed on the  url string then you
will have your answer

----- Original Message -----
From: "Paulson, Joseph V. "Jay"" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 3:51 PM
Subject: [PHP] Easy HTML PHP question


> Hello everyone-
> I have a pretty easy question that I can't seem to answer myself so I'm
> coming to you all.  Below you'll see some html code for a form.  Now what
> happens is that when I click on one of the images to submit the form
(either
> on the update_event.gif image or the delete_event.gif image) the form goes
> to redirect.php.  The problem I am having is that I have a switch
statement
> which runs off the variable "button" on the redirect.php page (hence the
> name="button" in the form).  However, you would think if you clicked on
the
> update_event.gif that "button" would be set to "updateEvent" on the
> redirect.php page.  Well it isn't set to anything at all!  Here's the
other
> problem, since I have two different acctions I can do on the same page I
> can't do Hidden variables on this page because I can't have button being
two
> different values.
>
> Anyway, what I need is when a user clicks on the image to submit the form
I
> need the button to be set to the correct value.  Any suggestions on how to
> do this??
>
> <form action="redirect.php" method="post">
>
> <input type="image" border="0" name="button" src="images/update_event.gif"
> value="updateEvent">
>
> <input type="image" border="0" name="button" src="images/delete_event.gif"
> value="deleteEvent">
>
> </form>
>
> Thanks!
> Jay Paulson
> Developer, Web Technologies
> Viatel, Inc.
> http://www.viatel.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





This will give you the description

  $table = 'table_name';
  $sql = "desc $table";
  $r = mysql_query();
  while($row = mysql_fetch_assoc($r))
  {
    echo implode(' :: ',$row); 
  }

This will give you the dump:

$mysqldump = '/usr/local/mysql/bin/mysqldump';
$dump = `$mysqldump -u $user -p $password -d $table`;
highlight_string($dump)


--Joe

  

On Wed, Mar 28, 2001 at 06:21:29AM -0500, [EMAIL PROTECTED] wrote:
> Hi,
> 
> Is there any way in PHP to print out the schema of my database tables?
> 
> Cheers
> Ade
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
/*****************************\
 *    Joe Stump              *
 *    www.Care2.com          *   
 *    Office: 650.328.0198   *
 *    Extension: 122         *
\*****************************/
        www.miester.org

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12 
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------





How to I disable the functions show_source and highlight_file?  I can't find any 
documentation anywhere on how to disable it or secure against it.  What is there to 
prevent a user on my server from seeing my password file or database connection 
scripts?

Thanks,

Sam




I'm just installed php4 and apache 1.3 on my linux.

Apache with html files is working fine, but php isn't.

The browser are showing the code.

what I do?

thanks,

Augusto





have you configured your httpd.conf file?
you need to have this line in there.......

AddType application/x-httpd-php .php

you should see info about that if you read the installation file...

-jack

-----Original Message-----
From: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 7:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Instalation


I'm just installed php4 and apache 1.3 on my linux.

Apache with html files is working fine, but php isn't.

The browser are showing the code.

what I do?

thanks,

Augusto


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






I have those lines in httpd.conf:

AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps

if known other tip... you can tell me.

But I'll try your other suggestion, the installation file.

thanks,

Augusto

On Wed, 28 Mar 2001, Jack Dempsey wrote:

> have you configured your httpd.conf file?
> you need to have this line in there.......
> 
> AddType application/x-httpd-php .php
> 
> you should see info about that if you read the installation file...
> 
> -jack
> 
> -----Original Message-----
> From: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 7:31 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Instalation
> 
> 
> I'm just installed php4 and apache 1.3 on my linux.
> 
> Apache with html files is working fine, but php isn't.
> 
> The browser are showing the code.
> 
> what I do?
> 
> thanks,
> 
> Augusto
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





On Thu, 29 Mar 2001 01:16, [EMAIL PROTECTED] wrote:

> > Hello People,
>
> I want to install the version php-4.0.4pl1 on to a RS/6000 with
> AIX4.3.3. IBM HTTP Server 1.3.12.0
> When I use the configure-script with several parameters I get the
> outpout you can see in the attachment.
>
>
> (See attached file: configure_command.txt)
>
>
> Thanks for help
>
> Markus Mattes

This mailing list does not allow attachments. You'll need to repost just 
the relevant section[s] of your configure output as part of your message.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




On Thu, 29 Mar 2001 02:48, Brandon Orther wrote:
> Hello,
>
> I am trying to write some shell scripts in PHP.  I do not know where it
> is because this is a cobalt raq4 and it is embedded with the server
> when it is sent.  If anyone know where it is on raq4's or if you know
> how I can find out please let me know.
>
> Thank you,

You'll need to determine what sort of PHP installation you have; put 
phpinfo() in a script and run it. The info at the top in the configure 
command section should give you a clue. If it refers to apache then you 
have a module rather than a cgi.

If you have the cgi then it will probably be in your apache cgi-bin 
directory, but you should be able to use the Unix 'find' command to 
locate it if you have shell access.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




I tried to put an array into a session, but I can get it to work... here is 
my code:

<pre>
                if(!isset($script_total_time))
                {
                        $script_total_time=(float)$total_time;
                        session_register("script_total_time");
                        $step_times_array[$step]=$total_time;
                        $step_times=serialize($step_times_array);
                        //echo "step_times=\"$step_times\"";
                        //this when not commented, echoes perfectly the string with 
the 
serialized array...
                        session_register("step_times");
                        //so why doesn't it work if $step_times is in fact a string?
                }
                else
                {
                        $script_total_time+=(float)$total_time;
                        $step_times_array=unserialize($step_times);
                        $step_times_array[$step]=$total_time;
                        $step_times=serialize($step_times_array);
                }
</pre>

the variable $script_total_time works like a charm, and it also updates 
perfectly, but the step_times array simply doesn't work... I looked into 
the session-cookie-file and the step_times is set but as empty... I don't 
get what is wrong... For the record this is a code from a script which have 
several steps, all reloads of the same .php file and I want to store the 
execution times for each step (step_times) and the total running time 
(already working)...
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer





Why do you use un/serialize() for array?
If you are using PHP4 session, you don't need it. It's done in session module.
Multiple serialize() may be causing your problem.

--
Yasuo Ohgaki


"Christian Dechery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I tried to put an array into a session, but I can get it to work... here is
> my code:
>
> <pre>
> if(!isset($script_total_time))
> {
> $script_total_time=(float)$total_time;
> session_register("script_total_time");
> $step_times_array[$step]=$total_time;
> $step_times=serialize($step_times_array);
> //echo "step_times=\"$step_times\"";
> //this when not commented, echoes perfectly the string with the
> serialized array...
> session_register("step_times");
> //so why doesn't it work if $step_times is in fact a string?
> }
> else
> {
> $script_total_time+=(float)$total_time;
> $step_times_array=unserialize($step_times);
> $step_times_array[$step]=$total_time;
> $step_times=serialize($step_times_array);
> }
> </pre>
>
> the variable $script_total_time works like a charm, and it also updates
> perfectly, but the step_times array simply doesn't work... I looked into
> the session-cookie-file and the step_times is set but as empty... I don't
> get what is wrong... For the record this is a code from a script which have
> several steps, all reloads of the same .php file and I want to store the
> execution times for each step (step_times) and the total running time
> (already working)...
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I think this question has been asked before, even in PHP Builder, but I
still haven't seen a  plausible answer. :)

Basically, I want to protect images in a folder (it's for a family album
thing). It's going to be on a Linux server and I plan to use .htaccess
to protect the folder. Is there a way to use custom forms (the usual
ones with the Submit button) to allow people to enter the said folder,
and not use the usual pop-ups that IE or Netscape or any browser
presents the user with?

I don't want want people to be able to leech the images without entering
a password.

Thanks in advance for all your help.

- Kyutums





On Thu, 29 Mar 2001 03:31, Glenda Robalino wrote:
> Hi
>
> I'm triying to connect from windows to linux...
> do i have to manipulate grant tables on mysql...
> what should I do??
> thanks
> ciao

Your question is not really clear. If you are trying to access a mysql 
server on a remote machine then you will need to ensure that the remote 
machine is configured to recognise the user and password that is being 
used to connect to the mysql daemon.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA





Hello all,

Of course, apologies if this was covered, I didn't see it in the archives.

I recently upgraded to Apache 1.3.19 and PHP 4.04pl1, and my sessions just .
. . stopped working.

I start the session, register the vars, no errors are generated, but as far
as I can tell the actual value is NOT being saved.
session_is_registered("myvar") returns a 1, but when $myvar returns nothing,
even when I've explicitly set it to a value on the previous page. I set the
value, then register the var.

PHP writes out a session file, but it only contains the names of the vars
I've registered -- shouldn't the values be there as well?

This code was all working, now it's busted, any ideas? Might I have missed a
compile options? I've been taking blind stabs at workarounds with no luck.
Thanks in advance . . .

-- Shane





Since you are using PHP4.0.4pl1, you also should be able to access session vars
with $HTTP_SESSION_VARS.
Dose it make differences?

--
Yasuo Ohgaki


"Shane Iseminger" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hello all,
>
> Of course, apologies if this was covered, I didn't see it in the archives.
>
> I recently upgraded to Apache 1.3.19 and PHP 4.04pl1, and my sessions just .
> . . stopped working.
>
> I start the session, register the vars, no errors are generated, but as far
> as I can tell the actual value is NOT being saved.
> session_is_registered("myvar") returns a 1, but when $myvar returns nothing,
> even when I've explicitly set it to a value on the previous page. I set the
> value, then register the var.
>
> PHP writes out a session file, but it only contains the names of the vars
> I've registered -- shouldn't the values be there as well?
>
> This code was all working, now it's busted, any ideas? Might I have missed a
> compile options? I've been taking blind stabs at workarounds with no luck.
> Thanks in advance . . .
>
> -- Shane
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





> $str = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
>
> I need to fetch the 5th charcter after ".....compatible; M" in $str (ie
> '5').
>
> - The following gets me the fifth character along (ie 'l')
> $variable = substr ($str, 5, 1);
>
> How do i tell the substr to start counting from ".....compatible; M(start
> here)"


use a regular expression:

    ereg("compatible; [A-Z]+ ([0-9]).*", $str, $variable);

or some such..






I have two functions like the ones below.  If the first one creates a
variable as global, shouldn't it be accesible to the second function?

function setGlobal() {
        global $test;

        $test = "123";
}

function getGlobal() {
        global $test;

        echo $test;
}





> -----Original Message-----
> From: Joe Nelson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 6:17 PM
> To: php list
> Subject: [PHP] Variable scope problem
>
>
> I have two functions like the ones below.  If the first one creates a
> variable as global, shouldn't it be accesible to the second function?
>
> function setGlobal() {
>       global $test;
>
>       $test = "123";
> }
>
> function getGlobal() {
>       global $test;
>
>       echo $test;
> }

Global doesn't CREATE global variables, it allows variables to be used as
globals.  For example, in the above setup, you would do this instead:

function setGlobal() {
        global $test;

        $test = "123";

        return $test;
 }

$test = setGlobal();

function getGlobal() {
        global $test;

        echo $test;
 }

And now, getGlobal will echo $test as:

123

Of course, if you are looking to create global variables in a single
function, then you simply would do something like this:

function setGlobal() {
        global $test;

        $test[0] = "123";
        $test[1] = "456";
        $test[2] = "789";

        return $test;
 }

and that would return the array $test, and therefore:

$test = setGlobal();

$test would be an array, and then you could set global in any function $test
and be able to use multiple values (as per the array).  This is easier than
globaling 20 or so values you may need.

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.





hello all. I am attempting to register two session variables that are 
in fact class instances. As per instructions, the definitions for these
classes are prepended to the files being loaded so the class defs
are present when the session starts.

If I do this on the first page:

    session_start();
    session_register("off");
    session_register("req");

where "off" and "req" are actually class instances

and then try this on page two:

    header("Content-Type: text/plain");
    (session_is_registered("req")) ? print("req: yes\n") : print("req: no\n");
    (session_is_registered("off")) ? print("off: yes\n") : print("off: no\n");
    var_dump($req);
    var_dump($off);

I get a response that both $off and $req are registered variables.
however the output of var_dump for $req is null while the output
for $off shows the frozen object.  If I reverse the order of the
session_register on page one, then the var_dump shows values
for $req but not $off.

I am using DB storage for the sessions. my callback functions are
operating - I can see the serialized data in the table for both the
$req and the $off class instances.

Any clues on where I need to look to solve this one?

thanks,
Jeff

Running Apache 1.3.17 w/ PHP4.0.4pl1

'./configure' '--with-apache=../apache_1.3.17' '--enable-track-vars'
                               '--with-xml' '--with-dom' 
'--with-ibm-db2=/usr/IBMdb2/V6.1/'
                               '--with-zlib' '--with-curl' '--with-pspell' 
'--with-mcrypt' '--with-sablot'
                               '--enable-sablot-errors-descriptive' 
'--enable-inline-optimization'
                               '--enable-trans-sid'
'--with-config-file-path=/opt/gr/oas/lib/'

session data in php.ini is:

[Session]
session.save_handler      = user    
session.save_path         = SESSION 
session.use_cookies       = 1
session.name              = XXXXXX (removed)  
session.auto_start        = 0      
session.cookie_lifetime   = 0      
session.cookie_path       = /   
session.cookie_domain     = .xxx.com (removed)
session.serialize_handler = php    
session.gc_probability    = 1
session.gc_maxlifetime    = 600




In article <99u746$gra$[EMAIL PROTECTED]>, "Jeff Warrington"
<[EMAIL PROTECTED]> wrote:

Never mind everybody. It turns out that I had to set the 
odbc_longreadline setting to make sure that the full serialized
session data was read from the DB.

Jeff


> hello all. I am attempting to register two session variables that are in
> fact class instances. As per instructions, the definitions for these
> classes are prepended to the files being loaded so the class defs are
> present when the session starts.
> If I do this on the first page:
> 
>     session_start();
>     session_register("off");
>     session_register("req");
> where "off" and "req" are actually class instances  and then try this on
> page two:
> 
>     header("Content-Type: text/plain");
>     (session_is_registered("req")) ? print("req: yes\n") : print("req:
>     no\n"); (session_is_registered("off")) ? print("off: yes\n") :
>     print("off: no\n"); var_dump($req);
>     var_dump($off);
> I get a response that both $off and $req are registered variables.
> however the output of var_dump for $req is null while the output for
> $off shows the frozen object.  If I reverse the order of the
> session_register on page one, then the var_dump shows values for $req
> but not $off.
> I am using DB storage for the sessions. my callback functions are
> operating - I can see the serialized data in the table for both the $req
> and the $off class instances.
> Any clues on where I need to look to solve this one?  thanks,
> Jeff
> Running Apache 1.3.17 w/ PHP4.0.4pl1
> './configure' '--with-apache=../apache_1.3.17' '--enable-track-vars'
>                                '--with-xml' '--with-dom'
>                                '--with-ibm-db2=/usr/IBMdb2/V6.1/'
>                                '--with-zlib' '--with-curl'
>                                '--with-pspell' '--with-mcrypt'
>                                '--with-sablot'
>                                '--enable-sablot-errors-descriptive'
>                                '--enable-inline-optimization'
>                                '--enable-trans-sid'
> '--with-config-file-path=/opt/gr/oas/lib/'  session data in php.ini is:
> [Session]
> session.save_handler      = user
> session.save_path         = SESSION
> session.use_cookies       = 1
> session.name              = XXXXXX (removed) session.auto_start        =
> 0
> session.cookie_lifetime   = 0
> session.cookie_path       = /
> session.cookie_domain     = .xxx.com (removed) session.serialize_handler
> = php
> session.gc_probability    = 1
> session.gc_maxlifetime    = 600
>




hiya,

What is the best way to get set this to one value?

$system=$myrow['system'];
$serial=$myrow['serial'];
$config"=$myrow['config'];
$avail=$myrow['avail'];
$quote=$myrow['quote'];
$name=$myrow['name'];
$srep=$myrow['srep'];
$custname=$myrow['custname'];
$comp=$myrow['comp'];
$device=$myrow['device'];
$size=$myrow['size'];
$pn=$myrow['pn'];
$type=$myrow['type'];
$box=$myrow['box'];
$card=$myrow['card'];
$cat=$myrow['cat'];


i've tried 
$equ=array("$system=$myrow['system'],
"serial"=$myrow['serial'],
"config"=$myrow['config'],
"avail"=$myrow['avail'],
"quote"=$myrow['quote'],
"name"=$myrow['name'],
"srep"=$myrow['srep'],
"custname"=$myrow['custname'],
"comp"=$myrow['comp'],
"device"=$myrow['device'],
"size"=$myrow['size'],
"pn"=$myrow['pn'],
"type"=$myrow['type'],
"box"=$myrow['box'],
"card"=$myrow['card'],
"cat"=$myrow['cat']");

as well as $equ=("$system=$myrow['system'],
"serial"=$myrow['serial'],
"config"=$myrow['config'],
"avail"=$myrow['avail'],
"quote"=$myrow['quote'],
"name"=$myrow['name'],
"srep"=$myrow['srep'],
"custname"=$myrow['custname'],
"comp"=$myrow['comp'],
"device"=$myrow['device'],
"size"=$myrow['size'],
"pn"=$myrow['pn'],
"type"=$myrow['type'],
"box"=$myrow['box'],
"card"=$myrow['card'],
"cat"=$myrow['cat']");
but to no avail... 
any suggestions would be great .. thanks

Peter Houchin
[EMAIL PROTECTED]
=========================================================
     _____                              __   /\
    /_/_/_\                            /  |_/  \
   /_/_/_    __  __  __   __          /         \
   \_/_/_\  /_/ /_/ /_/  /_/          \   _     /
 ___\_\_\/ /_/_/_/ /_//\/_/            \_/ \/\_/
 \_//_/_/ /_/_/_/ /_/ \/_/                    v
     ________   ________________________________________
    /_/_/_/_/  /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
   /_/_ _/_/ ______  __   __  /_/ ____      __     ______
  /_/_/_/_/ /_/_/_/ /_/  /_/ /_/ /_/\_\    /_/    /_/_/_/
 /_/  \_\  /_/ _/  /_//\/_/ /_/ /_/__\_\  /_/___ _\_\_\
/_/    \_\/_/_/_/ /_/ \/_/ /_/ /_/    \_\/_/_/_//_/_/_/
=========================================================
Telephone : (03) 9329 1455  Facsimile : (03) 9329 6755
************* We rent the dot in .COM!  **************
 




In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Peter Houchin") wrote:

> What is the best way to get set this to one value?
> 
> $system=$myrow['system'];
> $serial=$myrow['serial'];
> $config"=$myrow['config'];

<snip much more of the same>

extract($myrow);

Done.  :-)

See <http://www.php.net/extract/> for more info.

-- 
CC




Hello,
Could someone point me in the right direction...
I need to edit existing records in a mysql database using PHP.

Thanks in advance
Curtis






> Could someone point me in the right direction...
> I need to edit existing records in a mysql database using PHP.

http://www.phpwizard.net/

You want phpMyAdmin.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!




Addressed to: "Reuben D Budiardja" <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from "Reuben D Budiardja" <[EMAIL PROTECTED]> Wed, 28 Mar 2001 
12:44:55 -0500
>
> Yes, that would be really cool. I my self has tried to find a way to do
> this, and throw this question to the list sometimes ago... no repond.
>
> What would be great, if we can do this, is that we can somehow create a
> pseudo-private method for classes (since php OO does not have that), and
> limit only a certain file/page can call that pseudo-private method, by
> checking which page call that method.
>
> Please let me know if you find any further information on this. Thanks in
> advance

Having a function able to identify where it was called from has been
discussed on the developers list several times.  The result is that it
would slow down every function too much, even when the feature was not
used.  You will not be seeing this feature in PHP, I am afraid.
Execution speed is very important to the developers.  (And I agree!)




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




I would like to store data from several forms (same form, different data) so
that the info can be written to a database all at once.  The reason being is
that I would like to have all this information tied to information from a
general form.  eg.  I have a general information form in one frame on my
page, and then in another frame below a form for a specific item purchased.
You can purchase several items, therefore several forms filled out. I want
to tie all these items to the info in the general form, so I want to be able
to send all the data to the database at once.  Now I'm wondering if I can
store the data in an arrray in the HTTP body and post data from each form to
it, etc. I don't think its possible but .....can anyone help??

regards







How about use JavaScript to do that. You should be able to access all forms, frames in browser. -- Yasuo Ohgaki ""cam k"" <[EMAIL PROTECTED]> wrote in message 99uart$a48$[EMAIL PROTECTED]">news:99uart$a48$[EMAIL PROTECTED]... > I would like to store data from several forms (same form, different data) so > that the info can be written to a database all at once. The reason being is > that I would like to have all this information tied to information from a > general form. eg. I have a general information form in one frame on my > page, and then in another frame below a form for a specific item purchased. > You can purchase several items, therefore several forms filled out. I want > to tie all these items to the info in the general form, so I want to be able > to send all the data to the database at once. Now I'm wondering if I can > store the data in an arrray in the HTTP body and post data from each form to > it, etc. I don't think its possible but .....can anyone help?? > > regards > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >



Yeah, I thought about that. But then I'm not sure how to get the data from a
javascript array back to php to then send to the database....

I have just been messing around with using arrays as session variables and
it seems to work.

thanks anyway.

""Yasuo Ohgaki"" <[EMAIL PROTECTED]> wrote in message
99ujc9$nvb$[EMAIL PROTECTED]">news:99ujc9$nvb$[EMAIL PROTECTED]...
> How about use JavaScript to do that.
> You should be able to access all forms, frames in browser.
>
> --
> Yasuo Ohgaki
>
>
> ""cam k"" <[EMAIL PROTECTED]> wrote in message
> 99uart$a48$[EMAIL PROTECTED]">news:99uart$a48$[EMAIL PROTECTED]...
> > I would like to store data from several forms (same form, different
data) so
> > that the info can be written to a database all at once.  The reason
being is
> > that I would like to have all this information tied to information from
a
> > general form.  eg.  I have a general information form in one frame on my
> > page, and then in another frame below a form for a specific item
purchased.
> > You can purchase several items, therefore several forms filled out. I
want
> > to tie all these items to the info in the general form, so I want to be
able
> > to send all the data to the database at once.  Now I'm wondering if I
can
> > store the data in an arrray in the HTTP body and post data from each
form to
> > it, etc. I don't think its possible but .....can anyone help??
> >
> > regards
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Warning: <?php_track_vars?> is no longer supported - please use the track_vars INI 
directive instead in d:/website/myphp/do_sendfeedback.php on line 1

Oh no someone stole me command what replaces  <?php_track_vars?>  in PHP4 ??

Philip Newman




Warning: <?php_track_vars?> is no longer supported - please use the
track_vars INI directive instead in d:/website/myphp/do_sendfeedback.php on
line 1

Oh no someone stole me command what replaces  <?php_track_vars?>  in PHP4 ??







Warning: <?php_track_vars?> is no longer supported - please use the
track_vars INI directive instead in d:/website/myphp/do_sendfeedback.php on
line 1

Oh no someone stole me command what replaces  <?php_track_vars?>  in PHP4 ??


oops.. umm.. from memory php_track_vars is enabled by default in PHP4..

from doccos:

    Note: As of PHP 4.0.3, track_vars is always turned on, regardless of the
configuration file setting.







Sir,

My problem is how could I detect if the massage that I receive has an attachment and 
how could I view it .

Thank you.... :)




in php how would I ready line by line from a scrolling text box


here are the values I would have in the scrolling text box


a,1
b,2
c,3


After the user hits the submit  button on the form how can I get php to read
the data line by line sort of like it was reading it line by line from a
file.


thanks

randy








> -----Original Message-----
> From: Randy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 8:49 PM
> Cc: [EMAIL PROTECTED]
> Subject: [PHP] scrolling text box
>
>
> in php how would I ready line by line from a scrolling text box
>
>
> here are the values I would have in the scrolling text box
>
>
> a,1
> b,2
> c,3
>
>
> After the user hits the submit  button on the form how can I get
> php to read
> the data line by line sort of like it was reading it line by line from a
> file.
>
>
> thanks
>
> randy


$array = explode("\n", $input);

The input being the stuff fromt he textarea (or the scrolling text box as
you call it)

$array would be an array of the information...$array[0] would be the first
line, $array[1] the second line, etc.

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.





I got this strange problem, maybe a design flaw, please look at it and tell
me what's wrong.

3 files in total

1.php3
----------------------------------
<?php
session_start();
?>
<html>
<FORM action="./2.php3" method="post">
<P>
<input name="var" type="text"><br>
<INPUT type="submit" value="Send">
</FORM>
</html>
----------------------------------

2.php3
----------------------------------
<?php
session_start();
?>
<html>
<?
session_unregister("var");
print $var;
print "<A HREF=\"./3.php3?var=$var\">GO</A>";
?>
</html>
-----------------------------------

3.php3
-----------------------------------
<?php
session_start();
?>
<html>
<?
session_register("var");
print $var;
?>
</html>
------------------------------------

When I goto 1.php3 and type in something in the text field, then goto 2.php3
and click go, it automatically goto 3.php3 with data that I type in 1.php3.
The problem starts when I click BACK button on the browser to 1.php3 and
type in another data and click the button on the form again, but here is the
trouble. I seems to be getting the data I type in First, not the current
one. By using phpinfo(), I cannot find the data are all up to date, I wonder
how this data still ends up sitting there.

Can anyone tell me what's going on?

BTW, going back once again with the second set of data and proceed to 2.php3
seems fine. Could it be cache of browser?







That's because your "variable_order" is "EGPCS". (Default) So your PHP is working fine. -- Yasuo Ohgaki ""Jason Lam"" <[EMAIL PROTECTED]> wrote in message 99uf64$4i9$[EMAIL PROTECTED]">news:99uf64$4i9$[EMAIL PROTECTED]... > I got this strange problem, maybe a design flaw, please look at it and tell > me what's wrong. > > 3 files in total > > 1.php3 > ---------------------------------- > <?php > session_start(); > ?> > <html> > <FORM action="./2.php3" method="post"> > <P> > <input name="var" type="text"><br> > <INPUT type="submit" value="Send"> > </FORM> > </html> > ---------------------------------- > > 2.php3 > ---------------------------------- > <?php > session_start(); > ?> > <html> > <? > session_unregister("var"); > print $var; > print "<A HREF=\"./3.php3?var=$var\">GO</A>"; > ?> > </html> > ----------------------------------- > > 3.php3 > ----------------------------------- > <?php > session_start(); > ?> > <html> > <? > session_register("var"); > print $var; > ?> > </html> > ------------------------------------ > > When I goto 1.php3 and type in something in the text field, then goto 2.php3 > and click go, it automatically goto 3.php3 with data that I type in 1.php3. > The problem starts when I click BACK button on the browser to 1.php3 and > type in another data and click the button on the form again, but here is the > trouble. I seems to be getting the data I type in First, not the current > one. By using phpinfo(), I cannot find the data are all up to date, I wonder > how this data still ends up sitting there. > > Can anyone tell me what's going on? > > BTW, going back once again with the second set of data and proceed to 2.php3 > seems fine. Could it be cache of browser? > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >



FYI Use $HTTP_*_VARS to avoid this kind of problems. Variable order may change server to server, so you might not able to rely on it even if you know well about it. -- Yasuo Ohgaki ""Jason Lam"" <[EMAIL PROTECTED]> wrote in message 99uf64$4i9$[EMAIL PROTECTED]">news:99uf64$4i9$[EMAIL PROTECTED]... > I got this strange problem, maybe a design flaw, please look at it and tell > me what's wrong. > > 3 files in total > > 1.php3 > ---------------------------------- > <?php > session_start(); > ?> > <html> > <FORM action="./2.php3" method="post"> > <P> > <input name="var" type="text"><br> > <INPUT type="submit" value="Send"> > </FORM> > </html> > ---------------------------------- > > 2.php3 > ---------------------------------- > <?php > session_start(); > ?> > <html> > <? > session_unregister("var"); > print $var; > print "<A HREF=\"./3.php3?var=$var\">GO</A>"; > ?> > </html> > ----------------------------------- > > 3.php3 > ----------------------------------- > <?php > session_start(); > ?> > <html> > <? > session_register("var"); > print $var; > ?> > </html> > ------------------------------------ > > When I goto 1.php3 and type in something in the text field, then goto 2.php3 > and click go, it automatically goto 3.php3 with data that I type in 1.php3. > The problem starts when I click BACK button on the browser to 1.php3 and > type in another data and click the button on the form again, but here is the > trouble. I seems to be getting the data I type in First, not the current > one. By using phpinfo(), I cannot find the data are all up to date, I wonder > how this data still ends up sitting there. > > Can anyone tell me what's going on? > > BTW, going back once again with the second set of data and proceed to 2.php3 > seems fine. Could it be cache of browser? > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >



>From the manual,
session_unset ¡X Free all session variables 
session_destroy ¡X Destroys all data registered to a session

What do this document exactly mean?




Erm...I believe session_unset unsets all variables in the session, leaving
the session itself intact. While session_destroy deletes the entire session
and all variables in it.
But I'm not so sure.


"Carfield Yim" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From the manual,
> session_unset ¡X Free all session variables
> session_destroy ¡X Destroys all data registered to a session
>
> What do this document exactly mean?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hey all,

  I'm uploading .gifs using a php script and I'm wondering if there's some
way I can avoid having to set the height/width properties manually.  Windows
stores this info automatically, and so does IE.  Is there some way to read
this information from the file itself? (I host on unix).

Thanks,
john.,







Yup. http://www.php.net/manual/function.getimagesize.php

----------------------------------------------------------------------------
Gfunk - [EMAIL PROTECTED] - http://www.gfunk007.com/


----- Original Message -----
From: "John Fairley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 3:57 PM
Subject: [PHP] Getting .gif properties


> Hey all,
>
>   I'm uploading .gifs using a php script and I'm wondering if there's some
> way I can avoid having to set the height/width properties manually.
Windows
> stores this info automatically, and so does IE.  Is there some way to read
> this information from the file itself? (I host on unix).
>
> Thanks,
> john.,
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





just wondering is their a way to create word docs from php. even rtf
would be nice.
many thanks in advance!

--
Christian Haines
Development Manager

Newsbreaker Webwork Pty Ltd
17 Laurel Road,
Stirling
South Australia
5152

8370 9088
[EMAIL PROTECTED]






On Thu, 29 Mar 2001 15:33, christian wrote:
> just wondering is their a way to create word docs from php. even rtf
> would be nice.
> many thanks in advance!
>

If you don't want formatting, just name a text file with the extension 
.doc and Word will happily open it and add all the Word crap to it.

Alternatively, I think there are some converters out there which could 
take say HTML and convert to RTF or whatever.

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA





I was hoping that this PHP list would be of people developing with PHP, who
have reached some level of familiarity with the product and when they have
had a fair go at solving a problem, they then posted it to the list.  For
example, we have a problem in our code where the last object in an array of
objects sometimes vanishes into thin air depending on whether you
comment-out a block of unrelated code further up the script.

Unfortunately, this list is full of people with questions like "I want to
access a database with PHP. Can someone please send me the source code".

Does anyone know of any other PHP lists that are more suited to non-trivial,
expert-related discussions?

If there aren't any around, I'll start one on Yahoogroups or some other
similar service.

regards
Ian.






> I was hoping that this PHP list would be of people developing 
> with PHP, who have reached some level of familiarity with the product 
> and when they have had a fair go at solving a problem, they then posted 
> it to the list.  For example, we have a problem in our code where the 
> last object in an array of objects sometimes vanishes into thin air 
> depending on whether you comment-out a block of unrelated code further 
> up the script.

Sounds like an interesting problem, but related specifically to your code.
Post it and see..?

> Unfortunately, this list is full of people with questions like "I want to
> access a database with PHP. Can someone please send me the source code".
> 
> Does anyone know of any other PHP lists that are more suited 
> to non-trivial, expert-related discussions?

Well, remember it's called PHP General not PHP Advanced Techy Wizardry. :)

The reason it's general and not advanced is that if they made an advanced
list as you suggest, the newbies would all go there and ask their questions.

There are quite a few experienced, knowledgeable and advanced users around
here. It also helps if you actually ask your questions sometimes too you
know 8)

> If there aren't any around, I'll start one on Yahoogroups or 
> some other similar service.

Feel free to do it, and best of luck. :)

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!




> -----Original Message-----
> From: Ian Harris [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 10:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] This PHP list
>
>
>
> I was hoping that this PHP list would be of people developing
> with PHP, who
> have reached some level of familiarity with the product and when they have
> had a fair go at solving a problem, they then posted it to the list.  For
> example, we have a problem in our code where the last object in
> an array of
> objects sometimes vanishes into thin air depending on whether you
> comment-out a block of unrelated code further up the script.
>
> Unfortunately, this list is full of people with questions like "I want to
> access a database with PHP. Can someone please send me the source code".
>
> Does anyone know of any other PHP lists that are more suited to
> non-trivial,
> expert-related discussions?
>
> If there aren't any around, I'll start one on Yahoogroups or some other
> similar service.
>
> regards
> Ian.


Sounds like a conversation that already happend on this mailing list a few
days ago, and then was dropped.  Maybe you should read some of the previous
postings before continuing this line of thought (for reference) and to
prevent the exact type of postings you are trying to avoid, i.e., Posting
from People who do NOT read the FAQ, older posting, etc.

Also, remember this, most of the time, 'experts' who have problems either
(a) can solve the problem themselves, because that is what a programmer
does, or (b) don't have problems.  Sure, a syntax error here or there, but
most 'experts' I know usually fall into the 'A' category.

Now, don't get me wrong, I would love to see a more professional, higher end
mailing list, but at the same time, having expected the php-general mailing
list to cater to 'Experts' only is a bit egotistical (not the right word,
sounds to harsh that way, but I can think of a better one, so just us the
cant_think_of_word("egotistical") function and it will be all right).

So, before posting next time, please try and read older posts concerning the
same or similar subject, and also try and understand, that while it may seem
non-trivial to you how to connect to PostgreSQL from XXX Server passing
through YYY Software, to many it may not, and that is why this is the
PHP-General Mailing List, not the PHP-Master Mailing List.

This was NOT a flame, and no flame retardent clothing was needed.  =)

Merely trying to quell a possible brush fire.

Jason Lotito
www.NewbieNetwork.net
Where those who can, teach;
and those who can, learn.





Just my .02c... I really hate these sorts of questions... As the previous
poster said, if there was a newbie only list, it'd be full of newbies, and
you'd
never get anything answered cause there'd be only newbies, and newbies
would all come to the advance list to ask their questions.

I'd bet my arm that all the best php programmers of the world, hang out on
this list. I've read heaps of replies by people who _write_ php (shout out
rasmus), and I myself read posts when I can, and without sounding like a
tool, I'm a very experienced PHP developer... But sometimes I have
questions that could be construed as "newbie" because they relate to
something I've never used before, or any reason...

Plus, I like helping the newbies.. I remember the first time I used php, and
I had some learnin' to do back then :-)

----------------------------------------------------------------------------
Gfunk - [EMAIL PROTECTED] - http://www.gfunk007.com/


----- Original Message -----
From: "Jason Murray" <[EMAIL PROTECTED]>
To: "'Ian Harris'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 4:42 PM
Subject: RE: [PHP] This PHP list


> > I was hoping that this PHP list would be of people developing
> > with PHP, who have reached some level of familiarity with the product
> > and when they have had a fair go at solving a problem, they then posted
> > it to the list.  For example, we have a problem in our code where the
> > last object in an array of objects sometimes vanishes into thin air
> > depending on whether you comment-out a block of unrelated code further
> > up the script.
>
> Sounds like an interesting problem, but related specifically to your code.
> Post it and see..?
>
> > Unfortunately, this list is full of people with questions like "I want
to
> > access a database with PHP. Can someone please send me the source code".
> >
> > Does anyone know of any other PHP lists that are more suited
> > to non-trivial, expert-related discussions?
>
> Well, remember it's called PHP General not PHP Advanced Techy Wizardry. :)
>
> The reason it's general and not advanced is that if they made an advanced
> list as you suggest, the newbies would all go there and ask their
questions.
>
> There are quite a few experienced, knowledgeable and advanced users around
> here. It also helps if you actually ask your questions sometimes too you
> know 8)
>
> > If there aren't any around, I'll start one on Yahoogroups or
> > some other similar service.
>
> Feel free to do it, and best of luck. :)
>
> Jason
>
> --
> Jason Murray
> [EMAIL PROTECTED]
> Web Design Team, Melbourne IT
> Fetch the comfy chair!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





On Thu, 29 Mar 2001 16:05, Ian Harris wrote:
> I was hoping that this PHP list would be of people developing with PHP,
> who have reached some level of familiarity with the product and when
> they have had a fair go at solving a problem, they then posted it to
> the list.  For example, we have a problem in our code where the last
> object in an array of objects sometimes vanishes into thin air
> depending on whether you comment-out a block of unrelated code further
> up the script.
>
> Unfortunately, this list is full of people with questions like "I want
> to access a database with PHP. Can someone please send me the source
> code".
>
> Does anyone know of any other PHP lists that are more suited to
> non-trivial, expert-related discussions?
>
> If there aren't any around, I'll start one on Yahoogroups or some other
> similar service.
>
> regards
> Ian.

There are a number of people here who have some skills with PHP and are 
willing to help. The topic of fragmenting the list has been raised 
recently and I think the consensus was that there will always be those 
who follow the knowledge, however many 'expert' lists are set up. Search 
for FAQ on the archives for the whole sordid discussion.

My suggestion would be to stick with the expertise that is on this list.

Cheers
-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA




Being a newbie, and as i'm sure is the case with alot of other newbies, one that 
doesn't have a lot of programming back ground, ask stupid questions to this list 
because for some things that you find easy others, like my self, don't know what to 
look for in the manual ... so we ask it here...  now if it wasn't for the more 
knowledgeable people on this list, I like many others, would be stuck with out any 
where to go .. 

So thanks to those of you that don't complain and crack the s#$@s when newbie become 
repetitive.

Peter

-----Original Message-----
From: Ian Harris [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 4:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] This PHP list



I was hoping that this PHP list would be of people developing with PHP, who
have reached some level of familiarity with the product and when they have
had a fair go at solving a problem, they then posted it to the list.  For
example, we have a problem in our code where the last object in an array of
objects sometimes vanishes into thin air depending on whether you
comment-out a block of unrelated code further up the script.

Unfortunately, this list is full of people with questions like "I want to
access a database with PHP. Can someone please send me the source code".

Does anyone know of any other PHP lists that are more suited to non-trivial,
expert-related discussions?

If there aren't any around, I'll start one on Yahoogroups or some other
similar service.

regards
Ian.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





Hey Peter,

not to keep this discussion going (which of course i do by typing 
this), but i wanted to add a quick comment on what you wrote...in a lot 
of ways, i'm a "newbie" to PHP...i've only been using it seriously for 
a couple months (max)....but, i hate having others figure things out 
for me when i feel like i have the chance at figuring it out...so, i 
really take the time and put in the effort to look through the 
discussions, check the website, think and search, etc...i speak for 
myself of course, but i think the most frustrating thing (in any list, 
not just PHP) is NOT when a "newbie" asks "hey, how come i can't get 
variables within a function" ( the answer being "use global $variable 
name), but when someone posts a question like "i want to connect to 
mysql and display some stuff. how do i do this" Its not really a 
personal insult or anything, but to me, a post like that means that the 
person did not take the time to even read a tutorial; they just want 
someone to do it for them. Also, the "can you give me an example" thing 
is fine; sometimes things are tricky, and i would never tell someone to 
hold a question back. recently i was curious about authentication 
systems, so i looked around on the net, read some posts, looked through 
some books i had, and learned about it on my own, rather than 
typing "can someone tell me how to write an authentication system". 
So, IMHO, the part that gets people riled up is when its pretty obvious 
that the person has not even taken time to read a tutorial or try it on 
their own; the flipside is this: (at least when I see a post like 
this) "ok, i've looked EVERYWHERE, and i can't figure out why 
echo "$ARRAY{VARIABLE}"; won't work? any thoughts? 
That kinda question, in my eyes, is totally understandable. "what does 
echo do?" however is not...
I'm not so much responding to you as giving my .02c about this whole 
topic...and for people who don't know, especially since the really good 
php coders on this list won't say "Sincerely, Rasmus, ( look for my 
name in the credits)" or "Julie, (author of that book people keep 
recommending), there are some SERIOUSLY GOOD coders on this list; 
respect everyone's time and try to figure out what you can for yourself-
-its the best way to learn. When you get stuck, then ask. And for 
people who get really frustrated with the repeated "what's the best PHP 
editor", hell, i just smile and delete the e-mail, waiting to see 
who'll give that poster a nice reply...
ok, sorry for those who're still reading....its 2:30 EST and i'm coding 
a minimum spanning tree in java, so this is a nice break...

best regards to all,
jack

----- Original Message -----
From: "Peter Houchin" <[EMAIL PROTECTED]>
Date: Thursday, March 29, 2001 2:02 am
Subject: RE: [PHP] This PHP list

> Being a newbie, and as i'm sure is the case with alot of other 
> newbies, one that doesn't have a lot of programming back ground, 
> ask stupid questions to this list because for some things that you 
> find easy others, like my self, don't know what to look for in the 
> manual ... so we ask it here...  now if it wasn't for the more 
> knowledgeable people on this list, I like many others, would be 
> stuck with out any where to go .. 
> 
> So thanks to those of you that don't complain and crack the s#$@s 
> when newbie become repetitive.
> 
> Peter
> 
> -----Original Message-----
> From: Ian Harris [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 4:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] This PHP list
> 
> 
> 
> I was hoping that this PHP list would be of people developing with 
> PHP, who
> have reached some level of familiarity with the product and when 
> they have
> had a fair go at solving a problem, they then posted it to the 
> list.  For
> example, we have a problem in our code where the last object in an 
> array of
> objects sometimes vanishes into thin air depending on whether you
> comment-out a block of unrelated code further up the script.
> 
> Unfortunately, this list is full of people with questions like "I 
> want to
> access a database with PHP. Can someone please send me the source 
> code".
> Does anyone know of any other PHP lists that are more suited to 
> non-trivial,
> expert-related discussions?
> 
> If there aren't any around, I'll start one on Yahoogroups or some 
> othersimilar service.
> 
> regards
> Ian.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: php-list-
> [EMAIL PROTECTED]
> 





For those working with ultradev  :
http://www.udzone.com/showDetail.asp?TypeId=4&NewsId=488


Ovidiu




Hello,

   I try to use passthru() command to execute command line in my script.
At Telnet I can use following command to execute my java program and out put
is fine.

$java HelloWorld

   So, I need to embed this command line in the script like this :

//---- java.php ----
<?
passthru("java HelloWorld") ;
?>

   But call through browser its return nothing. no out put , no error
display.
I test my script by log-in Telnet to call the PHP script directly.

$php java.php

   The out put is right.

What should I do ? I  try exec() , system() but result is same.

Thanks,

--
-Tuna-






I need to resize picture (JPEG,PNG) on the fly in PHP.
But, My server very restrictly. I just "user" neither root nor super user.

ImageMagik , GD Library not found on the system.
I have permission to use telnet.
I can use Java command line.

What should I do ?

Thanks

--
-Tuna-







Hi -Tuna-,

@ 1:57:59 AM on 3/29/2001, nicuc.ac.jp wrote:

> I need to resize picture (JPEG,PNG) on the fly in PHP.
> But, My server very restrictly. I just "user" neither root nor super user.
...

If you're not in a restricted shell, or some wacko chrooted
environment you can try to install ImageMagick or NetPBM under your
login directory.

-Brian
--
 PGP is spoken here: 0xE4D0C7C8
 Please do not carbon copy me on list replies.






Hi Brian ,

I can use just following commands no other commands allow.
Is this enough to install ImageMagick ?

//-------------
ar           awk          cat          chmod        clear        compress
cp           crontab      crypt        cut          date         diff
dirname      dos2unix     du           echo         edit         egrep
emacs        emacs-20.3   emacsclient  find         g++          gcc
grep         gunzip       gzip         hash         head         help
hostname     htpasswd     id           java         jobs         joe
kill         less         ln           ls           make         man
mkdir        mkfile       more         mv           mysql        mysqldump
nice         nslookup     pagesize     perl         perldoc      pgp
php          php4         pico         pine         printf       ps
pwd          renice       rm           rmdir        sed          sendmail
sort         spell        tac          tail         tar          test
time         touch        uncompress   uniq         unzip        vi
wc           whereis      whois        zcat         zip
//-------------

-Tuna-


"Brian Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hi -Tuna-,
>
> @ 1:57:59 AM on 3/29/2001, nicuc.ac.jp wrote:
>
> > I need to resize picture (JPEG,PNG) on the fly in PHP.
> > But, My server very restrictly. I just "user" neither root nor super
user.
> ...
>
> If you're not in a restricted shell, or some wacko chrooted
> environment you can try to install ImageMagick or NetPBM under your
> login directory.
>
> -Brian
>






Reply via email to