[PHP] Re: testing

2011-08-03 Thread Al



On 8/2/2011 5:18 PM, Jim Giner wrote:

Don't seem to be getting any feeds thru the newsgroup mirror(?).




This newsgroup has been a mess for almost a year now.

One big problem is that the server only accepts a small number of connections, 
for just some mail clients, eg Thunderbird; but works for others.  My 
Thunderbird works flawlessly for numerous other newsgroups.


I've posted 2 or 3 bug reports, no response!


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



Re: [PHP] Re: testing

2011-08-03 Thread Ashley Sheridan


Al  wrote:

>
>
>On 8/2/2011 5:18 PM, Jim Giner wrote:
>> Don't seem to be getting any feeds thru the newsgroup mirror(?).
>>
>>
>
>This newsgroup has been a mess for almost a year now.
>
>One big problem is that the server only accepts a small number of
>connections,
>for just some mail clients, eg Thunderbird; but works for others.  My
>Thunderbird works flawlessly for numerous other newsgroups.
>
>I've posted 2 or 3 bug reports, no response!
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

This "newsgroup" is actually a mailing list.

Thanks,
Ash
http://www.ashleysheridan.co.uk
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

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



[PHP] Best editor?

2011-08-03 Thread Matty Sarro
Hey everyone,
I am a super newbie just beginning to learn PHP. Awhile ago, I had
used aptana for dabbling with php and was amazed to find out that it
had a built in php interpreter so I could do some minor testing
without having to upload everything to a web server, or have a web
server locally. Flash forward to now, and it looks like that
functionality doesn't exist anymore (at least not by default).

So, I'm curious what editors are out there? Are there any out there
which will let me test PHP files without having to upload everything
every time I edit it? Any help would be greatly appreciated. Thanks!
-Matty

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



Re: [PHP] Best editor?

2011-08-03 Thread Steve Staples
On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
> Hey everyone,
> I am a super newbie just beginning to learn PHP. Awhile ago, I had
> used aptana for dabbling with php and was amazed to find out that it
> had a built in php interpreter so I could do some minor testing
> without having to upload everything to a web server, or have a web
> server locally. Flash forward to now, and it looks like that
> functionality doesn't exist anymore (at least not by default).
> 
> So, I'm curious what editors are out there? Are there any out there
> which will let me test PHP files without having to upload everything
> every time I edit it? Any help would be greatly appreciated. Thanks!
> -Matty
> 

I personally use Komodo IDE, but there are lots out there.  There is the
Eclipse with PHP, or there was the way I learned, NotePad (then switched
to EditPlus+)

Steve


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



Re: [PHP] Best editor?

2011-08-03 Thread Matty Sarro
Let me clarify a bit... I don't own my own machine - I'm using my work
computer. I can install an editor, but installing a full fledged
server would be verboten (like WAMP). And while its not hard to set up
a VM in virtualbox, I'd prefer not to if I don't have to. I know the
functionality of testing inside the editor used to be there, I'd just
like to see if I can find it again :)

If I have to, i'll just go the VM route.

On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples  wrote:
> On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
>> Hey everyone,
>> I am a super newbie just beginning to learn PHP. Awhile ago, I had
>> used aptana for dabbling with php and was amazed to find out that it
>> had a built in php interpreter so I could do some minor testing
>> without having to upload everything to a web server, or have a web
>> server locally. Flash forward to now, and it looks like that
>> functionality doesn't exist anymore (at least not by default).
>>
>> So, I'm curious what editors are out there? Are there any out there
>> which will let me test PHP files without having to upload everything
>> every time I edit it? Any help would be greatly appreciated. Thanks!
>> -Matty
>>
>
> I personally use Komodo IDE, but there are lots out there.  There is the
> Eclipse with PHP, or there was the way I learned, NotePad (then switched
> to EditPlus+)
>
> Steve
>
>

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



RE: [PHP] Best editor?

2011-08-03 Thread Florian Müller

I'm using PSPad since one year, and I'm very happy with it. 

With your description, I think it is the most simple way with it: Connect it 
with a webserver, and then you can edit all files right on the server, so if 
you save, they are live. 

PSPad is actually even a portable program, and there are lots of syntax 
highlighters, so this program is very nice!

> Date: Wed, 3 Aug 2011 09:32:34 -0400
> From: msa...@gmail.com
> To: sstap...@mnsi.net
> CC: php-general@lists.php.net
> Subject: Re: [PHP] Best editor?
> 
> Let me clarify a bit... I don't own my own machine - I'm using my work
> computer. I can install an editor, but installing a full fledged
> server would be verboten (like WAMP). And while its not hard to set up
> a VM in virtualbox, I'd prefer not to if I don't have to. I know the
> functionality of testing inside the editor used to be there, I'd just
> like to see if I can find it again :)
> 
> If I have to, i'll just go the VM route.
> 
> On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples  wrote:
> > On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
> >> Hey everyone,
> >> I am a super newbie just beginning to learn PHP. Awhile ago, I had
> >> used aptana for dabbling with php and was amazed to find out that it
> >> had a built in php interpreter so I could do some minor testing
> >> without having to upload everything to a web server, or have a web
> >> server locally. Flash forward to now, and it looks like that
> >> functionality doesn't exist anymore (at least not by default).
> >>
> >> So, I'm curious what editors are out there? Are there any out there
> >> which will let me test PHP files without having to upload everything
> >> every time I edit it? Any help would be greatly appreciated. Thanks!
> >> -Matty
> >>
> >
> > I personally use Komodo IDE, but there are lots out there.  There is the
> > Eclipse with PHP, or there was the way I learned, NotePad (then switched
> > to EditPlus+)
> >
> > Steve
> >
> >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
  

Re: [PHP] Best editor?

2011-08-03 Thread Judson Vaughn
I recommend Coda for Mac (about $100) as editor. And MAMP as a web server for 
testing PHP files locally. 

Jud


Sent from my iPad
Jud at bizville.com
Phone 703-303-4271

On Aug 3, 2011, at 9:26 AM, Steve Staples  wrote:

> On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
>> Hey everyone,
>> I am a super newbie just beginning to learn PHP. Awhile ago, I had
>> used aptana for dabbling with php and was amazed to find out that it
>> had a built in php interpreter so I could do some minor testing
>> without having to upload everything to a web server, or have a web
>> server locally. Flash forward to now, and it looks like that
>> functionality doesn't exist anymore (at least not by default).
>> 
>> So, I'm curious what editors are out there? Are there any out there
>> which will let me test PHP files without having to upload everything
>> every time I edit it? Any help would be greatly appreciated. Thanks!
>> -Matty
>> 
> 
> I personally use Komodo IDE, but there are lots out there.  There is the
> Eclipse with PHP, or there was the way I learned, NotePad (then switched
> to EditPlus+)
> 
> Steve
> 
> 
> -- 
> 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] Best editor?

2011-08-03 Thread Florian Müller

Maybe an adittional information: PSPad is completely freeware and portable. 

You can download it right here: http://pspad.en.softonic.com/

This would be the best idea if you can't run a local server, because if there 
is an editor with this functionality built in, he'd have to bring a little 
local server with it, and I really don't know an editor which is able to do 
that without an external software.

Regards and much fun ;) Flo

> From: florip...@hotmail.com
> To: msa...@gmail.com; sstap...@mnsi.net
> CC: php-general@lists.php.net
> Date: Wed, 3 Aug 2011 15:40:12 +0200
> Subject: RE: [PHP] Best editor?
> 
> 
> I'm using PSPad since one year, and I'm very happy with it. 
> 
> With your description, I think it is the most simple way with it: Connect it 
> with a webserver, and then you can edit all files right on the server, so if 
> you save, they are live. 
> 
> PSPad is actually even a portable program, and there are lots of syntax 
> highlighters, so this program is very nice!
> 
> > Date: Wed, 3 Aug 2011 09:32:34 -0400
> > From: msa...@gmail.com
> > To: sstap...@mnsi.net
> > CC: php-general@lists.php.net
> > Subject: Re: [PHP] Best editor?
> > 
> > Let me clarify a bit... I don't own my own machine - I'm using my work
> > computer. I can install an editor, but installing a full fledged
> > server would be verboten (like WAMP). And while its not hard to set up
> > a VM in virtualbox, I'd prefer not to if I don't have to. I know the
> > functionality of testing inside the editor used to be there, I'd just
> > like to see if I can find it again :)
> > 
> > If I have to, i'll just go the VM route.
> > 
> > On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples  wrote:
> > > On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
> > >> Hey everyone,
> > >> I am a super newbie just beginning to learn PHP. Awhile ago, I had
> > >> used aptana for dabbling with php and was amazed to find out that it
> > >> had a built in php interpreter so I could do some minor testing
> > >> without having to upload everything to a web server, or have a web
> > >> server locally. Flash forward to now, and it looks like that
> > >> functionality doesn't exist anymore (at least not by default).
> > >>
> > >> So, I'm curious what editors are out there? Are there any out there
> > >> which will let me test PHP files without having to upload everything
> > >> every time I edit it? Any help would be greatly appreciated. Thanks!
> > >> -Matty
> > >>
> > >
> > > I personally use Komodo IDE, but there are lots out there.  There is the
> > > Eclipse with PHP, or there was the way I learned, NotePad (then switched
> > > to EditPlus+)
> > >
> > > Steve
> > >
> > >
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
  

[PHP] Syntax Question

2011-08-03 Thread Gates, Jeff
I, too, am a super newbie. I have a beginning knowledge of being able to
"read" php and understand its syntax but I can¹t write it. This is a bit
complicated but here¹s my problem:

I want to create a variable in PHP that I can use to link to an image in our
museum's image website. We have done it with ColdFusion here but I need the
same thing for PHP because I¹m building a site using a php-based CMS called
Omeka.

In ColdFusion the variable is written:


Basically, it¹s saying find the image on our server by looking for its
accession number within the year directory. Since the first part of the
accession number is the year we got the artwork this variable is saying look
for the accession number in the year directory by first looking at the first
part of that accession number (the year), look in that year directory and
then use the entire accession number to find the image within that
directory.  An example of an accession number is 2011.15. That¹s saying that
artwork was the 15th artwork brought into our collection in 2011. On our
image server it will be found in a directory called 2011. (Am I making
sense?)

Then the Coldfusion call is:

http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart
.si.edu/images/#tmpImageDirectory#/#artwork.accessionNumber#_1a.jpg"> (the
1a.jpg is simply the size image we want to call).

I need to be able to do the same thing with PHP but have no idea how.

More information: within my site I¹m housing the accession number in a mySQL
database. I¹ve gotten a bit of help on this already (but not enough, that¹s
why I¹m turning to you).

I was told I need to create two variables [('Dublin Core','Identifier') is
the name of the field that houses the accession number):

$accessionNumber =  item('Dublin Core','Identifier');
$tmpImageDirectory = strtok($accessionNumber,".");

And then create a third variable to create a url variable

$url = 
"http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart.si.e
du/images/ 
 " +
$tmpImageDirectory + "/" + $accessionNumber + "_1ajpg";

That's as far as I've gotten. I don't know how to put all of these together
using proper PHP syntax. Can someone help me with this? Thanks.

Best, Jeff



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



RE: [PHP] Syntax Question

2011-08-03 Thread admin
> -Original Message-
> From: Gates, Jeff [mailto:gat...@si.edu]
> Sent: Wednesday, August 03, 2011 10:23 AM
> To: php-general@lists.php.net
> Subject: [PHP] Syntax Question
> 
> I, too, am a super newbie. I have a beginning knowledge of being able
> to
> "read" php and understand its syntax but I can¹t write it. This is a
> bit
> complicated but here¹s my problem:
> 
> I want to create a variable in PHP that I can use to link to an image
> in our
> museum's image website. We have done it with ColdFusion here but I need
> the
> same thing for PHP because I¹m building a site using a php-based CMS
> called
> Omeka.
> 
> In ColdFusion the variable is written:
> 
> 
> Basically, it¹s saying find the image on our server by looking for its
> accession number within the year directory. Since the first part of the
> accession number is the year we got the artwork this variable is saying
> look
> for the accession number in the year directory by first looking at the
> first
> part of that accession number (the year), look in that year directory
> and
> then use the entire accession number to find the image within that
> directory.  An example of an accession number is 2011.15. That¹s saying
> that
> artwork was the 15th artwork brought into our collection in 2011. On
> our
> image server it will be found in a directory called 2011. (Am I making
> sense?)
> 
> Then the Coldfusion call is:
> 
>  href="http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americ
> anart
> .si.edu/images/#tmpImageDirectory#/#artwork.accessionNumber#_1a.jpg">
> (the
> 1a.jpg is simply the size image we want to call).
> 
> I need to be able to do the same thing with PHP but have no idea how.
> 
> More information: within my site I¹m housing the accession number in a
> mySQL
> database. I¹ve gotten a bit of help on this already (but not enough,
> that¹s
> why I¹m turning to you).
> 
> I was told I need to create two variables [('Dublin Core','Identifier')
> is
> the name of the field that houses the accession number):
> 
> $accessionNumber =  item('Dublin Core','Identifier');
> $tmpImageDirectory = strtok($accessionNumber,".");
> 
> And then create a third variable to create a url variable
> 
> $url =
> "http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart
> .si.e
> du/images/
>  .si.e
> du/images/$tmpImageDirectory/$artwork.accessionNumber_1a.jpg> " +
> $tmpImageDirectory + "/" + $accessionNumber + "_1ajpg";
> 
> That's as far as I've gotten. I don't know how to put all of these
> together
> using proper PHP syntax. Can someone help me with this? Thanks.
> 
> Best, Jeff
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




$url =
"http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart.si.e
du/images/
 ".
$tmpImageDirectory ."/". $accessionNumber ."_1ajpg";

I am not sure I agree with the way you are setting the $url it looks like
you have mashed and a url hyperlink partially into 1.
Like you are trying to set the $url as a image with a link are you trying to
set a link or an image as the $url?

If you are trying to set a image as the $url do this.

$url = "http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart.s
i.edu/images/". $tmpImageDirectory ."/". $accessionNumber ."_1ajpg ALT=''>";

Sorry if this is not correct for what you are trying to do. I just do not
understand the intent.















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



Re: [PHP] Best editor?

2011-08-03 Thread Matt Giddings
Notepad!!!  LOL..  I use netbeans but eclipse is nice.  A lot of it is
personal opinion.

On Wed, Aug 3, 2011 at 9:46 AM, Florian Müller wrote:

>
> Maybe an adittional information: PSPad is completely freeware and portable.
>
> You can download it right here: http://pspad.en.softonic.com/
>
> This would be the best idea if you can't run a local server, because if
> there is an editor with this functionality built in, he'd have to bring a
> little local server with it, and I really don't know an editor which is able
> to do that without an external software.
>
> Regards and much fun ;) Flo
>
> > From: florip...@hotmail.com
> > To: msa...@gmail.com; sstap...@mnsi.net
> > CC: php-general@lists.php.net
> > Date: Wed, 3 Aug 2011 15:40:12 +0200
> > Subject: RE: [PHP] Best editor?
> >
> >
> > I'm using PSPad since one year, and I'm very happy with it.
> >
> > With your description, I think it is the most simple way with it: Connect
> it with a webserver, and then you can edit all files right on the server, so
> if you save, they are live.
> >
> > PSPad is actually even a portable program, and there are lots of syntax
> highlighters, so this program is very nice!
> >
> > > Date: Wed, 3 Aug 2011 09:32:34 -0400
> > > From: msa...@gmail.com
> > > To: sstap...@mnsi.net
> > > CC: php-general@lists.php.net
> > > Subject: Re: [PHP] Best editor?
> > >
> > > Let me clarify a bit... I don't own my own machine - I'm using my work
> > > computer. I can install an editor, but installing a full fledged
> > > server would be verboten (like WAMP). And while its not hard to set up
> > > a VM in virtualbox, I'd prefer not to if I don't have to. I know the
> > > functionality of testing inside the editor used to be there, I'd just
> > > like to see if I can find it again :)
> > >
> > > If I have to, i'll just go the VM route.
> > >
> > > On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples 
> wrote:
> > > > On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
> > > >> Hey everyone,
> > > >> I am a super newbie just beginning to learn PHP. Awhile ago, I had
> > > >> used aptana for dabbling with php and was amazed to find out that it
> > > >> had a built in php interpreter so I could do some minor testing
> > > >> without having to upload everything to a web server, or have a web
> > > >> server locally. Flash forward to now, and it looks like that
> > > >> functionality doesn't exist anymore (at least not by default).
> > > >>
> > > >> So, I'm curious what editors are out there? Are there any out there
> > > >> which will let me test PHP files without having to upload everything
> > > >> every time I edit it? Any help would be greatly appreciated. Thanks!
> > > >> -Matty
> > > >>
> > > >
> > > > I personally use Komodo IDE, but there are lots out there.  There is
> the
> > > > Eclipse with PHP, or there was the way I learned, NotePad (then
> switched
> > > > to EditPlus+)
> > > >
> > > > Steve
> > > >
> > > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>


Re: [PHP] Best editor?

2011-08-03 Thread Bálint Horváth
Hi,
On Windows I used UltraEdit. On Linux Kate is simple and comfortable app.
Actually I prefer NetBeans too. Eclipse could be faster but I think less
comfortable...
*Valentine*

On Wed, Aug 3, 2011 at 4:45 PM, Matt Giddings  wrote:

> Notepad!!!  LOL..  I use netbeans but eclipse is nice.  A lot of it is
> personal opinion.
>
> On Wed, Aug 3, 2011 at 9:46 AM, Florian Müller  >wrote:
>
> >
> > Maybe an adittional information: PSPad is completely freeware and
> portable.
> >
> > You can download it right here: http://pspad.en.softonic.com/
> >
> > This would be the best idea if you can't run a local server, because if
> > there is an editor with this functionality built in, he'd have to bring a
> > little local server with it, and I really don't know an editor which is
> able
> > to do that without an external software.
> >
> > Regards and much fun ;) Flo
> >
> > > From: florip...@hotmail.com
> > > To: msa...@gmail.com; sstap...@mnsi.net
> > > CC: php-general@lists.php.net
> > > Date: Wed, 3 Aug 2011 15:40:12 +0200
> > > Subject: RE: [PHP] Best editor?
> > >
> > >
> > > I'm using PSPad since one year, and I'm very happy with it.
> > >
> > > With your description, I think it is the most simple way with it:
> Connect
> > it with a webserver, and then you can edit all files right on the server,
> so
> > if you save, they are live.
> > >
> > > PSPad is actually even a portable program, and there are lots of syntax
> > highlighters, so this program is very nice!
> > >
> > > > Date: Wed, 3 Aug 2011 09:32:34 -0400
> > > > From: msa...@gmail.com
> > > > To: sstap...@mnsi.net
> > > > CC: php-general@lists.php.net
> > > > Subject: Re: [PHP] Best editor?
> > > >
> > > > Let me clarify a bit... I don't own my own machine - I'm using my
> work
> > > > computer. I can install an editor, but installing a full fledged
> > > > server would be verboten (like WAMP). And while its not hard to set
> up
> > > > a VM in virtualbox, I'd prefer not to if I don't have to. I know the
> > > > functionality of testing inside the editor used to be there, I'd just
> > > > like to see if I can find it again :)
> > > >
> > > > If I have to, i'll just go the VM route.
> > > >
> > > > On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples 
> > wrote:
> > > > > On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
> > > > >> Hey everyone,
> > > > >> I am a super newbie just beginning to learn PHP. Awhile ago, I had
> > > > >> used aptana for dabbling with php and was amazed to find out that
> it
> > > > >> had a built in php interpreter so I could do some minor testing
> > > > >> without having to upload everything to a web server, or have a web
> > > > >> server locally. Flash forward to now, and it looks like that
> > > > >> functionality doesn't exist anymore (at least not by default).
> > > > >>
> > > > >> So, I'm curious what editors are out there? Are there any out
> there
> > > > >> which will let me test PHP files without having to upload
> everything
> > > > >> every time I edit it? Any help would be greatly appreciated.
> Thanks!
> > > > >> -Matty
> > > > >>
> > > > >
> > > > > I personally use Komodo IDE, but there are lots out there.  There
> is
> > the
> > > > > Eclipse with PHP, or there was the way I learned, NotePad (then
> > switched
> > > > > to EditPlus+)
> > > > >
> > > > > Steve
> > > > >
> > > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> >
> >
>


Re: [PHP] Syntax Question

2011-08-03 Thread Gates, Jeff
On 8/3/11 10:41 AM, "ad...@buskirkgraphics.com" 
wrote:

>> -Original Message-
>> From: Gates, Jeff [mailto:gat...@si.edu]
>> Sent: Wednesday, August 03, 2011 10:23 AM
>> To: php-general@lists.php.net
>> Subject: [PHP] Syntax Question
>> 
>> I, too, am a super newbie. I have a beginning knowledge of being able
>> to
>> "read" php and understand its syntax but I can¹t write it. This is a
>> bit
>> complicated but here¹s my problem:
>> 
>> I want to create a variable in PHP that I can use to link to an image
>> in our
>> museum's image website. We have done it with ColdFusion here but I need
>> the
>> same thing for PHP because I¹m building a site using a php-based CMS
>> called
>> Omeka.
>> 
>> In ColdFusion the variable is written:
>> 
>> 
>> Basically, it¹s saying find the image on our server by looking for its
>> accession number within the year directory. Since the first part of the
>> accession number is the year we got the artwork this variable is saying
>> look
>> for the accession number in the year directory by first looking at the
>> first
>> part of that accession number (the year), look in that year directory
>> and
>> then use the entire accession number to find the image within that
>> directory.  An example of an accession number is 2011.15. That¹s saying
>> that
>> artwork was the 15th artwork brought into our collection in 2011. On
>> our
>> image server it will be found in a directory called 2011. (Am I making
>> sense?)
>> 
>> Then the Coldfusion call is:
>> 
>> > href="http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americ
>> anart
>> .si.edu/images/#tmpImageDirectory#/#artwork.accessionNumber#_1a.jpg">
>> (the
>> 1a.jpg is simply the size image we want to call).
>> 
>> I need to be able to do the same thing with PHP but have no idea how.
>> 
>> More information: within my site I¹m housing the accession number in a
>> mySQL
>> database. I¹ve gotten a bit of help on this already (but not enough,
>> that¹s
>> why I¹m turning to you).
>> 
>> I was told I need to create two variables [('Dublin Core','Identifier')
>> is
>> the name of the field that houses the accession number):
>> 
>> $accessionNumber =  item('Dublin Core','Identifier');
>> $tmpImageDirectory = strtok($accessionNumber,".");
>> 
>> And then create a third variable to create a url variable
>> 
>> $url =
>> "http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart
>> .si.e
>> du/images/
>> > .si.e
>> du/images/$tmpImageDirectory/$artwork.accessionNumber_1a.jpg> " +
>> $tmpImageDirectory + "/" + $accessionNumber + "_1ajpg";
>> 
>> That's as far as I've gotten. I don't know how to put all of these
>> together
>> using proper PHP syntax. Can someone help me with this? Thanks.
>> 
>> Best, Jeff
>> 
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
> $url =
> "http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart.si.e
> du/images/
>  du/images/". $tmpImageDirectory ."/". $artwork ."accessionNumber_1a.jpg> ".
> $tmpImageDirectory ."/". $accessionNumber ."_1ajpg";
> 
> I am not sure I agree with the way you are setting the $url it looks like
> you have mashed and a url hyperlink partially into 1.
> Like you are trying to set the $url as a image with a link are you trying to
> set a link or an image as the $url?
> 
> If you are trying to set a image as the $url do this.
> 
> $url = " src=http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart.s
> i.edu/images/". $tmpImageDirectory ."/". $accessionNumber ."_1ajpg ALT=''>";
> 
> Sorry if this is not correct for what you are trying to do. I just do not
> understand the intent.
> 

To be honest with you, I'm not sure what that $url is supposed to do. This
is the info (albeit without any explanation) someone told me to use. But he
didn't tell me how to use it.

Basically, I need to be able to link to an image on our web server
dynamically. The structure of the web server is as I described: each image
has an accession number and each image is housed in a directory on that
server that is named the year that artwork was accessioned. We can retrieve
the accession number that is stored in the data field ('Dublin
Core','Identifier')

An example of an actual (non-dynamic) link to the image server might look
like this: 
http://ids.si.edu/ids/dynamic?container.fullpage&id=http://americanart.si.ed
u/images/2011/2011.15_1a.jpg

I just need to be able to build that link dynamically for each artwork on
the site. (Personally, I'm not wedded to the code I posted earlier if
someone can find a better way of doing it. This is just what I was told to
use. Again, I'm a newbie.)


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



Re: [PHP] Best editor?

2011-08-03 Thread Andre Polykanine
Hi,

> Notepad!!!  LOL..  I use netbeans but eclipse is nice.  A lot of it is
> personal opinion.

   I have been using Notepad since... oh, since 2007, I believe). And it's my 
editor of choice :-). Actually now I'm using AkelPad because of the unicode 
issues (I need to save without a bit order mark).

-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion


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



Re: [PHP] Re: testing

2011-08-03 Thread Al



On 8/3/2011 9:16 AM, Ashley Sheridan wrote:



Al  wrote:




On 8/2/2011 5:18 PM, Jim Giner wrote:

Don't seem to be getting any feeds thru the newsgroup mirror(?).




This newsgroup has been a mess for almost a year now.

One big problem is that the server only accepts a small number of
connections,
for just some mail clients, eg Thunderbird; but works for others.  My
Thunderbird works flawlessly for numerous other newsgroups.

I've posted 2 or 3 bug reports, no response!


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


This "newsgroup" is actually a mailing list.

Thanks,
Ash
http://www.ashleysheridan.co.uk


Oh, I thought news.php.net was a NNTP news server.  And,
news://news.php.net:119/php.general was a newsgroup on the server.

My mistake.


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



Re: [PHP] Best editor?

2011-08-03 Thread Tamara Temple


On Aug 3, 2011, at 8:40 AM, Florian Müller wrote:

With your description, I think it is the most simple way with it:  
Connect it with a webserver, and then you can edit all files right  
on the server, so if you save, they are live.


Not to hijack the thread, but I really, *really* hope you are not  
suggesting that someone do live edits on a production server



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



Re: [PHP] Best editor?

2011-08-03 Thread David Harkness
On Wed, Aug 3, 2011 at 9:36 AM, Tamara Temple wrote:

> Not to hijack the thread, but I really, *really* hope you are not
> suggesting that someone do live edits on a production server


I would never consider tinkering on test pages while learning PHP a
"production" server. :)


[PHP] Studying mcrypt

2011-08-03 Thread Andre Polykanine
Hello Php,

  It's my first time I use mcrypt.
I've done everything like it's written in the php manuals, here is the code:



And here's what I get:
Original password: asdfasdfasdf
Encrypted password: Q�j�*

Question: Is it normal to have such strange characters in the encrypted string?
I'm hosted at http://godaddy.com/, shared hosting, if it does matter.
Thanks!

-- 
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion


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



Re: [PHP] Best editor?

2011-08-03 Thread Tamara Temple


On Aug 3, 2011, at 11:39 AM, David Harkness wrote:

On Wed, Aug 3, 2011 at 9:36 AM, Tamara Temple  
 wrote:
Not to hijack the thread, but I really, *really* hope you are not  
suggesting that someone do live edits on a production server


I would never consider tinkering on test pages while learning PHP a  
"production" server. :)


 I think you missed my point -- that wasn't to the OP, that was to  
the respondent talking about how PSPad lets you edit files directly on  
the webserver

Re: [PHP] Best editor?

2011-08-03 Thread Leonardo
Dne středa 03 srpna 2011 15:22:44 Matty Sarro napsal(a):
> Hey everyone,
> I am a super newbie just beginning to learn PHP. Awhile ago, I had
> used aptana for dabbling with php and was amazed to find out that it
> had a built in php interpreter so I could do some minor testing
> without having to upload everything to a web server, or have a web
> server locally. Flash forward to now, and it looks like that
> functionality doesn't exist anymore (at least not by default).
> 
> So, I'm curious what editors are out there? Are there any out there
> which will let me test PHP files without having to upload everything
> every time I edit it? Any help would be greatly appreciated. Thanks!
> -Matty
The best editor for PHP is Zend Studio cca $300 or open source products like 
Kate(linux), Kwrite(linux), Vim(linux, windows), BlueFish(linux), Emacs(Linux, 
Windows). I'm using the Bluefish for PHP with (XHTML) and NetBeans for others 
programming languages.
Good look.
I'm sorry for my english.
-- 
 Leonardo
--
 „Teoretické znalosti dnes už nestačí.
 Člověk musí překročit jejich hranice a umění se stane neumělým uměním, které 
vyrústá z nevědomí“
 Daitsu Suzuki ( 1870 – 1966 ) 
-
 Feder ajsi romňi, so buter manušňi sar džuvli.
Cikánské přísloví


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



Re: [PHP] Studying mcrypt

2011-08-03 Thread Alex Nikitin
Yes, since it's trying to represent in characters some purely binary data,
it is not unlikely that you will get VERY weird characters (and you do).

Also you shouldn't actually encrypt passwords, the proper way to store them
is hashed, so that if someone grabs your database, they dont have your
passwords, even if they have the "key".

Best way to check is to decrypt it and verify...

--
The trouble with programmers is that you can never tell what a programmer is
doing until it’s too late.  ~Seymour Cray



On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine  wrote:

> Hello Php,
>
>  It's my first time I use mcrypt.
> I've done everything like it's written in the php manuals, here is the
> code:
>
>  $d=mcrypt_module_open("rijndael-256", "", "ofb", "");
> $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM);
> $ks=mcrypt_enc_get_key_size($d);
> $key=substr(md5("Secret key"), 0, $ks);
> mcrypt_generic_init($d, $key, $iv);
> $cpass=mcrypt_generic($d, $_POST['opass']);
> mcrypt_generic_deinit($d);
> mcrypt_module_close($d);
> ?>
>
> And here's what I get:
> Original password: asdfasdfasdf
> Encrypted password: Q�  j�*
>
> Question: Is it normal to have such strange characters in the encrypted
> string?
> I'm hosted at http://godaddy.com/, shared hosting, if it does matter.
> Thanks!
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Best editor?

2011-08-03 Thread jean-baptiste verrey
NetBeans for PHP is definitely a GREAT choice! (it is now made to work
specially for PHP)
And if you don't have access to everything on your computer just install a
VMWare player and have a virtual server ;-) (ok it would take time but once
you have it, you have it)

On 3 August 2011 18:07, Leonardo  wrote:

> Dne středa 03 srpna 2011 15:22:44 Matty Sarro napsal(a):
> > Hey everyone,
> > I am a super newbie just beginning to learn PHP. Awhile ago, I had
> > used aptana for dabbling with php and was amazed to find out that it
> > had a built in php interpreter so I could do some minor testing
> > without having to upload everything to a web server, or have a web
> > server locally. Flash forward to now, and it looks like that
> > functionality doesn't exist anymore (at least not by default).
> >
> > So, I'm curious what editors are out there? Are there any out there
> > which will let me test PHP files without having to upload everything
> > every time I edit it? Any help would be greatly appreciated. Thanks!
> > -Matty
> The best editor for PHP is Zend Studio cca $300 or open source products
> like
> Kate(linux), Kwrite(linux), Vim(linux, windows), BlueFish(linux),
> Emacs(Linux,
> Windows). I'm using the Bluefish for PHP with (XHTML) and NetBeans for
> others
> programming languages.
> Good look.
> I'm sorry for my english.
> --
>  Leonardo
> --
>  "Teoretické znalosti dnes už nestačí.
>  Člověk musí překročit jejich hranice a umění se stane neumělým uměním,
> které
> vyrústá z nevědomí"
> Daitsu Suzuki ( 1870 - 1966 )
> -
>  Feder ajsi romňi, so buter manušňi sar džuvli.
>Cikánské přísloví
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Best editor?

2011-08-03 Thread Curtis Maurand


Leonardo wrote:
> Dne středa 03 srpna 2011 15:22:44
Matty Sarro napsal(a):
>> Hey everyone,
>> I am a
super newbie just beginning to learn PHP. Awhile ago, I had
>>
used aptana for dabbling with php and was amazed to find out that it
>> had a built in php interpreter so I could do some minor
testing
>> without having to upload everything to a web server,
or have a web
>> server locally. Flash forward to now, and it
looks like that
>> functionality doesn't exist anymore (at
least not by default).
>>
>> So, I'm curious what
editors are out there? Are there any out there
>> which will
let me test PHP files without having to upload everything
>>
every time I edit it? Any help would be greatly appreciated. Thanks!
>> -Matty
> The best editor for PHP is Zend Studio cca
$300 or open source products
> like
> Kate(linux),
Kwrite(linux), Vim(linux, windows), BlueFish(linux),
>
Emacs(Linux,
> Windows). I'm using the Bluefish for PHP with
(XHTML) and NetBeans for
> others
> programming
languages.
> Good look.
> I'm sorry for my english.

Bluefish also runs on Windows.



Re: [PHP] Studying mcrypt

2011-08-03 Thread Andre Polykanine
Hello Alex,

Thanks for the tip. I'm not storing it in the database (you see, it's 
"asdfasdf" and the key string is "secret key"), I'm just studying mcrypt's 
possibilities :-).

-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

 Original message 
From: Alex Nikitin 
To: Andre Polykanine
Date created: , 9:27:42 PM
Subject: [PHP] Studying mcrypt


  Yes, since it's trying to represent in characters some purely binary data,
it is not unlikely that you will get VERY weird characters (and you do).

Also you shouldn't actually encrypt passwords, the proper way to store them
is hashed, so that if someone grabs your database, they dont have your
passwords, even if they have the "key".

Best way to check is to decrypt it and verify...

--
The trouble with programmers is that you can never tell what a programmer is
doing until it’s too late.  ~Seymour Cray



On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine  wrote:

> Hello Php,
>
>  It's my first time I use mcrypt.
> I've done everything like it's written in the php manuals, here is the
> code:
>
>  $d=mcrypt_module_open("rijndael-256", "", "ofb", "");
> $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM);
> $ks=mcrypt_enc_get_key_size($d);
> $key=substr(md5("Secret key"), 0, $ks);
> mcrypt_generic_init($d, $key, $iv);
> $cpass=mcrypt_generic($d, $_POST['opass']);
> mcrypt_generic_deinit($d);
> mcrypt_module_close($d);
> ?>
>
> And here's what I get:
> Original password: asdfasdfasdf
> Encrypted password: Q�  j�*
>
> Question: Is it normal to have such strange characters in the encrypted
> string?
> I'm hosted at http://godaddy.com/, shared hosting, if it does matter.
> Thanks!
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion
>
>
> --
> 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] Studying mcrypt

2011-08-03 Thread Ashley Sheridan
On Wed, 2011-08-03 at 22:02 +0300, Andre Polykanine wrote:

> Hello Alex,
> 
> Thanks for the tip. I'm not storing it in the database (you see, it's 
> "asdfasdf" and the key string is "secret key"), I'm just studying mcrypt's 
> possibilities :-).
> 
> -- 
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> My blog: http://oire.org/menelion (mostly in Russian)
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion
> 
>  Original message 
> From: Alex Nikitin 
> To: Andre Polykanine
> Date created: , 9:27:42 PM
> Subject: [PHP] Studying mcrypt
> 
> 
>   Yes, since it's trying to represent in characters some purely binary 
> data,
> it is not unlikely that you will get VERY weird characters (and you do).
> 
> Also you shouldn't actually encrypt passwords, the proper way to store them
> is hashed, so that if someone grabs your database, they dont have your
> passwords, even if they have the "key".
> 
> Best way to check is to decrypt it and verify...
> 
> --
> The trouble with programmers is that you can never tell what a programmer is
> doing until it’s too late.  ~Seymour Cray
> 
> 
> 
> On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine  wrote:
> 
> > Hello Php,
> >
> >  It's my first time I use mcrypt.
> > I've done everything like it's written in the php manuals, here is the
> > code:
> >
> >  > $d=mcrypt_module_open("rijndael-256", "", "ofb", "");
> > $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM);
> > $ks=mcrypt_enc_get_key_size($d);
> > $key=substr(md5("Secret key"), 0, $ks);
> > mcrypt_generic_init($d, $key, $iv);
> > $cpass=mcrypt_generic($d, $_POST['opass']);
> > mcrypt_generic_deinit($d);
> > mcrypt_module_close($d);
> > ?>
> >
> > And here's what I get:
> > Original password: asdfasdfasdf
> > Encrypted password: Q�  j�*
> >
> > Question: Is it normal to have such strange characters in the encrypted
> > string?
> > I'm hosted at http://godaddy.com/, shared hosting, if it does matter.
> > Thanks!
> >
> > --
> > With best regards from Ukraine,
> > Andre
> > Skype: Francophile
> > Twitter: http://twitter.com/m_elensule
> > Facebook: http://facebook.com/menelion
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 


Please don't top-post :)

You can use base64_encode() on it to convert it into something that's
printable and storable in the DB without having to resort to a binary
blob


-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Studying mcrypt

2011-08-03 Thread Alex Nikitin
I have a neat class you can play with...

--
The trouble with programmers is that you can never tell what a programmer is
doing until it’s too late.  ~Seymour Cray



On Wed, Aug 3, 2011 at 2:27 PM, Alex Nikitin  wrote:

> Yes, since it's trying to represent in characters some purely binary data,
> it is not unlikely that you will get VERY weird characters (and you do).
>
> Also you shouldn't actually encrypt passwords, the proper way to store them
> is hashed, so that if someone grabs your database, they dont have your
> passwords, even if they have the "key".
>
> Best way to check is to decrypt it and verify...
>
> --
> The trouble with programmers is that you can never tell what a programmer
> is doing until it’s too late.  ~Seymour Cray
>
>
>
>
> On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine  wrote:
>
>> Hello Php,
>>
>>  It's my first time I use mcrypt.
>> I've done everything like it's written in the php manuals, here is the
>> code:
>>
>> > $d=mcrypt_module_open("rijndael-256", "", "ofb", "");
>> $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM);
>> $ks=mcrypt_enc_get_key_size($d);
>> $key=substr(md5("Secret key"), 0, $ks);
>> mcrypt_generic_init($d, $key, $iv);
>> $cpass=mcrypt_generic($d, $_POST['opass']);
>> mcrypt_generic_deinit($d);
>> mcrypt_module_close($d);
>> ?>
>>
>> And here's what I get:
>> Original password: asdfasdfasdf
>> Encrypted password: Q�  j�*
>>
>> Question: Is it normal to have such strange characters in the encrypted
>> string?
>> I'm hosted at http://godaddy.com/, shared hosting, if it does matter.
>> Thanks!
>>
>> --
>> With best regards from Ukraine,
>> Andre
>> Skype: Francophile
>> Twitter: http://twitter.com/m_elensule
>> Facebook: http://facebook.com/menelion
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>


Re: [PHP] Studying mcrypt

2011-08-03 Thread Andre Polykanine
Hi Ash,


> Please don't top-post :)

*Huge sigh* OK, OK! But still it's too uncomfortable to read bottom-posting! :P

> You can use base64_encode() on it to convert it into something that's
> printable and storable in the DB without having to resort to a binary
> blob

Thanks, will try!)



-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion


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



Re: [PHP] Studying mcrypt

2011-08-03 Thread Andre Polykanine
  Hello Alex,

  
> I have a neat class you can play with...

Could you give me the link, please?)
-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion


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



Re: [PHP] Studying mcrypt

2011-08-03 Thread Alex Nikitin
On Wed, Aug 3, 2011 at 3:08 PM, Ashley Sheridan 
wrote:

> **
> On Wed, 2011-08-03 at 22:02 +0300, Andre Polykanine wrote:
>
> Hello Alex,
>
> Thanks for the tip. I'm not storing it in the database (you see, it's 
> "asdfasdf" and the key string is "secret key"), I'm just studying mcrypt's 
> possibilities :-).
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> My blog: http://oire.org/menelion (mostly in Russian)
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion
>
>  Original message 
> From: Alex Nikitin 
> To: Andre Polykanine
> Date created: , 9:27:42 PM
> Subject: [PHP] Studying mcrypt
>
>
>   Yes, since it's trying to represent in characters some purely binary 
> data,
> it is not unlikely that you will get VERY weird characters (and you do).
>
> Also you shouldn't actually encrypt passwords, the proper way to store them
> is hashed, so that if someone grabs your database, they dont have your
> passwords, even if they have the "key".
>
> Best way to check is to decrypt it and verify...
>
> --
> The trouble with programmers is that you can never tell what a programmer is
> doing until it’s too late.  ~Seymour Cray
>
>
>
> On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine  wrote:
>
> > Hello Php,
> >
> >  It's my first time I use mcrypt.
> > I've done everything like it's written in the php manuals, here is the
> > code:
> >
> >  > $d=mcrypt_module_open("rijndael-256", "", "ofb", "");
> > $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM);
> > $ks=mcrypt_enc_get_key_size($d);
> > $key=substr(md5("Secret key"), 0, $ks);
> > mcrypt_generic_init($d, $key, $iv);
> > $cpass=mcrypt_generic($d, $_POST['opass']);
> > mcrypt_generic_deinit($d);
> > mcrypt_module_close($d);
> > ?>
> >
> > And here's what I get:
> > Original password: asdfasdfasdf
> > Encrypted password: Q�  j�*
> >
> > Question: Is it normal to have such strange characters in the encrypted
> > string?
> > I'm hosted at http://godaddy.com/, shared hosting, if it does matter.
> > Thanks!
> >
> > --
> > With best regards from Ukraine,
> > Andre
> > Skype: Francophile
> > Twitter: http://twitter.com/m_elensule
> > Facebook: http://facebook.com/menelion
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>
>
> Please don't top-post :)
>
> You can use base64_encode() on it to convert it into something that's
> printable and storable in the DB without having to resort to a binary blob
>
>
>   --
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
Isn't that a bit counterproductive though, storing it in binary?

Purely storage-related:
Say we are storing a 128byte result of encryption.
Storing it in a varbin would mean that you would use up 128+1 bytes of
storage, where as if you were to base64 encode it, data length would be 170
or so bytes, +1byte or 171bytes...  42 bytes difference...


This was a crypto class i wrote for something, i cant even recall exactly
what project it was for, it is making it's way into the framework, but for
now, i've changed it to be "normal" again

Hopefully it should be pretty straight forward:

http://pastebin.com/TFn468dM

--
The trouble with programmers is that you can never tell what a programmer is
doing until it’s too late.  ~Seymour Cray


Re: [PHP] Studying mcrypt

2011-08-03 Thread Ashley Sheridan
On Wed, 2011-08-03 at 15:35 -0400, Alex Nikitin wrote:

> On Wed, Aug 3, 2011 at 3:08 PM, Ashley Sheridan 
> wrote:
> 
> > **
> > On Wed, 2011-08-03 at 22:02 +0300, Andre Polykanine wrote:
> >
> > Hello Alex,
> >
> > Thanks for the tip. I'm not storing it in the database (you see, 
> > it's "asdfasdf" and the key string is "secret key"), I'm just studying 
> > mcrypt's possibilities :-).
> >
> > --
> > With best regards from Ukraine,
> > Andre
> > Skype: Francophile
> > My blog: http://oire.org/menelion (mostly in Russian)
> > Twitter: http://twitter.com/m_elensule
> > Facebook: http://facebook.com/menelion
> >
> >  Original message 
> > From: Alex Nikitin 
> > To: Andre Polykanine
> > Date created: , 9:27:42 PM
> > Subject: [PHP] Studying mcrypt
> >
> >
> >   Yes, since it's trying to represent in characters some purely binary 
> > data,
> > it is not unlikely that you will get VERY weird characters (and you do).
> >
> > Also you shouldn't actually encrypt passwords, the proper way to store them
> > is hashed, so that if someone grabs your database, they dont have your
> > passwords, even if they have the "key".
> >
> > Best way to check is to decrypt it and verify...
> >
> > --
> > The trouble with programmers is that you can never tell what a programmer is
> > doing until it’s too late.  ~Seymour Cray
> >
> >
> >
> > On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine  wrote:
> >
> > > Hello Php,
> > >
> > >  It's my first time I use mcrypt.
> > > I've done everything like it's written in the php manuals, here is the
> > > code:
> > >
> > >  > > $d=mcrypt_module_open("rijndael-256", "", "ofb", "");
> > > $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM);
> > > $ks=mcrypt_enc_get_key_size($d);
> > > $key=substr(md5("Secret key"), 0, $ks);
> > > mcrypt_generic_init($d, $key, $iv);
> > > $cpass=mcrypt_generic($d, $_POST['opass']);
> > > mcrypt_generic_deinit($d);
> > > mcrypt_module_close($d);
> > > ?>
> > >
> > > And here's what I get:
> > > Original password: asdfasdfasdf
> > > Encrypted password: Q�  j�*
> > >
> > > Question: Is it normal to have such strange characters in the encrypted
> > > string?
> > > I'm hosted at http://godaddy.com/, shared hosting, if it does matter.
> > > Thanks!
> > >
> > > --
> > > With best regards from Ukraine,
> > > Andre
> > > Skype: Francophile
> > > Twitter: http://twitter.com/m_elensule
> > > Facebook: http://facebook.com/menelion
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
> >
> > Please don't top-post :)
> >
> > You can use base64_encode() on it to convert it into something that's
> > printable and storable in the DB without having to resort to a binary blob
> >
> >
> >   --
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> Isn't that a bit counterproductive though, storing it in binary?
> 
> Purely storage-related:
> Say we are storing a 128byte result of encryption.
> Storing it in a varbin would mean that you would use up 128+1 bytes of
> storage, where as if you were to base64 encode it, data length would be 170
> or so bytes, +1byte or 171bytes...  42 bytes difference...
> 
> 
> This was a crypto class i wrote for something, i cant even recall exactly
> what project it was for, it is making it's way into the framework, but for
> now, i've changed it to be "normal" again
> 
> Hopefully it should be pretty straight forward:
> 
> http://pastebin.com/TFn468dM
> 
> --
> The trouble with programmers is that you can never tell what a programmer is
> doing until it’s too late.  ~Seymour Cray


The beauty of encoding something into base64 is that you can then easily
move that data around to systems that can't handle binary. You can pass
a base64 image down to the browser to display, without requiring a
second script to create the image used in the  tag. Javascript can
manipulate base64 data making it an alternative to json where json won't
work. Command line environments won't be able to deal with binary
arguments, but base64 is fine. It all depends on what you want to do
with it at the end of the day.
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] How do I enable $_SERVER['HTTP_X_WAP_PROFILE'] or $_SERVER['HTTP_PROFILE']

2011-08-03 Thread Daevid Vincent
I'm working on a mobile site and from the various searches and reading (and
even code fragments I've inherited for the project), they make reference to:

$_SERVER['HTTP_X_WAP_PROFILE'] and a fallback $_SERVER['HTTP_PROFILE']

However, when I hit a phpinfo(); page using both an Android MyTouch 3G (2.2)
and an Apple iPhone 3G, there are nothing even close to those. All of the
'HTTP_X_*' headers are absent and there is no HTTP_PROFILE either.

http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-
detection/
http://mobiforge.com/developing/blog/useful-x-headers
http://blog.svnlabs.com/tag/_serverhttp_x_wap_profile/


Do I need to enable something in Apache or PHP??

PHP Version 5.3.6
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans

and 

$ httpd -v
Server version: Apache/2.2.17 (FreeBSD)


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



Re: [PHP] Best editor?

2011-08-03 Thread Mike Hansen

On 8/3/2011 7:22 AM, Matty Sarro wrote:

Hey everyone,
I am a super newbie just beginning to learn PHP. Awhile ago, I had
used aptana for dabbling with php and was amazed to find out that it
had a built in php interpreter so I could do some minor testing
without having to upload everything to a web server, or have a web
server locally. Flash forward to now, and it looks like that
functionality doesn't exist anymore (at least not by default).

So, I'm curious what editors are out there? Are there any out there
which will let me test PHP files without having to upload everything
every time I edit it? Any help would be greatly appreciated. Thanks!
-Matty

I mostly use VIM. However, I did play with PHP Storm, and it's pretty 
nice. It also has a plug-in that emulate vi/vim.


I've used Komodo in the past. It's also good.



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



Re: [PHP] Best editor?

2011-08-03 Thread Pedro Quaresma
A Quarta, 3 de Agosto de 2011 21:16:52 Mike Hansen você escreveu:
> On 8/3/2011 7:22 AM, Matty Sarro wrote:
> > Hey everyone,
> > I am a super newbie just beginning to learn PHP. Awhile ago, I had
> > used aptana for dabbling with php and was amazed to find out that it
> > had a built in php interpreter so I could do some minor testing
> > without having to upload everything to a web server, or have a web
> > server locally. Flash forward to now, and it looks like that
> > functionality doesn't exist anymore (at least not by default).
> > 
> > So, I'm curious what editors are out there? Are there any out there
> > which will let me test PHP files without having to upload everything
> > every time I edit it? Any help would be greatly appreciated. Thanks!
> > -Matty
> 
> I mostly use VIM. However, I did play with PHP Storm, and it's pretty
> nice. It also has a plug-in that emulate vi/vim.
> 
> I've used Komodo in the past. It's also good.

(X)emacs is also a nice option.

Geany is an IDE but small and very nice and easy to use.

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



Re: [PHP] Studying mcrypt

2011-08-03 Thread Alex Nikitin
On Wed, Aug 3, 2011 at 4:05 PM, Ashley Sheridan 
wrote:

> **
> On Wed, 2011-08-03 at 15:35 -0400, Alex Nikitin wrote:
>
> On Wed, Aug 3, 2011 at 3:08 PM, Ashley Sheridan 
> wrote:
>
> > **
> > On Wed, 2011-08-03 at 22:02 +0300, Andre Polykanine wrote:
> >
> > Hello Alex,
> >
> > Thanks for the tip. I'm not storing it in the database (you see, 
> > it's "asdfasdf" and the key string is "secret key"), I'm just studying 
> > mcrypt's possibilities :-).
> >
> > --
> > With best regards from Ukraine,
> > Andre
> > Skype: Francophile
> > My blog: http://oire.org/menelion (mostly in Russian)
> > Twitter: http://twitter.com/m_elensule
> > Facebook: http://facebook.com/menelion
> >
> >  Original message 
> > From: Alex Nikitin 
> > To: Andre Polykanine
> > Date created: , 9:27:42 PM
> > Subject: [PHP] Studying mcrypt
> >
> >
> >   Yes, since it's trying to represent in characters some purely binary 
> > data,
> > it is not unlikely that you will get VERY weird characters (and you do).
> >
> > Also you shouldn't actually encrypt passwords, the proper way to store them
> > is hashed, so that if someone grabs your database, they dont have your
> > passwords, even if they have the "key".
> >
> > Best way to check is to decrypt it and verify...
> >
> > --
> > The trouble with programmers is that you can never tell what a programmer is
> > doing until it’s too late.  ~Seymour Cray
> >
> >
> >
> > On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine  wrote:
> >
> > > Hello Php,
> > >
> > >  It's my first time I use mcrypt.
> > > I've done everything like it's written in the php manuals, here is the
> > > code:
> > >
> > >  > > $d=mcrypt_module_open("rijndael-256", "", "ofb", "");
> > > $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM);
> > > $ks=mcrypt_enc_get_key_size($d);
> > > $key=substr(md5("Secret key"), 0, $ks);
> > > mcrypt_generic_init($d, $key, $iv);
> > > $cpass=mcrypt_generic($d, $_POST['opass']);
> > > mcrypt_generic_deinit($d);
> > > mcrypt_module_close($d);
> > > ?>
> > >
> > > And here's what I get:
> > > Original password: asdfasdfasdf
> > > Encrypted password: Q�  j�*
> > >
> > > Question: Is it normal to have such strange characters in the encrypted
> > > string?
> > > I'm hosted at http://godaddy.com/, shared hosting, if it does matter.
> > > Thanks!
> > >
> > > --
> > > With best regards from Ukraine,
> > > Andre
> > > Skype: Francophile
> > > Twitter: http://twitter.com/m_elensule
> > > Facebook: http://facebook.com/menelion
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> >
> >
> > Please don't top-post :)
> >
> > You can use base64_encode() on it to convert it into something that's
> > printable and storable in the DB without having to resort to a binary blob
> >
> >
> >   --
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> Isn't that a bit counterproductive though, storing it in binary?
>
> Purely storage-related:
> Say we are storing a 128byte result of encryption.
> Storing it in a varbin would mean that you would use up 128+1 bytes of
> storage, where as if you were to base64 encode it, data length would be 170
> or so bytes, +1byte or 171bytes...  42 bytes difference...
>
>
> This was a crypto class i wrote for something, i cant even recall exactly
> what project it was for, it is making it's way into the framework, but for
> now, i've changed it to be "normal" again
>
> Hopefully it should be pretty straight forward:
> http://pastebin.com/TFn468dM
>
> --
> The trouble with programmers is that you can never tell what a programmer is
> doing until it’s too late.  ~Seymour Cray
>
>
> The beauty of encoding something into base64 is that you can then easily
> move that data around to systems that can't handle binary. You can pass a
> base64 image down to the browser to display, without requiring a second
> script to create the image used in the  tag. Javascript can manipulate
> base64 data making it an alternative to json where json won't work. Command
> line environments won't be able to deal with binary arguments, but base64 is
> fine. It all depends on what you want to do with it at the end of the day.
>
>   --
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
That's why i prefaced it with "purely storage-related".

base64 is awesome, i use it as a hack to get around xss and sql injection,
it works beautifully :)

--
The trouble with programmers is that you can never tell what a programmer is
doing until it’s too late.  ~Seymour Cray


Re: [PHP] Best editor?

2011-08-03 Thread Curtis Maurand


Mike Hansen wrote:

>>
> I mostly use VIM.
However, I did play with PHP Storm, and it's pretty
> nice. It
also has a plug-in that emulate vi/vim.
> 
> I've used
Komodo in the past. It's also good.
> 
I've used and like
Quanta Plus (KDE on Linux). I've used Bluefish on Windows and Linux,
Notepad++ on Windows, UltraEdit on Windows, NetBeans on windows. 
Zend Studio on Windows NuSphere PHPEdI have Komodo, but haven't really
played with it much.

I like UltraEdit, Netbeans, Zend Studio
and NuSphere PHP.  I've use NuSphere the most.  I use Quanta
Plus on Linux the most.


Re: [PHP] Best editor?

2011-08-03 Thread Ashley Sheridan
On Wed, 2011-08-03 at 16:53 -0400, Curtis Maurand wrote:

> 
> Mike Hansen wrote:
> 
> >>
> > I mostly use VIM.
> However, I did play with PHP Storm, and it's pretty
> > nice. It
> also has a plug-in that emulate vi/vim.
> > 
> > I've used
> Komodo in the past. It's also good.
> > 
> I've used and like
> Quanta Plus (KDE on Linux). I've used Bluefish on Windows and Linux,
> Notepad++ on Windows, UltraEdit on Windows, NetBeans on windows. 
> Zend Studio on Windows NuSphere PHPEdI have Komodo, but haven't really
> played with it much.
> 
> I like UltraEdit, Netbeans, Zend Studio
> and NuSphere PHP.  I've use NuSphere the most.  I use Quanta
> Plus on Linux the most.



This is a bit of recurring thread every few weeks, but here's my answers
again this time around:

Kate (Linux and Windows) for simple editing, where you only need syntax
highlighting and not a full blown auto-suggest IDE
Netbeans for an IDE, as it has good SVN integration and is
cross-platform (so I can use the same environment at home (Linux) and
work (Windows))

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Best editor?

2011-08-03 Thread Ricardo Martinez
hi!
" > Notepad!!!  LOL..  I use netbeans but eclipse is nice.  A lot of it is
> personal opinion. "

i was using notepad a lot of years, nowdays i use gedit (@linux ) i think
that gedit is avaible for windows too.

Greetings!!!

On Wed, Aug 3, 2011 at 5:43 PM, Andre Polykanine  wrote:

> Hi,
>
> > Notepad!!!  LOL..  I use netbeans but eclipse is nice.  A lot of it is
> > personal opinion.
>
>I have been using Notepad since... oh, since 2007, I believe). And it's
> my editor of choice :-). Actually now I'm using AkelPad because of the
> unicode issues (I need to save without a bit order mark).
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> My blog: http://oire.org/menelion (mostly in Russian)
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Ricardo
___
IT Architect
website: http://www.pulsarinara.com


Re: [PHP] Best editor?

2011-08-03 Thread Andre Polykanine
Hello Ricardo,

  

RM> i was using notepad a lot of years, nowdays i use gedit (@linux ) i think
RM> that gedit is avaible for windows too.

Unfortunately, it isn't accessible for visually impaired users.

-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion


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



Re: [PHP] Best editor?

2011-08-03 Thread Sharl.Jimh.Tsin
在 2011-08-03三的 09:40 -0400,Judson Vaughn写道:
> I recommend Coda for Mac (about $100) as editor. And MAMP as a web server for 
> testing PHP files locally. 
> 
> Jud
> 
> 
> Sent from my iPad
> Jud at bizville.com
> Phone 703-303-4271
> 
> On Aug 3, 2011, at 9:26 AM, Steve Staples  wrote:
> 
> > On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
> >> Hey everyone,
> >> I am a super newbie just beginning to learn PHP. Awhile ago, I had
> >> used aptana for dabbling with php and was amazed to find out that it
> >> had a built in php interpreter so I could do some minor testing
> >> without having to upload everything to a web server, or have a web
> >> server locally. Flash forward to now, and it looks like that
> >> functionality doesn't exist anymore (at least not by default).
> >> 
> >> So, I'm curious what editors are out there? Are there any out there
> >> which will let me test PHP files without having to upload everything
> >> every time I edit it? Any help would be greatly appreciated. Thanks!
> >> -Matty
> >> 
> > 
> > I personally use Komodo IDE, but there are lots out there.  There is the
> > Eclipse with PHP, or there was the way I learned, NotePad (then switched
> > to EditPlus+)
> > 
> > Steve
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 

To me,i usually use NetBeans for PHP project, not Eclipse-based Zend
Studio duo to non-free.

-- 
Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)

Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.


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



[PHP] Form Already Filled Out

2011-08-03 Thread wil prim
Hello, S i created a simple login system, and I am using sessions  Everything seems to work fine, however; when I upload my files to my server and type my domain name my index.php page comes up and the form is automatically filled out with a username and password. How do i make it empty when I initially enter the site, and yes I did create a logout.php file that destroys a session. Please help, it is hard to explain this when I cant show it in person. Thanks in advance!Here is the login.php code, i didn't md5() the password yet: if ($_SESSION['user']){    header("Location: error.php");    exit();}include('connect.php');if ($_POST['login']){    $user=$_POST['user'];$pass=$_POST['pass'];$sql="SELECT * FROM members WHERE username='$_POST[user]' and password='$_POST[pass]'";$result=mysql_query($sql, $con);$count=mysql_num_rows($result);if ($count==1){  $_SESSION['user'] = $user;  header('location: home.php');}else    echo "Wrong Username or Password";}?>                                           Home            Topix            Mission                        Username:         Password:                  Register?             

Re: [PHP] Form Already Filled Out

2011-08-03 Thread Thiago H. Pojda
Hmmm looks like you saved the password and your browser or OS may be filling
it for you.
Em 04/08/2011 01:42, "wil prim"  escreveu:
> Hello, S i created a simple login system, and I am using sessions.
Everything seems to work fine, however; when I upload my files to my server
and type my domain name my index.php page comes up and the form is
automatically filled out with a username and password. How do i make it
empty when I initially enter the site, and yes I did create a logout.php
file that destroys a session. Please help, it is hard to explain this when I
cant show it in person. Thanks in advance!
>
> Here is the login.php code, i didn't md5() the password yet:
>
>
> 
> if ($_SESSION['user'])
> {
> header("Location: error.php");
> exit();
> }
> include('connect.php');
> if ($_POST['login']){
>
>
> $user=$_POST['user'];
> $pass=$_POST['pass'];
> $sql="SELECT * FROM members WHERE username='$_POST[user]' and
password='$_POST[pass]'";
> $result=mysql_query($sql, $con);
> $count=mysql_num_rows($result);
> if ($count==1){
> $_SESSION['user'] = $user;
> header('location: home.php');
> }
> else
> echo "Wrong Username or Password";
> }
>
> ?>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Home
> 
> 
> Topix
> 
> 
> Mission
> 
> 
> 
> 
> 
> Username: 
> 
> Password: 
> 
> 
> 
>  Register? 
>
> 
> 
> 


RE: [PHP] Best editor?

2011-08-03 Thread Florian Müller

I don't think UltraEdit is a good editor, because it has some really great 
troubles with simple syntax highlighting... Well, my version can't even 
highlight a string on two rows ¬.¬


> Date: Wed, 3 Aug 2011 17:04:01 +0200
> From: hbal...@gmail.com
> To: php-general@lists.php.net
> Subject: Re: [PHP] Best editor?
> 
> Hi,
> On Windows I used UltraEdit. On Linux Kate is simple and comfortable app.
> Actually I prefer NetBeans too. Eclipse could be faster but I think less
> comfortable...
> *Valentine*
> 
> On Wed, Aug 3, 2011 at 4:45 PM, Matt Giddings  wrote:
> 
> > Notepad!!!  LOL..  I use netbeans but eclipse is nice.  A lot of it is
> > personal opinion.
> >
> > On Wed, Aug 3, 2011 at 9:46 AM, Florian Müller  > >wrote:
> >
> > >
> > > Maybe an adittional information: PSPad is completely freeware and
> > portable.
> > >
> > > You can download it right here: http://pspad.en.softonic.com/
> > >
> > > This would be the best idea if you can't run a local server, because if
> > > there is an editor with this functionality built in, he'd have to bring a
> > > little local server with it, and I really don't know an editor which is
> > able
> > > to do that without an external software.
> > >
> > > Regards and much fun ;) Flo
> > >
> > > > From: florip...@hotmail.com
> > > > To: msa...@gmail.com; sstap...@mnsi.net
> > > > CC: php-general@lists.php.net
> > > > Date: Wed, 3 Aug 2011 15:40:12 +0200
> > > > Subject: RE: [PHP] Best editor?
> > > >
> > > >
> > > > I'm using PSPad since one year, and I'm very happy with it.
> > > >
> > > > With your description, I think it is the most simple way with it:
> > Connect
> > > it with a webserver, and then you can edit all files right on the server,
> > so
> > > if you save, they are live.
> > > >
> > > > PSPad is actually even a portable program, and there are lots of syntax
> > > highlighters, so this program is very nice!
> > > >
> > > > > Date: Wed, 3 Aug 2011 09:32:34 -0400
> > > > > From: msa...@gmail.com
> > > > > To: sstap...@mnsi.net
> > > > > CC: php-general@lists.php.net
> > > > > Subject: Re: [PHP] Best editor?
> > > > >
> > > > > Let me clarify a bit... I don't own my own machine - I'm using my
> > work
> > > > > computer. I can install an editor, but installing a full fledged
> > > > > server would be verboten (like WAMP). And while its not hard to set
> > up
> > > > > a VM in virtualbox, I'd prefer not to if I don't have to. I know the
> > > > > functionality of testing inside the editor used to be there, I'd just
> > > > > like to see if I can find it again :)
> > > > >
> > > > > If I have to, i'll just go the VM route.
> > > > >
> > > > > On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples 
> > > wrote:
> > > > > > On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote:
> > > > > >> Hey everyone,
> > > > > >> I am a super newbie just beginning to learn PHP. Awhile ago, I had
> > > > > >> used aptana for dabbling with php and was amazed to find out that
> > it
> > > > > >> had a built in php interpreter so I could do some minor testing
> > > > > >> without having to upload everything to a web server, or have a web
> > > > > >> server locally. Flash forward to now, and it looks like that
> > > > > >> functionality doesn't exist anymore (at least not by default).
> > > > > >>
> > > > > >> So, I'm curious what editors are out there? Are there any out
> > there
> > > > > >> which will let me test PHP files without having to upload
> > everything
> > > > > >> every time I edit it? Any help would be greatly appreciated.
> > Thanks!
> > > > > >> -Matty
> > > > > >>
> > > > > >
> > > > > > I personally use Komodo IDE, but there are lots out there.  There
> > is
> > > the
> > > > > > Eclipse with PHP, or there was the way I learned, NotePad (then
> > > switched
> > > > > > to EditPlus+)
> > > > > >
> > > > > > Steve
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > >
> > >
> > >
> >
  

RE: [PHP] Best editor?

2011-08-03 Thread Florian Müller

Ahm . oh ^^ so, for the size of projects which I am realising, there is no 
problem of live editing. And even for learning PHP, it's a good idea to make it 
live on a server because if he wants to learn it, he does not have a website he 
edits on which has a really big traffic. So this would be the best choice I 
think... 

If I got bigger projects, I always edit in a single beta folder, just to say ^^

> From: tamouse.li...@gmail.com
> To: php-general@lists.php.net
> Date: Wed, 3 Aug 2011 11:46:15 -0500
> Subject: Re: [PHP] Best editor?
> 
> 
> On Aug 3, 2011, at 11:39 AM, David Harkness wrote:
> 
> > On Wed, Aug 3, 2011 at 9:36 AM, Tamara Temple  
> >  wrote:
> > Not to hijack the thread, but I really, *really* hope you are not  
> > suggesting that someone do live edits on a production server
> >
> > I would never consider tinkering on test pages while learning PHP a  
> > "production" server. :)
> >
>   I think you missed my point -- that wasn't to the OP, that was to  
> the respondent talking about how PSPad lets you edit files directly on  
> the webserver
  

Re: [PHP] Form Already Filled Out

2011-08-03 Thread James Yerge
On 08/05/2011 12:43 AM, wil prim wrote:
> Hello, S i created a simple login system, and I am using sessions 
> Everything 
> seems to work fine, however; when I upload my files to my server and type my 
> domain name my index.php page comes up and the form is automatically filled 
> out 
> with a username and password. How do i make it empty when I initially enter 
> the 
> site, and yes I did create a logout.php file that destroys a session. Please 
> help, it is hard to explain this when I cant show it in person. Thanks in 
> advance!
>
> Here is the login.php code, i didn't md5() the password yet:
>
>
> 
> if ($_SESSION['user'])
> {
> header("Location: error.php");
> exit();
> }
> include('connect.php');
> if ($_POST['login']){
>
>
> $user=$_POST['user'];
> $pass=$_POST['pass'];
> $sql="SELECT * FROM members WHERE username='$_POST[user]' and 
> password='$_POST[pass]'";
> $result=mysql_query($sql, $con);
> $count=mysql_num_rows($result);
> if ($count==1){
> $_SESSION['user'] = $user;
> header('location: home.php');
> }
> else
> echo "Wrong Username or Password";
> }
>
> ?>
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> Home
> 
> 
> Topix
> 
> 
> Mission
> 
> 
> 
> 
> 
> Username: 
> 
> Password: 
> 
> 
> 
>  Register? 
>
> 
> 
> 

Your browser is more than likely filling in the username and password
fields for you, automatically. Most modern browsers offer this
functionality by default. What you're looking for isn't relative to PHP.

Have you tried visiting your page from multiple browsers, to see if you
get the same results?

You could set the value of the username and password fields in the form
to NULL.

e.g.;



I doubt your visitors are going to encounter the same issue you are,
unless they allow their browser or some other 3rd party software to
automatically fill in the form values for them.

Another method would consist of using JavaScript, once the DOM is ready
(all elements rendered), have JavaScript reset the form values.



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