RE: [PHP] How to get a network drive name

2006-02-02 Thread Shaw, Chris - Accenture

snip
 
 i have already tryed this command barry, in fact the name of
 the volume is
 different from the name of a network drive. A volume concerns
 a partition i
 think
 For exemple, you can define many drives, let say COMMON1(X:),
 COMMON2(Y:) in
 the DISK(C:).
 In this situation, the volume name is DISK for the three drives and
 different from COMMON1 and COMMON2.
 I have tried many other dos commands but with no succes
 TALL Ibrahima

If you are using windowsxp:

Vol will give you the partition name, hence:
I have 2 partitions on one disk, Part1, Part2 and c:, d: respectively.

Vol c:

 Volume in drive C is Part1
 Volume Serial Number is -

Vol d:
 Volume in drive D is Part2
 Volume Serial Number is -

If you want more details on network drives, use Net Use
Example:

Net Use S:

Local nameS:
Remote name   \\SomeServer\SomeShare
Resource type Disk
StatusOK
# Opens   1
# Connections 1
The command completed successfully.




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Classes and Functions

2005-11-03 Thread Shaw, Chris - Accenture

STFW

 -Original Message-
 From: Unknown Unknown [mailto:[EMAIL PROTECTED]
 Sent: 03 November 2005 00:05
 To: Jasper Bryant-Greene
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] Classes and Functions
 
 
 Oh thanks again
 and what does RTFM mean?
 
 




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] session.gc_maxlifetime

2005-09-09 Thread Shaw, Chris - Accenture

 -Original Message-
 From: Gustav Wiberg [mailto:[EMAIL PROTECTED]
 Sent: 09 September 2005 14:40
 To: PHP General
 Subject: [PHP] session.gc_maxlifetime





 *


 This e-mail has been received by the Revenue Internet e-mail service.


 *


 Hi there!


 This setting...
 session.gc_maxlifetime can only be set in php.ini
 Default = 1440 = 24 minutes
 is the time before a cookie expires? Is this right?


 I don't have access to php.ini because it's not my server

 (it's my webhost)
 What's the solution to that? I want the cookie to last as

 long as set inte

 setcookie...


 Please help... I'm a little confused here...

Surely it is:

session.cookie_lifetime: specifies the lifetime of the cookie in seconds
which is sent to the browser. The value 0 means until the browser is
closed. Defaults to 0.

Also, I thought you could use ini_set to change your php.ini configuration
for your current script.

But I could be wrong... Did I miss read the manual?




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Integer - boundary?

2005-09-07 Thread Shaw, Chris - Accenture

 -Original Message-
 From: Gustav Wiberg [mailto:[EMAIL PROTECTED]


 Hi there!


 What is the boundary for an integer?


 seems to be a easy question, but I can't find it...



 /G
 http://www.varupiraten.se/



According to the manual,


The size of an integer is platform-dependent, although a maximum value of
about two billion is the usual value (that's 32 bits signed). PHP does not
support unsigned integers.





This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Impossible???

2005-09-03 Thread Shaw, Chris - Accenture


 I'm trying to get the computername... :-)

Since your not passing the script any ip address, I presume that the Script
you are trying to run gets the computername of the computer it is run on?
If you got that to work, they only place you could run it is on the server,
thus getting the server computername.

Why don't you use:
nbtstat -A ip address

Then parse the results from that. It should contain the computername of the
computer at that ip address.




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] array merge problem

2005-09-01 Thread Shaw, Chris - Accenture

manual snippets
If you want to completely preserve the arrays and just want to append them to
each other, use the + operator.

?php
$array1 = array();
$array2 = array(1 = data);
$result = $array1 + $array2;
?

The numeric key will be preserved and thus the association remains.

Array
(
[1] = data
)
/manual snippets

Its actually on the same page as array_merge in array functions.

-Original Message-
From: Ahmed Abdel-Aliem [mailto:[EMAIL PROTECTED]
Sent: 01 September 2005 09:43
To: php-general@lists.php.net
Subject: [PHP] array merge problem


*

This e-mail has been received by the Revenue Internet e-mail service.

*

i have the array with the following structure :

Array
(
[19] = 20.00
[25] = 20.00
[7] = 30.00
[17] = 30.00
)

when i merge a field to it using array_merge
it returns that :

Array
(
[0] = 20.00
[1] = 20.00
[2] = 30.00
[3] = 30.00
[4] = 200.00
)

how can i merge the field without losing the original keys ?
can anyone help me with that plz
thanks in advance

--

Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

--

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] PHP MySql Extension No Loading

2005-08-29 Thread Shaw, Chris - Accenture

I thought you had to put the php.ini in the c:\windows directory?

-Original Message-
From: Glen Zimmerman [mailto:[EMAIL PROTECTED]
Sent: 27 August 2005 22:39
To: php-general@lists.php.net
Subject: RE: [PHP] PHP MySql Extension No Loading


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Yes, I have the dll in the right place (C:\php\ext), and PHPIniDir is set to
C:\php where php.ini is located.  I know that php.ini is being picked up,
because the changes I make to the file take affect when I restart Apache.
PHP is loading properly as the php function, phpinfo, does display the proper
information page when I run a test.  I just cannot get php_mysql.dll to load.

I have gone through the PHP installation documentation several times, but it
has not made a difference.

I just don't know what I have over looked. 







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

RE: [PHP] mail()

2005-08-17 Thread Shaw, Chris - Accenture

Can you send to a smtp server provided by your isp?

-Original Message-
From: George B [mailto:[EMAIL PROTECTED]
Sent: 17 August 2005 18:11
To: php-general@lists.php.net
Subject: Re: [PHP] mail()


*

This e-mail has been received by the Revenue Internet e-mail service.

*

John Nichel wrote:
 Jordan Miller wrote:

 Did you install sendmail?


 No sendmail for Windows.  He either has to have a Microsoft MTA running
 on localhost, or use an upstream SMTP account.

There is no Microsoft MTA, I searched google couldnt find anything.
so.
Anyway, im screwed and I cant send mail.
I have a program B1Gmail and its like online mail, but it dosent work
because I dont have a mail server and Im using windows. So I cant do
anything about it right?

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] mail()

2005-08-17 Thread Shaw, Chris - Accenture

snip
yeah I can send to the SMTP server of my ISP, but no where else.
/snip

If you can send to the smtp server then your ISP should deliver the email.

If you have not filled in the sendmail_from var in the php.ini correctly,
they cannot send back a mail saying there was a problem with the delivery.






This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] mail()

2005-08-17 Thread Shaw, Chris - Accenture

snip
Ok guys! It has sent the mail succesfully everywhere! Now one more
thing. How do I make it so I can receive mail? I am using my ISP's POP
server but I dosent send back because my e-mail is [EMAIL PROTECTED] How
do I setup my own domain and does it cost money for an e-mail?
/snip

I suggest you contact your isp or consult a FAQ on your isp website in
setting up your mail client on your machine, they will also tell you what
your *real* email address is.

If you want to set up your own domain, there are plenty of companies on the
web offering this service.

But this isn't php talk and you'll get flamed by the self proclaimed php
police.





This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] one more mysql question

2005-08-15 Thread Shaw, Chris - Accenture

I agree with Sebastian, there is no excuse for being arrogant and rude.
I understand the frustration, but is there any need for some of the replies
people get?

If I can, I will try to help anyone, even if the thread is OT.

C.

-Original Message-
From: John Nichel [mailto:[EMAIL PROTECTED]
Sent: 15 August 2005 14:42
To: PHP Mailing Lists
Subject: Re: [PHP] one more mysql question


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Sebastian wrote:
 they are just grumpy old men i guess..
 it is not like you asked a windows question on a linux list.. i've seen

 stupid html questions here.. yet they get answered.

Not by me.  They'll get the same response from the 'grumpy old men'

group as this topic did.

 i always try to help when i can and if i cant offer help i dont say

 anything because that wasnt the way i was raised. it is rude.

How nice.

 at least if it was too offtopic for the list someone could of just

 nicely said ask on the mysql list but that wasn't case.

It was 'too offtopic'...and he's been around long enough to know that he

should ask MySQL questions on the MySQL list.

 anyway, consider this a done deal as you already received help.

You've got my vote for sainthood.

--

John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]

--

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] code generation

2005-08-04 Thread Shaw, Chris - Accenture

snip
thanx for the responses, i thought of that but wouldn't changing the system
date on your machine be a way of getting around that?
/snip

Time and Date functions are dependent on the locale settings of your server.




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Re: The Naming of Directories

2005-08-04 Thread Shaw, Chris - Accenture

I believe %20 and + are used to replace spaces.

See RFC 1738 - Uniform Resource Locators (URL)

http://www.faqs.org/rfcs/rfc1738.html

C.

-Original Message-
From: Satyam [mailto:[EMAIL PROTECTED]
Sent: 04 August 2005 18:07
To: php-general@lists.php.net
Subject: [PHP] Re: The Naming of Directories


*

This e-mail has been received by the Revenue Internet e-mail service.

*


Mark Rees [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Tom Chubb [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 This may be slightly OT, but I've modified a gallery script that I had
 written for me which reads directories and echos the dir name as a
 gallery.
 Unfortunately, it doesn't look very nice with say picsofsomething so I
 renamed the folder 'pics of something'
 When this is read, the string inserts %20 for the spaces, which is
 fine, but are there any reasons why I shouldn't be doing this?
 Many thanks,

 --

 A while back, this would have been liable to cause problems in Netscape
 (v3/4). I don't think it makes so much difference these days, but I just
 avoid it out of habit. You can get a more readable effect wihout spaces by
 using an underscore, say, in the directory name, and when you need to
 print
 it to screen, replace the underscores with spaces
 --
 Tom
Wasn't the plus sign the replacement for a space?  Pics+of+something is more
readable.

Satyam

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Very Basic question: What IDE/tools I need to begin using PHP?

2005-07-27 Thread Shaw, Chris - Accenture

PHP Designer 2005

http://www.mpsoftware.dk/


-Original Message-
From: Taksam [mailto:[EMAIL PROTECTED]
Sent: 26 July 2005 18:29
To: php-general@lists.php.net
Subject: [PHP] Very Basic question: What IDE/tools I need to begin using
PHP?


*

This e-mail has been received by the Revenue Internet e-mail service.

*




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] php mySql question

2005-07-27 Thread Shaw, Chris - Accenture

Have you tried doing a search for the text php5 in the php.ini file that
sits in your c:\windows folder?

C.

-Original Message-
From: Ned Kotter [mailto:[EMAIL PROTECTED]
Sent: 26 July 2005 04:03
To: php-general@lists.php.net
Subject: [PHP] php mySql question


I have installed php 5.0.4 on my windows 2000, IIS 6.0 server.  PHP works but
when I try to connect to MySQL I get the Fatal error: Call to undefined
function mysql_connect().  I have uncommented the line in the php.ini file
that says 'extension=php_mysql.dll'.  I have path variables set for both
c:\php and c:\php\ext.  One very peculiar thing that I noticed when I ran
phpinfo() is that it shows the extension_dir is set to c:\php5 even though in
my php.ini file it is set to c:\php.  I have a feeling that this is where the
problem exists.  Any advice would be appreciated.

Thanks,
NK


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] MySQL + PHP question

2005-07-26 Thread Shaw, Chris - Accenture

Hello,

Consider this:
tbl_project(id, name, parent)

1 6
   / \   / \
  2   3 7   8
 /\
4  5

if tbl_project.parent = 0 then the project is the top parent.
Therefore, 1 and 6 have the field parent = 0.

So, say if you have project 5, do you want to find out its parent (2), or do
you want to find out all its parents including grandparents (2) and (1)?

What do you need to know?

C.
-Original Message-
From: André Medeiros [mailto:[EMAIL PROTECTED]
Sent: 26 July 2005 12:18
To: php-general@lists.php.net
Subject: [PHP] MySQL + PHP question


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Hi guys.

I'm having some trouble here regarding a project. I have a table with
projects, wich can be recursive (ie. sub-projects) and it is related to
itself.

By making the following query

-8--
SELECT * FROM projects LEFT JOIN projects proj_parent ON
projects.project_parent = proj_parent.parent_id WHERE project_id = 1234
-8--

i need to be able to access to the parent project's fields, but I have a
slight problem here.

First off, I have to make the LEFT JOIN. I don't know if the project can
be parent (therefore not finding a project_id = 0 wouldn't show the row)
and I need to add some kind of prefix to the proj_parent's fields so
that I can access them (or that they can't overwrite the project i'm
getting info on.

Well... there is an obvious sollution here: use an associative array
instead of an object, and access the properties by doing $array[0],
$array[1], etc. By my experience, this is a nightmare, maintenence-wise,
so I'd only use it as a _LAST_ resource.

Does anyone have any experience with this? The answer should be pretty
obvious, but I can't seem to figure it out :(

Thanks in advance.

André

--

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] MySQL + PHP question

2005-07-26 Thread Shaw, Chris - Accenture

Hello,

Well its simply this:

select b.id
from tbl_project a, tbl_project b
where b.id = a.parent
and a.id = 5

This will return the id of project 5 parent, in this case it is 2.
If the query doesn't return any rows then you know the project doesn't have a
parent.

I cannot test it on MySQL, but this query should work on MSSQL and Oracle.

HTH.

C.

-Original Message-
From: André Medeiros [mailto:[EMAIL PROTECTED]
Sent: 26 July 2005 12:53
To: Shaw, Chris - Accenture
Cc: php-general@lists.php.net
Subject: RE: [PHP] MySQL + PHP question


*

This e-mail has been received by the Revenue Internet e-mail service.

*

On Tue, 2005-07-26 at 11:45 +0100, Shaw, Chris - Accenture wrote:
 Hello,


 Consider this:
 tbl_project(id, name, parent)


   1 6
  / \   / \
 2   3 7   8
/\
   4  5


 if tbl_project.parent = 0 then the project is the top parent.
 Therefore, 1 and 6 have the field parent = 0.


 So, say if you have project 5, do you want to find out its parent (2), or
do
 you want to find out all its parents including grandparents (2) and (1)?



I just need to find it's parent. This is part of a permission system i'm
building, and I need to somewhat register the objects in the permission
system so I can manage things easilly from there.

So to sum it up, this is my attempt to save queries :)

 What do you need to know?

Projects can only be parent or children. No more recursiveness than that
(it's possible, but we've implemented business rules that prevent it.)
What I'm trying to do is to add some sort of prefix to the fields
returned by the proj_parent table (wich is the projects table the same,
but with different info, and will overwrite the object's properties).

If not... heck, I'll have to make another query or use the associative
array sollution (wich neither will make me very happy, but that's life).

Thanks for your prompt reply :)



 C.
 -Original Message-
 From: André Medeiros [mailto:[EMAIL PROTECTED]
 Sent: 26 July 2005 12:18
 To: php-general@lists.php.net
 Subject: [PHP] MySQL + PHP question




 *


 This e-mail has been received by the Revenue Internet e-mail service.


 *


 Hi guys.


 I'm having some trouble here regarding a project. I have a table with
 projects, wich can be recursive (ie. sub-projects) and it is related to
 itself.


 By making the following query


 -8--
 SELECT * FROM projects LEFT JOIN projects proj_parent ON
 projects.project_parent = proj_parent.parent_id WHERE project_id = 1234
 -8--


 i need to be able to access to the parent project's fields, but I have a
 slight problem here.


 First off, I have to make the LEFT JOIN. I don't know if the project can
 be parent (therefore not finding a project_id = 0 wouldn't show the row)
 and I need to add some kind of prefix to the proj_parent's fields so
 that I can access them (or that they can't overwrite the project i'm
 getting info on.


 Well... there is an obvious sollution here: use an associative array
 instead of an object, and access the properties by doing $array[0],
 $array[1], etc. By my experience, this is a nightmare, maintenence-wise,
 so I'd only use it as a _LAST_ resource.


 Does anyone have any experience with this? The answer should be pretty
 obvious, but I can't seem to figure it out :(


 Thanks in advance.


 André


 --


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










 


 This message has been delivered to the Internet by the Revenue Internet
e-mail service


 *







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] MySQL + PHP question

2005-07-26 Thread Shaw, Chris - Accenture

Yeah I understand what he wants, but the problem boils down to the project
with no parent.

The only thing I can suggest is if you have a dummy row in, so the top
parent row, (1) or (6) in my example with have the dummy as its parent.

Then using:

select b.id parentID, b.name parentName, a.id childID, b.name childName
from tbl_project a, tbl_project b
where b.id = a.parent
and a.id = 1

Should give a row of:

ParentID: 0
ParentName: Dummy
ChildID: 1
ChildName: Project One

So, if a Project has a parent that the name is called Dummy, then you know it
doesn't have a parent.

HTH.

C.

-Original Message-
From: Mark Rees [mailto:[EMAIL PROTECTED]
Sent: 26 July 2005 13:39
To: php-general@lists.php.net
Subject: Re: [PHP] MySQL + PHP question


*

This e-mail has been received by the Revenue Internet e-mail service.

*

André Medeiros [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 One thing I didn't quite explain myself well... I'm building this to
 register objects on a permission system.

 The SQL weight is heavy as it is, and I want to save queries as much as
 possible. Making two queries to extract information about a project and
 it's parent is not something I'd want to do. I know recursiveness, but
 thanks for the pointers and for the reply :)

 Best regards

I must admit I still don't really get what you are looking for. Does this
query help?

select c.field1 AS childfield1,
c.field2 AS childfield2,
(etc)
p.field1 AS parentfield1,
p.field2 AS parentfield2,
(etc)
FROM
child AS c
LEFT JOIN
parent AS p
ON c.parent=p.id

?

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] how to post a question?

2005-07-22 Thread Shaw, Chris - Accenture

Posting a question on how to post a question.

:)

-Original Message-
From: Chirantan Ghosh [mailto:[EMAIL PROTECTED]
Sent: 22 July 2005 14:56
To: php-general@lists.php.net
Subject: [PHP] how to post a question?


*

This e-mail has been received by the Revenue Internet e-mail service.

*




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] objects destroyed in same order as created?

2005-07-21 Thread Shaw, Chris - Accenture

Jasper,

I would have thought php would have called the destructors on each of the
classes in a LIFO fashion, but if it doesn't, just use unset() as a
workaround, where you can remove the classes in the order you want.

C.

-Original Message-
From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED]
Sent: 21 July 2005 05:45
To: php-general@lists.php.net
Subject: [PHP] objects destroyed in same order as created?


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Hi all

I am currently working on a PHP 5 application. For the sake of 
simplicity, I'll only describe 3 classes here, as that is all that is 
required for you to see my problem.

I have a DB class that interacts with the database, a Session class that 
controls the session with the user, and a User class that stores the 
information about the logged-in user.

I create instances of these classes in the order [DB, Session, User] at 
request startup. They have to be in this order as the Session and User 
classes need the database, and the User class needs the session.

The User and Session destructors both need the database to write any 
changed information back to the database, but it seems that the 
destructors are called in the order that the objects are created, so the 
database is taken down first.

Wouldn't it make more sense for just about all applications to destroy 
objects in the reverse order that they were created? Is there any way to 
work around this?

Jasper

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






This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*


RE: [PHP] My Project

2005-07-20 Thread Shaw, Chris - Accenture

snip
Honestly, the best book I read when I was starting out, and one I've
been using ever since, is the manual. I actually spent $ on a very good
php book but I think I've only cracked the cover on it once or twice in
two years.

Way to go manual guys! :D
/snip

I totally agree, I have only used the .chm manual to learn php, but I have a
programming background, C/C++, VB, Java, OpenROAD, C#.
If you're new to this programming game, then probably a *decent* book will
give you a good start.

Thumbs up to the manual guys. :)

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Combining recordsets

2005-07-20 Thread Shaw, Chris - Accenture

Mike,

I recommend redesigning your query, the database can pull back the records
you want far quicker than any frontend combining/processing, since that's
what T-SQL and relational database were designed for.

I might be able to help you with the SQL, but I am a little rusty, not really
used it in 8 months. Maybe a MS-SQL/T-SQL forum will be able to help you with
optimising your query to get what you need, they are usually very helpful.

hth

C.



-Original Message-
From: Mike Smith [mailto:[EMAIL PROTECTED]
Sent: 20 July 2005 17:39
To: php-general@lists.php.net
Subject: [PHP] Combining recordsets


*

This e-mail has been received by the Revenue Internet e-mail service.

*

I'm wondering if someone has a better solution then I've come up with.
I've got a few reports that pull from various tables. Some times I'm
not able to put all the tables into a single query/view. So I end up
with a master query and 1 (or more) supporting queries. I'm using
MSSQL 2000/IIS/PHP4/ADODB. This may be my own weakness in designing a
query, I'm willing to learn if it is. So I've ended up doing things
like:

function formula($part,$array){
//imagine a formula to calculate weeks in pipe for a part
foreach($array AS $val){
if($val[0]==$part){
$qty = $val[1];
}
}
return $qty;
}


$q1 = SELECT part, fcast FROM parts;
$rs1 = $conn-Execute($s);
$rs1_arr = $rs1-GetArray();


$q2 = SELECT part, qty FROM pos;
$rs2 = $conn-Execute($s);
$rs2_arr = $rs2-GetArray();

foreach($rs1_arr AS $data){
echo Part: .$data[0];
echo Forecast: .$data[1];
echo POs: .formula($data[0],$rs2_arr);
}

This is not a wonderful example, because I could LEFT JOIN pos to
parts. But I have more complex queries that have several INNER/LEFT
joins that once I bring in that last table to complete my query it
(the last table) skews my sums. Really I'm just wondering if others
have come across

--
Mike

--

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Question about apache-php concurrent process control

2005-07-19 Thread Shaw, Chris - Accenture

snipIt seems Rasmus is famous, and I should have shown my respect./snip

history src = 'php_manual_en.chm'
PHP succeeds an older product, named PHP/FI. PHP/FI was created by Rasmus
Lerdorf in 1995, initially as a simple set of Perl scripts for tracking
accesses to his online resume. He named this set of scripts 'Personal Home
Page Tools'. As more functionality was required, Rasmus wrote a much larger C
implementation, which was able to communicate with databases, and enabled
users to develop simple dynamic Web applications. Rasmus chose to release the
source code for PHP/FI for everybody to see, so that anybody can use it, as
well as fix bugs in it and improve the code. /history




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] My Project

2005-07-19 Thread Shaw, Chris - Accenture

Taxi for one..

-Original Message-
From: George B [mailto:[EMAIL PROTECTED]
Sent: 19 July 2005 17:39
To: php-general@lists.php.net
Subject: [PHP] My Project


Hey guys! This is gona be one of my last questions (hopefully) But here
I will include all the info about my new project.
It is going to be like a RPG Game written in PHP. There is going to be a
store where you could buy weapons etc... The thing I want to ask you
guys is this. Lets say There is a knife i want to buy. It costs 10
points. And I have 100 points. How would I make it so when I click BUY!!
My money automaticaly subtracts from 100 to 90. How do I do that?

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] How to run .sql files using php

2005-07-13 Thread Shaw, Chris - Accenture

Can you use mysqli_multi_query for mysql in php5?

hth

-Original Message-
From: babu [mailto:[EMAIL PROTECTED]
Sent: 13 July 2005 16:39
To: php-general@lists.php.net
Subject: [PHP] How to run .sql files using php


Hi ,

i have a set of queries which i have placed them in one .sql file.i want to
run this file using php's mssql and  oracle(oci) functions.
any idea pls.

thanks.
babu



-
How much free photo storage do you get? Store your holiday snaps for FREE
with Yahoo! Photos. Get Yahoo! Photos




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Question to eregi Syntax

2005-07-07 Thread Shaw, Chris - Accenture

Do a search on the php website or the php offline manual for Pattern Syntax

-Original Message-
From: janbro [mailto:[EMAIL PROTECTED]
Sent: 07 July 2005 15:30
To: php-general@lists.php.net
Subject: [PHP] Question to eregi Syntax


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Hi List,
my research hasn't turned anything useful up.
Probably 'cause I don't have enough info.
I've been playing around with the ereg function.
What I was wondering is what is the ^ for like
in the below example?
ereg('[^[:space:]a-zA-Z0-9_.-]{1,}', $name)

thx
janbro

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Files

2005-06-28 Thread Shaw, Chris - Accenture

Hello,

I am not sure what problems you are having, but

Shouldn't the id's in the files match up?

So,

File1:
1, test@test.com
2, [EMAIL PROTECTED]
3, [EMAIL PROTECTED]

File2:
1, doc1.doc
2, doc2.doc
3, doc3.doc


Also, where you are comparing the $groupid to the $id, shouldn't it be:

if($groupid == $id)

hth

Chris.

-Original Message-
From: Chris Grigor [mailto:[EMAIL PROTECTED]
Sent: 28 June 2005 11:24
To: PHP General
Subject: [PHP] Files


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Hey all,

I am having a bash at working with flat files.

What I am trying to achieve is the following

There are 2 files with info in them,

file1 has
id,email

and file2 has

id,filename

what I am trying to achieve is open up file1 get the id and email then
open file2 and match the id of file1 to id of file2, then if succesful
send a mail with the filename in file2.

Maybe have a look at the code...

$recp_list = fopen(mail_group_list.txt, r);

while(!feof($recp_list))
{


$line = fgets($recp_list, 255);
  

$line = chop($line);


$split = explode(,, $line);


$id = $split[0];
$email = $split[1];


// time to mail.

if ($email != ) {





$group_list = fopen(file_group_list.txt, r);

while(!feof($group_list))
{
$groupline = fgets($group_list, 255);

$groupline = chop($groupline);

$groupsplit = explode(,, $groupline);

$groupid = $groupsplit[0];
$groupFileName = $groupsplit[1];

if($groupid = $id)
{



// start mailing
$fromname = Test Mailer;
$fromaddress = [EMAIL PROTECTED];

$subject = Test mail;
$message = Test message $groupFileName;
$headers = From: \.$fromname.\ .$fromaddress.\n;
 

   // Notify the user on screen if the send was succesfull
   if(mail($email, $subject, $message, $headers))

{

print Mail sent successfully to $email;
}
else
{
print Mail not sent to $email;
}




}#end if groupid = id
}#end while group list
}#end if email


}#end while email !=
?


So thats the mail.php

mail_list_group.txt looks like this


1,test@test.com
5,[EMAIL PROTECTED]
7,test@test.com

file_group_list.txt looks like this


2,filename1.doc
3,filename2.doc
4,filename3.doc

Any help on this would be great !

Cheers
Chris

PS the formatting might come out all wrong as its mailed from a web account.
--


-
---
Anyone can give up smoking, but it takes a man to face cancer.

--

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] looking for a pure startup opportunity..

2005-06-28 Thread Shaw, Chris - Accenture

Why don't you go join one of the many Think Tanks on the net, where you can
form an idea, let people join in and help the idea progress. Then you can
make the idea into a well executed plan. You might find that VC's scan these
webpages, looking for one that is ready to get funding.


-Original Message-
From: Jason Barnett [mailto:[EMAIL PROTECTED]
Sent: 28 June 2005 14:16
To: php-general@lists.php.net
Subject: Re: [PHP] looking for a pure startup opportunity..


*

This e-mail has been received by the Revenue Internet e-mail service.

*

OK, let me put this another way... while trying to remain polite.  Let's
suppose that I am an unknown (to you) member of this list and I have
this great idea that I want to develop.  My idea is a great one and it's
going to make millions.  Now since I'm the one that had the idea I think
it's pretty easy for me to go find 3 friends of mine (people that I
know/trust/live close to me) that have the requisite skills.  After all,
it's not like most programmers go hanging out with Hollywood
celebrities.  ;)  If I really believed that my idea was so hot then I
probably wouldn't be waiting around for someone on this mailing list,
I'd just get started doing it.

true_story
Back about two years ago I was subscribed to this newsgroup with my
email address from college.  Back then I was just doing what I do now...
answering PHP questions while I work.  Except that I answered a lot more
questions then because, well, I was in school still.  :)  I don't
remember exactly how many I answered, but you can check out the marcives
if you really want.

Anyhow, after doing this for about a year I apparently caught someone's
attention.  I received an email from
insert_name_of_big-shot-venture-capitalist-here / telling me that he
had capital to give me if I had an idea that I wanted to develop.  I
politely declined, but I told him I would get back to him if a superb
idea came my way...
/true_story

I have always felt that getting the financing is the easy part.
Besides, if your goal is to get $millions in funding then you're looking
at it all wrong.  The goal is to make profit... and loads of it.  If it
just so happens that you need a lot of funding to make that happen, then
you can go get it.  If you have killer idea(s), then you are better off
mocking up a prototype and networking with some people that can get you
financing.

You always have to make a profit.

You always have to make a profit.  At least, if you plan on doing
anything that's going to catch the attention of some VC's.  ;)

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: Re[2]: [PHP] looking for a pure startup opportunity..OT

2005-06-28 Thread Shaw, Chris - Accenture

snip
Bruce I am not trying to be a hard-ass here, I was just pointing out
that the style in which the original message was delivered had a little
smell to it, IYKWIM.
/snip

I thought that, but I kinda over-looked/ignored it and carried on reading.




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] array_diff php version

2005-06-27 Thread Shaw, Chris - Accenture

As far as I can see in the Help File, Array_Diff was introduced in 4.0.1 and
should be in the version you are using.

Does it not work?


-Original Message-
From: André Le Tissier [mailto:[EMAIL PROTECTED]
Sent: 26 June 2005 10:20
To: php-general@lists.php.net
Subject: [PHP] array_diff php version


Help! Array_diff is the perfect function for what I am try to do but I have
a php version 4.1.5. Is there any replacement I can use to achieve the same
result



Many thanks,



André Le Tissier








This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] fopen problem

2005-06-24 Thread Shaw, Chris - Accenture

Are you using the a or a+ modes on fopen, because I have a sneaky feeling the
file doesn't exist.

-Original Message-
From: Ross [mailto:[EMAIL PROTECTED]
Sent: 24 June 2005 00:33
To: php-general@lists.php.net
Subject: [PHP] fopen problem


*

This e-mail has been received by the Revenue Internet e-mail service.

*

I have a bit of a problem when using fopen, fwrite and fclose locally I get
the flowing warnings

Warning: fopen(counterlog.txt) [function.fopen]: failed to open stream:
Permission denied in c:\Inetpub\wwwroot\pillars\index.php on line 30

Warning: fwrite(): supplied argument is not a valid stream resource in
c:\Inetpub\wwwroot\pillars\index.php on line 33

Warning: fclose(): supplied argument is not a valid stream resource in
c:\Inetpub\wwwroot\pillars\index.php on line 36


Any ideas??


R.

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Re: security question...??

2005-06-21 Thread Shaw, Chris - Accenture

(thus Philip Zimmermann got arrested for violating the weapons law when he
created PGP)

I thought he got arrested because he exported PGP out of the US, not because
he created it.
He was told that PGP could not leave the US via any electronical form,
compiled or uncompiled, because of the encryption level. He didn't break that
condition and got it out via a book and someone outside the US scanned in the
book and compiled the source code, but they arrested him anyhow.

Probably some urban myth that I heard somewhere.

As for the browser topic, you cannot control what the client browser is, or
whether it has any naughty plugins. The responsibility is on the user, once
the data has left the server via HTTP.

Didn't the UK banks try to implement something like that for the online
banking, you could only use Internet Explorer, which sparked a debate in the
Linux/Unix world. This was easily spoofed.

-Original Message-
From: Rene Brehmer [mailto:[EMAIL PROTECTED]
Sent: 21 June 2005 09:12
To: php-general@lists.php.net
Subject: Re: [PHP] Re: security question...??


*

This e-mail has been received by the Revenue Internet e-mail service.

*

However secure you try to make a web application, even with encryption, it
still does not hinder anyone from putting a packet sniffer on your client
and grab whatever sensitive information you send out.

And if a hacker really wanted to get hold of your sensitive information, he
wouldn't actually have to use a typical browser or anything similar to do
it, nor is it likely he would. There's nothing to hinder for talking to
your HTTP server using manually entered commands in a telnet client.

My information 'bout the US approach to encryption may be a little out of
date, but for the longest, using anything stronger than 40 bit encryption
was illegal, unless the CIA knew the extra bits above 40 (thus Philip
Zimmermann got arrested for violating the weapons law when he created PGP).
All that mess did change something, but there's still limitations to what
you can do in regards to encryption, that don't exist in any other country.
9/11 didn't exactly help that in any way.

But nevertheless, for every way you can come up with ensuring that your
client is using a secure application, there's atleast as many ways to make
a program that fools your tests, and then you're back to where you came
from. The thing I said about where your responsibility ends, is simply that
when you tell a client to use this and that software to access the data in
your remote application, then you can't really prevent them from using
software that they think is right, but isn't. There is no reliable way,
with current technologies, of determining whether or not a client's
software is what it says it is or not. I think it falls under implicit
trust ...

It reminds me of those websites that checks for the version of your
browser, and refuses to work if you don't have one they like, that falls
completely short when you visit them with Firefox because it has Mozilla
and ver. 1 in its ID string, and the sites think it's a Netscape 1 ...
point being that you can't blindly trust what the client software tells you
... I don't honestly see any way of doing what you want, without also being
able to see how it can be fooled...


Rene

Documented research indicate that on Mon, 20 Jun 2005 17:50:25 -0700,
bruce wrote:

 rene..

 from my perspective, i strongly disagree...

 if you're going to be writing apps that deal with sensitive information,
you
 better damm well give some thought as to how secure the client is, or even
 if the client is actually valid!

 while i'm not precisely sure as to how you'd go about ensuring that the
 client is indeed real/valid, and not faked, there are some reasonable
 approaches that the vendor/manufacturer could take, or make available that
 could go a good way towards satisfying the issue somewhat...

 and creating a secure client/server connection that only the two parties
 (server/client) can listen to is not illegal in the US.. i'm not sure where
 you get your information..

 but my point was not regarding tha actual communicatino pipe/wire. there
are
 already methods of securing the wire conversation betwen the server/client.
 i'm concerned with being reasonably sure that the client i'm talking to is
 indeed a valid/real client. IE, if it identifies itself as IE, then it
 actually is IE, and not some spoofed app, that acts like IE, that might be
 sending data to who knows where...

 -bruce

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Re: resetting arrays

2005-06-21 Thread Shaw, Chris - Accenture

Use !==

if (array_search($basket, $baskitems) !== FALSE) {
$pos = array_search($basket, $baskitems);
unset($ses_basket_items[$pos]); $ses_basket_items  =
array_values($ses_basket_items) ;

-Original Message-
From: I. Gray [mailto:[EMAIL PROTECTED]
Sent: 21 June 2005 14:21
To: php-general@lists.php.net
Subject: [PHP] Re: resetting arrays


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Thanks Al,

That's done it!

unset($ses_basket_items[$pos]); $ses_basket_items  =
array_values($ses_basket_items) ;

They aren't big arrays so I suppose I shouldn't worry about exceeding
memory limits -
http://uk2.php.net/manual/en/function.array-values.php#36837  ?

My only problem now is that I can't seem to delete the first value of
the array.

$basket is the item I want to delete from the array $baskitems

if (array_search($basket, $baskitems) != FALSE) {
$pos = array_search($basket, $baskitems);
unset($ses_basket_items[$pos]); $ses_basket_items  =
array_values($ses_basket_items) ;
}





Al wrote:
 I. Gray wrote:

 Hi.

 I am sure this is easy, but I can't get this work.  Is there not a php
 function that can do this?

 I have an array- for example...
 [1] = Yellow
 [2] = Green
 [3] = Purple
 [4] = Blue
 [5] = Red
 [6] = Orange
 [7] = Cyan

 What happens, say if I delete [3] = Purple?  I get...

 [1] = Yellow
 [2] = Green
 [4] = Blue
 [5] = Red
 [6] = Orange
 [7] = Cyan

 But what if I want to reset the numbers? Like...

 [1] = Yellow
 [2] = Green
 [3] = Blue
 [4] = Red
 [5] = Orange
 [6] = Cyan

 I've tried this...

 unset($ses_basket_items[$pos]); for ($ii=0;
 $iicount($ses_basket_items); $ii++) {if
 (isset($ses_basket_items[$ii])) {$cc++; $arry_a[$cc] =
 $ses_basket_items[$ii]; }} $ses_basket_items = $arry_a;

 where $pos is the position of the array I want to get rid of.
 $ses_basket_items is session variable, does that matter?

 Please help.


 array_values()

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Re: security question...??

2005-06-21 Thread Shaw, Chris - Accenture

You could always use a IE exploit to crash the browser, if they are still
requesting, you know they are not IE. ;)

Out of interest, what information are you planning on getting from the
browser?

Why can you not use certificates?

-Original Message-
From: bruce [mailto:[EMAIL PROTECTED]
Sent: 21 June 2005 16:06
To: 'Rory Browne'; 'Matthew Weier O'Phinney'
Cc: php-general@lists.php.net
Subject: RE: [PHP] Re: security question...??


*

This e-mail has been received by the Revenue Internet e-mail service.

*

if i'm the server app, and you tell me that you're IE, v.6, i'd like the
ability to somehow be able to gather information from you, such that i can
then check with msoft to see if your answers match what msoft claims the
answers should be. if you give wrong answers, i can then make a
determination as to whether i want to talk with you, or perhaps limit the
amount/type of information i allow you to access...

this kind of approach goes beyond the 'user/access string' and can actually
get to be rather difficult to spoof, or to break...

keep in mind, this is an off the top suggestion, i'm sure if someone spent
some time, there could be solutions that would be robust, doable, and
reasonably secure...

-bruce


-Original Message-
From: Rory Browne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 21, 2005 7:39 AM
To: Matthew Weier O'Phinney
Cc: php-general@lists.php.net
Subject: Re: [PHP] Re: security question...??


On 6/21/05, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote:
 * david forums [EMAIL PROTECTED]:
  Why don't you try to get interactivity with ID machin which is unique,
or
  with mac address.

 MAC address wouldn't work if the user is behind a proxy.
I think you mean IP addresses. MAC's won't work if the user is behind
a router - which they generally are, unless you're on the same network
- ie on an Intranet, and even then...




 --
 Matthew Weier O'Phinney   | WEBSITES:
 Webmaster and IT Specialist   | http://www.garden.org
 National Gardening Association| http://www.kidsgardening.com
 802-863-5251 x156 | http://nationalgardenmonth.org
 mailto:[EMAIL PROTECTED] | http://vermontbotanical.org

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] newbie error message i don't understand....please help

2005-06-08 Thread Shaw, Chris - Accenture

Greg,

Have you enabled the MySQL extensions in the php.ini file and made sure the
extension path in the php.ini file is correctly pointing to the right
directory? eg c:\php\ext or c:\php\extension.

I believe phpninfo() has a section for MySQL if it is enabled.

hth.

Chris.



-Original Message-
From: Greg M. Price [mailto:[EMAIL PROTECTED]
Sent: 08 June 2005 16:56
To: php-general@lists.php.net
Subject: Re: [PHP] newbie error message i don't understandplease
help


*

This e-mail has been received by the Revenue Internet e-mail service.

*

The final product here is to install Nucleus blog software
(http://nucleuscms.org/) on a windows 2003 servermy IT consultant is
having a problem getting PHP to see mysql  both of those programs are
required to make nucleus work.  it's really frustrating for him ( me).


Richard Davey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hello Greg,

 Wednesday, June 8, 2005, 3:58:03 PM, you wrote:

 GMP Please help - I got  Error message:
 GMP Your PHP version does not have support for MySQL

 GMP when I did http://x.x.x.x/install.php on windows 2003 with Php 5.04
 and
 GMP MySQL 5.0.

 Possibly you don't have MySQL support enabled in PHP? What exactly are
 you installing? This isn't a standard PHP error message, so it must be
 coming from that application.

 Best regards,

 Richard Davey
 --
 http://www.launchcode.co.uk - PHP Development Services
 I do not fear computers. I fear the lack of them. - Isaac Asimov

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Accessing DLL from PHP

2005-06-03 Thread Shaw, Chris - Accenture

If the ffi route doesn't work, just create a COM wrapper for the simple DLL,
then you can map any functions you need.

-Original Message-
From: Rory McKinley [mailto:[EMAIL PROTECTED]
Sent: 03 June 2005 11:17
To: php-general@lists.php.net
Cc: Rory Browne
Subject: Re: [PHP] Accessing DLL from PHP


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Rory Browne wrote:
snip
snip
 Just bare in mind, that I've never used ffi, and it's still alpha
 code, and I'm not taking any blame it causes your dog to
 explode.
snip

That's ok, I am sure there is no chance...rover, rover,what's the matter
 boy? (Sound of dog exploding)
No. ;)

Don't worry I am only planning on using it to generate other data on a
dev box - so about the extreme worst that is going to happen is I have
to reload the dev box - and anyway, what's life without a bit of adventure?

Will let you know how it works out - only catch is I may have to dig
through my library to find the book on C that I never read ;) for some
of the syntax

Rory (the other one)

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Shaw, Chris - Accenture

Thomas,

If you're inserting alot of rows, (eg millions) then concating them and
calling the db once probably would give a small speed advantage, because of
the database handshaking.
But I would look at the load the database is under, if there is alot of users
hitting the database with small inserts/queries then the database is going to
suffer as opposed to the same number of users hitting the database once with
a script.

The only problem I can think of, from php (client) point of view, if the
script (concated inserts) errors, then you will need to handle where it went
wrong, if it was loop, you know exactly what went wrong by outputing the
current insert statement.

C.

-Original Message-
From: Thomas [mailto:[EMAIL PROTECTED]
Sent: 02 June 2005 10:20
To: php-general@lists.php.net
Subject: [PHP] Multiple inserts as a single string?


Hi there,



I have a bit of strange question: when wanting to insert multiple records
into the db, instead of looping through the set and executing mysql_query
(which will then call the db n times), is it not better to concat a string
with all the insert statements and let mysql handle the inserting, that way
we don't call the db n times from php. Does that make any difference?

Maybe I am just stupid .



Thomas






This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Shaw, Chris - Accenture

Thomas,

I am not sure what database you are using, but there was a previous email
thread about using execQuery($concatstring) for mySQL, which apparently
worked. Make sure that your insert statements end with the standard line
terminator character, usually ';'.

Personally, I would output the statements to a file, then use the cmd line
function for executing .sql files for that database. You could execute this
from php by using the shell_exec function. This is so I could look at the
executed sql file and find where the error is, I'm not a big fan of debugging
in php.

C.

-Original Message-
From: Thomas [mailto:[EMAIL PROTECTED]
Sent: 02 June 2005 12:20
To: Shaw, Chris - Accenture
Cc: php-general@lists.php.net
Subject: RE: [PHP] Multiple inserts as a single string?


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Hi Chris,

Thanks, I thought so. You are quite right with the errors, I ran into some
where it looked like that php does not allow you to execute such a concated
string ... the error started at the second insert statement with no apparent
reason. Is that a ph restriction?

Thomas

-Original Message-
From: Shaw, Chris - Accenture [mailto:[EMAIL PROTECTED]
Sent: 02 June 2005 12:20 PM
To: Thomas; php-general@lists.php.net
Subject: RE: [PHP] Multiple inserts as a single string?


Thomas,


If you're inserting alot of rows, (eg millions) then concating them and
calling the db once probably would give a small speed advantage, because of
the database handshaking.
But I would look at the load the database is under, if there is alot of
users
hitting the database with small inserts/queries then the database is going
to
suffer as opposed to the same number of users hitting the database once with
a script.

The only problem I can think of, from php (client) point of view, if the
script (concated inserts) errors, then you will need to handle where it went
wrong, if it was loop, you know exactly what went wrong by outputing the
current insert statement.

C.

-Original Message-
From: Thomas [mailto:[EMAIL PROTECTED]
Sent: 02 June 2005 10:20
To: php-general@lists.php.net
Subject: [PHP] Multiple inserts as a single string?


Hi there,




I have a bit of strange question: when wanting to insert multiple records
into the db, instead of looping through the set and executing mysql_query
(which will then call the db n times), is it not better to concat a string
with all the insert statements and let mysql handle the inserting, that way
we don't call the db n times from php. Does that make any difference?

Maybe I am just stupid .




Thomas






This message has been delivered to the Internet by the Revenue Internet
e-mail service

*

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Can't Get PHP to work

2005-05-30 Thread Shaw, Chris - Accenture

Morning,

Check the extension path in the php.ini file in your c:\winnt directory.
I can remember that I had to change that when setting up php5 because the
directory was c:\php\extension and the path in the php.ini was c:\php\ext.

hth

C.

-Original Message-
From: Subscriber [mailto:[EMAIL PROTECTED]
Sent: 30 May 2005 00:30
To: php-general@lists.php.net
Subject: [PHP] Can't Get PHP to work


Hi,

I sure hope someone here can help me.  I spent the entire day yesterday
and most of the evening setting up a webserver on my Windows 2000 Pro
system. 

I've got PHP 5.04, MySQL 4.1.12, ActivePerl 5.8.6, Java Runtime
Environment, Tomcat 5.5.9, ZendOptimizer 2.5.10, MyODBC 3.5.11 and
phpMyAdmin 2.6.2 all installed.

 From what I can tell, all is working well except PHP and phpMyAdmin.

I added PHP to my path like this:

C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:
\php;C:\Apache2\bin;C:\mysql\bin;C:\php\dlls;C:\Program
Files\Common Files\Ulead Systems\MPEG;C:\Program Files\Zone
Labs\ZoneAlarm\MailFrontier

I've got a copy of php.ini in both my c:/php directory and in
c://winnt.  I've listed my user directory as c:/apache/apache2/htdocs
and I've placed phpmyadmin in htdocs.

But when I try to view a php page I get an error or page cannot be
displayed.  On a couple of occassions I viewed the raw php data in my
browser.

Also, when I try to add a php extension using LoadModule in my
httd.conf file I get an error loading Apache telling me that the file
cannot be found (but I've verified it exists - like php5apache.dll and
php5ts.dll).

Can someone please help me figure out where I'm screwing up at?

Thanks in advance!

Edited to say I'm getting Closer!!!

Now when I go to
[url=http://localhost/phpmyadmin]http://localhost/phpmyadmin[/url] I get
the following info:

cannot load mysqli extension;
please check PHP configuration
[u]Documentation[/u]

And the documentation says:
[b][1.20] I receive the error cannot load MySQL extension, please check
PHP Configuration. [/b]To connect to a MySQL server, PHP needs a set of
MySQL functions called MySQL extension. This extension may be part of
the PHP distribution (compiled-in), otherwise it needs to be loaded
dynamically. Its name is probably mysql.so or php_mysql.dll. phpMyAdmin
tried to load the extension but failed.

Usually, the problem is solved by installing a software package called
PHP-MySQL or something similar.

I have tried using both mysql and mysqli in config.inc.php (phpmyadmin
config file) and either way I get the same error message.  And in
php.ini I have enabled the following extensions:

extension=php_mysql.dll
extension=php_mysqli.dll





This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Problems with multiple arrays

2005-05-23 Thread Shaw, Chris - Accenture

Try this:

?php
$array_ids = array('id_1', 'id_2', 'id_3', 'id_4');
$array_names = array('name_1', 'name_2', 'name_3', 'name_4');
$array_emails = array('email_1', 'email_2', 'email_3', 'email_4');

$full_data [] = $array_ids;
$full_data [] = $array_names;
$full_data [] = $array_emails;

foreach ($full_data as $key = $value)
{
  echo $full_data[0][$key], ' - ', $full_data[1][$key], ' - ',
$full_data[2][$key], ' br';
}
?

Result:

id_1 - name_1 - email_1
id_2 - name_2 - email_2
id_3 - name_3 - email_3


I am sure someone that has been doing php for more than 2 weeks can better
that code. I am still a learner in php magic functions. ;)

C.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 23 May 2005 14:48
To: php-general@lists.php.net
Subject: [PHP] Problems with multiple arrays

Hi all,

I have 3 arrays:

$array _ids   = (id_1, id_2, id_3, id_4)

$array_names  = (name_1, name_2, name_3, name_4)

$array_emails = (email_1, email_2, email_3, email_4)

I want to create an array that contains all this arrays and then to print the
array.

Something like that:

   foreach ($full_data as $key = $value)
{

 echo $valuebr;
 }

and the result must be:

  id_1 - name_1 - email_1
  id_2 - name_2 - email_2
  id_3 - name_3 - email_3
  id_4 - name_4 - email_4



Any help would be appreciated !!!




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Problems with multiple arrays

2005-05-23 Thread Shaw, Chris - Accenture

Sorry, sent the wrong code.

?php
$array_ids = array('id_1', 'id_2', 'id_3', 'id_4');
$array_names = array('name_1', 'name_2', 'name_3', 'name_4');
$array_emails = array('email_1', 'email_2', 'email_3', 'email_4');

$full_data [] = $array_ids;
$full_data [] = $array_names;
$full_data [] = $array_emails;

foreach ($full_data[0] as $key = $value)
{
  echo $full_data[0][$key], ' - ', $full_data[1][$key], ' - ',
$full_data[2][$key], ' br';
}
?

Result:

id_1 - name_1 - email_1
id_2 - name_2 - email_2
id_3 - name_3 - email_3
id_4 - name_4 - email_4




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] Add to array problem

2005-05-16 Thread Shaw, Chris - Accenture

Hello,

$items=array();

Sets $items to an array with nothing in, so if you had anything in there
previously, its gone.

Here is the example from the help file.

?php
$stack = array(orange, banana);
array_push($stack, apple, raspberry);
print_r($stack);
?

Array
(
[0] = orange
[1] = banana
[2] = apple
[3] = raspberry
)

Chris.

-Original Message-
From: mayo [mailto:[EMAIL PROTECTED]
Sent: 16 May 2005 15:26
To: php
Subject: [PHP] Add to array problem


I'm having a little problem adding to an array. Each time I add to an
array it wipes what was previously added. I'm using array_push().

$items=array();
$items=array_push($items, $_POST[whatever]);

I'm missing something easy.

thx






This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



[PHP] Problem with extending classes.

2005-05-13 Thread Shaw, Chris - Accenture

Hello,

Been playing around with classes in php5, extending a base class and using a
constructor etc..

But I seem to have a problem with getting the variables outside the class.
In test1.txt, I cannot anything when I access the public variables for the
class.

In test2, when I make $contact into $contactcontact, I get the values for the
variables, but it looks like all the variables in that class reference
$contactcontact when you try to access them outside the class.

Have I missed something or is there bugs with extending classes in php5?
Does this happen in php4.3?

Thanks for any help.

Chris.

 test1.txt  test2.txt




This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*?php

class baseclass
{
public $name;
public $contact;
  
  function ksplit($text)
  {
echo br\nInside ksplit::;
$array = explode(':',$text);
echo $text,  - , $array[1];
return $array[1];
  }
}

class extendedclass extends baseclass
{
public $address;

function extendedclass($name, $contact, $address)
{
echo Extendedclass Entrybr\n;
echo $name,  - , $contact,  br\n, $address;
$this-$name = $this-ksplit($name);
$this-$contact = $this-ksplit($contact);
$this-$address = $this-ksplit($address);
echo br\nExtendedclass Exitbr\n;
echo $this-$name,  - , $this-$contact,  br\n, $this-$address;
}
}

$myclass = new extendedclass(Name:Bob, Contact:123456789, 
Address:abcdefghijklmnopqrstuvwxyz);

echo br\nOutside Classbr\n;
echo $myclass-$name,  - , $myclass-$contact,  br\n, $myclass-$address;

?

-HTML RESULTS---

Extendedclass Entry
Name:Bob - Contact:123456789 
Address:abcdefghijklmnopqrstuvwxyz
Inside ksplit::Name:Bob - Bob
Inside ksplit::Contact:123456789 - 123456789
Inside ksplit::Address:abcdefghijklmnopqrstuvwxyz - abcdefghijklmnopqrstuvwxyz
Extendedclass Exit
Bob - 123456789 
abcdefghijklmnopqrstuvwxyz
Outside Class
- 

?php

class baseclass
{
public $name;
public $contactcontact;
  
  function ksplit($text)
  {
echo br\nInside ksplit::;
$array = explode(':',$text);
echo $text,  - , $array[1];
return $array[1];
  }
}

class extendedclass extends baseclass
{
public $address;

function extendedclass($name, $contact, $address)
{
echo Extendedclass Entrybr\n;
echo $name,  - , $contact,  br\n, $address;
$this-$name = $this-ksplit($name);
$this-$contactcontact = $this-ksplit($contact);
$this-$address = $this-ksplit($address);
echo br\nExtendedclass Exitbr\n;
echo $this-$name,  - , $this-$contactcontact,  br\n, 
$this-$address;
}
}

$myclass = new extendedclass(Name:Bob, Contact:123456789, 
Address:abcdefghijklmnopqrstuvwxyz);

echo br\nOutside Classbr\n;
echo $myclass-$name,  - , $myclass-$contactcontact,  br\n, 
$myclass-$address;

?

--HTML RESULTS-

Extendedclass Entry
Name:Bob - Contact:123456789 
Address:abcdefghijklmnopqrstuvwxyz
Inside ksplit::Name:Bob - Bob
Inside ksplit::Contact:123456789 - 123456789
Inside ksplit::Address:abcdefghijklmnopqrstuvwxyz - abcdefghijklmnopqrstuvwxyz
Extendedclass Exit
Bob - 123456789 
abcdefghijklmnopqrstuvwxyz
Outside Class
123456789 - 123456789 
123456789 -- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Posts taking over an hour to be displayed

2005-05-12 Thread Shaw, Chris - Accenture
Yes, they are taking around an hour, must be the mailing list.

-Original Message-
From: Mark Sargent [mailto:[EMAIL PROTECTED]
Sent: 12 May 2005 08:53
To: php-general@lists.php.net
Subject: [PHP] Posts taking over an hour to be displayed


Hi All,

is anyone else experiencing this.? Over an hour for my posts to be seen. 
Happening from work and home. Cheers.

Mark Sargent.

-- 
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] SQL Date guru in the house?

2005-05-11 Thread Shaw, Chris - Accenture

Matthew,

Depending on what database, you should have a TO_DATE() or DATE() function
that you can cast your dd/mm/ to a date field in the select statement.

select to_date(, mm, dd) mydate
from dual
where mydate = '11/05/2005'
and mydate = '11/04/2005'

Look in the help files or the manual for the correct syntax/function for the
database your using.

HTH

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 07:17
To: php-general@lists.php.net
Subject: [PHP] SQL Date guru in the house?


Hi All,

I have a small problem.  

I have a project in which someone has got three integer fields for
holding the date.   DD, MM,  in an sql database.I now have to
have a page that inputs two dates and select records between those two
dates.

If I had a date field in the table it would be fairly simple, but I'm
hoping to do this search/comparison without having to rewrite the
pages/database that has already been designed.


Start Date: 11/05/2005
End Date:   11/04/2005
SELECT * FROM blah WHERE mm BETWEEN 04 AND 05 AND dd BETWEEN 11 AND 11
AND  BETWEEN 2005 AND 2005

Doesn't work for obvious reasons.  Is there any way that I can do
this date comparison I the SQL statement without having a decent date
field?
My apologies as this is australian date format and this list is in the
US I think?
Regards
Matthew







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



FW: [PHP] SQL Date guru in the house?

2005-05-11 Thread Shaw, Chris - Accenture

We could help him if he said what database he is using.

Chris.

-Original Message-
From: Kristen G. Thorson [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 15:42
To: Shaw, Chris - Accenture
Subject: Re: [PHP] SQL Date guru in the house?


*

This e-mail has been received by the Revenue Internet e-mail service.

*

I would try to use inherent date functions as well to calculate date
differences.  As Chris pointed out, you probably have some sort of
to_date() function available.  If not, you might be able to concat() the
date into a string and compare to a variable date.  You also might have
some sort of cast() function available that may do it.  The thought of
trying to get a working statement with the setup you have is giving me a
headache.

kgt


Shaw, Chris - Accenture wrote:

Matthew,


Depending on what database, you should have a TO_DATE() or DATE() function
that you can cast your dd/mm/ to a date field in the select statement.

select to_date(, mm, dd) mydate

from dual
where mydate = '11/05/2005'
and mydate = '11/04/2005'

Look in the help files or the manual for the correct syntax/function for the
database your using.

HTH

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 11 May 2005 07:17
To: php-general@lists.php.net
Subject: [PHP] SQL Date guru in the house?


Hi All,

I have a small problem. 


I have a project in which someone has got three integer fields for
holding the date.   DD, MM,  in an sql database.I now have to
have a page that inputs two dates and select records between those two
dates.   


If I had a date field in the table it would be fairly simple, but I'm
hoping to do this search/comparison without having to rewrite the
pages/database that has already been designed.


Start Date:11/05/2005
End Date:  11/04/2005
SELECT * FROM blah WHERE mm BETWEEN 04 AND 05 AND dd BETWEEN 11 AND 11
AND  BETWEEN 2005 AND 2005

Doesn't work for obvious reasons.  Is there any way that I can do
this date comparison I the SQL statement without having a decent date
field?
My apologies as this is australian date format and this list is in the
US I think?
Regards
Matthew







This message has been delivered to the Internet by the Revenue Internet
e-mail service

*

 









This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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



RE: [PHP] strpos with array?

2005-05-10 Thread Shaw, Chris - Accenture

Hello,

Have you tried using array_keys or array_search for finding an occurrence in
an array?

HTH.

Chris.

-Original Message-
From: Merlin [mailto:[EMAIL PROTECTED]
Sent: 10 May 2005 11:11
To: php-general@lists.php.net
Subject: [PHP] strpos with array?


*

This e-mail has been received by the Revenue Internet e-mail service.

*

Hi there,

I am wondering if there is a function (I could not find) which does the same
thing like strpos does, but with an array.

For example:

$replace = array(picture, pics);
$pos = strpos ($term, $replace);
if ($pos !== false) {
   $term = str_replace($replace, , $term);
   echo 'term without the word:'.$term;
}

This does of course not work since strpos does not take arrays.

Thank you for any help,

Merlin

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







This message has been delivered to the Internet by the Revenue Internet e-mail 
service

*

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