[PHP] How to know?

2005-10-13 Thread gustav
Hi there! I have a string like this... (envorinment string) HOSTfriggAUDIODEV/tmp/SUNWut/dev/utaudio/8dtstart_sessionlogfile/dev/nullDTSCREENSAVERLISTStartDtscreenBlankXMBINDDIR/usr/dt/lib/bindingsUTAUDIODEV/tmp/SUNWut/dev/utaudio/8AB_CARDCATALOG/usr/dt/share/answerbooks/C/ab_cardcatalogLC_ALLCDT

Re: [PHP] 404 ErrorDocument in safe mode

2005-10-13 Thread darren kirby
quoth the Petr Kodytek: > Hallo, > > I've problem with 404 ErrorDocument in safe mode on version 5.1.0RC1. I'm > using error script to redirect nonexisting URLs to pages with content from > database (something like mod_rewrite). After when my webhosting provider > upgrades to 5.1.0RC1 my pages retu

[PHP] Volunteers Wanted for How-To testing / contribution

2005-10-13 Thread Brian Fioca
I've recently released version 1.0 of the WASP framework for PHP 5.http://wasp.sourceforge.netAnd I'm in the final draft stages of a How-To article:http://fioca.com/brian/wiki/index.php/How-To_Write_a_Simple_Blog_in_WASPWASP is a lightweight but powerful framework written in the spirit of (but rath

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-13 Thread David Robley
Ben wrote: > Graham Anderson said the following on 10/13/05 15:31: >> Is this a bit better ? >> As directed, I 'sanitized' all user input variables with trim and >> mysql_real_escape_string. >> >> thanks for everyone's patience as I am starting at ground zero >> concerning security. >> >> >> if

[PHP] Re: Login is not working. Please help....

2005-10-13 Thread David Robley
twistednetadmin wrote: > When I fill in the form with user and password, it goes to the > loginerror.php anyway. > Is this because I use switch with only one case(I'm going to make more > later), and if it is. What should I use instead? > This is my first php-script. I have tested this on both php

[PHP] Login is not working. Please help....

2005-10-13 Thread twistednetadmin
When I fill in the form with user and password, it goes to the loginerror.php anyway. Is this because I use switch with only one case(I'm going to make more later), and if it is. What should I use instead? This is my first php-script. I have tested this on both php4 and php5. Please help. (login.p

[PHP] Re: Obsession with BC

2005-10-13 Thread Oliver Grätz
GamblerZG schrieb: > Recently, I asked my hosting provider when they are going to switch to > PHP5. They replied that it will not happen any time soon, since they > will install PHP5 only on new servers. Their reasoning was simple: PHP5 > will inevitably break some old scripts, and it's just not

Re[2]: [PHP] Obsession with BC, take 2

2005-10-13 Thread Richard Davey
Hi, Friday, October 14, 2005, 1:07:04 AM, you wrote: > Let me get it straight. There are two ways of running PHP four and > five on one server. First one is by using five's compatibility mode, > and it breaks some of the old scripts. The second one is by using > two different apache modules. It *

Re: [PHP] Obsession with BC, take 2

2005-10-13 Thread GamblerZG
Richard Lynch wrote: >> PHP developers assume that PHP5 will be frequently used to parse PHP4 >> scripts. Why? > Because that's how the real world works. "The real world" works that way because, as you just said, installing 2 php modules side by side is a "great deal of system administration".

[PHP] Setting up Linux and SendMail for SMTP

2005-10-13 Thread Todd Cary
I have a Linux server on my network, however my main mail is handled by Thunderbird on my PC which uses my ISP's SMTP server (UserName and PW). Can I configure SendMail to send mail to my ISP's SMTP server using the built in mail() function of PHP? If I use one of the Mail Classes, I can do i

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-13 Thread Ben
Graham Anderson said the following on 10/13/05 15:31: Is this a bit better ? As directed, I 'sanitized' all user input variables with trim and mysql_real_escape_string. thanks for everyone's patience as I am starting at ground zero concerning security. if( isset($_REQUEST['cmd']) OR isse

Re: [PHP] 电子传单 ,最廉价的宣传方式

2005-10-13 Thread Stephen Johnson
请停止发送电子邮件到这个列表, 或我将被迫使解开一千头骆驼蚤入您的腋窝。 http://www.ouradoptionblog.com Join our journey of adoption http://www.thelonecoder.com [EMAIL PROTECTED] continuing the struggle against bad code */ ?> > From: KOKO电子传单 <[EMAIL PROTECTED]> > Date: Fri, 14 Oct 2005 06:33:57 +0800 > To: > Subject: [PHP] 电子

Re: [PHP] Mark Email as Urgent

2005-10-13 Thread Nathaniel Hall
Richard Lynch wrote: > On Thu, October 13, 2005 12:47 pm, Nathaniel Hall wrote: > >>I have a PHP script that automatically sends an e-mail when accessed. >>Is there any way to mark the e-mail that is sent >>as urgent or flagged? >> >>Any help is appreciated. > > > Yes, but... > > You can add a

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-13 Thread Graham Anderson
Is this a bit better ? As directed, I 'sanitized' all user input variables with trim and mysql_real_escape_string. thanks for everyone's patience as I am starting at ground zero concerning security. if( isset($_REQUEST['cmd']) OR isset($_REQUEST['path'] )) { // decrypt and santize var

Re: [PHP] Connecting to MySQL Sever using PHP5

2005-10-13 Thread Jochem Maas
Edward Vermillion wrote: Jochem Maas wrote: Jay Blanchard wrote: [snip] I have just installed PHP5. I am using Windows XP and have already installed MySQL. When I try and make a connection to a database on MySQL via Dreamweaver I can we make Dreamweaver illegal? [snip] But *I* us

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-13 Thread Graham Anderson
Ok, I just heard back from him and feel like an idiot my htaccess file for the folder containing the php script was not set properly guess at this point, I'll take all of the advice you guys gave and implement it :) g On Oct 13, 2005, at 2:21 PM, Robert Cummings wrote: On Thu, 2005-10

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-13 Thread Robert Cummings
On Thu, 2005-10-13 at 17:05, Graham Anderson wrote: > How does a hacker get access to your scripts located outside the web > folder? > I asked a friend to hack my php script within the web folder... Ummm, the obvious thing to do is ask your friend how he did it, then we'll tell you how to preven

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-13 Thread Jochem Maas
Graham Anderson wrote: How does a hacker get access to your scripts located outside the web folder? I asked a friend to hack my php script within the web folder... er. why don't you [EMAIL PROTECTED]&#(%*&[EMAIL PROTECTED](_*^#()% % er ask him. all of my crucial function were called by

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-13 Thread John Nichel
Graham Anderson wrote: How does a hacker get access to your scripts located outside the web folder? I asked a friend to hack my php script within the web folder... all of my crucial function were called by: require_once("/home/siren/includes/fonovisa.inc"); the 'encrypt' functions are MCRYPT_

[PHP] prevent user from getting scripts outside the web folder

2005-10-13 Thread Graham Anderson
How does a hacker get access to your scripts located outside the web folder? I asked a friend to hack my php script within the web folder... all of my crucial function were called by: require_once("/home/siren/includes/fonovisa.inc"); the 'encrypt' functions are MCRYPT_RIJNDAEL_256 He was abl

RE: [PHP] RE: Removing Items from an Array

2005-10-13 Thread Alan Lord
Blimey... That's going to take some de-ciphering... It looks fascinating :-) Thanks! Alan > -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: 13 October 2005 20:53 > To: Alan Lord > Cc: php-general@lists.php.net > Subject: Re: [PHP] RE: Removing Items from an Arr

Re: [PHP] Connecting to MySQL Sever using PHP5

2005-10-13 Thread Edward Vermillion
Jochem Maas wrote: Jay Blanchard wrote: [snip] I have just installed PHP5. I am using Windows XP and have already installed MySQL. When I try and make a connection to a database on MySQL via Dreamweaver I can we make Dreamweaver illegal? [snip] But *I* use DW... I know, I know... re

Re: [PHP] RE: Removing Items from an Array

2005-10-13 Thread Jochem Maas
Alan Lord wrote: Hi TG and others, I think I must be missing something here. Your example doesn't seem to traverse "down" into a multidim array. Also, it appears as though your script assumes that the structure of the array is known. It isn't and it is retrieved from "far away" and I have no

[PHP] RE: Removing Items from an Array

2005-10-13 Thread Alan Lord
Hi TG and others, I think I must be missing something here. Your example doesn't seem to traverse "down" into a multidim array. Also, it appears as though your script assumes that the structure of the array is known. It isn't and it is retrieved from "far away" and I have no control over it's s

Re: [PHP] Re: Run a php script as a separate thread/process

2005-10-13 Thread Richard Lynch
On Wed, October 12, 2005 10:23 am, cc wrote: > On 10/12/05, Tommy Jensehaugen <[EMAIL PROTECTED]> wrote: >> Thank you very much. This is what I ended up with if anyone needs >> it: >> >> > function runSeparateThread($strHost, $strPath="/") { >> $fFile = fsockopen($strHost, 80, $intError, $strError

Re: [PHP] Can't compare a decrypted variable to a string ?

2005-10-13 Thread Graham Anderson
many thanks :) I'll try this g On Oct 13, 2005, at 10:27 AM, Jochem Maas wrote: Graham Anderson wrote: For some reason, I have to store a decrypted string as a variable before I can compare it to another string. The decrypt function is located in another php script //Get variable $cmd =

Re: [PHP] Mark Email as Urgent

2005-10-13 Thread Richard Lynch
On Thu, October 13, 2005 12:47 pm, Nathaniel Hall wrote: > I have a PHP script that automatically sends an e-mail when accessed. > Is there any way to mark the e-mail that is sent > as urgent or flagged? > > Any help is appreciated. Yes, but... You can add a header "Priority: High" (I think it's

Re: [PHP] Mark Email as Urgent

2005-10-13 Thread Dan McCullough
add a header in the mail function between 1 - 5, 1 being the highest $headers .= "X-Priority: 1\n"; On 10/13/05, Nathaniel Hall <[EMAIL PROTECTED]> wrote: > I have a PHP script that automatically sends an e-mail when accessed. Is > there any way to mark the e-mail that is sent > as urgent or fla

Re: [PHP] Mark Email as Urgent

2005-10-13 Thread John Nichel
Nathaniel Hall wrote: I have a PHP script that automatically sends an e-mail when accessed. Is there any way to mark the e-mail that is sent as urgent or flagged? Yes. Any help is appreciated. http://us2.php.net/manual/en/function.mail.php additional_headers -- John C. Nichel ÜberGeek K

[PHP] Mark Email as Urgent

2005-10-13 Thread Nathaniel Hall
I have a PHP script that automatically sends an e-mail when accessed. Is there any way to mark the e-mail that is sent as urgent or flagged? Any help is appreciated. -- Nathaniel Hall, GSEC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ardent Pursing help

2005-10-13 Thread tg-php
I would just go to Ford's dealership lookup page here: http://www.fordvehicles.com/dealerships/index.asp Pick a major city or two or three in each state and go down the list. that should get you a list of all the major Ford dealerships and be quicker than finding/implementing and/or using a PHP

Re: [PHP] Guide for C programmer

2005-10-13 Thread Richard Lynch
On Thu, October 13, 2005 6:13 am, Turgut Hakký ÖZDEMÝR wrote: > I'm looking for a document describing differences between C and PHP, > important points for programmers who already know C,C++, and things > that > must be taken care. > I'm googling for about an our but i can't find anything. Any > su

Re: [PHP] Connecting to MySQL Sever using PHP5

2005-10-13 Thread Jochem Maas
Jay Blanchard wrote: [snip] I have just installed PHP5. I am using Windows XP and have already installed MySQL. When I try and make a connection to a database on MySQL via Dreamweaver I can we make Dreamweaver illegal? get the following error message: "An unidentified error has occurred".

Re: [PHP] Problem with Javascript:...submit()

2005-10-13 Thread Jochem Maas
Stephen Leaf wrote: On Thursday 13 October 2005 01:13 am, Johan Grobler wrote: while ($row = mysql_fetch_array($sql_result)) { echo" ".$row['LITERATURE_title']." - ".$row['res_fname']." ".$row['res_lname']." ... Everything works as long as $row['LITERATURE_title'] is one word, see this var

[PHP] Ardent Pursing help

2005-10-13 Thread Chirantan Ghosh
Hi All, My company is trying to send an offer email to all Ford dealers in USA. We don't intend to send them unapproved emails i.e. sp*m hence, we will call then first. Is there any way I can generate a PHP client/code that can search Google/Yahoo/MSN and grab the PR/Sales contacts ( e.g. addre

Re: [PHP] Obsession with BC, take 2

2005-10-13 Thread Richard Lynch
On Wed, October 12, 2005 4:31 pm, GamblerZG wrote: > Since nobody ansvered the real question my previous message, I will > re-phrase it. > > PHP developers assume that PHP5 will be frequently used to parse PHP4 > scripts. Why? Because that's how the real world works. Somebody installs PHP5 on a s

Re: [PHP] What's the safest way to destory/wipe out the arrays within the associative arrays?

2005-10-13 Thread Richard Lynch
On Wed, October 5, 2005 2:12 pm, Scott Fletcher wrote: > What is the safest way to destroy or take out the > $xml['NEWSFEED']['0']['MESSAGE']['2']. associative arrays starting > with > ['2'] and those arrays inside of the ['2'] array path? > > The unset() would make it not possible to reassign

Re: [PHP] Can't compare a decrypted variable to a string ?

2005-10-13 Thread Jochem Maas
Graham Anderson wrote: For some reason, I have to store a decrypted string as a variable before I can compare it to another string. The decrypt function is located in another php script //Get variable $cmd = $_REQUEST['cmd']; echo $cmd; // uJy4p09z6bSR80eLNFnBWBj/EsRCfIz2C/WrcFNcZE8= echo

Re: [PHP] function to compare ip addr to a ip range>

2005-10-13 Thread Richard Lynch
On Thu, October 13, 2005 9:26 am, Bosky, Dave wrote: > Does anyone have a function that will check if an ip address falls > with > a starting/ending ip address range>> If you are using PostgreSQL, it has a built-in IP address data type which almost for sure does this. :-) Maybe what you want to d

[PHP] Trouble figuring out a Walk through an Array

2005-10-13 Thread Phillip S. Baker
Greetings All, Having trouble figureing out a certain walk through an array. And I am not finding the help I need in the manual or anything. I have an associative arr ($arr) With about 20 elements in it. Ten of which are required. So I have another associative array called $required, with all the

Re: [PHP] Can't compare a decrypted variable to a string ?

2005-10-13 Thread Robin Vickery
On 10/13/05, Graham Anderson <[EMAIL PROTECTED]> wrote: > $realcmd = decrypt($cmd); [...] > elseif(decrypt($cmd) == $realcmd) That's obviously going to succeed no matter what $cmd decrypts into. It doesn't really tell you anything useful. > $realcmd = decrypt($cmd); // 'makesmil' [...

Re: [PHP] Trouble figuring out a Walk through an Array

2005-10-13 Thread Richard Davey
Hi Phillip, Thursday, October 13, 2005, 4:56:30 PM, you wrote: > Having trouble figureing out a certain walk through an array. > And I am not finding the help I need in the manual or anything. > I have an associative arr ($arr) With about 20 elements in it. > Ten of which are required. So I have

[PHP] Trouble figuring out a Walk through an Array

2005-10-13 Thread Phillip S. Baker
Greetings All, Having trouble figureing out a certain walk through an array. And I am not finding the help I need in the manual or anything. I have an associative arr ($arr) With about 20 elements in it. Ten of which are required. So I have another associative array called $required, with all the

Re: [PHP] Trouble figuring out a Walk through an Array

2005-10-13 Thread Greg Donald
On 10/13/05, Phillip S. Baker <[EMAIL PROTECTED]> wrote: > I want to see if $key matches any of the values in $required. If so do > something in particular. If not then do something else. It does not > particularly matter which value in the $required it matches, just so long as > it matches. in_ar

[PHP] Trouble figuring out a Walk through an Array

2005-10-13 Thread Phillip S. Baker
Greetings All, Having trouble figureing out a certain walk through an array. And I am not finding the help I need in the manual or anything. I have an associative arr ($arr) With about 20 elements in it. Ten of which are required. So I have another associative array called $required, with all the

[PHP] Social Networking

2005-10-13 Thread JM
Hi all, I've been looking for social networking software like you see on myspace.comor hi5.com . Does anyone know of any? I'd like to check out some freeware first. TIA. JM

Re: [PHP] Problem with Javascript:...submit()

2005-10-13 Thread Stephen Leaf
On Thursday 13 October 2005 01:13 am, Johan Grobler wrote: > while ($row = mysql_fetch_array($sql_result)) > { > echo" method=\"post\"> > >".$row['LITERATURE_title']." - ".$row['res_fname']." > ".$row['res_lname']." ... > > Everything works as long as $row['LITERATURE_title'] is one word, see thi

[PHP] Can't compare a decrypted variable to a string ?

2005-10-13 Thread Graham Anderson
For some reason, I have to store a decrypted string as a variable before I can compare it to another string. The decrypt function is located in another php script //Get variable $cmd = $_REQUEST['cmd']; echo $cmd; // uJy4p09z6bSR80eLNFnBWBj/EsRCfIz2C/WrcFNcZE8= echo decrypt($cmd);// mak

Re: [PHP] Is DOM the right thing for the job?

2005-10-13 Thread Stephen Leaf
On Thursday 13 October 2005 12:30 am, Chris wrote: > Snag #1) > The DOMDocument seems to represent an entire page, all I'd like to do is > represent a Form tag and it's internal HTML. I can actually get it to > work that way, but it seems like it's the wrong way to go about things. being how XML wo

Re: [PHP] function to compare ip addr to a ip range

2005-10-13 Thread tg-php
You could try converting to long IP addresses and comparing that way: http://us3.php.net/manual/en/function.ip2long.php $startip = "192.168.0.5"; $endip = "192.168.0.16"; $targetip = "192.168.0.7"; $startlong = ip2long($startip); $endlong = ip2long($endip); $targetlong = ip2long($targetip);

[PHP] Re: [PHP-WIN] Re: [PHP] Removing Items from an Array

2005-10-13 Thread tg-php
That works just as well, if you have only two levels of depth. Mostly I was trying to illustrate how to use $key => $value in a foreach and what to do if you need to go multiple levels down. Once you get to the bottom level, then you can use isset() certainly. Just wanted to make sure that it

Re: [PHP] What's the safest way to destory/wipe out the arrays within the associative arrays?

2005-10-13 Thread Paul Waring
On Wed, Oct 05, 2005 at 03:12:51PM -0400, Scott Fletcher wrote: > What is the safest way to destroy or take out the > $xml['NEWSFEED']['0']['MESSAGE']['2']. associative arrays starting with > ['2'] and those arrays inside of the ['2'] array path? > > The unset() would make it not possible to r

Re: [PHP] How to automate php with crontab?

2005-10-13 Thread John Nichel
Greg Donald wrote: On 10/5/05, Scott Fletcher <[EMAIL PROTECTED]> wrote: Then do something like this... 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/inquiry_pull_test.php Or more simply: */5 Jinx. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] --

Re: [PHP] How to automate php with crontab?

2005-10-13 Thread John Nichel
Scott Fletcher wrote: Then do something like this... 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/inquiry_pull_test.php Or just... */5 * * * * /path/to/script.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.n

Re: [PHP] How to automate php with crontab?

2005-10-13 Thread Greg Donald
On 10/5/05, Scott Fletcher <[EMAIL PROTECTED]> wrote: > Then do something like this... > > 0,5,10,15,20,25,30,35,40,45,50,55 * * * * > /usr/local/bin/inquiry_pull_test.php Or more simply: */5 -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/

Re: [PHP] chown function

2005-10-13 Thread John Nichel
Scott Fletcher wrote: Well, apache use the "nobody:nobody" permission... Apache runs whatever you configure user:group to be. Default is nobody:nobody. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] How to automate php with crontab?

2005-10-13 Thread Scott Fletcher
Then do something like this... 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/inquiry_pull_test.php in the crontab file Depending on your situation, you might will need to add or not add the "#!/usr/local/bin/php" at the top of the php scripts... I don't know if your php script is

Re: [PHP] chown function

2005-10-13 Thread Scott Fletcher
Well, apache use the "nobody:nobody" permission... ""Keith Spiller"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Jasper, > > When using my Php script, I don't see any error messages. > > I have logged in using SSH, but the directories created are > owned by 48 and not my ftp u

[PHP] What's the safest way to destory/wipe out the arrays within the associative arrays?

2005-10-13 Thread Scott Fletcher
[code] $xml = array ( 'NEWSFEED' => array ( '0' => array ( 'MESSAGE' => array ( '0' => array ( 'ATTRIBUTES' => array ( 'ID' => 'test2', 'TID' => 'test4' ), 'TITLE' => array (

Re: [PHP] Any good free easy converting tool?

2005-10-13 Thread Leif Gregory
Hello Gustav, Wednesday, October 12, 2005, 12:55:11 PM, you wrote: > Someone know of any good free tool for converting from Access to > Mysql. I just need to import certain tables into an already > existance database. DBTools (freeware) http://www.dbtools.com.br/ I use it quite a bit. --

Re: [PHP] function to compare ip addr to a ip range>

2005-10-13 Thread Greg Donald
On 10/13/05, Bosky, Dave <[EMAIL PROTECTED]> wrote: > Does anyone have a function that will check if an ip address falls with > a starting/ending ip address range>> #!/usr/bin/php $ip && $ip2 < $ip3 || $ip2 < $ip && $ip2 > $ip3 ) { echo "In range\n"; } else { echo "Not in range\n"; }

[PHP] RE: Removing Items from an Array - My Solution

2005-10-13 Thread Alan Lord
Hi cc and others. I have had quite a struggle with this. But finally, the end result looks quite simple... Here is the array of Keys Names I want to preserve: $filter = array( 'CategoryId' => 1, 'CategoryLevel' => 1, 'CategoryName' => 1, 'CategoryParentId' => 1 ); Here is the routine which

Re: [PHP] Store a variable name in a database field.

2005-10-13 Thread Liam Delahunty
On 10/10/05, Richard Lynch <[EMAIL PROTECTED]> wrote: > > $email_body is a free form text field, and he wants to be able to type > > in anything he desires and have it pulled from the contact table. > > Firstly please accept my aplogies for the deay in responding to your questions, I;ve had the mo

[PHP] function to compare ip addr to a ip range>

2005-10-13 Thread Bosky, Dave
Does anyone have a function that will check if an ip address falls with a starting/ending ip address range>> Thanks, Dave ** HTC Disclaimer: The information contained in this message may be privileged and confidentia

[PHP] Re: Store a variable name in a database field.

2005-10-13 Thread Al
Liam Delahunty wrote: I'm sure this is a pretty basic question, but I have searched for a decent answer and can't find one. I have a client that want to be able to write newsletters (newsleters_tbl.email_body) and use fields from his contact table, so as we grind through the contact list for new

Re: [PHP] actually the è not the ampersand

2005-10-13 Thread John Nichel
jonathan wrote: do you then have to do the reverse operation to get it back for rendering. Since it was erroring on me during DOM creation, I feel like I'm going around it to put it into a format it likes but then on display via XSL transformation, I will have to convert it back. Or am I m

Re: [PHP] Re: array_slice and for loop problem

2005-10-13 Thread Rodney Green
$output[] = array_slice ($textArray, $int_range[start][$i], $int_range[end][$i]); is creating a multi-dimensional array as $output. In my foreach loop I was treating $output as a single-dimensional array. That's why it wasn't working. print_r() is my friend. :-) On 10/13/05, Rodney Green <[EMAIL

Re: [PHP] Re: array_slice and for loop problem

2005-10-13 Thread Rodney Green
Thanks Connor. I changed the line to the following. Is it correct now? The array $output[] is now being populated. However, when I go to print the values of the $output array using a foreach loop, it prints out the word "Array" for each array item. $output[] = array_slice ($textArray, $int_range[s

[PHP] PHP & Mysql Developer needed in South Africa

2005-10-13 Thread Paul
I have a position open for someone in Johannesburg South Africa with the following skills. php mysql css xml xhtml Image and artwork a bonus (ImageReady,Photoshop, Paintshop, The gimp) Flash a bonus Please email me directly at [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/)

[PHP] Re: include file to global scope

2005-10-13 Thread cc
the answer cc wrote: > yes, its possible, consider this: > > /** > * @param $file_to_include path to php file you want to get its content > * @return included contents > */ > function get_output($file_to_include){ > ob_start(); > include $file_to_include; > return ob_get_clean(); > } is

RE: [PHP] Connecting to MySQL Sever using PHP5

2005-10-13 Thread Jay Blanchard
[snip] I have just installed PHP5. I am using Windows XP and have already installed MySQL. When I try and make a connection to a database on MySQL via Dreamweaver I get the following error message: "An unidentified error has occurred". What could be wrong and how can I fix this problem? [/snip]

[PHP] Re: ampersand in dom with utf-8

2005-10-13 Thread cc
maybe i should have said: è is not an _xml_ entity. i m not very sure. sorry. `è' is an html entity, represents the letter `è' in iso-8859-1 charset, which have ascii value of 0xe8 . to have it recognized by libxml, there are 3 ways to do this: 1, &#e8; 2, è 3, è 1 can be saved using either utf-

Re: [PHP] Guide for C programmer

2005-10-13 Thread Paul Waring
On Thu, Oct 13, 2005 at 02:13:37PM +0300, Turgut Hakk? ?ZDEM?R wrote: > I'm looking for a document describing differences between C and PHP, > important points for programmers who already know C,C++, and things that > must be taken care. > I'm googling for about an our but i can't find anything. An

Re: [PHP] Guide for C programmer

2005-10-13 Thread Jochem Maas
Turgut Hakkı ÖZDEMİR wrote: I'm looking for a document describing differences between C and PHP, php is a weak & dynamaically typed, intepreted language - C is not. (aka 'a world of difference') the php/zend engine are written in C btw. important points for programmers who already know C,C++

[PHP] Guide for C programmer

2005-10-13 Thread Turgut Hakkı ÖZDEMİR
I'm looking for a document describing differences between C and PHP, important points for programmers who already know C,C++, and things that must be taken care. I'm googling for about an our but i can't find anything. Any suggestions.? :)

Re: [PHP] Re: include file to global scope

2005-10-13 Thread Jochem Maas
cc wrote: yes, its possible, consider this: /** * @param $file_to_include path to php file you want to get its content * @return included contents */ function get_output($file_to_include){ ob_start(); include $file_to_include; return ob_get_clean(); } this will break if the included f

Re: [PHP] Trouble moving directory

2005-10-13 Thread Robin Vickery
On 10/13/05, -k. <[EMAIL PROTECTED]> wrote: > --- Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: > > $source_dir = escapeshellarg( '/some/dir/Dir That Won't Move/' ); > > > Unfortunately escapeshellarg doesn't work for all cases, it will escape the " > ' " in that example > but it doesn't escape

Re: [PHP] Re: Connecting to MySQL Sever using PHP5

2005-10-13 Thread Andreja Simovic
- Original Message - From: "Mark Rees" <[EMAIL PROTECTED]> To: Sent: Thursday, October 13, 2005 11:54 AM Subject: Fw: [PHP] Re: Connecting to MySQL Sever using PHP5 Back to the list - please use reply-all - Original Message - From: "Andreja Simovic" <[EMAIL PROTECTED]> To: "

Fw: [PHP] Re: Connecting to MySQL Sever using PHP5

2005-10-13 Thread Mark Rees
Back to the list - please use reply-all - Original Message - From: "Andreja Simovic" <[EMAIL PROTECTED]> To: "Mark Rees" <[EMAIL PROTECTED]> Sent: Thursday, October 13, 2005 9:58 AM Subject: Re: [PHP] Re: Connecting to MySQL Sever using PHP5 > Sometimes this error may ocure > if you do no

Re: [PHP] Small regex help?

2005-10-13 Thread Guy Brom
I ended up using the rewriteCountQuery from PEAR::DB_Pager (attached). Thanks all! function rewriteCountQuery($sql) { if (preg_match('/^\s*SELECT\s+\bDISTINCT\b/is', $sql) || preg_match('/\s+GROUP\s+BY\s+/is', $sql)) { return false; } $queryCount = preg_replace('/(?:.*)\bFROM

[PHP] 404 ErrorDocument in safe mode

2005-10-13 Thread Petr Kodytek
Hallo, I've problem with 404 ErrorDocument in safe mode on version 5.1.0RC1. I'm using error script to redirect nonexisting URLs to pages with content from database (something like mod_rewrite). After when my webhosting provider upgrades to 5.1.0RC1 my pages returns this error message : =

Re: [PHP] Re: ampersand in dom with utf-8

2005-10-13 Thread Marcus Bointon
On 13 Oct 2005, at 07:24, cc wrote: both `è' and `î' are not entities in charset utf-8, use `è' and `î' instead. I would expect that to result in unconverted entities in the output. If you're intending to send that content as HTML, then I guess that would be OK. However, if yo

[PHP] Re: Connecting to MySQL Sever using PHP5

2005-10-13 Thread Mark Rees
> I have just installed PHP5. I am using Windows XP and have already installed > MySQL. > > When I try and make a connection to a database on MySQL via Dreamweaver I > get the following error message: "An unidentified error has occurred". > > What could be wrong Have a look at this: http://uk2.php

[PHP] Connecting to MySQL Sever using PHP5

2005-10-13 Thread Jacques
I have just installed PHP5. I am using Windows XP and have already installed MySQL. When I try and make a connection to a database on MySQL via Dreamweaver I get the following error message: "An unidentified error has occurred". What could be wrong and how can I fix this problem? Jacques --