Re: [PHP] Problems with an extension

2009-06-28 Thread Daniel Brown
On Sun, Jun 28, 2009 at 10:56, Eric A.
Boneymailingli...@vanhlebarsoftware.com wrote:
 So I am developing a custom extension and I am having a issue. I have a header
 file that I need included in the project. If I #include the header file
 everything compiles and makes just fine, but after restarting the web server
 the extension won't load.

Eric,

Custom extensions programming is in C/C++ (as also indicated by
your #include reference), which is beyond the scope of this list.
Unfortunately, there is not an official dedicated list for extensions
developers, but if it's not urgent, you can email me privately at
danbr...@php.net and I'll see if I can help you out.

-- 
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Ask me about our fully-managed servers and proactive management
clusters starting at just $200/mo.!

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



Re: [PHP] Problems with an extension

2009-06-28 Thread Eric A. Boney
On Sunday 28 June 2009 11:00:48 you wrote:
 On Sun, Jun 28, 2009 at 10:56, Eric A.

 Boneymailingli...@vanhlebarsoftware.com wrote:
  So I am developing a custom extension and I am having a issue. I have a
  header file that I need included in the project. If I #include the header
  file everything compiles and makes just fine, but after restarting the
  web server the extension won't load.

 Eric,

 Custom extensions programming is in C/C++ (as also indicated by
 your #include reference), which is beyond the scope of this list.
 Unfortunately, there is not an official dedicated list for extensions
 developers, but if it's not urgent, you can email me privately at
 danbr...@php.net and I'll see if I can help you out.
Thanks Dan:

I thought it might be beyond this list, but I figured it might be worth the 
shot. It is not urgent at all, so I will drop you a private message with a 
more detailed explanation and if you can help great, if not, I'll keep poking 
around at it.

-Eric


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



Re: [PHP] Problems with apc extension on wamp server.

2009-06-17 Thread Valentinas Bakaitis
Hi.

Yes, as it turned out, the extension was not loaded. While following
some tutorial i added only apc.rfc1867 = 1 to php.ini. Turns out
that this particular line turns on one of apc functions (file
tracking), but not the apc itself.

However, now when i have apc turned on i still have a problem with
file upload tracking:
the apc_fetch(upload_xxx) returns information only when the file
download is finished. while it is in progress, the result is false(0).

Any ideas?



2009/6/17 Jonathan Tapicer tapi...@gmail.com:
 Hi,

 Does the extension appear on a phpinfo()?

 Seems like the extension isn't loaded.

 Jonathan


 On Tue, Jun 16, 2009 at 5:20 PM, Valentinas
 Bakaitisv.bakai...@gmail.com wrote:
 Hello!

 I am trying to track file upload progress using APC extension.
 However, when trying to use, it gives

 Fatal error: Call to undefined function apc_fetch() in
 C:\wamp\www\old\getprogress.php on line 3

 I am using WAMP 2.0, with php 5.2.8
 APC extension appear on extensions list and is enabled.

 Any ideas what i am doing wrong?

 here is the code of getprogress.php:

 *
 *
 $upload = apc_fetch('upload_1');
   if ($upload) {
        if ($upload['done'])
            $percent = 100;
        else if ($upload['total'] == 0)
            $percent = 0;
        else
            $percent = $upload['current'] / $upload['total'] * 100;



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



Re: [PHP] Problems with apc extension on wamp server.

2009-06-17 Thread Valentinas Bakaitis
Found the problem:

input type=hidden name=APC_UPLOAD_PROGRESS id=progress_key value=1 /

must always be before file input in the form.

2009/6/17 Valentinas Bakaitis v.bakai...@gmail.com:
 Hi.

 Yes, as it turned out, the extension was not loaded. While following
 some tutorial i added only apc.rfc1867 = 1 to php.ini. Turns out
 that this particular line turns on one of apc functions (file
 tracking), but not the apc itself.

 However, now when i have apc turned on i still have a problem with
 file upload tracking:
 the apc_fetch(upload_xxx) returns information only when the file
 download is finished. while it is in progress, the result is false(0).

 Any ideas?



 2009/6/17 Jonathan Tapicer tapi...@gmail.com:
 Hi,

 Does the extension appear on a phpinfo()?

 Seems like the extension isn't loaded.

 Jonathan


 On Tue, Jun 16, 2009 at 5:20 PM, Valentinas
 Bakaitisv.bakai...@gmail.com wrote:
 Hello!

 I am trying to track file upload progress using APC extension.
 However, when trying to use, it gives

 Fatal error: Call to undefined function apc_fetch() in
 C:\wamp\www\old\getprogress.php on line 3

 I am using WAMP 2.0, with php 5.2.8
 APC extension appear on extensions list and is enabled.

 Any ideas what i am doing wrong?

 here is the code of getprogress.php:

 *
 *
 $upload = apc_fetch('upload_1');
   if ($upload) {
        if ($upload['done'])
            $percent = 100;
        else if ($upload['total'] == 0)
            $percent = 0;
        else
            $percent = $upload['current'] / $upload['total'] * 100;




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



Re: [PHP] Problems with apc extension on wamp server.

2009-06-16 Thread Jonathan Tapicer
Hi,

Does the extension appear on a phpinfo()?

Seems like the extension isn't loaded.

Jonathan


On Tue, Jun 16, 2009 at 5:20 PM, Valentinas
Bakaitisv.bakai...@gmail.com wrote:
 Hello!

 I am trying to track file upload progress using APC extension.
 However, when trying to use, it gives

 Fatal error: Call to undefined function apc_fetch() in
 C:\wamp\www\old\getprogress.php on line 3

 I am using WAMP 2.0, with php 5.2.8
 APC extension appear on extensions list and is enabled.

 Any ideas what i am doing wrong?

 here is the code of getprogress.php:

 *
 *
 $upload = apc_fetch('upload_1');
   if ($upload) {
        if ($upload['done'])
            $percent = 100;
        else if ($upload['total'] == 0)
            $percent = 0;
        else
            $percent = $upload['current'] / $upload['total'] * 100;


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



Re: [PHP] problems with gnupg extension.

2009-04-21 Thread Ian
On 20 Apr 2009 at 11:37, Ray wrote:

snip

 Any suggestions, Anyone?
 Ray

Hi,

I adapted these scripts for my own user and have not had any problems:

http://www.theoslogic.com/scripts/php-gpg/

It does not use the gnupg extension at all but popen() or proc_open().

Regards

Ian
-- 




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



Re: [PHP] problems with gnupg extension.

2009-04-20 Thread Ray
On Monday 13 April 2009 10:17:28 Ray wrote:
 Hello all,

 I'm trying to use the gnupg extension and I think everything is properly
 installed.

 I'm just using test data. I'm encrypting and then immediately decrypting.
 But the decryption is failing with a unhelpful error message.

 error message :
 Warning: gnupg::decrypt() [gnupg.decrypt]: decrypt failed in
 /path/to/test2.php on line 18

 any help or suggestions would be very much appreciated. details follow.
 Ray



 full output:

 raw data: this is a test


 encoded data:

  -BEGIN PGP MESSAGE-
 Version: GnuPG v2.0.11 (FreeBSD)

 hQIOA9qOyyMyQ2/bEAgArxLuVw5eShkL+/g9SCGcBm5/J1G78zrh6dWFisPFqWg1
 MP3zj/QnWiD9zEtLmGJazP51pV2TpySpEbILze8sz6c/imRBYLrHhbxO6W1LJqXq
 rALUPDIe4qKtM7mC+K9EdFdkYRzWxi45eTK1DQtQazhqelWIb1NuaVu8vUKk/pIy
 duE0juP2j+8OHIlx36sUcATkvBO5a7Ak9tGUT5T5lRqjMzKa6TPuCsZukmVh43BG
 uqpz7H83LinwOCfUnyq3R2e/vIM2cv8t7jz17acOfYslonMxNz54i8jR8COmCmLY
 NhGORZUSLauyWGxAIDvkDcTFD4Jd5KxaXcMPEE7zwAf9HUWmKtqOqn825AjlBxNj
 7gXEOtpsRMiYiYuISzHvitpPWXQPOPsoGnPRZZBvCNJcvAgg6hMx5c4Y7tGXTsma
 2hkC9f4959kBwiGAFnQxJqz2pMDW+N3X23f+kwSrU7KoNrhnxUV1ywcUGaebwYM8
 emIygCm6mS7T81JtXxhMto0sSqeE/zwHc3/03/KP57V7j2tHib4dN9ZOfB6yiubF
 PIwog0JYagjOfyNdGh3vRzvcYdDOqyWMgtY6XpZJwPESJlOADHVt5n844oHthRD3
 MJVjwqjEz5qQiPq+kOmd4AdkpkEkRcCweYNEXVXPxpmlrduuu8kc4wsA5v3YXZ/C
 x9JNAVKW9tdPSxDoxbEKyAhVdurQAxmYe7FaCLl74lACQaUg/Otwb86pjUBesgx6
 mXhQv+epG71sKY+LSDxGi8dSgbOOmfI2L09zy9XTEQ4=
 =85vG
 -END PGP MESSAGE-


 [if this line is blank, the decrypt key should have been added correctly]]

 Warning: gnupg::decrypt() [gnupg.decrypt]: decrypt failed in
 /path/to/test2.php on line 18


 decoded data:




 Code:

 ?php
 $raw_data=this is a test;
 $passphrase=test;
 $recipient=m...@example.com;

 putenv('GNUPGHOME=/www/ohfinder/keys');
 $gpg = new gnupg();
 $gpg - seterrormode(gnupg::ERROR_WARNING);
 echo raw data: $raw_databr;
 $gpg-addencryptkey($recipient);
 $encrypted = $gpg-encrypt($raw_data);
 echo brbrencoded data: pre $encrypted/prebr;

 $gpg-adddecryptkey($recipient, $passphrase);
 echo $gpg - geterror();
 echo [if this line is blank, the decrypt key should have been added
 correctly]];
 echo 'br';
 $plaintext = $gpg-decrypt($encrypted);
 echo $gpg - geterror();
 echo brbrdecoded data: pre $plaintext /pre;
 ?


Any suggestions, Anyone?
Ray

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