php-general Digest 16 Jun 2011 05:11:58 -0000 Issue 7360
Topics (messages 313550 through 313554):
Re: Import symbol table into function' scope.
313550 by: David Harkness
PHP and Windows 7 64-bit
313551 by: Byron Como
Re: PHP and Windows 7 g6-bit
313552 by: Tim Thorburn
Re: PHP and Windows 7 g6-bit (Solved)
313553 by: Byron Como
How to PHP get bit depth of a given PNG image file?
313554 by: Nam Gi VU
Administrivia:
To subscribe to the digest, e-mail:
[email protected]
To unsubscribe from the digest, e-mail:
[email protected]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
2011/6/15 Дмитрий Степанов <[email protected]>
> So I wonder if there is any way to import scope (symbol table) into the
> method DBReader::readSomething()?
>
Since you're using call_user_func_array() to call your internal methods
already (just to expose protected methods publicly?), you could add $DB as a
parameter.
public function __call($method, $args) {
array_unshift($args, $this->DB);
return call_user_func_array( array( $this, $method), $args);
}
protected function readSomething($DB) {
$DB->query(...);
$DB->numRows();
...
}
I would advise getting used to the $this-> everywhere. I can from Java where
that's not required but don't really mind it anymore. However, the above
would work and be automatic once you added the parameter to each method.
Peace,
David
--- End Message ---
--- Begin Message ---
Does the precompiled windows binary work on win 7 64?
I downloaded the apache installer, works with no problems.
I got the php5 VC6 x86 Thread Safe version. It says "x86" so I'm
guessing that's the problem. I can't find a current 64-bit version.
Error message:
Faulting application name: httpd.exe, version: 2.2.19.0, time stamp:
0x4dd6eda8
Faulting module name: php5ts.dll, version: 5.2.17.17, time stamp: 0x4d25fb49
Exception code: 0xc0000005
Fault offset: 0x000f424c
Faulting process id: 0xa7c
Faulting application start time: 0x01cc2b64b44cc59e
Faulting application path: C:\server\Apache2.2\bin\httpd.exe
Faulting module path: C:\server\PHP\php5ts.dll
Report Id: f2e941ea-9757-11e0-a2f1-005056c00008
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On 6/15/2011 11:37 AM, Byron Como wrote:
Does the precompiled windows binary work on win 7 64?
It does, however if you're using Apache as your webserver, for PHP 5.3+
you won't be able to use the binaries from apache.org for Windows.
There is a link to Apache Lounge found here:
http://windows.php.net/download/ which instructs you to download a VC9
compiled version of Apache.
If you're using IIS, I think you can just download the version of PHP
you're after and go.
--- End Message ---
--- Begin Message ---
On 6/15/2011 1:59 PM, Tim Thorburn wrote:
On 6/15/2011 11:37 AM, Byron Como wrote:
Does the precompiled windows binary work on win 7 64?
It does, however if you're using Apache as your webserver, for PHP
5.3+ you won't be able to use the binaries from apache.org for
Windows. There is a link to Apache Lounge found here:
http://windows.php.net/download/ which instructs you to download a VC9
compiled version of Apache.
If you're using IIS, I think you can just download the version of PHP
you're after and go.
The documentation on this page:
http://windows.php.net/download/
... is wrong/out of date and should be corrected. If I am mistaken I
humbly apologize.
Sincerly,
Byron Como
--- End Message ---
--- Begin Message ---
Hi everyone,
In PHP code, given an .png image path, I need to detect the bit-depth of
that image. How can I do that?
I've tried to use getImageSize() and read the bits as below sample code but
it always returns '8' for 24-bits/32-bits image.
Please help.
class Utils {
//Ham de lay bits cua image
public static function getBits($image) {
$info = getImageSize($image);
return $info['bits'];
}
}
Hope to hear from all of you!
Regards,
Nam.
p.s I also post this issue on stackoverflow.com which is
here<http://stackoverflow.com/questions/6355692/how-to-php-get-bit-depth-of-a-given-png-image-file>
.
--- End Message ---