php-general Digest 11 Apr 2012 17:05:51 -0000 Issue 7771
Topics (messages 317523 through 317529):
Re: php in windows
317523 by: Kirk Bailey
317525 by: Tim Streater
317526 by: Steven Staples
317527 by: Jay Blanchard
Re: strftime silliness
317524 by: Tim Streater
Sorting Help
317528 by: Floyd Resler
317529 by: admin
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
ok, there is a copy of index.php ion the cgibin, and this got WAY
different results.
It puked an error.
"CGI script /cgi-bin/index.php returned nothing"
NOW W.T.F., over?
I think that it's time for some rack time. 'Night all.
On 4/11/2012 12:50 AM, Kirk Bailey wrote:
ok, I just installed 5.2.17 VC6X86. I have a simple test page,
index.php; it spews the content code at me.
On 4/10/2012 11:13 AM, Bogdan Ribic wrote:
On 4/10/2012 04:05, Kirk Bailey wrote:
The edition of php for windows I instaklled does not work. Which
flavor
of windows php DOES work properly in windows?
Trust me, it does work :)
I'm running PHP 5.3.10 thread-safe, as apache module on apache
2.4.1 from apache lounge (not official apache builds, as
instructed on PHP's download site), all of that on Win XP. Read
the instruction in php bundle on setting it up with apache 2.2
branch.
--- End Message ---
--- Begin Message ---
On 11 Apr 2012 at 03:13, Kirk Bailey <kbai...@howlermonkey.net> wrote:
> It means it does nothing. I have a small server in the computer that
> works fine. I also installed python in this box- and it worked
> perfectly without having to do anything to the server. Php on the
> other hand merely occupies disk space.
So you don't want to tell us what "does nothing" means etc as per my previous
post. Fine.
> Aside:Holy cow, you know nothing about windows?!? Considering that
> Boll Bates and co. are almost as omnipresent as Satan, and have been
> accused of BEING Satan, that's quite an accomplishment.
I exaggerate for effect. Sometimes I volunteer a small office that, inevitably,
uses it. And when my dopey BiL downloaded iTunes and then asked me what to do
next, I sent him to the Start menu. But I actively resist knowing more than I
absolutely need to.
--
Cheers -- Tim
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Kirk Bailey [mailto:kbai...@howlermonkey.net]
> Sent: April 11, 2012 1:02 AM
> To: php-gene...@lists.php.net
> Subject: Re: [PHP] Re: php in windows
>
> ok, there is a copy of index.php ion the cgibin, and this got WAY
different
> results.
> It puked an error.
>
>
> "CGI script /cgi-bin/index.php returned nothing"
>
> NOW W.T.F., over?
> I think that it's time for some rack time. 'Night all.
>
>
> On 4/11/2012 12:50 AM, Kirk Bailey wrote:
> > ok, I just installed 5.2.17 VC6X86. I have a simple test page,
> > index.php; it spews the content code at me.
> >
> > On 4/10/2012 11:13 AM, Bogdan Ribic wrote:
> >> On 4/10/2012 04:05, Kirk Bailey wrote:
> >>> The edition of php for windows I instaklled does not work. Which
> >>> flavor
> >>> of windows php DOES work properly in windows?
> >>
> >> Trust me, it does work :)
> >>
> >> I'm running PHP 5.3.10 thread-safe, as apache module on apache
> >> 2.4.1 from apache lounge (not official apache builds, as
> >> instructed on PHP's download site), all of that on Win XP. Read
> >> the instruction in php bundle on setting it up with apache 2.2
> >> branch.
> >>
> >
Kirk,
You have to tell your "tinyweb" what to do with the .php extensions... in
the config of the webserver, you will have to add a line saying where the
php binary is, or uncomment it (as it probably already exists) and restart
the webserver.
As it appears to me, since you can have some "code" on the screen, your
server does not know how to deal with it, so it will treat it like a text
file, and just spew the code out. Once you have it pointing to the php
binary, it will work.
Good luck!
Steve Staples.
--- End Message ---
--- Begin Message ---
On 4/11/2012 9:42 AM, Steven Staples wrote:
-----Original Message-----
From: Kirk Bailey [mailto:kbai...@howlermonkey.net]
Sent: April 11, 2012 1:02 AM
To: php-gene...@lists.php.net
Subject: Re: [PHP] Re: php in windows
ok, there is a copy of index.php ion the cgibin, and this got WAY
different
results.
It puked an error.
"CGI script /cgi-bin/index.php returned nothing"
NOW W.T.F., over?
I think that it's time for some rack time. 'Night all.
On 4/11/2012 12:50 AM, Kirk Bailey wrote:
ok, I just installed 5.2.17 VC6X86. I have a simple test page,
index.php; it spews the content code at me.
On 4/10/2012 11:13 AM, Bogdan Ribic wrote:
On 4/10/2012 04:05, Kirk Bailey wrote:
The edition of php for windows I instaklled does not work. Which
flavor
of windows php DOES work properly in windows?
Trust me, it does work :)
I'm running PHP 5.3.10 thread-safe, as apache module on apache
2.4.1 from apache lounge (not official apache builds, as
instructed on PHP's download site), all of that on Win XP. Read
the instruction in php bundle on setting it up with apache 2.2
branch.
Kirk,
[snip]
You have to tell your "tinyweb" what to do with the .php extensions... in
the config of the webserver, you will have to add a line saying where the
php binary is, or uncomment it (as it probably already exists) and restart
the webserver.
As it appears to me, since you can have some "code" on the screen, your
server does not know how to deal with it, so it will treat it like a text
file, and just spew the code out. Once you have it pointing to the php
binary, it will work.
[/snip]
Maybe this will help -
http://itsecuritylab.eu/index.php/2010/09/24/tinyweb-pocket-size-portable-web-server-with-cgi-and-php-support/
--- End Message ---
--- Begin Message ---
On 11 Apr 2012 at 01:47, Geoff Shang <ge...@quitelikely.com> wrote:
> On Wed, 10 Apr 2012, Tim Streater wrote:
>
>> I want to format a date/time using a 12 hour representation of the time
>> part. I can do this with, say, "%d %b %Y %l:%M %p", where the first time
>> format specifier is the lower-case L. But, this gives me a leading space
>> in the case that the hour is less than 12. I don't want this space.
>> Anyone know of an simple way to avoid it? There appears to be no
>> specifier to do this. Of course, I can call strftime twice, once for the
>> date portion and once for the time portion, trimming the latter, but
>> that seems clumsy.
>
> You can use %-l to achieve this. You could also use %-I as this will also
> drop leading zeros if present.
>
> I forget where I read about this. I'm almost certain that it was *not* in
> any PHP documentation.
Ah - thanks. My post wasn't a complete waste of time after all then. I ended up
using date(). But is %-l officially supported?
--
Cheers -- Tim
--- End Message ---
--- Begin Message ---
I need to sort the following array:
{
[Smith, Bob]=>array(137.5,125.5),
[Jones, Robert]=>array(132.7,128.2)
}
The array needs to be sorted by the first number (i.e. 137.5) and then the
second in descending order. I looked at array_multisort but couldn't figure
out how to make work for my needs.
Thanks!
Floyd
--- End Message ---
--- Begin Message ---
-----Original Message-----
From: Floyd Resler [mailto:fres...@adex-intl.com]
Sent: Wednesday, April 11, 2012 11:26 AM
To: PHP
Subject: [PHP] Sorting Help
I need to sort the following array:
{
[Smith, Bob]=>array(137.5,125.5),
[Jones, Robert]=>array(132.7,128.2)
}
The array needs to be sorted by the first number (i.e. 137.5) and then the
second in descending order. I looked at array_multisort but couldn't figure
out how to make work for my needs.
Thanks!
Floyd
Do me a favor and copy a print_r of your array because this I can't figure
out what you're are doing with that.
--- End Message ---