[PHP] Upload large 100MB of PDFS to MySQL using PHP, Is my settings ok?

2009-04-02 Thread Louie Miranda
Guys,

I need help on the php and mysql configurations.

I want to be able to upload  100MB to MySQL using PHP.

On PHP, php.ini is as follows:

 max_execution_time = 100; Maximum execution time of each script, in
 seconds
 max_input_time = 100; Maximum amount of time each script may
 spend parsing request data
 memory_limit = 100M  ; Maximum amount of memory a script may consume
 (8MB)
 post_max_size = 100M
 upload_max_filesize = 100M


On MySQL, my.cnf:

 key_buffer = 500M
 max_allowed_packet = 5M
 table_cache = 256
 sort_buffer_size = 1M
 read_buffer_size = 1M
 read_rnd_buffer_size = 4M
 myisam_sort_buffer_size = 128M
 thread_cache_size = 16
 query_cache_size= 64M


The mysql field is set to LONGBLOB

What configurations could I alter more? Because right now, it is just
uploading around 30mb or something? And, no error. Maybe, something is wrong
on the config?
--
Louie Miranda (lmira...@gmail.com)
http://www.louiemiranda.net

Quality Web Hosting - www.axishift.com
Pinoy Web Hosting, Web Hosting Philippines


[PHP] php5-mhash disabled...

2009-04-02 Thread Anders Norrbring
I just saw that mhash is disabled in the spec file for php5 if SUSE version
is 11.0 or higher.
Simple question, does it do any harm?

I know it's been deprecated in favor for hash, but I have quite a few apps
using mhash still, so if it doesn't do any harm I thought I'd continue using
it until all apps has been remade for hash.

I really didn't find any relevant info on it with a quick Google search, so
I ask you fellows.

Thanks,
Anders.


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



Re: [PHP] XML data extraction

2009-04-02 Thread Peter Ford
Andrew Williams wrote:
 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
 

Oh, I thought of another one:
Write some XSL to turn you XML into SQL.
Write some code to run that SQL.

HTH
Pete

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



[PHP] Oracle's dump to MySQL

2009-04-02 Thread 9el
I found this command from one guy for importing Oracle's dump to MySQL

Shell mysql -uroot db_name -vvf  oracle_dump.dmp

But, v is for verbose and f is for force continuation.

Anyone worked with Oracle and MySQL?


[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


Re: [PHP] XML data extraction

2009-04-02 Thread Peter Ford
Andrew Williams wrote:
 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
 

Write some code to read the XML file. (you could at simpleXML, or
DOMDocument-based stuff)
Write some code to write the database statements. (probably some SQL, depends on
your database)
Run the database statements. (mysql_query, pg_query, whatever)

This is a very vague question, and this list is not normally well disposed to
writing people's programs for them, especially when they look like college
assignments.

Cheers
Pete

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



Re: [PHP] formulate nested select

2009-04-02 Thread Ian
On 31 Mar 2009 at 18:15, PJ wrote:

snip

  But I see that I may be trying to do too much - I thought of showing how
  many books were listed under each letter of the alphabet but I don't see
  how it can be done in any simiple way as it would mean that I would have
  to do the select once with the ORDER BY and a second time without it
  just to get the number of listing. If there are a lot of books, like
  thousands, it might slow down things.
  I suppose I could live with ORDER BY title as that does not require
  another effort.
  Any thoughts or suggestions?

Hi,

Sounds like you need to use the GROUP BY functions of MySQL

This SQL is probably wrong because I don't remember seeing your schema (and am 
too 
busy here to go looking!)

SELECT 
LEFT(last_name, 1 ) as Letter, Count(bookID) as NumberOfBooks
FROM 
books INNER JOIN tables that join them...
GROUP BY Letter
ORDER BY Letter ASC


You will have to play around with that to get the right results.  But it should 
give you 
something like:

Letter,NumberOfBooks
A,47
B,21
C,8
...

The MySQL manual has more info:
http://dev.mysql.com/doc/refman/5.0/en/group-by-functions-and-modifiers.html

Regards

Ian
-- 


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



Re: [PHP] Upload large 100MB of PDFS to MySQL using PHP, Is my settings ok?

2009-04-02 Thread Ian
On 2 Apr 2009 at 15:33, Louie Miranda wrote:

 Guys,
 
 I need help on the php and mysql configurations.
 
 I want to be able to upload  100MB to MySQL using PHP.
 
snip

  max_allowed_packet = 5M

Hi,

This may be the one that's stopping it.  

max_allowed_packet:
http://dev.mysql.com/doc/refman/5.0/en/server-system-
variables.html#sysvar_max_allowed_packet

If the SQL statement you are using goes over 5Mb, MySQL will cut the connection 
with an 
error.  It is strange that you are not seeing an error in your code thought.

Regards

Ian
-- 

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



[PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Angus Mann
Hi all.

I want to have several delete buttons with just one form, and depending on 
which button is pressed, one of several items is deleted.

So I need multiple submit buttons for 1 form, each displaying the same text 
Delete to the user, but each with a different value so the PHP script can 
tell them apart.

I've used this code for the buttons...
centerbutton type=submit name=btid value=1Delete/center
centerbutton type=submit name=btid value=2Delete/center
centerbutton type=submit name=btid value=3Delete/center

And it works just fine with firefox. But IE does not seem to pass the value 
back to the btid so when the script asks 
if $_POST['btid'] == 1 {
}

the value 1, 2, or 3 is not given back to PHP by IE. It is given back correctly 
by firefox and works fine.

Any suggestions ?

Thanks.



Re: [PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Richard Heyes
 Any suggestions ?

Try this:

input type=submit name=btid value=Delete /
input type=submit name=btid value=Cancel /
input type=submit name=btid value=Save /


And then you can check the value of $_POST['btid']. Oh and btw...
center... seriously?
That's so 9 years ago. ;-)

-- 
Richard Heyes

HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated March 28th)

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



Re: [PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Angus Mann
I can do as you suggest below, but then the buttons are labelled Delete 
Cancel and Save to the user.


The essential point is that they all need to say Delete. I know I can 
accomplish this by making multiple forms, each with its own button but for 
my purpose that's a pain is the ***.


IE returns the text displayed in the button regardless of the btid value. 
It seems to just ignore it.


Firefox returns the value assigned to btid as I intended regardless of the 
text in the button that the user sees.




- Original Message - 
From: Richard Heyes rich...@php.net

To: Angus Mann angusm...@pobox.com
Cc: php-general@lists.php.net
Sent: Thursday, April 02, 2009 8:17 PM
Subject: Re: [PHP] Button id's - firefox and IE different ?



Any suggestions ?


Try this:

input type=submit name=btid value=Delete /
input type=submit name=btid value=Cancel /
input type=submit name=btid value=Save /


And then you can check the value of $_POST['btid']. Oh and btw...
center... seriously?
That's so 9 years ago. ;-)

--
Richard Heyes

HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated March 28th)

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



[PHP] W3C Validator and Post Arrays

2009-04-02 Thread Shaun Thornburgh

Hi,

We are getting errors when trying to vaildate our HTML due to the [ character 
when using Post Arrays:

Line 173, Column 65:
character [ is not allowed in the value of attribute id

…e=filters[calling_url] id=filters[calling_url] value=categories-bulk-ear

Does anyone know of a way around this?

Thanks


_
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/

[PHP] Re: Button id's - firefox and IE different ?

2009-04-02 Thread Peter Ford
Angus Mann wrote:
 Hi all.
 
 I want to have several delete buttons with just one form, and depending on 
 which button is pressed, one of several items is deleted.
 
 So I need multiple submit buttons for 1 form, each displaying the same text 
 Delete to the user, but each with a different value so the PHP script can 
 tell them apart.
 
 I've used this code for the buttons...
 centerbutton type=submit name=btid value=1Delete/center
 centerbutton type=submit name=btid value=2Delete/center
 centerbutton type=submit name=btid value=3Delete/center
 
 And it works just fine with firefox. But IE does not seem to pass the value 
 back to the btid so when the script asks 
 if $_POST['btid'] == 1 {
 }
 
 the value 1, 2, or 3 is not given back to PHP by IE. It is given back 
 correctly by firefox and works fine.
 
 Any suggestions ?
 
 Thanks.
 
 

Well, to answer your initial question, IE won't play like that - it uses the
content of the button as the value and no amount of telling it is going to
change that at present... I suspect this behaviour is one of those things that
is ambiguously specified by the standards.

The real question is ... why do you want to do that (tell the buttons apart, I
mean)? From a user's perspective, if they are labelled the same, and in the same
form, then surely they must do the same thing? Sounds like the form design needs
to fresh thought.

If you must do it like you this, you need to change the labels on the buttons,
but remember: when you come to internationalize your site with twenty-six
different languages then you'll have to check each possible translation in the
back-end code. And if you decide to put images on the buttons instead of words
then you are really up the creek...

Either: split the form up so that different delete buttons act on their
respective bits of the form.
Or: bite the bullet and use javascript onclick events to set a hidden field
which signals what the action is supposed to be in the back end.

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Michael A. Peters

Shaun Thornburgh wrote:

Hi,

We are getting errors when trying to vaildate our HTML due to the [ character 
when using Post Arrays:

Line 173, Column 65:
character [ is not allowed in the value of attribute id

…e=filters[calling_url] id=filters[calling_url] value=categories-bulk-ear

Does anyone know of a way around this?

Thanks


Don't use [] in an ID - it doesn't belong there.
If you are not using the ID for a hook, just drop it - the ID doesn't 
need to be there.


The name attribute is where you want the [] to post an array, ID does 
not get sent in a post.


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



[PHP] Re: Button id's - firefox and IE different ?

2009-04-02 Thread Peter Ford
Peter Ford wrote:
 Angus Mann wrote:
 Hi all.

 I want to have several delete buttons with just one form, and depending on 
 which button is pressed, one of several items is deleted.

 So I need multiple submit buttons for 1 form, each displaying the same text 
 Delete to the user, but each with a different value so the PHP script 
 can tell them apart.

 I've used this code for the buttons...
 centerbutton type=submit name=btid value=1Delete/center
 centerbutton type=submit name=btid value=2Delete/center
 centerbutton type=submit name=btid value=3Delete/center

 And it works just fine with firefox. But IE does not seem to pass the value 
 back to the btid so when the script asks 
 if $_POST['btid'] == 1 {
 }

 the value 1, 2, or 3 is not given back to PHP by IE. It is given back 
 correctly by firefox and works fine.

 Any suggestions ?

 Thanks.


 
 Well, to answer your initial question, IE won't play like that - it uses the
 content of the button as the value and no amount of telling it is going to
 change that at present... I suspect this behaviour is one of those things that
 is ambiguously specified by the standards.
 
 The real question is ... why do you want to do that (tell the buttons apart, I
 mean)? From a user's perspective, if they are labelled the same, and in the 
 same
 form, then surely they must do the same thing? Sounds like the form design 
 needs
 to fresh thought.
 
 If you must do it like you this, you need to change the labels on the buttons,
 but remember: when you come to internationalize your site with twenty-six
 different languages then you'll have to check each possible translation in the
 back-end code. And if you decide to put images on the buttons instead of words
 then you are really up the creek...
 
 Either: split the form up so that different delete buttons act on their
 respective bits of the form.
 Or: bite the bullet and use javascript onclick events to set a hidden field
 which signals what the action is supposed to be in the back end.
 

There's a third option: make sure your clients only use Firefox :)

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Peter Ford
Michael A. Peters wrote:
 Shaun Thornburgh wrote:
 Hi,

 We are getting errors when trying to vaildate our HTML due to the [
 character when using Post Arrays:

 Line 173, Column 65:
 character [ is not allowed in the value of attribute id

 …e=filters[calling_url] id=filters[calling_url]
 value=categories-bulk-ear

 Does anyone know of a way around this?

 Thanks
 
 Don't use [] in an ID - it doesn't belong there.
 If you are not using the ID for a hook, just drop it - the ID doesn't
 need to be there.
 
 The name attribute is where you want the [] to post an array, ID does
 not get sent in a post.

The ID of any element should be unique in a HTML document - if you need an ID
for each of the inputs then you'll have to generate a unique one for each.

To the rest of the list: I'm not too happy about having stuff inside the []
either - is that some syntax I've missed or is it just wrong?

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Peter Ford
Peter Ford wrote:
 Michael A. Peters wrote:
 Shaun Thornburgh wrote:
 Hi,

 We are getting errors when trying to vaildate our HTML due to the [
 character when using Post Arrays:

 Line 173, Column 65:
 character [ is not allowed in the value of attribute id

 …e=filters[calling_url] id=filters[calling_url]
 value=categories-bulk-ear

 Does anyone know of a way around this?

 Thanks
 Don't use [] in an ID - it doesn't belong there.
 If you are not using the ID for a hook, just drop it - the ID doesn't
 need to be there.

 The name attribute is where you want the [] to post an array, ID does
 not get sent in a post.
 
 The ID of any element should be unique in a HTML document - if you need an ID
 for each of the inputs then you'll have to generate a unique one for each.
 
 To the rest of the list: I'm not too happy about having stuff inside the []
 either - is that some syntax I've missed or is it just wrong?
 

Oooh, I've just looked it up - that *is* neat!

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



RE: [PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Leon du Plessis

Another suggestion would be to use the Input tag as suggested by Richard, 

but rename the name value ie:

input type=submit name=btid1 value=Delete /
input type=submit name=btid2 value=Delete /
input type=submit name=btid3 value=Delete /

You can then use your PHP variable $_POST[btid1], $_POST[btid2] or
$_POST[btid3], etc, to determine relevant actions.


-Original Message-
From: Angus Mann [mailto:angusm...@pobox.com] 
Sent: 02 April 2009 12:45 PM
To: Richard Heyes
Cc: php-general@lists.php.net
Subject: Re: [PHP] Button id's - firefox and IE different ?

I can do as you suggest below, but then the buttons are labelled Delete 
Cancel and Save to the user.

The essential point is that they all need to say Delete. I know I can 
accomplish this by making multiple forms, each with its own button but for 
my purpose that's a pain is the ***.

IE returns the text displayed in the button regardless of the btid value. 
It seems to just ignore it.

Firefox returns the value assigned to btid as I intended regardless of the

text in the button that the user sees.



- Original Message - 
From: Richard Heyes rich...@php.net
To: Angus Mann angusm...@pobox.com
Cc: php-general@lists.php.net
Sent: Thursday, April 02, 2009 8:17 PM
Subject: Re: [PHP] Button id's - firefox and IE different ?


 Any suggestions ?

 Try this:

 input type=submit name=btid value=Delete /
 input type=submit name=btid value=Cancel /
 input type=submit name=btid value=Save /


 And then you can check the value of $_POST['btid']. Oh and btw...
 center... seriously?
 That's so 9 years ago. ;-)

 -- 
 Richard Heyes

 HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
 http://www.rgraph.net (Updated March 28th)

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


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



Re: [PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Phpster
What about styling a link to look like a button with css? It won't be  
an exact match style wise but you can get close. I have done this  
succesfully


Bastien

Sent from my iPod

On Apr 2, 2009, at 6:04, Angus Mann angusm...@pobox.com wrote:


Hi all.

I want to have several delete buttons with just one form, and  
depending on which button is pressed, one of several items is deleted.


So I need multiple submit buttons for 1 form, each displaying the  
same text Delete to the user, but each with a different value so  
the PHP script can tell them apart.


I've used this code for the buttons...
centerbutton type=submit name=btid value=1Delete/center
centerbutton type=submit name=btid value=2Delete/center
centerbutton type=submit name=btid value=3Delete/center

And it works just fine with firefox. But IE does not seem to pass  
the value back to the btid so when the script asks

if $_POST['btid'] == 1 {
}

the value 1, 2, or 3 is not given back to PHP by IE. It is given  
back correctly by firefox and works fine.


Any suggestions ?

Thanks.



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



Re: [PHP] XML data extraction

2009-04-02 Thread Per Jessen
Andrew Williams wrote:

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

Use XSLT to generate SQL INSERT statements.


/Per

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


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



[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] W3C Validator and Post Arrays

2009-04-02 Thread Igor Escobar
Put [] in the name attribute, but in ID must be unique.

Regards,
Igor Escobar
systems analyst  interface designer
www . igorescobar . com



On Thu, Apr 2, 2009 at 8:11 AM, Peter Ford p...@justcroft.com wrote:

 Peter Ford wrote:
  Michael A. Peters wrote:
  Shaun Thornburgh wrote:
  Hi,
 
  We are getting errors when trying to vaildate our HTML due to the [
  character when using Post Arrays:
 
  Line 173, Column 65:
  character [ is not allowed in the value of attribute id
 
  …e=filters[calling_url] id=filters[calling_url]
  value=categories-bulk-ear
 
  Does anyone know of a way around this?
 
  Thanks
  Don't use [] in an ID - it doesn't belong there.
  If you are not using the ID for a hook, just drop it - the ID doesn't
  need to be there.
 
  The name attribute is where you want the [] to post an array, ID does
  not get sent in a post.
 
  The ID of any element should be unique in a HTML document - if you need
 an ID
  for each of the inputs then you'll have to generate a unique one for
 each.
 
  To the rest of the list: I'm not too happy about having stuff inside the
 []
  either - is that some syntax I've missed or is it just wrong?
 

 Oooh, I've just looked it up - that *is* neat!

 --
 Peter Ford  phone: 01580 89
 Developer   fax:   01580 893399
 Justcroft International Ltd., Staplehurst, Kent

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




Re: [PHP] Oracle's dump to MySQL

2009-04-02 Thread Igor Escobar
I'm in the Oracle/MySQL E-mail List ?

Regards,
Igor Escobar
systems analyst  interface designer
www . igorescobar . com



On Thu, Apr 2, 2009 at 6:26 AM, 9el le...@phpxperts.net wrote:

 I found this command from one guy for importing Oracle's dump to MySQL

 Shell mysql -uroot db_name -vvf  oracle_dump.dmp

 But, v is for verbose and f is for force continuation.

 Anyone worked with Oracle and MySQL?



Re: [PHP] XML data extraction

2009-04-02 Thread Igor Escobar
@Jessen I read your answer and... You have any article speaking about that
you are saying?

Regards,
Igor Escobar
systems analyst  interface designer
www . igorescobar . com



On Thu, Apr 2, 2009 at 8:38 AM, Per Jessen p...@computer.org wrote:

 Andrew Williams wrote:

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

 Use XSLT to generate SQL INSERT statements.


 /Per

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


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




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

2009-04-02 Thread Michel OLIVIER
hi,
with a cron and wget?

2009/4/2 Andrew Williams andrew4willi...@gmail.com:
 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


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



Re: [PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Igor Escobar
If you don't want change your form, do some function in Javascript witch
control the last button you clicked.

centerbutton type=submit name=btid value=1Delete/center
centerbutton type=submit name=btid value=2Delete/center
centerbutton type=submit name=btid value=3Delete/center

input type=hidden name=last_buttom id= value=last_buttom /

I wanna make a advice to you learn more about HTML and Web Standards...
Don't use button type... use input type...

Your javascript (using jQuery) sems like this

$(input[name='btid']).click(function() {
$('#last_buttom').attr('value', $(this).val());
});

And then you submit your form or something, the input last_buttom are with
the value of the buttom you has clicked at last time.

Regards,
Igor Escobar
systems analyst  interface designer
www . igorescobar . com



On Thu, Apr 2, 2009 at 8:29 AM, Phpster phps...@gmail.com wrote:

 What about styling a link to look like a button with css? It won't be an
 exact match style wise but you can get close. I have done this succesfully

 Bastien

 Sent from my iPod


 On Apr 2, 2009, at 6:04, Angus Mann angusm...@pobox.com wrote:

  Hi all.

 I want to have several delete buttons with just one form, and depending on
 which button is pressed, one of several items is deleted.

 So I need multiple submit buttons for 1 form, each displaying the same
 text Delete to the user, but each with a different value so the PHP
 script can tell them apart.

 I've used this code for the buttons...
 centerbutton type=submit name=btid value=1Delete/center
 centerbutton type=submit name=btid value=2Delete/center
 centerbutton type=submit name=btid value=3Delete/center

 And it works just fine with firefox. But IE does not seem to pass the
 value back to the btid so when the script asks
 if $_POST['btid'] == 1 {
 }

 the value 1, 2, or 3 is not given back to PHP by IE. It is given back
 correctly by firefox and works fine.

 Any suggestions ?

 Thanks.


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




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

2009-04-02 Thread Virgilio Quilario
 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

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



Re: [PHP] XML data extraction

2009-04-02 Thread Per Jessen
Igor Escobar wrote:

 @Jessen I read your answer and... You have any article speaking about
 that you are saying?
 

Hi Igor

I don't have anything handy, but there's plenty of good material on the
internet about XSLT.  The main point is - XSLT is just reformatting the
data from XML format to a text format suitable for use as insert SQL
insert statements.  All you need to do is write the stylesheet that
takes format1 and converts it to format2. 
If you've not dealt with XSL before it can be a little daunting, but I
think you'll get the idea fairly quickly. 


/Per

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


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



Re: [PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Jan G.B.
2009/4/2 Igor Escobar titiolin...@gmail.com:
 If you don't want change your form, do some function in Javascript witch
 control the last button you clicked.


Javascript is bad and you don't need it.

 centerbutton type=submit name=btid value=1Delete/center
 centerbutton type=submit name=btid value=2Delete/center
 centerbutton type=submit name=btid value=3Delete/center

 input type=hidden name=last_buttom id= value=last_buttom /

 I wanna make a advice to you learn more about HTML and Web Standards...

I want give an advice to you: learn to make a difference out of HTML
and XHTML. It's not the same, and input / is XHTML.

 Don't use button type... use input type...


You forgot to mention *why* he should he use input type=submit!

button is supported by all major browsers! So there's no need to use
input instead ...

But having several button or input tags in one form element with
the same NAME= value makes no sense! Only the last one in the code
will be submitted.
Also, the LABEL for the button should be written like that: button
name=x1 value=0815LABEL GOES HERE/button

http://www.w3schools.com/tags/tag_button.asp


Using input might be more future-oriented.. ;)



 Your javascript (using jQuery) sems like this


Installing and using jquery to have three buttons is overkill. not
more, not less!


byebye

 $(input[name='btid']).click(function() {
 $('#last_buttom').attr('value', $(this).val());
 });

 And then you submit your form or something, the input last_buttom are with
 the value of the buttom you has clicked at last time.

 Regards,
 Igor Escobar
 systems analyst  interface designer
 www . igorescobar . com



 On Thu, Apr 2, 2009 at 8:29 AM, Phpster phps...@gmail.com wrote:

 What about styling a link to look like a button with css? It won't be an
 exact match style wise but you can get close. I have done this succesfully

 Bastien

 Sent from my iPod


 On Apr 2, 2009, at 6:04, Angus Mann angusm...@pobox.com wrote:

  Hi all.

 I want to have several delete buttons with just one form, and depending on
 which button is pressed, one of several items is deleted.

 So I need multiple submit buttons for 1 form, each displaying the same
 text Delete to the user, but each with a different value so the PHP
 script can tell them apart.

 I've used this code for the buttons...
 centerbutton type=submit name=btid value=1Delete/center
 centerbutton type=submit name=btid value=2Delete/center
 centerbutton type=submit name=btid value=3Delete/center

 And it works just fine with firefox. But IE does not seem to pass the
 value back to the btid so when the script asks
 if $_POST['btid'] == 1 {
 }

 the value 1, 2, or 3 is not given back to PHP by IE. It is given back
 correctly by firefox and works fine.

 Any suggestions ?

 Thanks.


 --
 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] [php] scheduled task in php

2009-04-02 Thread Jan G.B.
Or even with CRONw if via window is an indicator for the evil OS.
http://cronw.sourceforge.net/
(I personally didn't test this software)
bye

2009/4/2 Michel OLIVIER michel.oliv...@mc2i.fr:
 hi,
 with a cron and wget?

 2009/4/2 Andrew Williams andrew4willi...@gmail.com:
 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


 --
 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] [php] scheduled task in php

2009-04-02 Thread Kyle Smith
There's no need for third party software, windows has a scheduled task 
system.


Make a scheduled task and for the application select the php executable 
(Maybe C:\PHP\bin\php.exe, or some such.).  Once the wizard is complete 
select the checkbox that says Open the task when I click Finish.  Now 
place the full path of your script after the executable in the field 
provided so it looks something like:


C:\PHP\php.exe C:\Documents and Settings\Kyle\My 
Documents\scripts\MyCronPHPScript.php


HTH,
Kyle

*Kyle Smith*
UNIX/Linux Systems Administrator
Inforonics, LLC


Jan G.B. wrote:

Or even with CRONw if via window is an indicator for the evil OS.
http://cronw.sourceforge.net/
(I personally didn't test this software)
bye

2009/4/2 Michel OLIVIER michel.oliv...@mc2i.fr:
  

hi,
with a cron and wget?

2009/4/2 Andrew Williams andrew4willi...@gmail.com:


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

  

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





  


Re: [PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Igor Escobar
I'm sorry, you is the master o/

ps: I dont ask for them to install the jQuery, i just give an exemplo how he
can do something like that.
ps 2: I know the difference betwenn XHMTL and HTML i put the / there
becouse it's the force of the habit
ps 3: Why javascript is bad? you don't know develop a good interface with
that? shame on you.
ps 4: Who you think you is? everybody is here to pass something for the
others and learn something, everything i wrote its just  to help, if you are
compete with others showing how much bigger you is, go to a championship or
something.

Have a nice day.

Regards,
Igor Escoar
Systems Analyst  Interface Designer

--

Personal Blog
~ blog.igorescobar.com
Online Portifolio
~ www.igorescobar.com
Twitter
~ @igorescobar





On Thu, Apr 2, 2009 at 11:01 AM, Jan G.B. ro0ot.w...@googlemail.com wrote:

 2009/4/2 Igor Escobar titiolin...@gmail.com:
  If you don't want change your form, do some function in Javascript witch
  control the last button you clicked.
 

 Javascript is bad and you don't need it.

  centerbutton type=submit name=btid value=1Delete/center
  centerbutton type=submit name=btid value=2Delete/center
  centerbutton type=submit name=btid value=3Delete/center
 
  input type=hidden name=last_buttom id= value=last_buttom /
 
  I wanna make a advice to you learn more about HTML and Web Standards...

 I want give an advice to you: learn to make a difference out of HTML
 and XHTML. It's not the same, and input / is XHTML.

  Don't use button type... use input type...
 

 You forgot to mention *why* he should he use input type=submit!

 button is supported by all major browsers! So there's no need to use
 input instead ...

 But having several button or input tags in one form element with
 the same NAME= value makes no sense! Only the last one in the code
 will be submitted.
 Also, the LABEL for the button should be written like that: button
 name=x1 value=0815LABEL GOES HERE/button

 http://www.w3schools.com/tags/tag_button.asp


 Using input might be more future-oriented.. ;)



  Your javascript (using jQuery) sems like this
 

 Installing and using jquery to have three buttons is overkill. not
 more, not less!


 byebye

  $(input[name='btid']).click(function() {
  $('#last_buttom').attr('value', $(this).val());
  });
 
  And then you submit your form or something, the input last_buttom are
 with
  the value of the buttom you has clicked at last time.
 
  Regards,
  Igor Escobar
  systems analyst  interface designer
  www . igorescobar . com
 
 
 
  On Thu, Apr 2, 2009 at 8:29 AM, Phpster phps...@gmail.com wrote:
 
  What about styling a link to look like a button with css? It won't be an
  exact match style wise but you can get close. I have done this
 succesfully
 
  Bastien
 
  Sent from my iPod
 
 
  On Apr 2, 2009, at 6:04, Angus Mann angusm...@pobox.com wrote:
 
   Hi all.
 
  I want to have several delete buttons with just one form, and depending
 on
  which button is pressed, one of several items is deleted.
 
  So I need multiple submit buttons for 1 form, each displaying the same
  text Delete to the user, but each with a different value so the PHP
  script can tell them apart.
 
  I've used this code for the buttons...
  centerbutton type=submit name=btid value=1Delete/center
  centerbutton type=submit name=btid value=2Delete/center
  centerbutton type=submit name=btid value=3Delete/center
 
  And it works just fine with firefox. But IE does not seem to pass the
  value back to the btid so when the script asks
  if $_POST['btid'] == 1 {
  }
 
  the value 1, 2, or 3 is not given back to PHP by IE. It is given back
  correctly by firefox and works fine.
 
  Any suggestions ?
 
  Thanks.
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 



Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread tedd

At 4:03 AM -0700 4/2/09, Michael A. Peters wrote:

Shaun Thornburgh wrote:

Hi,

We are getting errors when trying to vaildate 
our HTML due to the [ character when using Post 
Arrays:


Line 173, Column 65:
character [ is not allowed in the value of attribute id

Še=filters[calling_url] 
id=filters[calling_url] 
value=categories-bulk-ear


Does anyone know of a way around this?

Thanks


Don't use [] in an ID - it doesn't belong there.
If you are not using the ID for a hook, just 
drop it - the ID doesn't need to be there.


The name attribute is where you want the [] to 
post an array, ID does not get sent in a post.



Ahhh, no.

Try this:

http://www.webbytedd.com/bbb/check-box-form/

It works, shows why and how you can use [] and it validates.

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] PHP LDAP over SSL problems

2009-04-02 Thread Keith Lawson
Hello, 

I have been working on this problem for some time now and I can't seem to 
resolve it. Everything I have found on google and php.net says I can connect to 
an LDAP server with SSL by setting TLS_REQCERT never in ldap.conf. I want to 
eliminate certs from the picture for now just to confirm I can make the 
connection which is why I have TLS_REQCERT never set. 

I added that setting to my ldap.conf and my test code now works from the 
command line but it does not work when I call it from a browser. Here is my 
test: 

?php
$ldaphost = ldaps://my.ldap.server;

//ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
// Connecting to LDAP
$ldapconn = ldap_connect($ldaphost)
  or die(Could not connect to {$ldaphost});
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0);

echo var_dump(@ldap_bind($ldapconn, cn=Keithl, ou=Users, o=LH));
?

This returns true when called from the command line: 
[www]/www/doc/ktlwiki  php ldap-test.php
bool(true)

But when I load the same code through a browser it fails. 

I'm using php 5.2.6, openldap 2.4.11 and openssl 0.9.8i on Solaris 10. I built 
everything from source, PHP has LDAP and SSL support compiled in.

My openldap install is in /opt. Trussing the command line process and the 
apache process shows similar results: 

Command line: 
26651:  open(/opt/lib/libldap-2.4.so.2, O_RDONLY) = 3
26651:  open(ldap-test.php, O_RDONLY) = 4
26651:  resolvepath(/www/doc/INTRA/ktlwiki/ldap-test.php, 
/www/doc/INTRA/ktlwiki/ldap-test.php, 1024) = 36
26651:  open(/opt/etc/openldap/ldap.conf, O_RDONLY)   = 4

Apache process: 
24656:  open(/opt/lib/libldap-2.4.so.2, O_RDONLY) = 6
24818:  open(/www/doc/INTRA/ktlwiki/ldap-test.php, O_RDONLY) = 45
24818:  open(/opt/etc/openldap/ldap.conf, O_RDONLY)   = 4

Any idea why the same code served by apache would ignore the TLS_REQCERT 
setting?!

TIA
Keith

 


The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material. Any 
review, retransmission, dissemination or other use of, or taking of any action 
in  reliance upon, this information by persons or entities other  than the 
intended recipient is prohibited. If you received this  in error, please 
contact the sender and delete the material from any computer. 


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



Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread tedd

At 4:03 AM -0700 4/2/09, Michael A. Peters wrote:

Shaun Thornburgh wrote:

Hi,

We are getting errors when trying to vaildate 
our HTML due to the [ character when using Post 
Arrays:


Line 173, Column 65:
character [ is not allowed in the value of attribute id

Še=filters[calling_url] 
id=filters[calling_url] 
value=categories-bulk-ear


Does anyone know of a way around this?

Thanks


Don't use [] in an ID - it doesn't belong there.
If you are not using the ID for a hook, just 
drop it - the ID doesn't need to be there.


The name attribute is where you want the [] to 
post an array, ID does not get sent in a post.



Correction -- name is Ok and where you should put the [].

The demo is here:

http://www.webbytedd.com/bbb/check-box-form/

It works, shows why and how you can use [] and it validates.

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] Java applet clearing session variables?

2009-04-02 Thread Dan King
It seems that our java applet is clearing our php session variables.

I have an html form that saves user information as session variables. These 
session variables are used to create folders, where uploaded files can be 
saved. I've tested my php script that uses the session variables to create a 
folder and then moves uploaded files to that folder with a traditional html 
upload form. 
However, when I use a java applet in place of the traditional html form the php 
script does not create the folder, and thus it obviously cannot move the 
uploaded files. 

I've tested the applet and it does successfully upload files to the server. 
When I printed the session array variable after using the applet, I noticed the 
session array was empty. Does anyone know why this the applet clears the 
session variables? Or how to stop/work around it so I can use the applet and 
the php script?

Thanks,

Dan



  

Re: [PHP] Button id's - firefox and IE different ?

2009-04-02 Thread Ashley Sheridan
On Thu, 2009-04-02 at 11:43 -0300, Igor Escobar wrote:
 ps 3: Why javascript is bad? you don't know develop a good interface
 with
 that? shame on you. 

You don't know how to develop a good interface *without* Javascript? ;)

Essentially, relying on script for something as fundamental as form
handling is the same as giving a big finger to all those blind users out
there, or anyone who turns of Javascript, or anyone behind a corporate
firewall that strips scripts, or... The list goes on. If you really
can't help it, you should always use Javascript only to supplement
usability, don't rely on it for system functionality.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Ashley Sheridan
On Thu, 2009-04-02 at 14:23 -0400, tedd wrote:
 At 4:03 AM -0700 4/2/09, Michael A. Peters wrote:
 Shaun Thornburgh wrote:
 Hi,
 
 We are getting errors when trying to vaildate 
 our HTML due to the [ character when using Post 
 Arrays:
 
 Line 173, Column 65:
  character [ is not allowed in the value of attribute id
 
 Še=filters[calling_url] 
 id=filters[calling_url] 
 value=categories-bulk-ear
 
 Does anyone know of a way around this?
 
 Thanks
 
 Don't use [] in an ID - it doesn't belong there.
 If you are not using the ID for a hook, just 
 drop it - the ID doesn't need to be there.
 
 The name attribute is where you want the [] to 
 post an array, ID does not get sent in a post.
 
 
 Ahhh, no.
 
 Try this:
 
 http://www.webbytedd.com/bbb/check-box-form/
 
 It works, shows why and how you can use [] and it validates.
 
 Cheers,
 
 tedd
 
 -- 
 ---
 http://sperling.com  http://ancientstones.com  http://earthstones.com
 
You can use them in the name attribute like you said, but not in the id.
As id's all need to be unique, just output an incremental number next to
the text in the id property, sans [ characters.


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] Java applet clearing session variables?

2009-04-02 Thread Bastien Koert
On Thu, Apr 2, 2009 at 3:26 PM, Dan King dan.king...@yahoo.com wrote:

 It seems that our java applet is clearing our php session variables.

 I have an html form that saves user information as session variables. These
 session variables are used to create folders, where uploaded files can be
 saved. I've tested my php script that uses the session variables to create a
 folder and then moves uploaded files to that folder with a traditional html
 upload form.
 However, when I use a java applet in place of the traditional html form the
 php script does not create the folder, and thus it obviously cannot move the
 uploaded files.

 I've tested the applet and it does successfully upload files to the server.
 When I printed the session array variable after using the applet, I noticed
 the session array was empty. Does anyone know why this the applet clears the
 session variables? Or how to stop/work around it so I can use the applet and
 the php script?

 Thanks,

 Dan






Add the session hash to the page as a hidden field and revalidate
/regenerate the session when the page gets submitted?

-- 

Bastien

Cat, the other other white meat


Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Paul M Foster
On Thu, Apr 02, 2009 at 02:25:55PM -0400, tedd wrote:

 At 4:03 AM -0700 4/2/09, Michael A. Peters wrote:
 Shaun Thornburgh wrote:
 Hi,

 We are getting errors when trying to vaildate our HTML due to the [ 
 character when using Post Arrays:

 Line 173, Column 65:
 character [ is not allowed in the value of attribute id

 Še=filters[calling_url] id=filters[calling_url] 
 value=categories-bulk-ear

 Does anyone know of a way around this?

 Thanks

 Don't use [] in an ID - it doesn't belong there.
 If you are not using the ID for a hook, just drop it - the ID doesn't need 
 to be there.

 The name attribute is where you want the [] to post an array, ID does not 
 get sent in a post.


 Correction -- name is Ok and where you should put the [].

 The demo is here:

 http://www.webbytedd.com/bbb/check-box-form/

 It works, shows why and how you can use [] and it validates.

 Cheers,

 tedd

I vote we scrap this list. Anyone with a question, just go to Tedd's
website. There's got to be an example on there somewhere. ;-}

Paul

-- 
Paul M. Foster

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



Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread Michael A. Peters

tedd wrote:

At 4:03 AM -0700 4/2/09, Michael A. Peters wrote:

Shaun Thornburgh wrote:

Hi,

We are getting errors when trying to vaildate our HTML due to the [ 
character when using Post Arrays:


Line 173, Column 65:
character [ is not allowed in the value of attribute id

Še=filters[calling_url] id=filters[calling_url] 
value=categories-bulk-ear


Does anyone know of a way around this?

Thanks


Don't use [] in an ID - it doesn't belong there.
If you are not using the ID for a hook, just drop it - the ID doesn't 
need to be there.


The name attribute is where you want the [] to post an array, ID does 
not get sent in a post.



Correction -- name is Ok and where you should put the [].


I must be missing how that is a correction of my post ...

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



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


Re: [PHP] Oracle's dump to MySQL

2009-04-02 Thread Chris

9el wrote:

I found this command from one guy for importing Oracle's dump to MySQL

Shell mysql -uroot db_name -vvf  oracle_dump.dmp

But, v is for verbose and f is for force continuation.

Anyone worked with Oracle and MySQL?


Yep, and there's no way that will ever work except for the very simplest 
 table and data.


The datatypes are different (mysql doesn't have varchar2, timestamp 
formats are different though oracle lets you change that).


You'll need to do a schema-only dump, convert it to the mysql format, 
then worry about converting the data.


--
Postgresql  php tutorials
http://www.designmagick.com/


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



Re: [PHP] PHP LDAP over SSL problems

2009-04-02 Thread Chris

Keith Lawson wrote:
Hello, 

I have been working on this problem for some time now and I can't seem to resolve it. Everything I have found on google and php.net says I can connect to an LDAP server with SSL by setting TLS_REQCERT never in ldap.conf. I want to eliminate certs from the picture for now just to confirm I can make the connection which is why I have TLS_REQCERT never set. 

I added that setting to my ldap.conf and my test code now works from the command line but it does not work when I call it from a browser. Here is my test: 


?php
$ldaphost = ldaps://my.ldap.server;

//ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
// Connecting to LDAP
$ldapconn = ldap_connect($ldaphost)
  or die(Could not connect to {$ldaphost});
ldap_set_option($ldapconn, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldapconn, LDAP_OPT_REFERRALS, 0);

echo var_dump(@ldap_bind($ldapconn, cn=Keithl, ou=Users, o=LH));


It's hard to know - you're suppressing errors.

Add these 2 lines to your script:
error_reporting(E_ALL);
ini_set('display_errors', true);

Then get rid of the @ in front of ldap_bind.

Use http://www.php.net/manual/en/function.ldap-error.php to capture the 
error message and search for it.


--
Postgresql  php tutorials
http://www.designmagick.com/


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



Re: [PHP] php5-mhash disabled...

2009-04-02 Thread Chris

Anders Norrbring wrote:

I just saw that mhash is disabled in the spec file for php5 if SUSE version
is 11.0 or higher.
Simple question, does it do any harm?


If they decided to do that it's best to ask suse (or on the opensuse 
lists if you're using that flavour).


It may just be because it's deprecated but it could be for some other 
reason (eg binary compatibility issues or licensing issues or .. ).


--
Postgresql  php tutorials
http://www.designmagick.com/

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



[PHP] syntax woes

2009-04-02 Thread aurfalien

Hi all,

I'm unsure how to describe this but I'll try.

The following code works fine in its own PHP script;

$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);

But when placed in a larger PHP script being part of the  
ldap_provisioning module in Drupal, the Drupal GUI is blank until I do;


$mkdircmd = '/bin/mkdir /homes/'.$uid;

... were I surrounded the variable with , which causes it to not work.

I'm totally unsure how to approach this and am hoping syntax  
adjustments will fix it.


- aurf

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



Re: [PHP] syntax woes

2009-04-02 Thread Chris

aurfal...@gmail.com wrote:

Hi all,

I'm unsure how to describe this but I'll try.

The following code works fine in its own PHP script;

$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);

But when placed in a larger PHP script being part of the 
ldap_provisioning module in Drupal, the Drupal GUI is blank until I do;


$mkdircmd = '/bin/mkdir /homes/'.$uid;

... were I surrounded the variable with , which causes it to not work.


$mkdircmd = /bin/mkdir /homes/$uid;
or
$mkdircmd = /bin/mkdir /homes/${uid};

Should fix the syntax.

I guess you've already solved the permissions problem on the /homes/ 
folder (normally the web server would not be able to create such a path 
because of permission issues).


Blank GUI - no idea. Anything in the error logs (php or apache) ?

Maybe asking on a drupal specific list would be a better idea for that one.

--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] W3C Validator and Post Arrays

2009-04-02 Thread tedd

At 2:34 PM -0700 4/2/09, Michael A. Peters wrote:

tedd wrote:

At 4:03 AM -0700 4/2/09, Michael A. Peters wrote:

Shaun Thornburgh wrote:

Hi,

We are getting errors when trying to vaildate our HTML due to the 
[ character when using Post Arrays:


Line 173, Column 65:
character [ is not allowed in the value of attribute id

Se=filters[calling_url] id=filters[calling_url] 
value=categories-bulk-ear


Does anyone know of a way around this?

Thanks


Don't use [] in an ID - it doesn't belong there.
If you are not using the ID for a hook, just drop it - the ID 
doesn't need to be there.


The name attribute is where you want the [] to post an array, ID 
does not get sent in a post.



Correction -- name is Ok and where you should put the [].


I must be missing how that is a correction of my post ...


No, that was a correction to my post where I suggested that you were 
not correct, but you were. I was the one not being correct until I 
corrected myself and then agreed with you, understand?


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] syntax woes

2009-04-02 Thread aurfalien

aurfal...@gmail.com wrote:

Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);
But when placed in a larger PHP script being part of the  
ldap_provisioning module in Drupal, the Drupal GUI is blank until I  
do;

$mkdircmd = '/bin/mkdir /homes/'.$uid;
... were I surrounded the variable with , which causes it to not  
work.


$mkdircmd = /bin/mkdir /homes/$uid;
or
$mkdircmd = /bin/mkdir /homes/${uid};

Should fix the syntax.

I guess you've already solved the permissions problem on the /homes/  
folder (normally the web server would not be able to create such a  
path because of permission issues).


Blank GUI - no idea. Anything in the error logs (php or apache) ?

Maybe asking on a drupal specific list would be a better idea for  
that one.


--
Postgresql  php tutorials
http://www.designmagick.com/


Thanks Chris.

I appreciate the response.  I was hoping my description wasn't too  
vague because I don't really understand what I'm doing.


- aurf



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



Re: [PHP] syntax woes

2009-04-02 Thread Ashley Sheridan
On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote:
  aurfal...@gmail.com wrote:
  Hi all,
  I'm unsure how to describe this but I'll try.
  The following code works fine in its own PHP script;
  $mkdircmd = '/bin/mkdir /homes/'.$uid;
  exec($mkdircmd);
  But when placed in a larger PHP script being part of the  
  ldap_provisioning module in Drupal, the Drupal GUI is blank until I  
  do;
  $mkdircmd = '/bin/mkdir /homes/'.$uid;
  ... were I surrounded the variable with , which causes it to not  
  work.
 
  $mkdircmd = /bin/mkdir /homes/$uid;
  or
  $mkdircmd = /bin/mkdir /homes/${uid};
 
  Should fix the syntax.
 
  I guess you've already solved the permissions problem on the /homes/  
  folder (normally the web server would not be able to create such a  
  path because of permission issues).
 
  Blank GUI - no idea. Anything in the error logs (php or apache) ?
 
  Maybe asking on a drupal specific list would be a better idea for  
  that one.
 
  -- 
  Postgresql  php tutorials
  http://www.designmagick.com/
 
 Thanks Chris.
 
 I appreciate the response.  I was hoping my description wasn't too  
 vague because I don't really understand what I'm doing.
 
 - aurf
 
 
 
This might sound stupid because I've not played with Drupal, but what's
wrong with using the mkdir command in PHP instead of the exec call?


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] syntax woes

2009-04-02 Thread aurfalien

On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote:

aurfal...@gmail.com wrote:

Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);
But when placed in a larger PHP script being part of the
ldap_provisioning module in Drupal, the Drupal GUI is blank until I
do;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
... were I surrounded the variable with , which causes it to not
work.


$mkdircmd = /bin/mkdir /homes/$uid;
or
$mkdircmd = /bin/mkdir /homes/${uid};

Should fix the syntax.

I guess you've already solved the permissions problem on the /homes/
folder (normally the web server would not be able to create such a
path because of permission issues).

Blank GUI - no idea. Anything in the error logs (php or apache) ?

Maybe asking on a drupal specific list would be a better idea for
that one.

--  
Postgresql  php tutorials

http://www.designmagick.com/


Thanks Chris.

I appreciate the response.  I was hoping my description wasn't too
vague because I don't really understand what I'm doing.

- aurf



This might sound stupid because I've not played with Drupal, but  
what's

wrong with using the mkdir command in PHP instead of the exec call?


Ash
www.ashleysheridan.co.uk



Hi Ash,

I didn't know there was one.

Lemme study it up, thanks for the suggestion.

- aurf

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



Re: [PHP] syntax woes

2009-04-02 Thread Ashley Sheridan
On Thu, 2009-04-02 at 15:58 -0700, aurfal...@gmail.com wrote:
  On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote:
  aurfal...@gmail.com wrote:
  Hi all,
  I'm unsure how to describe this but I'll try.
  The following code works fine in its own PHP script;
  $mkdircmd = '/bin/mkdir /homes/'.$uid;
  exec($mkdircmd);
  But when placed in a larger PHP script being part of the
  ldap_provisioning module in Drupal, the Drupal GUI is blank until I
  do;
  $mkdircmd = '/bin/mkdir /homes/'.$uid;
  ... were I surrounded the variable with , which causes it to not
  work.
 
  $mkdircmd = /bin/mkdir /homes/$uid;
  or
  $mkdircmd = /bin/mkdir /homes/${uid};
 
  Should fix the syntax.
 
  I guess you've already solved the permissions problem on the /homes/
  folder (normally the web server would not be able to create such a
  path because of permission issues).
 
  Blank GUI - no idea. Anything in the error logs (php or apache) ?
 
  Maybe asking on a drupal specific list would be a better idea for
  that one.
 
  --  
  Postgresql  php tutorials
  http://www.designmagick.com/
 
  Thanks Chris.
 
  I appreciate the response.  I was hoping my description wasn't too
  vague because I don't really understand what I'm doing.
 
  - aurf
 
 
 
  This might sound stupid because I've not played with Drupal, but  
  what's
  wrong with using the mkdir command in PHP instead of the exec call?
 
 
  Ash
  www.ashleysheridan.co.uk
 
 
 Hi Ash,
 
 I didn't know there was one.
 
 Lemme study it up, thanks for the suggestion.
 
 - aurf
 
PHP can do everything ;)


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] syntax woes

2009-04-02 Thread aurfalien

On Thu, 2009-04-02 at 15:58 -0700, aurfal...@gmail.com wrote:

On Thu, 2009-04-02 at 15:47 -0700, aurfal...@gmail.com wrote:

aurfal...@gmail.com wrote:

Hi all,
I'm unsure how to describe this but I'll try.
The following code works fine in its own PHP script;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
exec($mkdircmd);
But when placed in a larger PHP script being part of the
ldap_provisioning module in Drupal, the Drupal GUI is blank  
until I

do;
$mkdircmd = '/bin/mkdir /homes/'.$uid;
... were I surrounded the variable with , which causes it to  
not

work.


$mkdircmd = /bin/mkdir /homes/$uid;
or
$mkdircmd = /bin/mkdir /homes/${uid};

Should fix the syntax.

I guess you've already solved the permissions problem on the / 
homes/

folder (normally the web server would not be able to create such a
path because of permission issues).

Blank GUI - no idea. Anything in the error logs (php or apache) ?

Maybe asking on a drupal specific list would be a better idea for
that one.

--  
Postgresql  php tutorials

http://www.designmagick.com/


Thanks Chris.

I appreciate the response.  I was hoping my description wasn't too
vague because I don't really understand what I'm doing.

- aurf




This might sound stupid because I've not played with Drupal, but
what's
wrong with using the mkdir command in PHP instead of the exec call?


Ash
www.ashleysheridan.co.uk



Hi Ash,

I didn't know there was one.

Lemme study it up, thanks for the suggestion.

- aurf


PHP can do everything ;)


Ash
www.ashleysheridan.co.uk




Wow, it does chown and chmod as well, thats friggen cool.

Ok, then, I'm sold, PHP can do everything...

... but save us from ourselves.  Sorry, I had to kik that in.  Tech  
will be the death of us all, wahahahahaha :)


- aurf




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



Re: [PHP] syntax woes

2009-04-02 Thread Chris



Wow, it does chown and chmod as well, thats friggen cool.


chown will only work if the script is running as root which I doubt your 
drupal site will be.


--
Postgresql  php tutorials
http://www.designmagick.com/


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



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

2009-04-02 Thread George Larson
On Thu, Apr 2, 2009 at 10:12 AM, Kyle Smith kyle.sm...@inforonics.comwrote:

 There's no need for third party software, windows has a scheduled task
 system.

 Make a scheduled task and for the application select the php executable
 (Maybe C:\PHP\bin\php.exe, or some such.).  Once the wizard is complete
 select the checkbox that says Open the task when I click Finish.  Now
 place the full path of your script after the executable in the field
 provided so it looks something like:

 C:\PHP\php.exe C:\Documents and Settings\Kyle\My
 Documents\scripts\MyCronPHPScript.php

 HTH,
 Kyle

 *Kyle Smith*
 UNIX/Linux Systems Administrator
 Inforonics, LLC



 Jan G.B. wrote:

 Or even with CRONw if via window is an indicator for the evil OS.
 http://cronw.sourceforge.net/
 (I personally didn't test this software)
 bye

 2009/4/2 Michel OLIVIER michel.oliv...@mc2i.fr:


 hi,
 with a cron and wget?

 2009/4/2 Andrew Williams andrew4willi...@gmail.com:


 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



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









I have found Window's task scheduler utterly insufficient.  I understand,
and agree with, your desire to keep things native but I have thrown that
away for my scheduled events.  I swear bt VisualCron [
http://www.visualcron.com/].


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

2009-04-02 Thread Chris

Andrew Williams wrote:

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


You don't create a php.exe file, one should already be there from when 
you installed php.


--
Postgresql  php tutorials
http://www.designmagick.com/


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



Re: [PHP] syntax woes

2009-04-02 Thread Shawn McKenzie
Chris wrote:
 
 Wow, it does chown and chmod as well, thats friggen cool.
 
 chown will only work if the script is running as root which I doubt your
 drupal site will be.
 

Or if the script is running as a user/group that has write permissions
to the dir/file that your trying to chown.

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

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



Re: [PHP] syntax woes

2009-04-02 Thread Chris

Shawn McKenzie wrote:

Chris wrote:

Wow, it does chown and chmod as well, thats friggen cool.

chown will only work if the script is running as root which I doubt your
drupal site will be.



Or if the script is running as a user/group that has write permissions
to the dir/file that your trying to chown.


chmod may allow that, but not chown.

server:~# groupadd test
server:~# useradd a -g test
server:~# useradd b -g test
server:~# mkdir /test
server:~# chown a.test /test
server:~# su - a
No directory, logging in with HOME=/
a...@server:/$ cd test
a...@server:/test$ chmod 775 .
a...@server:/test$ touch a
a...@server:/test$ chmod 664 a
a...@server:/test$ chown b.test a
chown: changing ownership of `a': Operation not permitted
a...@server:/test$


--
Postgresql  php tutorials
http://www.designmagick.com/


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



Re: [PHP] syntax woes

2009-04-02 Thread Michael A. Peters

Chris wrote:

Shawn McKenzie wrote:

Chris wrote:

Wow, it does chown and chmod as well, thats friggen cool.

chown will only work if the script is running as root which I doubt your
drupal site will be.



Or if the script is running as a user/group that has write permissions
to the dir/file that your trying to chown.


chmod may allow that, but not chown.




I believe it depends upon the operating system and version of the 
operating system.


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



Re: [PHP] syntax woes

2009-04-02 Thread aurfalien

Hi all,

For any one following this thread, here is how I worked around the  
apache/php/chown limitation.


script snippet (and if any one has a more elegant style, please share  
as I am an amateur script kiddie).


$path = /homes.$username;
$chowncmd = /usr/bin/sudo /bin/chown ;
mkdir($path);
chmod($path, 0775);
exec($chowncmd.$username.  .$path);


I modified /etc/sudoers;

#Defaults requiretty   - I added the comment.
apache ALL = NOPASSWD: /bin/chown  - added this line.

- aurf
On Apr 2, 2009, at 6:58 PM, Michael A. Peters wrote:


Chris wrote:

Shawn McKenzie wrote:

Chris wrote:

Wow, it does chown and chmod as well, thats friggen cool.
chown will only work if the script is running as root which I  
doubt your

drupal site will be.



Or if the script is running as a user/group that has write  
permissions

to the dir/file that your trying to chown.

chmod may allow that, but not chown.


I believe it depends upon the operating system and version of the  
operating system.


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