Re: [PHP] static variables inside static methods

2011-07-06 Thread Andrew Williams
I think you are confusing  scope visibility  level of the variable within
method and the class.

Variable within the method is going to 1 because it was declare within the
test method and there no link to the one declared outside the test method.
The second case is referencing the varible of the class.



2011/7/6 Дмитрий Степанов dmit...@stepanov.lv

 Hello, everybody.

 While working with static variables inside static class' methods, I have
 found this very interesting (at least for me) behavior of PHP.

 Consider the following class definitions (example #1):

 class X {
 public final static function test() {
 static $i;
 return ++$i;
 }
 }

 class Y extends X {
 }

 By executing this code:

 echo X::test();
 echo Y::test(); // note Y class here

 one would expect to see 12 as output, but apparently I get 11.

 That's a bit confusing if you logically assume that static vars are tied
 to the scope they're defined in. Since this static variable is
 defined in a specific static method test(), that is NOT overloaded by class
 Y, in my opinion it shoul've preserved it's value across static calls.

 Let's look at another example (example #2):

 class X {
 public static $x =0;
 public final static function test() {
 return ++static::$x; // note static keyword here
 }
 }

 class Y extends X {
 }

 If you run this code:

 echo X::test();
 echo Y::test();

 you get 12 as output - the expected output. Notice that the
 ++static::$x
 expr. is taking advantage of late static binding. Now, if you change
 body of test() to the following code:

 public final static function test() {
 return ++self::$x;
 }

 then you also get 12 as output.

 Is this a bug that static context of $i is not preserved in example #1 or
 do
 I misunderstand something?

 I could not find any hints on this in the PHP documentation.

 Dmitry.



Re: [PHP] Open source project management tool - PHP

2010-01-06 Thread Andrew Williams
What could be a php potential problem with contact forms that are only
protected against SQL injections and have an admin side view for the
enquiry?


Re: [PHP] SECURITY PRECAUTION BEFORE SUBMITTING DATA IN DATABASE

2009-05-22 Thread Andrew Williams
WHY IS php-general@lists.php.net PUBLISHING USER EMAIL ON THE INTERNET:

http://www.google.co.uk/search?q=sumitphp5%40gmail.comsourceid=navclient-ffie=UTF-8rlz=1B3GGGL_enGB303GB303aq=t

On Fri, May 22, 2009 at 11:28 AM, Sumit Sharma sumitp...@gmail.com wrote:

 Thanks to [0] = Ashley, [1] =Bruce, [2] = Michael, [3] = Shawn, [4] =
 Eddie and php-general list for all your support from bottom of my heart.


 Now it seems as if I will be able to design my project more secured than
 before. If you get
 any other idea please suggest me.


 Thanks,
Sumit.







 -- Forwarded message --
 From: Michael A. Peters mpet...@mac.com
 Date: Fri, May 22, 2009 at 4:50 AM
 Subject: Re: [PHP] SECURITY PRECAUTION BEFORE SUBMITTING DATA IN DATABASE
 To: Eddie Drapkin oorza...@gmail.com
 Cc: php-general@lists.php.net


 Eddie Drapkin wrote:

  Suhosin is completely not-related to SQL, though, I don't know why you'd
  bring it up...
 

 I brought it up because suhosin catches many exploits that otherwise get
 through, including exploits that allow inclusion of remote files that can
 then be used to run arbitrary commands on the server, send include files
 (such as the db authentication script) as plain text, all kinds of nasty
 can
 result.

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




-- 
Best Wishes
A Williams


Re: [PHP] WHY ARE lists.php.ne USER EMAIL BEING PUBLISH ON THE INTERNET

2009-05-22 Thread Andrew Williams
I have no problem with it at least user email address should be removed off
the publication.
- Show quoted text -


On Fri, May 22, 2009 at 1:21 PM, Per Jessen p...@computer.org wrote:

 Andrew Williams wrote:

  WHY IS php-general@lists.php.net PUBLISHING USER EMAIL ON THE
  INTERNET:
 
 

 http://www.google.co.uk/search?q=sumitphp5%40gmail.comsourceid=navclient-ffie=UTF-8rlz=1B3GGGL_enGB303GB303aq=t
 

 Isn't it common knowledge that places such as marc.info carry archives
 of e.g. php-general?  I'm sure the list is also available at gmane.org.

 Why are you writing in capitals - are you angry?


 /Per

 --
 Per Jessen, Zürich (18.3°C)


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




-- 
Best Wishes
A Williams


[PHP] [PHP ADVANCE] tcp CLIENT server connection and authentication

2009-05-13 Thread Andrew Williams
Hi All,

please, I need to connect to IP via a specific port en validate my user name
and password to get data.

Port :   XXX7X

Internet ip  195.19.XX.1XX
please can some help with the idea of achieving it in php. please see the
format below:

[*Session Initialization*
A session begins with the client establishing a TCP session and sending a
login packet. If a login
packet is not received within 30 seconds the server will terminate the
session. Once a login
packet is received, the server will respond with a login accepted packet and
begin sending
sequenced data, or reject the login and terminate the connection.
The session does not actually send explicit sequence numbers with each
message, but instead
relies upon the concept of implied sequence numbers. The first sequenced
message of the day
should be considered ‘1’, and each subsequent sequenced message increments
this. When
recovering a session, you simply count the number of sequenced messages you
have received
to determine what sequence number you want to recover from. For example, if
you login and
receive 50 sequenced messages and then are disconnected, when you reconnect
you would
login and provide your next expected sequence, in this case 51, and the
session will continue
from that point.]



-- 
Best Wishes
A Williams


[PHP] Re: [PHP ADVANCE] tcp CLIENT server connection and authentication

2009-05-13 Thread Andrew Williams
Hi,

http://php.net/stream_socket_client does not have the option to supply
authentication details and how do you supply that.

On Wed, May 13, 2009 at 12:22 PM, Nathan Rixham nrix...@gmail.com wrote:

 Andrew Williams wrote:

 Hi All,

 please, I need to connect to IP via a specific port en validate my user
 name
 and password to get data.

 Port :   XXX7X


 Andrew,

 You're going to have some real fun with this one making the tcp connection
 is the least of your worries, sounds very much like a raw market datafeed to
 me, and not a nice xml based one, a lovely raw ascii one with all the string
 padded unsequenced ascii joys they hold.

 pointed you in the right direction yesterday with the stream functions..
 open client connection
 fwrite messages in correct format
 fread responses and parse them then take required actions / save.
 close client connection

 that really is everything there is to it.

 Good luck




-- 
Best Wishes
A Williams


Re: [PHP] Sending SMS through website

2009-05-13 Thread Andrew Williams
http://google.com/search?q=open+source+sms+gateway


On Wed, May 13, 2009 at 3:36 PM, Thodoris t...@kinetix.gr wrote:


  Hi All,

 Does anyone know how to send sms through a php website. I am completely
 new
 to the requirement and don't know even the pre-requisite of doing it. You
 can also drop in link to a good tutorial. Any help will be highly
 appreciated.

 Thanks and Regards,
 Dheeraj Bansal




 Never implemented something similar but I will share what I know.  If you
 manage to set up an SMS gateway it will probably provide you some means
 (like an API, a spool-like directory, database etc) to pass messages to it.
 You can probably use PHP 's  capabilities to pass the sms to the gateway and
 use it this way to send the message to the subscriber.

 Generally speaking this is the plan. But you will need to have a working
 SMS gateway and walk through its aspects and details.

 I am not sure but I think there might be someone selling the service that
 you may pay to use it in your site.

 I am sure that someone more experienced than me will reply when the time is
 right.

 --
 Thodoris



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




-- 
Best Wishes
A Williams


[PHP] [php] tcp server connection

2009-05-12 Thread Andrew Williams
Can someone help me about how to retrieve data using TCP server connection

-- 
Best Wishes
A Williams


[PHP] date time late or lagging

2009-04-28 Thread Andrew Williams
hi all,

$dateNow = date('Y-m-d H:i:s');
 echo  pstrong.$dateNow ./strong/p;

can some see why the date time is lagging or late by 30 minutes from the
server time even  when server time are correct


Re: [PHP] date time late or lagging RESOLVED

2009-04-28 Thread Andrew Williams
On Tue, Apr 28, 2009 at 3:45 PM, Andrew Williams
andrew4willi...@gmail.comwrote:

 hi all,

 $dateNow = date('Y-m-d H:i:s');
  echo  pstrong.$dateNow ./strong/p;

 can some see why the date time is lagging or late by 30 minutes from the
 server time even  when server time are correct





-- 
Best Wishes

Andrew Williams
www.NPinvestor.com


[PHP] [php] graph with two or more input display

2009-04-24 Thread Andrew Williams
Hi All,

Does anyone know of any php grahp that will enable you to show/analyse more
than one inputs like price versus time?

-- 
Best Wishes

Andrew Williams
willandy.co.uk


[PHP] [php] embedding excel chart/graph

2009-04-24 Thread Andrew Williams
* I have been to  see how to embed excel charts and graph to php code. does
any knows how*

willandy.co.uk


[PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
Does any one knows why while loop below ends after few loops when it meant
to keep in loop?

File name: while_loop_script.php

define('run', 0);
define('START', 10);

while(START run){

$ch = curl_init(mydomain/update_script.php?action=run);
curl_exec($ch);
curl_close($ch);

}

using php.exe to scheldule task it every 5 minutes:

C:\php.exe D:\update\while_loop_script.php

-- 
www.willandy.co.uk


Re: [PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
The php.ini maximum time is set to -1 which is infinity

On Mon, Apr 6, 2009 at 11:27 AM, Chetan Rane
chetan_r...@persistent.co.inwrote:

 I think its exceeding the max execution time set in PHP.ini
 Either set yoru cron to run after every 60 seconds, or change the setting
 in PHP.ini

 Chetan Dattaram Rane | Software Engineer | Persistent Systems
 chetan_r...@persistent.co.in  | Cell: +91 94033 66714 | Tel: +91 (0832) 30
 79014
 Innovation in software product design, development and delivery-
 www.persistentsys.com




 -Original Message-
 From: Andrew Williams [mailto:andrew4willi...@gmail.com]
 Sent: Monday, April 06, 2009 3:51 PM
 To: php-general@lists.php.net
 Subject: [PHP] [php] while loop failure

 Does any one knows why while loop below ends after few loops when it meant
 to keep in loop?

 File name: while_loop_script.php

 define('run', 0);
 define('START', 10);

 while(START run){

 $ch = curl_init(mydomain/update_script.php?action=run);
 curl_exec($ch);
 curl_close($ch);

 }

 using php.exe to scheldule task it every 5 minutes:

 C:\php.exe D:\update\while_loop_script.php

 --
 www.willandy.co.uk

 DISCLAIMER
 ==
 This e-mail may contain privileged and confidential information which is
 the property of Persistent Systems Ltd. It is intended only for the use of
 the individual or entity to which it is addressed. If you are not the
 intended recipient, you are not authorized to read, retain, copy, print,
 distribute or use this message. If you have received this communication in
 error, please notify the sender and delete all copies of this message.
 Persistent Systems Ltd. does not accept any liability for virus infected
 mails.




-- 
Best Wishes
Andrew Williams


Re: [PHP] kill php.exe window

2009-04-06 Thread Andrew Williams
I mean How do I kill it automatically via script and not command line:

File name: while_loop_script.php


$ch = curl_init(mydomain/update_script.php?action=run);
curl_exec($ch);
curl_close($ch);

{exit or kill  script}

window schedule task:
run box: php.exe to scheldule task it every 5 minutes:

C:\php.exe D:\update\while_loop_script.php


On Mon, Apr 6, 2009 at 11:39 AM, Marc li...@bithub.net wrote:

 I need to exit php.exe window after completing an assigned task. Does
 anyone
 knows how to close, exit,  kill or stop the window

 Run your PHP.exe by using appending  exit to your command. For instance:

 php.exe [YOUR COMMAND ARGS]  exit

 Greetings from Germany

 Marc

 --
 Sync and share your files over the web for free
 http://bithub.net/

 My Twitter feed
 http://twitter.com/MarcSteinert




-- 
Best Wishes
Andrew Williams


[PHP] kill php.exe window

2009-04-06 Thread Andrew Williams
I need to exit php.exe window after completing an assigned task. Does anyone
knows how to close, exit,  kill or stop the window

-- 
willandy.co.uk


Re: [PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
setting:

max_execution_time = -1 ; Maximum execution time of each script, in
seconds
max_input_time = -1; Maximum amount of time each script may spend
parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 2036M  ; Maximum amount of memory a script may consume
(128MB)

the above setting should allowed script to execute indefinitely. is't it?

On Mon, Apr 6, 2009 at 11:29 AM, Andrew Williams
andrew4willi...@gmail.comwrote:

 The php.ini maximum time is set to -1 which is infinity


 On Mon, Apr 6, 2009 at 11:27 AM, Chetan Rane chetan_r...@persistent.co.in
  wrote:

 I think its exceeding the max execution time set in PHP.ini
 Either set yoru cron to run after every 60 seconds, or change the setting
 in PHP.ini

 Chetan Dattaram Rane | Software Engineer | Persistent Systems
 chetan_r...@persistent.co.in  | Cell: +91 94033 66714 | Tel: +91 (0832)
 30 79014
 Innovation in software product design, development and delivery-
 www.persistentsys.com




 -Original Message-
 From: Andrew Williams [mailto:andrew4willi...@gmail.com]
 Sent: Monday, April 06, 2009 3:51 PM
 To: php-general@lists.php.net
 Subject: [PHP] [php] while loop failure

 Does any one knows why while loop below ends after few loops when it meant
 to keep in loop?

 File name: while_loop_script.php

 define('run', 0);
 define('START', 10);

 while(START run){

 $ch = curl_init(mydomain/update_script.php?action=run);
 curl_exec($ch);
 curl_close($ch);

 }

 using php.exe to scheldule task it every 5 minutes:

 C:\php.exe D:\update\while_loop_script.php

 --
 www.willandy.co.uk

 DISCLAIMER
 ==
 This e-mail may contain privileged and confidential information which is
 the property of Persistent Systems Ltd. It is intended only for the use of
 the individual or entity to which it is addressed. If you are not the
 intended recipient, you are not authorized to read, retain, copy, print,
 distribute or use this message. If you have received this communication in
 error, please notify the sender and delete all copies of this message.
 Persistent Systems Ltd. does not accept any liability for virus infected
 mails.




 --
 Best Wishes
 Andrew Williams





-- 
Best Wishes
Andrew Williams


Re: [PHP] problem with PHP simplexml and doxygen generated XML

2009-04-05 Thread Andrew Williams
I HAVE THE SAME PROBLEM, PLEASE HOW HAVE YOU DONE IT

On Sun, Apr 5, 2009 at 4:08 PM, hessi...@hessiess.com wrote:

 
 
  On Apr 3, 2009, at 17:52, hessi...@hessiess.com wrote:
 
  I have bean trying to right a PHP script to generate XHTML code from
  the
  class documentation xml files created by Doxygen(the HTML it outputs
  is
  invalid, messy and virtually imposable to integrate into another web
  page). One thing has bean causing problems, the tags which start
  with `@',
  for example:
 
  Code:
   SimpleXMLElement Object
   (
 [...@attributes] = Array
 (
 [kind] = function
 [id] = classhello_1f06929bd13d07b414a8be07c6db88074
 [prot] = private
 [static] = no
 [const] = no
 [explicit] = no
 [inline] = yes
 [virt] = non-virtual
 )
   ...
 
  I cannot seam to find a way to access these with simplexml, the
  following
  code generates a syntax error for example.
 
  Code:
 
  print_r($xml-compounddef-sectiondef-memberdef[1]-@attributes);
 
  Any advice would be gratily appreciated.
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
  What about first stripping out the @ characters with str_replace and
  then attempting to load the XML? Maybe run it thru a few to do the
  best possible clean up?
 
  Bastien
 

 Found out what I was doing wrong, the problem has nothing to do with the
 XML code, tag attributes are put into the @attributes section, which must
 be accsessed with the attributes() function.


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




-- 
Best Wishes
Andrew Williams


Re: [PHP] [php] scheduled task in php

2009-04-03 Thread Andrew Williams
does anyone knows the the following is not working:

C:\PHP\php.exe  D:\DEMO\index.php?action=runrun=1

On Thu, Apr 2, 2009 at 2:06 PM, Virgilio Quilario 
virgilio.quila...@gmail.com wrote:

  Please how can you run a timed php script file via window scheduled task.
 or
  how can u execute a php script on a a time interval for instance every
  4minutes

 hi Andrew,

 first schedule a task, locate and select your php.exe, and schedule it
 to run daily for the moment.
 after creating it, you will see it listed on the window.
 right click on it, and select properties.
 on your Run box, add your script next to php.exe. ie
 c:\path\to\php.exe myscript.php
 click on schedule, click on advanced button, check on repeat task, put
 4 on every box, and finally click on ok, then apply button.

 that's it.

 cheers,
 virgil
 http://www.jampmark.com




-- 
Best Wishes
Andrew Williams


[PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Andrew Williams
HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet
Explorer


Re: [PHP]scheduled task in php IN FIREFOX

2009-04-03 Thread Andrew Williams
That is a better idea but the program needs about five minutes to complete.
Would that not be a problem?

On Fri, Apr 3, 2009 at 2:44 PM, Stuart stut...@gmail.com wrote:

 Please include the list when replying.

 2009/4/3 Andrew Williams andrew4willi...@gmail.com:
  interval update

 I'm sorry, and that means what exactly?

 Assuming you just need to hit a certain URL periodically you just need
 to use curl or similar. There's no need to get a browser involved.

 -Stuart

  On Fri, Apr 3, 2009 at 2:05 PM, Stuart stut...@gmail.com wrote:
 
  2009/4/3 Andrew Williams andrew4willi...@gmail.com:
   HOW DO YOU CONFIGURE scheduled task to use firefox instead of Internet
   Explorer
 
  Why is a scheduled task using a browser at all? What is the task doing?
 
  -Stuart
 
  --
  http://stut.net/
 
 
 
  --
  Best Wishes
  Andrew Williams
 
 
 

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




-- 
Best Wishes
Andrew Williams


[PHP] XML data extraction

2009-04-02 Thread Andrew Williams
Best All,

How can you best and accurately extract  XLM data to DB table.  e.g.:

EXCHANGE_LIST  AMOUNT=3
-
EXCHANGE
ID_EXCHANGE20/ID_EXCHANGE
CODE_EXCHANGEFRA/CODE_EXCHANGE
NAME_EXCHANGEFrankfurt/NAME_EXCHANGE
/EXCHANGE
-
EXCHANGE
ID_EXCHANGE28/ID_EXCHANGE
CODE_EXCHANGELSE/CODE_EXCHANGE
NAME_EXCHANGELondon Stock Exchange/NAME_EXCHANGE
/EXCHANGE
-
EXCHANGE
ID_EXCHANGE226/ID_EXCHANGE
CODE_EXCHANGEGER/CODE_EXCHANGE
NAME_EXCHANGEXetra/NAME_EXCHANGE
/EXCHANGE
/EXCHANGE_LIST

www.willandy.co.uk


[PHP] [php] scheduled task in php

2009-04-02 Thread Andrew Williams
All,

Please how can you run a timed php script file via window scheduled task. or
how can u execute a php script on a a time interval for instance every
4minutes

-- 
Best Wishes
Andrew Williams


Re: [PHP] [php] scheduled task in php

2009-04-02 Thread Andrew Williams
I want to created a window schedule a task that will run every 2 minutes and
run my php script(www.domain.com/script.php).  But I need to know how to
create a php.exe that I can select as a window schedule a task so that the
php.exe file can execute www.domain.com/script.php at a time interval.
Solution please



On Thu, Apr 2, 2009 at 4:58 PM, Andrew Williams
andrew4willi...@gmail.comwrote:



 On Thu, Apr 2, 2009 at 2:06 PM, Virgilio Quilario 
 virgilio.quila...@gmail.com wrote:

  Please how can you run a timed php script file via window scheduled
 task. or
  how can u execute a php script on a a time interval for instance every
  4minutes

 hi Andrew,

 first schedule a task, locate and select your php.exe, and schedule it
 to run daily for the moment.
 after creating it, you will see it listed on the window.
 right click on it, and select properties.
 on your Run box, add your script next to php.exe. ie
 c:\path\to\php.exe myscript.php
 click on schedule, click on advanced button, check on repeat task, put
 4 on every box, and finally click on ok, then apply button.

 that's it.

 cheers,
 virgil
 http://www.jampmark.com




 --
 Best Wishes
 Andrew Williams





-- 
Best Wishes
Andrew Williams


[PHP] time() TIMER in seconds or just numbers

2009-03-30 Thread Andrew Williams
what does time();

$t1 = time();

{

do something
}
$t2 = time();

$end_time = $t2 - $t1;
echo $end_time;

what does $end_time represent?

how do you determine the next 5 mins?
-- 
Best Wishes
willandy.co.uk


[PHP] WHILE LOOP PROBLEM

2009-03-27 Thread Andrew Williams
can some tell why the below loop stop running after some time.

$start=10;
const run=0;
while($start run){

//do somthing

}

-- 
Best Wishes
Andrew Williams


[PHP] how to make multiple sql run faster

2009-03-21 Thread Andrew Williams
Hi all,

I am inserting more than 5000 rows into sql database but its taking more
than 30 mins  to get it all the data inserted. I use union to insert
multiple rows of 20 at a time.

What is the best way to make insert sql statement run faster

-- 
andrew
www.willandy.co.uk


[PHP] how to make for statement run faster

2009-03-20 Thread Andrew Williams
I have a program where I process more that 5000 list of 100 data at  time
but it very slow due to many  *for statement*s. how you make it run faster

-- 
best
www.willandy.co.uk


Re: [PHP] web refreshing problem

2009-03-09 Thread Andrew Williams
Hi everyone,

I discovered that error  and warning messages from my program does not
display automatically unless you refresh the page. and page also has the
same problem.   Does it has anything to do with the PHP - Apache  settings.

I have added the below message to it but its not making no difference.

 ?php
  header(Cache-Control: no-cache, must-revalidate); // HTTP/1.1
  header(Expires: Sat, 26 Jul 1997 05:00:00 GMT); // Date in the past
  ?

help please

On Mon, Mar 9, 2009 at 3:09 PM, Virgilio Quilario 
virgilio.quila...@gmail.com wrote:

  hi,

 that wouldn't be a problem.
 it will just tell the browser not to cache the html output.

 Virgil
 http://www.jampmark.com

 On Mon, Mar 9, 2009 at 11:03 PM, Andrew Williams
 and...@stocksignals.com wrote:
  part of the program needs to store data data on he catch memory. would
 that
  be a problem?
 
  On Mon, Mar 9, 2009 at 2:57 PM, Virgilio Quilario
  virgilio.quila...@gmail.com wrote:
 
my php program does not display current result of submitted form
instead the previous content is shown until you refresh manually
(which means resubmitting the form).
   
Can someone help me out because, I want to display the result of
the
latest form result and not the old one.
   
I am using apache server on windows. Please help.
   
have you per chance got all data saved in the session and are
 using
a
script
like
   
if( something in session ) {
 show session
}
else if( something in post ) {
 add form data to session
}
else {
 show only the form
}
   
three common causes are:
1- you're not actually processing the new form data
2- your browser isn't sending the form data second time round
3- your browser is caching the page (very very unlikely)
   
regards
   
  
   Hi Nathan,
  
   Most likely your form is using POST method and your browser is
   caching the page.
 
 
  yes my form is using post method but how do you stop catching the page
 
  hi Andrew,
 
  use the code below. it is from this page
  http://www.php.net/header
  look for Example #2 Caching directives.
 
  ?php
  header(Cache-Control: no-cache, must-revalidate); // HTTP/1.1
  header(Expires: Sat, 26 Jul 1997 05:00:00 GMT); // Date in the past
  ?
 
  to be sure, put them as the first 2 lines at the top.
 
  Virgil
  http://www.jampmark.com
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
  --
  Best Wishes
  Andrew Williams
 
 
 




-- 
Best Wishes
Andrew Williams


Re: [PHP] Backend autodatabase update

2009-03-08 Thread Andrew Williams
The Os is windows. so which is better way to keep the program constantly.
The program get financial data from different system  and update our
database for another system to pick up. The pick up system is across the
glob and because of global time difference, the program must be up running
24 hours a day

On Sat, Mar 7, 2009 at 11:02 PM, 9el le...@phpxperts.net wrote:

 cronjob or deamon to execute the php file


 On Sun, Mar 8, 2009 at 4:56 AM, Andrew Williams andrew4willi...@gmail.com
  wrote:

 Dear All,

 I have written a back end php program that update live stream database and
 this data is streamed 24 hours a day. Please, what is the best way to make
 sure this program execute or runs 24 hours day.

 Best Wishes
 Andrew Williams
 www.willandy.co.uk





-- 
Best Wishes
Andrew Williams


Re: [PHP] Backend autodatabase update

2009-03-08 Thread Andrew Williams
*I  want to check that the job is still running and start, if it stopped
because the program is meant to consistently update for the global market?*

On Sat, Mar 7, 2009 at 11:19 PM, George Larson george.g.lar...@gmail.comwrote:

 I'm new to the list, so maybe I've missed something.  Please disregard if
 I'm blathering idiotically.

 What OS are you using?

 Do you mean that you want to run the job repetitively (again and again) or
 *do you mean that you want to check that the job is still running and
 start, if it stopped?*


 On Sat, Mar 7, 2009 at 6:02 PM, 9el le...@phpxperts.net wrote:

 cronjob or deamon to execute the php file


 On Sun, Mar 8, 2009 at 4:56 AM, Andrew Williams
 andrew4willi...@gmail.comwrote:

  Dear All,
 
  I have written a back end php program that update live stream database
 and
  this data is streamed 24 hours a day. Please, what is the best way to
 make
  sure this program execute or runs 24 hours day.
 
  Best Wishes
  Andrew Williams
  www.willandy.co.uk
 





-- 
Best Wishes
Andrew Williams


[PHP] web refreshing problem

2009-03-08 Thread Andrew Williams
Hi,

my php program does not display current result of submitted form
instead the previous content is shown until you refresh manually
(which means resubmitting the form).

Can someone help me out because, I want to display the result of the
latest form result and not the old one.

I am using apache server on windows. Please help.
-- 
www.willandy.co.uk

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



[PHP] Backend autodatabase update

2009-03-07 Thread Andrew Williams
Dear All,

I have written a back end php program that update live stream database and
this data is streamed 24 hours a day. Please, what is the best way to make
sure this program execute or runs 24 hours day.

Best Wishes
Andrew Williams
www.willandy.co.uk


[PHP] [PHP]: php validate user password

2009-02-09 Thread Andrew Williams
Hi,

Can some body help out on how to validate user password from the database?

Thanks
Andrew


Fwd: [PHP] Interface OOP

2009-02-09 Thread Andrew Williams
Hi,

I am working on a back end OOP project with about about 18 classes of Object
but some of the Objects shear one or two functions in common, like external
login system . What is the best way to avoid a repeatable function among the
classes without using global object instance.

class a{

function ExtractRawData()
{
   global  loginObj;
   *if($loginObj;-GetLoginSession(){*
 ///process
  }
}

}

class b{

function JohnXchange()
{
   global  loginObj;
  *if($loginObj;-GetLoginSession(){*
 ///process
 }
}
}

class login(

function loginSession($pwd, $acc, $customerAcc)
{
  $this -validate = connect to externalServerObject($pwd, $acc,
$customerAcc);
}
 *GetLoginSession()*
{
   return $this -validate;
}
}



Andrew Williams
http//www.willandy.co.uk





-- 
Best Wishes
Andrew Williams


[PHP] sqlsrv vs Mssql

2009-02-09 Thread Andrew Williams
Hi,

Can somebody help me with why I have communication problem using MSSQL with
SQLserver 2005. Instead I am now using SQLSRV

-- 
Best Wishes
Andrew Williams





-- 
Best Wishes
Andrew Williams


Re: [PHP] sqlsrv vs Mssql

2009-02-09 Thread Andrew Williams
MSsql unable to connect to the SQLserver2005 but not SQLserver2008

On Mon, Feb 9, 2009 at 6:11 PM, Andrew Williams
andrew4willi...@gmail.comwrote:

 Hi,

 Can somebody help me with why I have communication problem using MSSQL with
 SQLserver 2005. Instead I am now using SQLSRV

 --
 Best Wishes
 Andrew Williams





 --
 Best Wishes
 Andrew Williams





-- 
Best Wishes
Andrew Williams


Re: [PHP] Get Money Fast with the Government Grants

2009-01-27 Thread Andrew Williams
Hi,
Beware of he spam mailer so do not let them spam your money away.

Andrew

On Tue, Jan 27, 2009 at 9:18 AM, clive clive_li...@immigrationunit.comwrote:

 Dora Gaskins wrote:

 If you have received this email, take a time to really read it carefully!

 American Gov Money

 More spam, can't we have the maillist software require people to register
 before posting?


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




-- 

Best Wishes
Andrew Williams
---
31 Davies Street
W1K 4LP, London, UK
www.NetPosten.dk


[PHP] Session problem

2003-01-01 Thread Andrew Williams
Hi,
 
 I am new to the list so be kind.
 
I have been messing with PHP 4 on a windows 2000 machine using apache and am
having trouble getting sessions to run.
 
Even in their basic form, everything I have read is very involved and all I
am trying to do is the basics but it doesn't work.
 
Can any one give me any hints.
 
I have been through a tutorial and these are the basic scripts.
 
session_register_var.php
?
 
// set up a session
session_start();
 
// declare a variable and give it a value
$my_favourite_colour=blue;
 
// register the variable to the session
session_register(my_favourite_colour);
 
// show a hyperlink to get to the next page
echo A HREF='show_session_var.php'Click here to go to the next page/A;
?
 
and
show_session_var.php
?
 
// continue using the session
session_start();
 
// show the variable's value
echo My favourite colour is ... .$my_favourite_colour;
?
 
My php.ini file session section looks like this
 
[Session]
; Handler used to store/retrieve data.
session.save_handler = files
 
; Argument passed to save_handler.  In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this 
; variable in order to use PHP's session functions.
session.save_path = c:/temp
 
; Whether to use cookies.
session.use_cookies = 1
 

; Name of the session (used as cookie name).
session.name = PHPSESSID
 
; Initialize session on request startup.
session.auto_start = 0
 
; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0
 
; The path for which the cookie is valid.
session.cookie_path = c:\tmp
 
; The domain for which the cookie is valid.
session.cookie_domain =
 
; Handler used to serialize data.  php is the standard serializer of PHP.
session.serialize_handler = php
 
; Percentual probability that the 'garbage collection' process is started
; on every session initialization.
session.gc_probability = 1
 
; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440
 
; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.
session.referer_check =
 
; How many bytes to read from the file.
session.entropy_length = 0
 
; Specified here to create the session id.
session.entropy_file =
 
;session.entropy_length = 16
 
;session.entropy_file = /dev/urandom
 
; Set to {nocache,private,public} to determine HTTP caching aspects.
session.cache_limiter = nocache
 
; Document expires after n minutes.
session.cache_expire = 180
 
; trans sid support is disabled by default.
; Use of trans sid may risk your users security. 
; Use this option with caution.
; - User may send URL contains active session ID
;   to other person via. email/irc/etc.
; - URL that contains active session ID may be stored
;   in publically accessible computer.
; - User may access your site with the same session ID
;   always using URL stored in browser's history or bookmarks.
session.use_trans_sid = 0
 
url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry

Andrew Williams 
Sales Engineer 
people telecom 

Contacts: 
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  
Direct Tel: (02) 9458 5861 
Mobile: 0403 479 990 
Reception:  (02) 9458 5888 
Facsimile:  (02) 9458 5858 
Customer Service:   1300 55 88 88 
www.peopletelecom.com.au 

talk to people 

 

This e-mail and any attachments are confidential and may contain copyright
material of people telecom Ltd or third parties. If you are not the intended
recipient of this email you should not read, print, re-transmit, store or
act in reliance on this e-mail or any attachments, and should destroy all
copies of them. people telecom Ltd does not guarantee the integrity of any
emails or any attached files. The views or opinions expressed are the
author's own and may not reflect the views or opinions of people telecom
Ltd.

 

 



[PHP] Session Problem

2003-01-01 Thread Andrew Williams
Hi,
 
Justin has made some suggestions below.
 
But it still doesn't work, I have noticed that in the c:/temp directory
session files have been created.
 
Does anyone have any other suggestions as to why this is not working
 
Apache is version  Apache/2.0.39 (Win32) 
Internet explorer 6.0.2800.1106
 
Andrew
 
 
 
Try this code:
test.php
---
?
session_start();
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
} else {
$_SESSION['count']++;
}
?
Hello visitor, you have seen this page ?=$_SESSION['count']? times.p
To continue, A HREF=?=$_SERVER['PHP_SELF']?click here/A
---
Each time you click click here, the counter should increase by 1. This
code is lifted straight from the manual, and I've tested it on my machine.
 
Tried this no banana!
 
 
 Does your browser accept cookies?
Privacy settings set to Medium, allowed IP address of machine to except all
cookies
 
 I'm going to assume PHP  4.1 
PHP 4.2.2
I'm also going to assume you're allowing cookies on your browser???
Allowed
 
 session_register_var.php
change your script to:
?
// set up a session
session_start();
// register the variable to the session
$_SESSION['my_favourite_colour'] = blue;
// show a hyperlink to get to the next page
echo A HREF='show_session_var.php'Click here to go to the next
page/A;
?
 
 and
 show_session_var.php
change this script to:
?
// continue using the session
session_start();
// show the variable's value
echo My favourite colour is... .$_SESSION['my_favourite_colour'];
?

Changed all of this still not happy.

 

Thanks

 

Andrew

Andrew Williams 
Sales Engineer 
people telecom 

Contacts: 
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  
Direct Tel: (02) 9458 5861 
Mobile: 0403 479 990 
Reception:  (02) 9458 5888 
Facsimile:  (02) 9458 5858 
Customer Service:   1300 55 88 88 
www.peopletelecom.com.au 

talk to people 

 

This e-mail and any attachments are confidential and may contain copyright
material of people telecom Ltd or third parties. If you are not the intended
recipient of this email you should not read, print, re-transmit, store or
act in reliance on this e-mail or any attachments, and should destroy all
copies of them. people telecom Ltd does not guarantee the integrity of any
emails or any attached files. The views or opinions expressed are the
author's own and may not reflect the views or opinions of people telecom
Ltd.

 

 



Re: [PHP] Session Problem

2003-01-01 Thread Andrew Williams
I started it and yes I am still here and listing to your comments.

Thanks Justin for keeping things simple for this simpleton.

Ill try your suggestion in a little while Mike, I also at work at the moment
and need to slip some of this stuff in whilst I am working.

I will keep you posted as to the outcome.

By the way its the 2nd of January here!

Andrew


Just so I know who started this thread, is he even still in this thread,
or is this just amongst ourselves now.

:-)

Hey sorry, what do you expect on the 1st of January.

Cheers,
Mike






-- 
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] Session Problem

2003-01-01 Thread Andrew Williams
Mike,

This  the result

Array ( [theSess] = This is my session ) 

Andrew


-Original Message-
From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 2 January 2003 12:07 
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Session Problem




OK let me give him something simpler to start with
No Cookies needed.. Just to test... Make sure you have session.name set to
PHPSESSID.
Look at phpinfo() output to make sure.


Lets have two pages


Page 1 start (page1.php)

___


?php

session_start();
$sessid = session_id();

$theSess = This is my session;

session_register(theSess);

echo a href=\page2.php?PHPSESSID=$sessid\ Next Page a;

?


---
Page 1 END

Page 2 start (page2.php)
___


?php

session_start();

print_r($_SESSION);


?









-- 
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] Session Problem

2003-01-01 Thread Andrew Williams
Mike,

 results are

Array ( ) 

Andrew

*** REPLY SEPARATOR  ***

OK so sessions are working... cool...

So now you need to track down a your cookie problem.

Start of by setting your browser to ask you to accept all cookies. EVEN
session cookies.
In IE  it would be Internet Options-Privacy Tab
Advanced...
Prompt and override defaults...

The take away the ?PHPSESSID=$sessid from the a href in page1.

Post the cookie details here.







*** REPLY SEPARATOR  ***

On 02/01/2003 at 12:32 PM Andrew Williams wrote:

Mike,

This  the result

Array ( [theSess] = This is my session )

Andrew





-- 
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] Session Problem

2003-01-01 Thread Andrew Williams
It appears that it is a problem with the Browser, I did as you suggested and
changed the Privacy Settings Advanced to Override Automatic Cookie Handling
and selected Prompt for both First and third party cookies.

Restarted the browser  ie closed all browser windows and restarted IE 6
version 6.0.2800.1106, Cipher strength 128bit.

I get no prompt to se the cookie.

Session files are still being created in the temp directory.

Andrew




*** REPLY SEPARATOR  ***
OK But did your browser ask you if it was ok to set a cookie? (You did do
the changes in privacy)

IE or Netsape (what version)?

Start with a fresh browser.. meaning close all browser windows and the start
up your browser again.

We need to see if the problem is setting the cookie or reading it.

Mike


*** REPLY SEPARATOR  ***

On 02/01/2003 at 12:56 PM Andrew Williams wrote:

Mike,

 results are

Array ( )

Andrew




-- 
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