Re: [PHP] MSSQL failing.

2010-07-09 Thread Paul Halliday
>>
>> What am I missing?
>>
>
> Is the slash before the domain name above just a typo in your e-mail?
> It took a while to get mssql configured to where I could test it here
> since we're using Microsoft's SQL Server Driver for PHP (if you are
> running PHP under Windows, I'd strongly recommend this over the old
> mssql library anyway), but this worked:
>
> 
> $hostname = 'hostname:1433';
>
> $username = 'DOMAIN\Username';
> $password = 'password';
>
> $conn = mssql_connect($hostname, $username, $password) or die('Unable
> to connect');
>
> var_dump($conn);
>
> ?>
>
> Andrew
>

It was a typo :) The installation is running on FreeBSD. I am looking
at TDS right now as a possible cause.

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



Re: [PHP] MSSQL failing.

2010-07-09 Thread Paul Halliday
On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday  wrote:
>>>
>>> What am I missing?
>>>
>>
>> Is the slash before the domain name above just a typo in your e-mail?
>> It took a while to get mssql configured to where I could test it here
>> since we're using Microsoft's SQL Server Driver for PHP (if you are
>> running PHP under Windows, I'd strongly recommend this over the old
>> mssql library anyway), but this worked:
>>
>> >
>> $hostname = 'hostname:1433';
>>
>> $username = 'DOMAIN\Username';
>> $password = 'password';
>>
>> $conn = mssql_connect($hostname, $username, $password) or die('Unable
>> to connect');
>>
>> var_dump($conn);
>>
>> ?>
>>
>> Andrew
>>
>
> It was a typo :) The installation is running on FreeBSD. I am looking
> at TDS right now as a possible cause.
>

Got it:

In /usr/local/etc/freetds.conf:

[global]
   host = 10.x.x.x
   port = 1433
   client charset = UTF-8
   tds version = 8.0
   text size = 20971520

Thanks.

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



Re: [PHP] State and City Database

2010-07-09 Thread Thijs Lensselink

On 07/07/2010 10:02 PM, tedd wrote:

Hi gang:

Does anyone have a source for a US State and City database?

Cheers,

tedd
   


Hey Tedd,

Maybe this helps. I used the data files for some other projects..

http://earth-info.nga.mil/gns/html/
http://geonames.usgs.gov/



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



Re: [PHP] MSSQL failing.

2010-07-09 Thread Andrew Ballard
On Fri, Jul 9, 2010 at 7:10 AM, Paul Halliday  wrote:
> On Fri, Jul 9, 2010 at 7:12 AM, Paul Halliday  wrote:
>> It was a typo :) The installation is running on FreeBSD. I am looking
>> at TDS right now as a possible cause.
>>
>
> Got it:
>
> In /usr/local/etc/freetds.conf:
>
> [global]
>       host = 10.x.x.x
>       port = 1433
>       client charset = UTF-8
>       tds version = 8.0
>       text size = 20971520
>
> Thanks.
>

I'm glad you got it working. That's pretty much what I found when I
tried to set it up here as well. I left the host and port out of my
freetds.conf file, though.


Andrew

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



Re: [PHP] State and City Database

2010-07-09 Thread tedd

At 2:07 PM +0200 7/9/10, Thijs Lensselink wrote:

On 07/07/2010 10:02 PM, tedd wrote:

Hi gang:

Does anyone have a source for a US State and City database?

Cheers,

tedd



Hey Tedd,

Maybe this helps. I used the data files for some other projects..

http://earth-info.nga.mil/gns/html/
http://geonames.usgs.gov/


LOL

Did you look at the name of the Executive Secretary on that page? 
Being dyslexic, I immediately read "You Lost", which seemed ironic 
for the USGS.


I know I asked in my post for US State and City database and did not 
mention zip codes, but that was something I was after as well.


Strangely enough, the USGS states that it's the U.S. Census Bureau 
who keeps the zip codes. But the U.S. Census Bureau says it's the US 
Postal Service and the US Postal Service points to private businesses 
such as:


http://www.zip-codes.com/

I was almost certain that the UP Postal Service had something, but I 
couldn't find it.


I'm not sure where I got my current database, but I think I'll just 
stick with it and allow the client to get a subscription for an 
update (if they want).


Here's an example of my copy working:

http://php1.net/b/zipcode-states/index.php

In any event, thanks for the link.

Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Last day to submit your Surge 2010 CFP!

2010-07-09 Thread Jason Dixon
Today is your last chance to submit a CFP abstract for the 2010 Surge
Scalability Conference.  The event is taking place on Sept 30 and Oct 1,
2010 in Baltimore, MD.  Surge focuses on case studies that address
production failures and the re-engineering efforts that led to victory
in Web Applications or Internet Architectures.

You can find more information, including suggested topics and our
current list of speakers, online:

http://omniti.com/surge/2010

The final lineup should be available on the conference website next
week.  If you have questions about the CFP, attending Surge, or having
your business sponsor/exhibit at Surge 2010, please contact us at
su...@omniti.com.

Thanks!

-- 
Jason Dixon
OmniTI Computer Consulting, Inc.
jdi...@omniti.com
443.325.1357 x.241

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



[PHP] Re: validating form input

2010-07-09 Thread Shawn McKenzie
On 07/08/2010 02:38 PM, David Mehler wrote:
> Hello,
> Got a form that takes in data to enter in to a database. I want to
> make it as secure and as invulnerable to sql injection and other
> attacks as possible. I'm wondering if mysqli_real_escape_string or
> stripslashes should be used or if the former does the latter. For
> example, I have a name variable:
> 

In general this is fine:

> $name = mysqli_real_escape_string($DatabaseLink, trim($_POST['name']));
> 
> or should I do:

You need to do something like this only if magic_quotes are enabled on
your PHP installation, except you would stripslashes first:

if(get_magic_quotes_gpc()) {
   $_POST['name'] = stripslashes($_POST['name']);
}
$name = mysqli_real_escape_string($DatabaseLink, trim($_POST['name']));

> 
> $name = stripslashes(mysqli_real_escape_string($dbc, trim($_POST['name'])));
> 
> Thanks.
> Dave.


-- 
Thanks!
-Shawn
http://www.spidean.com

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



[PHP] Login In script quesitons

2010-07-09 Thread Gary
I have a log in script that is not working.  It is taken from a lesson book 
that I read about a year or so ago so the lessons are not fresh in my mind.

My questions are.

1. Why is this not working?
2. Does is look secure?
3. In researching the issue, I was reading some older threads that it was a 
better idea to use some commercial ready made scripts.  Are there any 
recommendations?

Here is the code to the script I am trying to get to work.  I get no error 
message, however if it will not log me in with a correct un/pw or if I leave 
it blank, I get the same message and it allows the next page to be viewed 
(which I do not want).  DB is set up with data in it.

Login Page:



http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

  
  xxx- Log In
  


  xxx- Log In

' . $error_msg . '';
?>

  

  Log In
  Username:
  
  Password:
  


  

You are logged in as ' . $_SESSION['username'] . 
'.');
  }
?>




Processing page:


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>



xxx


















  






' . $error_msg . '';
?>

You are logged in as ' . $_SESSION['username'] . 
'.');
  }
?>
Story//text to let me know if the page opened










__ Information from ESET Smart Security, version of virus signature 
database 5265 (20100709) __

The message was checked by ESET Smart Security.

http://www.eset.com





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



Re: [PHP] Login In script quesitons

2010-07-09 Thread Richard Quadling
On 9 July 2010 16:42, Gary  wrote:
[snip]

Take a look at https://code.google.com/p/loginsystem-rd/

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



Re: [PHP] State and City Database

2010-07-09 Thread Paul M Foster
On Fri, Jul 09, 2010 at 10:43:09AM -0400, tedd wrote:




>
> Here's an example of my copy working:
>
> http://php1.net/b/zipcode-states/index.php

Problem: the city and state select drop-downs won't stay dropped for me,
and won't accept anything but Lansing, Michigan. They don't drop down
long enough for me to select anything else. Zip drop down appears to
work okay.

Paul

-- 
Paul M. Foster

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



Re: [PHP] State and City Database

2010-07-09 Thread Jim Lucas
Paul M Foster wrote:
> On Fri, Jul 09, 2010 at 10:43:09AM -0400, tedd wrote:
> 
> 
> 
> 
>> Here's an example of my copy working:
>>
>> http://php1.net/b/zipcode-states/index.php
> 
> Problem: the city and state select drop-downs won't stay dropped for me,
> and won't accept anything but Lansing, Michigan. They don't drop down
> long enough for me to select anything else. Zip drop down appears to
> work okay.
> 
> Paul
> 

Similar issue here too.  But I can at least select a state (if I'm quick) and
then when I click on the city, the list blinks and then deletes the contents of
the state and zip code dropdown menus.

System: Windows XP SP3 + FF v3.5.3 w/Firebug

Checking with my Opera 9.24 install, seems to do something similar.  Timer is
very fast and it doesn't allow for me to click on anything.

-- 
Jim Lucas

A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

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



Re: [PHP] State and City Database

2010-07-09 Thread Floyd Resler

On Jul 9, 2010, at 1:58 PM, Jim Lucas wrote:

> Paul M Foster wrote:
>> On Fri, Jul 09, 2010 at 10:43:09AM -0400, tedd wrote:
>> 
>> 
>> 
>> 
>>> Here's an example of my copy working:
>>> 
>>> http://php1.net/b/zipcode-states/index.php
>> 
>> Problem: the city and state select drop-downs won't stay dropped for me,
>> and won't accept anything but Lansing, Michigan. They don't drop down
>> long enough for me to select anything else. Zip drop down appears to
>> work okay.
>> 
>> Paul
>> 
> 
> Similar issue here too.  But I can at least select a state (if I'm quick) and
> then when I click on the city, the list blinks and then deletes the contents 
> of
> the state and zip code dropdown menus.
> 
> System: Windows XP SP3 + FF v3.5.3 w/Firebug
> 
> Checking with my Opera 9.24 install, seems to do something similar.  Timer is
> very fast and it doesn't allow for me to click on anything.
> 
> -- 
> Jim Lucas
> 

I tried it in Safari and it works just fine.

Take care,
Floyd



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



Re: [PHP] State and City Database

2010-07-09 Thread Jim Lucas
Floyd Resler wrote:
> On Jul 9, 2010, at 1:58 PM, Jim Lucas wrote:
> 
>> Paul M Foster wrote:
>>> On Fri, Jul 09, 2010 at 10:43:09AM -0400, tedd wrote:
>>>
>>>
>>> 
>>>
 Here's an example of my copy working:

 http://php1.net/b/zipcode-states/index.php
>>> Problem: the city and state select drop-downs won't stay dropped for me,
>>> and won't accept anything but Lansing, Michigan. They don't drop down
>>> long enough for me to select anything else. Zip drop down appears to
>>> work okay.
>>>
>>> Paul
>>>
>> Similar issue here too.  But I can at least select a state (if I'm quick) and
>> then when I click on the city, the list blinks and then deletes the contents 
>> of
>> the state and zip code dropdown menus.
>>
>> System: Windows XP SP3 + FF v3.5.3 w/Firebug
>>
>> Checking with my Opera 9.24 install, seems to do something similar.  Timer is
>> very fast and it doesn't allow for me to click on anything.
>>
>> -- 
>> Jim Lucas
>>
> 
> I tried it in Safari and it works just fine.
> 
> Take care,
> Floyd
> 
> 
> 

Just for giggles, I downloaded and installed Safari just now v5.0 (7533.16) and
tried it.

The page is non functional.  The drop down menus exist, but when I select the
state in the state list, it doesn't update the city list or zip code list.  And
when I change the city, it doesn't update the zip code field.

-- 
Jim Lucas

A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

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



Re: [PHP] State and City Database

2010-07-09 Thread Floyd Resler

On Jul 9, 2010, at 2:32 PM, Jim Lucas wrote:

> Floyd Resler wrote:
>> On Jul 9, 2010, at 1:58 PM, Jim Lucas wrote:
>> 
>>> Paul M Foster wrote:
 On Fri, Jul 09, 2010 at 10:43:09AM -0400, tedd wrote:
 
 
 
 
> Here's an example of my copy working:
> 
> http://php1.net/b/zipcode-states/index.php
 Problem: the city and state select drop-downs won't stay dropped for me,
 and won't accept anything but Lansing, Michigan. They don't drop down
 long enough for me to select anything else. Zip drop down appears to
 work okay.
 
 Paul
 
>>> Similar issue here too.  But I can at least select a state (if I'm quick) 
>>> and
>>> then when I click on the city, the list blinks and then deletes the 
>>> contents of
>>> the state and zip code dropdown menus.
>>> 
>>> System: Windows XP SP3 + FF v3.5.3 w/Firebug
>>> 
>>> Checking with my Opera 9.24 install, seems to do something similar.  Timer 
>>> is
>>> very fast and it doesn't allow for me to click on anything.
>>> 
>>> -- 
>>> Jim Lucas
>>> 
>> 
>> I tried it in Safari and it works just fine.
>> 
>> Take care,
>> Floyd
>> 
>> 
>> 
> 
> Just for giggles, I downloaded and installed Safari just now v5.0 (7533.16) 
> and
> tried it.
> 
> The page is non functional.  The drop down menus exist, but when I select the
> state in the state list, it doesn't update the city list or zip code list.  
> And
> when I change the city, it doesn't update the zip code field.
> 
> -- 
> Jim Lucas
> 

That's weird.  I just tried again just to make sure I wasn't seeing things.  I 
selected Indiana and the city list populated with the cities from Indiana.  I 
then chose Indianapolis and the zip codes list populated with Indianapolis zip 
codes.  I'm using Safari 5 on the Mac.  I just tried in in Firefox 3.6.6 on my 
Mac and experienced the same thing you did - the state drop-down doesn't stay 
opened.  Really kind of odd, isn't it?!

Take care,
Floyd



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



Re: [PHP] State and City Database

2010-07-09 Thread tedd

To all:

http://php1.net/b/zipcode-states/index.php

I have not tried the state/city/zip demo with any other than the 
Safari browser. It works for that browser.


Sorry, I should have checked it out via other browsers before 
introducing it to the list.


I will work on it.

Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Login In script quesitons

2010-07-09 Thread Gary

"Richard Quadling"  wrote in message 
news:aanlktilbmyedd8paky9dwgn0q7t6kem4zzutu_49u...@mail.gmail.com...
> On 9 July 2010 16:42, Gary  wrote:
> [snip]
>
> Take a look at https://code.google.com/p/loginsystem-rd/
>

Richard

Thank you for your quick reply and the link.  Since I see you are one of the
creators, thank you for that as well.

I am getting the following error and I'm not sure how to correct it.

Warning: Cannot modify header information - headers already sent by (output
started at /home/content/45/6359745/html/login/include/loginGlobals.php:281)
in /home/content/45/6359745/html/login/include/form_token.php on line 15

Warning: Cannot modify header information - headers already sent by (output
started at /home/content/45/6359745/html/login/include/loginGlobals.php:281)
in /home/content/45/6359745/html/login/include/form_token.php on line 22

Line 15 is: setcookie("token", "", time()-42000);
Line 22 is :if (setcookie("token", $_SESSION["token"], time()+86400)) {

loginGlobals stops at line 278

Again, thank you for all your help.

gary






__ Information from ESET Smart Security, version of virus signature 
database 5266 (20100709) __

The message was checked by ESET Smart Security.

http://www.eset.com





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



Re: [PHP] Login In script quesitons

2010-07-09 Thread Ashley Sheridan
On Fri, 2010-07-09 at 15:43 -0400, Gary wrote:

> "Richard Quadling"  wrote in message 
> news:aanlktilbmyedd8paky9dwgn0q7t6kem4zzutu_49u...@mail.gmail.com...
> > On 9 July 2010 16:42, Gary  wrote:
> > [snip]
> >
> > Take a look at https://code.google.com/p/loginsystem-rd/
> >
> 
> Richard
> 
> Thank you for your quick reply and the link.  Since I see you are one of the
> creators, thank you for that as well.
> 
> I am getting the following error and I'm not sure how to correct it.
> 
> Warning: Cannot modify header information - headers already sent by (output
> started at /home/content/45/6359745/html/login/include/loginGlobals.php:281)
> in /home/content/45/6359745/html/login/include/form_token.php on line 15
> 
> Warning: Cannot modify header information - headers already sent by (output
> started at /home/content/45/6359745/html/login/include/loginGlobals.php:281)
> in /home/content/45/6359745/html/login/include/form_token.php on line 22
> 
> Line 15 is: setcookie("token", "", time()-42000);
> Line 22 is :if (setcookie("token", $_SESSION["token"], time()+86400)) {
> 
> loginGlobals stops at line 278
> 
> Again, thank you for all your help.
> 
> gary
> 
> 
> 
> 
> 
> 
> __ Information from ESET Smart Security, version of virus signature 
> database 5266 (20100709) __
> 
> The message was checked by ESET Smart Security.
> 
> http://www.eset.com
> 
> 
> 
> 
> 


My guess is that you've put the login PHP code after some HTML in that
page? If you output any content at all (even a blank space) it will
output the default headers. What you need to do is have any logic that
includes a header() call before any output.

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




[PHP] Arrays passed to functions lose their indexing - how to maintain?

2010-07-09 Thread Marc Guay
Hi folks,

I have an array that looks a little something like this:

Array ( [6] => 43.712608, -79.360092 [7] => 43.674088, -79.388557 [8]
=> 43.674088, -79.388557 [9] => 43.704666, -79.397873 [10] =>
43.674393, -79.372147 )

but after I pass it to a function, it loses it's indexing and becomes:

Array ( [0] => 43.712608, -79.360092 [1] => 43.674088, -79.388557 [2]
=> 43.674088, -79.388557 [3] => 43.704666, -79.397873 [4] =>
43.674393, -79.372147 )

The indexing is important and I'd like to hang onto it.  Any ideas?  "pointers"?

Marc

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



Re: [PHP] Arrays passed to functions lose their indexing - how to maintain?

2010-07-09 Thread Ashley Sheridan
On Fri, 2010-07-09 at 15:55 -0400, Marc Guay wrote:

> Hi folks,
> 
> I have an array that looks a little something like this:
> 
> Array ( [6] => 43.712608, -79.360092 [7] => 43.674088, -79.388557 [8]
> => 43.674088, -79.388557 [9] => 43.704666, -79.397873 [10] =>
> 43.674393, -79.372147 )
> 
> but after I pass it to a function, it loses it's indexing and becomes:
> 
> Array ( [0] => 43.712608, -79.360092 [1] => 43.674088, -79.388557 [2]
> => 43.674088, -79.388557 [3] => 43.704666, -79.397873 [4] =>
> 43.674393, -79.372147 )
> 
> The indexing is important and I'd like to hang onto it.  Any ideas?  
> "pointers"?
> 
> Marc
> 


Are you passing the array variable by reference? If so, it's probably
the logic of the function that is re-writing the keys. What does the
function look like?

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




Re: [PHP] Login In script quesitons

2010-07-09 Thread Gary

"Ashley Sheridan"  wrote in message 
news:1278705035.2295.2.ca...@localhost...
> On Fri, 2010-07-09 at 15:43 -0400, Gary wrote:
>
>> "Richard Quadling"  wrote in message
>> news:aanlktilbmyedd8paky9dwgn0q7t6kem4zzutu_49u...@mail.gmail.com...
>> > On 9 July 2010 16:42, Gary  wrote:
>> > [snip]
>> >
>> > Take a look at https://code.google.com/p/loginsystem-rd/
>> >
>>
>> Richard
>>
>> Thank you for your quick reply and the link.  Since I see you are one of 
>> the
>> creators, thank you for that as well.
>>
>> I am getting the following error and I'm not sure how to correct it.
>>
>> Warning: Cannot modify header information - headers already sent by 
>> (output
>> started at 
>> /home/content/45/6359745/html/login/include/loginGlobals.php:281)
>> in /home/content/45/6359745/html/login/include/form_token.php on line 15
>>
>> Warning: Cannot modify header information - headers already sent by 
>> (output
>> started at 
>> /home/content/45/6359745/html/login/include/loginGlobals.php:281)
>> in /home/content/45/6359745/html/login/include/form_token.php on line 22
>>
>> Line 15 is: setcookie("token", "", time()-42000);
>> Line 22 is :if (setcookie("token", $_SESSION["token"], time()+86400)) {
>>
>> loginGlobals stops at line 278
>>
>> Again, thank you for all your help.
>>
>> gary
>>
>>
>>
>>
>>
>>
>> __ Information from ESET Smart Security, version of virus 
>> signature database 5266 (20100709) __
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>>
>>
>>
>>
>
>
> My guess is that you've put the login PHP code after some HTML in that
> page? If you output any content at all (even a blank space) it will
> output the default headers. What you need to do is have any logic that
> includes a header() call before any output.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

Ashley

I am aware of that would cause a problem.  I am not finding any html at all 
on either page.

Thanks for your reply.

Gary 



__ Information from ESET Smart Security, version of virus signature 
database 5266 (20100709) __

The message was checked by ESET Smart Security.

http://www.eset.com





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



Re: [PHP] Login In script quesitons

2010-07-09 Thread Ashley Sheridan
On Fri, 2010-07-09 at 15:58 -0400, Gary wrote:

> "Ashley Sheridan"  wrote in message 
> news:1278705035.2295.2.ca...@localhost...
> > On Fri, 2010-07-09 at 15:43 -0400, Gary wrote:
> >
> >> "Richard Quadling"  wrote in message
> >> news:aanlktilbmyedd8paky9dwgn0q7t6kem4zzutu_49u...@mail.gmail.com...
> >> > On 9 July 2010 16:42, Gary  wrote:
> >> > [snip]
> >> >
> >> > Take a look at https://code.google.com/p/loginsystem-rd/
> >> >
> >>
> >> Richard
> >>
> >> Thank you for your quick reply and the link.  Since I see you are one of 
> >> the
> >> creators, thank you for that as well.
> >>
> >> I am getting the following error and I'm not sure how to correct it.
> >>
> >> Warning: Cannot modify header information - headers already sent by 
> >> (output
> >> started at 
> >> /home/content/45/6359745/html/login/include/loginGlobals.php:281)
> >> in /home/content/45/6359745/html/login/include/form_token.php on line 15
> >>
> >> Warning: Cannot modify header information - headers already sent by 
> >> (output
> >> started at 
> >> /home/content/45/6359745/html/login/include/loginGlobals.php:281)
> >> in /home/content/45/6359745/html/login/include/form_token.php on line 22
> >>
> >> Line 15 is: setcookie("token", "", time()-42000);
> >> Line 22 is :if (setcookie("token", $_SESSION["token"], time()+86400)) {
> >>
> >> loginGlobals stops at line 278
> >>
> >> Again, thank you for all your help.
> >>
> >> gary
> >>
> >>
> >>
> >>
> >>
> >>
> >> __ Information from ESET Smart Security, version of virus 
> >> signature database 5266 (20100709) __
> >>
> >> The message was checked by ESET Smart Security.
> >>
> >> http://www.eset.com
> >>
> >>
> >>
> >>
> >>
> >
> >
> > My guess is that you've put the login PHP code after some HTML in that
> > page? If you output any content at all (even a blank space) it will
> > output the default headers. What you need to do is have any logic that
> > includes a header() call before any output.
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> 
> Ashley
> 
> I am aware of that would cause a problem.  I am not finding any html at all 
> on either page.
> 
> Thanks for your reply.
> 
> Gary 
> 
> 
> 
> __ Information from ESET Smart Security, version of virus signature 
> database 5266 (20100709) __
> 
> The message was checked by ESET Smart Security.
> 
> http://www.eset.com
> 
> 
> 
> 
> 

What does your code look like now?

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




Re: [PHP] Login In script quesitons

2010-07-09 Thread Gary

"Ashley Sheridan"  wrote in message 
news:1278705549.2295.4.ca...@localhost...
> On Fri, 2010-07-09 at 15:58 -0400, Gary wrote:
>
>> "Ashley Sheridan"  wrote in message
>> news:1278705035.2295.2.ca...@localhost...
>> > On Fri, 2010-07-09 at 15:43 -0400, Gary wrote:
>> >
>> >> "Richard Quadling"  wrote in message
>> >> news:aanlktilbmyedd8paky9dwgn0q7t6kem4zzutu_49u...@mail.gmail.com...
>> >> > On 9 July 2010 16:42, Gary  wrote:
>> >> > [snip]
>> >> >
>> >> > Take a look at https://code.google.com/p/loginsystem-rd/
>> >> >
>> >>
>> >> Richard
>> >>
>> >> Thank you for your quick reply and the link.  Since I see you are one 
>> >> of
>> >> the
>> >> creators, thank you for that as well.
>> >>
>> >> I am getting the following error and I'm not sure how to correct it.
>> >>
>> >> Warning: Cannot modify header information - headers already sent by
>> >> (output
>> >> started at
>> >> /home/content/45/6359745/html/login/include/loginGlobals.php:281)
>> >> in /home/content/45/6359745/html/login/include/form_token.php on line 
>> >> 15
>> >>
>> >> Warning: Cannot modify header information - headers already sent by
>> >> (output
>> >> started at
>> >> /home/content/45/6359745/html/login/include/loginGlobals.php:281)
>> >> in /home/content/45/6359745/html/login/include/form_token.php on line 
>> >> 22
>> >>
>> >> Line 15 is: setcookie("token", "", time()-42000);
>> >> Line 22 is :if (setcookie("token", $_SESSION["token"], time()+86400)) 
>> >> {
>> >>
>> >> loginGlobals stops at line 278
>> >>
>> >> Again, thank you for all your help.
>> >>
>> >> gary
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> __ Information from ESET Smart Security, version of virus
>> >> signature database 5266 (20100709) __
>> >>
>> >> The message was checked by ESET Smart Security.
>> >>
>> >> http://www.eset.com
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> > My guess is that you've put the login PHP code after some HTML in that
>> > page? If you output any content at all (even a blank space) it will
>> > output the default headers. What you need to do is have any logic that
>> > includes a header() call before any output.
>> >
>> > Thanks,
>> > Ash
>> > http://www.ashleysheridan.co.uk
>>
>> Ashley
>>
>> I am aware of that would cause a problem.  I am not finding any html at 
>> all
>> on either page.
>>
>> Thanks for your reply.
>>
>> Gary
>>
>>
>>
>> __ Information from ESET Smart Security, version of virus 
>> signature database 5266 (20100709) __
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>>
>>
>>
>>
>
> What does your code look like now?
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk


Ashley

This is form_token.php


http://";. 
lg_domain . lg_form_error ."?p=" . $page ."&t=ec");}   }else{  return 
True; }}else{ $_SESSION = array(); if 
(isset($_COOKIE[session_name()])) {   setcookie(session_name(), '', 
time()-42000);   }   session_destroy();   header("Location: http://";. lg_domain 
. lg_form_error ."?p=" . $page ."&t=et");  } }else{  $_SESSION = array();  if 
(isset($_COOKIE[session_name()])) {  setcookie(session_name(), '', 
time()-42000);  }  session_destroy();  header("Location: http://";. lg_domain . 
lg_form_error ."?p=" . $page ."&t=e"); }}if ($_SERVER["REQUEST_METHOD"]=="GET") 
{ 
/*
 * We need to generate the token (writing a cookie) before headers arewritten. 
When * writeToken() or writeTokenH() is called we are only writing 
thepre-generated token to * the form. The cookie has already been sent. 
**/
 generateToken();}function writeToken() { echo '

Re: [PHP] Login In script quesitons

2010-07-09 Thread Ashley Sheridan
On Fri, 2010-07-09 at 16:04 -0400, Gary wrote:

> ?>
> http://www.ashleysheridan.co.uk




Re: [PHP] Arrays passed to functions lose their indexing - how to maintain?

2010-07-09 Thread Marc Guay
My bad, I had some leftover code running array_values() on it before
it got passed.

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



Re: [PHP] Login In script quesitons

2010-07-09 Thread Gary

"Ashley Sheridan"  wrote in message 
news:1278706121.2295.5.ca...@localhost...
> On Fri, 2010-07-09 at 16:04 -0400, Gary wrote:
>
>> ?>
>> 
>
> That bit of the code has a newline in it, which counts as output :p
>
> I've not looked over the rest yet, but see if that helps.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

Ashley

Actually I had added that closing and opening tag in trying to solve the 
problem, I put it back and still have the issue.

I looked at the code as it looks on the board, would it be easier if I sent 
you the files?

Thanks again.

Gary 



__ Information from ESET Smart Security, version of virus signature 
database 5266 (20100709) __

The message was checked by ESET Smart Security.

http://www.eset.com





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



Re: [PHP] Login In script quesitons

2010-07-09 Thread Gary
Ashley & Richard

I think I found the issue.

In loginGlobals.php, the error was pointing to line 281, when the code 
stopped and 278. (I know most of the time this just means there is a missing 
bracket or semi-colon in the code), however, what I did is put my curser on 
link 281, backspaced to eliminate white space, and it seems to be working.

I will let you know if this is just premature exhuberation.

Thanks again for all your help.

Gary


"Ashley Sheridan"  wrote in message 
news:1278706121.2295.5.ca...@localhost...
> On Fri, 2010-07-09 at 16:04 -0400, Gary wrote:
>
>> ?>
>> 
>
> That bit of the code has a newline in it, which counts as output :p
>
> I've not looked over the rest yet, but see if that helps.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>
>
> __ Information from ESET Smart Security, version of virus 
> signature database 5266 (20100709) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
> 



__ Information from ESET Smart Security, version of virus signature 
database 5266 (20100709) __

The message was checked by ESET Smart Security.

http://www.eset.com





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



RE: [PHP] State and City Database

2010-07-09 Thread Tommy Pham
> -Original Message-
> From: tedd [mailto:tedd.sperl...@gmail.com]
> Sent: Friday, July 09, 2010 12:17 PM
> To: PHP
> Subject: Re: [PHP] State and City Database
> 
> To all:
> 
> http://php1.net/b/zipcode-states/index.php
> 
> I have not tried the state/city/zip demo with any other than the Safari
> browser. It works for that browser.
> 
> Sorry, I should have checked it out via other browsers before introducing
it to
> the list.
> 
> I will work on it.
> 
> Cheers,
> 
> tedd
> 
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 


Tedd,

Looking at your source, shouldn't be 'onChange' instead of 'onClick'  for
the selects?

Regards,
Tommy


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



RE: [PHP] State and City Database

2010-07-09 Thread Tommy Pham
> -Original Message-
> From: Tommy Pham [mailto:tommy...@gmail.com]
> Sent: Friday, July 09, 2010 3:15 PM
> To: 'PHP'
> Subject: RE: [PHP] State and City Database
> 
> > -Original Message-
> > From: tedd [mailto:tedd.sperl...@gmail.com]
> > Sent: Friday, July 09, 2010 12:17 PM
> > To: PHP
> > Subject: Re: [PHP] State and City Database
> >
> > To all:
> >
> > http://php1.net/b/zipcode-states/index.php
> >
> > I have not tried the state/city/zip demo with any other than the
> > Safari browser. It works for that browser.
> >
> > Sorry, I should have checked it out via other browsers before
> > introducing it to the list.
> >
> > I will work on it.
> >
> > Cheers,
> >
> > tedd
> >
> > --
> > ---
> > http://sperling.com  http://ancientstones.com  http://earthstones.com
> >
> 
> 
> Tedd,
> 
> Looking at your source, shouldn't be 'onChange' instead of 'onClick'  for
the
> selects?
> 
> Regards,
> Tommy

Sorry, force of habit camel case... :)  I meant 'onchange' instead of
'onclick'.


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



[PHP] SOAPParam - Does it possible?

2010-07-09 Thread Augusto Flavio
Hi,



I'm creating a wsdl server but I have one doubt about the
soapparam::soapparam().


I want to know how to return several parameters using the
soapparam::soapparam().


I'm doing this:


class MyApi implements API {

  public function Send($param) {
  $resp = array('resposta' => 'works', 'events' => array ('from' => 'smith',
'text' => 'Hello world', 'to' => 'john'));
  return new SoapParam($resp, 'events');
  }

Looking in the php.net Docs the soapparam() has this definition:

*SoapParam::SoapParam* (
mixed
$data , string $name )

 *data*

The data to pass or return. This parameter can be passed directly as PHP
value, but in this case it will be named as *paramN* and the SOAP service
may not understand it.
 *name*

The parameter name.

But How can I return the entire array: $resp = array('resposta' => 'works',
'events' => array ('from' => 'smith', 'text' => 'Hello world', 'to' =>
'john')); ?


Looks this wsdl schema in this email

I think you will understand more about my problem.

Thanks



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

Re: [PHP] State and City Database

2010-07-09 Thread Jason Pruim


On Jul 9, 2010, at 10:43 AM, tedd wrote:


At 2:07 PM +0200 7/9/10, Thijs Lensselink wrote:

On 07/07/2010 10:02 PM, tedd wrote:

Hi gang:

Does anyone have a source for a US State and City database?

Cheers,

tedd



Hey Tedd,

Maybe this helps. I used the data files for some other projects..

http://earth-info.nga.mil/gns/html/
http://geonames.usgs.gov/


LOL

Did you look at the name of the Executive Secretary on that page?  
Being dyslexic, I immediately read "You Lost", which seemed ironic  
for the USGS.


I know I asked in my post for US State and City database and did not  
mention zip codes, but that was something I was after as well.


Strangely enough, the USGS states that it's the U.S. Census Bureau  
who keeps the zip codes. But the U.S. Census Bureau says it's the US  
Postal Service and the US Postal Service points to private  
businesses such as:


http://www.zip-codes.com/

I was almost certain that the UP Postal Service had something, but I  
couldn't find it.


I'm not sure where I got my current database, but I think I'll just  
stick with it and allow the client to get a subscription for an  
update (if they want).


Hey tedd,

the US Postal Service does control the Zip Codes... The reason you  
couldn't get anything out of them is they do not publicly sell or give  
that data out to anyone except for a few private businesses who resell  
it... One of the best/cheapest sources I've found for mailing lists  
(it includes the actual delivery address plus the city, state, & zip)  
is melissadata.com.


Although it's not free nor exactly what you asked for they may be able  
to point you in a better direction to get exactly what you want.


If you need any additional help let me know. My day job is working  
directly with the post office and mailing lists :)




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