php-general Digest 19 Apr 2008 13:07:11 -0000 Issue 5413

Topics (messages 273286 through 273299):

Re: OS X 10.5.2
        273286 by: Shawn McKenzie
        273288 by: Eric Butera
        273289 by: Simon Welsh
        273290 by: Eric Butera
        273291 by: Shawn McKenzie

Re: Socket create with ssl server
        273287 by: Alan Willsher

HTTP Server Written entirely in PHP ?
        273292 by: Kinch Zhang
        273293 by: Hans Zaunere
        273294 by: Manuel Lemos
        273295 by: Kinch Zhang

module access rights
        273296 by: Alain Roger

Re: PHP console script vs C/C++/C#
        273297 by: Per Jessen
        273298 by: Robert Cummings
        273299 by: Per Jessen

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 ---
Lee Perry wrote:
Hi, I need pdo_msql and GD2 extension support in my php environment, but as I am sure you are aware the default build that comes with leopard on the mac is lacking these extensions. what I need is a way to either install them or if I really have to compile php with these included. I have never had to do this as I have been using windows until recently. If I need to install php from source it seems I will also have to compile apache, will this replace the versions of php and apache that are bundled with os x 10.5.2. I'm looking for a clean solution to this problem I don't want multiple versions etc. I have spent over 10 hours on google looking for a solution to this before emailing you and so far there does not seem to be a clear and consistent way to resolve this. I work as a php developer and just got the MacBook Pro thinking it would be nicer to work with, what a nightmare.


Kind Regards,

Lee.

Maybe wait for an Apple guru as I don't use it, but normally you enable extensions in php.ini by uncommenting the line for 'extension=gd.so' or similar. As long as you have your 'extension_dir' set properly and have the gd.so extension there it will load when you restart Apache.

-Shawn

--- End Message ---
--- Begin Message ---
On Fri, Apr 18, 2008 at 8:10 PM, Lee Perry <[EMAIL PROTECTED]> wrote:
> Hi, I need pdo_msql and GD2 extension support in my php environment, but as
> I am sure you are aware the default build that comes with leopard on the mac
> is lacking these extensions. what I need is a way to either install them or
> if I really have to compile php with these included. I have never had to do
> this as I have been using windows until recently. If I need to install php
> from source it seems I will also have to compile apache, will this replace
> the versions of php and apache that are bundled with os x 10.5.2. I'm
> looking for a clean solution to this problem I don't want multiple versions
> etc. I have spent over 10 hours on google looking for a solution to this
> before emailing you and so far there does not seem to be a clear and
> consistent way to resolve this. I work as a php developer and just got the
> MacBook Pro thinking it would be nicer to work with, what a nightmare.
>
>
>  Kind Regards,
>
>  Lee.
>
>  --
>  PHP General Mailing List (http://www.php.net/)
>  To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Check out the entropy.ch build.  I use it at work.  I can't remember
if it has pdo support or not though since I don't use it.

--- End Message ---
--- Begin Message ---

On 19/04/2008, at 2:31, Eric Butera wrote:
On Fri, Apr 18, 2008 at 8:10 PM, Lee Perry <[EMAIL PROTECTED]> wrote:
Hi, I need pdo_msql and GD2 extension support in my php environment, but as I am sure you are aware the default build that comes with leopard on the mac is lacking these extensions. what I need is a way to either install them or if I really have to compile php with these included. I have never had to do this as I have been using windows until recently. If I need to install php from source it seems I will also have to compile apache, will this replace
the versions of php and apache that are bundled with os x 10.5.2. I'm
looking for a clean solution to this problem I don't want multiple versions etc. I have spent over 10 hours on google looking for a solution to this
before emailing you and so far there does not seem to be a clear and
consistent way to resolve this. I work as a php developer and just got the MacBook Pro thinking it would be nicer to work with, what a nightmare.


Kind Regards,

Lee.

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



Check out the entropy.ch build.  I use it at work.  I can't remember
if it has pdo support or not though since I don't use it.

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



I use the build from entropy.ch as well. You'll want the one in the forum (5.2.5b6)

The configure command:

'./configure' '--disable-dependency-tracking' '--prefix=/usr/local/ php5' '--with-apxs2=/usr/sbin/apxs' '--with-config-file-scan-dir=/usr/ local/php5/php.d' '--with-openssl=/usr' '--with-zlib=/usr' '--with- zlib-dir=/usr' '--with-gd' '--with-ldap' '--with-xmlrpc' '--enable- exif' '--enable-soap' '--enable-sqlite-utf8' '--enable-wddx' '--enable- ftp' '--enable-sockets' '--with-bz2=/usr' '--enable-zip' '--enable- pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '-- enable-sysvmsg' '--enable-memory-limit' '--enable-mbstring' '--enable- bcmath' '--enable-calendar' '--with-ming=shared,/usr/local/php5' '-- with-mssql=shared,/usr/local/php5' '--with-mhash=shared,/usr/local/ php5' '--enable-memcache' '--with-imap=../imap-2007' '--with-kerberos=/ usr' '--with-imap-ssl=/usr' '--with-libxml-dir=shared,/usr/local/php5' '--with-xsl=shared,/usr/local/php5' '--with-gettext=/usr/local/php5' '--with-curl=shared,/usr/local/php5' '--with-png-dir=/usr/local/php5' '--with-jpeg-dir=/usr/local/php5' '--enable-gd-native-ttf' '--with- freetype-dir=/usr/local/php5' '--with-mysql=shared,/usr/local/php5' '-- with-mysqli=shared,/usr/local/php5/bin/mysql_config' '--with-pdo- mysql=shared,/usr/local/php5' '--with-pgsql=shared,/usr/local/php5' '-- with-pdo-pgsql=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/ local/php5'

---
Simon Welsh
Admin of http://simon.geek.nz/

Windows is a joke operating system. Hell, it's not even an operating system. NT is Not Tough enough for me either. 95 is how may times it will crash an hour.

http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e



--- End Message ---
--- Begin Message ---
On Fri, Apr 18, 2008 at 10:49 PM, Simon Welsh <[EMAIL PROTECTED]> wrote:
>  Windows is a joke operating system. Hell, it's not even an operating
> system. NT is Not Tough enough for me either. 95 is how may times it will
> crash an hour.

You feel better now?  ;)

--- End Message ---
--- Begin Message ---
Simon Welsh wrote:

On 19/04/2008, at 2:31, Eric Butera wrote:
On Fri, Apr 18, 2008 at 8:10 PM, Lee Perry <[EMAIL PROTECTED]> wrote:
Hi, I need pdo_msql and GD2 extension support in my php environment, but as I am sure you are aware the default build that comes with leopard on the mac is lacking these extensions. what I need is a way to either install them or if I really have to compile php with these included. I have never had to do this as I have been using windows until recently. If I need to install php from source it seems I will also have to compile apache, will this replace
the versions of php and apache that are bundled with os x 10.5.2. I'm
looking for a clean solution to this problem I don't want multiple versions
etc. I have spent over 10 hours on google looking for a solution to this
before emailing you and so far there does not seem to be a clear and
consistent way to resolve this. I work as a php developer and just got the
MacBook Pro thinking it would be nicer to work with, what a nightmare.


Kind Regards,

Lee.

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



Check out the entropy.ch build.  I use it at work.  I can't remember
if it has pdo support or not though since I don't use it.

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



I use the build from entropy.ch as well. You'll want the one in the forum (5.2.5b6)

The configure command:

'./configure' '--disable-dependency-tracking' '--prefix=/usr/local/php5' '--with-apxs2=/usr/sbin/apxs' '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-openssl=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--with-gd' '--with-ldap' '--with-xmlrpc' '--enable-exif' '--enable-soap' '--enable-sqlite-utf8' '--enable-wddx' '--enable-ftp' '--enable-sockets' '--with-bz2=/usr' '--enable-zip' '--enable-pcntl' '--enable-shmop' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-memory-limit' '--enable-mbstring' '--enable-bcmath' '--enable-calendar' '--with-ming=shared,/usr/local/php5' '--with-mssql=shared,/usr/local/php5' '--with-mhash=shared,/usr/local/php5' '--enable-memcache' '--with-imap=../imap-2007' '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--with-libxml-dir=shared,/usr/local/php5' '--with-xsl=shared,/usr/local/php5' '--with-gettext=/usr/local/php5' '--with-curl=shared,/usr/local/php5' '--with-png-dir=/usr/local/php5' '--with-jpeg-dir=/usr/local/php5' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/php5' '--with-mysql=shared,/usr/local/php5' '--with-mysqli=shared,/usr/local/php5/bin/mysql_config' '--with-pdo-mysql=shared,/usr/local/php5' '--with-pgsql=shared,/usr/local/php5' '--with-pdo-pgsql=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/local/php5'

---
Simon Welsh
Admin of http://simon.geek.nz/

Windows is a joke operating system. Hell, it's not even an operating system. NT is Not Tough enough for me either. 95 is how may times it will crash an hour.

http://www.thinkgeek.com/brain/gimme.cgi?wid=81d520e5e


Yeah, how old is that sig?  NT, 95?  You can't buy or even pirate those!

--- End Message ---
--- Begin Message ---
Is it possible to do this with CURL instead of the socket functions

$bindip = 'xx.xx.xx.xx';
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_bind($sock, $bindip);
socket_connect($sock, 'ssl://epp.server.com', 80);

ie bind an IP and connect to an ssl:// address

Trying to connect via the IP instead of ssl://epp.server.com fails.

Thanks


On Fri, Apr 11, 2008 at 12:15 AM, Nirmalya Lahiri <[EMAIL PROTECTED]>
wrote:

> --- Alan Willsher <[EMAIL PROTECTED]> wrote:
>
> > Hi how do you use socket_create with an ssl server
> >
> > ie I would do something like
> >
> > $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
> > socket_bind($sock, $sourceip);
> > socket_connect($sock, 'server.com', 2043);
> >
> > but if I do
> >
> > $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
> > socket_bind($sock, $sourceip);
> > socket_connect($sock, 'ssl://server.com', 2043);
> >
> > I get Warning: socket_connect(): Host lookup failed [-10001]:
> > Unknown host
> >
> > Where do I need to add the ssl://
> >
>
> Hi,
>  before test your sample program, please check the name
> "ssl://server.com" from any DNS server that, the name is really
> present in internet or not. Your problem is basically name resolution
> error from DNS server. To check the name, apply "host" command from
> unix/linux terminal.
>
>  Another point is...as I know the url of ssl encripted page starts
> with "https://"; not with "ssl://"...!!!
>
>
> ---
> Nirmalya Lahiri
> [+91-9433113536]
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Hi, everyone:

I was wondering if there was any HTTP server written entirely in PHP with
the following features:

    1. HTTP/1.1 compliance
    2. Apache mod_rewrite-like URL rewrite support
    3. Native PHP support ( not through CGI/FastCGI )
    4. Support PHP 4.2.0 or above

Nanoweb is an HTTP server written in PHP but It doesn't support all the
above features.

So could anyone give me a clue if you know such a HTTP server ?

Regards,

Kinch Zhang


-- 
Kinch::The Missing Hacker

--- End Message ---
--- Begin Message ---
> I was wondering if there was any HTTP server written entirely in PHP
> with the following features:
> 
>     1. HTTP/1.1 compliance
>     2. Apache mod_rewrite-like URL rewrite support
>     3. Native PHP support ( not through CGI/FastCGI )
>     4. Support PHP 4.2.0 or above
> 
> Nanoweb is an HTTP server written in PHP but It doesn't support all the
> above features.
> 
> So could anyone give me a clue if you know such a HTTP server ?

Why would you want one?  Are you thinking #3

H



--- End Message ---
--- Begin Message ---
Hello,

on 04/19/2008 01:17 AM Kinch Zhang said the following:
> I was wondering if there was any HTTP server written entirely in PHP with
> the following features:
> 
>     1. HTTP/1.1 compliance
>     2. Apache mod_rewrite-like URL rewrite support
>     3. Native PHP support ( not through CGI/FastCGI )
>     4. Support PHP 4.2.0 or above
> 
> Nanoweb is an HTTP server written in PHP but It doesn't support all the
> above features.
> 
> So could anyone give me a clue if you know such a HTTP server ?

You may want to take a look at these HTTP server classes:

http://www.phpclasses.org/bib_server

http://www.phpclasses.org/astahttpd


-- 

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
On Sat, Apr 19, 2008 at 1:06 PM, Manuel Lemos <[EMAIL PROTECTED]> wrote:

> Hello,
>
> on 04/19/2008 01:17 AM Kinch Zhang said the following:
> > I was wondering if there was any HTTP server written entirely in PHP
> with
> > the following features:
> >
> >     1. HTTP/1.1 compliance
> >     2. Apache mod_rewrite-like URL rewrite support
> >     3. Native PHP support ( not through CGI/FastCGI )
> >     4. Support PHP 4.2.0 or above
> >
> > Nanoweb is an HTTP server written in PHP but It doesn't support all the
> > above features.
> >
> > So could anyone give me a clue if you know such a HTTP server ?
>
> You may want to take a look at these HTTP server classes:
>
> http://www.phpclasses.org/bib_server


Bib_server is quite nice, thank you for your link .


> <http://www.phpclasses.org/bib_server>
>
> http://www.phpclasses.org/astahttpd
>
>
> --
>
> Regards,
> Manuel Lemos
>
> PHP professionals looking for PHP jobs
> http://www.phpclasses.org/professionals/
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>



-- 
Kinch::The Missing Hacker

--- End Message ---
--- Begin Message ---
Hi,

i'm very surprised... i did not get any answer to my previous post.
is it because it is good way to do it or because nobody knows ?
thx.

Al.

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

Hi,
i face now a little issue regarding how end user can access to some modules
of my web portal.

Let imagine we have several modules (let say: mod1, mod 2, mod3) and 2 users
(usr1, usr2).
i would like to use a simple way how to established access rights for each
user to grant/forbidden access to modules.
i was thinking that a simple code like on linux could fit this need where i
could have execute/change/read access and this for each module.

for example, usr1 could have stored into DB the access rights 710 (knowing
that rights are based on mod3 | mod2 | mod1)
so usr1 :
- could execute some particular actions, change data and read data from
module 3
- could just read data for module 2
- does not have access to module 1

something similar for usr2 could be setup.

on each php pages/module, the user rights are checked and based on result,
the correct decision is taken by the web portal system.

i would like to know if such technique is a correct one, or if there is
something much more better ?

thanks a lot,

-- 
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008



-- 
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008

--- End Message ---
--- Begin Message ---
Nathan Nobbe wrote:

> On Fri, Apr 18, 2008 at 11:25 AM, Nick Stinemates
> <[EMAIL PROTECTED]> wrote:
> 
>> I don't think there was a single place where I said PHP was faster
>> than C, nor did I imply it.
> 
>> > Depends. Shitty algorithms are shitty, regardless of language
>> > implementation.
> 
> implies that the same algorithm in different languages will not
> perform differently.  thats innacurate. 

No, that is actually a very accurate statement.  An algorithm will
perform equally well regardless of the language chosen.  How well the
actual implementation performs overall is a separate issue.  The
performance or rather efficiency of an algorithm is usually expressed
in the big-O notation, e.g.  O(n), O(log(n)) etc.  

A linear search is O(n), a quick sort is O(nlog(n)) (on average)  - both
perform equally bad or equally well regardless of which language you
choose to implement them in.

> the same algorithm w/o external dependencies, such as db calls, or
> calls to remote systems will run faster in java / c / c++ and others
> than it will in php. 

An algorithm doesn't have external dependencies - but implementations
might. 


/Per Jessen, Zürich


--- End Message ---
--- Begin Message ---
On Sat, 2008-04-19 at 13:08 +0200, Per Jessen wrote:
> Nathan Nobbe wrote:
> 
> > On Fri, Apr 18, 2008 at 11:25 AM, Nick Stinemates
> > <[EMAIL PROTECTED]> wrote:
> > 
> >> I don't think there was a single place where I said PHP was faster
> >> than C, nor did I imply it.
> > 
> >> > Depends. Shitty algorithms are shitty, regardless of language
> >> > implementation.
> > 
> > implies that the same algorithm in different languages will not
> > perform differently.  thats innacurate. 
> 
> No, that is actually a very accurate statement.  An algorithm will
> perform equally well regardless of the language chosen.  How well the
> actual implementation performs overall is a separate issue.  The
> performance or rather efficiency of an algorithm is usually expressed
> in the big-O notation, e.g.  O(n), O(log(n)) etc.  
> 
> A linear search is O(n), a quick sort is O(nlog(n)) (on average)  - both
> perform equally bad or equally well regardless of which language you
> choose to implement them in.
> 
> > the same algorithm w/o external dependencies, such as db calls, or
> > calls to remote systems will run faster in java / c / c++ and others
> > than it will in php. 
> 
> An algorithm doesn't have external dependencies - but implementations
> might. 

You are correct about asymptotic bounds on algorithms; however,
languages can still have a constant multiplier affect on an algorithm.
Consider a rendering algorithm in language L.x that when given an input
I.c takes 5 days to complete... now take language L.y tha happens to
incurr a constant multiplier penalty of 4. Now giving the input I.c to
L.y we find that it takes 20 days to complete. Same algorithm, same
asymptotic bound, but a significant difference in competitiveness.
Asymptotic bounds (Big Oh) are useful, but their applicability isn't
always universal. Some algorithms that are asymptotically inferior
actually perform better on small input sets than their asymptotic
superiors... I don't recall for certain, but bubblesort might be one
such example.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


--- End Message ---
--- Begin Message ---
Robert Cummings wrote:

> You are correct about asymptotic bounds on algorithms; however,
> languages can still have a constant multiplier affect on an algorithm.

Absolutely.  When it comes to "how long does it take to process 1000
elements", both language and hardware are critical factors.  But the
algorithm efficiency remains constant.

> Asymptotic bounds (Big Oh) are useful, but their applicability isn't
> always universal. Some algorithms that are asymptotically inferior
> actually perform better on small input sets than their asymptotic
> superiors... I don't recall for certain, but bubblesort might be one
> such example. 

Also true.  Quick sort is such an example - in general it does really
well, but for certain data sets, it doesn't.


/Per Jessen, Zürich


--- End Message ---

Reply via email to