[PHP] How to insert a BLOB in mysql?

2001-03-09 Thread Daniele

A friend ask me how to insert image and other binary in his mysql db.
He don't want to insert the link to the file, he want insert the file itself..

I looking for some tutorial but i don't find anything...

I would like to know how i can do it in php and with the shell of 
mysql...and if this works fine.

thanks!!
daniele


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




[PHP] Reading from remote file

2003-07-06 Thread Daniele Baroncelli
Hi guys,
I am trying to read from a remote file, by using an example reported at the
manual page for the fread function:

http://www.php.net/";, "rb");
$contents = "";
do {
$data = fread ($handle, filesize ($filename));
if (strlen($data) == 0) {
break;
}
$contents .= $data;
}
fclose ($handle);
?>


Unfortunately this example is incorrect, as it gives me a parse error. The
mistake should be in the fact that there is a "do" keyword without a
"while".
Would anyone suggest me the correct version?

Cheers

Daniele




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



[PHP] parsing problem

2003-06-28 Thread Daniele Baroncelli
Hi guys,

I have problem in including this text in my PHP parsed file for XHTML
definition:


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>


It works if I remove the first line:




So, I am assuming PHP has problems with the  symbols, as they are
recognised to be PHP code delimiters.

Considering that I don't have control of the PHP configuration on the
server, does anyone have any idea of how I could handle this parsing
problem, still being able to define the file as XHTML?


Cheers

Daniele



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



[PHP] XML and XLS Sablotron

2002-10-30 Thread Daniele Baroncelli
Dear all,

I am just approaching to XML and I would need some explanation, which most
of you will probably consider very trivial.

I have read about the XLS Sablotron functions, which are able to apply XLS
stylesheets to an XML document.

My question is: if my aim is to apply to an XML document an XLS stylesheet
server-side (being able in this way to avoid browsers incompatibilies) with
PHP, which could it be my need to use SAX or DOM parsers?

Could XLS Sablotron be seen as an alternative to SAX or DOM, or does in some
ways rely on these technologies?

Really thanks to whom will be able to clarify me on this.


Daniele



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




[PHP] Re: XML and XLS Sablotron

2002-10-30 Thread Daniele Baroncelli
> You'll need the SAX or DOM functions if you will be /generating/ your
> XML.

I suppose, you mean, generating XML from another XML document, am I right?


> The Sablotron extension (and other XSLT processors) take XML and
> XSLT and output whatever your XSLT tells it to. The XSLT processor
> depends on getting well-formed XML and XSLT and that's where the DOM
> functions come in.
>
> Technically, you could use the DOM functions to build an XML document,
> use them to build an XSLT stylesheet and then send those two generated
> items through the XSLT processor to build HTML.

So, if I well understood, in case you simply want to manually write XML
documents and XSLT stylesheets, and then have the PHP (Sablotron in the
specific) to make the produce your HTML from it, you don't need SAX or DOM.
Is this correct, or am I missing something?

Does this mean that you only need SAX or DOM if you want to convert an XML
format to another XML format?


Really thanks


Daniele



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




[PHP] Installation prob: I can't see libphp4.so

2002-11-01 Thread Daniele Baroncelli
Dear all,

I have been trying to install php 4.2.3 on my virtual server, where Apache
1.3.27 is installed

The installation procedure seems to be right, but I can't find the
"libphp4.so" file

My configuration parameters where:
./configure --enable-inline-optimization --with-apxs=/usr/local/apache/1.3/b
in/apxs --with-config-file-path=/usr/home/myaccount/usr/local --disable-debu
g --enable-memory-limit --enable-sigchild --without-pear --with-regex=system
 --enable-mbstring --enable-mbstr-enc-trans --with-iconv=/usr/home/myaccount
/usr/local --with-gdbm=/usr/local
'--enable-sockets --enable-versioning --with-ttf=/usr/local --enable-ftp --w
ith-gd=/usr/local --with-zlib --enable-gd-native-ttf --wuth-xml --enable-xsl
t --with-xslt-sablot --with-mysql

On the systems it was previously installed php version 4.0.6


Cheers

Daniele



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




[PHP] Re: Installation prob: I can't see libphp4.so

2002-11-01 Thread Daniele Baroncelli
I am not sure if I have been clear.

I can't actually find out where the libphp4.so has been placed.


Daniele



"Daniele Baroncelli" <[EMAIL PROTECTED]> wrote in message
news:20021102060742.99705.qmail@;pb1.pair.com...
> Dear all,
>
> I have been trying to install php 4.2.3 on my virtual server, where Apache
> 1.3.27 is installed
>
> The installation procedure seems to be right, but I can't find the
> "libphp4.so" file
>
> My configuration parameters where:
>
./configure --enable-inline-optimization --with-apxs=/usr/local/apache/1.3/b
>
in/apxs --with-config-file-path=/usr/home/myaccount/usr/local --disable-debu
>
g --enable-memory-limit --enable-sigchild --without-pear --with-regex=system
>  --enable-mbstring --enable-mbstr-enc-trans --with-iconv=/usr/home/myaccou
nt
> /usr/local --with-gdbm=/usr/local
>
'--enable-sockets --enable-versioning --with-ttf=/usr/local --enable-ftp --w
>
ith-gd=/usr/local --with-zlib --enable-gd-native-ttf --wuth-xml --enable-xsl
> t --with-xslt-sablot --with-mysql
>
> On the systems it was previously installed php version 4.0.6
>
>
> Cheers
>
> Daniele
>
>



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




Re: [PHP] Re: Installation prob: I can't see libphp4.so

2002-11-02 Thread Daniele Baroncelli
> > I can't actually find out where the libphp4.so has been placed.
>
> Assuming you have done 'make', 'make install', use 'find / -name
libphp4.so'
> to find where it is.
>
> Or just do 'make install' again and watch carefully to see where
libphp4.so is
> copied to.


The 'find / -name libphp4.so' didn't return me any directory where the file
is placed.

The make install returned me this at the end:
/usr/home/rockit/usr/local/lib/php/php-4.2.3/build/shtool install -c -m 0755
php
 /usr/home/rockit/usr/local/bin/php
installing shared modules into
/usr/home/rockit/usr/local/lib/php/extensions/no-
debug-non-zts-20020429

So, it should mean that the libphp4.so is placed in this last directory "no-
debug-non-zts-20020429".

But this directory is empty.


Does anyone have any other hint in order to find out the installed module?


Daniele



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




Re: [PHP] Re: Installation prob: I can't see libphp4.so

2002-11-02 Thread Daniele Baroncelli
Now it works.

I repeated the installation from scratch and now it finally creates the
libphp4.so file.


Daniele


"Daniele Baroncelli" <[EMAIL PROTECTED]> wrote in message
news:20021102130710.81040.qmail@;pb1.pair.com...
> > > I can't actually find out where the libphp4.so has been placed.
> >
> > Assuming you have done 'make', 'make install', use 'find / -name
> libphp4.so'
> > to find where it is.
> >
> > Or just do 'make install' again and watch carefully to see where
> libphp4.so is
> > copied to.
>
>
> The 'find / -name libphp4.so' didn't return me any directory where the
file
> is placed.
>
> The make install returned me this at the end:
> /usr/home/rockit/usr/local/lib/php/php-4.2.3/build/shtool install -c -m
0755
> php
>  /usr/home/rockit/usr/local/bin/php
> installing shared modules into
> /usr/home/rockit/usr/local/lib/php/extensions/no-
> debug-non-zts-20020429
>
> So, it should mean that the libphp4.so is placed in this last directory
"no-
> debug-non-zts-20020429".
>
> But this directory is empty.
>
>
> Does anyone have any other hint in order to find out the installed module?
>
>
> Daniele
>
>



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




[PHP] XSLT Sablotron output

2002-11-02 Thread Daniele Baroncelli
Hi guys,

I have typed a simple script to test the Sablotron module recently
installed.
I found out that the HTML is output all in one line, without newlines, which
is very annoying.
Anyone can tell me if this is a bug of the module, or I have to specify
something somewhere?

Here is the script on the server, where you can watch the result:
http://www.rockit.it/redazione/sixth/prova.php

Below you can find my PHP, XML and XSL files.


Cheers

Daniele


==

PHP file
--




==

XML file
---



 John Doe
 94, Main Street, Nowheresville 16463, XY
 738 2838
 [EMAIL PROTECTED]
 http://www.unknown_and_unsung.com/


===

XSL file
-



http://www.w3.org/1999/XSL/Transform";>



 
 
 
 
 Contact information for 

 Mailing address:
 

 Phone:
 

 Email address:
 

 Web site URL:
 

 
 





==



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




[PHP] Re: XSLT Sablotron output

2002-11-03 Thread Daniele Baroncelli
No one replied yet, so I suppose no one was able to solve this.

By the way, is there anyone that actually experienced the same situation?


Cheers

Daniele



"Daniele Baroncelli" <[EMAIL PROTECTED]> wrote in message
news:20021102212518.34728.qmail@;pb1.pair.com...
> Hi guys,
>
> I have typed a simple script to test the Sablotron module recently
> installed.
> I found out that the HTML is output all in one line, without newlines,
which
> is very annoying.
> Anyone can tell me if this is a bug of the module, or I have to specify
> something somewhere?
>
> Here is the script on the server, where you can watch the result:
> http://www.rockit.it/redazione/sixth/prova.php
>
> Below you can find my PHP, XML and XSL files.
>
>
> Cheers
>
> Daniele
>
>
> ==
>
> PHP file
> --
>
>
> 
> // Allocate a new XSLT processor
> $xh = xslt_create();
>
> // call the XSLT processor directly
> xslt_process($xh, 'prova.xml', 'prova.xsl', 'prova.html');
>
> // output the result
> readfile('prova.html');
>
> xslt_free($xh);
>
> ?>
>
> ==
>
> XML file
> ---
>
> 
> 
>  John Doe
>  94, Main Street, Nowheresville 16463, XY
>  738 2838
>  [EMAIL PROTECTED]
>  http://www.unknown_and_unsung.com/
> 
>
> ===
>
> XSL file
> -
>
> 
>
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>
> 
>
>  
>  
>  
>  
>  Contact information for 
>
>  Mailing address:
>  
>
>  Phone:
>  
>
>  Email address:
>  
>
>  Web site URL:
>  
>
>  
>  
>
> 
>
> 
>
> ==
>
>



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




[PHP] Strange error!

2002-11-04 Thread Daniele Baroncelli
Hi guys,

I have very weird problem.

I have installed the PHP version 4.2.3 on the LINUX virtual server of my web
project.
Previously I had the PHP version 4.0.6.

The error I get is very weird.
When I insert a record with the phpMyAdmin, the first 4 characters of each
field don't get saved.
Same thing happened with some data entry interfaces I coded!


The only difference I can see in the two installation (provided the php.ini
file is in the same location):

The old version 4.0.6 was installed by the server provider and my virtual
server space I can only see the .so file.
The new version 4.2.3 is actually inside my virtual server space.
Hence, the path I provided in the php configuration is different (I don't
have idea if this can influence something).

NEW VERSION (4.2.3) configuration run by me
 './configure' '--with-apxs=/usr/local/apache/1.3/bin/apxs'
'--prefix=/usr/home/rockit/usr/local'
'--with-mysql=/usr/home/rockit/usr/local/mysql' '--with-xml' '--enable-xslt'
'--with-xslt-sablot=/usr/home/rockit/usr/local' '--with-regex=system'
'--with-expat-dir=/usr/home/rockit/usr/local'
'--with-iconv=/usr/home/rockit/usr/local' '--enable-inline-optimization'
'--disable-debug' '--enable-memory-limit' '--enable-sigchild'
'--without-pear' '--enable-mbstring' '--enable-mbstr-enc-trans'
'--with-gdbm=/usr/local' '--enable-sockets' '--enable-versioning'
'--with-ttf=/usr/local' '--enable-ftp' '--with-gd=/usr/local' '--with-zlib'
'--enable-gd-native-ttf'

OLD VERSION (4.0.6) configuration run by the server provider
 './configure' '--enable-inline-optimization'
'--with-apxs=/usr/local/apache/1.3/bin/apxs'
'--with-config-file-path=/usr/local/lib' '--disable-debug'
'--enable-memory-limit' '--enable-sigchild' '--with-gettext'
'--without-pear' '--with-regex=system' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--with-iconv=/usr/local'
'--with-gdbm=/usr/local' '--with-dbm=/usr/local' '--enable-sockets'
'--enable-versioning' '--with-freetype-dir=/usr/local'
'--with-ttf=/usr/local' '--enable-ftp' '--with-curl=/usr/local/curl'
'--with-openssl=/usr/local/openssl' '--with-gd=/usr/local'
'--with-freetype-dir=/usr/local' '--with-ttf=/usr/local'
'--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local'
'--with-t1lib=/usr/local' '--with-zlib' '--enable-gd-native-ttf'
'--with-imap' '--with-mcrypt=/usr/local' '--with-mhash=/usr/local'
'--with-dom=/usr/local' '--with-mysql=/usr/local/mysql' '--with-zlib'
'--with-zlib'


I must admit that I didn't not include all parameter as the old
installation, as I didn't know most options and thought is not needed. In
the new installation I instead provided additional XML parameter (after
installing the correspond modules, which all seem to work fine).


Hints on problem are very well welcome!


Daniele



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




[PHP] Installation error with 4.2.3

2002-11-06 Thread Daniele Baroncelli
No one replied to this message yet.
I am trying to address it again, as probably the previuos newsmessage title
wasn't very descriptive.

Thanks

Daniele


=

Hi guys,

I have very weird problem.

I have installed the PHP version 4.2.3 on the LINUX virtual server of my web
project.
Previously I had the PHP version 4.0.6.

The error I get is very weird.
When I insert a record with the phpMyAdmin, the first 4 characters of each
field don't get saved.
Same thing happened with some data entry interfaces I coded!


The only difference I can see in the two installation (provided the php.ini
file is in the same location):

The old version 4.0.6 was installed by the server provider and my virtual
server space I can only see the .so file.
The new version 4.2.3 is actually inside my virtual server space.
Hence, the path I provided in the php configuration is different (I don't
have idea if this can influence something).

NEW VERSION (4.2.3) configuration run by me
 './configure' '--with-apxs=/usr/local/apache/1.3/bin/apxs'
'--prefix=/usr/home/rockit/usr/local'
'--with-mysql=/usr/home/rockit/usr/local/mysql' '--with-xml' '--enable-xslt'
'--with-xslt-sablot=/usr/home/rockit/usr/local' '--with-regex=system'
'--with-expat-dir=/usr/home/rockit/usr/local'
'--with-iconv=/usr/home/rockit/usr/local' '--enable-inline-optimization'
'--disable-debug' '--enable-memory-limit' '--enable-sigchild'
'--without-pear' '--enable-mbstring' '--enable-mbstr-enc-trans'
'--with-gdbm=/usr/local' '--enable-sockets' '--enable-versioning'
'--with-ttf=/usr/local' '--enable-ftp' '--with-gd=/usr/local' '--with-zlib'
'--enable-gd-native-ttf'

OLD VERSION (4.0.6) configuration run by the server provider
 './configure' '--enable-inline-optimization'
'--with-apxs=/usr/local/apache/1.3/bin/apxs'
'--with-config-file-path=/usr/local/lib' '--disable-debug'
'--enable-memory-limit' '--enable-sigchild' '--with-gettext'
'--without-pear' '--with-regex=system' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--with-iconv=/usr/local'
'--with-gdbm=/usr/local' '--with-dbm=/usr/local' '--enable-sockets'
'--enable-versioning' '--with-freetype-dir=/usr/local'
'--with-ttf=/usr/local' '--enable-ftp' '--with-curl=/usr/local/curl'
'--with-openssl=/usr/local/openssl' '--with-gd=/usr/local'
'--with-freetype-dir=/usr/local' '--with-ttf=/usr/local'
'--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local'
'--with-t1lib=/usr/local' '--with-zlib' '--enable-gd-native-ttf'
'--with-imap' '--with-mcrypt=/usr/local' '--with-mhash=/usr/local'
'--with-dom=/usr/local' '--with-mysql=/usr/local/mysql' '--with-zlib'
'--with-zlib'


I must admit that I didn't not include all parameter as the old
installation, as I didn't know most options and thought is not needed. In
the new installation I instead provided additional XML parameter (after
installing the correspond modules, which all seem to work fine).


Hints on problem are very well welcome!


Daniele



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




[PHP] Warning! Spam to PHP mailing list

2002-11-07 Thread Daniele Baroncelli
Just to inform that the spam mail reported below took addresses from the PHP
mailing list!
I can say it for sure, as I have just opened this email account and I have
only used it in the PHP mailing list so far.

I am including all the message source, in case some of you is willing to
investigate it.

==

Return-Path: <[EMAIL PROTECTED]>
Received: from smtp5.libero.it (193.70.192.55) by ims5a.libero.it (6.5.028)
id 3DAC1C6C004BBE2E for [EMAIL PROTECTED]; Thu, 7 Nov 2002 10:53:59
+0100
Message-ID: <[EMAIL PROTECTED]> (added by
[EMAIL PROTECTED])
Received: from hotmail.com (129.44.12.10) by smtp5.libero.it (6.5.028)
id 3DC94DDD001FA1CE for [EMAIL PROTECTED]; Thu, 7 Nov 2002 10:53:59
+0100
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Free Auction Listing
Date: 07 Nov 2002 04:54:01 -0500
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

Hello and thank you for opening our email on your busy day.
We just wanted to tell you about our new auction website

www.ebaytoo.com

at our website www.ebaytoo.com we are offering your first
auction FREE to give us a try. Use promo Code MM65K and
then list your auction at the same time as you register. Please
be sure to register with all your correct information so when
your item sells you can get paid quickly. See you there at
www.ebaytoo.com




***THIS EMAIL IS NOT SPAM. THE PERSON GETTING THIS EMAIL HAS REQUESTED THAT
THEY BE***
***NOTIFIED BY EMAIL OF NEW AUCTION SITES ON THE INTERNET AND HAS SIGNED UP
FOR THIS***
***TO BE PART OF THIS MAILING LIST. THEY CAN BE TAKEN OFF THE LIST BY
VISITING THE SITE***
***THEY SIGNED UP ON.***





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




Re: [PHP] Warning! Spam to PHP mailing list

2002-11-07 Thread Daniele Baroncelli
Right, I get it.

By the way, do any of you know an effective way to denounce spam abuses?
So far I have been using the www.spamcop.net service, but I would be glad to
receive some info on how the others cope with spam abuses.

Cheers

Daniele


"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
news:20021107220254.1D2B.MAXIM@;php.net...
> and will conclude by this:
>
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=ubimmc93%40lib
ero.it&btnG=Google+Search
>
>
> --
> Maxim Maletsky
> [EMAIL PROTECTED]
>
>
>
> Maxim Maletsky <[EMAIL PROTECTED]> wrote... :
>
> > Mailing lists get archived and the archives get crawled. That is how
> > your email got known. You have posted at least once, haven't you?
> >
> >
> > --
> > Maxim Maletsky
> > [EMAIL PROTECTED]
> >
> >
> >
> > "Daniele Baroncelli" <[EMAIL PROTECTED]> wrote... :
> >
> > > Just to inform that the spam mail reported below took addresses from
the PHP
> > > mailing list!
> > > I can say it for sure, as I have just opened this email account and I
have
> > > only used it in the PHP mailing list so far.
> > >
> > > I am including all the message source, in case some of you is willing
to
> > > investigate it.
> > >
> > > ==
> > >
> > > Return-Path: <[EMAIL PROTECTED]>
> > > Received: from smtp5.libero.it (193.70.192.55) by ims5a.libero.it
(6.5.028)
> > > id 3DAC1C6C004BBE2E for [EMAIL PROTECTED]; Thu, 7 Nov 2002
10:53:59
> > > +0100
> > > Message-ID: <[EMAIL PROTECTED]> (added by
> > > [EMAIL PROTECTED])
> > > Received: from hotmail.com (129.44.12.10) by smtp5.libero.it (6.5.028)
> > > id 3DC94DDD001FA1CE for [EMAIL PROTECTED]; Thu, 7 Nov 2002
10:53:59
> > > +0100
> > > From: [EMAIL PROTECTED]
> > > To: [EMAIL PROTECTED]
> > > Subject: Free Auction Listing
> > > Date: 07 Nov 2002 04:54:01 -0500
> > > MIME-Version: 1.0
> > > Content-Type: text/plain
> > > Content-Transfer-Encoding: 8bit
> > >
> > > Hello and thank you for opening our email on your busy day.
> > > We just wanted to tell you about our new auction website
> > >
> > > www.ebaytoo.com
> > >
> > > at our website www.ebaytoo.com we are offering your first
> > > auction FREE to give us a try. Use promo Code MM65K and
> > > then list your auction at the same time as you register. Please
> > > be sure to register with all your correct information so when
> > > your item sells you can get paid quickly. See you there at
> > > www.ebaytoo.com
> > >
> > >
> > >
> > >
> > > ***THIS EMAIL IS NOT SPAM. THE PERSON GETTING THIS EMAIL HAS REQUESTED
THAT
> > > THEY BE***
> > > ***NOTIFIED BY EMAIL OF NEW AUCTION SITES ON THE INTERNET AND HAS
SIGNED UP
> > > FOR THIS***
> > > ***TO BE PART OF THIS MAILING LIST. THEY CAN BE TAKEN OFF THE LIST BY
> > > VISITING THE SITE***
> > > ***THEY SIGNED UP ON.***
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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
> >
>



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




[PHP] Setup-dependent quotes problem

2002-11-09 Thread Daniele Baroncelli
Hi there,

I have just reinstalled a new PHP version, the 4.2.3.
Before I had the 4.0.6.


I now get the quotes problem in my scripts that connect to the database.
Also the phpMyAdmin gives me errors when I use the ' inside a field in a GUI
select.
Before everything was working fine.

Which parameters could be set to make the scripts work as before?


Cheers

Daniele



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




[PHP] Value of variable with name stored in another variable

2002-06-13 Thread Daniele Baroncelli

How can I access the value of a variable whose name is stored in another
variable?

Example:
$field="artist";

How can I access the value of $artist ?



Thanks

Daniele



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




[PHP] Editor

2002-06-13 Thread Daniele Baroncelli

Hi guys,

Although any editor should be fine when coding PHP, I find that the standard
Notepad it's a real pain in the ass. Especially when the script gives you an
error at line 222 ! Each time I have to scroll and count each single line!

Can anyone suggest me a different editor ?


Cheers

Daniele



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




[PHP] XML: Expat or DOM?

2001-10-19 Thread Daniele Baroncelli

Hi guys,

I would like to start the new development of my site in XML.

Can anyone with experience tell me the real difference in speed between the
Expat and DOM parser?

Also, is it really risky to develop in DOM, considering the module is
experimental, and in theory it could change ?


Any up-to-date info on the issue are very welcome!


Cheers

Daniele



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




[PHP] XML: Expat o DOM?

2001-10-20 Thread Daniele Baroncelli

Salve,

Vorrei cominciare il nuovo sviluppo del mio sito in XML.

C'e' qualcuno che mi sa dire la reale differenza in velocita' tra i parser
Expat e DOM?

Inoltre, e' davvero rischioso sviluppare in DOM, considerando che il modulo
e' sperimentale e in teoria potrebbe cambiare?



Saluti


Daniele Baroncelli



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




[PHP] Re: Expat o DOM?

2001-10-20 Thread Daniele Baroncelli

Sorry, for this message in Italian. It should have been addressed to the
Italian Php newsgoup.


Daniele



"Daniele Baroncelli" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Salve,
>
> Vorrei cominciare il nuovo sviluppo del mio sito in XML.
>
> C'e' qualcuno che mi sa dire la reale differenza in velocita' tra i parser
> Expat e DOM?
>
> Inoltre, e' davvero rischioso sviluppare in DOM, considerando che il
modulo
> e' sperimentale e in teoria potrebbe cambiare?
>
>
>
> Saluti
>
>
> Daniele Baroncelli
>
>



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




[PHP] DOM XML?

2001-12-14 Thread Daniele Baroncelli

Hello,

I would like to restyle one big site in XML and I would like some brief
straight info/suggestions.

I am definitely interested in DOM XML, but as far as I can understand, the
module is still experimental and there to main risks:
- The module is not completely stable
- The functions are likely to change

Are you able to confirm me these?


As an alternative, it seems the only safe way to develop XML in PHP is by
using the Expat module.

Is this your view too?


In any case, are you able to indicate some good web references for XML in
PHP ?


Really thanks for the help.



Daniele





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




[PHP] Re: CSS & tables

2009-05-16 Thread Daniele Grillenzoni

On 15/05/2009 19.25, PJ wrote:

I know of no better place to ask. This may not be strictly a PHP issue,
but...
I am busting my hump trying to format rather large input pages with CSS
and trying to avoid tables; but it looks to me like I am wasting my time
as positioning with CSS seems an impossibly tortuous exercise. I've
managed to do some pages with CSS, but I feel like I am shooting myself
in the foot or somewhere...
Perhaps I am too demanding. I know that with tables, the formatting is
ridiculously fast.
Any thoughts, observations or recommendations?

A table, meaning ONE table for tough layouts could solve many problems, 
specially for newbies, but tbh there are enough resources to do pretty 
much whatever you need to do with css if the layout doesn't have absurd 
constraints.


Most of the IE bugs are due to floating and clearing, once you have 
learned to master overflow: auto and display: inline, you're good to go.


Just don't get insane about trying to achieve pixel perfect in netscape4.

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



[PHP] Parsing of forms

2009-05-16 Thread Daniele Grillenzoni
I noticed that php's way to fill $_GET and $_POST is particularly 
inefficient when it comes to handling multiple inputs with the same name.


This basically mean that every  in order to function 
properly needs to have a name ending in '[]'.


Wouldn't it be easier to also make it so that any element that has more 
than one value gets added to the GET/POST array as an array of strings 
instead of a string with the last value?


I can see the comfort of having the brackets system to create groups of 
inputs easily recognizable as such, while I can overlook the 
impossibility of having an input literally named 'foobar[]', having to 
add [] everytime there is a slight chance of two inputs with the same name.


This sounds flawed to me, as I could easily append '[]' to every input 
name and have a huge range of possibilities unlocked by that.


This can't be right. Or can it?

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



[PHP] Parsing of forms

2009-05-16 Thread Daniele Grillenzoni
I noticed that php's way to fill $_GET and $_POST is particularly 
inefficient when it comes to handling multiple inputs with the same name.


This basically mean that every  in order to function 
properly needs to have a name ending in '[]'.


Wouldn't it be easier to also make it so that any element that has more 
than one value gets added to the GET/POST array as an array of strings 
instead of a string with the last value?


I can see the comfort of having the brackets system to create groups of 
inputs easily recognizable as such, while I can overlook the 
impossibility of having an input literally named 'foobar[]', having to 
add [] everytime there is a slight chance of two inputs with the same name.


This sounds flawed to me, as I could easily append '[]' to every input 
name and have a huge range of possibilities unlocked by that.


This can't be right. Or can it?

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



Re: [PHP] Re: CSS & tables

2009-05-17 Thread Daniele Grillenzoni

On 17/05/2009 20.51, tedd wrote:

At 8:08 PM +0200 5/15/09, Daniele Grillenzoni wrote:

Most of the IE bugs are due to floating and clearing, once you have
learned to master overflow: auto and display: inline, you're good to go.

Just don't get insane about trying to achieve pixel perfect in netscape4.



Good to go -- only for simple sites.

And for pixel perfect, no browser does that.

Here's my write-up on the subject:

http://sperling.com/four-things-clients-should-know.php

Comments welcome.

Cheers,

tedd


Re-read my sentence:
"most of the IE bugs" as opposed to "all IE bugs"

Also: 404.

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



[PHP] Re: Parsing of forms

2009-05-19 Thread Daniele Grillenzoni

On 18/05/2009 10.42, Peter Ford wrote:

Daniele Grillenzoni wrote:

I noticed that php's way to fill $_GET and $_POST is particularly
inefficient when it comes to handling multiple inputs with the same name.

This basically mean that every  in order to function
properly needs to have a name ending in '[]'.

Wouldn't it be easier to also make it so that any element that has more
than one value gets added to the GET/POST array as an array of strings
instead of a string with the last value?

I can see the comfort of having the brackets system to create groups of
inputs easily recognizable as such, while I can overlook the
impossibility of having an input literally named 'foobar[]', having to
add [] everytime there is a slight chance of two inputs with the same name.

This sounds flawed to me, as I could easily append '[]' to every input
name and have a huge range of possibilities unlocked by that.

This can't be right. Or can it?


Isn't it ironic that a post about multiple form inputs is posted four times?
That's not a good way to make friends here, Daniele...

I really don't understand your complaint - in general if your form has multiple
inputs with the same name, then you either meant to do that, (like a multiple
select, in which case there's not really a big deal to add the []),
or it's wrong and wouldn't work as expected anyway.

You could append [] to every input - that would be lovely, but it would hide the
possibility that you mistakenly gave two inputs the same name.

It's true that every so often I can't work out why something is not posting an
array to PHP when I expected it to, and a look back to the form to find I'd
missed a [] on the name is the answer.

As I like to say in other areas of life (especially to my children), "stop
whining and get on with it!" ( sorry :) )

I'm sorry, it was due to my antispam block, which in turn blocked the 
mailing list antispam check. Quite ironic indeed. Also I thought I 
canceled the other 3, apparently it's something that is only apparent.


My complaint is this: a I can have a select multiple with a normal name, 
which is allowed by every spec, but PHP requires me to use [] in order 
to properly retrieve the values.


I guess I would settle for a function or an alternative array to $_GET 
and $_POST that worked properly.


Creating a function to fix those things is actually not that hard, but 
calling it everytime you need to use those arrays creates a lot of 
overhead. So maybe a core, or a PECL extension is/would be the answer.


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



Re: [PHP] Re: Parsing of forms

2009-05-19 Thread Daniele Grillenzoni

On 19/05/2009 18.09, Andrew Ballard wrote:

On Tue, May 19, 2009 at 10:11 AM, Ford, Mike  wrote:

On 19 May 2009 14:37, Daniele Grillenzoni advised:



My complaint is this: a I can have a select multiple with a
normal name,
which is allowed by every spec, but PHP requires me to use []
in order
to properly retrieve the values.


I really don't understand the problem with this -- in fact, I find it
quite useful to distinguish inputs which may have only 1 value from
those which may be multi-valued. And it all depends on what you mean by
a "normal" name, of course -- no current (X)HTML spec disallows [] as
part of a name attribute, so in that sense a name containing them could
be seen as perfectly normal...!! ;) ;)

Can you explain why this is such a hang-up for you, as I haven't seen
anything in what you've posted so far to convince me it's any kind of
problem?

Cheers!

Mike



I can't speak for the OP, but I've always thought it somewhat odd. An
HTML form should be able to work correctly without modification
regardless of the language that receives the input. As it is, it makes
the HTML for a form implementation specific. You might be able to use
ASP correctly process a form originally targeted toward PHP, but you
could not similarly take a form designed for ASP and process it with
PHP without modification.

It also impacts the use of client-side JavaScript. Consider a simple
page like this:

sundae.html
==



function countToppings() {
var totalToppings = 0;

var toppings = document.sundae.toppings;
 // To work with PHP, the above line would have to be changed:
 // var toppings = document.sundae.elements['toppings[]'];

if (toppings.length>  1) {
for (var i = 0; i<  toppings.length; i++) {
if (toppings[i].checked) totalToppings++;
}
} else {
if (toppings.checked) totalToppings++
}

if (totalToppings == 0) {
confirm("Are you sure you don't want any toppings on your 
sundae?");
} else if (totalToppings>  3) {
alert("Wow! That's a lot of toppings!");
} else if (totalToppings == 1) {
alert("You only want one topping.");
} else {
alert("You have selected " + totalToppings + " toppings! 
Yummy!");
}
}






Toppings
  sprinkles
  nuts
  fudge
  caramel
  strawberries








The above form, if submitted, could build a perfectly valid query
string of 
"?toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries".

In the grand scheme of things, these are just subtleties that can
easily be handled. Since my first major experience with a web language
was PHP (after a very brief dabble in PERL) before I took a turn at
ASP/VBScript, I'm used to it and it isn't a "hang-up" for me. But
something about it never seemed quite "right" to me either. :-)

Andrew


Andrew captured perfectly what I meant.

"?toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries" 
is a valid querystring that php sort of fail at understanding.


I have nothing against supplying a string/array clarification system 
based on the name with/without the square brackets, but short of 
manually parsing the querystring/request headers, I have no alternative 
to that.


Also my original problem came when I had to parse the results of a form 
I did NOT originally create, not to mention forms from external sources...


I don't hate PHP and I don't want to throw off people who like the [] 
system, just give me an alternative with a small overhead. :P


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



Re: [PHP] Re: Parsing of forms

2009-05-20 Thread Daniele Grillenzoni

On 20/05/2009 2.45, Nathan Rixham wrote:

Daniele Grillenzoni wrote:

On 19/05/2009 18.09, Andrew Ballard wrote:

On Tue, May 19, 2009 at 10:11 AM, Ford, Mike
wrote:

On 19 May 2009 14:37, Daniele Grillenzoni advised:



My complaint is this: a I can have a select multiple with a
normal name,
which is allowed by every spec, but PHP requires me to use []
in order
to properly retrieve the values.


I really don't understand the problem with this -- in fact, I find it
quite useful to distinguish inputs which may have only 1 value from
those which may be multi-valued. And it all depends on what you mean by
a "normal" name, of course -- no current (X)HTML spec disallows [] as
part of a name attribute, so in that sense a name containing them could
be seen as perfectly normal...!! ;) ;)

Can you explain why this is such a hang-up for you, as I haven't seen
anything in what you've posted so far to convince me it's any kind of
problem?

Cheers!

Mike



I can't speak for the OP, but I've always thought it somewhat odd. An
HTML form should be able to work correctly without modification
regardless of the language that receives the input. As it is, it makes
the HTML for a form implementation specific. You might be able to use
ASP correctly process a form originally targeted toward PHP, but you
could not similarly take a form designed for ASP and process it with
PHP without modification.

It also impacts the use of client-side JavaScript. Consider a simple
page like this:

sundae.html
==



function countToppings() {
var totalToppings = 0;

var toppings = document.sundae.toppings;
// To work with PHP, the above line would have to be changed:
// var toppings = document.sundae.elements['toppings[]'];

if (toppings.length> 1) {
for (var i = 0; i< toppings.length; i++) {
if (toppings[i].checked) totalToppings++;
}
} else {
if (toppings.checked) totalToppings++
}

if (totalToppings == 0) {
confirm("Are you sure you don't want any toppings on your sundae?");
} else if (totalToppings> 3) {
alert("Wow! That's a lot of toppings!");
} else if (totalToppings == 1) {
alert("You only want one topping.");
} else {
alert("You have selected " + totalToppings + " toppings! Yummy!");
}
}






Toppings
 sprinkles
 nuts
 fudge
 caramel
 strawberries








The above form, if submitted, could build a perfectly valid query
string of
"?toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries".


In the grand scheme of things, these are just subtleties that can
easily be handled. Since my first major experience with a web language
was PHP (after a very brief dabble in PERL) before I took a turn at
ASP/VBScript, I'm used to it and it isn't a "hang-up" for me. But
something about it never seemed quite "right" to me either. :-)

Andrew


Andrew captured perfectly what I meant.

"?toppings=sprinkles&toppings=nuts&toppings=fudge&toppings=caramel&toppings=strawberries"
is a valid querystring that php sort of fail at understanding.

I have nothing against supplying a string/array clarification system
based on the name with/without the square brackets, but short of
manually parsing the querystring/request headers, I have no
alternative to that.

Also my original problem came when I had to parse the results of a
form I did NOT originally create, not to mention forms from external
sources...

I don't hate PHP and I don't want to throw off people who like the []
system, just give me an alternative with a small overhead. :P


quick work around :) (could be improved)

 $pair ) {
$pair = explode( '=' , $pair , 2 );
if( !isset( $newGet[$pair[0]] ) ) {
$newGet[$pair[0]] = $pair[1];
} else {
if( !is_array($newGet[$pair[0]]) ) {
$newGet[$pair[0]] = array( $newGet[$pair[0]] );
}
$newGet[$pair[0]][] = $pair[1];
}
}
$_GET = $newGet;
}


print_r( $_GET );
fixGet();
print_r( $_GET );

?>

outputs:

Array
(
[toppings] => caramel
[order] => Order
)
Array
(
[toppings] => Array
(
[0] => nuts
[1] => fudge
[2] => caramel
)

[order] => Order
)


Yeah, and php://input should be able to handle $_POST, but custom 
functions ftl, the idea of having useless overhead for simple stuff like 
this makes me angry.


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



Re: [PHP] Re: Parsing of forms

2009-05-20 Thread Daniele Grillenzoni

On 20/05/2009 12.50, Ford, Mike wrote:

Humph! Yes, ok, I concede this point. I also bow to Daniele's need to
process forms designed by someone else with (not-PHP) in mind. Actually,
I can see the validity of both sides of the argument, and I teeter on
the fence as to whether  the [] method is "right" or not!! ;)



Teeter not, as I am not pushing for a retool of how $_POST and $_GET 
work, just maybe a new core function/global array that gets me the 
"pure" alternative.


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



[PHP] Re: -less layouts; Ideas welcome

2009-05-21 Thread Daniele Grillenzoni

On 21/05/2009 10.02, Jim Lucas wrote:

Since this has been a topic of dicussion, I figured I would add my
thoughts.

I have been toying with the idea of doing a -less layouts
involving tabular data, calendars, etc...

Recent threads have finally made me do it. Let me know what you think.

http://www.cmsws.com/examples/templates/div_tables.php
http://www.cmsws.com/examples/templates/div_tables.phps (source for above)
http://www.cmsws.com/examples/templates/div_cal.php

When you turn off the styles, the calendar becomes pretty rough on the
eyes, but still "accessible".

Same thing with the tabular data structure.

But, not knowing how the various types of accessibility applications
work, I am guessing that the layout to an application trying to read it
should work fairly well. Let me know if I am way off the mark with my
thoughts.

If you want to respond off list, that if fine by me.

TIA

Table-less html is a silly idea. Semantic html where tables represent 
tables makes sense instead. A calendar IS a table, semantically 
speaking, so emulating it with css-p is useless torture.


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



[PHP] Re: Forms validation and creation- easier solution?

2009-05-21 Thread Daniele Grillenzoni

On 20/05/2009 9.03, Angelo Zanetti wrote:

Hi all.



We have done quite a few projects and we are looking to find better ways to
implementing forms.



Forms seem to be quite time consuming and repetitive.



Generally are there any classes or libraries that will assist with:



1.  Easy creation of forms (fields and layout)

2. Validation of specific fields within the forms (server side not JS)

3. Decrease in time required to setup the forms pages

any other comments are welcome.



Thanks in advance

Angelo


Elemental
http://www.elemental.co.za

Dynamic Web and Mobile Solutions








Personally I created a little Class that handles it.

First I create an array of associative arrays, every associative array 
represents an input of an abstract type (similar to the webforms, 
meaning i have stuff like type="telephone").


Stuff like
$inputs[]=array(
"name" => "foobar",
"required" => true,
"type" => "string",   // text is reserved to textarea
"label" => "Foo Bar",
"error_required" => "you need to provide a Foo Bar value, dummy",
"group" => "main"
);
etc.

Then I create an array for groups.
$group["main"] = array(
	"type" = "block", // types are either block which means div, set 
which means fieldset, paragraph which means  or a raw html opening tag.
	"parent" = NULL		//optional of course, if set to the name of another 
group, then the group becomes a child of the referenced group.

)

Then I create an associative array of options for the form.
Finally, I call the class constructor with the three arrays as params.

The class provides me with a few nifty functions:
* toHtml();
(do I need to explain?)
* toArray();
	Returns the inputs, options, and groups inside a single array, with the 
value altered when necessary

* wasSubmitted();
	Does some guesswork to see if the form was submitted, there's a lot of 
smart automagicness inside.

* runAutoChecks();
	Runs the checks he can, like the validity of emails in 'type' = 'email' 
inputs, pattern validation for input with a set pattern, required 
inputs, fills the error array with error messages, sets class[]='error' 
to wrongly filled inputs...

* wasValidInput();
	Returns true if none of the autochecks or eventual manual checks 
returned an error.


And it works like this:
[...]
if ($form->wasSubmitted()){
$form->runAutoChecks();
/* Additional non-automatable controls */
// None in this case
if ($form->wasValidInput()){
// success, do stuff
} else {
// show errors and form again
}
} else {
echo $form->toHtml();
}

There are other things I didn't list, like the fact that ever input has 
options to specify a wrapper (class and id are associated to the wrapper 
if it's defined), the form encoding automatically changes in case of a 
file input, etc etc etc...


The types are abstracted enough that one could easily make a function 
that automatically creates the code for a first draft of the forum out 
of the db schema of an eventual table. Of course you'd have to provide 
error messages, remove unnecessary inputs, adding new ones...


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



[PHP] adding objects to $SESSION with serialize()

2011-03-23 Thread Daniele Capuano
Hi,
I'm developing a web application using moodle, and I'm trying to create a
PHP object tree to be used in $SESSION. Objects are defined as

class foo {
 private $module_name;
 private $sub_modules = array();
}

I have a main module (object) and I use the following function to add
serialized sub modules to such object:

public function add_sub_module(&$mod) {
   $name = $mod->get_mod_name();
   $this->sub_modules[$name] = serialize(&$mod);
}

where the get_mod_name() function simply returns the $module_name private
field. After adding a sub module to the main module, I always update the
main module in $SESSION using serialize($main_module).
Once returned to the page, i restore the main module with
unserialize($SESSION->$main_module_name), and then I call the following
function to retrieve a sub module:

public function &search_sub_module($name='') {;
   foreach($this->sub_modules as $mod_name => $mod) {
  if ($name == $mod_name) {
 return unserialize($mod);
  }

  $obj_mod_file = $mod_name.".php";
  require_once($obj_mod_file);

  $obj_mod = unserialize($mod);
  $modr =& $obj_mod->search_sub_module($name);
  if ($modr != NULL) {
  return $modr;
  }
   }
   return NULL;
}

I found that sub_modules added to the main_module->sub_modules list are
correctly retrieved, but if I add a sub module to a main_module's sub
module, it cannot be get after the main module has been serialized. What do
I mistake?
Please help.

Thanks

Daniele


[PHP] Error handling, apache and ErrorDocument

2008-07-10 Thread Daniele Grillenzoni
Hi, I'm having trouble with a framework I'm developing, apparently when a 
non-catchable error occurs (E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, 
E_COMPILE_ERROR, E_COMPILE_WARNING types) not only I can't fire up my error 
handling function, I can't even display the static html page I set with the 
ErrorDocument apache directive. What's weird is that it doesn't look like an 
apache problem, with perl it works perfectly.


This guy had the same problem as me, check his post (point 3 mostly): 
http://www.entropy.ch/blog/Developer/2007/05/10/Apache-ErrorDocument-PHP-header-interaction.html


Thanks in advance

Daniele Grillenzoni 



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



[PHP] how to know referral function

2005-07-27 Thread Daniele Palumbo
hi.

i have a p_debug(), that print out some useful information (for me).

it is called by a lot of my functions, and i want to know which one is 
generating the error.
the referral function :)

no, i don't want to write in all call to p_debug some information on running 
function...

thanks
daniele

-- 
PGP Key-ID: 0xF482D454
--
To boldly go where no man has gone before.

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



Re: [PHP] chown function

2005-10-14 Thread Daniele Palumbo
Alle 17:25, giovedì 13 ottobre 2005, John Nichel ha scritto:
> nobody:nobody.

nobody:nonexistant (random number abs() really high), at least for apache2.

my personal suggestion is:
- chown all files (avoid suid) and dir root
- chgrp apache all files and dir
- chmod 750 all dir, 640 all files
- chmod 640, chown apache all files that apache or php need to modify.

HTH,
d.

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