Re: [PHP] php-ldap works in commandline but not through browser

2009-10-15 Thread xfedex
Did you check both php.ini files?

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



Re: [PHP] security/deployment issue

2009-10-15 Thread xfedex
> Rsync should work fine, but personally I like to see exactly which
> changes are being deployed especially when deploying to production.
> While I realise this recommendation is not Open Source software, I
> have found it to be an excellent piece of software for this task. I
> use Beyond Compare which has the ability to connect over SFTP or SCP
> as well as regular FTP. It allows you to 'diff' the files as you go
> and view exact changes and you can transfer only the changes you want
> or whole files if you choose to. I would not be surprised if an Open
> Source equivalent exists.

What about SVN? you can do a svn export. Or you can have a working
copy for production too.
Just dont forget to deny access to .svn in your webserver.
Here are directives for Apache:


Order allow,deny
Deny from all


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



[PHP] Re: PHP function unpack

2009-10-15 Thread Gabriel Hahmann
Hi,

I've sent this mail a few days ago, but as this list have a very high
traffic maybe my mail disappear from you inbox.

Any help would be appreciated.

Thanks in advance,
Gabriel.

On Sun, Oct 11, 2009 at 4:42 PM, Gabriel Hahmann
 wrote:
> Hi,
>
> I'm new to the list and I've search internet and didn't find an answer
> to my problem.
>
> I'm converting a perl script to PHP and I've done almost everything.
> The only part of the code that I didn't get working on PHP was:
>
> (PERL CODE)
> foreach ($b_length,$b_mac,$b_crlf,$b_crlf,$a_body) {
>        $d_checksum += unpack("%16n*", $_);
> }
>
> The idea is to make a 16-bit checksum of all elements
> ($b_length,$b_mac,$b_crlf,$b_crlf,$a_body).
>
> I'm tried translating the code to:
>
> $arr_checksum = array($b_length,$b_mac,$b_crlf,$b_crlf,$File_Content);
>
> $d_checksum = 0;
> foreach($arr_checksum as $check_elem){
>        $d_check = unpack("n*", $check_elem);
>        for ($i=0;$i<4;$i++){
>                $d_checksum += $d_check["$i"];
>        }
> }
>
> But the result is different. I know that unpack in perl and php are
> different, but I cant find a way to translate the format %16n* of perl
> to php and generate a 16-bit checksum.
>
> Any help will be appreciated.
>
> []'s
> Gabriel.
>

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



[PHP] Built-in Debugging

2009-10-15 Thread Raymond Irving
Hello,


Will be ever see built-in debugging features for PHP?

I kjnow there's xdebug but it's sometimes difficult to get it working. I'm 
hopoing that PHP will one day have intgrated debuging features that can be 
easily enabled or disabled:




[PHP] Built-in Debugging

2009-10-15 Thread Raymond Irving
Hello,

Will be ever see built-in debugging features for PHP?

I know there's xdebug but it's sometimes difficult to get it working. I'm 
hoping that PHP will one day have integrated debugging features that can be 
easily enabled or disabled:





Re: [PHP] php-ldap works in commandline but not through browser

2009-10-15 Thread chima s
Hi,

ldap extension was loaded in the php.ini file.

php -i |grep ldap
/etc/php.d/ldap.ini,
ldap
RCS Version => $Id: ldap.c,v 1.161.2.3.2.14 2008/12/31 11:17:39 sebastian Exp $


Regards
Chima.s


On Thu, Oct 15, 2009 at 7:17 PM,   wrote:
> Did you check both php.ini files?
>
> --
> 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] Need unrounded precision

2009-10-15 Thread Kim Madsen

Hello

Andre Dubuc wrote on 2010-01-02 02:20:

Hi,

I need to extract the first digit after the decimal point from a number such 
as 28.56018, which should be '5'.


Since no one came up with the simple solution:

$num = "28.56018";
ereg("^[0-9]+\.([0-9]){1}", trim($num), $regs);
if($regs[1])
  $digit = $regs[1];
else
  print "no digit found";

--
Kind regards
Kim Emax


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