Re: [PHP] Protected ZIP file with password

2008-02-20 Thread Daniel Brown
On Feb 19, 2008 9:52 PM, Richard Lynch [EMAIL PROTECTED] wrote: For ultimate geekiness, you can install a custom PHP extension I wrote to print out the error message matching 127: http://l-i-e.com/perror :-) Hmm that could come in handy. I'm going to take advantage of your generosity

Re: [PHP] Protected ZIP file with password

2008-02-19 Thread Richard Lynch
You can dig out what 127 means from perror, or you can just go with the usual suspects of paths and permissions. PHP does not run as you from the command line and does not use your shell and does not have your environment. Use FULL PATH everywhere. E.g.: exec(/usr/bin/zip

Re: [PHP] Protected ZIP file with password

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 4:16 pm, Shawn McKenzie wrote: In your php code you'll need the full path to biblioteca.php and to t.zip and the web user will need write permissions to the dir where you create t.zip. nitpik: The user needs write permission to just t.zip Unless zip does something

Re: [PHP] Protected ZIP file with password

2008-02-19 Thread Richard Lynch
Use exec() and get any output that may be happening. I also suspect that the PATH you are using isn't a TRUE path, but some hacked up thing from your webhost. Look at the output of ?php phpinfo();? in biblioteca and see what PHP thinks is the current working directory. I had one webhost where

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Nick, Thanks again for your worry. So, let's go, here goes my situation. I'm exporting data to another system. That system have an option to be feed by a password protected zip file. The export activity will be occur in this way: the user will generate the file on my application and will put

RE: [PHP] Protected ZIP file with password

2008-02-18 Thread Bastien Koert
] CC: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Protected ZIP file with password Nick, Thanks again for your worry. So, let's go, here goes my situation. I'm exporting data to another system. That system have an option to be feed by a password protected zip file

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
PROTECTED] CC: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Protected ZIP file with password Nick, Thanks again for your worry. So, let's go, here goes my situation. I'm exporting data to another system. That system have an option to be feed by a password protected zip file

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Wolf
Petrus Bastos [EMAIL PROTECTED] wrote: Bastien, I thank your help, but I think that your idea doesn't resolve my problem because I need generate that file online when user clicks on a link.The file must be obtained at the time he clicks. Thanks anyway, Petrus Bastos. !--

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Wolf, I thank your help! I have all zip methods available, but don't have any method that generate password protected zip file. Thanks anyway, Petrus Bastos. On Feb 18, 2008 1:10 PM, Wolf [EMAIL PROTECTED] wrote: Petrus Bastos [EMAIL PROTECTED] wrote: Bastien, I thank your

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Daniel Brown
On Feb 18, 2008 11:18 AM, Petrus Bastos [EMAIL PROTECTED] wrote: Wolf, I thank your help! I have all zip methods available, but don't have any method that generate password protected zip file. In all honesty, Petrus, since none of the suggestions made to you will work in your

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Richard Lynch
On Sun, February 17, 2008 1:57 pm, Nick Stinemates wrote: Petrus Bastos wrote: Hi Nick, Sorry, but I forgot to tell you that I can't use this exec neither system commands because they are disabled for security precautions. So, Do you have any other ideas on how can I do that?

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Richard Lynch
On Mon, February 18, 2008 5:59 am, Petrus Bastos wrote: Thanks again for your worry. So, let's go, here goes my situation. I'm exporting data to another system. That system have an option to be feed by a password protected zip file. The export activity will be occur in this way: the

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Daniel, But I can install PEAR/PECL modules, but I didn't see any module that do what I want. Do you know any module that create password protected zip files? Thanks again, Petrus Bastos. On Feb 18, 2008 1:29 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Feb 18, 2008 11:18 AM, Petrus

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Nick Stinemates
Richard Lynch wrote: On Sun, February 17, 2008 1:57 pm, Nick Stinemates wrote: Petrus Bastos wrote: Hi Nick, Sorry, but I forgot to tell you that I can't use this exec neither system commands because they are disabled for security precautions. So, Do you have any other ideas

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Nick Stinemates
Petrus Bastos wrote: Richard, Unfortunately, I can't get out of the zip password rut because the destination system read only this file format. I can't change the destination system. Thanks, Petrus. On Feb 18, 2008 2:11 PM, Richard Lynch [EMAIL PROTECTED] wrote: On Mon,

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Casey
On Feb 18, 2008 9:07 AM, Richard Lynch [EMAIL PROTECTED] wrote: On Sun, February 17, 2008 1:57 pm, Nick Stinemates wrote: Petrus Bastos wrote: Hi Nick, Sorry, but I forgot to tell you that I can't use this exec neither system commands because they are disabled for security

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Richard, Unfortunately, I can't get out of the zip password rut because the destination system read only this file format. I can't change the destination system. Thanks, Petrus. On Feb 18, 2008 2:11 PM, Richard Lynch [EMAIL PROTECTED] wrote: On Mon, February 18, 2008 5:59 am, Petrus

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Hey folks, I got access to exec method for test! But, it's not working... :( the function returns 127 and don't create the zip file, I've tested on Linux command tool and works! Do you have any idea why didn't work? Thanks again and sorry for the inconvenience, Petrus Bastos. On Feb 18,

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Nick Stinemates
Petrus Bastos wrote: Hey folks, I got access to exec method for test! But, it's not working... :( the function returns 127 and don't create the zip file, I've tested on Linux command tool and works! Do you have any idea why didn't work? Thanks again and sorry for the inconvenience,

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
I'm testing on FreeBSD. I can use any command through system(), but the zip command doesn't works! I don't know why. On Feb 18, 2008 4:06 PM, Nick Stinemates [EMAIL PROTECTED] wrote: Petrus Bastos wrote: Hey folks, I got access to exec method for test! But, it's not working... :(

RE: [PHP] Protected ZIP file with password

2008-02-18 Thread Jay Blanchard
[snip] I'm testing on FreeBSD. I can use any command through system(), but the zip command doesn't works! I don't know why. [/snip] Have you tried the command from the command line without PHP to make sure it works? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Yes. On Feb 18, 2008 5:50 PM, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] I'm testing on FreeBSD. I can use any command through system(), but the zip command doesn't works! I don't know why. [/snip] Have you tried the command from the command line without PHP to make sure it works?

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
zip program is installed. I'd type whereis and returned /usr/ports/archivers/zip. I've change my zip command and put th whole path. Now return error 126. :( On Feb 18, 2008 5:51 PM, Stut [EMAIL PROTECTED] wrote: Petrus Bastos wrote: I'm testing on FreeBSD. I can use any command through

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Shawn McKenzie
Shawn McKenzie wrote: Petrus Bastos wrote: zip program is installed. I'd type whereis and returned /usr/ports/archivers/zip. I've change my zip command and put th whole path. Now return error 126. :( On Feb 18, 2008 5:51 PM, Stut [EMAIL PROTECTED] wrote: Petrus Bastos wrote: I'm testing

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Daniel Brown
On Feb 18, 2008 4:05 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: Umm, it's been a while for me on BSD, but isn't '/usr/ports/archivers/zip' a directory holding sources to build zip? Yes, Shawn, you're correct. Ports are (on BSD and MacOS) for automated installations like DEBs and RPMs on

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Unfortunately, I don't have access to root user here. It was a miracle get access to system command. I have to resolve this problem without root user. :( On Feb 18, 2008 6:08 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: Shawn McKenzie wrote: Petrus Bastos wrote: zip program is installed. I'd

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Ok. I've tried the command again and returned /usr/local/bin/zip... but return the same error... On Feb 18, 2008 6:13 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: Petrus Bastos wrote: Unfortunately, I don't have access to root user here. It was a miracle get access to system command. I have

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Greg Donald
On 2/18/08, Shawn McKenzie [EMAIL PROTECTED] wrote: cd /usr/ports/archivers/zip make install clean zip pkg_add -r zip done. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Wolf
Petrus Bastos [EMAIL PROTECTED] wrote: I'm testing on FreeBSD. I can use any command through system(), but the zip command doesn't works! I don't know why. ! -- SNIP -- According to Google:

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Stut
Petrus Bastos wrote: I'm testing on FreeBSD. I can use any command through system(), but the zip command doesn't works! I don't know why. Is zip installed? AFAIK it's not by default. Do a system('whereis zip'); to see. -Stut -- http://stut.net/ -- PHP General Mailing List

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Shawn McKenzie
Greg Donald wrote: On 2/18/08, Shawn McKenzie [EMAIL PROTECTED] wrote: cd /usr/ports/archivers/zip make install clean zip pkg_add -r zip done. Sure, if you want to miss all the linker and compiler goodies :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Shawn McKenzie
Petrus Bastos wrote: Unfortunately, I don't have access to root user here. It was a miracle get access to system command. I have to resolve this problem without root user. :( On Feb 18, 2008 6:08 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: Shawn McKenzie wrote: Petrus Bastos wrote: zip

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
I'd look at parameters and my command is ok. On Feb 18, 2008 5:51 PM, Nick Stinemates [EMAIL PROTECTED] wrote: Petrus Bastos wrote: I'm testing on FreeBSD. I can use any command through system(), but the zip command doesn't works! I don't know why. On Feb 18, 2008 4:06 PM, Nick

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Shawn McKenzie
Petrus Bastos wrote: zip program is installed. I'd type whereis and returned /usr/ports/archivers/zip. I've change my zip command and put th whole path. Now return error 126. :( On Feb 18, 2008 5:51 PM, Stut [EMAIL PROTECTED] wrote: Petrus Bastos wrote: I'm testing on FreeBSD. I can use

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Nick Stinemates
Petrus Bastos wrote: I'm testing on FreeBSD. I can use any command through system(), but the zip command doesn't works! I don't know why. On Feb 18, 2008 4:06 PM, Nick Stinemates [EMAIL PROTECTED] wrote: Petrus Bastos wrote: Hey folks, I got access to exec method for test!

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Actually, I don't know anything about FreeBSD. I never used this system. But, here my zip command works fine at command line, why doesn't works with PHP? On Feb 18, 2008 6:28 PM, Shawn McKenzie [EMAIL PROTECTED] wrote: Greg Donald wrote: On 2/18/08, Shawn McKenzie [EMAIL PROTECTED]

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Wolf
Petrus Bastos [EMAIL PROTECTED] wrote: Actually, I don't know anything about FreeBSD. I never used this system. But, here my zip command works fine at command line, why doesn't works with PHP? ! -- SNIP -- Have you talked with your server admins about the use of zip? Sounds

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Wolf
Petrus Bastos [EMAIL PROTECTED] wrote: Wolf, I'm sure actually working from the command line. /usr/local/bin/zip -P t.zip biblioteca.php adding: biblioteca.php (deflated 73%) On Feb 18, 2008 6:37 PM, Wolf [EMAIL PROTECTED] wrote: Petrus Bastos [EMAIL

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Shawn McKenzie
Greg Donald wrote: On 2/18/08, Shawn McKenzie [EMAIL PROTECTED] wrote: Sure, if you want to miss all the linker and compiler goodies :-) I'm guessing that'd be non-issue for an obviously inexperienced FreeBSD user. But I'm guessing he'd think it was cool. Also, he's not root so I assume

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Greg Donald
On 2/18/08, Petrus Bastos [EMAIL PROTECTED] wrote: Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/zip.tbz: File unavailable (e.g., file not found, no access) pkg_add: unable to fetch

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Wolf, I'm sure actually working from the command line. /usr/local/bin/zip -P t.zip biblioteca.php adding: biblioteca.php (deflated 73%) On Feb 18, 2008 6:37 PM, Wolf [EMAIL PROTECTED] wrote: Petrus Bastos [EMAIL PROTECTED] wrote: Actually, I don't know anything about

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/zip.tbz: File unavailable (e.g., file not found, no access) pkg_add: unable to fetch ' ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.1-release/Latest/zip.tbz' by URL :( On Feb 18, 2008

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Stut
Petrus Bastos wrote: Actually, I don't know anything about FreeBSD. I never used this system. But, here my zip command works fine at command line, why doesn't works with PHP? Is here the server or your local machine? If zip works fine on the command line on the server then it's installed

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Greg Donald
On 2/18/08, Shawn McKenzie [EMAIL PROTECTED] wrote: Sure, if you want to miss all the linker and compiler goodies :-) I'm guessing that'd be non-issue for an obviously inexperienced FreeBSD user. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
I've tried. returned Array ( ) 127 On Feb 18, 2008 6:58 PM, Daniel Brown [EMAIL PROTECTED] wrote: On Feb 18, 2008 4:55 PM, Petrus Bastos [EMAIL PROTECTED] wrote: system(/usr/local/bin/zip -P t.zip biblioteca.php,$ret_val); that's my code and even zip with full path, return

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Wolf
Petrus Bastos [EMAIL PROTECTED] wrote: system(/usr/local/bin/zip -P t.zip biblioteca.php,$ret_val); that's my code and even zip with full path, return $ret_val = 127; On Feb 18, 2008 6:43 PM, Wolf [EMAIL PROTECTED] wrote: Petrus Bastos [EMAIL PROTECTED] wrote:

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
Results the same thing. On Feb 18, 2008 6:59 PM, Wolf [EMAIL PROTECTED] wrote: Petrus Bastos [EMAIL PROTECTED] wrote: system(/usr/local/bin/zip -P t.zip biblioteca.php,$ret_val); that's my code and even zip with full path, return $ret_val = 127; On Feb 18, 2008 6:43 PM,

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
system(/usr/local/bin/zip -P t.zip biblioteca.php,$ret_val); that's my code and even zip with full path, return $ret_val = 127; On Feb 18, 2008 6:43 PM, Wolf [EMAIL PROTECTED] wrote: Petrus Bastos [EMAIL PROTECTED] wrote: Wolf, I'm sure actually working from the command

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Daniel Brown
On Feb 18, 2008 4:55 PM, Petrus Bastos [EMAIL PROTECTED] wrote: system(/usr/local/bin/zip -P t.zip biblioteca.php,$ret_val); that's my code and even zip with full path, return $ret_val = 127; Try this instead: ? exec('/usr/local/bin/zip -P t.zip biblioteca.php',$ret,$err); echo

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Petrus Bastos
I've tried without success... system(/usr/local/bin/zip -P /.automount/ipojuca/export/homeg03/golapa/public_html/mapdenguepe128/site/php/biblioteca/t.zip /.automount/ipojuca/export/homeg03/golapa/public_html/mapdenguepe128/site/php/biblioteca/biblioteca.php,$ret_val); On Feb 18, 2008 7:16

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Stut
Petrus Bastos wrote: system(/usr/local/bin/zip -P t.zip biblioteca.php,$ret_val); Try a full path . here - ^^^ that's my code and even zip with full path, return $ret_val = 127; AFAIK that's the error code for command not found which probably means PHP

Re: [PHP] Protected ZIP file with password

2008-02-18 Thread Shawn McKenzie
In your php code you'll need the full path to biblioteca.php and to t.zip and the web user will need write permissions to the dir where you create t.zip. -Shawn Petrus Bastos wrote: Wolf, I'm sure actually working from the command line. /usr/local/bin/zip -P t.zip biblioteca.php

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Nick Stinemates
Petrus Bastos wrote: Hey folks, Do you know how can I create a protected zip file with password? Is there anyway? I've search on the internet, but without success. Thank's in advance, Petrus Bastos. The easiest way to accomplish this would be to write a wrapper function using the

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Petrus Bastos
Hi Nick, Sorry, but I forgot to tell you that I can't use this exec neither system commands because they are disabled for security precautions. So, Do you have any other ideas on how can I do that? Thanks for your help, Petrus Bastos. On Feb 17, 2008 5:15 AM, Nick Stinemates [EMAIL

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Daniel Brown
On Feb 16, 2008 3:39 PM, Petrus Bastos [EMAIL PROTECTED] wrote: Hey folks, Do you know how can I create a protected zip file with password? Is there anyway? I've search on the internet, but without success. If you have system() access, use something in the exec() family (and be sure

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Nick Stinemates
Petrus Bastos wrote: Hi Nick, Sorry, but I forgot to tell you that I can't use this exec neither system commands because they are disabled for security precautions. So, Do you have any other ideas on how can I do that? Thanks for your help, Petrus Bastos. On Feb 17, 2008 5:15 AM,

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Petrus Bastos
Unfortunately I don't have access to this family of methods because security policy. Lefting this way out, I didn't find anyway on how to do that. If you have any idea or know any module can do that, I'll appreciate to know too! Thanks in advance, Petrus Bastos. On Feb 17, 2008 2:30 PM, Daniel

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Petrus Bastos
Nick, I thank you help! But unfortunalety I didn't find way to do this. I'll continue trying. If you have any other idea, I'll appreciate to hear! Best regards, Petrus Bastos. On Feb 17, 2008 4:57 PM, Nick Stinemates [EMAIL PROTECTED] wrote: Petrus Bastos wrote: Hi Nick, Sorry,

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Chris
Petrus Bastos wrote: Unfortunately I don't have access to this family of methods because security policy. Lefting this way out, I didn't find anyway on how to do that. If you have any idea or know any module can do that, I'll appreciate to know too! See if the pear package does what you want:

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Petrus Bastos
Chris, Thanks for your help, but I think that package can't make what I want. But , I appreciate your help anyway and if you have any other ideas, please let me know! :) Thanks, Petrus Bastos. On Feb 17, 2008 10:38 PM, Chris [EMAIL PROTECTED] wrote: Petrus Bastos wrote: Unfortunately I

Re: [PHP] Protected ZIP file with password

2008-02-17 Thread Nick Stinemates
Petrus Bastos wrote: Chris, Thanks for your help, but I think that package can't make what I want. But , I appreciate your help anyway and if you have any other ideas, please let me know! :) Thanks, Petrus Bastos. On Feb 17, 2008 10:38 PM, Chris [EMAIL PROTECTED] wrote: Petrus