[PHP] advice on how to build this array from an array.

2011-06-07 Thread Adam Preece
hi all,

please forgive me if i do not make sense, ill try my best to explain.


i have this array or arrays.

Array ( [name] = super duplex stainless steels [id] = 30 [page_cat_id] = 10 
[main_nav] = true [cat_name] = material range ) 
Array ( [name] = standard stainless steels [id] = 31 [page_cat_id] = 10 
[main_nav] = true [cat_name] = material range )
 Array ( [name] = non ferrous [id] = 32 [page_cat_id] = 10 [main_nav] = 
true [cat_name] = material range ) 
Array ( [name] = carbon based steels [id] = 33 [page_cat_id] = 10 [main_nav] 
= true [cat_name] = material range ) 

is it possible to build an array  and use the [cat_name] as the key and assign 
all the pages to that cat_name?

what im trying to achieve is a category of pages but i want the cat_name as the 
key to all the pages associated to it

hope i make sense

kind regards

Adam 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Jasper Mulder


 From: a...@blueyonder.co.uk
 Date: Tue, 7 Jun 2011 21:50:27 +0100
 To: php-general@lists.php.net
 Subject: [PHP] advice on how to build this array from an array.

 hi all,

 please forgive me if i do not make sense, ill try my best to explain.


 i have this array or arrays.

 Array ( [name] = super duplex stainless steels [id] = 30 [page_cat_id] = 
 10 [main_nav] = true [cat_name] = material range )
 Array ( [name] = standard stainless steels [id] = 31 [page_cat_id] = 10 
 [main_nav] = true [cat_name] = material range )
 Array ( [name] = non ferrous [id] = 32 [page_cat_id] = 10 [main_nav] = 
 true [cat_name] = material range )
 Array ( [name] = carbon based steels [id] = 33 [page_cat_id] = 10 
 [main_nav] = true [cat_name] = material range )

 is it possible to build an array and use the [cat_name] as the key and assign 
 all the pages to that cat_name?

 what im trying to achieve is a category of pages but i want the cat_name as 
 the key to all the pages associated to it

 hope i make sense

 kind regards

 Adam

Suppose that $arrays is your array of arrays.
Then is 
$res = array();
foreach($arrays as $item){
  $res[$item['cat_name']][] = $item;
}
what you are looking for?

Best regards,
Jasper Mulder
  
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Adam Preece
hi,

thanks for your reply.

i have figured out, well kind of, and got the data i need but the problem is 
its nested within to many arrays!

Array ( 
[threads  form types] = 
Array ( [0] = Array ( [name] = imperial thread form [id] = 
28 [page_cat_id] = 9 [main_nav] = true ) [1] = Array ( [name] = metric iso 
threads [id] = 29 [page_cat_id] = 9 [main_nav] = true ) ) 
[material range] = 
Array ( [0] = Array ( [name] = super duplex stainless steels 
[id] = 30 [page_cat_id] = 10 [main_nav] = true ) [1] = Array ( [name] = 
standard stainless steels [id] = 31 [page_cat_id] = 10 [main_nav] = true ) 
[2] = Array ( [name] = non ferrous [id] = 32 [page_cat_id] = 10 [main_nav] 
= true ) [3] = Array (   [name] = carbon based steels [id] = 33 
[page_cat_id] = 10 [main_nav] = true ) ) 
) 

how can i get this just do its a $k = $v pair,

the key as it is [threads  form types]  [material range], and the value, the 
single array [Array ( [name] = imperial thread form [id] = 28 [page_cat_id] 
= 9 [main_nav] = true ) [1] = Array ( [name] = metric iso threads [id] = 
29 [page_cat_id] = 9 [main_nav] = true )] ?

hope this makes sense

Adam


On 7 Jun 2011, at 22:25, Jasper Mulder wrote:

 
 
 From: a...@blueyonder.co.uk
 Date: Tue, 7 Jun 2011 21:50:27 +0100
 To: php-general@lists.php.net
 Subject: [PHP] advice on how to build this array from an array.
 
 hi all,
 
 please forgive me if i do not make sense, ill try my best to explain.
 
 
 i have this array or arrays.
 
 Array ( [name] = super duplex stainless steels [id] = 30 [page_cat_id] = 
 10 [main_nav] = true [cat_name] = material range )
 Array ( [name] = standard stainless steels [id] = 31 [page_cat_id] = 10 
 [main_nav] = true [cat_name] = material range )
 Array ( [name] = non ferrous [id] = 32 [page_cat_id] = 10 [main_nav] = 
 true [cat_name] = material range )
 Array ( [name] = carbon based steels [id] = 33 [page_cat_id] = 10 
 [main_nav] = true [cat_name] = material range )
 
 is it possible to build an array and use the [cat_name] as the key and 
 assign all the pages to that cat_name?
 
 what im trying to achieve is a category of pages but i want the cat_name as 
 the key to all the pages associated to it
 
 hope i make sense
 
 kind regards
 
 Adam
 
 Suppose that $arrays is your array of arrays.
 Then is 
 $res = array();
 foreach($arrays as $item){
   $res[$item['cat_name']][] = $item;
 }
 what you are looking for?
 
 Best regards,
 Jasper Mulder
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] advice on how to build this array from an array.

2011-06-07 Thread Jim Lucas
On 6/7/2011 2:44 PM, Adam Preece wrote:
 hi,
 
 thanks for your reply.
 
 i have figured out, well kind of, and got the data i need but the problem is 
 its nested within to many arrays!
 
 Array ( 
   [threads  form types] = 
   Array ( [0] = Array ( [name] = imperial thread form [id] = 
 28 [page_cat_id] = 9 [main_nav] = true ) [1] = Array ( [name] = metric 
 iso threads [id] = 29 [page_cat_id] = 9 [main_nav] = true ) ) 
   [material range] = 
   Array ( [0] = Array ( [name] = super duplex stainless steels 
 [id] = 30 [page_cat_id] = 10 [main_nav] = true ) [1] = Array ( [name] = 
 standard stainless steels [id] = 31 [page_cat_id] = 10 [main_nav] = true ) 
 [2] = Array ( [name] = non ferrous [id] = 32 [page_cat_id] = 10 
 [main_nav] = true ) [3] = Array (   [name] = carbon based steels [id] 
 = 33 [page_cat_id] = 10 [main_nav] = true ) ) 
 ) 
 
 how can i get this just do its a $k = $v pair,
 
 the key as it is [threads  form types]  [material range], and the value, 
 the single array [Array ( [name] = imperial thread form [id] = 28 
 [page_cat_id] = 9 [main_nav] = true ) [1] = Array ( [name] = metric iso 
 threads [id] = 29 [page_cat_id] = 9 [main_nav] = true )] ?
 
 hope this makes sense
 
 Adam
 
 
 On 7 Jun 2011, at 22:25, Jasper Mulder wrote:
 

 
 From: a...@blueyonder.co.uk
 Date: Tue, 7 Jun 2011 21:50:27 +0100
 To: php-general@lists.php.net
 Subject: [PHP] advice on how to build this array from an array.

 hi all,

 please forgive me if i do not make sense, ill try my best to explain.


 i have this array or arrays.

 Array ( [name] = super duplex stainless steels [id] = 30 [page_cat_id] = 
 10 [main_nav] = true [cat_name] = material range )
 Array ( [name] = standard stainless steels [id] = 31 [page_cat_id] = 10 
 [main_nav] = true [cat_name] = material range )
 Array ( [name] = non ferrous [id] = 32 [page_cat_id] = 10 [main_nav] = 
 true [cat_name] = material range )
 Array ( [name] = carbon based steels [id] = 33 [page_cat_id] = 10 
 [main_nav] = true [cat_name] = material range )

 is it possible to build an array and use the [cat_name] as the key and 
 assign all the pages to that cat_name?

 what im trying to achieve is a category of pages but i want the cat_name as 
 the key to all the pages associated to it

 hope i make sense

 kind regards

 Adam

 Suppose that $arrays is your array of arrays.
 Then is 
 $res = array();
 foreach($arrays as $item){
   $res[$item['cat_name']][] = $item;
 }
 what you are looking for?

 Best regards,
 Jasper Mulder

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 
 

How about showing your code?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice needed - general (GPS, databases, webs etc.)

2010-05-15 Thread SED
Hi,

 

I'm in the search for resources for the next step in the information's age.
I think smartphones with GPS and the internet will be THE BIG BUSINESS next
years.

 

Because this is hard business I'm not able to get overview and resources
handly, except by selling my soul to the big companies. There is so much
information on the internet that one person can not find what out what is
real and what is not.

 

Can you send me links regarding GPS, maps, smartphones that PHP programmers
focus on? I'm asking for useful information at advanced level, even though
it links to other programming languages, graphics or big companies.

 

Regards, 

Summi

from Iceland (...where the volcano stopped the world) J



Re: [PHP] Advice on maintaining public and private files

2010-02-21 Thread Kim Madsen

Al wrote on 20/02/2010 19:30:
I use Kim's solution and take it one step forward. Htacces files can get 
lost or corrupted, so


No solution to that problem as I see it.


In my  config file I have the text string.


I like the idea, but what if this file is never accessed?

--
Kind regards
Kim Emax - masterminds.dk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on maintaining public and private files

2010-02-21 Thread Al



On 2/21/2010 9:11 AM, Kim Madsen wrote:

Al wrote on 20/02/2010 19:30:

I use Kim's solution and take it one step forward. Htacces files can
get lost or corrupted, so


No solution to that problem as I see it.


In my config file I have the text string.


I like the idea, but what if this file is never accessed?



Generally my applications have Admins and Users.  Admins visit every day or two; 
when they do, function checkHTaccessFile($htaccessText) gets called.


It can also be called when Users visit, which is of course more often. This 
option is set in the config file.


If someone is particularly concerned a cronjob to run every x hours will also 
work.  This seems to me to be a bit of overkill.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on maintaining public and private files

2010-02-20 Thread Kim Madsen

Michael Stroh wrote on 19/02/2010 19:19:

I have a site I'm working on with some data that I want to be
readable by anyone, but some files that I want to keep hidden from
outside users. Here is an example of my file structure.

/products/data1/item_1/data.txt 

 /products/data2/item_2/data.txt

since no one has suggested it then... if you're on an Apache webserver 
use a .htaccess file in data2 which contains:


Deny from all
Allow from none

That will do the trick and PHP can still fetch the files in data2 and 
serve it to the user.


--
Kind regards
Kim Emax - masterminds.dk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on maintaining public and private files

2010-02-20 Thread Nathan Rixham
Kim Madsen wrote:
 Michael Stroh wrote on 19/02/2010 19:19:
 I have a site I'm working on with some data that I want to be
 readable by anyone, but some files that I want to keep hidden from
 outside users. Here is an example of my file structure.

 /products/data1/item_1/data.txt 
 /products/data2/item_2/data.txt
 
 since no one has suggested it then... if you're on an Apache webserver
 use a .htaccess file in data2 which contains:
 
 Deny from all
 Allow from none
 
 That will do the trick and PHP can still fetch the files in data2 and
 serve it to the user.
 

Glad you said this; I'd been waiting to see if anybody would - certainly
there is no quicker or easier way to solve this particular problem.

Also worth adding that you can easily password protect the directories
too using HTTP authorisation [1] (and even hook it in to LDAP or
suchlike very simply).

It's the curse of the PHP developer to try and use PHP to solve every
problem - we all fall fowl of it often (I've wasted years doing things
in PHP that really should have been done with a different tech).

[1] http://httpd.apache.org/docs/2.0/howto/auth.html

Regards!

Nathan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on maintaining public and private files

2010-02-20 Thread Al
I use Kim's solution and take it one step forward. Htacces files can get lost or 
corrupted, so



In my  config file I have the text string.

//region htaccess file text 
// Code writes to /db folder; Admin mode checks file existence and text; 
replaces with this if different.


$htaccessText = hta
# Prevent Direct Access to MiniRegDB DB Files
Files *
Order Deny,Allow
Deny from all
/Files
hta;
//endregion

In my main control file I call this function

/**
* checkHTaccessFile()
*
* Checks and restores htaccess  Prevent Direct Access to MiniRegDB Program Files
*
* @param mixed $htaccessText in config file
* @return
*/
function checkHTaccessFile($htaccessText)
{
if(file_exists(MINIREG_DATA_DIR . '.htaccess')  
file_get_contents(MINIREG_DATA_DIR . '.htaccess') == $htaccessText) return true;


file_put_contents(MINIREG_DATA_DIR . '.htaccess', $htaccessText);
return true;
}


On 2/20/2010 4:05 AM, Kim Madsen wrote:

Michael Stroh wrote on 19/02/2010 19:19:

I have a site I'm working on with some data that I want to be
readable by anyone, but some files that I want to keep hidden from
outside users. Here is an example of my file structure.

/products/data1/item_1/data.txt

  /products/data2/item_2/data.txt

since no one has suggested it then... if you're on an Apache webserver
use a .htaccess file in data2 which contains:

Deny from all
Allow from none

That will do the trick and PHP can still fetch the files in data2 and
serve it to the user.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice on maintaining public and private files

2010-02-19 Thread Michael Stroh
I have a site I'm working on with some data that I want to be readable by 
anyone, but some files that I want to keep hidden from outside users. Here is 
an example of my file structure.

/products/data1/item_1/data.txt
/products/data2/item_2/data.txt

I would like everything in data1 to be available by anyone who visits the site, 
but I want to keep items in the data2 folder to only be accessible through 
certain web page which I hope to eventually require logins. Some of these items 
I'd like to not only display but also allow people to download.

My main concern is that I don't want people to be able to guess the names of 
the files and then be able to access the information on them. Every 'item' has 
an entry in a MySQL database which holds some information. I was thinking I 
could have randomly generated folder names to take the place of the things like 
'item_2' such as

/products/data2/kl23j42i/data.txt

and then link the folder name through a database entry. But I'm not sure if 
there are more elegant or easier ways to deal with this. Plus someone could 
still just try randomly querying the site until they get a match. I'd first 
like to just create a web page where you can go to access the hidden files but 
would later like to add more control for other users using logins and passwords.

Most of my files are just text files and images. Any suggestions?

Thanks in advance!

Michael
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Bastien Koert
On Fri, Feb 19, 2010 at 1:19 PM, Michael Stroh st...@astroh.org wrote:
 I have a site I'm working on with some data that I want to be readable by 
 anyone, but some files that I want to keep hidden from outside users. Here is 
 an example of my file structure.

 /products/data1/item_1/data.txt
 /products/data2/item_2/data.txt

 I would like everything in data1 to be available by anyone who visits the 
 site, but I want to keep items in the data2 folder to only be accessible 
 through certain web page which I hope to eventually require logins. Some of 
 these items I'd like to not only display but also allow people to download.

 My main concern is that I don't want people to be able to guess the names of 
 the files and then be able to access the information on them. Every 'item' 
 has an entry in a MySQL database which holds some information. I was thinking 
 I could have randomly generated folder names to take the place of the things 
 like 'item_2' such as

 /products/data2/kl23j42i/data.txt

 and then link the folder name through a database entry. But I'm not sure if 
 there are more elegant or easier ways to deal with this. Plus someone could 
 still just try randomly querying the site until they get a match. I'd first 
 like to just create a web page where you can go to access the hidden files 
 but would later like to add more control for other users using logins and 
 passwords.

 Most of my files are just text files and images. Any suggestions?

 Thanks in advance!

 Michael
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




Place all those files above the web root, the use php to read in the
data from the files when display that data to the user.
-- 

Bastien

Cat, the other other white meat

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Rene Veerman
the proper way i know of is not the easiest to implement..;

1) create a php script that accepts enough parameters to get at your data.
eg: /products/view.php?dataNr=1itemNr=1
2) let that script compare the current user (visitor who's logged in)
to authentication data that tells which it if the user can access the
data requested. if it fails, you can route the user to a std page or
to a custom page (store in auth-data under onFail)
3) use apache's RewriteRule in /products/.htaccess to point virtual
urls  to the view script; /products/data1/item_1/data.txt =
/products/view.php?dataNr=1itemNr=1file=data.txt (or something like
that).

the main problem here is how to properly store authentication data.
how far to go depends on your (future) requirements.

for my cms i went all the way and copied the unix filesystem
permission architecture (incl the concept of users in groups) to work
from mysql on an object-cloud (mapped to any path(s) elsewhere).

but you can just as easilly just map userIDs to array records
containing the keys that view.php works on. sorta like:
global $permissions;
$permissions = array (
  100 = array(
array (
 dataNr = 1,
 itemNr = 1,
 fileID = 'data.txt',
 mayRead = true,
 mayWrite = false
),
(...other objects user 100 has permissions for...)
  userID = permissionsList
);

you could use username instead of userid even, but i recommend against
that if you're going to store user-definition records in a db, of
course.


On Fri, Feb 19, 2010 at 7:19 PM, Michael Stroh st...@astroh.org wrote:
 I have a site I'm working on with some data that I want to be readable by 
 anyone, but some files that I want to keep hidden from outside users. Here is 
 an example of my file structure.

 /products/data1/item_1/data.txt
 /products/data2/item_2/data.txt

 I would like everything in data1 to be available by anyone who visits the 
 site, but I want to keep items in the data2 folder to only be accessible 
 through certain web page which I hope to eventually require logins. Some of 
 these items I'd like to not only display but also allow people to download.

 My main concern is that I don't want people to be able to guess the names of 
 the files and then be able to access the information on them. Every 'item' 
 has an entry in a MySQL database which holds some information. I was thinking 
 I could have randomly generated folder names to take the place of the things 
 like 'item_2' such as

 /products/data2/kl23j42i/data.txt

 and then link the folder name through a database entry. But I'm not sure if 
 there are more elegant or easier ways to deal with this. Plus someone could 
 still just try randomly querying the site until they get a match. I'd first 
 like to just create a web page where you can go to access the hidden files 
 but would later like to add more control for other users using logins and 
 passwords.

 Most of my files are just text files and images. Any suggestions?

 Thanks in advance!

 Michael
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Rene Veerman
As far as storing the files, use a seperate subdirectory called
rawData or something, and place all your files in there, aim for 10
- 5000 files per directory, and keep it logical.
But since you want to stop guessers from accessing it, use a
randomID() function that you create to generate a random subdirectory
under rawData.
You could also use just the -MM-DD HH-MM-SS of the
submit/upload-date for the file or the last-modification date of the
file.

Then create something that maps IDs (dataNr, itemNr, fileID) to the
relative path under rawData.

Then let view.php readfile() and output the requested file, instead of
sending any link to your rawData-subdirectory-location to the
browser.

It should be airtight then.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Rene Veerman
1 more thing: doing this right isn't easy. at all.
it took me more than a year to do it properly.

you may wanna look around on sf.net for any package that can do this for you.

On Fri, Feb 19, 2010 at 7:19 PM, Michael Stroh st...@astroh.org wrote:
 I have a site I'm working on with some data that I want to be readable by 
 anyone, but some files that I want to keep hidden from outside users. Here is 
 an example of my file structure.

 /products/data1/item_1/data.txt
 /products/data2/item_2/data.txt

 I would like everything in data1 to be available by anyone who visits the 
 site, but I want to keep items in the data2 folder to only be accessible 
 through certain web page which I hope to eventually require logins. Some of 
 these items I'd like to not only display but also allow people to download.

 My main concern is that I don't want people to be able to guess the names of 
 the files and then be able to access the information on them. Every 'item' 
 has an entry in a MySQL database which holds some information. I was thinking 
 I could have randomly generated folder names to take the place of the things 
 like 'item_2' such as

 /products/data2/kl23j42i/data.txt

 and then link the folder name through a database entry. But I'm not sure if 
 there are more elegant or easier ways to deal with this. Plus someone could 
 still just try randomly querying the site until they get a match. I'd first 
 like to just create a web page where you can go to access the hidden files 
 but would later like to add more control for other users using logins and 
 passwords.

 Most of my files are just text files and images. Any suggestions?

 Thanks in advance!

 Michael
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Bob McConnell
From: Rene Veerman

 the proper way i know of is not the easiest to implement..;
 
 1) create a php script that accepts enough parameters to get at your
data.
 eg: /products/view.php?dataNr=1itemNr=1
 2) let that script compare the current user (visitor who's logged in)
 to authentication data that tells which it if the user can access the
 data requested. if it fails, you can route the user to a std page or
 to a custom page (store in auth-data under onFail)
 3) use apache's RewriteRule in /products/.htaccess to point virtual
 urls  to the view script; /products/data1/item_1/data.txt =
 /products/view.php?dataNr=1itemNr=1file=data.txt (or something like
 that).
 
 the main problem here is how to properly store authentication data.
 how far to go depends on your (future) requirements.

There are some easier tricks, but still not simple. Only the wrapper
script should be in the webroot space. Everything else should be outside
of it, but accessible by the user that the web server runs under. The
wrapper also manages the session and any other access controls
necessary, such as connections to a DB server. Once you parse the
parameters from the URL, use require() or require_once() to link in the
specific pages you need from outside webroot. This way none of the files
or paths are exposed to the browser and nobody can get to those pages
without going through the authentication in the wrapper. You can even
pull in more than one, so there could be one file for the banner, one
for the menu tree on the left column, one for a header, one for the page
specific content and one for the footer. It makes global updates
relatively easy, but can be a pain to get started.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] advice on setting up new site

2009-11-11 Thread PJ
Hi guys,
I've already posted on FreeBSD and didn't want to ignore you, so here goes:
I appreciate the help you have given me in the past and present... I am
not competent to handle the project we are embarking on, so let me ask
(offer ?) it here:
We're about to start new enterprise in the food service sector (I hate
the terms industry for anything related to food) which is a totally new
concept - can't reveal at the moment. And we are going to need someone
to implement the site.
So here's what I need to find out:
1. We're looking for someone who would be interested in working on it
and could handle all aspects on FreeBSD (I want to avoid MS and
especially anything not open source - requires programming of whatever
works best -- important: database (probably mysql - seems to be most
popular and our host uses it); will need flash or lots of images 
eventually instructional videos (flash ? or ?)
will need gps tracking of equipment (vehicles); inventory tracking on
daily/weekly basis; invoicing; AR/AP and CC management.
There's no reason why the work can't be done over the Internet... I've
done this before...
Let me know if you're interested and we can discuss methods of working
and payment... etc.
2. I would appreciate some suggestions about Unix programs that could be
applicable to meet our needs.
I look forward to hearing from from you :-)
Questions are welcome ... so are investors ;-)
PJ



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice wanted

2009-02-16 Thread Payne

Hi,

I am wanting to ask some advice on project I have in mind, but I am 
having problems finding examples. What I am working on is a set of tools 
that creates reports based on actions. I have the reports working good, 
but what I advice on is this. I like to create a page that shows a 
calendar. If an actions kicked off a report. I like to see on that 
calendar the date or link show a clickable link or under that date the 
name of the report.


Does anyone know where I can find examples so I can see what I need to do?

Payne

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice wanted

2009-02-16 Thread Ashley Sheridan
On Mon, 2009-02-16 at 10:53 -0500, Payne wrote:
 Hi,
 
 I am wanting to ask some advice on project I have in mind, but I am 
 having problems finding examples. What I am working on is a set of tools 
 that creates reports based on actions. I have the reports working good, 
 but what I advice on is this. I like to create a page that shows a 
 calendar. If an actions kicked off a report. I like to see on that 
 calendar the date or link show a clickable link or under that date the 
 name of the report.
 
 Does anyone know where I can find examples so I can see what I need to do?
 
 Payne
 
I've put together a simple script that outputs a calendar, which is easy
to then tie into a database and create clickable links:

http://www.ashleysheridan.co.uk/coding_php_calendar.php



Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice on a radar chart

2008-07-15 Thread Richard Heyes

Hey,

Can anyone suggest an efficient method for plotting the marks on a radar 
chart? I have the background done 
(http://www.phpguru.org/downloads/HTML5_radar/ - FF required), but that 
not exactly difficult.


Cheers.

--
Richard Heyes

Employ me:
http://www.phpguru.org/cv

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on a radar chart

2008-07-15 Thread Bernhard Kohl
If you are willing to use googles chart api ..

http://code.google.com/apis/chart/#radar

Yeti

On Tue, Jul 15, 2008 at 11:35 AM, Richard Heyes [EMAIL PROTECTED]
wrote:

 Hey,

 Can anyone suggest an efficient method for plotting the marks on a radar
 chart? I have the background done (
 http://www.phpguru.org/downloads/HTML5_radar/ - FF required), but that not
 exactly difficult.

 Cheers.

 --
 Richard Heyes

 Employ me:
 http://www.phpguru.org/cv

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Advice on a radar chart

2008-07-15 Thread Richard Heyes

If you are willing to use googles chart api ..

http://code.google.com/apis/chart/#radar


Nope. It's not something I need to implement, mmore a personal (albeit 
with this lists help) project.


--
Richard Heyes

Employ me:
http://www.phpguru.org/cv

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on a radar chart

2008-07-15 Thread tedd

At 8:26 PM +0100 7/15/08, Richard Heyes wrote:

If you are willing to use googles chart api ..

http://code.google.com/apis/chart/#radar


Nope. It's not something I need to implement, mmore a personal 
(albeit with this lists help) project.


--
Richard Heyes


Richard:

What do you want to implement as a radar chart?

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on a radar chart

2008-07-15 Thread Richard Heyes

What do you want to implement as a radar chart?


Nothing in particular. Just a generic radar chart for representing data.

--
Richard Heyes

Employ me:
http://www.phpguru.org/cv

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice with some code

2007-12-10 Thread Steve Finkelstein
Hi all,

I'm having a brain freeze with some simple code that I wrote and now trying
to refactor.

I have a block of code that looks like this:

public function backup()
  {
  $fname = $this-dbName.sql.$this-zip;

  $this-cmd = mysqldump -Q -u $this-dbUser -p$this-dbPass
$this-dbName 21  {$this-dest}/{$this-dbName}.{$this-lastId}.sql;



$res = shell_exec($this-cmd);
  error_log(First res: .$res);

if(!$res) {
  $this-cmd = ($this-zip===bz2) ?
bzip2
{$this-dest}/{$this-dbName}.{$this-lastId}.sql 21  :
gzip
{$this-dest}/{$this-dbName}.{$this-lastId}.sql 21;

$res = shell_exec($this-cmd);
  error_log(second error: .$res);
return !$res;
}

return FALSE;
}

Now instead of that FALSE, is there a way I can pass FALSE with a particular
error message?  This is because on the other end I have code that looks like
this:

  if($mysqlDump-backup()) {
$success = array('success' = '1');
$sqlres = mysql_query($sql, $link) or
die(json_message('error',mysql_error()));
shell_exec('/usr/bin/touch /tmp/build_transfer');
mysql_close($link);
return  '(' . json_encode($success) . ')';
  } else {
$fail = array('fail' = $res);
return '(' . json_encode($fail) . ')';
  }

I'd ultimately like to be able to deliver a failure message from the return
value...and properly catch that message so I can send it back in JSON format
to the client browser to report what the error is.

Think I should approach this with some try{..} catch code? Am I overlooking
something really simple? :-)

Thanks for your advice.


Re: [PHP] Advice with some code

2007-12-10 Thread Robert Cummings
On Mon, 2007-12-10 at 18:25 -0500, Steve Finkelstein wrote:
 Hi all,
 
 I'm having a brain freeze with some simple code that I wrote and now trying
 to refactor.
 
 I have a block of code that looks like this:
 
 public function backup()
   {
   $fname = $this-dbName.sql.$this-zip;
 
   $this-cmd = mysqldump -Q -u $this-dbUser -p$this-dbPass
 $this-dbName 21  {$this-dest}/{$this-dbName}.{$this-lastId}.sql;
 
 
 
 $res = shell_exec($this-cmd);
   error_log(First res: .$res);
 
 if(!$res) {
   $this-cmd = ($this-zip===bz2) ?
 bzip2
 {$this-dest}/{$this-dbName}.{$this-lastId}.sql 21  :
 gzip
 {$this-dest}/{$this-dbName}.{$this-lastId}.sql 21;
 
 $res = shell_exec($this-cmd);
   error_log(second error: .$res);
 return !$res;
 }
 
 return FALSE;
 }
 
 Now instead of that FALSE, is there a way I can pass FALSE with a particular
 error message?  This is because on the other end I have code that looks like
 this:
 
   if($mysqlDump-backup()) {
 $success = array('success' = '1');
 $sqlres = mysql_query($sql, $link) or
 die(json_message('error',mysql_error()));
 shell_exec('/usr/bin/touch /tmp/build_transfer');
 mysql_close($link);
 return  '(' . json_encode($success) . ')';
   } else {
 $fail = array('fail' = $res);
 return '(' . json_encode($fail) . ')';
   }
 
 I'd ultimately like to be able to deliver a failure message from the return
 value...and properly catch that message so I can send it back in JSON format
 to the client browser to report what the error is.
 
 Think I should approach this with some try{..} catch code? Am I overlooking
 something really simple? :-)

You can use try/catch, or since your current semantics are to return
boolean only, you could check do the following:

?php

if( ($status = backup()) !== true )
{
if( is_string( $status ) )
{
echo 'Failure: '.$status.\n;
}
}

?

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice with some code

2007-12-10 Thread Jochem Maas
Steve Finkelstein wrote:
 Hi all,
 
 I'm having a brain freeze with some simple code that I wrote and now trying
 to refactor.
 
 I have a block of code that looks like this:
 
 public function backup()

public function backup($errors)

   {
   $fname = $this-dbName.sql.$this-zip;
 
   $this-cmd = mysqldump -Q -u $this-dbUser -p$this-dbPass
 $this-dbName 21  {$this-dest}/{$this-dbName}.{$this-lastId}.sql;
 
 
 
 $res = shell_exec($this-cmd);
   error_log(First res: .$res);
 
 if(!$res) {
   $this-cmd = ($this-zip===bz2) ?
 bzip2
 {$this-dest}/{$this-dbName}.{$this-lastId}.sql 21  :
 gzip
 {$this-dest}/{$this-dbName}.{$this-lastId}.sql 21;
 
 $res = shell_exec($this-cmd);
   error_log(second error: .$res);

$errors[] = second error: .$res;

 return !$res;
 }
 
 return FALSE;
 }
 
 Now instead of that FALSE, is there a way I can pass FALSE with a particular
 error message?  This is because on the other end I have code that looks like
 this:
 

$errMsgs = array();
if($mysqlDump-backup($errMsgs)) {

   if($mysqlDump-backup()) {
 $success = array('success' = '1');
 $sqlres = mysql_query($sql, $link) or
 die(json_message('error',mysql_error()));
 shell_exec('/usr/bin/touch /tmp/build_transfer');
 mysql_close($link);
 return  '(' . json_encode($success) . ')';
   } else {
 $fail = array('fail' = $res);

$fail = array('fail' = $res, 'errors' = $errMsgs);

 return '(' . json_encode($fail) . ')';
   }
 
 I'd ultimately like to be able to deliver a failure message from the return
 value...and properly catch that message so I can send it back in JSON format
 to the client browser to report what the error is.
 
 Think I should approach this with some try{..} catch code? Am I overlooking
 something really simple? :-)

simple enough? the basic idea is the same as passing a variable by reference to
exec() as the second argument in order to capture output. so your func has
a return value to determine status and you can pass in an array to capture 
detailed
process related messages.

 
 Thanks for your advice.
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP advice: Tips webpage valid?

2007-11-13 Thread Dotan Cohen
I came across this page today:
http://reinholdweber.com/?p=3

It covers a lot of flammable material (echo vs. print) but I wonder
how valid some of the advice is. Can anyone elaborate? Thanks.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


Re: [PHP] PHP advice: Tips webpage valid?

2007-11-13 Thread Robert Cummings
On Tue, 2007-11-13 at 23:37 +0200, Dotan Cohen wrote:
 I came across this page today:
 http://reinholdweber.com/?p=3
 
 It covers a lot of flammable material (echo vs. print) but I wonder
 how valid some of the advice is. Can anyone elaborate? Thanks.

Some of it is definitely useful individually. Others are questionably
useful individually (echo vs print). But if like me, you adhere to most
of the optimizations as second nature, the cumulative effect is probably
perceptible. Going back and changing code to reflect some of the
optimizations though is probably not worth it.

Cheers,
Rob.
-- 
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP advice: Tips webpage valid?

2007-11-13 Thread mike
On 11/13/07, Dotan Cohen [EMAIL PROTECTED] wrote:
 I came across this page today:
 http://reinholdweber.com/?p=3

 It covers a lot of flammable material (echo vs. print) but I wonder
 how valid some of the advice is. Can anyone elaborate? Thanks.

funny you should post this, I've recently been compiling a list and
trying to assign weights to them, based on different sites around
the web. ideally I'd like to get into showing the number of opcodes
for each operation and comparing it based on that (like Sara Golemon
did in her post)

http://michaelshadle.com/php-optimization/

I haven't formatted it all nicely yet, since I have to manually do it
inside of the WP editor. I thought about pulling it into a separate
page, or even making an interactive page where people can submit their
findings and code and vote based on their own knowledge or experience.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP advice: Tips webpage valid?

2007-11-13 Thread Larry Garfield
I have some more benchmarks for your list if you're interested:

http://www.garfieldtech.com/blog/magic-benchmarks

On Tuesday 13 November 2007, mike wrote:
 On 11/13/07, Dotan Cohen [EMAIL PROTECTED] wrote:
  I came across this page today:
  http://reinholdweber.com/?p=3
 
  It covers a lot of flammable material (echo vs. print) but I wonder
  how valid some of the advice is. Can anyone elaborate? Thanks.

 funny you should post this, I've recently been compiling a list and
 trying to assign weights to them, based on different sites around
 the web. ideally I'd like to get into showing the number of opcodes
 for each operation and comparing it based on that (like Sara Golemon
 did in her post)

 http://michaelshadle.com/php-optimization/

 I haven't formatted it all nicely yet, since I have to manually do it
 inside of the WP editor. I thought about pulling it into a separate
 page, or even making an interactive page where people can submit their
 findings and code and vote based on their own knowledge or experience.


-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it.  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP advice: Tips webpage valid?

2007-11-13 Thread Dotan Cohen
On 14/11/2007, Larry Garfield [EMAIL PROTECTED] wrote:
 I have some more benchmarks for your list if you're interested:

 http://www.garfieldtech.com/blog/magic-benchmarks


Thanks, there is some food for though there. I'll also benchmark some
of them and see what I come up with.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת


Re: [PHP] advice on sql injection/XSS prevention

2007-04-10 Thread Richard Lynch

If you know you are using MySQL, you could pass all database input
through mysql_real_escape_string.

Or you could use prepared statements and not have to worry about
escaping the data, as MySQL *knows* it's data.

You'll probably not be able to defeat XSS in any meaningful way,
however...

Perhaps you need to EDUCATE the authorized people...


On Thu, April 5, 2007 9:17 am, Bing Du wrote:
 Hi,

 I'm not an experienced PHP developer.  We're hosting a content
 management
 system that allow authorized people to add PHP contents.  Their PHP
 coding
 levels varies.  Some are very security sensitive, but some are not.  I
 want to know if PHP has any ready-to-use funtion to validate form
 input to
 help prevent SQL injection/XSS?  So each programmer doesn't have to
 write
 their own form validation code.  I'd appreciate any advice or
 pointers.

 Thanks in advance,

 Bing

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] advice on sql injection/XSS prevention

2007-04-07 Thread Jordan Forssman
Actually there is a tool available for automated validation of PHP code. 
It's called static source code analysis which, very simply stated, acts like 
a spell checker for custom developed code. This tool is very accurate at 
finding, especially SQL injection and XSS, and can be run directly against 
the source code so it doesn't need the application to be up and running.


This company

http://www.armorize.com/services/securityasaservice?utm_source=jordanutm_medium=post

is offering this kind of tool delivered as a service directly over the Web 
which means you can either request that those authorized people verify thier 
code security before posting, or you can do it after they have posted. The 
tool shows the vulnerability as well as the tainted origin that introduces 
it and provides fix suggestions, etc so everything can be fixed in a very 
short time with very little effort -- no installation required.



From: Zoltán Németh [EMAIL PROTECTED]
To: Bing Du [EMAIL PROTECTED]
CC: php-general@lists.php.net
Subject: Re: [PHP] advice on sql injection/XSS prevention
Date: Thu, 05 Apr 2007 16:23:23 +0200

I think it is generally a Bad Idea to allow users to submit code into
your system...
you would be better off if you would provide some pseudo-coding
possibilities which would allow them to insert certain functionalities
into their content - with you providing the real code running behind and
replacing the pseudo-codes with the process results

greets
Zoltán Németh

2007. 04. 5, csütörtök keltezéssel 09.17-kor Bing Du ezt írta:
 Hi,

 I'm not an experienced PHP developer.  We're hosting a content 
management
 system that allow authorized people to add PHP contents.  Their PHP 
coding

 levels varies.  Some are very security sensitive, but some are not.  I
 want to know if PHP has any ready-to-use funtion to validate form input 
to
 help prevent SQL injection/XSS?  So each programmer doesn't have to 
write

 their own form validation code.  I'd appreciate any advice or pointers.

 Thanks in advance,

 Bing


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



_
Message offline contacts without any fire risk! 
http://www.communicationevolved.com/en-za/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] advice on sql injection/XSS prevention

2007-04-05 Thread Bing Du
Hi,

I'm not an experienced PHP developer.  We're hosting a content management
system that allow authorized people to add PHP contents.  Their PHP coding
levels varies.  Some are very security sensitive, but some are not.  I
want to know if PHP has any ready-to-use funtion to validate form input to
help prevent SQL injection/XSS?  So each programmer doesn't have to write
their own form validation code.  I'd appreciate any advice or pointers.

Thanks in advance,

Bing

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] advice on sql injection/XSS prevention

2007-04-05 Thread Zoltán Németh
I think it is generally a Bad Idea to allow users to submit code into
your system...
you would be better off if you would provide some pseudo-coding
possibilities which would allow them to insert certain functionalities
into their content - with you providing the real code running behind and
replacing the pseudo-codes with the process results

greets
Zoltán Németh

2007. 04. 5, csütörtök keltezéssel 09.17-kor Bing Du ezt írta:
 Hi,
 
 I'm not an experienced PHP developer.  We're hosting a content management
 system that allow authorized people to add PHP contents.  Their PHP coding
 levels varies.  Some are very security sensitive, but some are not.  I
 want to know if PHP has any ready-to-use funtion to validate form input to
 help prevent SQL injection/XSS?  So each programmer doesn't have to write
 their own form validation code.  I'd appreciate any advice or pointers.
 
 Thanks in advance,
 
 Bing
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice needed: implementing custom fields in tables

2006-12-15 Thread Richard Lynch
On Tue, December 12, 2006 8:23 am, Denis Gerasimov wrote:
 I am in a need of implementing custom/used-defined fields mechanism.
 What I
 need is adding new fileds to a db table on-the-fly.

 There are 2 possible options I know:

 1.   Add a fixed set of text columns named custom_01, custom_02,
 etc.

 2.   Alter db tables dynamically by adding/dropping a column of
 appropriate type and creating/dropping helper tables if needed (e.g.
 values
 for select lists)

The usual answer is to create a single table of user-defined fields,
and put the field_name - field_data relationship into that.

You have an extra table to JOIN to all your queries, but it works
tolerably well for most usage.

You may want to find out if there is a Joomla approved approach or
something as well, by posting in a Joomla forum.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice needed: implementing custom fields in tables

2006-12-12 Thread Denis Gerasimov
Hello list members,

 

I am in a need of implementing custom/used-defined fields mechanism. What I
need is adding new fileds to a db table on-the-fly.

 

There are 2 possible options I know:

1.   Add a fixed set of text columns named custom_01, custom_02, etc.

2.   Alter db tables dynamically by adding/dropping a column of
appropriate type and creating/dropping helper tables if needed (e.g. values
for select lists)

 

1st option is not suitable for in my case because of performance issues.

2nd is relatively hard to implement from scratch.

 

Any ready-to-use libs or implementation ideas would be highly appreciated!

 

FYI I am using Joomla! CMS and actually I need to create a Joomla! component
that should also support user-defined fields.

 

Have a great day,

 

Denis S Gerasimov 
Web Developer
Team Force LLC

Web:http://www.team-force.org/ www.team-force.org

RU  Int'l:   +7 8362-213555

email:[EMAIL PROTECTED]

 



Re: [PHP] Advice needed: implementing custom fields in tables

2006-12-12 Thread Jochem Maas
Denis Gerasimov wrote:
 Hello list members,
 
  
 
 I am in a need of implementing custom/used-defined fields mechanism. What I
 need is adding new fileds to a db table on-the-fly.
 
  
 
 There are 2 possible options I know:
 
 1.   Add a fixed set of text columns named custom_01, custom_02, etc.
 
 2.   Alter db tables dynamically by adding/dropping a column of
 appropriate type and creating/dropping helper tables if needed (e.g. values
 for select lists)
 
  
 
 1st option is not suitable for in my case because of performance issues.

1 is a horrid solution but I can't see how this is such a performance issue.
(not to say the issue does'nt exist, it's just that I don't see it)

 
 2nd is relatively hard to implement from scratch.

I would suggest this is easier than you imagine (you can grok all the required 
SQL
from the output of phpmyadmin, for instance) - the tricky part is getting the
database security right (which is more PITA than hard imho)

 Any ready-to-use libs or implementation ideas would be highly appreciated!
 

3. offer an interface to define the custom fields, store the definition 
somewhere central
and use the definition to define an array (or object) which you can then 
serialize into a single
field.

4. use a 'lookup' table and a 'custom field definition' table

'lookup':

ownerid int // FK to whatever entity owns the custom fields
CFD_id  int // FK to 'custom field definition'
value   varchar 

'custom field definition':
id  int
namevarchar
typevarchar

you might want to create a set of lookup tables (1 for each *type* of custom 
data
you are offering the enduser) - this may offer more efficient storage and 
retrieval.



anything that is ready to use can be found via your favorite search engine, or 
sourceforge
or something like that.

 
 FYI I am using Joomla! CMS and actually I need to create a Joomla! component
 that should also support user-defined fields.

you mean to say joomla doesn't have a plugin for this at all??

 
  
 
 Have a great day,

too late, my Jean-Luc Picard has already been assimilated.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-23 Thread Richard Lynch
There is, or used to be, an MS-Access MySQL synchronizer package out
there

Haven't seen it mentioned in years now, but maybe I just wasn't paying
attention.

Try searching for it:
info.com/MS-Access MySQL synchronize


On Tue, March 21, 2006 4:00 pm, Brady Mitchell wrote:
 -Original Message-
 I wonder if anyone has any ideas? As I can't just run an
 update locally
 and connect to the remote MySQL host, I was scheduling a
 periodic export
 of an access table to csv format, ftping it to the server, and then
 running an update script on the remote host (simplehost.com). It
 just
 seems convoluted, and frought with difficulties. There has to be a
 easier way to update the transaction status table?

 First schedule an automatic upload of the .mdb file to the server.
 (Not
 sure how to do this, google is your friend for this part.)

 Then write a PHP Script that will:

 1 - Connect to the Access DB and query for the data you need
 2 - Insert that data into the mySQL database

 Then schedule a cron job to run the script at a set time each day (or
 whatever frequency you need).

 Take a look at the ADODB Class (http://adodb.sf.net) for connecting to
 MS Access from PHP.  I used it once for a project where I had to use
 an
 Access DB and it was actually pretty smooth.  I now use ADODB for all
 of
 my DB connections. :)

 HTH,

 Brady

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-23 Thread Richard Lynch


You don't.

You run PHP on the Windows box with the mdb file, and set up a way for
the two boxes to talk to each other.

Or you convince somebody somewhere just how bad MS-Access is and
abandon it entirely :-)

On Tue, March 21, 2006 4:05 pm, Brian Anderson wrote:
 Yeah, I thought of that, but how do I connect to a mdb file on a linux
 server that doesn't have odbc installed?

 Brady Mitchell wrote:
 -Original Message-
 I wonder if anyone has any ideas? As I can't just run an
 update locally
 and connect to the remote MySQL host, I was scheduling a
 periodic export
 of an access table to csv format, ftping it to the server, and then
 running an update script on the remote host (simplehost.com). It
 just
 seems convoluted, and frought with difficulties. There has to be a
 easier way to update the transaction status table?


 First schedule an automatic upload of the .mdb file to the server.
 (Not
 sure how to do this, google is your friend for this part.)

 Then write a PHP Script that will:

 1 - Connect to the Access DB and query for the data you need
 2 - Insert that data into the mySQL database

 Then schedule a cron job to run the script at a set time each day
 (or
 whatever frequency you need).

 Take a look at the ADODB Class (http://adodb.sf.net) for connecting
 to
 MS Access from PHP.  I used it once for a project where I had to use
 an
 Access DB and it was actually pretty smooth.  I now use ADODB for
 all of
 my DB connections. :)

 HTH,

 Brady


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-23 Thread Richard Lynch


Are you using http://php.net/fgetcsv

Cuz if you're not, you're gonna go nuts trying to work out the CSV
minutia

I think CSV musta been invented by Microsoft.  It's got that MS feel
to it...

On Tue, March 21, 2006 4:19 pm, Brian Anderson wrote:
 The only other thing that I can think to do is to try locally write a
 .sql file and ftp that for updating because MS Excel format csv is
 making me want to kill myself.

 -Brian

 Brian Anderson wrote:
 Yeah, I thought of that, but how do I connect to a mdb file on a
 linux
 server that doesn't have odbc installed?

 Brady Mitchell wrote:
 -Original Message-
 I wonder if anyone has any ideas? As I can't just run an update
 locally and connect to the remote MySQL host, I was scheduling a
 periodic export of an access table to csv format, ftping it to the
 server, and then running an update script on the remote host
 (simplehost.com). It just seems convoluted, and frought with
 difficulties. There has to be a easier way to update the
 transaction
 status table?


 First schedule an automatic upload of the .mdb file to the server.
 (Not
 sure how to do this, google is your friend for this part.)

 Then write a PHP Script that will:

 1 - Connect to the Access DB and query for the data you need
 2 - Insert that data into the mySQL database

 Then schedule a cron job to run the script at a set time each day
 (or
 whatever frequency you need).

 Take a look at the ADODB Class (http://adodb.sf.net) for connecting
 to
 MS Access from PHP.  I used it once for a project where I had to
 use an
 Access DB and it was actually pretty smooth.  I now use ADODB for
 all of
 my DB connections. :)

 HTH,

 Brady



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-23 Thread Robert Cummings
On Thu, 2006-03-23 at 21:30, Richard Lynch wrote:
 Are you using http://php.net/fgetcsv
 
 Cuz if you're not, you're gonna go nuts trying to work out the CSV
 minutia
 
 I think CSV musta been invented by Microsoft.  It's got that MS feel
 to it...

Taint anyways...

http://support.microsoft.com/default.aspx?scid=kb;en-us;323626Product=xlw

Because nobody would EVER think to put ID in the top left corner
*grumble*. Nice when clients complain that your CSV is buggy because
that's what MS reports when they use excel to view it.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice updating MS Access data to remote MySQL host that only allows local access

2006-03-21 Thread Brian Anderson
I wonder if anyone has any ideas? As I can't just run an update locally 
and connect to the remote MySQL host, I was scheduling a periodic export 
of an access table to csv format, ftping it to the server, and then 
running an update script on the remote host (simplehost.com). It just 
seems convoluted, and frought with difficulties. There has to be a 
easier way to update the transaction status table?


Hmmm

-Brian Anderson

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-21 Thread Brady Mitchell
 -Original Message-
 I wonder if anyone has any ideas? As I can't just run an 
 update locally 
 and connect to the remote MySQL host, I was scheduling a 
 periodic export 
 of an access table to csv format, ftping it to the server, and then 
 running an update script on the remote host (simplehost.com). It just 
 seems convoluted, and frought with difficulties. There has to be a 
 easier way to update the transaction status table?

First schedule an automatic upload of the .mdb file to the server.  (Not
sure how to do this, google is your friend for this part.)

Then write a PHP Script that will:

1 - Connect to the Access DB and query for the data you need
2 - Insert that data into the mySQL database

Then schedule a cron job to run the script at a set time each day (or
whatever frequency you need).

Take a look at the ADODB Class (http://adodb.sf.net) for connecting to
MS Access from PHP.  I used it once for a project where I had to use an
Access DB and it was actually pretty smooth.  I now use ADODB for all of
my DB connections. :)

HTH,

Brady

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-21 Thread Brian Anderson
Yeah, I thought of that, but how do I connect to a mdb file on a linux 
server that doesn't have odbc installed?


Brady Mitchell wrote:

-Original Message-
I wonder if anyone has any ideas? As I can't just run an 
update locally 
and connect to the remote MySQL host, I was scheduling a 
periodic export 
of an access table to csv format, ftping it to the server, and then 
running an update script on the remote host (simplehost.com). It just 
seems convoluted, and frought with difficulties. There has to be a 
easier way to update the transaction status table?



First schedule an automatic upload of the .mdb file to the server.  (Not
sure how to do this, google is your friend for this part.)

Then write a PHP Script that will:

1 - Connect to the Access DB and query for the data you need
2 - Insert that data into the mySQL database

Then schedule a cron job to run the script at a set time each day (or
whatever frequency you need).

Take a look at the ADODB Class (http://adodb.sf.net) for connecting to
MS Access from PHP.  I used it once for a project where I had to use an
Access DB and it was actually pretty smooth.  I now use ADODB for all of
my DB connections. :)

HTH,

Brady
  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-21 Thread Brian Anderson
The only other thing that I can think to do is to try locally write a 
.sql file and ftp that for updating because MS Excel format csv is 
making me want to kill myself.


-Brian

Brian Anderson wrote:
Yeah, I thought of that, but how do I connect to a mdb file on a linux 
server that doesn't have odbc installed?


Brady Mitchell wrote:

-Original Message-
I wonder if anyone has any ideas? As I can't just run an update 
locally and connect to the remote MySQL host, I was scheduling a 
periodic export of an access table to csv format, ftping it to the 
server, and then running an update script on the remote host 
(simplehost.com). It just seems convoluted, and frought with 
difficulties. There has to be a easier way to update the transaction 
status table?



First schedule an automatic upload of the .mdb file to the server.  (Not
sure how to do this, google is your friend for this part.)

Then write a PHP Script that will:

1 - Connect to the Access DB and query for the data you need
2 - Insert that data into the mySQL database

Then schedule a cron job to run the script at a set time each day (or
whatever frequency you need).

Take a look at the ADODB Class (http://adodb.sf.net) for connecting to
MS Access from PHP.  I used it once for a project where I had to use an
Access DB and it was actually pretty smooth.  I now use ADODB for all of
my DB connections. :)

HTH,

Brady
  




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice updating MS Access data to remote MySQL host that only allowslocal access

2006-03-21 Thread Chris

Brian Anderson wrote:
Yeah, I thought of that, but how do I connect to a mdb file on a linux 
server that doesn't have odbc installed?


Convert it:

Search google for convert access to mysql and you'll find tons of 
results - some free, some not.





-Original Message-
I wonder if anyone has any ideas? As I can't just run an update 
locally and connect to the remote MySQL host, I was scheduling a 
periodic export of an access table to csv format, ftping it to the 
server, and then running an update script on the remote host 
(simplehost.com). It just seems convoluted, and frought with 
difficulties. There has to be a easier way to update the transaction 
status table?




First schedule an automatic upload of the .mdb file to the server.  (Not
sure how to do this, google is your friend for this part.)

Then write a PHP Script that will:

1 - Connect to the Access DB and query for the data you need
2 - Insert that data into the mySQL database

Then schedule a cron job to run the script at a set time each day (or
whatever frequency you need).

Take a look at the ADODB Class (http://adodb.sf.net) for connecting to
MS Access from PHP.  I used it once for a project where I had to use an
Access DB and it was actually pretty smooth.  I now use ADODB for all of
my DB connections. :)

HTH,

Brady
  






--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Command Line PHP Advice

2006-01-29 Thread Nirmalya Lahiri
 
Hi,
 you can do this by using unix command 'for'. Please apply the
command written below  reply me your experiment result.

for filename in `ls *.txt`;do ./edit.php $filename var1 var2;done


--Nirmalya
 

Angelo Christou [EMAIL PROTECTED] wrote: Hello List
I would like some advice from PHP users regarding PHP and the command line. I 
have a PHP script that does a whole bunch of stuff to a file on my intranet.

./edit.php filename var1 var2

Everything works fine but I need to run it on a list of files  - 

./edit.php invoice00212.txt var1 var2
./edit.php invoice00213.txt var1 var2
./edit.php invoice00214.txt var1 var2

I have a list of several thousand files that will change every month. The list 
has the filenames and variables, like this so I am half way there I think -

invoice00212.txt var1 var2
invoice00213.txt var1 var2
invoice00214.txt var1 var2

My question is how should I incorporate this with my PHP script?

I read that it's better to split scripts up into small reusable parts so my 
plan is to keep the logic out of the edit.php script and simply pass the 
variables to it using another script. Am I on the right path doing this?

I am only a beginner with PHP so I admit I don’t really know what I’m doing, 
that is why I am asking for pointers from the PHP Mail List :)

Below is my model, however I am unsure how to achieve this or even if it's the 
best way to do it?

open filelist.txt
for each line create $filename $var1 $var2
then run
./edit.php $filename $var1 $var2
loop back to the next line
end

Many thanks in advance,
Ang.
 

  
-
Do you Yahoo!?
 With a free 1 GB, there's more in store with Yahoo! Mail.



-
Bring words and photos together (easily) with
 PhotoMail  - it's free and works with your Yahoo! Mail.

Re: [PHP] Command Line PHP Advice

2006-01-29 Thread Nirmalya Lahiri
Angelo,
  I am very happy after knowing that it is working. :)
 
 --Nirmalya
 
 
Angelo Christou [EMAIL PROTECTED] wrote: 
Hello Nirmalya,

Thank you for your response. With the help of your reply, I've now got it 
working! :)

Ang.



Nirmalya Lahiri [EMAIL PROTECTED] wrote: Hi,
 you can do this by using unix command 'for'. Please apply the
command written below.. reply me your experiment result.

for filename in `ls *.txt`;do ./edit.php $filename var1 var2;done


--Nirmalya



--- Angelo Christou  wrote:

 Hello List
 I would like some advice from PHP users regarding PHP and the
 command line. I have a PHP script that does a whole bunch of stuff
 to a file on my intranet.
 
 ./edit.php filename var1 var2
 
 Everything works fine but I need to run it on a list of files  - 
 
  ./edit.php invoice00212.txt var1 var2
 ./edit.php invoice00213.txt var1 var2
 ./edit.php invoice00214.txt var1 var2
 



   

-
Bring words and photos together (easily) with
  PhotoMail  - it's free and works with your Yahoo! Mail.



-
Bring words and photos together (easily) with
 PhotoMail  - it's free and works with your Yahoo! Mail.

[PHP] Command Line PHP Advice

2006-01-28 Thread Angelo Christou
Hello List
I would like some advice from PHP users regarding PHP and the command line. I 
have a PHP script that does a whole bunch of stuff to a file on my intranet.

./edit.php filename var1 var2

Everything works fine but I need to run it on a list of files  - 

./edit.php invoice00212.txt var1 var2
./edit.php invoice00213.txt var1 var2
./edit.php invoice00214.txt var1 var2

I have a list of several thousand files that will change every month. The list 
has the filenames and variables, like this so I am half way there I think -

invoice00212.txt var1 var2
invoice00213.txt var1 var2
invoice00214.txt var1 var2

My question is how should I incorporate this with my PHP script?

I read that it's better to split scripts up into small reusable parts so my 
plan is to keep the logic out of the edit.php script and simply pass the 
variables to it using another script. Am I on the right path doing this?

I am only a beginner with PHP so I admit I don’t really know what I’m doing, 
that is why I am asking for pointers from the PHP Mail List :)

Below is my model, however I am unsure how to achieve this or even if it's the 
best way to do it?

open filelist.txt
for each line create $filename $var1 $var2
then run
./edit.php $filename $var1 $var2
loop back to the next line
end

Many thanks in advance,
Ang.
 


-
Do you Yahoo!?
 With a free 1 GB, there's more in store with Yahoo! Mail.

Re: [PHP] Command Line PHP Advice

2006-01-28 Thread Chris

Angelo Christou wrote:


I read that it's better to split scripts up into small reusable parts so my 
plan is to keep the logic out of the edit.php script and simply pass the 
variables to it using another script. Am I on the right path doing this?

 

That is a good ideology, but whether it's best for your script depends 
on the data. I, personally, would probably split it up, just to keep 
things clear and separated so when I go back to it later, I can more 
easily modify it..



I am only a beginner with PHP so I admit I don’t really know what I’m doing, 
that is why I am asking for pointers from the PHP Mail List :)

Below is my model, however I am unsure how to achieve this or even if it's the 
best way to do it?

open filelist.txt
for each line create $filename $var1 $var2
then run
./edit.php $filename $var1 $var2
loop back to the next line
end

 



That looks good to me. It's not too difficult to jsut throw something 
together with the file() function. If your file gets really big you may 
want to look into reading the file line by line with fopen() / fgets(). 
But if you're going to be running it once a month only, file() should 
work fine.



Many thanks in advance,
Ang.



-
Do you Yahoo!?
With a free 1 GB, there's more in store with Yahoo! Mail.
 


Chris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice Needed for Klorofil Open Source PHP Platform

2005-11-28 Thread Reza Iqbal
Hi,

I would like to give information about a new open source project
named as Klorofil Collaboration Project (http://www.klorofil.org).

As a new open source project, we will need many advice in order
to make it success.

Currently, in Klorofil Collaboration Project, we develop
Klorofil Platform. One of the component of Klorofil Platform
is gambArt (a GUI framework for developing PHP-based desktop application).

We have published initial release. In the initial release,
we provide Klorofil Platform installer + a desktop calculator as
sample.

This desktop calculator was made 100% with PHP (using gambArt).

For more information, you can visit http://www.klorofil.org/


In the next release, we will add more features such as:
- Distributed Computing
- MVC
- etc

We do hope this project will be useful for PHP community.
We hope many people will join the project.

Here are features available
in the initial release:

Initial Release version 0.1 (for Windows):

- Klorofil Platform Basic Structure
* Class Registration
* Application Launcher
* Collection Classes
* I/O Classes
* Network Classes
+ Socket
+ HTTP
+ Email
+ SMS
* Compression
* Byte Compiler
* XML

- gambArt (Klorofil GUI)
* Basic Structure
+ Application
+ Canvas
+ Component
+ Control
+ Form
* Component
+ Button
+ Flat Button
+ Label
+ Edit
+ Dialog
+ Radio Button
+ CheckBox
+ Panel
+ Image
+ ListBox
+ DropDownBox
+ PageControl
+ ToolBar
+ MainMenu
+ Timer


Thank you.

R. Iqbal

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice Needed for Klorofil Open Source PHP Platform

2005-11-28 Thread Ahmed Saad
On 11/28/05, Reza Iqbal [EMAIL PROTECTED] wrote:
 As a new open source project, we will need many advice in order
 to make it success.


ah an open source project with encoded source code?! how come?

-ahmed


[PHP] Advice sought on PHP site maintenance

2005-08-16 Thread George Pitcher
Hi,

I manage several sites for my company. Some are running our own service to
about 80 customers and others are running a service for some (5 and growing)
of our customers. Its the latter one that I need advice on.

I have an application where each customer has a website on our service. The
functionality and layout are almost identical throughout these sites and I
am striving to move any differences into configuration files. However, when
I make a change, I then need to make that change on each site.

I would like, if possible to maintain a single set of web pages and have
that work for all sites. I currently use PEAR::DB and Smarty templating. The
current url syntax is www.mysite.com/client/ and I would like to keep them
thinking that they each have their own unique site.

Can anyone suggest a structure for this?

MTIA

George in Oxford

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice sought on PHP site maintenance

2005-08-16 Thread John Nichel

George Pitcher wrote:

Hi,

I manage several sites for my company. Some are running our own service to
about 80 customers and others are running a service for some (5 and growing)
of our customers. Its the latter one that I need advice on.

I have an application where each customer has a website on our service. The
functionality and layout are almost identical throughout these sites and I
am striving to move any differences into configuration files. However, when
I make a change, I then need to make that change on each site.

I would like, if possible to maintain a single set of web pages and have
that work for all sites. I currently use PEAR::DB and Smarty templating. The
current url syntax is www.mysite.com/client/ and I would like to keep them
thinking that they each have their own unique site.

Can anyone suggest a structure for this?


If I'm reading you right, you're looking to keep a group of 
scripts/classes in one place that all sites can draw from.  If this is 
the case, you could always set a global include directory (make it read 
only for the users of your service), and configure that path in Apache's 
httpd.conf or an .htaccess.  I do this on our box (all the sites are 
ours, but when I have to update Smarty/PEAR/custom scripts, I like to 
just do it in one place).


VirtualHostDirectory
-VirtualHost1
-docs
-VirtualHost2
-docs
-VirtualHost3
-docs
-VirtualHost4
-docs
-GlobalInclude
-PEAR
-Smarty
-Custom

So on, and so forth.



--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice sought on PHP site maintenance

2005-08-16 Thread George Pitcher
John,

Thanks for the input. I just knew I hadn't covered everything. My server is
currently set up as NT4/IIS. I suppose I could look to switching to Apache
though.

Cheers

George

 -Original Message-
 From: John Nichel [mailto:[EMAIL PROTECTED]
 Sent: 16 August 2005 2:25 pm
 To: php-general@lists.php.net
 Subject: Re: [PHP] Advice sought on PHP site maintenance


 George Pitcher wrote:
  Hi,
 
  I manage several sites for my company. Some are running our own
 service to
  about 80 customers and others are running a service for some (5
 and growing)
  of our customers. Its the latter one that I need advice on.
 
  I have an application where each customer has a website on our
 service. The
  functionality and layout are almost identical throughout these
 sites and I
  am striving to move any differences into configuration files.
 However, when
  I make a change, I then need to make that change on each site.
 
  I would like, if possible to maintain a single set of web pages and have
  that work for all sites. I currently use PEAR::DB and Smarty
 templating. The
  current url syntax is www.mysite.com/client/ and I would like
 to keep them
  thinking that they each have their own unique site.
 
  Can anyone suggest a structure for this?

 If I'm reading you right, you're looking to keep a group of
 scripts/classes in one place that all sites can draw from.  If this is
 the case, you could always set a global include directory (make it read
 only for the users of your service), and configure that path in Apache's
 httpd.conf or an .htaccess.  I do this on our box (all the sites are
 ours, but when I have to update Smarty/PEAR/custom scripts, I like to
 just do it in one place).

 VirtualHostDirectory
   -VirtualHost1
   -docs
   -VirtualHost2
   -docs
   -VirtualHost3
   -docs
   -VirtualHost4
   -docs
   -GlobalInclude
   -PEAR
   -Smarty
   -Custom

 So on, and so forth.



 --
 John C. Nichel
 ÜberGeek
 KegWorks.com
 716.856.9675
 [EMAIL PROTECTED]

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice sought on PHP site maintenance

2005-08-16 Thread Mark Rees
George Pitcher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 John,

 Thanks for the input. I just knew I hadn't covered everything. My server
is
 currently set up as NT4/IIS. I suppose I could look to switching to Apache
 though.

Far be it from me to discrouage you from switching to Apache. However, on
IIS, you can store the include files and classes you wish to use across
several sites in a single location. You can then make this accessible to all
sites by adding the location in as a virtual directory. This basically
allows you to refer to it as if it were a directory within your webroot (if
I remember right, it's been a while).

There's a brief guide here:
http://www.mvps.org/marksxp/WindowsXP/IIS/iis3.php

Giood luck

Mark


 Cheers

 George

  -Original Message-
  From: John Nichel [mailto:[EMAIL PROTECTED]
  Sent: 16 August 2005 2:25 pm
  To: php-general@lists.php.net
  Subject: Re: [PHP] Advice sought on PHP site maintenance
 
 
  George Pitcher wrote:
   Hi,
  
   I manage several sites for my company. Some are running our own
  service to
   about 80 customers and others are running a service for some (5
  and growing)
   of our customers. Its the latter one that I need advice on.
  
   I have an application where each customer has a website on our
  service. The
   functionality and layout are almost identical throughout these
  sites and I
   am striving to move any differences into configuration files.
  However, when
   I make a change, I then need to make that change on each site.
  
   I would like, if possible to maintain a single set of web pages and
have
   that work for all sites. I currently use PEAR::DB and Smarty
  templating. The
   current url syntax is www.mysite.com/client/ and I would like
  to keep them
   thinking that they each have their own unique site.
  
   Can anyone suggest a structure for this?
 
  If I'm reading you right, you're looking to keep a group of
  scripts/classes in one place that all sites can draw from.  If this is
  the case, you could always set a global include directory (make it read
  only for the users of your service), and configure that path in Apache's
  httpd.conf or an .htaccess.  I do this on our box (all the sites are
  ours, but when I have to update Smarty/PEAR/custom scripts, I like to
  just do it in one place).
 
  VirtualHostDirectory
  -VirtualHost1
  -docs
  -VirtualHost2
  -docs
  -VirtualHost3
  -docs
  -VirtualHost4
  -docs
  -GlobalInclude
  -PEAR
  -Smarty
  -Custom
 
  So on, and so forth.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice sought on PHP site maintenance

2005-08-16 Thread George Pitcher
Mark,

Thanks, I'll follow that up as well. I don't have to do this straight away.

Cheers

George

 -Original Message-
 From: Mark Rees [mailto:[EMAIL PROTECTED]
 Sent: 16 August 2005 3:33 pm
 To: php-general@lists.php.net
 Subject: Re: [PHP] Advice sought on PHP site maintenance


 George Pitcher [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  John,
 
  Thanks for the input. I just knew I hadn't covered everything. My server
 is
  currently set up as NT4/IIS. I suppose I could look to
 switching to Apache
  though.

 Far be it from me to discrouage you from switching to Apache. However, on
 IIS, you can store the include files and classes you wish to use across
 several sites in a single location. You can then make this
 accessible to all
 sites by adding the location in as a virtual directory. This basically
 allows you to refer to it as if it were a directory within your
 webroot (if
 I remember right, it's been a while).

 There's a brief guide here:
 http://www.mvps.org/marksxp/WindowsXP/IIS/iis3.php

 Giood luck

 Mark

 
  Cheers
 
  George
 
   -Original Message-
   From: John Nichel [mailto:[EMAIL PROTECTED]
   Sent: 16 August 2005 2:25 pm
   To: php-general@lists.php.net
   Subject: Re: [PHP] Advice sought on PHP site maintenance
  
  
   George Pitcher wrote:
Hi,
   
I manage several sites for my company. Some are running our own
   service to
about 80 customers and others are running a service for some (5
   and growing)
of our customers. Its the latter one that I need advice on.
   
I have an application where each customer has a website on our
   service. The
functionality and layout are almost identical throughout these
   sites and I
am striving to move any differences into configuration files.
   However, when
I make a change, I then need to make that change on each site.
   
I would like, if possible to maintain a single set of web pages and
 have
that work for all sites. I currently use PEAR::DB and Smarty
   templating. The
current url syntax is www.mysite.com/client/ and I would like
   to keep them
thinking that they each have their own unique site.
   
Can anyone suggest a structure for this?
  
   If I'm reading you right, you're looking to keep a group of
   scripts/classes in one place that all sites can draw from.  If this is
   the case, you could always set a global include directory
 (make it read
   only for the users of your service), and configure that path
 in Apache's
   httpd.conf or an .htaccess.  I do this on our box (all the sites are
   ours, but when I have to update Smarty/PEAR/custom scripts, I like to
   just do it in one place).
  
   VirtualHostDirectory
   -VirtualHost1
   -docs
   -VirtualHost2
   -docs
   -VirtualHost3
   -docs
   -VirtualHost4
   -docs
   -GlobalInclude
   -PEAR
   -Smarty
   -Custom
  
   So on, and so forth.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice sought on PHP site maintenance

2005-08-16 Thread John Nichel

George Pitcher wrote:

John,

Thanks for the input. I just knew I hadn't covered everything. My server is
currently set up as NT4/IIS. I suppose I could look to switching to Apache
though.

Cheers

George

snip

I really don't know the Windows world, but there _may_ be a way to set 
up include paths globally/locally.  Sorry I can't be of more help.


--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice/opinion requested on page section lineup

2005-02-14 Thread Burhan Khalid
Alp wrote:
Thanks Burhan,
That's almost what I exactly want to do. The question is how do I start
doing that which methodlogy, which structure, etc,,,
The first step would be to store the weight value in your database (or 
wherever) and link it to your modules (or content) that you want ordered.

A very spartan table like :
CREATE TABLE `d-order` (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
   nid INT,
   oid TINYINT);
Where nid is a foreign key linked to your nodes table, and oid is your 
order id (the placement order) would work.

Simply SELECT nid,oid FROM `d-order` ORDER BY oid; will get you a 
listing of what module will go where, from light to heavy (top to down)

I think you can take it from here :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Advice/opinion requested on page section lineup

2005-02-14 Thread Richard Lynch
Alp wrote:
 I would like to be able to alter the lining-up of several sections on a
 php
 generated webpage. What would be the best/optimal approach in achieving
 that?

 As an example sections referred to are mostly tables generated via code
 on
 data obtained from a DB. Should I name them (somehow), shall I use a
 seperate table to store the lining-up information or shall I add a
 precedence integer column to each relevant table in the database, ...?

I would simply add a 'rank' field in the table, and use order by rank to
do what you described in later posts in this thread.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice/opinion requested on page section lineup

2005-02-13 Thread Alp
Thanks Burhan,

That's almost what I exactly want to do. The question is how do I start
doing that which methodlogy, which structure, etc,,,

Alp

Burhan Khalid [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Alp wrote:
  Hi Jochem,
 
  Intention is to give a user the option of assigning position of a
  section on the page, i.e:
  First: sectA, then sectC, then sectE, then sectB and sectD or any
other
  order that is indicated by the user. So it is somewhat like top-of-page,
  mid-of-page etc but with a numbering/precedence/sorting (can be named
any)
  system that populates the page according to the choice.
  Roughly:
  --first section--
  --second section--
  --third section--
  --fourth section--
  --fifth section--

 Alp:

You can implement a weights system, similar to Drupal.  In such a
 system, each item is given a weight -- the lighter the item floats to
 the top, and the heavier items sink to the bottom. Weights can range
 from anything (lets take -10 to 10 -- 0 being the default). 1 is
 heavier than 0, so any item with a weight of 1 sinks below any item
 with a weight  1. -1 is lighter than 0, so it will float above both 0
 and 1.

This type of system is good if you are not concerned with strict
 placing of items, since two items in the same weight category are simply
 stacked on top of each other.

 Regards,
 Burhan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice/opinion requested on page section lineup

2005-02-12 Thread Alp
Hi Experts,

I would like to be able to alter the lining-up of several sections on a php
generated webpage. What would be the best/optimal approach in achieving
that?

As an example sections referred to are mostly tables generated via code on
data obtained from a DB. Should I name them (somehow), shall I use a
seperate table to store the lining-up information or shall I add a
precedence integer column to each relevant table in the database, ...?

Thanks in advance for your guidance.

Alp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice/opinion requested on page section lineup

2005-02-12 Thread Jochem Maas
Alp wrote:
...
I would like to be able to alter the lining-up of several sections on a php
generated webpage. What would be the best/optimal approach in achieving
that?
As an example sections referred to are mostly tables generated via code on
data obtained from a DB. Should I name them (somehow), shall I use a
seperate table to store the lining-up information or shall I add a
precedence integer column to each relevant table in the database, ...?

sorry, driveby answer.
you want to make your output (source) HTML look pretty?
2 options spring to mind:
1. the Tidy extension (there are probably other similar tools)
2. don't bother - as long as its syntax is correct indentation
is irrelevant really.
or do you mean something else by 'line-up'?
Thanks in advance for your guidance.
Alp
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Advice/opinion requested on page section lineup

2005-02-12 Thread Alp
Hi Jochem,

Intention is to give a user the option of assigning position of a
section on the page, i.e:
First: sectA, then sectC, then sectE, then sectB and sectD or any other
order that is indicated by the user. So it is somewhat like top-of-page,
mid-of-page etc but with a numbering/precedence/sorting (can be named any)
system that populates the page according to the choice.
Roughly:
--first section--
--second section--
--third section--
--fourth section--
--fifth section--
etc... Clearer now?

Alp

Jochem Maas [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Alp wrote:
 ...
 
  I would like to be able to alter the lining-up of several sections on a
php
  generated webpage. What would be the best/optimal approach in achieving
  that?
 
  As an example sections referred to are mostly tables generated via
code on
  data obtained from a DB. Should I name them (somehow), shall I use a
  seperate table to store the lining-up information or shall I add a
  precedence integer column to each relevant table in the database, ...?


 sorry, driveby answer.
 you want to make your output (source) HTML look pretty?
 2 options spring to mind:
 1. the Tidy extension (there are probably other similar tools)
 2. don't bother - as long as its syntax is correct indentation
 is irrelevant really.

 or do you mean something else by 'line-up'?

 
  Thanks in advance for your guidance.
 
  Alp
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice/opinion requested on page section lineup

2005-02-12 Thread Burhan Khalid
Alp wrote:
Hi Jochem,
Intention is to give a user the option of assigning position of a
section on the page, i.e:
First: sectA, then sectC, then sectE, then sectB and sectD or any other
order that is indicated by the user. So it is somewhat like top-of-page,
mid-of-page etc but with a numbering/precedence/sorting (can be named any)
system that populates the page according to the choice.
Roughly:
--first section--
--second section--
--third section--
--fourth section--
--fifth section--
Alp:
  You can implement a weights system, similar to Drupal.  In such a 
system, each item is given a weight -- the lighter the item floats to 
the top, and the heavier items sink to the bottom. Weights can range 
from anything (lets take -10 to 10 -- 0 being the default). 1 is 
heavier than 0, so any item with a weight of 1 sinks below any item 
with a weight  1. -1 is lighter than 0, so it will float above both 0 
and 1.

  This type of system is good if you are not concerned with strict 
placing of items, since two items in the same weight category are simply 
stacked on top of each other.

Regards,
Burhan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Advice for Experienced web developer newish to PHP

2005-01-09 Thread Justin
Hi all,
I'm a experienced web programmer, that is taking on a PHP project. I'm
really looking to get the tricks and tips that come with experience, the
lazy way :-)
Project Overview
Its basically a corporate info website, with an admin section to
add/change content. It will have several top level section some of which
will have subsection contain different type of articles
e.g. news, press releases section, and events.
Some of these will have fields specific to the clients website e.g.
Internal Part No.
I don't need :
Forums
Polls
User login/ membership (except admin)
I've looked at some of the CMS out there, but they seem too complex for
my needs. I need something more geared to an information site than a
community
Constraints
- Can't use zone/plone
- Shared server
What I'm looking for
- libs, classes etc. to help displaying html and forms. e.g. paging
records 10 at a time, generating client side validation etc.
- some sort of database abstraction layer . it would be nice to have
this layer return objects of the correct type
- a php rss lib
- a simple php based gallery example.
-
Thanks All .
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Advice for Experienced web developer newish to PHP

2005-01-09 Thread tr
Justin  wrote / napísal (a):
Hi all,
I'm a experienced web programmer, that is taking on a PHP project. I'm
really looking to get the tricks and tips that come with experience, the
lazy way :-)
Project Overview
Its basically a corporate info website, with an admin section to
add/change content. It will have several top level section some of which
will have subsection contain different type of articles
e.g. news, press releases section, and events.
Some of these will have fields specific to the clients website e.g.
Internal Part No.
I don't need :
Forums
Polls
User login/ membership (except admin)
I've looked at some of the CMS out there, but they seem too complex for
my needs. I need something more geared to an information site than a
community
Constraints
- Can't use zone/plone
- Shared server
What I'm looking for
- libs, classes etc. to help displaying html and forms. e.g. paging
records 10 at a time, generating client side validation etc.
- some sort of database abstraction layer . it would be nice to have
this layer return objects of the correct type
- a php rss lib
- a simple php based gallery example.
-
Thanks All .
PEARpear.php.netframework
SMARTY   smarty.php.nettemplate engine
trobi
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Advice on imagecreatefromsrc_type

2004-11-03 Thread Daniel Lahey
I've encountered the same bug that others have in regards to failure of 
the imagecreatefromjpeg(), imagecreatefrompng(), and 
imagecreatefromgif() functions when running under IE.  I found a report 
stating that the functions don't work in IE for PHP versions prior to 
4.3.0, however this is occurring in 4.3.8 (Win2k Server on one box and 
XP on another).  Any suggestions as to how to work around this?  Mine 
was:

a 
href=http://www.spreadfirefox.com/?q=affiliatesamp;id=0amp;t=1;Get 
Firefox!/a

This is not acceptable to the client, however.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Advice on imagecreatefromsrc_type

2004-11-03 Thread Jason Wong
On Thursday 04 November 2004 00:33, Daniel Lahey wrote:

 I've encountered the same bug that others have in regards to failure of
 the imagecreatefromjpeg(), imagecreatefrompng(), and
 imagecreatefromgif() functions when running under IE. 

I find it hard to believe that your choice of browser affects the operation of 
PHP.

 I found a report 
 stating that the functions don't work in IE for PHP versions prior to
 4.3.0, however this is occurring in 4.3.8 (Win2k Server on one box and
 XP on another). 

Where is this report?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Small is beautiful.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice Needed

2004-02-20 Thread Richard Davey
Hello daniel,

Friday, February 20, 2004, 6:10:28 AM, you wrote:

deo Hi there, i have finally built a project space for work, its a collaborate
deo space for storing important key documents (not public), what is the best
deo way to store these, outside the web directory or would it be safe within a
deo htaccess protected directory ? Being that to access that directory i would
deo have to send the login and pass to the link of the file which i fopen up
deo and either header output to the browser or download.

If you're going to open the files via fopen on the local filesystem,
your htaccess settings have no implication on this at all. For files
like this I store them outside of the web root and fopen them from my
PHP script and stream them to the browser. That is on a dedicated
server where I know no-one has access to the directory they are stored
in and it can never be found via the web server. Your mileage may
vary.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice Needed

2004-02-20 Thread electroteque
Done, outside the webby is the goer, then i dont have to worry this the
hassle of getting a simple allowovedrride rule in the fukn conf file, which
has seem to be a simple process i could do but then a complicated process
with all the politics :\

The server is dedicated work serve their own servers.

Just that its public accessable and that its private documents and that
there are htaccess hacking tools out there scares me heheh.

-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED]
Sent: Friday, February 20, 2004 9:48 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Advice Needed


Hello daniel,

Friday, February 20, 2004, 6:10:28 AM, you wrote:

deo Hi there, i have finally built a project space for work, its a
collaborate
deo space for storing important key documents (not public), what is the
best
deo way to store these, outside the web directory or would it be safe
within a
deo htaccess protected directory ? Being that to access that directory i
would
deo have to send the login and pass to the link of the file which i fopen
up
deo and either header output to the browser or download.

If you're going to open the files via fopen on the local filesystem,
your htaccess settings have no implication on this at all. For files
like this I store them outside of the web root and fopen them from my
PHP script and stream them to the browser. That is on a dedicated
server where I know no-one has access to the directory they are stored
in and it can never be found via the web server. Your mileage may
vary.

--
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice Needed

2004-02-19 Thread daniel
Hi there, i have finally built a project space for work, its a collaborate
space for storing important key documents (not public), what is the best
way to store these, outside the web directory or would it be safe within a
htaccess protected directory ? Being that to access that directory i would
have to send the login and pass to the link of the file which i fopen up
and either header output to the browser or download.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice: GET vs. POST vs. SESSION

2003-11-23 Thread Jed R. Brubaker
 I was hoping that some of you would be able to give me some advice.

I have started creating a web application that makes heavy use of URL GET
variables in order to solve a problem that I have had with POST in the
past - namely, having to refresh the document and repost the variables when
you use the browser's back button.

So I enthusiastically have embraced GET variables, but am now having a
struggle editing the URL variable string.

So this is my question: is using URL GET variables that best way to avoid
that browser back button effect?

I have thought about using session variable extensively, but that I am going
to have to be unsetting them all over the place.

So - anyone have any advice?
Thanks in advance!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice: GET vs. POST vs. SESSION

2003-11-23 Thread Robert Cummings
On Sun, 2003-11-23 at 14:27, Jed R. Brubaker wrote:
  I was hoping that some of you would be able to give me some advice.
 
 I have started creating a web application that makes heavy use of URL GET
 variables in order to solve a problem that I have had with POST in the
 past - namely, having to refresh the document and repost the variables when
 you use the browser's back button.
 
 So I enthusiastically have embraced GET variables, but am now having a
 struggle editing the URL variable string.
 
 So this is my question: is using URL GET variables that best way to avoid
 that browser back button effect?

It can be a good way, but I believe the spec for GET based parameters
only guarantee processing of 1024 characters (this may be the wrong
number but there is a limit on the guarantee).

 I have thought about using session variable extensively, but that I am going
 to have to be unsetting them all over the place.

If you are worried about unsetting them all, maybe it would help to use
a two level array to hold your form data. Perhaps the following:

$_SESSION['formName']['email'] = $_POST[['email'];

Then when you want to clear the form you can do a simple:

unset( $_SESSION['formName'] );

HTH,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Replicate MSAcces form with sub-forms to PHP? Advice needed.

2003-06-10 Thread Apollo (Carmel Entertainment)
I am trying to convert MSAccess form (that have sub-forms) to PHP and can't seem
to figure out a solution. Anyone done anything like this before, the
sub-queries/sub-forms with PHP? Any examples?

Apolinaras Apollo Sinkevicius
Carmel Music  Entertainment, LLC  
 web-site:  http://carmelme.com 

Having an event in Chicago, or would you like to bring Chicago entertainment 
to your event? Give Carmel Music  Entertainment a call for the finest 
entertainment available in Chicago.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice on script length please!

2003-06-06 Thread Ford, Mike [LSS]
 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]
 Sent: 05 June 2003 13:36
 
 [snip]
  If I did this, would it make a huge amount of difference?
 
 I'm almost certain it WOULD make a difference, but apart from the
 execution time, I can't think of anything worse than scrolling through
 2000 lines of code looking for the section I'm after.
 
 Or, even if *I* could find my way around, what about other developers
 who have to decipher it later???
 [/snip]
 
 Even if the functions are in an include and I called that 
 include at the
 top of the page wouldn't that just make the overall code the same
 length? i.e.
 
 ?pseudo-code
 
 include(functions.php);
 
 switch($action)
   case do this:
   .
   function(s) called
   break;
 
   case do that:
   .
   other function(s) called
   break;
 
   case do the other:
   .
   no function(s) called
   break;
 
 ?
 
 Now, it does make the code neater and easier to document no doubt, but
 doesn't the script namespace above become the same length as 
 itself plus
 the included file(s)?

Yes -- but consider this:

include(common_functions.php);

switch($action)
case do this:
include(do_this_funcs.php);
.
function(s) called
break;

case do that:
include(do_that_funcs.php);
.
other function(s) called
break;

case do the other:
.
no function(s) called
break;

In this case, at most one of do_this_funcs.php and do_that_funcs.php is read
and compiled -- and in case do_the_other, neither of them is.  That surely
has to be some sort of saving, even if the multiple file accesses offset it
somewhat.  (I suppose I should benchmark this to find out at what sort of
filesizes one outweighs the other, but I can't be bothered! ;)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice on script length please!

2003-06-06 Thread Jay Blanchard
[snip]
include(common_functions.php);

switch($action)
case do this:
include(do_this_funcs.php);
.
function(s) called
break;

case do that:
include(do_that_funcs.php);
.
other function(s) called
break;

case do the other:
.
no function(s) called
break;

In this case, at most one of do_this_funcs.php and do_that_funcs.php is
read and compiled -- and in case do_the_other, neither of them is.
That surely has to be some sort of saving, even if the multiple file
accesses offset it somewhat.  (I suppose I should benchmark this to find
out at what sort of filesizes one outweighs the other, but I can't be
bothered! ;)
[/snip]

Well said Mike, it is all in the organization!

Jay

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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 due to be at least 2200 lines when complete and I wanted to
know, is it worth splitting any of the functions into includes which are
only called if needed, say if an admin is in user management, call the user
functions etc...

If I did this, would it make a huge amount of difference?

Thanks ;o)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on script length please!

2003-06-05 Thread Justin French
on 05/06/03 7:25 PM, Bix ([EMAIL PROTECTED]) wrote:

 If I did this, would it make a huge amount of difference?

I'm almost certain it WOULD make a difference, but apart from the execution
time, I can't think of anything worse than scrolling through 2000 lines of
code looking for the section I'm after.

Or, even if *I* could find my way around, what about other developers who
have to decipher it later???


Justin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice on script length please!

2003-06-05 Thread Jay Blanchard
[snip]
 If I did this, would it make a huge amount of difference?

I'm almost certain it WOULD make a difference, but apart from the
execution time, I can't think of anything worse than scrolling through
2000 lines of code looking for the section I'm after.

Or, even if *I* could find my way around, what about other developers
who have to decipher it later???
[/snip]

Even if the functions are in an include and I called that include at the
top of the page wouldn't that just make the overall code the same
length? i.e.

?pseudo-code

include(functions.php);

switch($action)
case do this:
.
function(s) called
break;

case do that:
.
other function(s) called
break;

case do the other:
.
no function(s) called
break;

?

Now, it does make the code neater and easier to document no doubt, but
doesn't the script namespace above become the same length as itself plus
the included file(s)?

Jay

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 huge amount of difference?

I'm almost certain it WOULD make a difference, but apart from the
execution time, I can't think of anything worse than scrolling through
2000 lines of code looking for the section I'm after.

Or, even if *I* could find my way around, what about other developers
who have to decipher it later???
[/snip]

Even if the functions are in an include and I called that include at the
top of the page wouldn't that just make the overall code the same
length? i.e.

?pseudo-code

include(functions.php);

switch($action)
case do this:
.
function(s) called
break;

case do that:
.
other function(s) called
break;

case do the other:
.
no function(s) called
break;

?

Now, it does make the code neater and easier to document no doubt, but
doesn't the script namespace above become the same length as itself plus
the included file(s)?

Jay



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Advice on script length please!

2003-06-05 Thread Jay Blanchard
[snip]
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?
[/snip]

http://us3.php.net/manual/en/function.include.php has a wealth of
information, including important notes about security of included files.
The first sentence on the page answers the question...The include()
statement includes and evaluates the specified file. 

So if your include file is 500 lines long and the script you call it
from is 500 lines long the end result (to the parser) is a script 1000
lines long. But two separate 500 line scripts may be a lot easier to
manage and document than one single 1000 line file. Placing functions in
an include makes those functions available to other scripts as well,
instead of having to re-write them.

HTH!

Jay

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] HELP PLEASE ! Need PHP Advice !!!

2003-02-27 Thread justin brenton
can anyone give me some good advise on how abouts I should go about
maintaining a newspaper website.

here is what is currently in place and how i want it to be managed

right now the newspapers are published in a quark file from that file
pictures have to be placed in photoshop and resized , croped and what not
and then inserted into a html page, the content i.e text is in this quark
file as well and is copied and pasted into a html file, what i want to do is
have the site automated to some extent so i do not have to be doing all this
copying and pasteing it's a total waste valueable time. what i would like to
have it some way to have a php script to take this info from the quark file
and the pictures and have them either transfered to a html page or to a
database from there i could call from the php script.



ANYONE HAVE ANY IDEAS ON A GOOD WAY TO GO ABOUT THIS ... PLEASE CONTACT ME

[EMAIL PROTECTED]

remove the NOSPAM from address



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] HELP PLEASE ! Need PHP Advice !!!

2003-02-27 Thread Victor Stan
First of all, are they paying you to automate or to repurpose the content
for the web? Taking a page designed for print and then automating it into
a page for the web is the wrong approach, your problem is not technical it
is a design problem. Technically it is easy, I think, does Quark not have
XML output? Or I think it is able to save document as HTML for the web too,
then if you want to automate all u have to do is make a script that
includes those pages inside a site shell. I actually wrote something like
this that one could save an html file from word and upload it and it would
be on the site, but again, I think it's a bad idea. You should NOT try to
automate this, you should look into hiring a fulltime repurposing designer,
at LEAST you should read designing Web Usability by Jacob Nielson, then
maybe u get a better idea of what you SHOULD do.

- Vic

-Original Message-
From: justin brenton [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 7:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP] HELP PLEASE ! Need PHP Advice !!!

can anyone give me some good advise on how abouts I should go about
maintaining a newspaper website.

here is what is currently in place and how i want it to be managed

right now the newspapers are published in a quark file from that file
pictures have to be placed in photoshop and resized , croped and what not
and then inserted into a html page, the content i.e text is in this quark
file as well and is copied and pasted into a html file, what i want to do is
have the site automated to some extent so i do not have to be doing all this
copying and pasteing it's a total waste valueable time. what i would like to
have it some way to have a php script to take this info from the quark file
and the pictures and have them either transfered to a html page or to a
database from there i could call from the php script.



ANYONE HAVE ANY IDEAS ON A GOOD WAY TO GO ABOUT THIS ... PLEASE CONTACT ME

[EMAIL PROTECTED]

remove the NOSPAM from address



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__ 
Post your free ad now! http://personals.yahoo.ca

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] HELP PLEASE ! Need PHP Advice !!!

2003-02-27 Thread Justin French
Right, well there's a few issues here.

1.

You're asking if there's a way to parse a QXD file so retrieve the text from
it.  I doubt this can be done.  I had a quick google for it, to no luck.  I
also bothered to open up a Quark 3.32 file in my text editor, to check out
the source.  It looks pretty complex.

However, there MAY be some light at the end of the tunnel.

a) PHP *IS* able to read and write PDF format.  Prerhaps if your newspaper
designers export a PDF of the newspaper (relatively easy). you can pick up
the pieces you need through the PDF, rather than the QXD file.

b) What you're really talking about is using one set of data in multiple
ways (web  print, then maybe email, WAP, PDA, etc).  What I'd be aiming to
do is have all the text/content stored in a shared database or easy-to-parse
file format (like XML), so that the writers write to this format, then the
designers copy + paste to Quark, the editors can edit directly in the XML
file or via database GUIs, and people in charge of other content formats
(like web_ can either copy + paste from the central content, or parse it
with a program like PHP.

c) Perhaps your company should look at Adobe InDesign 2 -- I read an article
which briefly discussed it's ability to parse or read from XML files -- so
you could have a simple XML doc:

---
article

id28/id

titleLearning about XML/heading

subtitleI wish I had time to explore this properly!/subtitle

authorJustin French/author

email[EMAIL PROTECTED]/email

keywordsXML,Justin,Foo,Bah,PHP/keywords

content

p class=introIn this article, I'll attempt to show you some blah
blah./p

pParagraph 1/p

pParagraph 2/p

pParagraph 3/p

p class=footerThis is my footer/p

/content

/article
---

I *think* InDesign 2 can take this data, and with the designer's help,
format it to a designed article.

At the very least, you could export some nice clean plain text for the
designer to copy+paste, which is probably what they already do (copy+paste
from Word to Quark.




2. Image files in Quark need to be either TIFF or EPS format.  So, what you
need is a way of copying these files, converting them to JPEGs, GIFs or
PNGs, and resizing them to suit the web.

I don't really know if the image functions in PHP can do this... best left
to others.

You *could* batch convert everything to a RGB JPEG using photoshops batch
processing and actions, THEN get PHP or Photoshop to do the resizing etc.

However, cropping and whatnot of a file is often something that can ONLY
be done by eye... You may never be able to achieve this with automated
computer programs.



Think about the real issue.  Is it taking stuff from quark and messing with
it, or is it having a good clean source of data which can be used many
ways?


Justin French




on 28/02/03 12:24 AM, justin brenton ([EMAIL PROTECTED]) wrote:

 can anyone give me some good advise on how abouts I should go about
 maintaining a newspaper website.
 
 here is what is currently in place and how i want it to be managed
 
 right now the newspapers are published in a quark file from that file
 pictures have to be placed in photoshop and resized , croped and what not
 and then inserted into a html page, the content i.e text is in this quark
 file as well and is copied and pasted into a html file, what i want to do is
 have the site automated to some extent so i do not have to be doing all this
 copying and pasteing it's a total waste valueable time. what i would like to
 have it some way to have a php script to take this info from the quark file
 and the pictures and have them either transfered to a html page or to a
 database from there i could call from the php script.
 
 
 
 ANYONE HAVE ANY IDEAS ON A GOOD WAY TO GO ABOUT THIS ... PLEASE CONTACT ME
 
 [EMAIL PROTECTED]
 
 remove the NOSPAM from address
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice on uploaded files

2003-01-29 Thread Vladimir Galkov
 Me too. I add tracks to DB only and store images as independent files. My
experiments with storing images in DB shows large memory use wich slow down
other processes (especialy if I need to choose several images from DB).

 But if pictures unnumerous and small (smaler 30-40kb) my advice - insert
them in DB.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Advice on uploaded files

2003-01-29 Thread Maxim Maletsky
Two problems for filesystem:

1. You cannot store over a tot number of images on some systems. Thus,
storing them in DB will be headechless. Unless, you know that there will
be at most some hundred pics or so.

2. Storing them in filesystem gives more trouble as you need to make
sure it is - writable, permissions won't change, things won't get
corrupted, it's writable by you and but not by other user etc

I'd say that DB is a better way, although altogether it would get it
a little slower, but not by too much. DB will be quite large.


--
Maxim Maletsky
[EMAIL PROTECTED]



Manuel Ochoa [EMAIL PROTECTED] wrote... :

 
 I writting a php program for a small insurance company and they want to receive 
uploaded digital photos.
 
 Should I store the photos in a mysql database or in a directory on the hard drive?
 
 If you have experience with this any advice would be appreciated.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Advice on uploaded files

2003-01-29 Thread Ernest E Vogelsinger
At 15:54 29.01.2003, Vladimir Galkov spoke out and said:
[snip]
 Me too. I add tracks to DB only and store images as independent files. My
experiments with storing images in DB shows large memory use wich slow down
other processes (especialy if I need to choose several images from DB).

 But if pictures unnumerous and small (smaler 30-40kb) my advice - insert
them in DB.
[snip] 

Humm.
I tend to have everything that's needed for reproduction in the DB - that
means as well images, docs, etc, everything that gets uploaded.

However there's a HUGE performance penalty for this, so I duplicate
binaries to the filesystem. My classes are set up to try to open the file,
and if that doesn't exist they gather it from the DB, cache them to the
expected location, and continue serving.

This method is used throughout our scripts, not only for binaries but also
for all other cached items. It guarantees consistency when moving or
restoring the system, and allows to simply clear all cache files without
disrupting application functionality.

Well, it gets slower for some time while rebuilding the cache...

My 2c :-)


-- 
   O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
^ http://www.vogelsinger.at/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Advice on uploaded files

2003-01-29 Thread Jason Sheets
You can do either, many people have responded and given their thoughs on
the matter.  I personally avoid storing images in a database, the
filesystem is better equipped IMO to handle files.  On top of the
overhead of storing the image in your database you will be creating
additional database traffic, every image loaded is at least one more
database query on the website.

Jason
On Tue, 2003-01-28 at 17:16, Manuel Ochoa wrote:
 
 I writting a php program for a small insurance company and they want to receive 
uploaded digital photos.
 
 Should I store the photos in a mysql database or in a directory on the hard drive?
 
 If you have experience with this any advice would be appreciated.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Advice on uploaded files

2003-01-28 Thread Manuel Ochoa

I writting a php program for a small insurance company and they want to receive 
uploaded digital photos.

Should I store the photos in a mysql database or in a directory on the hard drive?

If you have experience with this any advice would be appreciated.



Re: [PHP] Advice on uploaded files

2003-01-28 Thread Justin French
on 29/01/03 11:16 AM, Manuel Ochoa ([EMAIL PROTECTED]) wrote:

 I writting a php program for a small insurance company and they want to
 receive uploaded digital photos.
 
 Should I store the photos in a mysql database or in a directory on the hard
 drive?
 
 If you have experience with this any advice would be appreciated.


I prefer storing them in the filesystem, and using the MySQL database to
keep track of WHERE they are (link).  There of course are SOME problems with
that... mainly because the two are not joined at the hip... someone could
accidently trash the file, or the MYSQL record, without deleting the other.

Storing the image directly in MySQL has never appealed to me, because you
have to do a little more work to get the image out (sending headers, having
an image script, etc), and mainly because the size of the DB increases
dramatically... which makes backing up more difficult/time consuming.

Each to their own though :)


Justin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Advice

2003-01-08 Thread cj
G'day all

I have a web page were users can upload and downloads files.
When they go to download a file A list of files they can download is
displayed and a check box next to each file name and a button, with which
the users can click to download the selected file.

What I would like to know what would be the best method of doing this?
Would it be best to imbed the whole thing in a form, or is there another way
that php can get the file information from the check box.


The code I am working on is below,
I am not very effient and a newbie at php so please excuse the mess

Thanks Heaps
cj

//This gets the information of the owner and location of the file from the
db
$result = mysql_query(SELECT * FROM binary_files WHERE owner='$owner' and
location='$location', $db);

//this displays a table with Name, Size, and info.
echo trtd/tdtdName/tdtdSize/tdtdInfo/td/tr\n;
$myfile=0;

//This fetchs the file information from the above mysql_query
while ($myrow = mysql_fetch_array($result, MYSQL_ASSOC)) {


//this displays a table with a checkbox, I would like the file_id to be the
value for the checkbox (not //working) the check box gets no value
echo trtdinput TYPE=checkbox NAME=filetodownload
VALUE=$myrow[id_files] UNCHECKED/td;
echo br;
echo File To Download: ;
echo $filetodownload;
echo br;

//This displays a link to the file download.php with the url varieble
filedownload which equels the file_id obtained from the db
echo tda
href=download.php?filedownload=$myrow[id_files]$myrow[filename]/a/td;

//This displays the filesize
echo td$myrow[filesize]/td;

//this display a info link (not yet implemented
echo tda href=info.php?fileinfo=$myrow[id_files]img
src=/Images/Info.png hspace=0 vspace=0 border=
0/a/td;
echo 

//This displays a image, with a link to download.php with the url variable
filedownload which contains the //file_id from the check box above (not
working)
a href=/upload/download.php?filedownload=$filetodownload target=mainimg
src=/Images/icons.php?text=Downloadcolor=red border=0
border=0/a
;

}

echo /table\n;


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Advice with encrypting+storing sensitive data

2002-12-05 Thread ªüYam
Would u teach me how to setup the OpenSSL and the engine for the apache web
server in order to achieve the 128 bits SSL protection?
Actually, I have tried so many times but still failed to do so...
First of all, there were errors occurred when I compiled the Openssl engine,
It seemed looking for a wrong file paths itself, however, I don't know how
to correct it...
Would u like to help me please? thx a lot
Bahwi [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó·s»D
:[EMAIL PROTECTED]
 That's a big question.

 The most secure way, using either mcrypt or PGP, is to have an
 application on the client's side that does the encryption and the
 decryptiong. This is probably the best solution. Heavily encrypt things
 on both sides, and this assumes the client side is secure.

 Barring this, you're going to have holes no matter what. Especially with
 man in the middle attacks (MITM).

 Use SSL, 128-bit SSL. This will help the most.

 The next best thing is to store it in session variables, but build your
 own system perhaps, and yes, encrypt it lightly with some system and a
 system passphrase. Clean up the sessions as soon as possible. And store
 a bunch of other data in there. Perhaps store the passphrase as the
 variable 'Height' or 'Bytes' or something, and store 'Password'
 'Passphrase' with dummy data. Not too much, you want to throw the person
 off as much as possible.

 Then, you need to obfuscate or preferably, encode your script so know
 one can figure out your scheme. Hope this helps some.

 --Joseph Guhlin
 http://www.josephguhlin.com/
 Web Programmer / Unix Consultant / PHP Programmer






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Advice with encrypting+storing sensitive data

2002-12-05 Thread bahwi
Sorry, OpenSSL is base in FreeBSD, so I didn't have to set it up myself. 
You can check www.openssl.org and www.apache.org. You still have to buy 
a cert though. For that, try:

www.verisign.com
and www.instantssl.com --- seems alot cheaper, no experience with them 
however

But chances are your best bet will be to just get a webhost with SSL 
support already and buy the cert. That way, if there are errors with 
openssl you don't have to fix them, someone else does.

As far as anything else, see my sig, I gotta charge for Unix work so I 
can make the bills. That should help though.

--Joseph Guhlin 
http://www.josephguhlin.com/ 
Web Programmer / Unix Consultant / PHP Programmer




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Advice with encrypting+storing sensitive data

2002-12-05 Thread Robert Mena
Thanks Bahwi, 

I agree with you regarding the client-side aspect.
But since we are talking about a regular web-based
application in php I think I will have to deal with
that.

The other security concerns are already addressed,
such as the use of SLL to encrypt the traffic and
possibly the use of an encoder do hide the source
code.

I do not think I understood your ideia : 
The next best thing is to store it in session
 variables, but build your own system perhaps, and
yes, encrypt it lightly with some system and a 
 system passphrase




__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Advice with encrypting+storing sensitive data

2002-12-05 Thread bahwi
Sorry, it was late at night. I'm glad you have the SSL and everything 
else already taken care of.

What I meant was for you to build your own session system, so that it is 
secure, instead of using PHP's built in session system. Someone once 
said that it has a 1% chance of cleaning up the sessions, and that would 
be the secure data(the passphrase, even if encrypted) on the system. If 
you build your own, you can change that 1%. There may be another way. 
Also, if you build it yourself, you will understand what happens exactly 
and will be able to hide the data perhaps a bit more than the regular 
sessions.

I hope this makes more sense. If not, tell me and I'll try to explain it 
again. Sorry! =)

Robert Mena wrote:

I do not think I understood your ideia : 
 

The next best thing is to store it in session
variables, but build your own system perhaps, and
   

yes, encrypt it lightly with some system and a 
 

system passphrase
   

--Joseph Guhlin 
http://www.josephguhlin.com/ 
Web Programmer / Unix Consultant / PHP Programmer




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Advice with encrypting+storing sensitive data

2002-12-04 Thread Robert Mena
Hi,

I need to develop an application where the protection
of the data (to be stored on a database) should be
very important (perhaps the principal requirement).

THe goal is to have the data stored in a way that even
the admin or anyone that hacks the web and/or database
server could not (or easily) recover the original
data.

First of all I am not a security expert and the
protection need not to be military-grade, just strong
enough to make things harder.

I would like to share a couple of ideias but mostly
interestered in phpers experiences and opinions.

1) Use mcrypt

The user should have to create a phrase and all
sensitive data will be stored using this phrase. 
Since the phrase will not be hardcoded in the php
scripts, even if the web is hacked it will not be
recovered.

For each row I would store the encrypted value and the
initialization vector.

In order to recover the value at the beginning of the
session (when the user logs in) I could store the
phrase as session variable (encrypted with mcrypt and
a system phrase?)

If the user decides to change the phrase a big update
in all encrypted rows/fields would be necessary.

2) Use PGP

Basically the same ideia but differnt encryption
tool/scheme.
Not sure how to implement or if there is any gain.

Well any tips/sugestions/opinions are welcome.


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Advice with encrypting+storing sensitive data

2002-12-04 Thread bahwi
That's a big question.

The most secure way, using either mcrypt or PGP, is to have an 
application on the client's side that does the encryption and the 
decryptiong. This is probably the best solution. Heavily encrypt things 
on both sides, and this assumes the client side is secure.

Barring this, you're going to have holes no matter what. Especially with 
man in the middle attacks (MITM).

Use SSL, 128-bit SSL. This will help the most.

The next best thing is to store it in session variables, but build your 
own system perhaps, and yes, encrypt it lightly with some system and a 
system passphrase. Clean up the sessions as soon as possible. And store 
a bunch of other data in there. Perhaps store the passphrase as the 
variable 'Height' or 'Bytes' or something, and store 'Password' 
'Passphrase' with dummy data. Not too much, you want to throw the person 
off as much as possible.

Then, you need to obfuscate or preferably, encode your script so know 
one can figure out your scheme. Hope this helps some.

--Joseph Guhlin 
http://www.josephguhlin.com/ 
Web Programmer / Unix Consultant / PHP Programmer




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   >