[PHP] turning on error reporting

2001-05-02 Thread BigVeggie


Could any one tell me how I can turn on error reporting. The server i use has 
it turned off and when there is an error on one of my scripts the page goes 
blank, and i have know idea where or what type the error is. Can it be done 
using a .htaccess file? if it can how?

clint

-- 
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] Weird error...

2001-05-02 Thread elias

For some reason, whenever i run my script for the first time in the browser,
the static source file get parsed and produces errors

My script have JavaScript in it, and also my script calls the
"session_start();"

Now first time the script is beeing run, i view source and see in my static
part of file:

  

knowing that that previous line is a static part, why the ?PHPSESSID got
appeneded to it?

beside that, it changes my original javascript line from:

  


to:

  


As you notice, the JavaScript statment is now erroneous because the single
quote got replaced with another double-quote.

Can any one tell me what's wrong? and how can i overcome this problem?

thanks.

-elias
http://www.eassoft.cjb.net





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




Re: [PHP] hmm sockets (again)

2001-05-02 Thread Joseph Blythe

Mukul Sabharwal wrote:

> Hi,
> 
> I might have missed a follow up or your original
> message, but have you tried socket_set_blocking()

Mukul,

Yes, socket_set_blocking  does not work with the new socket functions, 
it is for the network functions, one must use set_nonblock() which to 
the best of my knowledge does not work under linux (or windows?)

If you do a search in the list achive for sockets you will see some 
posts about this from me which go into more detail.

Regards,

Joseph




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




Re: [PHP] turning on error reporting

2001-05-02 Thread elias

in php.ini, this session
;;
; Error handling and logging ;
;;

key name is "error_reporting", set it to E_ALL while developing...

-elias
http://eassoft.cjb.net


"BigVeggie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Could any one tell me how I can turn on error reporting. The server i use
has
> it turned off and when there is an error on one of my scripts the page
goes
> blank, and i have know idea where or what type the error is. Can it be
done
> using a .htaccess file? if it can how?
>
> clint
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Hosts.

2001-05-02 Thread elias

I'm not sure if www.f2s.com offer Perl5+ but it does offer MySql and Cgi and
PHP i guess.

-elias
http://eassoft.cjb.net

"David Bruce" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> My host is Windows 98, Xitami and unstable MySQL and Perl/CGI.
>
> I'm looking for a *free* host, with CGI, Perl 5+, MySQL access, SSI &
> PHP.
>
> Thanks,
> Owen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] Something like PHP-SHOP-NUKE?

2001-05-02 Thread José León Serna

Hello:
Somebody knows if there are something similar to PHP-Nuke but for a
virtual shop?

Best Regards.
-
VCLCrawler.com, your VCL search engine
http://www.vclcrawler.com

W2Kwm, Windows 2000 interface for XWindow
http://www.vclcrawler.com/w2kwm/index.htm

ebnoud.com, El Boletín No Oficial de Usuarios de Delphi
http://www.ebnoud.com


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




Re: [PHP] Reporting from Database

2001-05-02 Thread Richard Lynch

You should be able to test the ending time field in PHP and output different
display based on that...

Show a snippet of source code.

PS  You've tackled a really hard problem as a beginner -- Calenders *look*
simple, are have all sorts of hidden complexities, as you've discovered.

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Tim Thorburn <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, April 29, 2001 3:50 PM
Subject: [PHP] Reporting from Database


> Hi,
>
> I'm setting up an event calendar for an organization, and I'm running into
> several problems.  Firstly, there seems to be no standardization in the
> event listings - by this I mean that some events are single days while
> others span several days - some events have only one start time during the
> day while others have three or more.
>
> I have the database setup in MySQL already to cope with the different
> listings, however, I want to use a PHP script (version 3.0.16) to display
> the information in a web browser.  This part mostly works, I say mostly,
> because it displays everything in the database that satisfies the search
> (in this case by the month, then by the event).  I would like to have
> someway of making the PHP script determine if there is a value in the
table
> and if not, to not display anything.
>
> An example is as follows:
>
> Event A begins at 10:00AM and goes to 11:30AM, then begins again at 3:30PM
> until 5:00PM.  While Event B simply begins at 1:30PM.  In this example I
do
> not want the second time block to show up for Event B, but I do want it
for
> Event A.
>
> I hope this does not come across as too confusing, but I've been working
on
> it all weekend with my limited beginners knowledge of PHP.
>
> Thanks
> -Tim
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] mailing list

2001-05-02 Thread Richard Lynch

> start sending email (this process would take many minutes). However before
> this script finished, another copy of the same script started, and this
new
> copy was sending emails to the same users again. The original script
> continued. Result: duplicate emails

Wild Guess:

You are using cron and have the settings in your crontab incorrect.

For example:
* * * * * 0 /full/path/to/your/spam/script

This would attempt to execute the script on Sundays.  EVERY MINUTE, during
Sunday, however.

Disclaimer: I probably got the *'s and 0 mixed up a bit.  I'm not a crontab
expert.

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Re: [PHP] how to measure databases

2001-05-02 Thread Richard Lynch

You could maybe write a shell script owned by mysql, but executable by
world, that looks at the file sizes.

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: "Mark Lo" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Sunday, April 29, 2001 8:01 AM
Subject: [PHP] how to measure databases


> Hi,
>
>  I would like to know how to measure how many MB of one particular
> databases is taken in PHP command.  I know I can always use the command of
> du ... .  But this command is not work under apache because the user and
> group are nobody, while the user and group for mysql is mysql, also the
> permission is set to read and write only for mysql user and group.  I
would
> like to know is there any other method to measure the databases then post
it
> on the web.
>
> Thank you
>
> Mark
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] Browser Detection

2001-05-02 Thread Richard Lynch

> Is it possible with PHP (3.0.16) to detect which browser a user has and
> then load an image based on the browser type?  I've found the
get_browser()
> command in the manual, but it doesn't look like that does what I want, or
I
> could just be looking at it wrong.
>
> Has anyone tried this before?  and if so, could you provide some
assistance.

get_browser() only works in conjunction with a nice big fat browscap.ini
file you need to snarf from somewhere.

Probably easier to look at $HTTP_USER_AGENT variable and ereg_match() to
determine what browser it is -- Depending on just how fine-tuned you need to
check.

Check the output from  using a couple browsers.

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] session_register()

2001-05-02 Thread Jennifer

I have been racking my brain with this for hours and I am not
getting anywhere.

session_register doesn't seem to be registering my variables.

Several questions to see if I am even on the right track.

Do you need to register a variable with the session before you
assign it a value?  

session_register should return true if the variable was
successfully registered?

The variable name and it's value should be written to the file
with the same name as session_id()?

Jennifer

-- 
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] FTP

2001-05-02 Thread E K L

Hi all,

   I'm facing this serious problem where i can not ftp to my server. Any 
idea to help to solve the problem? It could be possibly caused by the 
ownership of the ftp folder. But, i don't know which folder is the right ftp 
folder for me to change mode. Please help.


E K

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




Re: [PHP] session_register()

2001-05-02 Thread Richard Verstegen

Maybe this example will help you:

Program 1:



Program 2:




Richard


"Jennifer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have been racking my brain with this for hours and I am not
> getting anywhere.
>
> session_register doesn't seem to be registering my variables.
>
> Several questions to see if I am even on the right track.
>
> Do you need to register a variable with the session before you
> assign it a value?
>
> session_register should return true if the variable was
> successfully registered?
>
> The variable name and it's value should be written to the file
> with the same name as session_id()?
>
> Jennifer
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Weird error...

2001-05-02 Thread Richard Verstegen

Check your php.ini

[SESSION]
url_rewriter.tags =  .


Richard



""elias"" <[EMAIL PROTECTED]> wrote in message
9coco0$uq8$[EMAIL PROTECTED]">news:9coco0$uq8$[EMAIL PROTECTED]...
> For some reason, whenever i run my script for the first time in the
browser,
> the static source file get parsed and produces errors
>
> My script have JavaScript in it, and also my script calls the
> "session_start();"
>
> Now first time the script is beeing run, i view source and see in my
static
> part of file:
>
>src="../images/slogo.gif?PHPSESSID=a969d3d42b6277125c9830a7e09d3cc2">
>
> knowing that that previous line is a static part, why the ?PHPSESSID got
> appeneded to it?
>
> beside that, it changes my original javascript line from:
>
>src="../images/shared1.gif" onmouseover="JavaScript:
> imgmenu1.src='../images/shared1over.gif'" onmouseout='JavaScript:
> imgmenu1.src="../images/shared1.gif"' name="imgmenu1">
>
>
> to:
>
>   
href="../services/hosting/main.php?PHPSESSID=a969d3d42b6277125c9830a7e09d3cc
> 2"> src="../images/shared1.gif?PHPSESSID=a969d3d42b6277125c9830a7e09d3cc2"
> onmouseover="JavaScript: imgmenu1.src="../images/shared1over.gif""
> onmouseout="JavaScript: imgmenu1.src="../images/shared1.gif""
> name="imgmenu1">
>
>
> As you notice, the JavaScript statment is now erroneous because the single
> quote got replaced with another double-quote.
>
> Can any one tell me what's wrong? and how can i overcome this problem?
>
> thanks.
>
> -elias
> http://www.eassoft.cjb.net
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] RE: session array :-/

2001-05-02 Thread Tim Ward

every time you run mainpage.php, the array is being reinitialised. Lose the
line "$myArray=array();".

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -Original Message-
> From: Christian [mailto:[EMAIL PROTECTED]]
> Sent: 30 April 2001 09:17
> To: [EMAIL PROTECTED]
> Subject: session array :-/
> 
> 
> Hi,
> 
> I'm having trouble with a two dimensional array with sessions.
> Following is an example of my code which is split between three pages.
> 
> 
> ### myFunctions.php ###
> 
> function addToMyArray($newStuff)
> {
>global $myArray;
>$myArray[]=array("id"=>$newStuff[myId],"name"=>$newStuff[name]);
> }
> 
> 
> ### mainPage.php ###
> 
> session_start();
> include("myFunctions.php");
> 
> $myArray=array();
> session_register(myArray);
> 
> // add some stuff to myArray here to highlight the prob
> $myArray[]=array("id"=>"1","name"=>"gabby");
> $myArray[]=array("id"=>"2","name"=>"marla");
> 
> ..
> 
> // if conditions meet
>addToMyArray($HTTP_POST_VARS);
> 
> // code to open myOtherWindow.php in a new window.
> 
> // code to submit a form whos action is PHP_SELF
> 
> 
> 
> ### myOtherWindow.php ###
> 
> session_start();
> 
> // code to display contents of myArray
> 
> --
> 
> Now on first call to addToMyArray()
> I have three elements two that I added directly
> and one via the function call.
> 
> Now if the function gets called again there is still
> only 3 elements .. two that I added directly and the
> third one from the latest function call.
> The element from the first call has simply vanished !!!
> And that's my problem, why is the element vanishing ???
> 
> Thanx,
> Christian
> 
> 
> 
> 
> 
> 

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




[PHP] RE: split and array logic

2001-05-02 Thread Tim Ward

depends how reliable the format of the string you're splitting is. If they
are all like your examples then ...

foreach ($stuff as $key=>$element)
{   $dummy = explode(" ", $element);
$stuff[$key] = array();
$stuff[$key]["user"] = $dummy[0];
$stuff[$key]["browser"] = $dummy[2];
}

foreach ($stuff as $element)
{   foreach($element as $field=>$value) echo("$field=>$value");
}

... should do it. if the strings are more complicated you'll need to look at
stristr, substr, etc.

Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -Original Message-
> From: Matthew Luchak [mailto:[EMAIL PROTECTED]]
> Sent: 01 May 2001 19:09
> To: [EMAIL PROTECTED]
> Subject: split and array logic
> 
> 
> 
> I can't quite get the logic to create my own associative arrays:
> 
> if:
> 
>   $stuff[0]="165.33.114.63 anonymous Mozilla/4.0" 
>   $stuff[1]="213.35.354.93 anonymous Mozilla/4.0"
> 
> how do I end up with:
> 
>   $stuff[0][user]="165.33.114.63"
>   $stuff[0][browser]="Mozilla/4.0" 
> 
>   $stuff[1][user]="213.35.354.93"
>   $stuff[1][browser]="Mozilla/4.0" 
> 
> I am hacking away at:
> 
>   foreach( $stuff as $cFile ) {
>   
>   list ($user, $junk, $browser) = split (' ', $cFile);
>   }
> 
> 
> and it hurts.any hints ?
> 
> TIA,
> 
>  
> Matthew Luchak 
> Webmaster
> Kaydara Inc. 
> [EMAIL PROTECTED]
> 
> 

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




RE: [PHP] SQL Query time?

2001-05-02 Thread Anuradha Ratnaweera


I wonder if using microtime() gives _actual_ time spent for the query
while explain gives _processor_ time.

Anuradha

On Thu, 26 Apr 2001, Maxim Maletsky wrote:

> what about microtime() ?
> 
> you can do it your self:
> 
> $start = microtime();
> mysql_query()...
> $stop = microtime();
> 
> $token = round($stop-$start, 3);
> echo "Query took $token seconds";
> 
> I mean this is not as precise as SQL would do itself, but will work
> approximately.
> 
> 
> Sincerely, 
> 
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
> 
> 
> 
> 
> -Original Message-
> From: James, Yz [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 5:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] SQL Query time?
> 
> 
> Hi all,
> 
> I have seen a few pages that echo the time it's taken to execute an SQL
> query, like "The results in the database were returned in 0.3 seconds."
> Anyone know if there's a built in function to display this, and if there is,
> what it is?  My more-than-useless-ISP seems to have taken an aversion to
> allowing me to surf tonight without disconnecting me.
> 
> Thanks.
> James.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




Re: [PHP] date list

2001-05-02 Thread James Holloway

Jon,

Try this ...  I know the code could be trimmed down, but I wrote it this way
for ease of reading.


";
 echo "$month/$day/$year";
 echo "\n";

 $startperiod = $startperiod + 86400;

}
?>


Basically just uses mktime() and getdate()

The 86400 is the number of seconds in the day, and the option value is set
to return in the format -MM-DD (that format's used a lot in MySQL
tables).

Have fun ;)

James.

> 01/01/01-01/07/01
> 01/08/01-01/14/01
> 01/15/01-01/21/01
> etc
> etc
> till the end of 2002 and further in the future eventually
>
> I'd like to make PHP generate this for me so I don't have to handcode it
for
> each year in the future.  I've looked at the date/time functions and I'm a
> bit confused.  Any help would be appreciated.  Thanks!
>
> Jon
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] SQL Select Unique() ?

2001-05-02 Thread Anuradha Ratnaweera


On Thu, 19 Apr 2001, James, Yz wrote:

> Is there a method of extracting rows from a MySQL table Uniquely (as in only
> once) ?. For example, when a user performs a search, using two words,
> it may return the same row twice if the search is spread over two or more
> SQL "selections".  An example:

I am not sure whether you can do it on mysql. On postgresql you can do a

select distinct ...

Anuradha


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




Re: [PHP] LDAP Authentication

2001-05-02 Thread Richard Lynch

>I am trying ot understand how could a PHP script authenticate against a
LDAP tree (NDS) that >is not in the same host?
>
>Anyone has an example about that?

No sample code, but I assume you just pass in the IP or hostname of the
remote server for http://php.net/manual/en/function.ldap-connect.php

Disclaimer:  What I know about LDAP could fit on a matchbook cover, with
room for that cute girl's phone number. :-)

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
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] Sending information between pages???

2001-05-02 Thread Vanden Eynde Pascal

Hello,
I have a page A with a combobox. Next to the combobox I have a link to
another page (B). The idea is that I select a value in my combobox, then
click the link and the value of the selected value in the combobox should be
send to the page B. Is this possible with php and html? I've tried something
like:

aaa
bbb


B

but this didn't work, guess it only works if you insert a value directly in
the link and not a variable.

I thought of working with buttons but the problem got more complicated. Page
A actually is a form (the global form), containing three comboboxes, each
one with a link (to page B). The global form has a submit button which leads
to page C. If I click the global forms button all the values selected in the
comboboxes should be sent (easily done with sessionvariables). If I click a
link then only the value of the combobox under whom the link is found should
be sent to page B. I tried to make  three subforms and to replace the links
with a postbutton but that didn't work (guess subform don't exist cause I
didn't find any information about them). So I tried something like:



aaa
bbb





aaa
bbb





aaa
bbb






 The idea now was when I clicked toB_1 or toB_2 or toB_3 then page B would
be loaded and only one value (of the right combobox) should be sent to page
B. But when I click toC then all three values should be sent to page C.

My question is if there is a solution in php to solve this problem (to send
those variables seperately) and so to solve the above stated problem.

Thanks in advance

Pascal




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




Re: [PHP] Problem with Sablot/PHP4

2001-05-02 Thread ReadOnly

On 30 kwietnia 2001 at 18:23:04
Yasuo Ohgaki <[EMAIL PROTECTED]>
wrote:

> I don't use the extension, but XML assumes UTF-8 charcode. If you
> have problem with ISO-8859-2, how about convert it to UTF-8 using
> iconv module?

XML assumes that parameter "encoding=ISO-8859-2" should work
correctly, but it does NOT work in Sablot/PHP4. And I do not want to
launch any external application from PHP because it will slow down my
web serwer.

--
Yarek


-- 
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] utfdecode() and ISO-8859-2

2001-05-02 Thread ReadOnly

I found that utfdecode() can extract only ISO-8859-1. I need to
convert from UTF-8 to ISO-8859-2? Will it be possible soon?

--
Yarek


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




RE: [PHP] String Type Unknown

2001-05-02 Thread Rudolf Visagie

Hi Nathan,

With compliments:

= "0" AND $LeftHexByte <= "9") {
$LeftOffset = 48;
} else {
$LeftOffset = 55;
}
$RightHexByte = substr($Txt, $i + 1, 1);
if ($RightHexByte >= "0" AND $RightHexByte <= "9") {
$RightOffset = 48;
} else {
$RightOffset = 55;
}
$CharValue = (ord($LeftHexByte) - $LeftOffset) * 16 +
(ord($RightHexByte) - $RightOffset);
$NewTxt .= chr($CharValue);
}

return $NewTxt;

}

$Txt =
"0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120
f";
$Txt .=
"fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2
f5072";
$Txt .=
"6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb
0f252";
$Txt .=
"14a0ffe40ffb803000246000a6c6f6164466163746f724900097468726573686f6c
64787";
$Txt .=
"3f48770800030002740005696d61676574004a3c494d47205352433
d226";
$Txt .=
"87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e74
75726";
$Txt .=
"5732f6c6162732f627269636b735f7765622e6a7067223e7400047465787474020249742069
73206";
$Txt .=
"96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c697461
746f7";
$Txt .=
"220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e20746865
20766";
$Txt .=
"172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d
65206";
$Txt .=
"6616d696c6961722077697468207468652070726f6a6563747320616e64206d617465726961
6c732";
$Txt .=
"0746861742073747564656e74732077696c6c20626520646f696e672c20616e642062652061
77617";
$Txt .=
"265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d73
20616";
$Txt .=
"e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c6961726974
79207";
$Txt .=
"769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e7473
20697";
$Txt .=
"320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f70
65642";
$Txt .=
"06120736570617261746520636f7572736520666f637573696e67206f6e2074686520757365
206f6";
$Txt .=
"620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e20
20416";
$Txt .=
"c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d652074
6f207";
$Txt .= "4616b652074686973206164646974696f6e616c20636f757273652e7870";

?>



Read Hex dump






Cheers,

Rudolf Visagie
QEDI

-Original Message-
From: Nathan Cook [mailto:[EMAIL PROTECTED]]
Sent: 01 May 2001 11:16
To: Rudolf Visagie
Subject: Re: [PHP] String Type Unknown


How were you able to convert that?

Thanks!
Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Rudolf Visagie" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 2:53 AM
Subject: RE: [PHP] String Type Unknown


Hi Nathan,

It's a hex dump and it reads:

ÿÿúÀÿÿÿí sr java.util.Properties9ÿÿý§càÿÿÿ~ L defaultst
Ljava/util/Properties;xr java.util.Hashtableÿÿû°òR ÿÿÿäÿÿûEUR0 $`
¦ÆöDf7F÷$ -F?&W6?öÆG??@ w      t imaget Jhttp://mediabank.edventures.com/edventures/labs/bricks_web.jpg";>t
texttIt is important to emphasize that a facilitator does not need to be
an expert in the various subject areas, but should become familiar with the
projects and materials that students will be doing, and be aware of how to
get help or look up terms and answers.  In particular, familiarity with the
LEGO® elements is highly recommended.  PCS has developed a
separate course focusing on the use of the LEGO® materials.
All facilitators should schedule time to take this additional course.xp

Rudolf Visagie
QEDI

-Original Message-
From: Nathan Cook [mailto:[EMAIL PROTECTED]]
Sent: 30 April 2001 10:31
To: Php List
Subject: [PHP] String Type Unknown


I have this string:

0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f

fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f
5072
6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0
f252
14a0ffe40ffb803000246000a6c6f6164466163746f724900097468726573686f6c6
4787
03f48770800030002740005696d61676574004a3c494d47205352433
d226
87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e747
5726
5732f6c6162732f627269636b735f7765622e6a7067223e74000474657874740202497420697
3206
96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c6974617
46f7
220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e207468652
0766
172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d6
5206
6616d696c6961722077697468207468652070726f6a6563747320616e64206d6174657269616
c732
0746861742073747564656e74732077696c6c20626520646f696e672c20616e6420626520617
7617
265206f6620686f7720746f20676574206

Re: [PHP] Compressing an upload

2001-05-02 Thread Geir Eivind Mork

On Thursday 26 April 2001 00:37, Michael Conley wrote:
>  I am going to have a page that will be used for visitors to upload a file
> to my web server.  I already use gzcompress to compress some of the pages

Just state that all files should be compressed cause you can't do anything 
with the files before they are on your server and then it's too late :)


Content-Type: text/plain; charset="us-ascii"; name="Attachment: 1"
Content-Transfer-Encoding: 7bit
Content-Description: 

stop that

-- 
 php developer / CoreTrek AS| As near as I can tell, you're not any
 Sandnes / Rogaland / Norway| crazier than the average asshole on the 
 web: http://www.moijk.net/ | street.   -- R.P. McMurphy, "One Flew

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




Re: [PHP] Starting PHP script with crontab

2001-05-02 Thread Anuradha Ratnaweera


If you are not careful, anyone will be able to run the script!

Anuradha

On Thu, 19 Apr 2001, Bertjan Schrader wrote:

> I need tot start a PHP script at night with the crontab. I tried to do it
> with lynx (lynx http://www.domain.nl/test.php) as a commandline within the
> crontab. Lynx is starting but the PHP script is not working. Anyone an idea
> how to do it?
> 
> OS:  Redhat Linux 5.2
> Apache
> PHP as a apache module
> 
> thanks!


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




Re: [PHP] template solutions?

2001-05-02 Thread Anuradha Ratnaweera


WML is an easier solution (search freshmeat for wml - website meta
language).

Anuradha

On Sun, 29 Apr 2001, Steven Haryanto wrote:

> Does anyone know a rather advanced template solution in PHP?
> At least one that supports loop and if (like HTML::Template),
> and directives/commands would be nice (like Perl's Template
> Toolkit).
> 
> I am currently rolling my own, but still not happy with the
> result of the design. I'd be happy to use one that is already
> out there.
> 
> Steve
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




Re: [PHP] String Type Unknown

2001-05-02 Thread Anuradha Ratnaweera


Since it contains only digits 0-9 and letters a-f, it looks like
hexadecimal. Why don't you try to read two characters at a time and either
convert them to binary or check their ascii values. There seem to be many
ascii values however.

Where did you get this from?

Anuradha

On Mon, 30 Apr 2001, Nathan Cook wrote:

> I have this string:
> 
> 0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f
> fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f5072
> 6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0f252
> 14a0ffe40ffb803000246000a6c6f6164466163746f724900097
> 
> And I don't know what type it is.  It is it a binary string?  Can I convert it
> to text and if so, how?
> 
> Thank You,
> Nathan Cook
> [EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




Re: [PHP] Please review our coding standards

2001-05-02 Thread Anuradha Ratnaweera


Most of your guidelines match with our practices. Here are some comments.

On Sat, 28 Apr 2001, Steven Haryanto wrote:

> 0.1 We are writing PHP4 application here, not PHP3, nor Perl, Python, etc.
>  So use PHP idioms.

Same here.

> 0.3 Consistency matters.
> 
> 0.4 Standards is important.
> 
> 0.5 Readability matters. Especially since the code will be touched by
>  several developers.

Agreed.

> 1.0 Enclosing PHP code
> 
>  Always use .

We use  here. But sticking to a single method is fine.

> 1.4 Whitespaces
> 
>  - No whitespace after function or method name. Example:
> 
>  exit()

We also use this. But I have seen others using spaces. Even there are some
examples in php-manual with spaces (e.g. array_shift).

>  - Whitespace in expressions are usually not necessary. But use them when
>they enhance readability.
> 
>  $a = $b + $c*(5*time());

We prefer

   $a = $b + $c * (5 * time());

> 1.5 Function names
> 
>  Function names are not case sensitive in PHP. Use the all-lowercase
>  notation.

Since most of us come from good old C regime, this should be the most
readable form.

> 1.6 Quotes
> 
>  Use whichever ones you like. But if you can use '' for simple strings,
>  and "" only if you need interpolation.

This should _very_slightly_ improve performance too.

> 2.2 Debugging comments.
> 
>  # is used to comment out certain parts of a code during debugging.

We always use /* */ because we filter php files through a stripper which
also removes newlines before sent to the real server.

> 2.3 Documentation comments.

We use the style used in the linux kernel.

> 3. Naming

We use all lowercase for variables like "variable", "my_name". Also, in
html forms, analogous variables take the form "variable", "myName".

> 4. File organization

We use WML (website meta language - www.engelschall.com/sw/wml/) with make
to produce single php files and do _not_ use the include feature of php.

Also, we have written scripts that creates diff files between releases.

> 5. Testing

We have few files that are included (WML include and not PHP include) from
every file. The production version and testing versions have different
sets of them, and make rebuilds the site selectively.

> 6. Creating documentation

We use tex, and we are planning to go for texinfo.

> 7. Database programming

We use _only_ postgresql, because of its feature richness and performance.
So no problem of abstraction.

> 8. Error handling
>
> ...
>
> 8.2 Reporting error

We use the guidelines given in "GNU Coding Standards" by Richard Stallman.
 
> 9. Portability

We are expecting portability over POSIX like systems.

Anuradha


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




Re: [PHP] Emanuel virus

2001-05-02 Thread B. van Ouwerkerk


>Once again, if it got passed to any of you, through me, my apologies. I 
>wouldn't trust my anti-virus software on this, I could find any reference 
>to it at Symantec. Maybe it has another name?
>
>Feeling like a leper - Miles Thompson

Look for Navidad or W32/Navidad.e

I think you should also look for a antivirus product. It's less expensive 
then reconfigure your system.. A reinstall is a good cleanup though..

Bye,


B.


-- 
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] open foxpro database

2001-05-02 Thread Benny K. Putera

I used function dbase_xxx to access foxpro database (.dbf) but it's not work.
Here is my code :
  \n";
  }
}
  }
  ?>
Everytime I call this page there's a message :
Warning: unable to open  database /home/benny/test/employee.dbf in  
/home/benny/htdocs/foxpro.php on line 2
I used php 4.0.4 and Visual Fox Pro 5.0.
Before that I have mounted my foxpro dbf file to my linux in the /home/benny/test 
directory.
Is there anything wrong?
Anyone could help me?

Regards;

Benny.


Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at 
http://www.eudoramail.com

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




RE: [PHP] String Type Unknown

2001-05-02 Thread Rudolf Visagie

Nathan,

Another way to do it (but much less fun):




Read Hex dump






Rudolf Visagie
QEDI

-Original Message-
From: Nathan Cook [mailto:[EMAIL PROTECTED]]
Sent: 01 May 2001 11:16
To: Rudolf Visagie
Subject: Re: [PHP] String Type Unknown


How were you able to convert that?

Thanks!
Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Rudolf Visagie" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 2:53 AM
Subject: RE: [PHP] String Type Unknown


Hi Nathan,

It's a hex dump and it reads:

ÿÿúÀÿÿÿí sr java.util.Properties9ÿÿý§càÿÿÿ~ L defaultst
Ljava/util/Properties;xr java.util.Hashtableÿÿû°òR ÿÿÿäÿÿûEUR0 $`
¦ÆöDf7F÷$ -F?&W6?öÆG??@ w      t imaget Jhttp://mediabank.edventures.com/edventures/labs/bricks_web.jpg";>t
texttIt is important to emphasize that a facilitator does not need to be
an expert in the various subject areas, but should become familiar with the
projects and materials that students will be doing, and be aware of how to
get help or look up terms and answers.  In particular, familiarity with the
LEGO® elements is highly recommended.  PCS has developed a
separate course focusing on the use of the LEGO® materials.
All facilitators should schedule time to take this additional course.xp

Rudolf Visagie
QEDI

-Original Message-
From: Nathan Cook [mailto:[EMAIL PROTECTED]]
Sent: 30 April 2001 10:31
To: Php List
Subject: [PHP] String Type Unknown


I have this string:

0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f

fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f
5072
6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0
f252
14a0ffe40ffb803000246000a6c6f6164466163746f724900097468726573686f6c6
4787
03f48770800030002740005696d61676574004a3c494d47205352433
d226
87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e747
5726
5732f6c6162732f627269636b735f7765622e6a7067223e74000474657874740202497420697
3206
96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c6974617
46f7
220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e207468652
0766
172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d6
5206
6616d696c6961722077697468207468652070726f6a6563747320616e64206d6174657269616
c732
0746861742073747564656e74732077696c6c20626520646f696e672c20616e6420626520617
7617
265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d732
0616
e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c69617269747
9207
769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e74732
0697
320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f706
5642
06120736570617261746520636f7572736520666f637573696e67206f6e20746865207573652
06f6
620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e202
0416
c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d6520746
f207
4616b652074686973206164646974696f6e616c20636f757273652e7870

And I don't know what type it is.  It is it a binary string?  Can I convert
it
to text and if so, how?

Thank You,
Nathan Cook
[EMAIL PROTECTED]


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


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




[PHP] ImageCopyResampled() -> Php 4.0.6

2001-05-02 Thread JFL

If I want to use ImageCopyResampled(), do I then need Php 4.0.6 ?
http://www.php.net/manual/en/function.imagecopyresampled.php

--
[ www.eksperten.dk ] Scandinavias biggest IT forum.



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




RE: [PHP] SQL Query time?

2001-05-02 Thread PHPBeginner.com

EXPLAIN gives you the time (through processor?) of the clauses translated
into WHERE (JOIN, GROUP, etc)

if you use 1000 billions of functions in your query, the real time of that
query will be somewhat slower, but not for EXPLAIN.

microtime() is in php, so it gives you the time of when he called the
module, when he received and gave you back the answer.

none of them is precise for the purpose of printing on web. Bad idea.
But for the database design I still prefer EXPLAIN since it is for where's,
where YOU are the one to play with INDEXes and KEYs.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Anuradha Ratnaweera [mailto:[EMAIL PROTECTED]]On Behalf Of Anuradha
Ratnaweera
Sent: Wednesday, May 02, 2001 2:06 PM
To: Maxim Maletsky
Cc: 'James, Yz'; [EMAIL PROTECTED]
Subject: RE: [PHP] SQL Query time?



I wonder if using microtime() gives _actual_ time spent for the query
while explain gives _processor_ time.

Anuradha

On Thu, 26 Apr 2001, Maxim Maletsky wrote:

> what about microtime() ?
>
> you can do it your self:
>
> $start = microtime();
> mysql_query()...
> $stop = microtime();
>
> $token = round($stop-$start, 3);
> echo "Query took $token seconds";
>
> I mean this is not as precise as SQL would do itself, but will work
> approximately.
>
>
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
>
>
>
> -Original Message-
> From: James, Yz [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 5:17 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] SQL Query time?
>
>
> Hi all,
>
> I have seen a few pages that echo the time it's taken to execute an SQL
> query, like "The results in the database were returned in 0.3 seconds."
> Anyone know if there's a built in function to display this, and if there
is,
> what it is?  My more-than-useless-ISP seems to have taken an aversion to
> allowing me to surf tonight without disconnecting me.
>
> Thanks.
> James.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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



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




Re: [PHP] Sort an array

2001-05-02 Thread Geir Eivind Mork

On Monday 30 April 2001 21:19, Brandon Orther wrote:
>  Is there a way to sort an array alphabetically?

two examples
sort -- Sort an array
natsort --  Sort an array using a "natural order" algorithm 

-- 
 php developer / CoreTrek AS| Somehow I reached excess without ever
 Sandnes / Rogaland / Norway| noticing when I was passing through
 web: http://www.moijk.net/ | satisfaction.   -- Ashleigh Brilliant 

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




Re: [PHP] session array :-/

2001-05-02 Thread Richard Lynch

> $myArray=array();

Is this line getting executed that second time?...

Also, I think it's better to register a variable *before* assigning any
value to it...  Whether this is just coding style or it actually matters, I
dunno.

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
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] Help needed with multiple select form element and PHP !

2001-05-02 Thread Nicolas Guilhot

Hi,

I've got a select tag with multiple selection enabled. When the user submit
the form, I want to pass all options from the select to another page. For
this I use javascript to select every element in my select tag. My problem,
is that in PHP, to access all selected elements in an array, I need to give
my select tag a name like 'myselect[]'. If I use this naming, I can't use my
Javascript code to select every element before submitting the form.

How can I get both thing to work : my javascript code to select every
element, and my php code to access every element ??

Thanks for any answer.


-- 
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] Random number generation...

2001-05-02 Thread Tristan . Pretty



Hi there,
A potentially dumb question here.

Is there an easy way to display a random number between 1 and 20?

I have looked on line, but either I am looking inall teh wrong places, or there
isn't this script on-line.

Can anyone point me in the right direction?

Cheers,
Tris...




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

-- 
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] How to catch the output of http:// -> text file?

2001-05-02 Thread Kraa de Simon

Hi,

PHP newbie.

Can anyone help me with the following?

Pseudo code:

for(i=1;i<2000;i++)
{
catch the output of
http://www.mysite.com/kb.html?kbid= 
and put the html code in a text file called
/www/kb/kbid  .html
}

So the end result is 2000 html files on disk "extacted" from the http://
address...

Thanks...

Met vriendelijke groet / With kind regards,

Simon de Kraa
ICL Logistic Systems
mailto:[EMAIL PROTECTED]

---

Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b
SCO UnixWare 7.1.1, Progress 9.1a11

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




Re: [PHP] zlib.output_compression - how to turn it on

2001-05-02 Thread Robert Mena

Yasuo,

thanks for the reply. Yes I do have zlib support
(shows me in phpinfo()).

Sorry the stupid question but How do I check the size
of the page ?

If I access it and use save as I will have the
uncompressed version right ?

Which .ini directive did you use ?

- thanks

>>If you want to check if it is working.

>>Display phpinfo() and check the size of the file.
>>I get 6 KB compressed, where I get 50KB
uncompressed.

>> You have zlib support, right?

--
Yasuo Ohgaki

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

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




RE: [PHP] COM

2001-05-02 Thread Hassan Arteaga


Thanks !!! I will try...
--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]


-Original Message-
From: Iriton Jonath P. Andrade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 8:31 AM
To: Hassan Arteaga
Subject: Re: [PHP] COM


Hi Arteaga,

Instead of using that functions, use the new one shown bellow:

For instantiate an COM object in PHP:

$obj = new COM("ApplicationName.ClassApplicationName");

For properties and methods access:

$obj->property_name;
$obj->method_name;

I have used and tested this function and I have obtained success (using PHP
on Windows 2000 Server). It work very fine.

Regards, Iriton Jonath.



- Original Message -
From: "Hassan Arteaga" <[EMAIL PROTECTED]>
To: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 2:57 PM
Subject: [PHP] COM


Hi all !!

I have components i made in Visual Basic 6.0 and I would like to use with
PHP. I need examples how to create intance from VB COM component...
What function I have to use ?

com_load - ???
com_invoke - ???
com_propget - ???
com_get - ???
com_propput - ???
com_propset - ???
com_set - ???

Thanks in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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



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




RE: [PHP] COM

2001-05-02 Thread Hassan Arteaga

Hi Iriton !!

I tested but with errors..

9   Hello("Hi Hassan");
12 ?>


This is only VB component Hello return the string entered as var...I
receive this error..

Parse error: parse error in C:\Inetpub\wwwroot\myphp\com.php on line 10

Thanks in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]


-Original Message-
From: Iriton Jonath P. Andrade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 8:31 AM
To: Hassan Arteaga
Subject: Re: [PHP] COM


Hi Arteaga,

Instead of using that functions, use the new one shown bellow:

For instantiate an COM object in PHP:

$obj = new COM("ApplicationName.ClassApplicationName");

For properties and methods access:

$obj->property_name;
$obj->method_name;

I have used and tested this function and I have obtained success (using PHP
on Windows 2000 Server). It work very fine.

Regards, Iriton Jonath.



- Original Message -
From: "Hassan Arteaga" <[EMAIL PROTECTED]>
To: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 2:57 PM
Subject: [PHP] COM


Hi all !!

I have components i made in Visual Basic 6.0 and I would like to use with
PHP. I need examples how to create intance from VB COM component...
What function I have to use ?

com_load - ???
com_invoke - ???
com_propget - ???
com_get - ???
com_propput - ???
com_propset - ???
com_set - ???

Thanks in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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



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




Re: [PHP] Random number generation...

2001-05-02 Thread elias

why not use the rand() ?

manual says:

rand -- Generate a random value
Description

int rand ([int min [, int max]])


If called without the optional min, max arguments rand() returns a
pseudo-random value between 0 and RAND_MAX. If you want a random number
between 5 and 15 (inclusive), for example, use rand (5, 15).

Remember to seed the random number generator before use with srand().

-elias
http://eassoft.cjb.net


<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> Hi there,
> A potentially dumb question here.
>
> Is there an easy way to display a random number between 1 and 20?
>
> I have looked on line, but either I am looking inall teh wrong places, or
there
> isn't this script on-line.
>
> Can anyone point me in the right direction?
>
> Cheers,
> Tris...
>
>
>
>
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
>
> **
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




RE: [PHP] Random number generation...

2001-05-02 Thread Jon Haworth

Wotcha Tris :-)

Try this:

mt_srand((double)microtime()*100);
$my_random_number = mt_rand(1, 20);

HTH
Jon


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 02 May 2001 12:07
To: [EMAIL PROTECTED]
Subject: [PHP] Random number generation...




Hi there,
A potentially dumb question here.

Is there an easy way to display a random number between 1 and 20?

I have looked on line, but either I am looking inall teh wrong places, or
there
isn't this script on-line.

Can anyone point me in the right direction?

Cheers,
Tris...




**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.


**

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



**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or
confidentiality'

**

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




Re: [PHP] Random number generation...

2001-05-02 Thread Avetis Avagyan



Regards,
Avetis

[EMAIL PROTECTED] wrote:

> Hi there,
> A potentially dumb question here.
>
> Is there an easy way to display a random number between 1 and 20?
>
> I have looked on line, but either I am looking inall teh wrong places, or there
> isn't this script on-line.
>
> Can anyone point me in the right direction?
>
> Cheers,
> Tris...
>
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> **
>
> --
> 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]

--
[EMAIL PROTECTED]
ICT Specialist
UNDP, Armenia



-- 
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] Next SEMPUG meeting - this Thursday

2001-05-02 Thread Michael Kimsal

Hello all.

Our next PHP user group meeting will be held this coming Thursday, May
3rd
(the first Thursday of the month) at our office in downtown Ypsilanti,
MI.
(125 North Huron, #400, to be exact).

We normally meet around 7ish for drinks/eats beforehand, and get started
at 8.
Keith Elder will be giving an introductory overview of PHP (syntax,
usage,
benefits, examples, etc.)

Please call 734-480-9961 should you have any questions or need
directions.
RSVP is appreciated, but not necessary.

Thanks all.  :)

Michael Kimsal

-- 
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] $hello ?

2001-05-02 Thread elias

hello,

i got myfile.txt saying:
  i say: $hello

now i write a script like:
 $hello = "hello world";
 $lines = join("\n", file("myfile.txt"));
method 1:
===
  echo("\$text = \"\$lines\";");
  var_dump($text);

method 2:

  $temp = $var;
  $text   = $temp;


none of the method assigns the value "i say: hello world" to $text
they both still parse $text to "i say: $hello"

How can i solve this, I know it's silly,...but i surrender at the moment...

-elias
http://eassoft.cjb.net





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




Re: [PHP] $hello ?

2001-05-02 Thread elias

sorry, in method 1 i meant: eval() instead of echo()

""elias"" <[EMAIL PROTECTED]> wrote in message
9cp0io$uuf$[EMAIL PROTECTED]">news:9cp0io$uuf$[EMAIL PROTECTED]...
> hello,
>
> i got myfile.txt saying:
>   i say: $hello
>
> now i write a script like:
>  $hello = "hello world";
>  $lines = join("\n", file("myfile.txt"));
> method 1:
> ===
>   echo("\$text = \"\$lines\";");
>   var_dump($text);
>
> method 2:
> 
>   $temp = $var;
>   $text   = $temp;
>
>
> none of the method assigns the value "i say: hello world" to $text
> they both still parse $text to "i say: $hello"
>
> How can i solve this, I know it's silly,...but i surrender at the
moment...
>
> -elias
> http://eassoft.cjb.net
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




[PHP] About last release

2001-05-02 Thread Hassan Arteaga

Hi all !!

I have PHP 4.0.4 on Win98, PWS PC and I would like to install 4.0.5 but is
only for CGI ? I installed PHP 4.0.4 with an exe file...I didn't
nothing..only double-click.. I need that file again but with PHP 4.0.5
version..Thanks !!!

If not ..then I'll read install file.

Thanks 

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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




RE: [PHP] Random number generation...

2001-05-02 Thread Jon Haworth

The manual also says:
  mt_rand -- Generate a better random value

I've been using mt_rand() over rand() every time - is there any reason not
to?

Cheers
Jon


-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: 03 May 2001 00:05
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Random number generation...


why not use the rand() ?

manual says:

rand -- Generate a random value
Description

int rand ([int min [, int max]])


If called without the optional min, max arguments rand() returns a
pseudo-random value between 0 and RAND_MAX. If you want a random number
between 5 and 15 (inclusive), for example, use rand (5, 15).

Remember to seed the random number generator before use with srand().

-elias
http://eassoft.cjb.net


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

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




Re: [PHP] Help needed with multiple select form element and PHP !

2001-05-02 Thread elias

try this,


  
line1
line2
line3
  
  






should help you out!

-elias
http://eassoft.cjb.net

""Nicolas Guilhot"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I've got a select tag with multiple selection enabled. When the user
submit
> the form, I want to pass all options from the select to another page. For
> this I use javascript to select every element in my select tag. My
problem,
> is that in PHP, to access all selected elements in an array, I need to
give
> my select tag a name like 'myselect[]'. If I use this naming, I can't use
my
> Javascript code to select every element before submitting the form.
>
> How can I get both thing to work : my javascript code to select every
> element, and my php code to access every element ??
>
> Thanks for any answer.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] How to catch the output of http:// -> text file?

2001-05-02 Thread elias

Never tried what i'll write you, but it should work though!

for ($i=0;$i<2000;$i++)
{
   $lines = join('', file(http://www.mysite.com/generator.php?id=$i));
  // save $lines to a file.
}

-elias
http://eassoft.cjb.net

"Kraa de Simon" <[EMAIL PROTECTED]> wrote in message
C1EBEEBBB842D411B412949A1F5875867A@wwmessd135">news:C1EBEEBBB842D411B412949A1F5875867A@wwmessd135...
> Hi,
>
> PHP newbie.
>
> Can anyone help me with the following?
>
> Pseudo code:
>
> for(i=1;i<2000;i++)
> {
> catch the output of
> http://www.mysite.com/kb.html?kbid= 
> and put the html code in a text file called
> /www/kb/kbid  .html
> }
>
> So the end result is 2000 html files on disk "extacted" from the http://
> address...
>
> Thanks...
>
> Met vriendelijke groet / With kind regards,
>
> Simon de Kraa
> ICL Logistic Systems
> mailto:[EMAIL PROTECTED]
>
> ---
>
> Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b
> SCO UnixWare 7.1.1, Progress 9.1a11
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] Managing Multiple Conditions in a MySQL Query

2001-05-02 Thread Mike Gifford

Thanks Tomasz,

I believe that this will work just fine!  :)

Mike

Tomasz Abramowicz wrote:

>  
> echo "Recent Signatures\n";
> $query = "SELECT FirstName,LastName,CityState FROM phPetition WHERE
> Public='yes' AND Verified='yes' ORDER BY ID DESC LIMIT 0,5";
> $result =  mysql_query( $query )
> or die("never expect your query to work: $query");
> 
> while ( $row = mysql_fetch_array( $result ) ) {
> 
> echo "" . stripslashes($row["FirstName"]) . " " .
> stripslashes($row["LastName"]) . " from " . stripslashes($row["CityState"]);
> 
> }



-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Featured Client: http://rabble.ca - News For the Rest of Us!
Courage my friends, 'tis not too late to make a better world - T. Douglas


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




Re: [PHP] Please review our coding standards

2001-05-02 Thread Steven Haryanto

At 5/2/2001 12:46 PM, Anuradha Ratnaweera wrote:

>Most of your guidelines match with our practices. Here are some comments.

Thanks for the comments.

> > 1.4 Whitespaces
> >
> >  - No whitespace after function or method name. Example:
> >
> >  exit()
>
>We also use this. But I have seen others using spaces. Even there are some
>examples in php-manual with spaces (e.g. array_shift).

Actually I took most of the points in the 'Whitespaces' section from
Guido's Python Style Guide. Most of the points are not really a big
deal, but I usually suggest at least making a distinction between ()
for functions and () for statements.

  for (;;)
  if (..)

  exit();
  die();

> > 1.6 Quotes
> >
> >  Use whichever ones you like. But if you can use '' for simple strings,
> >  and "" only if you need interpolation.
>
>This should _very_slightly_ improve performance too.

Yup, though I have never thought of benchmarking this :)

> > 4. File organization
>
>We use WML (website meta language - www.engelschall.com/sw/wml/) with make
>to produce single php files and do _not_ use the include feature of php.
>
>Also, we have written scripts that creates diff files between releases.

Interesting. How do you find WML so far? I evaluated WML once in
the past, but it seemed too complex to me then...

> > 6. Creating documentation
>
>We use tex, and we are planning to go for texinfo.

Do you also embed these in the PHP scripts? I prefer this way
(like Perl's POD, Java's Javadoc, Python's docstrings), because
it is much easier to synchronize with the code. Also, since I
often write the documentation first and then write some code,
I prefer putting them together.

Steve


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




Re: [PHP] PHP as MODULE & CGI Version of PHP

2001-05-02 Thread Phil Driscoll

There is an ISAPI module version of PHP but it is very creaky on anything
less than Windows 2K, however if you are prepared to change from PWS to
Apache, the PHP module for that server API is much more robust.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org



-- 
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] C modules vs PHP module for Apache

2001-05-02 Thread surinder singh


Hi,

  What are benefits and losses of having a PHP module for apache instead  of of a C 
module if PHP modules are without xml and mysql support.

Opinions!

- Surinder




Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

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




Re: [PHP] COM

2001-05-02 Thread Iriton Jonath P. Andrade

Hi Arteaga,

I have tested COM objects using PHP Version 4.0.4pl1 on Windows 2000 Server.
The COM function mentioned here were implemented recently in PHP engine, so
use this version of PHP or later. Of course, your VB COM component must be
registered, so "Has.HasClass" must be a valid "OLE programmatic identifier".

Regards, Iriton.


- Original Message -
From: "Hassan Arteaga" <[EMAIL PROTECTED]>
To: "'Iriton Jonath P. Andrade'" <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 8:51 AM
Subject: RE: [PHP] COM


Hi Iriton !!

I tested but with errors..

9   Hello("Hi Hassan");
12 ?>


This is only VB component Hello return the string entered as var...I
receive this error..

Parse error: parse error in C:\Inetpub\wwwroot\myphp\com.php on line 10

Thanks in advanced !!!
--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]


-Original Message-
From: Iriton Jonath P. Andrade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 8:31 AM
To: Hassan Arteaga
Subject: Re: [PHP] COM


Hi Arteaga,

Instead of using that functions, use the new one shown bellow:

For instantiate an COM object in PHP:

$obj = new COM("ApplicationName.ClassApplicationName");

For properties and methods access:

$obj->property_name;
$obj->method_name;

I have used and tested this function and I have obtained success (using PHP
on Windows 2000 Server). It work very fine.

Regards, Iriton Jonath.



- Original Message -
From: "Hassan Arteaga" <[EMAIL PROTECTED]>
To: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 2:57 PM
Subject: [PHP] COM


Hi all !!

I have components i made in Visual Basic 6.0 and I would like to use with
PHP. I need examples how to create intance from VB COM component...
What function I have to use ?

com_load - ???
com_invoke - ???
com_propget - ???
com_get - ???
com_propput - ???
com_propset - ???
com_set - ???

Thanks in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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





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




Re: [PHP] COM

2001-05-02 Thread Iriton Jonath P. Andrade

Hi Arteaga,

Instead of using that functions, use the new one shown bellow:

For instantiate an COM object in PHP:

$obj = new COM("ApplicationName.ClassApplicationName");

For properties and methods access:

$obj->property_name;
$obj->method_name;

I have used and tested this function and I have obtained success (using PHP
on Windows 2000 Server). It work very fine.

Regards, Iriton Jonath.



- Original Message -
From: "Hassan Arteaga" <[EMAIL PROTECTED]>
To: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 2:57 PM
Subject: [PHP] COM


Hi all !!

I have components i made in Visual Basic 6.0 and I would like to use with
PHP. I need examples how to create intance from VB COM component...
What function I have to use ?

com_load - ???
com_invoke - ???
com_propget - ???
com_get - ???
com_propput - ???
com_propset - ???
com_set - ???

Thanks in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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




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




Re: [PHP] Checking query suceeded

2001-05-02 Thread Richard Lynch

> If I'm doing more than one query on a page what is the best way to check
if
> they all succeeded with out using transactions?

You can check each query as it executes, and (perhaps) have your program
logic do something intelligent in the case of individual failures.

Another possbility is to do all the queries on some temporary table, and
then do one "big" query that inserts/updates from the temp table to the
"real" table...

In general, though, once you get a good connection, and if your SQL is
valid, queries don't fail very often...  Not something you can rely on for
mission-critical usage, but you may be over-worried about an infrequent
event.  Perhaps you could just code it to dump everything to an email to
yourself if it ever pukes, so you can fix it by hand.

(Kinda dangerous since it could flood your email box if the db goes down
completely and you can't get to it to fix it...)

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Re: [PHP] Sort Question

2001-05-02 Thread Richard Lynch

> I am doing a dir list of an ftp and using sort to sort the dir list
> alphabetically.  What I am using now sorts it alphabetically but it sorts
> the capital letters then the lower case so a capital "Z" would come before
a
> lower case "a"
>
> The Code I am using is:
>
> sort($complete_list);
> return $complete_list;
>
> Does someone know how I can sort an array alphabetically with the case
> insensitive sort?

usort($complete_list, 'strcasecmp');

http://php.net/manual/en/function.usort.php
http://php.net/manual/en/function.strcasecmp.php

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Re: [PHP] GD and arrays

2001-05-02 Thread Richard Lynch

> I have the following case. I am working on a PHP script which contains an
> array. Now I want to include a PHP created picture, which is a .php file
> (gd, now further called as the picture.php file). Till so far, everything
is
> ok. The picture is created following as wished.
>
> Now , I want to include values in the picture.php file, which make use of
an
> array which is used in the program above.
> - I am not able to get any array accessed in the picture.php file!
>
> P.S. I am able to access single values in the picture.php. I am also able
to
> list out values of the araay in the script who calls the picture-php file.
>
> Can anybody give me a clue, how I can access the array in the picture.php
?
> Am I doing something wrong, or is this a bug (in that case I prefere a
> workaround).

Not sure I'm following this, but...

The PHP file that creates the GD image is a completely separate HTTP request
(file) from the main page, in the same way that any IMAGE is in a separate
file in a static site.

If both the main program and the image need access to an array of data, you
either need to pass that array to the picture.php file as a GET parameter
(or POST, I guess) or re-generate that array using the same code as in the
main program (possibly a good candidate for an include file).

So, in main.php, you might have some code that ends up generating something
not unlike:


--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Re: [PHP] Problems with sprintf and swapping variables

2001-05-02 Thread Richard Lynch

> Happy %2/$d'th birthday %1/$s.
>
> like the docs says your supposed to do it doesn't work and all you see is:
>   Happy $d'th birthday $s.
>
> What is up with this.. if you use %2/%d it sort of works, but it throws
all
> my other variables out of whack.. any help with this would be
appreciative..

I'm guessing you need to escape that $ with a \ using addslashes().

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Re: [PHP] compare PHP with C for apache modules

2001-05-02 Thread Richard Lynch

> What are benefits and losses of having a PHP module for apache instead of
of a C module if PHP modules are without xml and mysql support.

For starters, it's way easier to develop a web application in PHP than in C.

Not even sure I'm understanding the question properly...  There are a *LOT*
more modules you could add to PHP that aren't XML and MySQL -- but I think
you mean to just compare the languages as languages.

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Re: [PHP] PHP as MODULE & CGI Version of PHP

2001-05-02 Thread Richard Lynch

> I was going through this fantastic tutorial on HTTP
> Authentication at Zend.com! It mentioned that to have
> this working, PHP must be "Installed as a Module" and
> NOT as "CGI Version". Because it will not work in CGI
> version.
> Tell me something, how and from where can i install
> PHP as a Module on my system? I'm using a PWS
> (Personal Web Server) on my Windows 98 machine.
> I had downloaded PHP from the php.net site and
> installed as per the instructions in the manual.
>
> What is the difference between the Module & CGI
> version? Is it possible for me to Install PHP as
> module on my computer?

The Microsoft-ism for "as a module" would involve using the ISAPI filter
thingie.

The first "I" in ISAPI stands for IIS, so I have no reassurance that it can
be done with PWS at all.  Even if you *can* do it, you'll probably have to
edit the registry or something equally gnarly, since PWS is pretty
bare-bones.

You *could* switch to Apache which is way mo' better than PWS...

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Re: [PHP] http_post_files not returning file type

2001-05-02 Thread Richard Lynch

> this is taken straight from phpinfo(), as you can see
> its all there except for type. I was wondering why
> wouldnt my RH7.0, Apache 1.3.12 w/ PHP4.0.4pl1
> know what the file type was...

Because your browser didn't tell it?

I'm pretty sure that info comes *from* the browser...

PHP really has no way, a priori, to determine what might be in an uploaded
file.

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



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




Re: [PHP] Checking query suceeded

2001-05-02 Thread Jordan Elver

Hi Richard,
Thanks for the advise. I was just wondering what other people do.
I don't think I'll worry about it too much ;-)

Cheers,

Jord

On Wednesday 02 May 2001  3:49 am, you wrote:
> > If I'm doing more than one query on a page what is the best way to check
>
> if
>
> > they all succeeded with out using transactions?
>
> You can check each query as it executes, and (perhaps) have your program
> logic do something intelligent in the case of individual failures.
>
> Another possbility is to do all the queries on some temporary table, and
> then do one "big" query that inserts/updates from the temp table to the
> "real" table...
>
> In general, though, once you get a good connection, and if your SQL is
> valid, queries don't fail very often...  Not something you can rely on for
> mission-critical usage, but you may be over-worried about an infrequent
> event.  Perhaps you could just code it to dump everything to an email to
> yourself if it ever pukes, so you can fix it by hand.
>
> (Kinda dangerous since it could flood your email box if the db goes down
> completely and you can't get to it to fix it...)
>
> --
> WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm

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




Re: [PHP] restrict access of Copy command

2001-05-02 Thread Sebastien Roy

Hi

I got the same setup as you with safe_mode = On  and I try to use the copy
function between 2 virtual host. When I copy from one virtual host to another,
I got an error message telling me that the copy function is not allowed :

Warning: SAFE MODE Restriction in effect. The script whose uid is 88 is not
allowed to access /home/host/yourdomain owned by uid 98 in
home/www/host/127.0.0.1:8080/html/index.php on line 37

His your virtual host have all the same users?


Regards,

Sebastien Roy


PanDragon wrote:

> Thanks for the suggestion, but I need to be able to use the copy command, I
> just do not want it to be able to read from one virtual host to another. I
> would imagine that lots of web hosters running php with virtual hosts would
> have the same problem.
>
> Sebastien Roy <[EMAIL PROTECTED]> wrote in message
> news:<[EMAIL PROTECTED]>...
> > Hi,
> >
> > There is a section in the php.ini where you can specified the function you
> > don't whant to use  :
> >
> > disable_functions : copy; ...
> >
> > I never used it, but I think it's what you are looking for.
> >
> >
> > Regards,
> >
> > Sebastien Roy
> > [EMAIL PROTECTED]
> >
> >
> > PanDragon wrote:
> >
> > > I am running an apache server with virtual hosts and need to prevent the
> php
> > > Copy command from being able to copy from one virtual host dir to
> another.
> > >
> > > The server is in php safe mode and the doc_root, and basedir are set
> > > correctly, at least they prevent "includes" and "opendir" and such from
> > > working, but "copy" still works.
> > >
> > > I sure would appreciate any suggestions.
> > >
> > > Pan
> > >
> > > --
> > > 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]
> >
> Sebastien Roy <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > There is a section in the php.ini where you can specified the function you
> > don't whant to use  :
> >
> > disable_functions : copy; ...
> >
> > I never used it, but I think it's what you are looking for.
> >
> >
> > Regards,
> >
> > Sebastien Roy
> > [EMAIL PROTECTED]
> >
> >
> > PanDragon wrote:
> >
> > > I am running an apache server with virtual hosts and need to prevent the
> php
> > > Copy command from being able to copy from one virtual host dir to
> another.
> > >
> > > The server is in php safe mode and the doc_root, and basedir are set
> > > correctly, at least they prevent "includes" and "opendir" and such from
> > > working, but "copy" still works.
> > >
> > > I sure would appreciate any suggestions.
> > >
> > > Pan
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] error reporting

2001-05-02 Thread BigVeggie


Is there any way to see my errors on he screen. The server has error 
reporting turned off.
Ive tried setting error_reporting()function setting it to E_ALL etc. It still 
does not work.
Does any one know what I can do?

Clint

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




RE: [PHP] COM

2001-05-02 Thread Hassan Arteaga


Ohhh!!!I installed the last version..and now ..this simple code



I can't see nothing... 
--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]


-Original Message-
From: Iriton Jonath P. Andrade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 10:50 AM
To: Hassan Arteaga
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] COM


Hi Arteaga,

I have tested COM objects using PHP Version 4.0.4pl1 on Windows 2000 Server.
The COM function mentioned here were implemented recently in PHP engine, so
use this version of PHP or later. Of course, your VB COM component must be
registered, so "Has.HasClass" must be a valid "OLE programmatic identifier".

Regards, Iriton.


- Original Message -
From: "Hassan Arteaga" <[EMAIL PROTECTED]>
To: "'Iriton Jonath P. Andrade'" <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 8:51 AM
Subject: RE: [PHP] COM


Hi Iriton !!

I tested but with errors..

9   Hello("Hi Hassan");
12 ?>


This is only VB component Hello return the string entered as var...I
receive this error..

Parse error: parse error in C:\Inetpub\wwwroot\myphp\com.php on line 10

Thanks in advanced !!!
--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]


-Original Message-
From: Iriton Jonath P. Andrade [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 8:31 AM
To: Hassan Arteaga
Subject: Re: [PHP] COM


Hi Arteaga,

Instead of using that functions, use the new one shown bellow:

For instantiate an COM object in PHP:

$obj = new COM("ApplicationName.ClassApplicationName");

For properties and methods access:

$obj->property_name;
$obj->method_name;

I have used and tested this function and I have obtained success (using PHP
on Windows 2000 Server). It work very fine.

Regards, Iriton Jonath.



- Original Message -
From: "Hassan Arteaga" <[EMAIL PROTECTED]>
To: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 2:57 PM
Subject: [PHP] COM


Hi all !!

I have components i made in Visual Basic 6.0 and I would like to use with
PHP. I need examples how to create intance from VB COM component...
What function I have to use ?

com_load - ???
com_invoke - ???
com_propget - ???
com_get - ???
com_propput - ???
com_propset - ???
com_set - ???

Thanks in advanced !!!

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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




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




[PHP] Authorizer V1.0

2001-05-02 Thread Alain ROMERO

http://apollo.spaceports.com/~refcentr/index_auth.html

This script work with Unix, not with WinNT.
Is there something to do with cookie on WinNT ?

Help Please




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




RE: [PHP] Forms with Field Arrays and JavaScript

2001-05-02 Thread Diego Fulgueira

After several tries, I am convinced there is no way to do it. I went around
the problem by using dinamic field names (var1, var2, var3, etc) and then
reading them using $HTTP_POST_VARS["var".$i], where $i would be your former
index to the array. For example:

The form coud have HTML code like this:





Each field can be referenced by JavaScript code like this:

document.myform.myvar1.value="hello";

Or dynamically like this:

myfield=new array();
for(i=0;;i++)


if(!eval("document.myform.myvar"+i)) break;
myfield[i]=eval("document.myform.myvar"+i);
}
myfield[1].value="hello";

When the form is submitted, asuming, method=POST, then you get the field
values like this:

$myvars=array();
for($i=0;;$i++)
{
if(empty($HTTP_POST_VARS["myvar".$i]) break;
$myvars[$i]=$HTTP_POST_VARS["myvar".$i];
}

Hope it helps.
Cheers, Diego.
  -Original Message-
  From: Utopia [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, 01 May, 2001 10:32 PM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] Forms with Field Arrays and JavaScript


  Hello,

  I see you sent this back in January. I'm having the very same problem.

  Could you PEEEAAASSEEE tell me how to assign a value to the
'myfields[]' text field using JavaScript. I can't make it happen.


  Thanks.

  Tiffany
  
  THIS WAS YOUR MESSAGE ON THE BOARD
  Hi! I was wondering if someone knows, or can think of a way to go around
  this problem i have.


  The thing is i am working with a form with a field array. Each field is
  something like:
  


  When i receive the posted data, I can access the "myfields" array. This is
  fine.


  The problem is within my form i have client JavaScript code to validate
the
  form data. But I can't make reference to a form object called myfields[]
or
  myfields[5] or just myfields. The property name of the javascript object
is
  set to "myfields[]", but reference to myfields[][5] or
  document.myform.fields["myfields[]"] doesn't work either.


  Any suggestions will be greatly appreciated.
  Thanks in advance.





[PHP] Please !!!!

2001-05-02 Thread Hassan Arteaga

Hi all !!!

I execute a page php with a simple code..the page appears in white..and when
I oppress the right click to see the source I obtain this result.  
_




Untitled





  
___

Everything was working well until I installed the new version for win32 PHP
4.0.5

Thanks 

--
M. Sc. Hassan Arteaga Rodríguez
Microsoft Certified System Engineer
Network Admin, WEB Programmer
FUNDYCS, Ltd
[EMAIL PROTECTED]

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




RE: [PHP] session_register()

2001-05-02 Thread Johnson, Kirk

> -Original Message-
> From: Jennifer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 2:51 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] session_register()
> 
> Do you need to register a variable with the session before you
> assign it a value? 

Not in my experience.
 
> session_register should return true if the variable was
> successfully registered?

It returns "1".

> The variable name and it's value should be written to the file
> with the same name as session_id()?

Yes, here's a sample from a session file: superUser|s:3:"Yes";
Here's a sample session filename: sess_01bc2e24aa5291300887948f0af74899

Kirk 

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




Re: [PHP] About last release

2001-05-02 Thread Phil Driscoll

>I have PHP 4.0.4 on Win98, PWS PC and I would like to install 4.0.5 but is
>only for CGI ? I installed PHP 4.0.4 with an exe file...I didn't
>nothing..only double-click.. I need that file again but with PHP 4.0.5
>version..Thanks !!!

The installer version you used when you installed 4.0.4 installed the cgi
version - the 4.0.5 on does exactly the same.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org


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




Re: [PHP] Random number generation...

2001-05-02 Thread Phillip Bow

Its supposedly faster and generates a "more" random number than rand() so I
don't see why not to use it.
--
phill

"Jon Haworth" <[EMAIL PROTECTED]> wrote in message
67DF9B67CEFAD4119E4200D0B720FA3F13B733@BOOTROS">news:67DF9B67CEFAD4119E4200D0B720FA3F13B733@BOOTROS...
> The manual also says:
>   mt_rand -- Generate a better random value
>
> I've been using mt_rand() over rand() every time - is there any reason not
> to?
>
> Cheers
> Jon
>
>
> -Original Message-
> From: elias [mailto:[EMAIL PROTECTED]]
> Sent: 03 May 2001 00:05
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Random number generation...
>
>
> why not use the rand() ?
>
> manual says:
>
> rand -- Generate a random value
> Description
>
> int rand ([int min [, int max]])
>
>
> If called without the optional min, max arguments rand() returns a
> pseudo-random value between 0 and RAND_MAX. If you want a random number
> between 5 and 15 (inclusive), for example, use rand (5, 15).
>
> Remember to seed the random number generator before use with srand().
>
> -elias
> http://eassoft.cjb.net
>
>
> **
> 'The information included in this Email is of a confidential nature and is
> intended only for the addressee. If you are not the intended addressee,
> any disclosure, copying or distribution by you is prohibited and may be
> unlawful. Disclosure to any party other than the addressee, whether
> inadvertent or otherwise is not intended to waive privilege or
confidentiality'
>
> **
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP 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] PHP 4.0.5 module causes Apache child processes to segfault...

2001-05-02 Thread Darron Froese

I compiled and installed PHP 4.0.5 onto our development server (Mandrake
Linux 7.1 w/kernel 2.2.17) today and tried to access one of our php
intensive sites on it - most of the pages wouldn't respond.

This is how 4.0.5 was compiled:

./configure \
--with-apxs=/usr/local/apache_1.3.19/bin/apxs \
--with-mysql=/usr/local/mysql \
--enable-ftp \
--with-curl \
--with-zlib \
--with-pspell \
--with-ldap \
--with-pdflib \
--with-imap=/usr/local/src/imap-4.5 \
--with-zlib-dir=/usr/lib \
--with-gd \
--with-ttf \
--with-t1lib \
--with-xml \
--with-swf=/usr/local \
--with-java=/usr/local/jdk \
--with-gettext \
--with-mcrypt \
--with-mhash \
--enable-sockets \
--enable-calendar \
--enable-trans-sid \
--enable-track-vars=yes \
--enable-magic-quotes=yes

Looking at the logs I saw a few of these - this wasn't happening with
4.0.4pl1:

[Tue May  1 20:49:21 2001] [notice] child pid 19423 exit signal Segmentation
fault (11)
[Tue May  1 20:51:17 2001] [notice] caught SIGTERM, shutting down
[Tue May  1 20:51:45 2001] [notice] Apache configured -- resuming normal
operations
[Tue May  1 20:57:41 2001] [warn] child process 19677 still did not exit,
sending a SIGTERM
[Tue May  1 20:57:45 2001] [error] child process 19677 still did not exit,
sending a SIGKILL
[Tue May  1 20:57:46 2001] [notice] caught SIGTERM, shutting down
[Tue May  1 20:58:08 2001] [notice] Apache configured -- resuming normal
operations
[Tue May  1 20:59:11 2001] [notice] child pid 20039 exit signal Segmentation
fault (11)
[Tue May  1 21:00:54 2001] [notice] child pid 20290 exit signal Segmentation
fault (11)

I've downgraded to 4.0.4pl1 and all is well again.

I've tried to generate a core dump file (Apache also has write access to a
folder specified with the CoreDumpDirectory directive.) using the
instructions here but have been unsuccessful:



I can't run httpd -X as suggested on that page because my version of Apache
(1.3.19) doesn't support it.

What can I do to get more debugging information so that this can get looked
at?
-- 
darron froese
new media technologist
sutton javelin corporate communications
t  403.716.0351
f  403.265.7662
e  [EMAIL PROTECTED]




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




RE: [PHP] PHP 4.0.5 module causes Apache child processes to segfault...

2001-05-02 Thread John Huggins

If I were you I would let the PHP guys figure this out.  I am sure they read
messages here so stick with 4.04p11 and live on.  I was just about to
download 4.0.5, but I want your issue to be addressed before I waste my time
with a recompile.

John

> -Original Message-
> From: Darron Froese [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 12:04 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] PHP 4.0.5 module causes Apache child processes to
> segfault...
>
>
> I compiled and installed PHP 4.0.5 onto our development server (Mandrake
> Linux 7.1 w/kernel 2.2.17) today and tried to access one of our php
> intensive sites on it - most of the pages wouldn't respond.
>
> This is how 4.0.5 was compiled:
>
> ./configure \
> --with-apxs=/usr/local/apache_1.3.19/bin/apxs \
> --with-mysql=/usr/local/mysql \
> --enable-ftp \
> --with-curl \
> --with-zlib \
> --with-pspell \
> --with-ldap \
> --with-pdflib \
> --with-imap=/usr/local/src/imap-4.5 \
> --with-zlib-dir=/usr/lib \
> --with-gd \
> --with-ttf \
> --with-t1lib \
> --with-xml \
> --with-swf=/usr/local \
> --with-java=/usr/local/jdk \
> --with-gettext \
> --with-mcrypt \
> --with-mhash \
> --enable-sockets \
> --enable-calendar \
> --enable-trans-sid \
> --enable-track-vars=yes \
> --enable-magic-quotes=yes
>
> Looking at the logs I saw a few of these - this wasn't happening with
> 4.0.4pl1:
>
> [Tue May  1 20:49:21 2001] [notice] child pid 19423 exit signal
> Segmentation
> fault (11)
> [Tue May  1 20:51:17 2001] [notice] caught SIGTERM, shutting down
> [Tue May  1 20:51:45 2001] [notice] Apache configured -- resuming normal
> operations
> [Tue May  1 20:57:41 2001] [warn] child process 19677 still did not exit,
> sending a SIGTERM
> [Tue May  1 20:57:45 2001] [error] child process 19677 still did not exit,
> sending a SIGKILL
> [Tue May  1 20:57:46 2001] [notice] caught SIGTERM, shutting down
> [Tue May  1 20:58:08 2001] [notice] Apache configured -- resuming normal
> operations
> [Tue May  1 20:59:11 2001] [notice] child pid 20039 exit signal
> Segmentation
> fault (11)
> [Tue May  1 21:00:54 2001] [notice] child pid 20290 exit signal
> Segmentation
> fault (11)
>
> I've downgraded to 4.0.4pl1 and all is well again.
>
> I've tried to generate a core dump file (Apache also has write access to a
> folder specified with the CoreDumpDirectory directive.) using the
> instructions here but have been unsuccessful:
>
> 
>
> I can't run httpd -X as suggested on that page because my version
> of Apache
> (1.3.19) doesn't support it.
>
> What can I do to get more debugging information so that this can
> get looked
> at?
> --
> darron froese
> new media technologist
> sutton javelin corporate communications
> t  403.716.0351
> f  403.265.7662
> e  [EMAIL PROTECTED]
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] PHP 4.0.5 module causes Apache child processes tosegfault...

2001-05-02 Thread Darron Froese

On 5/2/01 10:16 AM, "John Huggins" <[EMAIL PROTECTED]> wrote:

> If I were you I would let the PHP guys figure this out.  I am sure they read
> messages here so stick with 4.04p11 and live on.  I was just about to
> download 4.0.5, but I want your issue to be addressed before I waste my time
> with a recompile.

I'm sure they do too - but if I can get some more information to help to
pinpoint the issue (if there is one with PHP and not with my box) - that
makes it easier on them.
-- 
darron froese
new media technologist
sutton javelin corporate communications
t  403.716.0351
f  403.265.7662
e  [EMAIL PROTECTED]


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




[PHP] Browsers anachy !!!!!!!!!!!!

2001-05-02 Thread Sebastien Roy

Hi all,

I'm having a strange problem. I volontary create an infinite loop in one
of my PHP script. I was just wondering how Apache and PHP will react and
if the "max_execution_time" directive would trap the loop. I was
agreably suprised to see that the opera browser give me an error message
"Fatal error: Maximun execution time of 5 seconds exceeded in ". The
same occured with MS explorer and Mozilla. But, with Netscape, there is
nothing to do. It loops forever and I add to restart my linux box
($%^!$) witch is something I almost never do.  I really hate that
browser, but I must deal with it...

Is there something particular I have to do to avoid this problem with
the Netscape browser?



Regards,

Sebastien Roy
[EMAIL PROTECTED]


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




[PHP] ¸Û¼°ÁܽÐ!

2001-05-02 Thread TopNews

¸Û¼°~
ÁܽжQ¤½¥q«e©¹§K¶O¥Zµn¤½¥q¦æ¸¹
Åwªï¼t°Ó«e©¹¬d¸ß¡B¥Zµn§Y®É¶R½æ
´x´¤§ó¦hªº°ê»Ú¶R½æ¥D!
¨È¬wºô http://Asianweb.com.tw 

­B¦¹·q´_ ¨Ã¯¬¡G
¥Í·N¿³¶©!
°]·½¼s¶i!

¨È¬wºô ·s»D¬¡°Ê²Õ ·q±Ò
==
¨È¬wºô http://Asiaweb.com.tw ­^¤åª©
¨È¬wºô http://Asianweb.com.tw ¤¤¤åÁc²ª©
·s¼W¤¤¤åºô§} http://¨È¬wºô.TW
·s¼W¤¤¤åºô§} http://»s³y·~.TW
·s¼W¤¤¤åºô§} http://¨È¤Ó.°Ó·~.TW
·s¼W¤¤¤åºô§} http://¨È¬w¤H.°Ó·~.TW
==





 
2001-05-02 ¥»·s»D¥ÑTopNews ·s»D§Ö»¼µo¦æ
ªñ¤é·s»D¬£³ø¨t²Î­«¾ã ¦p¦³¥´ÂZ¤§³B ·q½Ð¨£½Ì!
¨t²Î¦p¦³­«½Æµo°e ·q½Ð¦^ÂÐ: [EMAIL PROTECTED] 











¢w¢w¢w¢w¢w¡@The message was sent by Super Mass Mail¡@¢w¢w¢w¢w¢w
   Download from The Worldfax Network.¡@http://www.worldfax.net
   Start send worldwide free fax and(or) get free website advertising now!

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




php-general Digest 2 May 2001 16:43:59 -0000 Issue 662

2001-05-02 Thread php-general-digest-help


php-general Digest 2 May 2001 16:43:59 - Issue 662

Topics (messages 51077 through 51168):

Re: a bit off the list  but
51077 by: Donald Goodwill
51083 by: B. van Ouwerkerk

PDF online
51078 by: Chris Schneck

Managing Multiple Conditions in a MySQL Query
51079 by: Mike Gifford
51082 by: Tomasz Abramowicz
51141 by: Mike Gifford

PHP as MODULE & CGI Version of PHP
51080 by: Thomas Edison Jr.
51143 by: Phil Driscoll
51152 by: Richard Lynch

Re: Problems compiling with PDF support
51081 by: Bill Shupp

hmm sockets (again)
51084 by: Joseph Blythe
51088 by: Mukul Sabharwal
51091 by: Joseph Blythe

Re: How to compile PDFLIB in FreeBSD 4.3
51085 by: heinisch.creaction.de

Re: IMAGE
51086 by: heinisch.creaction.de

Re: Your opinion on security issue: file extension
51087 by: Yasuo Ohgaki

turning on error reporting
51089 by: BigVeggie
51092 by: elias

Weird error...
51090 by: elias
51103 by: Richard Verstegen

Re: Hosts.
51093 by: elias

Something like PHP-SHOP-NUKE?
51094 by: José León Serna

Re: Reporting from Database
51095 by: Richard Lynch

Re: mailing list
51096 by: Richard Lynch

Re: how to measure databases
51097 by: Richard Lynch

Re: Browser Detection
51098 by: Richard Lynch

session_register()
51099 by: Jennifer
51102 by: Richard Verstegen
51161 by: Johnson, Kirk

FTP
51100 by: E K L

Re: Emanuel virus
51101 by: B. van Ouwerkerk

Re: session array :-/
51104 by: Tim Ward
51124 by: Richard Lynch

Re: split and array logic
51105 by: Tim Ward

Re: SQL Query time?
51106 by: Anuradha Ratnaweera
51122 by: PHPBeginner.com

Re: date list
51107 by: James Holloway

Re: SQL Select Unique() ?
51108 by: Anuradha Ratnaweera

Re: LDAP Authentication
51109 by: Richard Lynch

Sending information between pages???
51110 by: Vanden Eynde Pascal

Re: Problem with Sablot/PHP4
5 by: ReadOnly

utfdecode() and ISO-8859-2
51112 by: ReadOnly

Re: String Type Unknown
51113 by: Rudolf Visagie
51118 by: Anuradha Ratnaweera
51120 by: Rudolf Visagie

Re: Compressing an upload
51114 by: Geir Eivind Mork

open foxpro database
51115 by: Benny K. Putera

Re: Starting PHP script with crontab
51116 by: Anuradha Ratnaweera

Re: template solutions?
51117 by: Anuradha Ratnaweera

Re: Please review our coding standards
51119 by: Anuradha Ratnaweera
51142 by: Steven Haryanto

ImageCopyResampled() -> Php 4.0.6
51121 by: JFL

Re: Sort an array
51123 by: Geir Eivind Mork

Help needed with multiple select form element and PHP !
51125 by: Nicolas Guilhot
51139 by: elias

Random number generation...
51126 by: Tristan.Pretty.risk.sungard.com
51131 by: elias
51132 by: Jon Haworth
51133 by: Avetis Avagyan
51138 by: Jon Haworth
51163 by: Phillip Bow

How to catch the output of http:// -> text file?
51127 by: Kraa de Simon
51140 by: elias

Re: zlib.output_compression - how to turn it on
51128 by: Robert Mena

Re: COM
51129 by: Hassan Arteaga
51130 by: Hassan Arteaga
51145 by: Iriton Jonath P. Andrade
51146 by: Iriton Jonath P. Andrade
51157 by: Hassan Arteaga

Next SEMPUG meeting - this Thursday
51134 by: Michael Kimsal

$hello ?
51135 by: elias
51136 by: elias

About last release
51137 by: Hassan Arteaga
51162 by: Phil Driscoll

C modules vs PHP module for Apache
51144 by: surinder singh

Re: Checking query suceeded
51147 by: Richard Lynch
51154 by: Jordan Elver

Re: Sort Question
51148 by: Richard Lynch

Re: GD and arrays
51149 by: Richard Lynch

Re: Problems with sprintf and swapping variables
51150 by: Richard Lynch

Re: compare PHP with C for apache modules
51151 by: Richard Lynch

Re: http_post_files not returning file type
51153 by: Richard Lynch

Re: restrict access of Copy command
51155 by: Sebastien Roy

error reporting
51156 by: BigVeggie

Authorizer V1.0
51158 by: Alain ROMERO

Re: Forms with Field Arrays and JavaScript
51159 by: Diego Fulgueira

Please 
51160 by: Hassan Arteaga

PHP 4.0.5 module causes Apache child processes to segfault...
51164 by: Darron Froese
51165 by: John Huggins
51166 by: Darron Froese

Browsers anachy 
51167 by: Sebastien Roy

¸Û¼°ÁܽÐ!
51168 by: TopNews

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]


--

[PHP] Re: Managing Multiple Conditions in a MySQL Query

2001-05-02 Thread Sam Leibowitz


Well, first of all, you can start by getting friendly with "print
mysql_error();", which will tell you if you have any syntax errors in your
SQL statement. =D

And I think you do. That should be:
  ...WHERE Public='yes' AND Verified='yes'...

As opposed to:
  ...WHERE Public='yes',Verified='yes'...

Additionally, you're passing your results directly to a while loop, which
is a something of a no-no.  Even if your SQL statement is perfectly
formatted, you'll generate a warning if the number of rows returned is
zero.


   Sam Leibowitz ([EMAIL PROTECTED])
   Project Manager
   Business Technology Center (http://www.btcwcu.org)


On Wed, 2 May 2001, Mike Gifford wrote:

> Hello,
> 
> I'd like to verify two conditions are true in the results that I pull out of my 
> MySQL database.  In this case I wanted Verified and Public both to be listed as 
> 'yes' in the DB before they were displayed. The code I tried to use is as follows:
> 
>  echo "Recent Signatures\n";
> $individuals_query = mysql_query("SELECT FirstName,LastName,CityState FROM 
> phPetition WHERE Public='yes',Verified='yes' ORDER BY ID DESC LIMIT 0,5");
> while ($individuals_array = mysql_fetch_array($individuals_query)) {
>   echo "" . stripslashes($individuals_array["FirstName"]) . " " . 
> stripslashes($individuals_array["LastName"]) . " from " . 
> stripslashes($individuals_array["CityState"]);
> }
> 
> However, it gave me the following error:
> 
> Warning: Supplied argument is not a valid MySQL result resource in 
> /usr/local/rabble/petition/index.php3 on line 89
> 
> How do I get around this?
> 
> Mike
> -- 
> Mike Gifford, OpenConcept Consulting, http://openconcept.ca
> Offering everything your organization needs for an effective web site.
> Featured Client: http://rabble.ca - News For the Rest of Us!
> Courage my friends, 'tis not too late to make a better world - T. Douglas
> 
> 


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




Re: [PHP] String Type Unknown

2001-05-02 Thread Nathan Cook

>From a field in an instantdb database (http://instantdb.enhydra.org)

Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Anuradha Ratnaweera" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: "Php List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 11:03 PM
Subject: Re: [PHP] String Type Unknown


>
> Since it contains only digits 0-9 and letters a-f, it looks like
> hexadecimal. Why don't you try to read two characters at a time and either
> convert them to binary or check their ascii values. There seem to be many
> ascii values however.
>
> Where did you get this from?
>
> Anuradha
>
> On Mon, 30 Apr 2001, Nathan Cook wrote:
>
> > I have this string:
> >
> >
0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f
> >
fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f5072
> >
6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0f252
> > 14a0ffe40ffb803000246000a6c6f6164466163746f724900097
> >
> > And I don't know what type it is.  It is it a binary string?  Can I convert
it
> > to text and if so, how?
> >
> > Thank You,
> > Nathan Cook
> > [EMAIL PROTECTED]
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] Website production tool in PHP

2001-05-02 Thread Michael O'Neal

Hi,

I am wondering if a website planning/production tool exists already in 
PHP?  This would be something that the agency and the client could use as 
a central "meeting" place about the project, with deadlines, comps, 
project brief, etc...

Unix based, PHP/MySQL setup is preferred.

I thought I'd mail the list before I built one from scratch.

Please email me directly at [EMAIL PROTECTED], as I am on the digest.  
Thanks!


mto

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R 
-
http://www.thinkmango.com
[EMAIL PROTECTED]
p-303.442.1821
f-303.938.8507



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




RE: [PHP] PHP 4.0.5 module causes Apache child processes to segfault...

2001-05-02 Thread John Monfort



  I too had to downgrade to PHP 4.0.4pl1. Version 4.0.5 would not let me
  load my extensions(dynamically).

   PHP+Apache
   Win 98

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Wed, 2 May 2001, John Huggins wrote:

> If I were you I would let the PHP guys figure this out.  I am sure they read
> messages here so stick with 4.04p11 and live on.  I was just about to
> download 4.0.5, but I want your issue to be addressed before I waste my time
> with a recompile.
>
> John
>
> > -Original Message-
> > From: Darron Froese [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 02, 2001 12:04 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] PHP 4.0.5 module causes Apache child processes to
> > segfault...
> >
> >
> > I compiled and installed PHP 4.0.5 onto our development server (Mandrake
> > Linux 7.1 w/kernel 2.2.17) today and tried to access one of our php
> > intensive sites on it - most of the pages wouldn't respond.
> >
> > This is how 4.0.5 was compiled:
> >
> > ./configure \
> > --with-apxs=/usr/local/apache_1.3.19/bin/apxs \
> > --with-mysql=/usr/local/mysql \
> > --enable-ftp \
> > --with-curl \
> > --with-zlib \
> > --with-pspell \
> > --with-ldap \
> > --with-pdflib \
> > --with-imap=/usr/local/src/imap-4.5 \
> > --with-zlib-dir=/usr/lib \
> > --with-gd \
> > --with-ttf \
> > --with-t1lib \
> > --with-xml \
> > --with-swf=/usr/local \
> > --with-java=/usr/local/jdk \
> > --with-gettext \
> > --with-mcrypt \
> > --with-mhash \
> > --enable-sockets \
> > --enable-calendar \
> > --enable-trans-sid \
> > --enable-track-vars=yes \
> > --enable-magic-quotes=yes
> >
> > Looking at the logs I saw a few of these - this wasn't happening with
> > 4.0.4pl1:
> >
> > [Tue May  1 20:49:21 2001] [notice] child pid 19423 exit signal
> > Segmentation
> > fault (11)
> > [Tue May  1 20:51:17 2001] [notice] caught SIGTERM, shutting down
> > [Tue May  1 20:51:45 2001] [notice] Apache configured -- resuming normal
> > operations
> > [Tue May  1 20:57:41 2001] [warn] child process 19677 still did not exit,
> > sending a SIGTERM
> > [Tue May  1 20:57:45 2001] [error] child process 19677 still did not exit,
> > sending a SIGKILL
> > [Tue May  1 20:57:46 2001] [notice] caught SIGTERM, shutting down
> > [Tue May  1 20:58:08 2001] [notice] Apache configured -- resuming normal
> > operations
> > [Tue May  1 20:59:11 2001] [notice] child pid 20039 exit signal
> > Segmentation
> > fault (11)
> > [Tue May  1 21:00:54 2001] [notice] child pid 20290 exit signal
> > Segmentation
> > fault (11)
> >
> > I've downgraded to 4.0.4pl1 and all is well again.
> >
> > I've tried to generate a core dump file (Apache also has write access to a
> > folder specified with the CoreDumpDirectory directive.) using the
> > instructions here but have been unsuccessful:
> >
> > 
> >
> > I can't run httpd -X as suggested on that page because my version
> > of Apache
> > (1.3.19) doesn't support it.
> >
> > What can I do to get more debugging information so that this can
> > get looked
> > at?
> > --
> > darron froese
> > new media technologist
> > sutton javelin corporate communications
> > t  403.716.0351
> > f  403.265.7662
> > e  [EMAIL PROTECTED]
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] add to .htpasswd via php

2001-05-02 Thread Joseph Koenig

I'm attempting to streamline my work by writing a script that will add a
user to the .htpasswd file. If echo the command I'm sending (via exec())
and run it on the command line, it works fine. From php though, it does
nothing. All paths are full paths starting at server level. Is there
anything that anyone is familiar with that would cause this to not work? Thanks,

Joe

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




RE: [PHP] add to .htpasswd via php

2001-05-02 Thread Jack Dempsey

what user are you running the command on the the command line, and what user
is php running it as? if you're root for the first one, but nobody on the
second, that would be your problem...

-jack

-Original Message-
From: Joseph Koenig [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 1:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] add to .htpasswd via php


I'm attempting to streamline my work by writing a script that will add a
user to the .htpasswd file. If echo the command I'm sending (via exec())
and run it on the command line, it works fine. From php though, it does
nothing. All paths are full paths starting at server level. Is there
anything that anyone is familiar with that would cause this to not work?
Thanks,

Joe

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



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




[PHP] gd-2.0.1

2001-05-02 Thread Dave Mariner

Hi,
Not sure if this is the right place to post this (only joined list today) so 
accept apologies if hugely-OT. I need to add true-colour support to some code I'm 
writing, so want to build gd-2.0.1as an extension to PHP4 (currently have 4.0.4pl1). I 
have the gdlib building as a .so but don't know where to go from here. I'm running 
Mandrake Corporate Server 1.0.1, if that makes a difference.

Thanks in advance,


Dave Mariner.



Re: [PHP] add to .htpasswd via php

2001-05-02 Thread Tyrone Mills

I do this exact thing on my system, here is the code I use:

$update = exec ("/usr/local/apache/bin/htpasswd -b ./.htpasswd $username $password");

My guess is you are dealing with a permissions issue. Like Jack says, try 'su nobody' 
(or whatever your webserver runs as) and then try the command... Once that works, so 
will your script.

- Original Message - 
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 10:44 AM
Subject: RE: [PHP] add to .htpasswd via php


> what user are you running the command on the the command line, and what user
> is php running it as? if you're root for the first one, but nobody on the
> second, that would be your problem...
> 
> -jack
> 
> -Original Message-
> From: Joseph Koenig [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 1:40 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] add to .htpasswd via php
> 
> 
> I'm attempting to streamline my work by writing a script that will add a
> user to the .htpasswd file. If echo the command I'm sending (via exec())
> and run it on the command line, it works fine. From php though, it does
> nothing. All paths are full paths starting at server level. Is there
> anything that anyone is familiar with that would cause this to not work?
> Thanks,
> 
> Joe
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 



[PHP] connexion to mysql db through php

2001-05-02 Thread Moise Bertrand Tachago

Hi to all,

I am working on i60086 environment with php-4.0.4pl1, mysql-3.23.36,
Linux 7 and apache_1.3.19 (on the same computer).

I can't connect to mysql with user and password i use in command line.
This is what i do:



this program is called when i submit my form () and i have the follow error message:
Warning: MySQL Connection Failed: Access denied for user:
'[EMAIL PROTECTED]' (Using password: YES) in
/www/htdocs/sdnpdev/Creation_Membre.php on line 11
Connexion au serveur impossible

Please can somebody help me?

Thanks in advance

Bertrand


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




Re: [PHP] String Type Unknown

2001-05-02 Thread Nathan Cook

Thank you, for your help it works great!

Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Rudolf Visagie" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 4:47 AM
Subject: RE: [PHP] String Type Unknown


Nathan,

Another way to do it (but much less fun):




Read Hex dump






Rudolf Visagie
QEDI

-Original Message-
From: Nathan Cook [mailto:[EMAIL PROTECTED]]
Sent: 01 May 2001 11:16
To: Rudolf Visagie
Subject: Re: [PHP] String Type Unknown


How were you able to convert that?

Thanks!
Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Rudolf Visagie" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 2:53 AM
Subject: RE: [PHP] String Type Unknown


Hi Nathan,

It's a hex dump and it reads:

ÿÿúÀÿÿÿí sr java.util.Properties9ÿÿý§càÿÿÿ~ L defaultst
Ljava/util/Properties;xr java.util.Hashtableÿÿû°òR ÿÿÿäÿÿûEUR0 $`
¦ÆöDf7F÷$ -F?&W6?öÆG??@ w      t imaget Jhttp://mediabank.edventures.com/edventures/labs/bricks_web.jpg";>t
texttIt is important to emphasize that a facilitator does not need to be
an expert in the various subject areas, but should become familiar with the
projects and materials that students will be doing, and be aware of how to
get help or look up terms and answers.  In particular, familiarity with the
LEGO® elements is highly recommended.  PCS has developed a
separate course focusing on the use of the LEGO® materials.
All facilitators should schedule time to take this additional course.xp

Rudolf Visagie
QEDI

-Original Message-
From: Nathan Cook [mailto:[EMAIL PROTECTED]]
Sent: 30 April 2001 10:31
To: Php List
Subject: [PHP] String Type Unknown


I have this string:

0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f

fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f
5072
6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0
f252
14a0ffe40ffb803000246000a6c6f6164466163746f724900097468726573686f6c6
4787
03f48770800030002740005696d61676574004a3c494d47205352433
d226
87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e747
5726
5732f6c6162732f627269636b735f7765622e6a7067223e74000474657874740202497420697
3206
96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c6974617
46f7
220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e207468652
0766
172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d6
5206
6616d696c6961722077697468207468652070726f6a6563747320616e64206d6174657269616
c732
0746861742073747564656e74732077696c6c20626520646f696e672c20616e6420626520617
7617
265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d732
0616
e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c69617269747
9207
769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e74732
0697
320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f706
5642
06120736570617261746520636f7572736520666f637573696e67206f6e20746865207573652
06f6
620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e202
0416
c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d6520746
f207
4616b652074686973206164646974696f6e616c20636f757273652e7870

And I don't know what type it is.  It is it a binary string?  Can I convert
it
to text and if so, how?

Thank You,
Nathan Cook
[EMAIL PROTECTED]


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




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




Re: [PHP] add to .htpasswd via php

2001-05-02 Thread Joseph Koenig

My code looks very similiar to Tyrone's...here's what I'm using. When
I'm on command line I'm the same user as the web server is running as.

$username = "test2";
$password = "test";
$passfile = "/usr/home/myuser/etc/.htpasswd";

$addpass = "/usr/local/apache/1.3.12/bin/htpasswd -mb $passfile
$username $password";

$add = exec($addpass);

Anyone see anything stupid I'm missing? Thanks,

Joe

Tyrone Mills wrote:
> 
> I do this exact thing on my system, here is the code I use:
> 
> $update = exec ("/usr/local/apache/bin/htpasswd -b ./.htpasswd $username $password");
> 
> My guess is you are dealing with a permissions issue. Like Jack says, try 'su 
>nobody' (or whatever your webserver runs as) and then try the command... Once that 
>works, so will your script.
> 
> - Original Message -
> From: "Jack Dempsey" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, May 02, 2001 10:44 AM
> Subject: RE: [PHP] add to .htpasswd via php
> 
> > what user are you running the command on the the command line, and what user
> > is php running it as? if you're root for the first one, but nobody on the
> > second, that would be your problem...
> >
> > -jack
> >
> > -Original Message-
> > From: Joseph Koenig [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, May 02, 2001 1:40 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] add to .htpasswd via php
> >
> >
> > I'm attempting to streamline my work by writing a script that will add a
> > user to the .htpasswd file. If echo the command I'm sending (via exec())
> > and run it on the command line, it works fine. From php though, it does
> > nothing. All paths are full paths starting at server level. Is there
> > anything that anyone is familiar with that would cause this to not work?
> > Thanks,
> >
> > Joe
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >

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




[PHP] Decimal to Ascii

2001-05-02 Thread Wee Chua

Hi all,
Can i convert decimal 23 to ascii in PHP? Thanks.

Calvin Chua
Systems Analyst
InterClean Equipment, Inc.
734-975-2967
www.InterClean.com


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




Re: [PHP] SQL Select Unique() ?

2001-05-02 Thread CC Zona

In article ,
 [EMAIL PROTECTED] (Anuradha Ratnaweera) wrote:

> > Is there a method of extracting rows from a MySQL table Uniquely (as in only
> > once) ?. For example, when a user performs a search, using two words,
> > it may return the same row twice if the search is spread over two or more
> > SQL "selections".  An example:
> 
> I am not sure whether you can do it on mysql. On postgresql you can do a
> 
> select distinct ...

The "distinct" keyword also works in mysql (the manual at mysql.com 
provides details).

-- 
CC

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




RE: [PHP] Forms with Field Arrays and JavaScript

2001-05-02 Thread Tim McGuire

For IE 5 and NN 4.7 at least,
I made it work like this:

for(var i = 0;i
etc.
It works well 




>>> "Diego Fulgueira" <[EMAIL PROTECTED]> 05/02/01 09:14AM >>>
After several tries, I am convinced there is no way to do it. I went around
the problem by using dinamic field names (var1, var2, var3, etc) and then
reading them using $HTTP_POST_VARS["var".$i], where $i would be your former
index to the array. For example:

The form coud have HTML code like this:





Each field can be referenced by JavaScript code like this:

document.myform.myvar1.value="hello";

Or dynamically like this:

myfield=new array();
for(i=0;;i++)


if(!eval("document.myform.myvar"+i)) break;
myfield[i]=eval("document.myform.myvar"+i);
}
myfield[1].value="hello";

When the form is submitted, asuming, method=POST, then you get the field
values like this:

$myvars=array();
for($i=0;;$i++)
{
if(empty($HTTP_POST_VARS["myvar".$i]) break;
$myvars[$i]=$HTTP_POST_VARS["myvar".$i];
}

Hope it helps.
Cheers, Diego.
  -Original Message-
  From: Utopia [mailto:[EMAIL PROTECTED]] 
  Sent: Tuesday, 01 May, 2001 10:32 PM
  To: [EMAIL PROTECTED] 
  Subject: Re: [PHP] Forms with Field Arrays and JavaScript


  Hello,

  I see you sent this back in January. I'm having the very same problem.

  Could you PEEEAAASSEEE tell me how to assign a value to the
'myfields[]' text field using JavaScript. I can't make it happen.


  Thanks.

  Tiffany
  
  THIS WAS YOUR MESSAGE ON THE BOARD
  Hi! I was wondering if someone knows, or can think of a way to go around
  this problem i have.


  The thing is i am working with a form with a field array. Each field is
  something like:
  


  When i receive the posted data, I can access the "myfields" array. This is
  fine.


  The problem is within my form i have client JavaScript code to validate
the
  form data. But I can't make reference to a form object called myfields[]
or
  myfields[5] or just myfields. The property name of the javascript object
is
  set to "myfields[]", but reference to myfields[][5] or
  document.myform.fields["myfields[]"] doesn't work either.


  Any suggestions will be greatly appreciated.
  Thanks in advance.




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




RE: [PHP] add to .htpasswd via php

2001-05-02 Thread Matt Schroebel

You might want to forget the exec and write direct to the file as in this code gallery 
item:
http://www.zend.com/codex.php?id=521&single=1

> From: Joseph Koenig [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 1:40 PM
 
> I'm attempting to streamline my work by writing a script that 
> will add a
> user to the .htpasswd file. If echo the command I'm sending 
> (via exec())

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




Re: [PHP] Website production tool in PHP

2001-05-02 Thread andreas \(@work\)

Hi,

search google or have a look at http://sourceforge.net/


http://www.phpgroupware.org/


maybe you find something 
and dont need to start from zero


greetings

andreas

p.s:  nice page ;-)


- Original Message - 
From: "Michael O'Neal" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 7:26 PM
Subject: [PHP] Website production tool in PHP


Hi,

I am wondering if a website planning/production tool exists already in 
PHP?  This would be something that the agency and the client could use as 
a central "meeting" place about the project, with deadlines, comps, 
project brief, etc...

Unix based, PHP/MySQL setup is preferred.

I thought I'd mail the list before I built one from scratch.

Please email me directly at [EMAIL PROTECTED], as I am on the digest.  
Thanks!


mto

Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
-
 M   A   N   G   O
B  O  U  L  D  E  R 
-
http://www.thinkmango.com
[EMAIL PROTECTED]
p-303.442.1821
f-303.938.8507



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



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




[PHP] Strange behaviour of mktime() in objects

2001-05-02 Thread heinisch

Hi folks,
I have to make several conversions from / to  timestamp (seconds in the 
UNIX-Epoche)
here you see two snippets of my code
File1 the testfile
 setTimeStamp($wert);
?>

File2 the Classfile

";
   }

   $this -> TS = mktime(12,00,00,$pieces[1],$pieces[3],$pieces[0]);
   echo "TIMESTAMP in Object = ".date("H:i:s-Y-m-d",$this -> TS)."";

}/* end function */
}/* end class */
?>

The output is :
TIMESTAMP[0] = 2001
TIMESTAMP[1] = 04
TIMESTAMP[2] = 20
TIMESTAMP in Object = 13:00:00-2001-03-31
As you can see, the output of the pieces is correct, but the reassembling 
to a date
gives a wrong date and time, (I would understand, if time is incorrect, but 
the date
is absolutely out of tune)
Any ideas what this could be??
Thanks in advance Oliver


-- 
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] Closing a FTP connection

2001-05-02 Thread Brandon Orther

Hello,

I have recently been using the ftp functions in php to get a lot of stuff
done.  My question is when I exit; a php script does it close the ftp
connection for me?  I thought it would since the script is completely
closing also.

If anyone knows please let me know thanxZ

Brandon


-- 
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] Template programming

2001-05-02 Thread Daniel Guerrier

Where can I find detailed info on creating websites
using php templates.  
Hardcopy or online

Thanks in advance

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.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]




  1   2   >