Re: [PHP] Problem with array

2005-06-16 Thread Rory Browne
Not sure if it works for numeric indices, but maybe you could replace $piece[3] with (array_key_exists(3, $piece) ? $piece[3] : ""). If you want you could abstract that into a function, like function array_access_element($key, $srch_array, $def=""){ return array_key_exists($key, $srch_array) ? $s

[PHP] Problem with array

2005-06-16 Thread Ross
As with my previous post the problem is the pieces of the array can vary from 1 to 4 items. So pieces 3 and 4 are often undefined giving the 'undefined index' notice. All I really want to do is display the array pieces if they EXIST. But as they are inside a echo statement so I can't even to a

Re: [PHP] Delivery reports about your e-mail

2005-06-16 Thread Sean Straw / PSE
Yes, it would be nice if the list didn't relay this obvious cruft. I'm s*bscribed to quite a few discussion lists, and php-general seems to be the ONLY one relaying these malware messages and the claims of virus filters. It looks rather like php-general is operating as an open list, seeing as

Re: [PHP] Retrievable weather service info?

2005-06-16 Thread Rick Emery
Quoting "Murray @ PlanetThoughtful" <[EMAIL PROTECTED]>: Hi All, Just wondering if anyone knows of a free weather service that can be interrogated by PHP for information such as current temperature for a range of cities around the world? Regards, Murray I *highly* recommend the PEAR Service

Re: [PHP] Those checkboxes again

2005-06-16 Thread Jack Jackson
Thanks, Joe! I see what you weer going after. I had several problems including the fact that I really didn't understand what I was trying to do until after I did it. And I had some log errors a friend helped with. What I needed to do was delete the media types from the intersection table and

Re: [PHP] question about system function call

2005-06-16 Thread Richard Lynch
On Thu, June 16, 2005 2:43 pm, Tom Cruickshank said: > I'm trying to do the following in php. > > system("/usr/bin/smbutil -v view //[EMAIL PROTECTED]") > > to be able to view some shares folders on a server. > > Unfortunately, if I use this command in console, I get prompted for a > password.

Re: [PHP] passthru() passing variables

2005-06-16 Thread Richard Lynch
I dunno what 127 actually means, but the last time we saw it on this list, it boiled down to: "You can't even run your 'sh' shell, much less Perl in that shell." Check what's in /bin/sh and what its permissions are. Make sure it's actually a valid shell binary, and not something bogus. If that'

Re: [PHP] Freing memory resources?

2005-06-16 Thread Richard Lynch
Is they any way you could combine the UPDATE queries? I suspect not, but those are the ones that are probably what will get worse and worse over time as the file/db grows. All the left outer joins are not gonna help either, but that's only a few hundred rows, right?... But will it grow? Finally

Re: [PHP] Fshockopen error while opening a https stream urgent help needed

2005-06-16 Thread Richard Lynch
On Thu, June 16, 2005 5:08 am, choksi said: I'm not 100% sure, but... > I am running PHP5.0.2 over apache 1.3.29 and openssl-0.9.7d on a Debian > Php Configure command './configure' '--with-apxs=/www/bin/apxs' > '--with-openssl-dir=/usr/local­/src/webserver/openssl-0.9.7d/­' This "didn't work

[PHP] question about system function call

2005-06-16 Thread Tom Cruickshank
Hello, I'm trying to do the following in php. system("/usr/bin/smbutil -v view //[EMAIL PROTECTED]") to be able to view some shares folders on a server. Unfortunately, if I use this command in console, I get prompted for a password. Is there a way in php to wait for a password and enter it

Re: [PHP] Using Exec Function

2005-06-16 Thread Richard Lynch
On Thu, June 16, 2005 6:23 am, Davide Pasqualini said: > I'm Windows XP Professional SP1, Apache 2.0.50 and PHP 5.0.4 > I'm trying to run a Win32 application using Exec() or Shell_Exec() but it > doesn't work. > > In PHP.INI safe_mode is Off > Apache is running under SYSTEM user > > I also tryed

Re: [PHP] Re: OT Major Release Versions

2005-06-16 Thread Richard Lynch
[the responses in the latter parts of this are more relevant to PHP-general than the first half... Sorry... Skim down for "PHP-GENERAL STUFF"] On Thu, June 16, 2005 7:28 am, Jason Barnett said: > Richard Lynch wrote: >> Let's take RedHat and other OSes, for example, only because I don't want >>

Re: [PHP] [RE-PHRASE] PHP ZIP Class

2005-06-16 Thread Richard Lynch
On Thu, June 16, 2005 7:05 am, Jay Blanchard said: > I am in need of a PHP class or script or something that will allow me to > designate a group of files to be zipped up, including PDF files, > automagically. It must be compatible with WinZip as that is what the > user will have access to. I have

Re: [PHP] SSL ldap bind

2005-06-16 Thread Richard Lynch
On Thu, June 16, 2005 9:45 am, Jason Motes said: WILD GUESS ALERT! > and returns the error: > ldap_ssl_interactive_bind_s: Unknown authentication method (86) > additional info: SASL(-4): no mechanism available: No worthy mechs > found > if i run the above command with the de

Re: [PHP] Question to example from manual

2005-06-16 Thread Richard Lynch
On Thu, June 16, 2005 1:31 pm, janbro said: > Hi, I've been working on this example and copied it in my > webroot, it doesn't give me an output. Does anybody know why? > "System" WinXP Apache 2.0.50 php 5.0.3 > > thx > janbro > > > Example 7-6. Static variables with recursive functions > > functi

[PHP] Re: Question to example from manual

2005-06-16 Thread janbro
autsch, that's true, sorry for disturbing thx Jason janbro Jason Barnett schrieb: > janbro wrote: > >> Hi, I've been working on this example and copied it in my >> webroot, it doesn't give me an output. Does anybody know why? >> "System" WinXP Apache 2.0.50 php 5.0.3 > > > Because you've d

[PHP] Re: Question to example from manual

2005-06-16 Thread janbro
autsch, that's true, sorry for disturbing thx Jason janbro Jason Barnett schrieb: > janbro wrote: > >> Hi, I've been working on this example and copied it in my >> webroot, it doesn't give me an output. Does anybody know why? >> "System" WinXP Apache 2.0.50 php 5.0.3 > > > Because you've d

[PHP] Re: Question to example from manual

2005-06-16 Thread Matthew Weier O'Phinney
* janbro <[EMAIL PROTECTED]>: > Hi, I've been working on this example and copied it in my > webroot, it doesn't give me an output. Does anybody know why? > "System" WinXP Apache 2.0.50 php 5.0.3 > > Example 7-6. Static variables with recursive functions > > function Test() > { > static $coun

[PHP] Re: Question to example from manual

2005-06-16 Thread Jason Barnett
janbro wrote: Hi, I've been working on this example and copied it in my webroot, it doesn't give me an output. Does anybody know why? "System" WinXP Apache 2.0.50 php 5.0.3 Because you've defined the function, but you've never called it. thx janbro Example 7-6. Static variables with recur

[PHP] Question to example from manual

2005-06-16 Thread janbro
Hi, I've been working on this example and copied it in my webroot, it doesn't give me an output. Does anybody know why? "System" WinXP Apache 2.0.50 php 5.0.3 thx janbro Example 7-6. Static variables with recursive functions -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] undefined index

2005-06-16 Thread Philip Hallstrom
I have a bit of code that splices up a cookie into 4 bits so the information can be displayedin a neat way in a table if ($quantity == 0){ } else { $pieces = explode(" ", $quantity); $formatted_price = sprintf('%0.2f', $pricecode); echo "$pieces[0]$pieces[1] $pieces[2] $pieces[3] $pie

Re: [PHP] SSL ldap bind

2005-06-16 Thread Jason Motes
I am trying to do an ssl ldap bind to novell's edir 8.7. I have followed the examples from http://us4.php.net/manual/en/function.ldap-connect.php I know these examples are for AD, but they should be close to the same. I have exported the server cert and made the changes to ldap.conf. and

Re: [PHP] passthru() passing variables

2005-06-16 Thread Richard Lynch
On Thu, June 16, 2005 11:44 am, Chris Herold said: > Thanks for the tips; however, I think I am still missing something. > > My perl script is running when called by passthru() because within the > body of the simple test code I have set it up to: > > > print "Content-type: text/html\n\n"; > > pr

[PHP] undefined index

2005-06-16 Thread Ross
I have a bit of code that splices up a cookie into 4 bits so the information can be displayedin a neat way in a table if ($quantity == 0){ } else { $pieces = explode(" ", $quantity); $formatted_price = sprintf('%0.2f', $pricecode); echo "$pieces[0]$pieces[1] $pieces[2] $pieces[3]

[PHP] Re: Include and extending classes

2005-06-16 Thread Matthew Weier O'Phinney
* Mike Smith <[EMAIL PROTECTED]>: > In core.class.php I have my generic special html methods and my db > connection. I'm having trouble accessing $this->db (initialized in > core.class.php) from user.class.php. Am I wrong in thinking > user.class.php should be able to access methods/attributes of >

Re: [PHP] Newbie Setup...

2005-06-16 Thread Greg Donald
On 6/16/05, Chase <[EMAIL PROTECTED]> wrote: > Hi there! > I have been stumbling my way through PHP for a while now and I have > finally decided that I need to set up my development machine with a local > testing / debugging setup so that I can stop uploading all of my blunders to > my public sit

Re: [PHP] Newbie Setup...

2005-06-16 Thread Joe Wollard
Chase, If you're looking for an uber easy setup you might try phptriad which has PHP, MySQL and Apache all in one installer. I'm not sure what versions jwynia has put into the package, but I'm assuming that you're not using the latest and greatest of anything anyway since most hosts seem to l

Re: [PHP] Those checkboxes again

2005-06-16 Thread Joe Wollard
Jack, Everything /appears/ to be in order here, but that still leaves the actual content of the database and the actual POST data in question. If this were my script I'd think a simple place to start troubleshooting is your /if/ statement. I'd update it to output a little more detail just unt

[PHP] report

2005-06-16 Thread MAILER-DAEMON
The original message was included as attachment -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Newbie Setup...

2005-06-16 Thread Chase
Hi there! I have been stumbling my way through PHP for a while now and I have finally decided that I need to set up my development machine with a local testing / debugging setup so that I can stop uploading all of my blunders to my public site to test... I am running XP Pro SP2 with IIS inst

Re: [PHP] Re: If I have 2 arrays...

2005-06-16 Thread Jason Barnett
Jay Blanchard wrote: [snip] Close... I think array keys are preserved from the (original) first array, but other than that those appear to be the values that should intersect. [/snip] After a var_dump I am seeing that there is an extra space in each element of one array, so no intersection oc

Re: [PHP] If I have 2 arrays...

2005-06-16 Thread Richard Davey
Hello Jay, Thursday, June 16, 2005, 5:54:40 PM, you wrote: JB> ...shouldn't array_intersect($arr1, $arr2) return an array? Works perfectly for me (code below) PHP 4.3.11 Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear

RE: [PHP] Re: If I have 2 arrays...

2005-06-16 Thread Jay Blanchard
[snip] Close... I think array keys are preserved from the (original) first array, but other than that those appear to be the values that should intersect. [/snip] You are correct, I was more worried about the values -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

RE: [PHP] Re: If I have 2 arrays...

2005-06-16 Thread Jay Blanchard
[snip] Close... I think array keys are preserved from the (original) first array, but other than that those appear to be the values that should intersect. [/snip] After a var_dump I am seeing that there is an extra space in each element of one array, so no intersection occurs. -- PHP General M

[PHP] Re: If I have 2 arrays...

2005-06-16 Thread Jason Barnett
Close... I think array keys are preserved from the (original) first array, but other than that those appear to be the values that should intersect. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] If I have 2 arrays...

2005-06-16 Thread Jay Blanchard
Array ( [0] => ORIGTN [1] => PSP_BILL1 [2] => PSP_BILL2 [3] => PSP_BILL3 [4] => PSP_CITY [5] => PSP_STATE [6] => PSP_ZIP [7] => PSP_CONNECT [8] => STATUS [9] => _0404 [10] => _0405 [11] => _0406 [12] => Total [13] => Rate [14] => Total Com

Re: [PHP] SSL ldap bind

2005-06-16 Thread Jason Motes
$ldapserver="ldapserver"; //this works $ldapserver="ldaps://ldapserver"; //this fails $ldapserver="ldapserver:636"; //this fails if (!($ldap = ldap_connect($ldapserver))) { die ("Could not connect to LDAP Server: $server\n"); } else { print "Connected\n"; } if (!(ldap_bind($ldap, $bindU

[PHP] Re: Include and extending classes

2005-06-16 Thread Jason Barnett
Mike Smith wrote: I'm trying to consolidate code in a new project. My dirs are: / /inc core.class.php /mods /mods/system system.class.php //extends core.class.php user.class.php //extends system.class.php In core.class.php I have my generic special html methods and my db connection.

[PHP] SSL ldap bind

2005-06-16 Thread Jason Motes
Hello list I am trying to do an ssl ldap bind to novell's edir 8.7. I have followed the examples from http://us4.php.net/manual/en/function.ldap-connect.php I know these examples are for AD, but they should be close to the same. I have exported the server cert and made the changes to ldap.co

[PHP] Include and extending classes

2005-06-16 Thread Mike Smith
I'm trying to consolidate code in a new project. My dirs are: / /inc core.class.php /mods /mods/system system.class.php //extends core.class.php user.class.php //extends system.class.php In core.class.php I have my generic special html methods and my db connection. I'm having trouble a

[PHP] A more sane problem description

2005-06-16 Thread Jack Jackson
Sorry, The last post I made was fairly incomprehensible. I'm trying to a) edit information which is already in an intersection table, while b) allowing the user to add new information to the intersection table The information in it is pulled from the table media_art and I grab the media_art_id

[PHP] Re: Fshockopen error while opening a https stream urgent help needed

2005-06-16 Thread Manuel Lemos
Hello, on 06/16/2005 09:08 AM choksi said the following: Hello All I am running PHP5.0.2 over apache 1.3.29 and openssl-0.9.7d on a Debian Php Configure command './configure' '--with-apxs=/www/bin/apxs' '--with-openssl-dir=/usr/local­/src/webserver/openssl-0.9.7d/­' '--enable-trans-sid' '--

[PHP] Re: [RE-PHRASE] PHP ZIP Class

2005-06-16 Thread Manuel Lemos
Hello, on 06/16/2005 11:05 AM Jay Blanchard said the following: I am in need of a PHP class or script or something that will allow me to designate a group of files to be zipped up, including PDF files, automagically. It must be compatible with WinZip as that is what the user will have access to.

Re: [PHP] [RE-PHRASE] PHP ZIP Class

2005-06-16 Thread Philip Hallstrom
I am in need of a PHP class or script or something that will allow me to designate a group of files to be zipped up, including PDF files, automagically. It must be compatible with WinZip as that is what the user will have access to. I have tried several things, a couple of classes, and some other

Re: [PHP] OT ??: Form posting without leaving form

2005-06-16 Thread Kall, Bruce A.
Thanks. This worked out to be the best solution of the suggestions I had received. I've implemented it and it works as advertised. Bruce John Browne wrote: Check out the "xmlhttp" object in Javascript: http://jibbering.com/2002/4/httprequest.html On 6/13/05, Kall, Bruce A. <[EMAIL PROTEC

[PHP] Re: [RE-PHRASE] PHP ZIP Class

2005-06-16 Thread Jason Barnett
I have no clue why your PDF's are reading one byte short. However, I did find a class over at SourceForge which claims to do exactly what you want: http://sourceforge.net/projects/few/ I have never used this package and have no idea if it's going to explode when you use it. -- NEW? | http:

Re: [PHP] Re: Image upload form

2005-06-16 Thread Jack Jackson
Nadim Attari wrote: http://www.php-help.net/sources-php/image.upload.function.353.html Thanks, Nadim, I'm sure that is a great script. I am really trying to learn how it's working, so I'm trying to stay away from pre-rolled stuff as much as I can and beg for the mercy of the list in buildin

[PHP] Those checkboxes again

2005-06-16 Thread Jack Jackson
hi, I'm severely frustrated and perhaps you can help with what I have done wrong. The checkboxes I use to populate an intersection table work to add the records, and now I am trying to update them. It's almost there but producing some unexpected results when the form is submitted: the idea is

[PHP] Re: Using Exec Function

2005-06-16 Thread Jason Barnett
Exec is the way to go... it gives you output as well as any error status. Here's an example script that works for a Win32 program I have and you should be able to adapt to your own usage: /** Notice that the command has extra quotes around it for the Windows command line as well as double-ba

[PHP] [RE-PHRASE] PHP ZIP Class

2005-06-16 Thread Jay Blanchard
I am in need of a PHP class or script or something that will allow me to designate a group of files to be zipped up, including PDF files, automagically. It must be compatible with WinZip as that is what the user will have access to. I have tried several things, a couple of classes, and some other t

[PHP] Re: OT Major Release Versions

2005-06-16 Thread Jason Barnett
Richard Lynch wrote: This is Computer Software philosophical musing, not specifically related to just PHP, but applicable to PHP and, well, all other OpenSource software... As I sit here surrounded by machines (physically and virtually) and realizing that while I've got most of them on "auto-upd

[PHP] Using Exec Function

2005-06-16 Thread Davide Pasqualini
I'm Windows XP Professional SP1, Apache 2.0.50 and PHP 5.0.4 I'm trying to run a Win32 application using Exec() or Shell_Exec() but it doesn't work. In PHP.INI safe_mode is Off Apache is running under SYSTEM user I also tryed to use backtick operator as shown in http://php.net/manual/en/languag

[PHP] Complinging 4.2.0 on FC4 Test 3

2005-06-16 Thread Andy Pieters
Hi All I am trying to compile php 4.2 on Fedora Core 4 Test 3 The compilation throws this: make[1]: Entering directory `/home/kdedev/php-4.2.0' /bin/sh /home/kdedev/php-4.2.0/libtool --silent --mode=link gcc -I. -I/home/kdedev/php-4.2.0/ -I/home/kdedev/php-4.2.0/main -I/home/kdedev/php-4.2.0

Re: [PHP] incrementing a register global

2005-06-16 Thread Sergey
You try to increment value of a var! to change it name u have to add $i to it's name like this foreach($i=1;$i<=$boxes;$i++){ echo $_GET['name'].$i; } foreach ($_GET as $var_name=>$var_value) { $i++; echo $var_mane.$i; } if I correctly understand u ""Jay Blanchard"" <[EMAIL PROTECTED]> ???

[PHP] Re: How to print variable name and contents

2005-06-16 Thread Sergey
You can use $$var constuction, what display name of $var function my_trace($var){ echo $$var.'='.$var.''; } ""nntp.charter.net"" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:[EMAIL PROTECTED] >I want to write a trace procedure and call it with variable names, and I am >havin

[PHP] Fshockopen error while opening a https stream urgent help needed

2005-06-16 Thread choksi
Hello All I am running PHP5.0.2 over apache 1.3.29 and openssl-0.9.7d on a Debian Php Configure command './configure' '--with-apxs=/www/bin/apxs' '--with-openssl-dir=/usr/local­/src/webserver/openssl-0.9.7d/­' '--enable-trans-sid' '--disable-libxml' Registered PHP Streams : php, file, http

[PHP] Re: Freing memory resources?

2005-06-16 Thread Sebastian Mendel
Sebastian Mendel wrote: >> Gustav Wiberg wrote: >>> Hi there! >>> >>> I have a script that runs about 10 minutes... Localy on my computer >>> (Windows XP 2.6Ghz, Apache) the computer hangs a little now and then >>> when the script is running. Is there any good way of releasing more >>> memory while

Re: [PHP] Freing memory resources?

2005-06-16 Thread Jochem Maas
Gustav Wiberg wrote: Hi there! I have a script that runs about 10 minutes... Localy on my computer (Windows XP 2.6Ghz, Apache) the computer hangs a little now and then when the script is running. Is there any good way of releasing more memory while the script is running? The script could take

[PHP] Returned mail: Data format error

2005-06-16 Thread Mail Delivery Subsystem
ALERT! This e-mail, in its original form, contained one or more attached files that were infected with a virus, worm, or other type of security threat. This e-mail was sent from a Road Runner IP address. As part of our continuing initiative to stop the spread of malicious viruses, Road Runner s

[PHP] Re: Freing memory resources?

2005-06-16 Thread Sebastian Mendel
Gustav Wiberg wrote: > Hi there! > > I have a script that runs about 10 minutes... Localy on my computer > (Windows XP 2.6Ghz, Apache) the computer hangs a little now and then > when the script is running. Is there any good way of releasing more > memory while the script is running? The script cou

[PHP] Freing memory resources?

2005-06-16 Thread Gustav Wiberg
Hi there! I have a script that runs about 10 minutes... Localy on my computer (Windows XP 2.6Ghz, Apache) the computer hangs a little now and then when the script is running. Is there any good way of releasing more memory while the script is running? The script could take 20 minutes, it's not

RE: [PHP] htmlArea - a 'client editor'

2005-06-16 Thread Kim Madsen
> -Original Message- > From: Kim Madsen [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 16, 2005 9:14 AM > To: php-general@lists.php.net > Subject: RE: [PHP] htmlArea - a 'client editor' > Yeah, looks cool, but I´m having a *lot* of trouble getting the listing of > current images and upl

[PHP] Re: incrementing a register global

2005-06-16 Thread Sebastian Mendel
Aaron Todd wrote: > I am posting data to a php script. I have several variables that are the > same except the number at the end is different. So the url of the called > script will be something like: > > http://www.something.com/test.php?name1=Sam&name2=Bill&name3=Joe > > On my script I am

Re: [PHP] Re: Converting [and] to XML format- help/advise requested

2005-06-16 Thread Sebastian Mendel
Dotan Cohen wrote: > On 6/15/05, Sebastian Mendel <[EMAIL PROTECTED]> wrote: >> Dotan Cohen wrote: >> > Hi gurus. I'm having fun replacing the text within [ and ] to XML > format on 4000+ files on a windows XP machine. I installed php (and an > apache server) on the machine because it i

RE: [PHP] autocomplete a field

2005-06-16 Thread Kim Madsen
> -Original Message- > From: xfedex [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 04, 2005 4:57 AM > To: php-general@lists.php.net > Subject: Re: [PHP] autocomplete a field > > Hi, > > Anyone know if theres a way to disable this feature for user using old > browsers or not suporting JS

RE: [PHP] htmlArea - a 'client editor'

2005-06-16 Thread Kim Madsen
> -Original Message- > From: M Saleh EG [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 04, 2005 2:57 PM > To: Rory Browne > Cc: [EMAIL PROTECTED]; php-general@lists.php.net > Subject: Re: [PHP] htmlArea - a 'client editor' > > www.FCKEditor.net > FCKEditor is