OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 5 Jul 2004 16:52:17 -0000 Issue 2859

php-general-digest-helplists.php.net
Date: Mon Jul 05 2004 - 11:52:17 CDT


php-general Digest 5 Jul 2004 16:52:17 -0000 Issue 2859

Topics (messages 189688 through 189724):

Re: Including files within a class definition
        189688 by: Jason Barnett
        189689 by: Jason Barnett

conditional includes in class functions
        189690 by: Dennis Gearon
        189691 by: zareef ahmed

problem with crypt
        189692 by: Nitin
        189693 by: zareef ahmed
        189696 by: Nitin

Re: Dissappering Tables Server wide
        189694 by: raditha dissanayake
        189705 by: Gerben

include but not browse
        189695 by: Tumurbaatar S.
        189700 by: Jason Wong
        189702 by: Jason Wong

.htaccess file
        189697 by: Václav Slováček
        189699 by: Jason Wong
        189701 by: zareef ahmed
        189703 by: John
        189704 by: Gerben
        189707 by: Václav Slováček
        189712 by: Jason Wong
        189718 by: raditha dissanayake

problems linking a DLL to Zend symbols like _compiler_globals_id
        189698 by: Vincent Graux

PHP Web Mail
        189706 by: I.A. Gray
        189708 by: Jose Leon
        189710 by: I.A. Gray
        189711 by: webmaster.jnsolutions.co.uk
        189713 by: Jose Leon
        189715 by: raditha dissanayake
        189716 by: Petar [Lists]

file upload and permission problem.
        189709 by: Angelo binc2
        189717 by: raditha dissanayake

Re: PHP5 / MySQLi + Apache: InnoDB access problems -> solved + FLUSH BROWSER CACHE advice
        189714 by: Bauke Jan Douma

Encryption in PHP - mcrypt and alternatives
        189719 by: Mike Morton

make an image disappear when page loads
        189720 by: Diana Castillo
        189721 by: raditha dissanayake
        189722 by: Egil Berntsen
        189723 by: Diana Castillo

file locking over NFS?
        189724 by: kyle

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


> include (extended_methods_stuff.php);
>
> }
>
> I know that I can probably extend this class to add the extra
> functionality however the other generated classes rely on the name of this
> class so I cannot just extend this class and it's name cannot change.
>
> Is there any way to have an include prior to the class being parsed?

Are you using PHP5 yet? If so there's an answer for this: __autoload.
Assuming that you held classes in files that had the same name as the
class, you would use:

<?php

class generatedFoo {
   public function __autoload($class) {
     include '/path/to/class/$class.php';
   }

   // other stuff
}

?>

http://www.php.net/zend-engine-2.php

attached mail follows:


I really ought to check my code before posting... but you get the idea :)

> <?php
>
> class generatedFoo {
> public function __autoload($class) {

      include "/path/to/class/$class.php";

> }
>
> // other stuff
> }
>
> ?>
>
> http://www.php.net/zend-engine-2.php

attached mail follows:


Anyone ever done that?

Does PHP actually wait until the include is actually needed before it does it? It might wait to execute it, but does it wait to include it?

Trying to speed up the loading of pages.

attached mail follows:


--- Dennis Gearon <gearondfireserve.net> wrote:
> Anyone ever done that?
>
> Does PHP actually wait until the include is actually
> needed before it does it? It might wait to execute
> it, but does it wait to include it?
>
A close look at diffrences between require and
include may help you.

http://www.faqts.com/knowledge_base/view.phtml/aid/6

=====
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com

        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

attached mail follows:


Hi all,

I'm using PHP function crypt() to encrypt the password while updating the password for user's email accounts.
It was running fine on PHP 4.0.6, but since I updated to PHP 4.1.2, it's giving me problems. No errors, nothing, password is updated but to unknown value.

Is this some kind of bug of crypt() function or what else it could be? Scripts are same.

Please help as soon as possible.
Thanks in advance

attached mail follows:


--- Nitin <nitinmehtakappa.net.in> wrote:
> Hi all,
>
> I'm using PHP function crypt() to encrypt the
> password while updating the password for user's
> email accounts.
> It was running fine on PHP 4.0.6, but since I
> updated to PHP 4.1.2, it's giving me problems. No
> errors, nothing, password is updated but to unknown
> value.

what do you mean by unknown value.
is it string "unknown value"??? or something else you
can not recognise.
It should not be a problem as long as you are able to
validate it.

zareef ahmed

>
> Is this some kind of bug of crypt() function or what
> else it could be? Scripts are same.
>
> Please help as soon as possible.
> Thanks in advance

==Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com

                
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

attached mail follows:


unknown value means, i cannot validate the user again. Password value is
unrecognized, or maybe something randomly generated.

----- Original Message -----
From: "zareef ahmed" <zasaifiyahoo.com>
To: "Nitin" <nitinmehtakappa.net.in>; "PHP List"
<php-generallists.php.net>
Sent: Monday, July 05, 2004 1:25 PM
Subject: Re: [PHP] problem with crypt

> --- Nitin <nitinmehtakappa.net.in> wrote:
> > Hi all,
> >
> > I'm using PHP function crypt() to encrypt the
> > password while updating the password for user's
> > email accounts.
> > It was running fine on PHP 4.0.6, but since I
> > updated to PHP 4.1.2, it's giving me problems. No
> > errors, nothing, password is updated but to unknown
> > value.
>
> what do you mean by unknown value.
> is it string "unknown value"??? or something else you
> can not recognise.
> It should not be a problem as long as you are able to
> validate it.
>
> zareef ahmed
>
> >
> > Is this some kind of bug of crypt() function or what
> > else it could be? Scripts are same.
> >
> > Please help as soon as possible.
> > Thanks in advance
>
>
> =====
> Zareef Ahmed :: A PHP Developer in Delhi(India).
> Homepage :: http://www.zasaifi.com
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Chris wrote:

>Hi All.
>
>What would cause all the tables in all the databases to be deleted all at
>once?
>
>
a simple for loop.

>TIA
>
>
>

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


Do you want all tables to dissapear or did this happen (unwanted)?

"Chris" <chrisglyndower.com> wrote in message
news:NGBBJMAGGLDFGFIBEIJFGEACJIAA.chrisglyndower.com...
> Hi All.
>
> What would cause all the tables in all the databases to be deleted all at
> once?
>
> TIA

attached mail follows:


Generally, it isn't a PHP related but...
I'm not a Linux/Apache user and know nothing
about how to manage permissions there.
I need to disable browsing for some of subfolders
on my site but php scripts located in these subfolders
should be accessible by php's include/require.
It's easy to do on Windows/IIS but how to do it on Linux/Apache?

attached mail follows:


On Monday 05 July 2004 16:18, Tumurbaatar S. wrote:

> Generally, it isn't a PHP related but...
> I'm not a Linux/Apache user and know nothing
> about how to manage permissions there.
> I need to disable browsing for some of subfolders
> on my site but php scripts located in these subfolders
> should be accessible by php's include/require.
> It's easy to do on Windows/IIS but how to do it on Linux/Apache?

Assuming you mean if someone goes to:

  http://www.yoursite.com/subfolder/

then they should not see the list of files in subfolder, you want to look at
the <Options Indexes> directive. Look on the apache site for detailed info.

--
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
------------------------------------------
/*
Anyone who goes to a psychiatrist ought to have his head examined.
                -- Samuel Goldwyn
*/

attached mail follows:


On Monday 05 July 2004 17:48, Jason Wong wrote:
> On Monday 05 July 2004 16:18, Tumurbaatar S. wrote:
> > Generally, it isn't a PHP related but...
> > I'm not a Linux/Apache user and know nothing
> > about how to manage permissions there.
> > I need to disable browsing for some of subfolders
> > on my site but php scripts located in these subfolders
> > should be accessible by php's include/require.
> > It's easy to do on Windows/IIS but how to do it on Linux/Apache?
>
> Assuming you mean if someone goes to:
>
> http://www.yoursite.com/subfolder/
>
> then they should not see the list of files in subfolder, you want to look
> at the <Options Indexes> directive. Look on the apache site for detailed
> info.

A further note: you should probably deny access to the directory in question
(using the appropriate directive). This will prevent the webserver from
serving any files in that directory but php will still be able to include
said 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
------------------------------------------
/*
Work consists of whatever a body is obliged to do.
Play consists of whatever a body is not obliged to do.
                -- Mark Twain
*/

attached mail follows:


Hi all,

I have a problem, but maybe it's more about Apache than about PHP. I need
to access a Apache .htaccess file from PHP and modify it, but I always get
"access denied" error. Could you help me, with solving this problem?
Thank you.

attached mail follows:


On Monday 05 July 2004 16:58, Václav Slováček wrote:

> I have a problem, but maybe it's more about Apache than about PHP. I need
> to access a Apache .htaccess file from PHP and modify it, but I always get
> "access denied" error. Could you help me, with solving this problem?

"access denied" most likely means you don't have permission to read/write it.
If you're running your own server, change the permissions accordingly,
otherwise explain to your server admin why you want to change the .htaccess
file(s).

--
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
------------------------------------------
/*
Ummm, well, OK. The network's the network, the computer's the computer.
Sorry for the confusion.
                -- Sun Microsystems
*/

attached mail follows:


--- Václav Slováček <regwessan.net> wrote:
> Hi all,
>
> I have a problem, but maybe it's more about Apache
> than about PHP. I need
> to access a Apache .htaccess file from PHP and
> modify it, but I always get
> "access denied" error. Could you help me, with
> solving this problem?

Please check if you ( the user which runs apache,
usually named 'nobody') has permissions to write.

You may(should) change the permissions of the file to
modify it.

zareef ahmed
 

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

=====
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com

                
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

attached mail follows:


what are the files permissons?
of these are set wrong it could cause your problem

On Mon, 05 Jul 2004 10:58:54 +0200, Václav Slováček <regwessan.net> wrote:
> Hi all,
>
> I have a problem, but maybe it's more about Apache than about PHP. I need
> to access a Apache .htaccess file from PHP and modify it, but I always get
> "access denied" error. Could you help me, with solving this problem?
> Thank you.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
John
Dirty.Slgmail.com
http://www.whoooop.co.uk

attached mail follows:


You will have to chmod these .htaccess files

"John" <dirty.slgmail.com> wrote in message
news:a4e82da6040705030060787d88mail.gmail.com...
what are the files permissons?
of these are set wrong it could cause your problem

On Mon, 05 Jul 2004 10:58:54 +0200, Václav Slovácek <regwessan.net> wrote:
> Hi all,
>
> I have a problem, but maybe it's more about Apache than about PHP. I need
> to access a Apache .htaccess file from PHP and modify it, but I always get
> "access denied" error. Could you help me, with solving this problem?
> Thank you.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
John
Dirty.Slgmail.com
http://www.whoooop.co.uk

attached mail follows:


When my web is hosted, there is no other way how to solve it? I realized
that I can't see the file in my ftp client, so I cant't change the
permissions. Of course, I can't use chmod() to change the permissions when
I'm not allowed to write into the file. So the only solution is to contact
admin?

Dne Mon, 5 Jul 2004 17:40:55 +0800 napsal/-a Jason Wong
<php-generalgremlins.biz> příspěvek následujícího znění::

> On Monday 05 July 2004 16:58, Václav Slováček wrote:
>
>> I have a problem, but maybe it's more about Apache than about PHP. I
>> need
>> to access a Apache .htaccess file from PHP and modify it, but I always
>> get
>> "access denied" error. Could you help me, with solving this problem?
>
> "access denied" most likely means you don't have permission to
> read/write it.
> If you're running your own server, change the permissions accordingly,
> otherwise explain to your server admin why you want to change the
> .htaccess
> file(s).
>

attached mail follows:


On Monday 05 July 2004 18:13, Václav Slováček wrote:

> So the only solution is to contact admin?

Yes.

--
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
------------------------------------------
/*
86. What do you mean that wasn't a copy?

        --Top 100 things you don't want the sysadmin to say
*/

attached mail follows:


Václav Slováček wrote:

> When my web is hosted, there is no other way how to solve it? I
> realized that I can't see the file in my ftp client, so I cant't
> change the permissions. Of course, I can't use chmod() to change the
> permissions when I'm not allowed to write into the file. So the only
> solution is to contact admin?

ftp clients usually have a special configuration setting that will allow
you to view such 'hidden' files.

>
> Dne Mon, 5 Jul 2004 17:40:55 +0800 napsal/-a Jason Wong
> <php-generalgremlins.biz> příspěvek následujícího znění::
>
>> On Monday 05 July 2004 16:58, Václav Slováček wrote:
>>
>>> I have a problem, but maybe it's more about Apache than about PHP.
>>> I need
>>> to access a Apache .htaccess file from PHP and modify it, but I
>>> always get
>>> "access denied" error. Could you help me, with solving this problem?
>>
>>
>> "access denied" most likely means you don't have permission to
>> read/write it.
>> If you're running your own server, change the permissions accordingly,
>> otherwise explain to your server admin why you want to change the
>> .htaccess
>> file(s).
>>
>

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


where (in which detailed list) should I ask a question about problems
linking a DLL to Zend symbols like _compiler_globals_id ?

thks

O volupté calme et profonde
Des amours qui sont nés sans pleurs,
Volupté saine comme une onde
Qui chante sur un lit de fleurs.

-Poésies, Sully Prud'homme
René François Armand Prud'homme , 1839-1907

attached mail follows:


Hi everyone,

I use UebiMiau for our web mail service, but to be honest I haven't been
particularly happy with it. It's ok, but what I find frustrating is that if
our customers click the back button on their browser it always gives the
'this page has expired' message. I assume it is using sessions, but still-
does this message always have to be displayed? It always seems to log you
out quite easilly. Web mail services such as hotmail or yahoo don't do this.
Does anyone know a good PHP-based (free if possible) web mail other than
UebiMiau that they would recommend?

Best wishes,

Ian

attached mail follows:


Hello,
> Does anyone know a good PHP-based (free if possible) web mail other than
> UebiMiau that they would recommend?
Why not Squirrel Mail?

http://www.squirrelmail.org

Regards.
--
qadram :: software development
http://www.qadram.com

attached mail follows:


Thanks- looked at Squirrel Mail. Looks really good, however we use POP3- I
don't think Squirrel Mail uses POP3 does it?

-----Original Message-----
From: Jose Leon [mailto:qadramgmail.com]
Sent: 05 July 2004 12:09
To: I.A. Gray
Cc: php-generallists.php.net
Subject: Re: [PHP] PHP Web Mail

Hello,
> Does anyone know a good PHP-based (free if possible) web mail other than
> UebiMiau that they would recommend?
Why not Squirrel Mail?

http://www.squirrelmail.org

Regards.
--
qadram :: software development
http://www.qadram.com

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

attached mail follows:


Try www.horde.org

It's not only a webmail client, but has a whole load more!

Nunners

Quoting "I.A. Gray" <techselectperformers.com>:

> Thanks- looked at Squirrel Mail. Looks really good, however we use POP3- I
> don't think Squirrel Mail uses POP3 does it?
>
>
>
> -----Original Message-----
> From: Jose Leon [mailto:qadramgmail.com]
> Sent: 05 July 2004 12:09
> To: I.A. Gray
> Cc: php-generallists.php.net
> Subject: Re: [PHP] PHP Web Mail
>
>
> Hello,
> > Does anyone know a good PHP-based (free if possible) web mail other than
> > UebiMiau that they would recommend?
> Why not Squirrel Mail?
>
> http://www.squirrelmail.org
>
> Regards.
> --
> qadram :: software development
> http://www.qadram.com
>
> --
> 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
>
>

attached mail follows:


Hello,
On Mon, 5 Jul 2004 12:33:38 +0100, I.A. Gray <techselectperformers.com> wrote:
> Thanks- looked at Squirrel Mail. Looks really good, however we use POP3- I
> don't think Squirrel Mail uses POP3 does it?
SquirrelMail is a web interface to an IMAP mail server, you can set up
fetch mail to retrieve your POP3 mail accounts and put the mail into
the Cyrus IMAP server, that way, you can handle all your mail from a
single point.

Regards.
--
qadram :: software development
http://www.qadram.com

attached mail follows:


I.A. Gray wrote:

>Thanks- looked at Squirrel Mail. Looks really good, however we use POP3- I
>don't think Squirrel Mail uses POP3 does it?
>
>
at the risk of starting a flame war: IMAP is the devine way of using
email. POP3 sux. :-)
(sorry couldn't resist)

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


www.ilohamail.org

You can set this one up in about 10 minutes and will do IMAP and POP3.

Works with flat files or MYSQL

..Petar

----- Original Message -----
From: "I.A. Gray" <techselectperformers.com>
To: <php-generallists.php.net>
Sent: Monday, July 05, 2004 6:14 PM
Subject: [PHP] PHP Web Mail

> Hi everyone,
>
> I use UebiMiau for our web mail service, but to be honest I haven't been
> particularly happy with it. It's ok, but what I find frustrating is that if
> our customers click the back button on their browser it always gives the
> 'this page has expired' message. I assume it is using sessions, but still-
> does this message always have to be displayed? It always seems to log you
> out quite easilly. Web mail services such as hotmail or yahoo don't do this.
> Does anyone know a good PHP-based (free if possible) web mail other than
> UebiMiau that they would recommend?
>
> Best wishes,
>
> Ian
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Hi all I am trying to upload a file using PHP.

I can successfully create a folder, but when I try upload the file it
gives me the following error when using the move_uploaded_file function:

Warning: move_uploaded_file(c:/program files/apache
group/apache/htdocs/zerodocs/40/) [function.move-uploaded-file]: failed
to create stream: Permission denied in c:\program files\apache
group\apache\htdocs\zero\opdocument.php on line 80

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
move 'c:\temp\php7C.tmp' to 'c:/program files/apache
group/apache/htdocs/zerodocs/40/' in c:\program files\apache
group\apache\htdocs\zero\opdocument.php on line 80
Error: Unable to move file to designated directory.

I have checked that filesize, directory, filename etc... to make sure
it should work. I have come to the conclusion that it is the permissions
of the directory created. I am using a windows box. I have read the also
when using mkdir() the mode is ignored for windows machines, so is it a
permission problem or am I missing something?

below is a copy of my upload function:

   // root path
    $path = $_SERVER['DOCUMENT_ROOT'];

    // upload directory. path will originate from root.
    $dirname = '/zerodocs/' . $_SESSION['o_id'] . "/";

    // permission settings for newly created folders
    $chmod = 0755;

    // create file vars to make things easier to read.
    $filename = $_FILES['myfile']['name'];
    $filesize = $_FILES['myfile']['size'];
    $filetype = $_FILES['myfile']['type'];
    $file_tmp = $_FILES['myfile']['tmp_name'];
    $file_err = $_FILES['myfile']['error'];
    $file_ext = strrchr($filename, '.');

    // check if user actually put something in the file input field.
    if (($file_err == 0) && ($filesize != 0))
    {
        // Check extension.
        if (!$file_ext)
        {
            unlink($file_tmp);
            die('File must have an extension.');
        }

        // extra check to prevent file attacks.
        if (is_uploaded_file($file_tmp))
        {
            /*
            * check if the directory exists
            * if it doesnt exist, make the directory
            */
            $dir = $path . $dirname;

            if (!is_dir($dir))
            {
                $dirtemp = explode('/', $dirname);

                foreach ($dirtemp as $sub_dir)
                {
                    $path .= '/' . $sub_dir;
                    if (!is_dir($path))
                    {
                        if (!mkdir($path, $chmod))
                        {
                            unlink($file_tmp);
                            die('<strong>Error:</strong> Directory does
not exist and was unable to be created.');
                        }
                    }
                }
            }

            /*
            * copy the file from the temporary upload directory
            * to its final detination.
            */
                        
                        echo("Dir: " . $dir);
                        echo("<br> filename: " . $filename);
            if (move_uploaded_file($file_tmp, $dir))
            {
                                // get date time stamp
                                $today=getdate();
                                $dt=$today['year']."-".
$today['mon']."-".$today['mday']."
".$today['hours'].":".$today['minutes'].":".$today['seconds'];
                                //add file and directory info to the
database for the operation
                                $connect->addFileTodb($_SESSION['o_id'],
$filename, $dir, $dt);
            }
            else
            {
                // error moving file. check file permissions.
                unlink($file_tmp);
                echo '<strong>Error:</strong> Unable to move file to
designated directory.';
            }
        }
        else
        {
            // file seems suspicious... delete file and error out.
            unlink($file_tmp);
            echo '<strong>Error:</strong> File does not appear to be a
valid upload. Could be a file attack.';
        }
    }
    else
    {
        // Kill temp file, if any, and display error.
        if ($file_tmp != '')
        {
            unlink($file_tmp);
        }

        switch ($file_err)
        {
            case '0':
                echo 'That is not a valid file. 0 byte length.';
                break;

            case '1':
                echo 'This file, at ' . $filesize . ' bytes, exceeds
the maximum allowed file size as set in <em>php.ini</em>. '.
                'Please contact your system admin.';
                break;

            case '2':
                echo 'This file exceeds the maximum file size specified
in your HTML form.';
                break;

            case '3':
                echo 'File was only partially uploaded. This could be
the result of your connection '.
                'being dropped in the middle of the upload.';

            case '4':
                echo 'You did not upload anything... Please go back and
select a file to upload.';
                break;
        }
    }
}

Thanks in advance
Angelo
--------------------------------------------------------------------
Disclaimer
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

attached mail follows:


Angelo binc2 wrote:

>Hi all I am trying to upload a file using PHP.
>
>I can successfully create a folder, but when I try upload the file it
>gives me the following error when using the move_uploaded_file function:
>
>
>Warning: move_uploaded_file(c:/program files/apache
>group/apache/htdocs/zerodocs/40/) [function.move-uploaded-file]: failed
>to create stream: Permission denied in c:\program files\apache
>group\apache\htdocs\zero\opdocument.php on line 80
>
>
Please post only the relevent sections of your code in future messages
instead of the complete script. You are more likely to get an answer then.

This problem reffered to seemed to be caused by the user that owns the
webserver process not having the write permissions for the folder that
you have created. I am sure this would have been discussed in the user
contributed comments under the file uploaded sections of the manual.
Usually giving write permissions is all that it would take.

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


OK, after three days of increasingly frustrating tinkering with configs, logs,
permissions, compiling, recompiling of mysql, apache, php, and a lot
of permutations and combinations of flags, options, settings and what have
you, I finally found the cause of the problem as described in my posting.

To the possible benefit of others I will post that solution here now.

It appears that all the time, since php-4.3.7, I had it compiled with
a configure flag of '--enable-embedded-mysqli', and PHP5 was also compiled
with that flag.

So today I (again) recompiled PHP5 without that flag.

Before that I had also recompiled Apache and this time enabled the standard
'prefork' model instead of the 'worker' model that I had had before, because
I seemed to run across a report somewhere that mysqli had problems working
with a 'worker' Apache.

Well that didn't seem to solve my problems, much as I had hoped. Instead,
now it all seemed to work even less. Apache now seemed to pass through the
*.php files just like that (Mozilla then didn't know what to do with them).
Still some very basic *.php scripts still worked (not those calling any
mysqli functions), but another very basic one, that just called phpinfo()
didn't.
This was astonishing, and seemed to lack every rationale. It was just very
erratic behaviour from Apache / PHP now, some very basic php scripts worked
-- some just as basic didn't. Anything with with mysqli calls didn't work.
I was about to give up.

Then I did that recompile of PHP without the '--enable-embedded-mysqli'.
That didn't seem to make much of a difference, although now I could run the
command-line php on the mysqli.php script while the mysqld server was running
and it worked. Hmm, something started working. But still anything from
Mozilla displayed the same erratic behaviour as before. Killing, starting
restarting Apache, it remained erratic, and even erratic in its erreticism...

Then it occured to me, might it help flushing Mozilla's cache? So I flushed
the cache, and ... well, it all started working.

To me the biggest morale to this story is, if you're testing PHP and/or php
scripts, ALWAYS FLUSH THAT BROWSER CACHE (or setting it to 0 should work I
guess). (Pardon my shouting but I think it's in order here).

Right now I've reinstated the strict permissions on mysql's datadir and
databases, which I had opened up in the belief that that would work.

Alive and kicking -- End of story.

BJ

attached mail follows:


I have a need for an encryption program that can encrypt/decrypt data. I
previously had a programmer build me a C program that compiled and runs on
the command line, which I would then call via PHP.

We are experiencing with this however, a 5-7% fail rate on the decryption -
not acceptable for the application. At this point the programmer is blaming
the mcrypt libraries for the problem - I suspect not, but not being a C
programmer, cannot refute this.

So, the next step was to use Mcrypt Libraries through PHP. They are not
compiled into our PHP version - 4.1.2, and we cannot re-compile PHP. First
reason is that the server runs Plesk 5, and the original compile was done
off server (you know - host provider - install via disk image, etc).
Bottom line, PHP cannot be re-compiled with mcrypt.

Finally, I tried dynamically loading he libmcrypt.so library - compiled just
this morning specifically for this application. No go. It would not load
from the php.ini file, and when I tried to load it on a page, using the dl()
function - I got the error:

Invalid library (maybe not a PHP library) 'libmcrypt.so'

So at this point I am at a total loss. I cannot hash the data, I need it to
be decrypted at another point as well.

So, I guess I am asking this:

1. Is there any reasonably priced C programmer that would like to talk to
me about fixing/re-writing this encryption program.
2. Have I overlooked anything with the dynamic loading of the mcrypt
libraries.
And
3. Am I missing another alternative for securely encrypting/decrypting data
in PHP? Short of re-compiling or such.

Thanks in advance!

--
Cheers

Mike Morton

****************************************************
*
* Tel: 905-465-1263
* Email: mikewebtraxx.com
*
****************************************************

"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up with
Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey

attached mail follows:


does anyone know how I can put an image on a page that disappears when the
data that I wanted to get has loaded?

--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 Ext 216
Fax : 00-34-915228673
email: dianahotelkey.com
Web : http://www.hotelkey.com
      http://www.destinia.com

attached mail follows:


Diana Castillo wrote:

>does anyone know how I can put an image on a page that disappears when the
>data that I wanted to get has loaded?
>
>
people in a javascript list may know

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


You say "has loaded", do you mean dynamic without submitting?
If so, the answer is dhtml, fx JavaScript.

/egil

"Diana Castillo" <dianahotelkey.com> wrote in message
news:20040705160545.76794.qmailpb1.pair.com...
> does anyone know how I can put an image on a page that disappears when the
> data that I wanted to get has loaded?
>
>
> --
> Diana Castillo
> Global Reservas, S.L.
> C/Granvia 22 dcdo 4-dcha
> 28013 Madrid-Spain
> Tel : 00-34-913604039 Ext 216
> Fax : 00-34-915228673
> email: dianahotelkey.com
> Web : http://www.hotelkey.com
> http://www.destinia.com

attached mail follows:


what do you mean by fx Javascript ?
what I want really is something like what happens on this page when you
search for a flight,
http://www.expedia.net/daily/home/default.asp
an in between page comes on until the information about flights is loaded.
how can I do that with php?
"Egil Berntsen" <990502hig.no> wrote in message
news:20040705161311.8570.qmail
pb1.pair.com...
> You say "has loaded", do you mean dynamic without submitting?
> If so, the answer is dhtml, fx JavaScript.
>
> /egil
>
> "Diana Castillo" <dianahotelkey.com> wrote in message
> news:20040705160545.76794.qmailpb1.pair.com...
> > does anyone know how I can put an image on a page that disappears when
the
> > data that I wanted to get has loaded?
> >
> >
> > --
> > Diana Castillo
> > Global Reservas, S.L.
> > C/Granvia 22 dcdo 4-dcha
> > 28013 Madrid-Spain
> > Tel : 00-34-913604039 Ext 216
> > Fax : 00-34-915228673
> > email: dianahotelkey.com
> > Web : http://www.hotelkey.com
> > http://www.destinia.com

attached mail follows:


Hi all,

Is there any simple, safe, and efficiency way to do file locking over NFS?

Thanks.