Re: [PHP] Where to learn about these topics

2004-11-21 Thread Rens Admiraal
Hi,
I don't have any documentation you can use I think, but I have some 
comments on what you say...

By part 1 you say:
how do I handle
the workflow when the data in related tables doesn't yet exist? Do I
force a user to enter data into 5 different forms first? Do I have a
place to enter the new data on the main form? Do I create temporary
records as part of a step-by-step process?
Step by step answer:
   * In MySQL I would say... If you have data which has to be inserted
 in serveral tables, you must first check if all conditions are ok.
 So, do some selects to check if everythin in your database is ok,
 and after that, execute the query. But, when you really want to
 make complex database driven applications, choose PostgreSQL! This
 database is better build for complexity (and not only that ;) ),
 and supports transactions and references, and more stuff like that
 which can be really helpful to you... And when you compare MySQL
 against PostgreSQL... PostgreSQL is a heavy system compared with
 MySQL, also free, but when you look at the functionality: SUPERIOR
   * Never force a user to enter data into 5 forms if you can do it
 with 1!!! That won't give you a usable application in which users
 think: "Yeah, this is really great to use"
   * I don't see what you mean with entering data on the main form,
 but, read my previous tip again :)
   * Use variables to store all data, you can do this with sessions,
 cookies, $_POST, whatever... But only execute your queries when
 you have all data you want... That will really keep your script
 clear, and you will earn more style points :-)
By point 2 you allmost ask me to refer to PostgreSQL... And, in PHP you 
don't have to place the whole query on 1 rule... use that... This is 
what I mean:

$query = " SELECT * FROM table1, table2 WHERE table1.id = table2.id AND 
table1.value = 'value' OR table2.value = '' ORDER BY table1.name ";

is less readable than:
$query = " SELECT * FROM table1, table2
WHERE table1.id = table2.id
   AND table1.value = 'value'
   OR table.value = ''
ORDER BY table1.name   ";
I hope this helps you :)
Greetz

Chris Lott wrote:
Where can I learn topics such as:
1) Examples of complex PHP applications entering data into complex
related table structures. For instance, if I am writing an application
to create a class catalog that has 5 related tables, how do I handle
the workflow when the data in related tables doesn't yet exist? Do I
force a user to enter data into 5 different forms first? Do I have a
place to enter the new data on the main form? Do I create temporary
records as part of a step-by-step process?
2) Complex display with database results-- particularly when working
with many joined tables, displaying results effectively for reporting
(show me all departments, within that all classes, within that who is
teaching, sorted by department). The queries aren't hard, but if
optimized into one big query the constructs for displaying seem to get
ugly. For instance, given a query that gives me these results as
$result (joined together from three tables):
+-+--+--+---+---+
| first   | last | relation | city  | state |
+-+--+--+---+---+
| Chris   | Beks | business | Fairbanks | AK|
| Robert  | Hannon   | friend   | Fairbanks | AK|
| Cindy   | Lott | family   | Fresno| CA|
| Derryl  | Hartz| business | Seattle   | WA|
| Kirsten | O'Malley | friend   | Seattle   | WA|
+-+--+--+---+---+
It seems like there must be a more efficient way to get a listing of
each city and who lives there than:
$currentcity = '';
$counter = 1;
while ($thisrow = mysql_fetch_array($result))
{
if ($currentcity <> $thisrow['city'])
{
if ($counter > 1)
{
echo '';
}
echo '' . $thisrow['city'] . '';
echo '';
$currentcity = $thisrow['city'];
}
echo $thisrow['first'] . ' ' . $thisrow['last'] . '';
$counter++;
}
Although this is preferable to running separate queries:
$query = 'select lid, city, state from locations order by city, state';
$result = mysql_query($query) or die('Couldn\'t perform the query: ' . $query); 

while ($thisrow = mysql_fetch_array($result))
{
echo '' . $thisrow['city'] . ', ' . $thisrow['state'] . '';
echo '';
$pquery = "select first, last from people where lid =
{$thisrow['lid']} order by last, first";
$presult = mysql_query($pquery) or die('Couldn\'t perform the query:
' . $query);
while ($prow = mysql_fetch_array($presult))
{
echo $prow['first'] . ' ' . $prow['last'] . '';
 

Re: [PHP] PHP script + read file

2004-11-21 Thread Jerry Swanson
What is wrong with this code? Why $input_str is empty.

if ($handle = opendir('/home/test2/')) {
   echo "Directory handle: $handle\n";
   echo "Files:\n";

   while (false !== ($file = readdir($handle))) {
if($file != "." && $file != ".."){
 $handle1 = fopen($file, "a+");
 $input_str = fread($handle1, filesize($file));
 echo "TEST".$input_str;
 }
   }

}



On Sun, 21 Nov 2004 05:40:07 +0800, Jason Wong <[EMAIL PROTECTED]> wrote:
> On Sunday 21 November 2004 05:11, Jerry Swanson wrote:
> 
> 
> > I know how to read a file. But the problem is different, I have
> > directory that has more than 250 files. I need to read each file and
> > process it. But How I know what file to read?
> > ls -l (show all files). How I can select each file without knowing
> > name? The file will be process and than delete.
> 
> To get list of files from directory:
>   manual > Directory Functions
> 
> To open/read/write/delete files:
>   manual > Filesystem Functions
> 
> There are plenty of examples in the manual and in the user notes of the online
> manual.
> 
> --
> 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
> --
> /*
> Do not try to solve all life's problems at once -- learn to dread each
> day as it comes.
>   -- Donald Kaul
> */
> 
> 
> 
> --
> 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] PHP script + read file

2004-11-21 Thread Jason Wong
On Sunday 21 November 2004 20:25, Jerry Swanson wrote:

Please do not top post.

> What is wrong with this code? Why $input_str is empty.
>
> if ($handle = opendir('/home/test2/')) {
>echo "Directory handle: $handle\n";
>echo "Files:\n";
>
>while (false !== ($file = readdir($handle))) {
> if($file != "." && $file != ".."){
>  $handle1 = fopen($file, "a+");
>  $input_str = fread($handle1, filesize($file));
>  echo "TEST".$input_str;
>  }
>}
>
> }

The $file that you're trying to open is in the directory '/home/test2/', as 
your working directory is not the same (getcwd()) you would have to specify 
the full path to $file, ie prepend '/home/test2/'. You would have been able 
to deduce this yourself had you looked at the php error log. Always develop 
with:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);

-- 
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
--
/*
 If I start writing essays about Free Software for slashdot,
   please shoot me.
*/

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



[PHP] help with html through php

2004-11-21 Thread Todd Alexander
Hello all,
I am a complete newbie to php so apologies for what I'm sure is a
simple/dumb question.  I want to use php to include another html doc in
an existing set of documents.  In other words "123.html" will use php to
call on "abc.html" so I can make changes to abc.html and have it update
on all my pages.   
 
Again I realize this is a complete newbie question but I appreciate any
help you have.
 
Todd


Re: [PHP] help with html through php

2004-11-21 Thread Raditha Dissanayake
Todd Alexander wrote:
Hello all,
I am a complete newbie to php so apologies for what I'm sure is a
simple/dumb question.  I want to use php to include another html doc in
an existing set of documents.  In other words "123.html" will use php to
call on "abc.html" so I can make changes to abc.html and have it update
on all my pages.   
 

You have struck upon a pretty standard technique you will need to look 
at the include() or require() functions to persue this further. There is 
a subtle difference between the two but when you are getting started the 
difference does not really matter all that much. On most webservers you 
will need to name your 123 file not as 123.html but as 123.php or 
123.phtml abc.html can continue to be abc.html

Again I realize this is a complete newbie question but I appreciate any
help you have.
Todd
 

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


[PHP] Crypt Function-- Encryption and Decryption

2004-11-21 Thread Mulley, Nikhil
Hi All,

 

I have a password file , which has all the passwords words encrypted with the 
Crypt Function

I know that Crypt uses one-way algorithm to generate the encryptions and PHP 
has no Decrypt function , ( but can it be developed to have one ?)

But I am eager to know whether it is really impossible to decrypt the passwords 
, if possible , how it caqn be done. like salts and all

Can somebody *please* throw more light on Crypt() and Encryption and Decryption 
in this thread.

Thanks,

Nikhil



Re: [PHP] images process

2004-11-21 Thread edwardspl
Yes, I need a sample ( display images with php directly from database )
for reference...
So, can you help me ?

Many thank for your help !

Raditha Dissanayake wrote:

> [EMAIL PROTECTED] wrote:
>
> >So, how can we fix this kind of problem ?
> >
> >
> is it a problem?
>
> >Raditha Dissanayake wrote:
> >
> >
> >
> >>[EMAIL PROTECTED] wrote:
> >>
> >>
> >>
> >>>Dear You,
> >>>
> >>>How to load images ( eg: gif, jpg) with base64 function from
> >>>Database on IE directly ?
> >>>
> >>>
> >>>
> >>>
> >>as far as I know you cannot do this with IE directly.
> >>
> >>
> >>
> >>>Is there any samples to me for reference ?
> >>>
> >>>Many thank for your help !
> >>>
> >>>Ed.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>--
> >>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



Re: [PHP] Crypt Function-- Encryption and Decryption

2004-11-21 Thread Jon-EIrik Pettersen
Mulley, Nikhil wrote:
Hi All,

I have a password file , which has all the passwords words encrypted with the 
Crypt Function
I know that Crypt uses one-way algorithm to generate the encryptions and PHP 
has no Decrypt function , ( but can it be developed to have one ?)
But I am eager to know whether it is really impossible to decrypt the passwords 
, if possible , how it caqn be done. like salts and all
Can somebody *please* throw more light on Crypt() and Encryption and Decryption 
in this thread.
Thanks,
Nikhil
 

As far as I know the standard crypto-methots used in
crypt() is one-way-hashing. The data used when encrypting
is lost, the encrypted data is generated using this data. There
is no other methods to get these data back other than
brute-forcing (guess, encrypt with the same algorithm and compare)
but it may take months/years depending on the size of the orginal
data.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Crypt Function-- Encryption and Decryption

2004-11-21 Thread Rens Admiraal
What would be the use of a hash if it was easy to recover ?
You can use it by storing the hash of a password, en when the user 
supplies you his password in a script, you hash it again... and compare 
those two hashes...
Trying to recover the value from which the hash is the result is called 
cracking, and no programming!

Jon-EIrik Pettersen wrote:
Mulley, Nikhil wrote:
Hi All,

I have a password file , which has all the passwords words encrypted 
with the Crypt Function

I know that Crypt uses one-way algorithm to generate the encryptions 
and PHP has no Decrypt function , ( but can it be developed to have 
one ?)

But I am eager to know whether it is really impossible to decrypt the 
passwords , if possible , how it caqn be done. like salts and all

Can somebody *please* throw more light on Crypt() and Encryption and 
Decryption in this thread.

Thanks,
Nikhil
 

As far as I know the standard crypto-methots used in
crypt() is one-way-hashing. The data used when encrypting
is lost, the encrypted data is generated using this data. There
is no other methods to get these data back other than
brute-forcing (guess, encrypt with the same algorithm and compare)
but it may take months/years depending on the size of the orginal
data.


Re: [PHP] help with html through php

2004-11-21 Thread Rens Admiraal
Hi Todd,
Maybe I can show you a technique which is real helpful to me...
You can make a HTML file which you use as template, and add some 
standard strings (character chains) to it... Like [TIME], or 
[ACTIVE_USER]... When you open the HTML document in your browser, you 
can see where your time and active user have to appear. All you now have 
to do is find a way to replace those strings... When I hear the words 
replace and strings together I have to think about the str_replace() 
function... But, str_replace needs a string as haysteck, so you have to 
get the source of your HTML in a string... How to do that?

That's easy... You can read a file line for line with the file() 
function, this returns an array... but, an array isn't what you want, 
you want 1 string... so you use the implode() function to make it 1 string
This string you can use as haysteck, and echo it later...

I think it may be a little much info, so, here an example:
*template.html
*
   
  [TITLE]
   
   
  [BODY]
   

*script.php*

   $template_string = implode(" ", file ("template.html") );
   $template_string = str_replace ("[TITLE]", "This is a script using 
templates", $template_string);
   $template_string = str_replace ("[BODY]", "Body text", 
$template_string);
   echo $template_string;
?>

The shorter way for Script.php if you have amny strings to replace is:
 "this is a script using templates",
  "[BODY]"  => "Body text");
   foreach ($replaces as $string => $value)
   {
  $template_string = str_replace ($string, $value, $string_template);
   }
   echo $template_string;
?>
Raditha Dissanayake wrote:
Todd Alexander wrote:
Hello all,
I am a complete newbie to php so apologies for what I'm sure is a
simple/dumb question.  I want to use php to include another html doc in
an existing set of documents.  In other words "123.html" will use php to
call on "abc.html" so I can make changes to abc.html and have it update
on all my pages.

You have struck upon a pretty standard technique you will need to look 
at the include() or require() functions to persue this further. There 
is a subtle difference between the two but when you are getting 
started the difference does not really matter all that much. On most 
webservers you will need to name your 123 file not as 123.html but as 
123.php or 123.phtml abc.html can continue to be abc.html

Again I realize this is a complete newbie question but I appreciate any
help you have.
Todd
 




Re: [PHP] Crypt Function-- Encryption and Decryption

2004-11-21 Thread Rens Admiraal

Mulley, Nikhil wrote:
Hi Rens,
Can you please be more specific or can you show some  practical  
examples or procedural way ?
 
 
Thanks,
Nikhil
 
--Smile Always , it costs nothing

-Original Message-
*From:* Rens Admiraal [mailto:[EMAIL PROTECTED]
*Sent:* Sunday, November 21, 2004 8:52 PM
*To:* [EMAIL PROTECTED]
*Cc:* Mulley, Nikhil; [EMAIL PROTECTED]
*Subject:* Re: [PHP] Crypt Function-- Encryption and Decryption
What would be the use of a hash if it was easy to recover ?
You can use it by storing the hash of a password, en when the user
supplies you his password in a script, you hash it again... and
compare those two hashes...
Trying to recover the value from which the hash is the result is
called cracking, and no programming!
Jon-EIrik Pettersen wrote:
Mulley, Nikhil wrote:
Hi All,

I have a password file , which has all the passwords words
encrypted with the Crypt Function
I know that Crypt uses one-way algorithm to generate the
encryptions and PHP has no Decrypt function , ( but can it be
developed to have one ?)
But I am eager to know whether it is really impossible to
decrypt the passwords , if possible , how it caqn be done. like
salts and all
Can somebody *please* throw more light on Crypt() and Encryption
and Decryption in this thread.
Thanks,
Nikhil
 

As far as I know the standard crypto-methots used in
crypt() is one-way-hashing. The data used when encrypting
is lost, the encrypted data is generated using this data. There
is no other methods to get these data back other than
brute-forcing (guess, encrypt with the same algorithm and compare)
but it may take months/years depending on the size of the orginal
data.


Re: [PHP] help with html through php

2004-11-21 Thread M. Sokolewicz
Rens Admiraal wrote:
Hi Todd,
Maybe I can show you a technique which is real helpful to me...
You can make a HTML file which you use as template, and add some 
standard strings (character chains) to it... Like [TIME], or 
[ACTIVE_USER]... When you open the HTML document in your browser, you 
can see where your time and active user have to appear. All you now have 
to do is find a way to replace those strings... When I hear the words 
replace and strings together I have to think about the str_replace() 
function... But, str_replace needs a string as haysteck, so you have to 
get the source of your HTML in a string... How to do that?

That's easy... You can read a file line for line with the file() 
function, this returns an array... but, an array isn't what you want, 
you want 1 string... so you use the implode() function to make it 1 string
This string you can use as haysteck, and echo it later...

I think it may be a little much info, so, here an example:
*template.html
*
   
  [TITLE]
   
   
  [BODY]
   

*script.php*

   $template_string = implode(" ", file ("template.html") );
   $template_string = str_replace ("[TITLE]", "This is a script using 
templates", $template_string);
   $template_string = str_replace ("[BODY]", "Body text", 
$template_string);
   echo $template_string;
?>

The shorter way for Script.php if you have amny strings to replace is:
 "this is a script using templates",
  "[BODY]"  => "Body text");
   foreach ($replaces as $string => $value)
   {
  $template_string = str_replace ($string, $value, $string_template);
   }
   echo $template_string;
?>
easier/shorter would be:

$template_string = implode("\n", file('template.file'));
$replaces = array('[TITLE]'=>'a title', '[BODY]'=>'something else');
echo str_replace(array_keys($replaces), array_values($replaces), 
$template_string); // (array_values() isn't really required here)
?>
Raditha Dissanayake wrote:
Todd Alexander wrote:
Hello all,
I am a complete newbie to php so apologies for what I'm sure is a
simple/dumb question.  I want to use php to include another html doc in
an existing set of documents.  In other words "123.html" will use php to
call on "abc.html" so I can make changes to abc.html and have it update
on all my pages.   
You have struck upon a pretty standard technique you will need to look 
at the include() or require() functions to persue this further. There 
is a subtle difference between the two but when you are getting 
started the difference does not really matter all that much. On most 
webservers you will need to name your 123 file not as 123.html but as 
123.php or 123.phtml abc.html can continue to be abc.html

Again I realize this is a complete newbie question but I appreciate any
help you have.
Todd
 



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


Re: [PHP] help with html through php

2004-11-21 Thread Pete
In message <[EMAIL PROTECTED]>, Raditha Dissanayake
<[EMAIL PROTECTED]> writes
>Todd Alexander wrote:
>
>>Hello all,
>>I am a complete newbie to php so apologies for what I'm sure is a
>>simple/dumb question.  I want to use php to include another html doc in
>>an existing set of documents.  In other words "123.html" will use php to
>>call on "abc.html" so I can make changes to abc.html and have it update
>>on all my pages.   
>>  
>>
>You have struck upon a pretty standard technique you will need to look 
>at the include() or require() functions to persue this further. There is 
>a subtle difference between the two but when you are getting started the 
>difference does not really matter all that much. On most webservers you 
>will need to name your 123 file not as 123.html but as 123.php or 
>123.phtml abc.html can continue to be abc.html
>
>> 
>>Again I realize this is a complete newbie question but I appreciate any
>>help you have.
>> 
>>Todd

A further point (since you are newbie ) is to remember that abc.html
will not normally be a complete page on it's own - it will only have the
parts of the final page that you actually want to include, not all the
...  stuff...

-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com

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



Re: [PHP] help with html through php

2004-11-21 Thread Rens Admiraal
thnx ;-)
this really is shorter, and easier to use... !!!
M. Sokolewicz wrote:
Rens Admiraal wrote:
Hi Todd,
Maybe I can show you a technique which is real helpful to me...
You can make a HTML file which you use as template, and add some 
standard strings (character chains) to it... Like [TIME], or 
[ACTIVE_USER]... When you open the HTML document in your browser, you 
can see where your time and active user have to appear. All you now 
have to do is find a way to replace those strings... When I hear the 
words replace and strings together I have to think about the 
str_replace() function... But, str_replace needs a string as 
haysteck, so you have to get the source of your HTML in a string... 
How to do that?

That's easy... You can read a file line for line with the file() 
function, this returns an array... but, an array isn't what you want, 
you want 1 string... so you use the implode() function to make it 1 
string
This string you can use as haysteck, and echo it later...

I think it may be a little much info, so, here an example:
*template.html
*
   
  [TITLE]
   
   
  [BODY]
   

*script.php*

   $template_string = implode(" ", file ("template.html") );
   $template_string = str_replace ("[TITLE]", "This is a script using 
templates", $template_string);
   $template_string = str_replace ("[BODY]", "Body text", 
$template_string);
   echo $template_string;
?>

The shorter way for Script.php if you have amny strings to replace is:

   $template_string = implode(" ", file ("template.html") );
   $replaces = array ("[TITLE]"  => "this is a script using 
templates",
  "[BODY]"  => "Body text");
   foreach ($replaces as $string => $value)
   {
  $template_string = str_replace ($string, $value, 
$string_template);
   }

   echo $template_string;
?>
easier/shorter would be:

$template_string = implode("\n", file('template.file'));
$replaces = array('[TITLE]'=>'a title', '[BODY]'=>'something else');
echo str_replace(array_keys($replaces), array_values($replaces), 
$template_string); // (array_values() isn't really required here)
?>

Raditha Dissanayake wrote:
Todd Alexander wrote:
Hello all,
I am a complete newbie to php so apologies for what I'm sure is a
simple/dumb question.  I want to use php to include another html 
doc in
an existing set of documents.  In other words "123.html" will use 
php to
call on "abc.html" so I can make changes to abc.html and have it 
update
on all my pages.   

You have struck upon a pretty standard technique you will need to 
look at the include() or require() functions to persue this further. 
There is a subtle difference between the two but when you are 
getting started the difference does not really matter all that much. 
On most webservers you will need to name your 123 file not as 
123.html but as 123.php or 123.phtml abc.html can continue to be 
abc.html

Again I realize this is a complete newbie question but I appreciate 
any
help you have.

Todd
 






[PHP] Mysql Connect Help

2004-11-21 Thread Nathan Mealey
A seemingly simple problem, still confounding me.
The following line of code:
mysql_connect('database','user','password'); [with values of course]
Generates the following error:
Fatal error: Call to undefined function: mysql_connect() in 
/var/www/html/phptest.php on line 3

My PHP info page says that PHP (4.3) was compiled with MySQL, and 
extensions_dir is correct (although the extensions_dir itself is empty, 
but I don't know if this matters).  So PHP itself is working.

I installed MySQL 4.1 from RPM (client and server RPMs) on Redhat 8.0 
this morning.

Thanks for any help,
Nathan
--
Nathan Mealey
Director of Operations
Cycle-Smart, Inc.
P.O. Box 1482
Northampton, MA
01061-1482
[EMAIL PROTECTED]
(413) 587-3133
(413) 210-7984 Mobile
(512) 681-7043 Fax
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] php mail() sendmail hanging freebsd 4.10

2004-11-21 Thread Thomas S. Crum
When hitting php pages that use the mail() function, I get a 5 second hang
in the browser.  The mail is then being delivered fine.

Many of the same scripts that use this mail function ran fine with ½ sec. or
less delay on my old redhat box.

Any ideas how to make it run quicker would be greatly appreciated. I've
included the sendmail.mc and php.ini files below.

Best,
 
Thomas S. Crum

# Sendmail .mc file
divert(-1)
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.10.2.19 2003/12/31
17:42:16 gshapiro Exp $')
OSTYPE(freebsd4)
DOMAIN(generic)

FEATURE(access_db, `hash -o -T /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable') FEATURE(virtusertable,
`hash -o /etc/mail/virtusertable')

FEATURE(use_cw_file)
dnl set SASL options
TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN')dnl
define(`confDEF_AUTH_INFO', `/etc/mail/auth-info')dnl

dnl Uncomment to allow relaying based on your MX records.
dnl NOTE: This can allow sites to use your server as a backup MX without
dnl   your permission.
dnl FEATURE(relay_based_on_MX)

dnl DNS based black hole lists
dnl 
dnl DNS based black hole lists come and go on a regular basis dnl so this
file will not serve as a database of the available servers. dnl For that,
visit dnl
http://directory.google.com/Top/Computers/Internet/Abuse/Spam/Blacklists/

dnl Uncomment to activate Realtime Blackhole List
dnl information available at http://www.mail-abuse.com/
dnl NOTE: This is a subscription service as of July 31, 2001 dnl
FEATURE(dnsbl) dnl Alternatively, you can provide your own server and
rejection message: dnl FEATURE(dnsbl, `blackholes.mail-abuse.org', `"550
Mail from " $&{client_addr} " rejected, see
http://mail-abuse.org/cgi-bin/lookup?"; $&{client_addr}')

dnl Dialup users should uncomment and define this appropriately dnl
define(`SMART_HOST', `your.isp.mail.server')

dnl Uncomment the first line to change the location of the default dnl
/etc/mail/local-host-names and comment out the second line. dnl
define(`confCW_FILE', `-o /etc/mail/sendmail.cw') define(`confCW_FILE', `-o
/etc/mail/local-host-names')

dnl Enable for both IPv4 and IPv6 (optional) DAEMON_OPTIONS(`Name=IPv4,
Family=inet') dnl DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')

define(`confBIND_OPTS', `WorkAroundBroken') define(`confNO_RCPT_ACTION',
`add-to-undisclosed') define(`confPRIVACY_FLAGS',
`authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)

# php.ini

; Language Options ;


; Enable the PHP scripting language engine under Apache.
engine = On

; Allow the  tags are recognized.

; NOTE: Using short tags should be avoided when developing applications or ;
libraries that are meant for redistribution, or deployment on PHP ; servers
which are not under your control, because short tags may not ; be supported
on the target server. For portable, redistributable code, ; be sure not to
use short tags. short_open_tag = On

; Allow ASP-style <% %> tags.
asp_tags = Off

; The number of significant digits displayed in floating point numbers.
precision=  14

; Enforce year 2000 compliance (will cause problems with non-compliant
browsers) y2k_compliance = On

; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit.  You can enable output buffering during runtime by calling the output
; buffering functions.  You can also enable output buffering for all files
by ; setting this directive to On.  If you wish to limit the size of the
buffer ; to a certain size - you can use a maximum number of bytes instead
of 'On', as ; a value for this directive (e.g., output_buffering=4096).
output_buffering = 4096

; You can redirect all of the output of your scripts to a function.  For ;
example, if you set output_handler to "mb_output_handler", character ;
encoding will be transparently converted to the specified encoding. ;
Setting any output handler automatically turns on output buffering. ; Note:
People who wrote portable scripts should not depend on this ini
;   directive. Instead, explicitly set the output handler using
ob_start().
;   Using this ini directive may cause problems unless you know what
script 
;   is doing.
; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
;   and you cannot use both "ob_gzhandler" and
"zlib.output_compression". 
;output_handler =

; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size ;
to be used for compression (default is 4KB) ; Note: Resulting chunk size may
vary due to nature of compression. PHP 
;   outputs chunks that are few handreds bytes each as a result of
compression. 
;   If you want larger chunk size for better performence

[PHP] Redirect or Set Current Directory?

2004-11-21 Thread Paul Furman
I've got a script that lists all the folders on my web space. If the 
folder containes a non-php old web page with an index.htm in it I try to 
include that index.htm but the links inside there do not realize they 
are another folder deep. I've been away from this php stuff for a while 
so am probably missing something stupid. I recall there was something 
tricky about doing a redirect, that way I'd just leave my php template & 
go to the straight index page in that folder which is another option 
except then I'd lose my master header & footer menu items. Here's what 
I'm messing with:

# Check for preformatted INDEX.HTM #
if (file_exists ("index.htm")){
 (chdir ($imagedir));#hmm, this doesn't help?
 $fh=opendir($imagedir);
 include  $imagedir . "/index.htm";
  }
Obviously I don't really know what I'm doing. Any push in the correct 
direction would be appreciated.

This is the page: http://www.edgehill.net/index.php?SCREEN=index.php
if you click on any folder in the list you can see how the links are not 
working properly. This is the bones of a class project that I am working 
on integrating into my professional site. Here;s an example of one of 
the class pages that works: 
http://www.edgehill.net/index.php?SCREEN=ecards.php

the straight domain address takes you to my old html formatted pages:
http://www.edgehill.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Upgrade PHP 4 to 5

2004-11-21 Thread Sandy Keathley
We started a new server at work.  The hosting company was 
supposed to put PHP 5 on it, but did 4 instead.  I would like to 
upgrade it before it goes into service, but the instructions in the 
PHP5 tarball look difficult.  I'm not familiar with the "emerge". The  
server is Linux RH9 with Apache 2.0.

Does anyone know a link to better instructions for this upgrade?

Thanks.

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



[PHP] Re: help with html through php

2004-11-21 Thread Paul Furman
Todd Alexander wrote:
Hello all,
I am a complete newbie to php so apologies for what I'm sure is a
simple/dumb question.  I want to use php to include another html doc in
an existing set of documents.  In other words "123.html" will use php to
call on "abc.html" so I can make changes to abc.html and have it update
on all my pages.   
 
Again I realize this is a complete newbie question but I appreciate any
help you have.
 
Todd


I've asked a similar question this morning & I'm having trouble with 
losing relative paths if the include page is inside another folder.

Anyways, the very most basic answer to your question is simply that 
123.html will have the following code


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


Re: [PHP] Upgrade PHP 4 to 5

2004-11-21 Thread Richard Davey
Hello Sandy,

Sunday, November 21, 2004, 6:37:43 PM, you wrote:

SK> We started a new server at work.  The hosting company was 
SK> supposed to put PHP 5 on it, but did 4 instead.  I would like to 
SK> upgrade it before it goes into service, but the instructions in the
SK> PHP5 tarball look difficult.  I'm not familiar with the "emerge". The
SK> server is Linux RH9 with Apache 2.0.

SK> Does anyone know a link to better instructions for this upgrade?

The ones on the php.net web site are pretty comprehensive. I wouldn't
think of it as an Upgrade either, it's more a replacement - an install
from scratch if you like.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



Re: [PHP] images process

2004-11-21 Thread Paul Furman
You need to set up an apache server & get that running on your windows
machine in order to run php. Then you go thru IE to view the php script
& run it that way.


[EMAIL PROTECTED] wrote:

> Yes, I need a sample ( display images with php directly from database )
> for reference...
> So, can you help me ?
> 
> Many thank for your help !
> 
> Raditha Dissanayake wrote:
> 
> 
>>[EMAIL PROTECTED] wrote:
>>
>>
>>>So, how can we fix this kind of problem ?
>>>
>>>
>>
>>is it a problem?
>>
>>
>>>Raditha Dissanayake wrote:
>>>
>>>
>>>
>>>
[EMAIL PROTECTED] wrote:




>Dear You,
>
>How to load images ( eg: gif, jpg) with base64 function from
>Database on IE directly ?
>
>
>
>

as far as I know you cannot do this with IE directly.




>Is there any samples to me for reference ?
>
>Many thank for your help !
>
>Ed.
>
>
>
>
>

--
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] include files, ".php" or ".inc" ?

2004-11-21 Thread Perry Jönsson
Hello,
Does it make any difference if you include 
(include/require/include_once/require_once) files with extension ".inc" 
or ".php"?

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


Re: [PHP] include files, ".php" or ".inc" ?

2004-11-21 Thread Jon-Eirik Pettersen
Perry Jönsson wrote:
Hello,
Does it make any difference if you include 
(include/require/include_once/require_once) files with extension 
".inc" or ".php"?
No, it does not.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] include files, ".php" or ".inc" ?

2004-11-21 Thread Perry Jönsson
Jon-Eirik Pettersen wrote:
Perry Jönsson wrote:
Hello,
Does it make any difference if you include 
(include/require/include_once/require_once) files with extension 
".inc" or ".php"?

No, it does not.

What it the purpose of the ".inc" file then?
/Perry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Tabs or Spaces?

2004-11-21 Thread Daniel Schierbeck
Hello there!
There seems to be some tendency towards using spaces instead of tabs 
when indenting PHP code - personally i can't come up with any reason not 
to use tabs. I was just wondering if any of you freakees had some sort 
of explanation...

--
Daniel Schierbeck
Help spread Firefox (www.getfirefox.com): 
http://www.spreadfirefox.com/?q=user/register&r=6584

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


Re: [PHP] include files, ".php" or ".inc" ?

2004-11-21 Thread Jon-Eirik Pettersen
Perry Jönsson wrote:
Jon-Eirik Pettersen wrote:
Perry Jönsson wrote:
Hello,
Does it make any difference if you include 
(include/require/include_once/require_once) files with extension 
".inc" or ".php"?

No, it does not.

What it the purpose of the ".inc" file then?
Not really anything. Just to separate the files. A problem when using 
.inc files
is that it is not default parsed when requested directly in the browser, 
so it
may be less secure if it contain SQL-passwords, etc.

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


[PHP] Re: Tabs or Spaces?

2004-11-21 Thread Matthew Weier O'Phinney
* Daniel Schierbeck <[EMAIL PROTECTED]>:
> There seems to be some tendency towards using spaces instead of tabs 
> when indenting PHP code - personally i can't come up with any reason not 
> to use tabs. I was just wondering if any of you freakees had some sort 
> of explanation...

Most likely due to PEAR standards: 

http://pear.sourceforge.net/en/standards.php

I'm not sure what the rationale was behind using spaces instead of tabs,
but it's a standard I've seen in perl as well; it's not entirely unheard
of.

-- 
Matthew Weier O'Phinney   | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org

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



Re: [PHP] Tabs or Spaces?

2004-11-21 Thread Jon-Eirik Pettersen
Daniel Schierbeck wrote:
Hello there!
There seems to be some tendency towards using spaces instead of tabs 
when indenting PHP code - personally i can't come up with any reason 
not to use tabs. I was just wondering if any of you freakees had some 
sort of explanation...

One reason is that a space is a space and will allways be a space. A tab 
may be 5, 3 or whatever spaces depending on the editors configration. 
When more than one developer is developing on a project they will see 
the indenting differently when using tabs.

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


Re: [PHP] Tabs or Spaces?

2004-11-21 Thread M. Sokolewicz
Jon-Eirik Pettersen wrote:
Daniel Schierbeck wrote:
Hello there!
There seems to be some tendency towards using spaces instead of tabs 
when indenting PHP code - personally i can't come up with any reason 
not to use tabs. I was just wondering if any of you freakees had some 
sort of explanation...

One reason is that a space is a space and will allways be a space. A tab 
may be 5, 3 or whatever spaces depending on the editors configration. 
When more than one developer is developing on a project they will see 
the indenting differently when using tabs.
that's indeed usually it. However, remember that both a space and a tab 
are actually only a single character, so if you're looking at the amount 
of space both take, it's exactly the same. However, when indenting with 
3 spaces instead of a single tab, then your code-size WILL increase, and 
will include 3x more "space content" than it used to :)

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


Re: [PHP] Tabs or Spaces?

2004-11-21 Thread Ryan King
On Nov 21, 2004, at 4:30 PM, M. Sokolewicz wrote:
Jon-Eirik Pettersen wrote:
Daniel Schierbeck wrote:
Hello there!
There seems to be some tendency towards using spaces instead of tabs 
when indenting PHP code - personally i can't come up with any reason 
not to use tabs. I was just wondering if any of you freakees had 
some sort of explanation...

One reason is that a space is a space and will allways be a space. A 
tab may be 5, 3 or whatever spaces depending on the editors 
configration. When more than one developer is developing on a project 
they will see the indenting differently when using tabs.
that's indeed usually it. However, remember that both a space and a 
tab are actually only a single character, so if you're looking at the 
amount of space both take, it's exactly the same. However, when 
indenting with 3 spaces instead of a single tab, then your code-size 
WILL increase, and will include 3x more "space content" than it used 
to :)
Who cares?
-ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Tabs or Spaces?

2004-11-21 Thread Ryan King
On Nov 21, 2004, at 3:09 PM, Matthew Weier O'Phinney wrote:
* Daniel Schierbeck <[EMAIL PROTECTED]>:
There seems to be some tendency towards using spaces instead of tabs
when indenting PHP code - personally i can't come up with any reason 
not
to use tabs. I was just wondering if any of you freakees had some sort
of explanation...
Most likely due to PEAR standards:
http://pear.sourceforge.net/en/standards.php
I'm not sure what the rationale was behind using spaces instead of 
tabs,
but it's a standard I've seen in perl as well; it's not entirely 
unheard
I believe the rationale is that, since different environments define 
tabs as different sizes. So, the only way to be consistent across 
different environments is to use spaces. FWIW, many text editors can 
emulate tabs.  That is, when typin, you can hit tab, but the text 
editor inserts spaces instead. I find this very useful.

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


Re: [PHP] images process

2004-11-21 Thread James Cartledge
On Sun, 21 Nov 2004 22:22:52 +0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Yes, I need a sample ( display images with php directly from database )
> for reference...
> So, can you help me ?
> 
> 
> 
> Many thank for your help !
> 

Does this help?

google: php image database

J.

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



Re: [PHP] Tabs or Spaces?

2004-11-21 Thread Chris Shiflett
Four spaces are used by a lot of open source projects, including Apache
and PHP, so I've been trying to convert, myself.

In general, spaces just make it easier to do multi-line formatting with
exact precision, like this:

if ($foo ||
$bar ||
$boo)
{
...
}

If this statement was also nested, you can see where tabs might become a
problem. With tabs, you can always make a habit of indenting any extra
lines one more tab than the original, but that doesn't always line up so
nicely (e.g., $bar may or may not be directly below $foo). You can also
simply repeat the same number of tabs then switch to spaces for the
alignment:

if ($foo ||
$bar ||
$boo))
{

But that just gets ugly. :-)

If you ever have a difference of more than a single tab, the alignment can
look radically different, so this should never be used, even if it makes
things look nice with your personal tab settings. In general, any
formatting that depends upon tab settings is going to look really ugly
somewhere.

Tabs are convenient, because they're a single character. You can backspace
to quickly remove an indentation, and a single keystroke can be used to
add an indentation. However, I've learned that a few simple editor
settings combined with some adjustments to my editing habits can overcome
these slight inconveniences. When I hit the tab key, four spaces appear,
and I can use vertical selections to unindent things quickly regardless of
whether the indentations use spaces or tabs. I bet some people have their
editors configured to remove four spaces when you backspace, assuming the
four characters to the left of the cursor are all spaces. If anyone has
done this for vim, please share. :-)

Anyway, those are some random thoughts from someone in the middle of
converting from tabs to spaces. I've basically decided to switch for two
reasons: improved precision over formatting and consistency with other
major open source projects. This doesn't mean spaces are best for
everyone, but that's my reasoning.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming February 2005http://httphandbook.org/

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



Re: [PHP] include files, ".php" or ".inc" ?

2004-11-21 Thread Janet Valade
Perry Jönsson wrote:
Jon-Eirik Pettersen wrote:
Perry Jönsson wrote:
Hello,
Does it make any difference if you include 
(include/require/include_once/require_once) files with extension 
".inc" or ".php"?

No, it does not.

What it the purpose of the ".inc" file then?
For organization. The file name shows what the file is, without having 
to look at the contents of any scripts.

Janet
/Perry

--
Janet Valade -- janet.valade.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Tabs or Spaces?

2004-11-21 Thread Chris Shiflett
--- Ryan King <[EMAIL PROTECTED]> wrote:
> > However, when indenting with 3 spaces instead of a single tab,
> > then your code-size WILL increase, and will include 3x more
> > "space content" than it used to :)
>
> Who cares?

Just to point out the obvious, if you're not using a compiler cache, size
does matter. Of course, if you're to the point where the difference is
important to you, you're to the point where you should figure out how to
use APC or something. :-)

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming February 2005http://httphandbook.org/

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



Re: [PHP] Tabs or Spaces?

2004-11-21 Thread M. Sokolewicz
Chris Shiflett wrote:
--- Ryan King <[EMAIL PROTECTED]> wrote:
However, when indenting with 3 spaces instead of a single tab,
then your code-size WILL increase, and will include 3x more
"space content" than it used to :)
Who cares?

Just to point out the obvious, if you're not using a compiler cache, size
does matter. Of course, if you're to the point where the difference is
important to you, you're to the point where you should figure out how to
use APC or something. :-)
Chris
=
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming February 2005http://httphandbook.org/
true ;)
just wanted to share it though
(and yes, I too use 4 spaces)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How to change mail defaults?

2004-11-21 Thread Mailit, LLC
In php.ini we have the ability to set sendmail_from only for Windows. It 
is unfair, because it does not work
for Linux. When I broadcast, the From defaults to 'Apache' and people 
have complained about that.
Another thing that is causing trouble is that uploaded file ownership 
defaults to apache.apache, and I could not
find a way to change ownership and permissions for uploaded files.
Did anybody in this list solve these problems? Thank you
Mario Miyojim

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


Re: [PHP] Mysql Connect Help

2004-11-21 Thread John Holmes
Nathan Mealey wrote:
The following line of code:
mysql_connect('database','user','password'); [with values of course]
Generates the following error:
Fatal error: Call to undefined function: mysql_connect() in 
/var/www/html/phptest.php on line 3

My PHP info page says that PHP (4.3) was compiled with MySQL, and 
extensions_dir is correct (although the extensions_dir itself is empty, 
but I don't know if this matters).  So PHP itself is working.
When you say the "info page" do you mean the output from phpinfo()? Does 
that page show a box with the MySQL information or does it just show on 
the options line?

I installed MySQL 4.1 from RPM (client and server RPMs) on Redhat 8.0 
this morning.
You should use the mysqli extension for MySQL 4.1.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] include files, ".php" or ".inc" ?

2004-11-21 Thread Graham Cossey
> Perry Jönsson wrote:
>
> > Jon-Eirik Pettersen wrote:
> >
> >> Perry Jönsson wrote:
> >>
> >>> Hello,
> >>>
> >>> Does it make any difference if you include
> >>> (include/require/include_once/require_once) files with extension
> >>> ".inc" or ".php"?
> >>
> >>
> >>
> >> No, it does not.
> >
> >
> >
> > What it the purpose of the ".inc" file then?
>
> For organization. The file name shows what the file is, without having
> to look at the contents of any scripts.
>

If you only have limited control/knowledge of Apache you could adopt
names something like: script.inc.php

In such a way PHP will always process the script as it's extension
is .php and you can easily identify that it is a script to be
included/required.

Graham

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



Re[2]: [PHP] include files, ".php" or ".inc" ?

2004-11-21 Thread Richard Davey
Hello Perry,

Sunday, November 21, 2004, 8:02:48 PM, you wrote:

PJ> What it the purpose of the ".inc" file then?

Security - on a properly configured web server a .inc file will never
actually try and compile/execute itself. Whereas a .php one always
will.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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




Re[2]: [PHP] Tabs or Spaces?

2004-11-21 Thread Richard Davey
Hello Chris,

Sunday, November 21, 2004, 11:09:42 PM, you wrote:

CS> Just to point out the obvious, if you're not using a compiler
CS> cache, size does matter. Of course, if you're to the point where
CS> the difference is important to you, you're to the point where you
CS> should figure out how to use APC or something. :-)

Equally, if you don't actually share your code with anyone (and the
vast majority of us do not!) then it doesn't matter one bit what you
do either :)

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



Re: [PHP] How to change mail defaults?

2004-11-21 Thread Richard Davey
Hello LLC,

Sunday, November 21, 2004, 8:34:26 PM, you wrote:

ML> In php.ini we have the ability to set sendmail_from only for
ML> Windows. It is unfair, because it does not work for Linux. When I
ML> broadcast, the From defaults to 'Apache' and people have
ML> complained about that.

It will only set the From address if you do not set it yourself in the
mail function. Personally I've never used the sendmail_from php.ini
value in my life (on Windows servers). Do it like this:

mail('[EMAIL PROTECTED]', 'Subject', $message, "From:
[EMAIL PROTECTED]")

Take a look at the examples for mail() in the PHP manual.

ML> Another thing that is causing trouble is that uploaded file
ML> ownership defaults to apache.apache, and I could not find a way to
ML> change ownership and permissions for uploaded files. Did anybody
ML> in this list solve these problems? Thank you

That, I'm afraid, is down to the configuration of your web server and
pretty much out of your control (unless you can control the
configuration of your web server of course).

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

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



[PHP] upload file permission problem

2004-11-21 Thread Michael Leung
Hi all,
  I just upgraded my server into PHP 5. I run the same script which is
working in 4.2.2.
But In PHP 5 has followings msg:
Warning: move_uploaded_file(upload_files/Gnatt.htm)
[function.move-uploaded-file]: failed to open stream: Permission
denied in /var/www/html/simple_upload.php on line 60

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
move '/tmp/phpZ29DAN' to 'upload_files/Gnatt.htm' in
/var/www/html/simple_upload.php on line 60

I am 100% sure , I have changed the upload_files dir into 0777 mod.

Any one can help?

yours,
Michael Leung

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



Re: [PHP] include files, ".php" or ".inc" ?

2004-11-21 Thread John Holmes
Perry Jönsson wrote:
Does it make any difference if you include 
(include/require/include_once/require_once) files with extension ".inc" 
or ".php"?
It makes no difference as far as PHP is concerned. You're just telling 
PHP what file to load.

However, .inc files are generally served up as plain text if requested 
on their own. This means that anyone can view the PHP code (and possibly 
passwords?) they contain.

So many people will just name them with a .php extension so nothing is 
returned to the user. This has it's own set of problems because now the 
files can be run out of context. Depending on your application, this 
could be a big issue; what if they could bypass your security measures 
by requesting files on their own?

This is a fairly frequently asked question and the number one suggestion 
is always to place the files outside of your web root so they can not be 
requested through a browser at all. PHP can still include them, you just 
have to provide the correct path. Then you can give them any extension 
you want.

This isn't always possible or ideal, though and then you have to resort 
to either naming them with .php extensions (and being aware of the issue 
discussed above) or relying on an .htaccess file to deny access to any 
.inc files (so people cannot view/run them out of context). .htaccess is 
not an entirely portable solution, though, so you have to take that into 
consideration also.

Good luck with your decision. I personally use .inc.php (for visual 
reference of which ones are include files) and stay aware of what could 
happen if these files are run out of context.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] images process

2004-11-21 Thread edwardspl
Sorry,

I need a sample of php program...

Thanks!

Paul Furman wrote:

> You need to set up an apache server & get that running on your windows
> machine in order to run php. Then you go thru IE to view the php script
> & run it that way.
>
> [EMAIL PROTECTED] wrote:
>
> > Yes, I need a sample ( display images with php directly from database )
> > for reference...
> > So, can you help me ?
> >
> > Many thank for your help !
> >
> > Raditha Dissanayake wrote:
> >
> >
> >>[EMAIL PROTECTED] wrote:
> >>
> >>
> >>>So, how can we fix this kind of problem ?
> >>>
> >>>
> >>
> >>is it a problem?
> >>
> >>
> >>>Raditha Dissanayake wrote:
> >>>
> >>>
> >>>
> >>>
> [EMAIL PROTECTED] wrote:
> 
> 
> 
> 
> >Dear You,
> >
> >How to load images ( eg: gif, jpg) with base64 function from
> >Database on IE directly ?
> >
> >
> >
> >
> 
> as far as I know you cannot do this with IE directly.
> 
> 
> 
> 
> >Is there any samples to me for reference ?
> >
> >Many thank for your help !
> >
> >Ed.
> >
> >
> >
> >
> >
> 
> --
> 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] images process

2004-11-21 Thread James Cartledge
On Mon, 22 Nov 2004 09:13:14 +0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Sorry,
> 
> I need a sample of php program...
> 
> Thanks!
> 
> 

Does this help?

google: php image database

J.

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



Re: [PHP] Tabs or Spaces?

2004-11-21 Thread Ryan King
On Nov 21, 2004, at 5:09 PM, Chris Shiflett wrote:
--- Ryan King <[EMAIL PROTECTED]> wrote:
However, when indenting with 3 spaces instead of a single tab,
then your code-size WILL increase, and will include 3x more
"space content" than it used to :)
Who cares?
Just to point out the obvious, if you're not using a compiler cache, 
size
does matter. Of course, if you're to the point where the difference is
important to you, you're to the point where you should figure out how 
to
use APC or something. :-)
I agree. I can't imagine that having more whitespace characters in a 
script will significantly effect the performance of said script. I 
would guess that there would always be more significant issues to deal 
with in regards to performance- php compiling and optimizing SQL 
queries being chief in my mind. Its silly and inefficient (work-wise) 
to optimize the small issues in programming. Just remember, "Premature 
optimization is the root of all evil." (Knuth)

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


Re: [PHP] Tabs or Spaces?

2004-11-21 Thread John Holmes
Ryan King wrote:
I agree. I can't imagine that having more whitespace characters in a 
script will significantly effect the performance of said script. I would 
guess that there would always be more significant issues to deal with in 
regards to performance- php compiling and optimizing SQL queries being 
chief in my mind. Its silly and inefficient (work-wise) to optimize the 
small issues in programming. Just remember, "Premature optimization is 
the root of all evil." (Knuth)
Wait... I'm writing an extension to remove spaces and convert double 
quotes to single and use echo instead of print... are you saying that's 
silly? Bah!

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] images process

2004-11-21 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:

>Sorry,
>
>I need a sample of php program...
>  
>
They are dime a dozen on google.
please trim your posts.

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



[PHP] Upload is not working

2004-11-21 Thread Michael Leung
Hi all,
   I am implementing a upload file PHP program. The script is not
working. it keeps on generating the permission Error.
I am not very sure this is PHP or Apache problem. But one things I can
sure I changed all upload file dir in 777.

Anyone can help? Or are there any people facing this kind of problem too?

yours,
Michael Leung

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



Re: [PHP] Upload is not working

2004-11-21 Thread Jason Wong
On Monday 22 November 2004 10:56, Michael Leung wrote:

>I am implementing a upload file PHP program. The script is not
> working. it keeps on generating the permission Error.
> I am not very sure this is PHP or Apache problem. But one things I can
> sure I changed all upload file dir in 777.

The user running the apache process (apache or www or nobody or whatever) 
needs execute permissions ('x') on the destination directory (which you 
already have in the form of 777) AND on all its parent directories.

-- 
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
--
/*
RADIO SHACK LEVEL II BASIC
READY
>_
*/

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



[PHP] Contract programmer needed

2004-11-21 Thread lou5403


I am looking for a program, either stand alone or web based, that will
allow the user to enter basic shipping information and will return
shipping charges from USPS, UPS, FedEx, and DHL.  The application
should allow for a hidden % markup/handling function.  The displayed
charges will include the markup.  The program will not be used for
e-commerce and will not be integrated with any on-line shopping
applications.  The program is meant to be used solely to display
shipping choices and rates to the actual user.  If web based, the
"calculator" will be hosted on a shared site with no other
function except to display rate comparisons.  contact
[EMAIL PROTECTED] w/any questions and
with an estimate and timeline.


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.290 / Virus Database: 265.4.1 - Release Date: 11/19/2004

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

[PHP] Code needed

2004-11-21 Thread lou5403


I am looking for a program, either stand alone or web based, that will
allow the user to enter basic shipping information and will return
shipping charges from USPS, UPS, FedEx, and DHL.  The application
should allow for a hidden % markup/handling function.  The displayed
charges will include the markup.  The program will not be used for
e-commerce and will not be integrated with any on-line shopping
applications.  The program is meant to be used solely to display
shipping choices and rates to the actual user.  If web based, the
"calculator" will be hosted on a shared site with no other
function except to display rate comparisons.  contact
[EMAIL PROTECTED] w/any questions and
with an estimate and timeline.


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.290 / Virus Database: 265.4.1 - Release Date: 11/19/2004

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

[PHP] Upload is still not working

2004-11-21 Thread Michael Leung
Hi all,
  I have already checked all parent dir are in 777 too.
But this is not working

Anyone can help me?

yours,
Michael

On Monday 22 November 2004 10:56, Michael Leung wrote:

>I am implementing a upload file PHP program. The script is not
> working. it keeps on generating the permission Error.
> I am not very sure this is PHP or Apache problem. But one things I can
> sure I changed all upload file dir in 777.

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



[PHP] Upload is still not working

2004-11-21 Thread Michael Leung
Hi all,
  I have some problems for upload file script. The script generated a
lot of permission denied error msg. I have changed the upload dir and
its parent dir into 777. I am quite sure I did the permission settings
right.

I have attached the error msg and my testing source code with this email

Anyone can help me .

Thanks!

yours,
Michael

My Error Msg: 

Warning: move_uploaded_file(upload_files/Blue hills.jpg)
[function.move-uploaded-file]: failed to open stream: Permission
denied in /var/www/html/simple_upload.php on line 47

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
move '/tmp/phpvdnBbQ' to 'upload_files/Blue hills.jpg' in
/var/www/html/simple_upload.php on line 47
Somthing is wrong with uploading a file.

My Testing Code:
http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']);
$url_this =  "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];

$upload_dir = 'upload_files/';
$upload_url = $url_dir."upload/";
$message ="";


if ($_FILES['userfile']) {
$message = do_upload($upload_dir, $upload_url);
}
else {
$message = "Invalid File Specified.";
}

print $message;

function do_upload($upload_dir, $upload_url) {

$temp_name = $_FILES['userfile']['tmp_name'];
$file_name = $_FILES['userfile']['name']; 
$file_type = $_FILES['userfile']['type']; 
$file_size = $_FILES['userfile']['size']; 
$result= $_FILES['userfile']['error'];
$file_url  = $upload_url.$file_name;
$file_path = $upload_dir.$file_name;

//File Name Check
if ( $file_name =="") { 
$message = "Invalid File Name Specified";
return $message;
}
//File Size Check
else if ( $file_size > 50) {
$message = "The file size is over 500K.";
return $message;
}
//File Type Check
else if ( $file_type == "text/plain" ) {
$message = "Sorry, You cannot upload any script file" ;
return $message;
}

$result  =  move_uploaded_file($temp_name, $file_path);


$message = ($result)?"File url $file_url" :
  "Somthing is wrong with uploading a file.";

return $message;
}
?>

  Upload Image
  


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



RE: [PHP] Mysql Connect Help

2004-11-21 Thread Manoj Kumar
 

 You should enable php_mysql module in your php.ini file.

-- Manoj Kr. Sheoran  

-Original Message-
From: Nathan Mealey [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 21, 2004 10:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Mysql Connect Help

A seemingly simple problem, still confounding me.

The following line of code:
mysql_connect('database','user','password'); [with values of course]

Generates the following error:
Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/phptest.php on line 3

My PHP info page says that PHP (4.3) was compiled with MySQL, and
extensions_dir is correct (although the extensions_dir itself is empty, but
I don't know if this matters).  So PHP itself is working.

I installed MySQL 4.1 from RPM (client and server RPMs) on Redhat 8.0 this
morning.

Thanks for any help,
Nathan
--
Nathan Mealey
Director of Operations
Cycle-Smart, Inc.
P.O. Box 1482
Northampton, MA
01061-1482
[EMAIL PROTECTED]
(413) 587-3133
(413) 210-7984 Mobile
(512) 681-7043 Fax

--
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] Upload is still not working

2004-11-21 Thread Jason Wong
On Monday 22 November 2004 11:25, Michael Leung wrote:

Please do not top post.

>   I have already checked all parent dir are in 777 too.
> But this is not working

Post some *concise* code that illustrates your problem.

Post the full error message(s) that you get.

-- 
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
--
/*
Consultant, n.:
 An ordinary man a long way from home.
*/

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



Re: [PHP] Upload is still not working

2004-11-21 Thread Jason Wong
On Monday 22 November 2004 12:14, Michael Leung wrote:

>   I have some problems for upload file script. The script generated a
> lot of permission denied error msg. I have changed the upload dir and
> its parent dir into 777. I am quite sure I did the permission settings
> right.
>
> I have attached the error msg and my testing source code with this email

> Warning: move_uploaded_file(upload_files/Blue hills.jpg)
> [function.move-uploaded-file]: failed to open stream: Permission
> denied in /var/www/html/simple_upload.php on line 47

Add the following lines to the top of your code and us show the output of:

  if (is_dir('upload_files')) {
echo ('upload_files is valid a directory');
  } else {
echo ('upload_files is NOT a directory');
  }
  if (is_writeable('upload_files')) {
echo ('I am able to write to upload_files');
  } else {
echo ('I am NOT able to write to upload_files');
  }

-- 
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
--
/*
Marriage is not merely sharing the fettucine, but sharing the
burden of finding the fettucine restaurant in the first place.
  -- Calvin Trillin
*/

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



Re: [PHP] Upload is still not working

2004-11-21 Thread Michael Leung
Hi Jason,
 Thank you for your help. This is the output from PHP script:
"upload_files is valid a directoryI am able to write to upload_files
Warning: move_uploaded_file(upload_files/Water lilies.jpg)
[function.move-uploaded-file]: failed to open stream: Permission
denied in /var/www/html/simple_upload.php on line 58

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
move '/tmp/phpHuSGRK' to 'upload_files/Water lilies.jpg' in
/var/www/html/simple_upload.php on line 58"

Well, this shows upload_files is writeable. Therefore, it should not
be any error in permission setting issues.

yours,
Michael

On Mon, 22 Nov 2004 13:54:28 +0800, Jason Wong <[EMAIL PROTECTED]> wrote:
> On Monday 22 November 2004 12:14, Michael Leung wrote:
>
>
>
> >   I have some problems for upload file script. The script generated a
> > lot of permission denied error msg. I have changed the upload dir and
> > its parent dir into 777. I am quite sure I did the permission settings
> > right.
> >
> > I have attached the error msg and my testing source code with this email
>
> > Warning: move_uploaded_file(upload_files/Blue hills.jpg)
> > [function.move-uploaded-file]: failed to open stream: Permission
> > denied in /var/www/html/simple_upload.php on line 47
>
> Add the following lines to the top of your code and us show the output of:
>
>   if (is_dir('upload_files')) {
> echo ('upload_files is valid a directory');
>   } else {
> echo ('upload_files is NOT a directory');
>   }
>   if (is_writeable('upload_files')) {
> echo ('I am able to write to upload_files');
>   } else {
> echo ('I am NOT able to write to upload_files');
>   }
>
> --
> 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
> --
> /*
> Marriage is not merely sharing the fettucine, but sharing the
> burden of finding the fettucine restaurant in the first place.
>   -- Calvin Trillin
> */
>
> --
> 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] Upload is still not working

2004-11-21 Thread Jason Wong
On Monday 22 November 2004 14:01, Michael Leung wrote:

Please do not top post.

>  Thank you for your help. This is the output from PHP script:
> "upload_files is valid a directoryI am able to write to upload_files
> Warning: move_uploaded_file(upload_files/Water lilies.jpg)
> [function.move-uploaded-file]: failed to open stream: Permission
> denied in /var/www/html/simple_upload.php on line 58
>
> Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
> move '/tmp/phpHuSGRK' to 'upload_files/Water lilies.jpg' in
> /var/www/html/simple_upload.php on line 58"
>
> Well, this shows upload_files is writeable. Therefore, it should not
> be any error in permission setting issues.

Add these following tests to the top of your code:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);   

if (is_readable($_FILES['userfile']['tmp_name'])) {
echo "I can read " . $_FILES['userfile']['tmp_name'];
}

if ($fp0 = fopen('upload/doodah', 'w')) {
echo 'I can open upload/doodah for writing';
}

if ($fp1 = fopen('upload/' . $_FILES['userfile']['name'], 'w')) {
echo 'I can open upload/' . $_FILES['userfile']['name'] . ' for 
writing';
}

Also what is your safe_mode setting? Usually when something fails because of 
safe_mode setting the error would explicitly say it failed because of 
safe_mode setting.

-- 
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
--
/*
If you wish to succeed, consult three old people.
*/

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



[PHP] About xmldoc and ISO-8859-1

2004-11-21 Thread Patrick Gelin
Hi,

I'm trying to make DRES project (http://sourceforge.net/projects/dres/)
compliant with ISO-8859-1.  I'm not using mbstring into my windows 2000
server, I know there is problem with Internet Explorer browser...

I saw DRES it use 'xmldoc' API  into the file xmlutil.php. But this fonction
seems not to be in use at this time. By the way I can't find any
documentation about UTF-8, ISO-8859-1 and so about XMLDOM API.

What I saw it's when I save a formula with DRES, it register a XML file, and
the content is:


Patrick
Gelin驩

The name filed was originaly:

name=''

I don't know if it's UTF-8 or ISO-8859-1 format.

When the formula refresh it show:

name='Ã Ã Ã Ã '

Where does this come from? Is it a problem with XMLDOM API? How to correct
this?

Thank.

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



[PHP] Upload is still not working ( More tesitngs)

2004-11-21 Thread Michael Leung
Hi All,
 I did more testes

I have added the followings code into my script
error_reporting(E_ALL);
   ini_set('display_errors', TRUE);

   if (is_readable($_FILES['userfile']['tmp_name'])) {
   echo "I can read " . $_FILES['userfile']['tmp_name'];
   }

   if ($fp0 = fopen('upload_files/doodah', 'w')) {
   echo 'I can open upload/doodah for writing';
   }

   if ($fp1 = fopen('upload_files/' . $_FILES['userfile']['name'], 'w')) {
   echo 'I can open upload_files/' . $_FILES['userfile']['name'] . ' for
writing';
   }

 if (is_dir('upload_files')) {
   echo ('upload_files is valid a directory');
 } else {
   echo ('upload_files is NOT a directory');
 }
 if (is_writeable('upload_files')) {
   echo ('I am able to write to upload_files');
 } else {
   echo ('I am NOT able to write to upload_files');
 }



My Error Msg:
  I can read /tmp/phphRiKeP
Warning: fopen(upload_files/doodah) [function.fopen]: failed to open
stream: Permission denied in /var/www/html/simple_upload.php on line
18

Warning: fopen(upload_files/Water lilies.jpg) [function.fopen]: failed
to open stream: Permission denied in /var/www/html/simple_upload.php
on line 22
upload_files is valid a directoryI am able to write to upload_files


This is very strange. upload_files is writeable, but can't write by
fopen('upload_files/doodah', 'w')

yours,
Michael Leung

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



Re: [PHP] Upload is still not working ( More tesitngs)

2004-11-21 Thread Raditha Dissanayake
Michael Leung wrote:
My Error Msg:
 I can read /tmp/phphRiKeP
Warning: fopen(upload_files/doodah) [function.fopen]: failed to open
stream: Permission denied in /var/www/html/simple_upload.php on line
18
Warning: fopen(upload_files/Water lilies.jpg) [function.fopen]: failed
to open stream: Permission denied in /var/www/html/simple_upload.php
on line 22
upload_files is valid a directoryI am able to write to upload_files
This is very strange. upload_files is writeable, but can't write by
fopen('upload_files/doodah', 'w')
 

Nothing strange about that it may be writable by the owner but not by 
others. Besides that as jason as already pointed out you may be running 
in safe mode. Other than that, the file upload page on php.net has a 
wealth of information posted by others like you who had trouble with 
their uploads, you are sure to find a usefull comment there.

--
Raditha Dissanayake
http://www.radinks.com/upload/ - Drag and Drop File Upload
yours,
Michael Leung
 

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


Re: [PHP] inline_C installation

2004-11-21 Thread Burhan Khalid
Rayan Lahoud wrote:
Does anybody knows how to install a pear package. i have the inline_C package that i want to install and use. And can i have some sample functions using this package?
pear install Inline_C -- that's it.
You don't need to restart Apache, or load any modules. To find out 
examples on usage, try checking the pear repository.

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


Re: [PHP] inline_C installation

2004-11-21 Thread Jeffery Fernandez
Burhan Khalid wrote:
Rayan Lahoud wrote:
Does anybody knows how to install a pear package. i have the inline_C 
package that i want to install and use. And can i have some sample 
functions using this package?

pear install Inline_C -- that's it.
You don't need to restart Apache, or load any modules. To find out 
examples on usage, try checking the pear repository.

hth,
Burhan
maybe try: 

pear install -f Inline_C
as its not stable yet
Jeffery
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php