Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Bix
This is the part of the code as it stands, it gives a permission denied error. $imtemp=$_FILES['file']['tmp_name']; $imsize=$_FILES['file']['size']; $imname=$_FILES['file']['name']; if ($imsize > "10") {zerror("Image too large","Please go back and correct, image must be less than 100k"

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Bix
Not sure about cron, but will look into sudo. Thanks! "Adrian" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > you could setup a cronjob running as root which chowns the files. > or maybe you can so something with sudo > > > > > > -- > Adrian > mailto:[EMAIL

[PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Bix
Hiya, I have written as part of my CMS, an image upload system, now when the images are placed in the destination folder, they are owned by httpd.root and I need to get them to be owned by siteuser.sitegroup. I have tried to chmod and chgrp it to siteuser.sitegroup but it gives permission denied

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-14 Thread Bix
This is the part of the code as it stands, it gives a permission denied error. $imtemp=$_FILES['file']['tmp_name']; $imsize=$_FILES['file']['size']; $imname=$_FILES['file']['name']; if ($imsize > "10") {zerror("Image too large","Please go back and correct, image must be less than 100k"

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-11 Thread Bix
Much appreciated! Will try the ftp approach, thanks. "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wednesday 06 August 2003 18:16, Bix wrote: > > > I have written as part of my CMS, an image upload system, now when the > > im

Re: [PHP] WYSIWYG editor for PHP

2003-08-08 Thread Bix
I use dreamweaver in live data mode quite often, really works a treat! Set up a a site and in the testing server, just set it as /beta or the like, then edit your script, and run it in live data and you can feed it post/get/cookie data on the fly. "Jay Blanchard" <[EMAIL PROTECTED]> wrote in mess

[PHP] Re: List Files in Directory to Array

2003-06-15 Thread Bix
I have found ftp_nlist() Should suit me perfectly, sorry to trouble! Bix. ;o) "Bix" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all... > > Is there any way of reading the contents of a directory into an array so I > can generate a listin

[PHP] List Files in Directory to Array

2003-06-15 Thread Bix
n the directory into an array ie: $array_files[1] = "foo.jpg" $array_files[2] = "bar.jpg" etc... So I can then do a foreach and put them all in a drop down box to choose the image. Thanks in advance ;o) Bix -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: Switch function problem

2003-06-11 Thread Bix
Cant be done mate, do it like this... switch ($val){ case "FFS": case "FHG": case "FRG": //stuff break; case "DPT": case "DL": case "DF": case "DI": case "DO": //stuff break; } The cases pass through

[PHP] Help with a UBB Code style parser...

2003-06-11 Thread Bix
Hi all... I already have a bbcode style parser for my content ie: $output = str_replace("[b]",'',$output); $output = str_replace("[/b]",'',$output); $output = str_replace("[i]",'',$output); $output = str_replace("[/i]",'',$output); $output = str_replace("[img]",'',$output); etc... But I need to

Re: [PHP] Gracefully dealing with Cookies OFF

2003-06-07 Thread Bix
$_SERVER['REMOTE_ADDR']){ die ('This session is not valid for you");} The only problem lies with people on AOL or those that use proxy's because their IP address can cgange from minute to minute. With the expirey, make sure you update the expirey on every page after you'

[PHP] Re: COOKIES Question?

2003-06-06 Thread Bix
Not possible AFAIK since it would negate the point in having a local cookie policy and would leave possibility for abuse. Bix "Joaco" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I was wondering if anyone out there knew if there was any code you could add

[PHP] Re: [FYI] phpbooks.com

2003-06-06 Thread Bix
Goodstuff! Tight design work and works a charm ;o) Bix. "Mark Owen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi guys, > > we set up a new resource for organizing all books on PHP in a quick-to-scan, > Google-like center. Hope you enjoy it.

[PHP] PHP 4.3.2 Compiling error in native GD

2003-06-06 Thread Bix
I'm compiling with: ./configure --with-apxs --with-mysql=/usr --with-mcrypt=/usr/local/lib/ --wi th-imap=/home/redhat/SOURCES/imap-2001a/ --with-imap-ssl=/usr/local/ssl --wi th-dba --with-gd --with-jpeg-dir=/usr/local/lib --with-zlib-dir=/usr/local/l ib --enable-gd-native-ttf --with-png-dir=/usr/l

[PHP] Re: Where to start?

2003-06-06 Thread Bix
www.php.net is a beauty for function reference Your best place to start is here: http://www.devshed.com/Server_Side/PHP/PHP101/PHP101_1/page1.html 5 tutorials on the basics, plus devshed has 100s of tutorials on everything. "Simon Thurtle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTEC

Re: [PHP] Advice on script length please!

2003-06-05 Thread Bix
On a similar note, does php 'look at' all the functions even if not used? I can understand it reads them, but does it involve any parsing time? Bix. "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] > If I did this, would it make a hu

[PHP] Advice on script length please!

2003-06-05 Thread Bix
I am developing a cms with multiple zones and user management etc My file is currently 1200 lines long and consist of 450 lines of case statements and then the rest are functions. I'm getting parse times from 0.2 to 0.8 seconds for the different pages depending on complexity. The script is d

Re: [PHP] Fw: What Visual PHP Edit ?

2003-06-04 Thread Bix
Dreamweaver MX has a Live mode. It uploads the script to a testing server and it shows the output live as you edit, given whatever post/get/cookie variables you want to pass to it. Quite clever. Unfortunately, DW MX is as stable as an elephant on a pole. "Miles Thompson" <[EMAIL PROTECTED]> wrot

Re: [PHP] foreach and mysql_fetch_array problem

2003-06-03 Thread Bix
oop for each row, > foreach will give you the key and value. How else do you want to loop? > > while($row=mysql_fetch_array($result)) { > foreach($row as $key => $article){ > //here you have $key and $article > } > } > > Bix wrote: > > I need to access the row by

Re: [PHP] foreach and mysql_fetch_array problem

2003-06-03 Thread Bix
ether. "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Try: > > Bix wrote: > > Hi all, > > > > I am trying to build up a table using values from a db as follows... > > > > mysql_select_db($db, $sql_con

Re: [PHP] foreach and mysql_fetch_array problem

2003-06-03 Thread Bix
ether. "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Try: > > Bix wrote: > > Hi all, > > > > I am trying to build up a table using values from a db as follows... > > > > mysql_select_db($db, $sql_con

Re: [PHP] foreach and mysql_fetch_array problem

2003-06-03 Thread Bix
= mysql_query($sql); > while($myrow = mysql_fetch_array($result)) > { > echo "Name: {$myrow['first']} {$myrow['surname']}. Age: > {$myrow['age']}"; > } > ?> > > > Now, given the above code, what else do y

Re: [PHP] "update" question [T20030602013J]

2003-06-03 Thread Bix
Whenever I sign up to a new news service/website or the like, I give them their own alias at my domain, so i can see how my email address is used ;o) Hence the [EMAIL PROTECTED] Hate spammers. No need. Bix. "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL

[PHP] foreach and mysql_fetch_array problem

2003-06-03 Thread Bix
Hi all, I am trying to build up a table using values from a db as follows... mysql_select_db($db, $sql_connection); $result = mysql_query("SELECT * FROM $table WHERE $query LIMIT $limit",$sql_connection); $output = "\n"; foreach(mysql_fetch_array($result) as $key => $article){ //stuff } n

[PHP] Re: Getting the parsing time of a script

2003-06-01 Thread Bix
Thanks guys ;o) "Bix" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there any way getting the time taken to parse a script? > > IE: > > This page took 0.13 seconds to generate. > > Is it a predefined variable anywhere? > > Thanks ;o) &

[PHP] Getting the parsing time of a script

2003-05-31 Thread Bix
Is there any way getting the time taken to parse a script? IE: This page took 0.13 seconds to generate. Is it a predefined variable anywhere? Thanks ;o) Bix. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Isn't it grea...t

2003-03-17 Thread Bix
I think it is an amazing feat to have a scripting language with such a comprehensive (with user notes) documentation, helpful community of users and developers, and a team of writers who for little reward, continue to develop PHP to make it work better and faster for us all to use. So here's to PH

Re: [PHP] How to break out of nested loops

2003-03-17 Thread Bix
Cheers matey! Nice to know people are alwyas around to help! ;o) "Erik Price" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Bix wrote: > > I have a for loop within a for loop, and need to break out of both > > together... &

[PHP] Re: How to break out of nested loops

2003-03-17 Thread Bix
Cheers buddy, didn't think of that! ;o) "Philip Hallstrom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://www.php.net/manual/en/control-structures.break.php > > -philip > > On Mon, 17 Mar 2003, Bix wrote: > > > I have a for loo

Re: Fw: [PHP] Looking at individual chars of string

2003-03-17 Thread Bix
Much appreciated! "Erik Price" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Kevin Stone wrote: > > > Actually as far as the computer knows strings *are* arrays. Access any > > character within a string in the same mannor as you would access an element > > in an array. For ex

Re: [PHP] Looking at individual chars of string

2003-03-17 Thread Bix
Cheers buddy! "Erik Price" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Bix wrote: > > Is it possible to look at individual chars of a string? > > > > eg: $str = "12345"; > > > > print $str_1 // Gives &q

[PHP] Looking at individual chars of string

2003-03-17 Thread Bix
Is it possible to look at individual chars of a string? eg: $str = "12345"; print $str_1 // Gives "1" print $str_2 // Gives "2" Doing this with an array would be handy, maybe using explode or preg_split? Thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] Creating an Array from a Multi-line string (Help appreciated)

2003-03-12 Thread Bix
Much appreciated! Will give it a try. Thanks ;o) "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 21:10 12.03.2003, Bix said: > [snip] > >I am creating an interface page with a mu

[PHP] Creating an Array from a Multi-line string (Help appreciated)

2003-03-12 Thread Bix
Hiya, ( first time poster, long time user ;o) ) I am creating an interface page with a multi line text box which will recieve a list of phone numbers on individual lines, so: 12345 12345 12345 and so on... I need to carry out an operation on each of these numbers (add them to a mysql db, but tha