Re: [PHP] Connect to Google

2012-02-16 Thread Marc Guay
Sort of off topic but here's a list of existing services (some of
which are free) in case you don't want to reinvent the wheel.

http://www.justfitstudio.com/articles/plagiarism-detection.html

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



Re: [PHP] Connect to Google

2012-02-16 Thread Marc Guay
This is the first time I've been surprised that a Drupal module
existed for something...

http://drupal.org/project/authenticate

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



Re: [PHP] Connect to Google

2012-02-16 Thread Matijn Woudt
2012/2/16 John Taylor-Johnston :
> Can I use PHP to interface with Google? Any possible examples of this?

There's Google Custom Search API:
http://code.google.com/intl/nl-NL/apis/customsearch/v1/overview.html

It interfaces in JSON, and PHP has json functions included since PHP 5.2. [1].
It's free up to 100 queries a day, after that you have to pay $5 per
1000 queries.

- Matijn

[1] www.php.net/json

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



Re: [PHP] Connect to Google

2012-02-16 Thread Ashley Sheridan
On Thu, 2012-02-16 at 14:50 -0500, John Taylor-Johnston wrote:

> I'm a top quoter.
> I would parse the text first. Phrase by phrase, or phrase segments.
> Then spit out a report.
> 
> Marc Guay wrote:
> > If that's not good enough, can you explain how you would like it to
> > function?  Would the whole paper be scanned phrase-by-phrase for
> > matches and then spit out a report?
> 


You might be a top quoter but, please, to get the best from this list
and not annoy people post at the bottom. The list gets archived online
at many places, and it's annoying to read things in this order:

reply 4
>>reply 2
question
>>>reply 1
>reply 3

Almost every email client I know of allows bottom posting. This is just
one of the rules of this list, please don't be offended, but do try to
keep to the rules, it keeps everyone happy, and happy people are helpful
people!

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




Re: [PHP] Connect to Google

2012-02-16 Thread Ashley Sheridan
On Thu, 2012-02-16 at 14:47 -0500, John Taylor-Johnston wrote:

> Can I use PHP to interface with Google? Any possible examples of this?
> 
> Let's start with the first step. :)
> 
> I'm sure proprietary sites like http://www.compilatio.net/ for example 
> connects to search engines. They cannot be crawling the net too. That would 
> be crazy.
> 
> (I'm a top quoter. It's more intuitive.)
> 
> Thanks Ash.
> 
> John
> 
> 
> 
> Ashley Sheridan wrote:
> > On Wed, 2012-02-15 at 21:56 -0500, John Taylor-Johnston wrote:
> >> How can I use PHP to interface with Google and see if this text exists
> >> on the internet?
> >>
> >
> > Wow, that's a pretty big project you're chewing there. A quick search 
> > shows that there are some project out there to detect plagiarism, but 
> > I think for university calibre there's a hefty sum of money required.
> >


It might seem more intuitive to you, but it really, really screws up the
archives.

Like I said before, cURL is the way to "interface" with Google.
Basically, cURL can be used to request resources, in this case a web
page, from the web. You can call a URL and parse the page of results to
determine whatever you need to. As you've not really hashed out any firm
ides of what exactly you want, it's a little difficult to say exactly
what you need to do.

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




Re: [PHP] Connect to Google

2012-02-16 Thread John Taylor-Johnston

I'm a top quoter.
I would parse the text first. Phrase by phrase, or phrase segments.
Then spit out a report.

Marc Guay wrote:

If that's not good enough, can you explain how you would like it to
function?  Would the whole paper be scanned phrase-by-phrase for
matches and then spit out a report?


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



Re: [PHP] Connect to Google

2012-02-16 Thread John Taylor-Johnston

Can I use PHP to interface with Google? Any possible examples of this?

Let's start with the first step. :)

I'm sure proprietary sites like http://www.compilatio.net/ for example connects 
to search engines. They cannot be crawling the net too. That would be crazy.

(I'm a top quoter. It's more intuitive.)

Thanks Ash.

John



Ashley Sheridan wrote:

On Wed, 2012-02-15 at 21:56 -0500, John Taylor-Johnston wrote:

How can I use PHP to interface with Google and see if this text exists
on the internet?



Wow, that's a pretty big project you're chewing there. A quick search 
shows that there are some project out there to detect plagiarism, but 
I think for university calibre there's a hefty sum of money required.




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



Re: [PHP] Connect to Google

2012-02-16 Thread Marc Guay
> If you use the advanced search
> tools you can choose "verbatim" and see if the exact phrase matches.

Just correcting myself here, the way to do this is by simply wrapping
the words in quotes "like this, hey now".  The verbatim tool is
something else.

Marc

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



Re: [PHP] Connect to Google

2012-02-16 Thread Ashley Sheridan
On Wed, 2012-02-15 at 21:56 -0500, John Taylor-Johnston wrote:

> I'm a teacher. I want to use PHP to interface with Google and see if a 
> student has plagiarized.
> 
> I don't see many open-source projects on the subject, so I want to 
> create my own script.
> 
> How can I use PHP to interface with Google and see if this text exists 
> on the internet?
> 
> If this is possible, I need some ideas on how to parse the text and 
> input it into Google.
> 
> Then I might like to get a percentage idea of how this text compares to 
> a site that Google has indexed.
> 
> 
> $SampleText = "Lorem ipsum dolor sit amet, test link adipiscing elit. 
> Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc 
> iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet 
> at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis 
> luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget 
> metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla 
> nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo 
> vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus."
> 
> John
> 
> 


Wow, that's a pretty big project you're chewing there. A quick search
shows that there are some project out there to detect plagiarism, but I
think for university calibre there's a hefty sum of money required.

To get a rough idea, you could break a text into sentences, and then
query each one of those to see if it occurs just like that. You can use
cURL to grab search results pages for this sort of thing, no need for a
special interface. There are a few things to bear in mind though:


  * Googles terms and conditions may prohibit using their search
engine like this, or may impose a limit on how much you can do
this
  * Some sentences will be intentionally copied, as quotes. Maybe
some sort of check against the source to see if it's in a quote
context.
  * What if only part of a sentence is copied?


Maybe after you've searched for exact matches from the sentences in the
source, you could remove them from the source, then re-check every
sentence against Googles fuzzy search. It may produce many false
positives though.

There are plenty of other factors too, such as students copying from
books which don't exist in a search engines archives, some subjects may
unintentionally result in the same way of wording, particularly
technical subjects which tend to be removed from more creative and
flowery descriptive tendencies.

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




Re: [PHP] Connect to Google

2012-02-16 Thread Marc Guay
> I'm a teacher. I want to use PHP to interface with Google and see if a
> student has plagiarized.

Hi.  Why not just enter the suspected text into a search engine and
see if any close matches come up?  If you use the advanced search
tools you can choose "verbatim" and see if the exact phrase matches.
If that's not good enough, can you explain how you would like it to
function?  Would the whole paper be scanned phrase-by-phrase for
matches and then spit out a report?

Marc

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



[PHP] Connect to Google

2012-02-16 Thread John Taylor-Johnston
I'm a teacher. I want to use PHP to interface with Google and see if a 
student has plagiarized.


I don't see many open-source projects on the subject, so I want to 
create my own script.


How can I use PHP to interface with Google and see if this text exists 
on the internet?


If this is possible, I need some ideas on how to parse the text and 
input it into Google.


Then I might like to get a percentage idea of how this text compares to 
a site that Google has indexed.



$SampleText = "Lorem ipsum dolor sit amet, test link adipiscing elit. 
Nullam dignissim convallis est. Quisque aliquam. Donec faucibus. Nunc 
iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet 
at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis 
luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget 
metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla 
nonummy. Mauris a ante. Suspendisse quam sem, consequat at, commodo 
vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus."


John


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



[PHP] connect openLDAP server using LDAP (apache + windows)

2010-06-11 Thread Jérémy ESCOLANO
Hi

I'm writing from france cuz i'm having a big problem with apache and ldap.
let me explain :

I would like to make an Apache server communicate in php with en openLDAP
server (both servers are under win srv 2003), using LDAPS protocol.

In order to activate LDAPS on my openLDAP srv (srvLDAP), I created self
signed certificates with openSSL. I got 3 files:


cacert.pem
srvLDAP.pem
srvLDAP.key


I configured my slapd.con file and ldap.conf fil (openLDAP side) like this:

slapd.conf

TLSCertificateFile  ./ssl/srvLDAP.pem
TLSCertificateKeyFile   ./ssl/srvLDAP.key
TLSCACertificateFile./ssl/cacert.pem


ldap.conf
BASE
URI ldaps://srvLDAP/
TLS_CACERT  ./ssl/cacert.pem
TLS_REQCERT demand



I launched my openLDAP service, and checked ldaps protocol was okay, using
this command :



C:\Program Files\OpenLDAP>ldapsearch -b o=exemple,dc=fr -s sub -x -w pass-D
cn=admin,o=exemple,dc=fr -H ldaps://srvLDAP/


Now I would like, from the remote apache server, communicate with the
openLDAP server using [b]LDAPS[/b] Protocol.

Here is my simplified PHP code

LDAP OPENLDAP LDAPS


I get this errror:


Unable to bind to server: Can't contact LDAP server


I know i have to configure certificates in the Apache server configuration,
I tried to to this according several internet ressources but didn't succeed..
I also read this link [URL="
http://forum.hardware.fr/hfr/OSAlternatifs/Logiciels-2/certificats-securisee-connexion-sujet_65365_1.htm"]Here[/URL]
which is a french link which speak about an ldap.con and ldaprc files to put
in the apache server. I did it but nothing happened.

Well, i'm lost in all this stuff, that is why i'm asking for help to
configure my servers to use ldaps with php.

Do you have information that could help me ?

I thank you in advance


Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-20 Thread Richard Quadling
2010/1/20 Edward S.P. Leong :
> Richard Quadling wrote:
>
> 2010/1/20 Edward S.P. Leong :
>
>
> Richard Quadling wrote:
>
> http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
>
>
> Sorry,
>
> Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
>
> Thanks !
>
> Edward.
>
>
>
> Either ODBC or the MS SQL driver for PHP. Which ever suits you.
>
> Both require the MS SQL Native Client (go for the latest).
>
> That's it really.
>
> Sorry,
>
> My means is which package support for connecting MS-SQL 2000 from php ?
> Due to I don't know which package ( file name ) I download it on the
> download site is suitable for me to use...
>
> Thanks !
>
> Edward.
>
>
>
> As you are running IIS + PHP in 32bit mode, I'd stick with the x86 packages.
>
>
>
> Hello,
>
> Do you means the x86 is suitable for me now ?
>
> Thanks !
>
> Edward.
>

If you were running 64 bit everything, then obviously, you would use
the 64 bit packages.

But you are running IIS and PHP in 32bit mode, so, for ease of
compatibility, the 32bit packages (x86 rather than x64) are what I
would be using.

In terms of which one you want to use, well, you have to get the Native Client.

>From there you can either use odbc (built into PHP for Windows) or use
the MS SQL Driver for PHP.

Both of them use the Native Client.

As the MS SQL driver is fairly new, you may want to stick with the
ODBC route within PHP.

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-20 Thread Edward S.P. Leong
Richard Quadling wrote:

>2010/1/20 Edward S.P. Leong :
>  
>
>>Richard Quadling wrote:
>>
>>http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
>>
>>
>>Sorry,
>>
>>Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
>>
>>Thanks !
>>
>>Edward.
>>
>>
>>
>>Either ODBC or the MS SQL driver for PHP. Which ever suits you.
>>
>>Both require the MS SQL Native Client (go for the latest).
>>
>>That's it really.
>>
>>Sorry,
>>
>>My means is which package support for connecting MS-SQL 2000 from php ?
>>Due to I don't know which package ( file name ) I download it on the
>>download site is suitable for me to use...
>>
>>Thanks !
>>
>>Edward.
>>
>>
>>
>
>As you are running IIS + PHP in 32bit mode, I'd stick with the x86 packages.
>
>  
>
Hello,

Do you means the x86 is suitable for me now ?

Thanks !

Edward.


Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-20 Thread Richard Quadling
2010/1/20 Edward S.P. Leong :
> Richard Quadling wrote:
>
> http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
>
>
> Sorry,
>
> Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
>
> Thanks !
>
> Edward.
>
>
>
> Either ODBC or the MS SQL driver for PHP. Which ever suits you.
>
> Both require the MS SQL Native Client (go for the latest).
>
> That's it really.
>
> Sorry,
>
> My means is which package support for connecting MS-SQL 2000 from php ?
> Due to I don't know which package ( file name ) I download it on the
> download site is suitable for me to use...
>
> Thanks !
>
> Edward.
>

As you are running IIS + PHP in 32bit mode, I'd stick with the x86 packages.

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-20 Thread Edward S.P. Leong
Richard Quadling wrote:

>>http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
>>
>>
>>Sorry,
>>
>>Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
>>
>>Thanks !
>>
>>Edward.
>>
>>
>>
>
>Either ODBC or the MS SQL driver for PHP. Which ever suits you.
>
>Both require the MS SQL Native Client (go for the latest).
>
>That's it really.
>
Sorry,

My means is which package support for connecting MS-SQL 2000 from php ?
Due to I don't know which package ( file name ) I download it on the
download site is suitable for me to use...

Thanks !

Edward.


Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-20 Thread Richard Quadling
2010/1/20 Richard Quadling :
> 2010/1/20 Edward S.P. Leong :
>> Richard Quadling wrote:
>>
>> 2010/1/19 Edward S.P. Leong :
>>
>>
>> Richard Quadling wrote:
>>
>>
>>
>> But having said all of that, the php_mssql.dll uses a very old library
>> which may give you issues.
>>
>> For the time being, using ODBC (php_odbc is built in for PHP on
>> Windows) is a much safer solution. You can also use the latest SQL
>> Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
>>
>> If you are used to using a DNS-less connection, then ...
>>
>> $Conn = odbc_pconnect("Driver={SQL Server Native Client
>> 10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
>> $User, $Password, SQL_CUR_USE_DRIVER);
>>
>> will give you the connection without the need to have a DNS entry.
>>
>>
>>
>>
>> Hello to you,
>>
>> Where can we download the SQL Native Client driver for talking to MS-SQL
>> ( eg : 2000 ) ?
>>
>> Thanks !
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>> http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
>>
>>
>> Sorry,
>>
>> Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
>>
>> Thanks !
>>
>> Edward.
>>
>
> Either ODBC or the MS SQL driver for PHP. Which ever suits you.
>
> Both require the MS SQL Native Client (go for the latest).
>
> That's it really.
>
> --
> -
> Richard Quadling
> "Standing on the shoulders of some very clever giants!"
> EE : http://www.experts-exchange.com/M_248814.html
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> ZOPA : http://uk.zopa.com/member/RQuadling
>
Microsoft SQL Server 2008 Native Client
Microsoft SQL Server 2008 Native Client (SQL Native Client) is a
single dynamic-link library (DLL) containing both the SQL OLE DB
provider and SQL ODBC driver. It contains run-time support for
applications using native-code APIs (ODBC, OLE DB and ADO) to connect
to Microsoft SQL Server 2000, 2005, or 2008. SQL Native Client should
be used to create new applications or enhance existing applications
that need to take advantage of new SQL Server 2008 features. This
redistributable installer for SQL Native Client installs the client
components needed during run time to take advantage of new SQL Server
2008 features, and optionally installs the header files needed to
develop an application that uses the SQL Native Client API.

Audience(s): Customer, Partner, Developer

X86 Package (sqlncli.msi) - 4549 KB -
http://go.microsoft.com/fwlink/?LinkId=123717&clcid=0x409
X64 Package (sqlncli.msi) - 7963 KB -
http://go.microsoft.com/fwlink/?LinkId=123718&clcid=0x409
IA64 Package (sqlncli.msi) - 2 KB -
http://go.microsoft.com/fwlink/?LinkId=123719&clcid=0x409


Microsoft SQL Server 2005 Driver for PHP
The SQL Server 2005 Driver for PHP is a PHP 5 extension that allows
for accessing data in all Editions of SQL Server 2005 and SQL Server
2008 (including Express Editions) from within PHP scripts. The driver
provides a procedural interface for accessing data and makes use of
PHP features, including PHP streams to read and write large objects.
With this release, the source code for the driver is available here:
http://go.microsoft.com/fwlink/?LinkID=123842&clcid=0x409 . The SQL
Server 2005 Driver for PHP relies on the Microsoft SQL Server Native
Client to communicate with SQL Server. For more information about SQL
Server Native Client, visit the SQL Server Native Client page on MSDN.

Audience(s): Developer, DBA

Download site - http://go.microsoft.com/fwlink/?LinkID=123470


-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-20 Thread Richard Quadling
2010/1/20 Edward S.P. Leong :
> Richard Quadling wrote:
>
> 2010/1/19 Edward S.P. Leong :
>
>
> Richard Quadling wrote:
>
>
>
> But having said all of that, the php_mssql.dll uses a very old library
> which may give you issues.
>
> For the time being, using ODBC (php_odbc is built in for PHP on
> Windows) is a much safer solution. You can also use the latest SQL
> Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
>
> If you are used to using a DNS-less connection, then ...
>
> $Conn = odbc_pconnect("Driver={SQL Server Native Client
> 10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
> $User, $Password, SQL_CUR_USE_DRIVER);
>
> will give you the connection without the need to have a DNS entry.
>
>
>
>
> Hello to you,
>
> Where can we download the SQL Native Client driver for talking to MS-SQL
> ( eg : 2000 ) ?
>
> Thanks !
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
> http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
>
>
> Sorry,
>
> Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?
>
> Thanks !
>
> Edward.
>

Either ODBC or the MS SQL driver for PHP. Which ever suits you.

Both require the MS SQL Native Client (go for the latest).

That's it really.

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-20 Thread Edward S.P. Leong
Richard Quadling wrote:

>2010/1/19 Edward S.P. Leong :
>  
>
>>Richard Quadling wrote:
>>
>>
>>
>>>But having said all of that, the php_mssql.dll uses a very old library
>>>which may give you issues.
>>>
>>>For the time being, using ODBC (php_odbc is built in for PHP on
>>>Windows) is a much safer solution. You can also use the latest SQL
>>>Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
>>>
>>>If you are used to using a DNS-less connection, then ...
>>>
>>>$Conn = odbc_pconnect("Driver={SQL Server Native Client
>>>10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
>>>$User, $Password, SQL_CUR_USE_DRIVER);
>>>
>>>will give you the connection without the need to have a DNS entry.
>>>
>>>
>>>  
>>>
>>Hello to you,
>>
>>Where can we download the SQL Native Client driver for talking to MS-SQL
>>( eg : 2000 ) ?
>>
>>Thanks !
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>
>http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en
>  
>
Sorry,

Would you mind to tell me which for connecting MS-SQL 2000 and PHP ?

Thanks !

Edward.


Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-19 Thread Richard Quadling
2010/1/19 Edward S.P. Leong :
> Richard Quadling wrote:
>
>>But having said all of that, the php_mssql.dll uses a very old library
>>which may give you issues.
>>
>>For the time being, using ODBC (php_odbc is built in for PHP on
>>Windows) is a much safer solution. You can also use the latest SQL
>>Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
>>
>>If you are used to using a DNS-less connection, then ...
>>
>>$Conn = odbc_pconnect("Driver={SQL Server Native Client
>>10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
>>$User, $Password, SQL_CUR_USE_DRIVER);
>>
>>will give you the connection without the need to have a DNS entry.
>>
>>
> Hello to you,
>
> Where can we download the SQL Native Client driver for talking to MS-SQL
> ( eg : 2000 ) ?
>
> Thanks !
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

and you also have the option of an official MS SQL driver for PHP

http://www.codeplex.com/SQLSRVPHP


-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-19 Thread Richard Quadling
But having said all of that, the php_mssql.dll uses a very old library
which may give you issues.

For the time being, using ODBC (php_odbc is built in for PHP on
Windows) is a much safer solution. You can also use the latest SQL
Native Client driver so you can talk to SQL7, 2000, 2005, 2008.

If you are used to using a DNS-less connection, then ...

$Conn = odbc_pconnect("Driver={SQL Server Native Client
10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
$User, $Password, SQL_CUR_USE_DRIVER);

will give you the connection without the need to have a DNS entry.

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-19 Thread Edward S.P. Leong
Richard Quadling wrote:

>But having said all of that, the php_mssql.dll uses a very old library
>which may give you issues.
>
>For the time being, using ODBC (php_odbc is built in for PHP on
>Windows) is a much safer solution. You can also use the latest SQL
>Native Client driver so you can talk to SQL7, 2000, 2005, 2008.
>
>If you are used to using a DNS-less connection, then ...
>
>$Conn = odbc_pconnect("Driver={SQL Server Native Client
>10.0};Server={$Server};Database={$Database};MARS_Connection=Yes;",
>$User, $Password, SQL_CUR_USE_DRIVER);
>
>will give you the connection without the need to have a DNS entry.
>  
>
Hello to you,

Where can we download the SQL Native Client driver for talking to MS-SQL
( eg : 2000 ) ?

Thanks !

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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-19 Thread Richard Quadling
2010/1/19  :
> 引述 Richard Quadling :
>
>> 1 - Can you confirm that the ini file you are editing is the one that
>> is reported in phpinfo() as the file being used?
>
> Yes, BUT there is no MSSQL info of it...
>
>> 2 - At a command prompt, change directory to your PHP installation  and
>> type ...
>>
>> php -m
>>
>> See if you have any errors being reported.
>>
>> If the INI file is in an unusual location, then use ...
>>
>> php -c  -m
>
> T:\php5>php -c t:\php5\php.ini -m
> PHP Warning:  PHP Startup: Unable to load dynamic library
> 'T:\PHP5\ext\php_mssql
> .dll' - The specified module could not be found.
>  in Unknown on line 0
> [PHP Modules]
> bcmath
> calendar
> com_dotnet
> ctype
> date
> dom
> filter
> ftp
> gd
> hash
> iconv
> json
> libxml
> mbstring
> mcrypt
> mysql
> odbc
> pcre
> Reflection
> session
> SimpleXML
> SPL
> standard
> tokenizer
> wddx
> xml
> xmlreader
> xmlwriter
> zlib
>
> [Zend Modules]
>
> T:\php5\ext>dir php_mssql.dll
>  Volume in drive T is Data
>  Volume Serial Number is DC85-706F
>
>  Directory of T:\php5\ext
>
> 2009/12/16  下午 05:06            49,232 php_mssql.dll
>               1 File(s)         49,232 bytes
>               0 Dir(s)  52,215,365,632 bytes free
>
> T:\php5\ext>
>
> BTW : when running the cli of php -c t:\php5\php.ini -m, the system prompt
> me there is no "MSVCR71.dll" found...
> So, how can I install the dll file for test ( php -m ) again ?
>
> Thanks !
>
> Edward.
>
>
>
>
>
> 
> ITA Web Site : http://www.ita.org.mo
> E-mail Address : i...@ita.org.mo
>
>

It seems you are missing one (or more) of the MS Visual C Runtime files.

http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
is where I'd go next.

But, first, I'd confirm this issue.

If you have depends.exe (http://www.dependencywalker.com/) to open the
php_mssql.dll and see if it reports the missing file in the same way -
look at the bottom of the bottom panel.

Whilst PHP _can_ find the php_mssql.dll file, it is unable to load it
due to missing libraries required by the dll.

-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-18 Thread edwardspl

引述 Richard Quadling :


1 - Can you confirm that the ini file you are editing is the one that
is reported in phpinfo() as the file being used?


Yes, BUT there is no MSSQL info of it...

2 - At a command prompt, change directory to your PHP installation   
and type ...


php -m

See if you have any errors being reported.

If the INI file is in an unusual location, then use ...

php -c  -m


T:\php5>php -c t:\php5\php.ini -m
PHP Warning:  PHP Startup: Unable to load dynamic library  
'T:\PHP5\ext\php_mssql

.dll' - The specified module could not be found.
 in Unknown on line 0
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mcrypt
mysql
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

T:\php5\ext>dir php_mssql.dll
 Volume in drive T is Data
 Volume Serial Number is DC85-706F

 Directory of T:\php5\ext

2009/12/16  下午 05:0649,232 php_mssql.dll
   1 File(s) 49,232 bytes
   0 Dir(s)  52,215,365,632 bytes free

T:\php5\ext>

BTW : when running the cli of php -c t:\php5\php.ini -m, the system  
prompt me there is no "MSVCR71.dll" found...

So, how can I install the dll file for test ( php -m ) again ?

Thanks !

Edward.






ITA Web Site : http://www.ita.org.mo
E-mail Address : i...@ita.org.mo


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



Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-18 Thread Richard Quadling
2010/1/18 Edward S.P. Leong :
> Dear All,
>
> I had config the php.ini as the following :
> extension=php_mssql.dll
>
> Then run the cli "iisreset" and reboot the web server machine...
> After that, there is NO any MS-SQL within the phpinfo()...
> So, would you mind to help more ?
>
> Thanks !
>
> Edward.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

1 - Can you confirm that the ini file you are editing is the one that
is reported in phpinfo() as the file being used?
2 - At a command prompt, change directory to your PHP installation and type ...

php -m

See if you have any errors being reported.

If the INI file is in an unusual location, then use ...

php -c  -m

instead; e.g.

php -c D:\PHP\INI\php-cli.ini -m
php -c C:\windows\php-isapi.ini -m
etc.




-- 
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

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



[PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-18 Thread Edward S.P. Leong
Dear All,

I had config the php.ini as the following :
extension=php_mssql.dll

Then run the cli "iisreset" and reboot the web server machine...
After that, there is NO any MS-SQL within the phpinfo()...
So, would you mind to help more ?

Thanks !

Edward.


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



Re: [PHP] Connect to LDAP

2009-11-08 Thread Devendra Jadhav
Yes. Correct

On Mon, Nov 9, 2009 at 7:30 AM, Ashley M. Kirchner wrote:

>
>   Hi folks,
>
>   I've never done any PHP->LDAP code writing (nor have I ever dealt with an
> LDAP server to begin with.)  However I'm writing an app which requires
> verifying a user's credentials against an LDAP server.  The admin of the
> server sent me the following snippet, however also made it clear that he is
> not 100% whether it's accurate (he's not a PHP coder).  And I don't have
> remote access to the server (the app is going to sit on the internal network
> and the LDAP server doesn't accept outside connections.)
>
>   So, asking the wise folks on here, does the following piece look
> semantically correct?
>
>/* Check against LDAP server */
>$adServer = "server.address.hidden";
>$ldapconn = ldap_connect($adServer) or die("Connection to the AD
> server failed.");
>$ldapuser = $_POST["uname"];
>$ldappass = $_POST["pword"];
>$ldapbind = ldap_bind($ldapconn, $ldapuser, $ldappass);
>
>if ($ldapbind) {
>  $msg = "User Authenticated Successfully!";
>  $_SESSION['username'] = $ldapuser;
>  $_SESSION['password'] = $ldappass;
>  return true;
>} else {
>  $msg = "Invalid username / password";
>  return false;
>}
>
>   Thanks.
>
>   -- A
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Devendra Jadhav
देवेंद्र जाधव


[PHP] Connect to LDAP

2009-11-08 Thread Ashley M. Kirchner


   Hi folks,

   I've never done any PHP->LDAP code writing (nor have I ever dealt 
with an LDAP server to begin with.)  However I'm writing an app which 
requires verifying a user's credentials against an LDAP server.  The 
admin of the server sent me the following snippet, however also made it 
clear that he is not 100% whether it's accurate (he's not a PHP coder).  
And I don't have remote access to the server (the app is going to sit on 
the internal network and the LDAP server doesn't accept outside 
connections.)


   So, asking the wise folks on here, does the following piece look 
semantically correct?


/* Check against LDAP server */
$adServer = "server.address.hidden";
$ldapconn = ldap_connect($adServer) or die("Connection to the 
AD server failed.");

$ldapuser = $_POST["uname"];
$ldappass = $_POST["pword"];
$ldapbind = ldap_bind($ldapconn, $ldapuser, $ldappass);

if ($ldapbind) {
  $msg = "User Authenticated Successfully!";
  $_SESSION['username'] = $ldapuser;
  $_SESSION['password'] = $ldappass;
  return true;
} else {
  $msg = "Invalid username / password";
  return false;
}

   Thanks.

   -- A

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



Re: RES: [PHP] Connect local app to a web app

2009-02-05 Thread Jim Lucas
Jônatas Zechim wrote:
> Ok, i have a app running on a website writen in php that insert data into a 
> database(web) every 3s all day long, and I need to get this data(every 3s 
> too) and save into local database, both are mysql database, but I don't know 
> the best way to do it, with socks, XML, XML-RPC.
> 
> Thanks
> 
> Zechim.
> 
> -Mensagem original-
> De: Jim Lucas [mailto:li...@cmsws.com] 
> Enviada em: quinta-feira, 5 de fevereiro de 2009 18:13
> Para: Alpár Török
> Cc: Paul M Foster; php-general@lists.php.net
> Assunto: Re: [PHP] Connect local app to a web app
> 
> Alpár Török wrote:
>> 2009/2/5 Alpár Török 
>>
>>> 2009/2/5 Paul M Foster 
>>>
>>> On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:
>>>>> Hi there, i'm here again, but now with another doubt.
>>>>>
>>>>> What's the best way to connect a local app write in php or php-gtk to a
>>>> web
>>>>> app writen in php.
>>>>> The database is MySql, and i need to do this connection every 3s to
>>>> check
>>>>> data, get the data back and save into localhost database.
>>>>>
>>>> If you have control of the server, you can just set this up in a bash
>>>> script, using mysql commands, which connect to the remote and then then
>>>> local databases. I'm talking about cron running the script periodically.
>>>>
>>>> Paul
>>>>
>>>> --
>>>> Paul M. Foster
>>>>
>>>> --
>>>> PHP General Mailing List (http://www.php.net/)
>>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>>
>>>>
>>> You can set up a web service using XML-RPC or JSON-RPC , you don't
>>> necessarily need a db
>>>
>> PS: I meant you don't need the db locally
>>
> 
> except for the fact that the op said he wanted to *save* it to a *localhost 
> database*.
> 
>>> --
>>> Alpar Torok
>>>
>>
>>
> 
> 

Personally, I would look at mysql replication running locally on your mysql 
database.

It is handled completely by mysql.  No need to use other applications or 
languages to reproduce the replication ability already designed into mysql.



-- 
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

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



RES: [PHP] Connect local app to a web app

2009-02-05 Thread Jônatas Zechim
Ok, i have a app running on a website writen in php that insert data into a 
database(web) every 3s all day long, and I need to get this data(every 3s too) 
and save into local database, both are mysql database, but I don't know the 
best way to do it, with socks, XML, XML-RPC.

Thanks

Zechim.

-Mensagem original-
De: Jim Lucas [mailto:li...@cmsws.com] 
Enviada em: quinta-feira, 5 de fevereiro de 2009 18:13
Para: Alpár Török
Cc: Paul M Foster; php-general@lists.php.net
Assunto: Re: [PHP] Connect local app to a web app

Alpár Török wrote:
> 2009/2/5 Alpár Török 
> 
>>
>> 2009/2/5 Paul M Foster 
>>
>> On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:
>>>> Hi there, i'm here again, but now with another doubt.
>>>>
>>>> What's the best way to connect a local app write in php or php-gtk to a
>>> web
>>>> app writen in php.
>>>> The database is MySql, and i need to do this connection every 3s to
>>> check
>>>> data, get the data back and save into localhost database.
>>>>
>>> If you have control of the server, you can just set this up in a bash
>>> script, using mysql commands, which connect to the remote and then then
>>> local databases. I'm talking about cron running the script periodically.
>>>
>>> Paul
>>>
>>> --
>>> Paul M. Foster
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>> You can set up a web service using XML-RPC or JSON-RPC , you don't
>> necessarily need a db
>>
> PS: I meant you don't need the db locally
> 

except for the fact that the op said he wanted to *save* it to a *localhost 
database*.

>> --
>> Alpar Torok
>>
> 
> 
> 


-- 
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

-- 
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] Connect local app to a web app

2009-02-05 Thread Jim Lucas
Alpár Török wrote:
> 2009/2/5 Alpár Török 
> 
>>
>> 2009/2/5 Paul M Foster 
>>
>> On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:
 Hi there, i'm here again, but now with another doubt.

 What's the best way to connect a local app write in php or php-gtk to a
>>> web
 app writen in php.
 The database is MySql, and i need to do this connection every 3s to
>>> check
 data, get the data back and save into localhost database.

>>> If you have control of the server, you can just set this up in a bash
>>> script, using mysql commands, which connect to the remote and then then
>>> local databases. I'm talking about cron running the script periodically.
>>>
>>> Paul
>>>
>>> --
>>> Paul M. Foster
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>> You can set up a web service using XML-RPC or JSON-RPC , you don't
>> necessarily need a db
>>
> PS: I meant you don't need the db locally
> 

except for the fact that the op said he wanted to *save* it to a *localhost 
database*.

>> --
>> Alpar Torok
>>
> 
> 
> 


-- 
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

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



Re: [PHP] Connect local app to a web app

2009-02-05 Thread Alpár Török
2009/2/5 Alpár Török 

>
>
> 2009/2/5 Paul M Foster 
>
> On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:
>>
>> > Hi there, i'm here again, but now with another doubt.
>> >
>> > What's the best way to connect a local app write in php or php-gtk to a
>> web
>> > app writen in php.
>> > The database is MySql, and i need to do this connection every 3s to
>> check
>> > data, get the data back and save into localhost database.
>> >
>>
>> If you have control of the server, you can just set this up in a bash
>> script, using mysql commands, which connect to the remote and then then
>> local databases. I'm talking about cron running the script periodically.
>>
>> Paul
>>
>> --
>> Paul M. Foster
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> You can set up a web service using XML-RPC or JSON-RPC , you don't
> necessarily need a db
>
PS: I meant you don't need the db locally

>
> --
> Alpar Torok
>



-- 
Alpar Torok


Re: [PHP] Connect local app to a web app

2009-02-05 Thread Alpár Török
2009/2/5 Paul M Foster 

> On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:
>
> > Hi there, i'm here again, but now with another doubt.
> >
> > What's the best way to connect a local app write in php or php-gtk to a
> web
> > app writen in php.
> > The database is MySql, and i need to do this connection every 3s to check
> > data, get the data back and save into localhost database.
> >
>
> If you have control of the server, you can just set this up in a bash
> script, using mysql commands, which connect to the remote and then then
> local databases. I'm talking about cron running the script periodically.
>
> Paul
>
> --
> Paul M. Foster
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
You can set up a web service using XML-RPC or JSON-RPC , you don't
necessarily need a db

-- 
Alpar Torok


RE: [PHP] Connect local app to a web app

2009-02-05 Thread bruce
hi...

can you describe in psuedocode what you're trying to accomplish?

might be able to help if i have a better understanding of where you're
trying to go.



-Original Message-
From: Jônatas Zechim [mailto:zechim@gmail.com]
Sent: Thursday, February 05, 2009 11:25 AM
To: php-general@lists.php.net
Subject: [PHP] Connect local app to a web app


Hi there, i'm here again, but now with another doubt.

What's the best way to connect a local app write in php or php-gtk to a web
app writen in php.
The database is MySql, and i need to do this connection every 3s to check
data, get the data back and save into localhost database.


--
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] Connect local app to a web app

2009-02-05 Thread Paul M Foster
On Thu, Feb 05, 2009 at 05:24:45PM -0200, Jônatas Zechim wrote:

> Hi there, i'm here again, but now with another doubt.
> 
> What's the best way to connect a local app write in php or php-gtk to a web
> app writen in php.
> The database is MySql, and i need to do this connection every 3s to check
> data, get the data back and save into localhost database.
> 

If you have control of the server, you can just set this up in a bash
script, using mysql commands, which connect to the remote and then then
local databases. I'm talking about cron running the script periodically.

Paul

-- 
Paul M. Foster

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



Re: [PHP] Connect local app to a web app

2009-02-05 Thread Jim Lucas
Jônatas Zechim wrote:
> Hi there, i'm here again, but now with another doubt.
> 
> What's the best way to connect a local app write in php or php-gtk to a web
> app writen in php.
> The database is MySql, and i need to do this connection every 3s to check
> data, get the data back and save into localhost database.
> 
> 

Mysql replication... :)

-- 
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
   and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

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



[PHP] Connect local app to a web app

2009-02-05 Thread Jônatas Zechim
Hi there, i'm here again, but now with another doubt.

What's the best way to connect a local app write in php or php-gtk to a web
app writen in php.
The database is MySql, and i need to do this connection every 3s to check
data, get the data back and save into localhost database.


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



Re: [PHP] Connect PHP to Remote SQL Server?

2007-10-05 Thread Jim Lucas

Jason Paschal wrote:

Apache and PHP 4.3.9 are on a *nix server and we don't have root access,
HOWEVER we can have the tech support perform pretty much any action except
re-compile PHP (for which they charge), but I'm hoping i could dynamically
load extensions during run-time.  I just need to know which extensions.

PHP has been compiled with unixODBC and dbx (there is no mssql extension on
the server).  These look like likely tools for a SQL server connection, but
nothing works.  I can't find anything about unixODBC in relation to PHP,
unless FreeTDS is mentioned as well.

I tried loading odbc.so during runtime, but it can't be found.  Same for
mssql.so.  Should we add these files to the extensions dir for use with
dl()?  Should we install FreeTDS?  Should we do both?

How can we do this without recompiling PHP?

I have the remote SQL server IP, the port number, the username and the
password.  The web server IP has been added to the allow list for the SQL
Server.

Any advice will be welcome.  Thanks in advance!

Leaning on the PHP list,
Jason

I have seen reference to people using the sybase extension to connect to 
a MSSQL server before.


Here is a reference from the php.net web site.

http://us.php.net/manual/en/ref.sybase.php#54147

Jim

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



Re: [PHP] Connect PHP to Remote SQL Server?

2007-10-05 Thread mike
On 10/5/07, Jason Paschal <[EMAIL PROTECTED]> wrote:
> Apache and PHP 4.3.9 are on a *nix server and we don't have root access,
> HOWEVER we can have the tech support perform pretty much any action except
> re-compile PHP (for which they charge), but I'm hoping i could dynamically
> load extensions during run-time.  I just need to know which extensions.

i'd say mssql from freetds.

> I tried loading odbc.so during runtime, but it can't be found.  Same for
> mssql.so.  Should we add these files to the extensions dir for use with
> dl()?  Should we install FreeTDS?  Should we do both?

if they're not there they can't be loaded.

i would say use freetds since i've used it in the past. not sure about
what is the best nowadays for sql server 2k/etc. i used freeTDS with
php 4 to connect to mssql. i forget wihch version. maybe 6.0, maybe
7.0 if there was one?

i'm thinking there is a way for ODBC to connect but again, no clue.

> How can we do this without recompiling PHP?

i don't think you can.

note: with freetds you have to do something like putenv('TDSVER=70');
before connecting if you're having issues. you may have to google for
that too.

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



[PHP] Connect PHP to Remote SQL Server?

2007-10-05 Thread Jason Paschal
Apache and PHP 4.3.9 are on a *nix server and we don't have root access,
HOWEVER we can have the tech support perform pretty much any action except
re-compile PHP (for which they charge), but I'm hoping i could dynamically
load extensions during run-time.  I just need to know which extensions.

PHP has been compiled with unixODBC and dbx (there is no mssql extension on
the server).  These look like likely tools for a SQL server connection, but
nothing works.  I can't find anything about unixODBC in relation to PHP,
unless FreeTDS is mentioned as well.

I tried loading odbc.so during runtime, but it can't be found.  Same for
mssql.so.  Should we add these files to the extensions dir for use with
dl()?  Should we install FreeTDS?  Should we do both?

How can we do this without recompiling PHP?

I have the remote SQL server IP, the port number, the username and the
password.  The web server IP has been added to the allow list for the SQL
Server.

Any advice will be welcome.  Thanks in advance!

Leaning on the PHP list,
Jason


Re: [PHP] Connect to Sybase !

2006-11-29 Thread Chris

Le Phuoc Canh wrote:
Thanks Chris, I understand my problem, but can you show me where to find 
the libct.dll or where I can get libct.dll


Search for it.

"libct.dll sybase" returns a few results.

--
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] Connect to Sybase !

2006-11-29 Thread Le Phuoc Canh
Thanks Chris, I understand my problem, but can you show me where to find the
libct.dll or where I can get libct.dll

Thanks & Best Regard 

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 30, 2006 11:14 AM
To: Le Phuoc Canh
Cc: PHP Mailing
Subject: Re: [PHP] Connect to Sybase !

Le Phuoc Canh wrote:
>  
> Of course I know edit my php.ini, but the problem here that when I 
> test use
> sybase_connect() function and run by command line, a message "This 
> application has failed to start because libct.dll was not found".

..so it's not that php doesn't support it, it's that php can't get to the
sybase dll's.

Completely different issue.

Does the libct.dll file exist on your system? Is it in the environment path?

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


Re: [PHP] Connect to Sybase !

2006-11-29 Thread Chris

Le Phuoc Canh wrote:
 
Of course I know edit my php.ini, but the problem here that when I test use

sybase_connect() function and run by command line, a message "This
application has failed to start because libct.dll was not found". 


..so it's not that php doesn't support it, it's that php can't get to 
the sybase dll's.


Completely different issue.

Does the libct.dll file exist on your system? Is it in the environment path?

--
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] Connect to Sybase !

2006-11-29 Thread Le Phuoc Canh
 
Of course I know edit my php.ini, but the problem here that when I test use
sybase_connect() function and run by command line, a message "This
application has failed to start because libct.dll was not found". 

Can you help me to solve that problem.
BR

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 30, 2006 1:59 AM
To: Le Phuoc Canh
Cc: PHP Mailing
Subject: Re: [PHP] Connect to Sybase !

On Tue, November 28, 2006 8:01 pm, Le Phuoc Canh wrote:
> I want to make a connection to sybase database with PHP on win32 
> platform, but i can't recompile PHP with extension --with-cybase-ct. 
> Please help me

In the .zip file you downloaded for PHP, there should have been, hopefully,
a file named something like php_sybase.dll

If you fix up your php.ini and uncomment the line matching that, you'll get
the Sybase DLL loaded in.

Caveats:
You have to check with  where your php.ini file is, or is
supposed to be, and make sure you have a php.ini file in that directory, and
edit THAT php.ini file, and php.ini has to be readable by the user that PHP
is running as, and the DLL has to be in the directory named in php.ini and
the DLL also has to be readable/executable by the user running PHP.  Whew.
That's a lot of "gotchas" to stumble through for a newbie, but there it is.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?



Re: [PHP] Connect to Sybase !

2006-11-29 Thread Richard Lynch
On Tue, November 28, 2006 8:01 pm, Le Phuoc Canh wrote:
> I want to make a connection to sybase database with PHP on win32
> platform,
> but i can't recompile PHP with extension --with-cybase-ct. Please help
> me

In the .zip file you downloaded for PHP, there should have been,
hopefully, a file named something like php_sybase.dll

If you fix up your php.ini and uncomment the line matching that,
you'll get the Sybase DLL loaded in.

Caveats:
You have to check with  where your php.ini file is,
or is supposed to be, and make sure you have a php.ini file in that
directory, and edit THAT php.ini file, and php.ini has to be readable
by the user that PHP is running as, and the DLL has to be in the
directory named in php.ini and the DLL also has to be
readable/executable by the user running PHP.  Whew.  That's a lot of
"gotchas" to stumble through for a newbie, but there it is.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



[PHP] Connect to Sybase !

2006-11-28 Thread Le Phuoc Canh
Dear all,
I want to make a connection to sybase database with PHP on win32 platform,
but i can't recompile PHP with extension --with-cybase-ct. Please help me
!!!


Re: [PHP] Connect to AS400

2006-01-26 Thread James Lobley
On 1/26/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
>
> On Thu, January 26, 2006 2:23 pm, Justin Cook wrote:
> > We need to connect to a database on our AS400. Would this be best
> > accomplished with ODBC? If not, what is the preferred method? Thanks!
>
> The AS400 was discussed on this list, or possible on the predecessor
> list which was just [EMAIL PROTECTED] back in the day when there was
> only one PHP mailing list (not counting internal developer lists).
>
> As I recall, a straight ODBC connection was not quite enough, and some
> Voodoo had to be performed to get it to work, but it was possible.
>
> I also vaguely recall that the AS400 ended up being READ-ONLY, at
> least under one variant of that voodoo...


>From my experience, when the ODBC driver (for windows at least) is
installed, it defaults to read-only.
>From memory, this can be changed simply by ticking a check box to allow
writes.


Re: [PHP] Connect to AS400

2006-01-26 Thread James Lobley
On 1/26/06, Justin Cook <[EMAIL PROTECTED]> wrote:
>
> We need to connect to a database on our AS400. Would this be best
> accomplished with ODBC? If not, what is the preferred method? Thanks!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Talking from a Windows point of view, you will need the AS400 Client Access
software (or similar - I think it has a new name now!) installed on the
machine you are trying to connect from.

Once this is done, you need to set up a data source in ODBC - System DSN
works best, then use the standard ODBC calls within PHP to access the
database.

If you need further detail, I should be able to help you once I get to work
in about 8 hours!


Re: [PHP] Connect to AS400

2006-01-26 Thread Richard Lynch
On Thu, January 26, 2006 2:23 pm, Justin Cook wrote:
> We need to connect to a database on our AS400. Would this be best
> accomplished with ODBC? If not, what is the preferred method? Thanks!

The AS400 was discussed on this list, or possible on the predecessor
list which was just [EMAIL PROTECTED] back in the day when there was
only one PHP mailing list (not counting internal developer lists).

As I recall, a straight ODBC connection was not quite enough, and some
Voodoo had to be performed to get it to work, but it was possible.

I also vaguely recall that the AS400 ended up being READ-ONLY, at
least under one variant of that voodoo...

But this is going WAAY back in time, so you'll need to search the
archives to confirm.

But, for sure, some developers have faced and at least partially
solved this at some time in the past, so it's worth digging for it.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] Connect to AS400

2006-01-26 Thread Justin Cook
We need to connect to a database on our AS400. Would this be best accomplished 
with ODBC? If not, what is the preferred method? Thanks!

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



Re: [PHP] connect to MySql

2005-10-23 Thread Jasper Bryant-Greene
On Fri, 2005-10-21 at 12:06 -0700, hassan mahdi wrote:
> I have windows XP sevice pack 1 and 2, PHPv5.0.5, Mysql v1. I am working in 
> web design. I am unable to connect to the mysql server. Althought my php 
> files running fine and my mysql server is also running fine.

MySQL 1? Really? That's a *very* old version, you should really
upgrade :)

> i) i had changed the php.ini-dist file to php.ini.
> 
> ii)i uncommented the extensions of php_mysql.dll in php.ini file
> 
> iii)i set the 
> 
> extensions_dir to extension_dir = "D:\PHP\php-5.0.3\ext\" in php.ini file

If you're running PHP 5.0.5 then why is the directory called php-5.0.3?

> iv)i had copied the libmysql.dll in windows\system32 and windows\system i 
> wrote the following code:
> 
> [snip] 
> 
>  but after all these i am still getting the error Fatal error: Call to 
> undefined function mysql_connect() in D:\PHP\teknohub\new.php on line 14 
> please help me to solve this problem out.

Confirm that:

a) there exists a file php_mysql.dll in the directory D:\PHP\php-5.0.3
\ext

b) the php.ini file that you have been editing matches the one displayed
if you create a file containing  and view it with
your web browser

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: [EMAIL PROTECTED]
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand

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



Re: [PHP] connect to MySql

2005-10-23 Thread Larry E. Ullman
I have windows XP sevice pack 1 and 2, PHPv5.0.5, Mysql v1. I am  
working in web design. I am unable to connect to the mysql server.  
Althought my php files running fine and my mysql server is also  
running fine.


i) i had changed the php.ini-dist file to php.ini.
ii)i uncommented the extensions of php_mysql.dll in php.ini file
iii)i set the extensions_dir to extension_dir = "D:\PHP\php-5.0.3 
\ext\" in php.ini file
iv)i had copied the libmysql.dll in windows\system32 and windows 
\system
 but after all these i am still getting the error Fatal error: Call  
to undefined function mysql_connect() in D:\PHP\teknohub\new.php on  
line 14 please help me to solve this problem out.


You haven't successfully enabled MySQL support. You can confirm this  
by running a phpinfo() script. Did you restart Apache after editing  
the php.ini file? And are you certain you are editing the _right_  
php.ini file (the one indicated when you run phpinfo())?


Larry

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



[PHP] connect to MySql

2005-10-23 Thread hassan mahdi

Dear Sir

I have windows XP sevice pack 1 and 2, PHPv5.0.5, Mysql v1. I am working in web 
design. I am unable to connect to the mysql server. Althought my php files 
running fine and my mysql server is also running fine.

i) i had changed the php.ini-dist file to php.ini.

ii)i uncommented the extensions of php_mysql.dll in php.ini file

iii)i set the 

extensions_dir to extension_dir = "D:\PHP\php-5.0.3\ext\" in php.ini file

iv)i had copied the libmysql.dll in windows\system32 and windows\system i wrote 
the following code:



 

 but after all these i am still getting the error Fatal error: Call to 
undefined function mysql_connect() in D:\PHP\teknohub\new.php on line 14 please 
help me to solve this problem out.

 

Dr. Hassan

 

 




Hassan Al-Mahdi
Associate Lecture Of Computer Science
Department of Mathematics and Science
Faculty of Petroleum and Mining Engineering
Suez Canal University,
Suez, Egypt
Phone: not available now
Email: [EMAIL PROTECTED]
Website: http://hassan460.tripod.com

-
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: [PHP] connect to an access DB

2004-07-20 Thread zareef ahmed
HI Paul !

 You should create a DSN With odbc. Then use 
odbc functions of PHP.



visit 
http://in2.php.net/manual/en/ref.uodbc.php

zareef ahmed

--- Paul Kain <[EMAIL PROTECTED]> wrote:
> Anyone know the syntax to use to connect to a
> microsoft access db on my 
> c: drive?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=
Zareef Ahmed :: A PHP Developer in Delhi(India).
Homepage :: http://www.zasaifi.com




__
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

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



[PHP] connect to an access DB

2004-07-20 Thread Paul Kain
Anyone know the syntax to use to connect to a microsoft access db on my 
c: drive?

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



Re: [PHP] Connect to MS-SQL 2000

2004-03-13 Thread Filip de Waard
On Mar 13, 2004, at 6:01 PM, [EMAIL PROTECTED] wrote:
Can we control php direct connect to MS-SQL 2000 ( Another computer
machine ) ?
RTFM, http://www.php.net/ms_sql.

Regards,

Filip de Waard

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


[PHP] Connect to MS-SQL 2000

2004-03-13 Thread edwardspl
Dear you,

Can we control php direct connect to MS-SQL 2000 ( Another computer
machine ) ?

Thank for your help !!

Edward.

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



[PHP] connect between PHP?

2003-07-12 Thread Schna
Hey all

Im using PHP running as chat bot and running on Linux.

I really need use relay message between two PHP that running on same time.
(multiple PHP running on one server)
Is it possible that PHP running connect or value message to other PHP
running?

Thanks :)



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



[PHP] connect to MAS 90 & 200 with PHP

2003-07-07 Thread Joe Harman
I am curious if anyone is using PHP to connect to a MAS 90 or 200
database?? I am interested in any info on this if anyone has any...
 
THX,
Joe


Re: [PHP] Connect Active Directory using LDAP... please help :)

2003-07-02 Thread Ray Hunter
The big issue that you will face will be with getting the dn correct for
it to work..

I have connected to ldap exchange to do authentication and pull user
data and it was a real hassle to get the dn correct..

--
BigDog


On Tue, 2003-07-01 at 15:41, Vince C wrote:
> Hi everyone,
> 
> I tried to connect to Active Directory (AD) by using php. I heard that it
> could use LDAP to achieve it.  I have written some code on my machine
> (Win2000) and try to connect to AD.  It looks like the it could connect,
> bind, and even search (I determined base on the line I placed).  However, it
> return 0 entries.  If I used the same filter and use utilites "lpd.exe" on
> Windows 2000 Server (the AD machine).  I could return some entries. I am
> hestitating whether do I made some mistake on my program, or something other
> than my code.  Does anyone know what the problem is?  Any comment are
> welcome!  Thanks!
> 
> Vince
> 
> P.S. Here is my code:
> 
> 
> 
> 
>  Brand New Checking..  
> 
> 
> 
> 
> AD Test
> 
> 
>  $ldaphost= "company.com";
> 
> if(!($ldap = ldap_connect($ldaphost,389))){
>  die("ldap server cannot be reached");
> } else {
>  $oudc = " dc=company, dc=com";
>  $dn2 = "";
>  $password = "";
>  echo "Connected and ready to bind...";
>  if (!($res = @ldap_bind($ldap, $dn2, $password))) {
>   print(ldap_error($ldap) . "");
>   die ("Could not bind the $dn2");
>   echo "Couldn't bind ";
>  } else {
>   echo "Binded and Ready to search";
>   echo "LDAP = $ldap";
>   echo "oudc = $oudc";
> 
>  // $filter="(&(objectClass=user)(objectCategory=person)(|(sn=sorg)))";
>  $filter= "sn=*";
>   $sr=ldap_search($ldap,$oudc,$filter);
>   echo "number of entries found: " . ldap_count_entries($ldap, $sr) .
> "";
>   echo "filter = $filter";
>   echo "sr=$sr";
> 
>   if (!$sr) {
>die("search failed\n");
>   } else {
>echo " Searched and ready for get entries.";
>$info= ldap_get_entries($ldap, $sr);
> 
>for ($i=0; $i<$info["count"]; $i++) {
> print ("");
> print ("" . $info[$i]["cn"][0] . " " . $info[$i]["sn"][0]
> . "");
> print ("" . $info[$i]["mail"][0] . "");
> print ("");
> print "In the display FOR loop";
>}
>echo " After loop.";
>   }
>  }
>  ldap_unbind($ldap);
>  echo "LDAP unbinded";
> }
> 
> ?>
> 
> 
> 
> 
> 
> Thanks in advance!  Vince
> 
> 


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



[PHP] Connect Active Directory using LDAP... please help :)

2003-07-02 Thread Vince C
Hi everyone,

I tried to connect to Active Directory (AD) by using php. I heard that it
could use LDAP to achieve it.  I have written some code on my machine
(Win2000) and try to connect to AD.  It looks like the it could connect,
bind, and even search (I determined base on the line I placed).  However, it
return 0 entries.  If I used the same filter and use utilites "lpd.exe" on
Windows 2000 Server (the AD machine).  I could return some entries. I am
hestitating whether do I made some mistake on my program, or something other
than my code.  Does anyone know what the problem is?  Any comment are
welcome!  Thanks!

Vince

P.S. Here is my code:




 Brand New Checking..  




AD Test


Connected and ready to bind...";
 if (!($res = @ldap_bind($ldap, $dn2, $password))) {
  print(ldap_error($ldap) . "");
  die ("Could not bind the $dn2");
  echo "Couldn't bind ";
 } else {
  echo "Binded and Ready to search";
  echo "LDAP = $ldap";
  echo "oudc = $oudc";

 // $filter="(&(objectClass=user)(objectCategory=person)(|(sn=sorg)))";
 $filter= "sn=*";
  $sr=ldap_search($ldap,$oudc,$filter);
  echo "number of entries found: " . ldap_count_entries($ldap, $sr) .
"";
  echo "filter = $filter";
  echo "sr=$sr";

  if (!$sr) {
   die("search failed\n");
  } else {
   echo " Searched and ready for get entries.";
   $info= ldap_get_entries($ldap, $sr);

   for ($i=0; $i<$info["count"]; $i++) {
print ("");
print ("" . $info[$i]["cn"][0] . " " . $info[$i]["sn"][0]
. "");
print ("" . $info[$i]["mail"][0] . "");
print ("");
print "In the display FOR loop";
   }
   echo " After loop.";
  }
 }
 ldap_unbind($ldap);
 echo "LDAP unbinded";
}

?>





Thanks in advance!  Vince



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



RE: [PHP] Connect to oracle on another host

2002-10-01 Thread Todd Pasley

Try looking at the following paper, it looks very good.

http://conf.php.net/pres/slides/oci/paper.txt

HTH

Todd.

> -Original Message-
> From: Juan Antonio Ruiz Zwollo [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 2 October 2002 11:28 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Connect to oracle on another host
>
>
> Hi!
>
> I've been writing PHP scripts for a long time but never needed to get data
> from an Oracle database. Till now.
>
> Can somebody give me a hand? The Oracle database is running on another
> server.
>
> The information I have been given is:
>
> host (e.g.  somewhere.somewhere.com)
> username (e.g. USER_NAME)
> pw   (e.g. MY_PW)
> databse : PROD
> Function: F_CLAVE_SI_NO(loginnr)
>
> Basically what I need to do is contact this databsae, execute the function
> F_CLAVE_SI_NO($myloginnr), and get the results.
>
> The function F_CLAVE_SI_NO is a function from the Oractle database itself;
> it is no one written in PHP.
>
> Thank you for your help!
>
> Kind regards,
>
>
> Juan Antonio Ruiz Zwollo
> www.acalli.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] Connect to oracle on another host

2002-10-01 Thread Juan Antonio Ruiz Zwollo

Hi!

I've been writing PHP scripts for a long time but never needed to get data
from an Oracle database. Till now.

Can somebody give me a hand? The Oracle database is running on another
server.

The information I have been given is:

host (e.g.  somewhere.somewhere.com)
username (e.g. USER_NAME)
pw   (e.g. MY_PW)
databse : PROD
Function: F_CLAVE_SI_NO(loginnr)

Basically what I need to do is contact this databsae, execute the function
F_CLAVE_SI_NO($myloginnr), and get the results.

The function F_CLAVE_SI_NO is a function from the Oractle database itself;
it is no one written in PHP.

Thank you for your help!

Kind regards,


Juan Antonio Ruiz Zwollo
www.acalli.org






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




Re: [PHP] Connect() function

2002-02-01 Thread Lars Torben Wilson

On Fri, 2002-02-01 at 02:46, Jean-Arthur Silve wrote:
> Hi !
> 
> I m using PHP 4.0.5 and I try to create a function called "connect" :
> 
> function connect() {
> ...
> 
> }
> 
> My problem is I get this :
> 
> Fatal error: Cannot redeclare connect() in 
> /opt2/htdocs/www.mydomain.com/html/connexion.php on line 6

In PHP 4.0.5, the function currently known as socket_connect() was 
named connect().

You can solve your problem by upgrading, renaming your function, 
or disabling the socket functions (either at compile time or in
php.ini).


Cheers,

Torben

> In connexion.php there is only the function declaration and no require or 
> include.
> 
> I checked the PHP manual, and there is no connect() function !
> 
> Any idea ?
> 
> thank you !
> 
> Jean-arthur
> 
> 
> EuroVox
> 4, place Félix Eboue
> 75583 Paris Cedex 12
> Tel : 01 44 67 05 05
> Fax : 01 44 67 05 19
> Web : http://www.eurovox.fr
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
-- 
 Torben Wilson <[EMAIL PROTECTED]>
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Connect() function

2002-02-01 Thread David Otton

On Fri, 01 Feb 2002 11:46:27 +0100, you wrote:

>I m using PHP 4.0.5 and I try to create a function called "connect" :
>
>function connect() {
>...
>
>}
>
>My problem is I get this :
>
>Fatal error: Cannot redeclare connect() in 
>/opt2/htdocs/www.mydomain.com/html/connexion.php on line 6
>
>
>In connexion.php there is only the function declaration and no require or 
>include.

Works ok here.

Hmm... is auto_prepend_file set in php.ini?

Try grepping around and see if you can find anywhere a function called
connect is defined, and rename it. If that works, you know you've
found your culprit.

Does it work if you rename connect() to connectx()? If so, I'd change
it and try not to think about it too much ;)

djo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Connect() function

2002-02-01 Thread Jean-Arthur Silve

Hi !

I m using PHP 4.0.5 and I try to create a function called "connect" :

function connect() {
...

}

My problem is I get this :

Fatal error: Cannot redeclare connect() in 
/opt2/htdocs/www.mydomain.com/html/connexion.php on line 6


In connexion.php there is only the function declaration and no require or 
include.

I checked the PHP manual, and there is no connect() function !

Any idea ?

thank you !

Jean-arthur


EuroVox
4, place Félix Eboue
75583 Paris Cedex 12
Tel : 01 44 67 05 05
Fax : 01 44 67 05 19
Web : http://www.eurovox.fr



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Connect to Mail-Server

2002-01-25 Thread Martin Thoma

Hello! Somewhere I read something on how to connect to a mail-server
with php and to send and receive mails on a very "basic" level (calling
"Helo" to the mail-server and so on). Does anybody know, where I can get
those information exactly?

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Connect to IBM DB2

2002-01-06 Thread Casey Allen Shobe

Use IBMs DB2 Connect client and compile php --with-db2.  I use the server and 
the client on linux platforms and have never been so happy with database work 
;).

I've alse used iODBC with the db2 libraries to talk to DB2 with no real 
performance change.

- Casey

On Wednesday 02 January 2002 08:13 am, Jerry wrote:
> Now, how to connect to a DB2 database server without ODBC ?

-- 
Casey Allen Shobe
[EMAIL PROTECTED]

'Why do people with closed minds always open their mouths?'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Connect to IBM DB2

2002-01-06 Thread Maciej Uhlig

This is probably not what you want but I found at
http://www.php.net/manual/en/install.configure.php something like that:

--with-ibm-db2[=DIR]
Include IBM DB2 support. DIR is the DB2 base install directory, defaults to
/home/db2inst1/sqllib.

Maybe you can make use of it, I don't run IBM DB2.

Maciek

> -Original Message-
> From: Jerry [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 02, 2002 2:14 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP] Connect to IBM DB2

> Now, how to connect to a DB2 database server without ODBC ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Connect to IBM DB2

2002-01-02 Thread David Jackson

Jerry --
I didn't see any functions listed in:
http://www.php.net/manual/en/

for DB2 the ODBC maybe you only answers, heres the link:
http://www.php.net/manual/en/ref.odbc.php

David



> To connect to Microsoft SQL 7 I'm using the following script which
> works fine:
> 
>  $query="SELECT * FROM DB1";
> $queryupd="UPDATE DB1 SET dateval='20010101' where dateval='2101'";
> $hostname = "dbserver";
> $username = "username";
> $password = "pwd";
> $dbName = "DB";
> mssql_connect($hostname,$username,$password) or die("DATABASE FAILED TO
> RESPOND.");
> mssql_select_db($dbName) or DIE("Table unavailable");
> $result2 = MSSQL_QUERY($queryupd); // Execute Update Statment
> $result = MSSQL_QUERY($query);  // Execute Select Statment
> $number = MSSQL_NUM_ROWS($result);
> $i=0;
> if($number == 0) print "No data?";
> elseif($number > 0){
> print "Number of rows: $number";
> while($i < $number){
> $dateval = mssql_result($result,$i,"dateval");
> echo "$dateval";
> $i++;}
> }
> ?>
> 
> Now, how to connect to a DB2 database server without ODBC ?
> 
> My config is:
> Web Server: IIS on windows 2000 Server
> Database Server: IBM DB2 V7.1 on windows 2000 Server
> PHP4 for windows
> 
> Thanks.
> 
> Jerry
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]


-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Connect to IBM DB2

2002-01-02 Thread Jerry

To connect to Microsoft SQL 7 I'm using the following script which works
fine:

 0){
 print "Number of rows: $number";
while($i < $number){
 $dateval = mssql_result($result,$i,"dateval");
echo "$dateval";
 $i++;}
}
?>

Now, how to connect to a DB2 database server without ODBC ?

My config is:
Web Server: IIS on windows 2000 Server
Database Server: IBM DB2 V7.1 on windows 2000 Server
PHP4 for windows

Thanks.

Jerry



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] connect MS Access

2002-01-02 Thread Paul Roberts

yes you can connect via ODBC.
- Original Message - 
From: "Matt Friedman" <[EMAIL PROTECTED]>
To: "'gendeng'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 02, 2002 3:32 AM
Subject: RE: [PHP] connect MS Access


Please do not send html emails to this list. 

Send only plain text emails.

Matt Friedman


-Original Message-
From: gendeng [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday January 1, 2002 8:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] connect MS Access

halo... i want to know about connect to database. can php (for windows)
connect to MS Access.

Mpu Strees





IncrediMail - Email has finally evolved - Click Here



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] connect

2002-01-01 Thread gendeng








  halo... i want to know about connect to database. can php (for 
  windows) connect to MS Access ?. Mpu 
  Strees







  
IncrediMail - Email has finally evolved - Click 
Here

RE: [PHP] connect MS Access

2002-01-01 Thread Matt Friedman

Please do not send html emails to this list. 

Send only plain text emails.

Matt Friedman


-Original Message-
From: gendeng [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday January 1, 2002 8:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] connect MS Access

halo... i want to know about connect to database. can php (for windows)
connect to MS Access.
 
Mpu Strees





  IncrediMail - Email has finally evolved - Click Here



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] connect MS Access

2002-01-01 Thread gendeng








  halo... i want to know about connect to database. can php (for 
  windows) connect to MS Access.
   
  Mpu Strees







  
IncrediMail - Email has finally evolved - Click 
Here

Re: [PHP] connect to a file outside the web space.

2001-12-15 Thread Jack Dempsey

how exactly do you want to connect to it? if you want to link to it in html, then
it must be under the html doc root...if you're including, then you can specifiy
the path...

Webleycity wrote:

> Hello All
>
> If one creates a file outside the web space on a server. How doe's one
> connect to this from a HTML or PHP page?
>
> As I understand it. It is not as simple as normal html link.
>
> ---
> Mark Webley
> Multimedia design and development
>
> WebleyCity Limited
> London  United Kingdom
>
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Mobile: 07980 213 627
>
> Fax/Tel: 0208 678 1721
> Pager 07654 581816
> http://www.webleycity.co.uk
> ---
>
> > From: Webleycity <[EMAIL PROTECTED]>
> > Date: Sat, 15 Dec 2001 21:44:22 +
> > To: James Stewart <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> > Subject: Re: [PHP] Need high bandwidth provider for my Asian community site
> >
> > What bandwidth would you like?
> >
> > 
> > | Website design and hosting. |
> > | Your free website trial including design and webspace, contact: |
> > [EMAIL PROTECTED]
> > Visit: http://www.webleycity.co.uk/offers
> > ---
> >
> > WEBLEYCITY CAN DESIGN YOUR WEBSITE TO YOUR EXISTING
> > CORPORATE IDENTITY OR CREATE ONE FOR YOU
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ---
> > Mark Webley
> > Multimedia design and development
> >
> > WebleyCity Limited
> > London  United Kingdom
> >
> > [EMAIL PROTECTED]
> > [EMAIL PROTECTED]
> > Mobile: 07980 213 627
> >
> > Fax/Tel: 0208 678 1721
> > Pager 07654 581816
> > http://www.webleycity.co.uk
> > ---
> >
> >
> >
> >
> >> From: James Stewart <[EMAIL PROTECTED]>
> >> Date: Thu, 13 Dec 2001 18:34:31 +
> >> To: [EMAIL PROTECTED]
> >> Subject: Re: [PHP] Need high bandwidth provider for my Asian community site
> >>
> >> On Thursday, December 13, 2001, at 06:14 PM, l0t3k wrote:
> >>> Sunny,
> >>> AFAICR,  is for Netscrape, which apparently cant understand
> >>> 
> >>> for some reason..
> >>
> >> It's not a browser thing...
> >>
> >>  is the correct syntax for a line break in XHTML. All tags must be
> >> closed, hence the / and the white space is necessary to separate the
> >> element name from its closure.
> >>
> >> All major browsers will recognise  but if you want to be XHTML
> >> compliant,  should be used.
> >>
> >> James.
> >>
> >> --
> >> James Stewart
> >> http://www.britlinks.co.uk
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] connect to a file outside the web space.

2001-12-15 Thread Webleycity

Hello All

If one creates a file outside the web space on a server. How doe's one
connect to this from a HTML or PHP page?

As I understand it. It is not as simple as normal html link.


---
Mark Webley
Multimedia design and development

WebleyCity Limited 
London  United Kingdom

[EMAIL PROTECTED]
[EMAIL PROTECTED]
Mobile: 07980 213 627

Fax/Tel: 0208 678 1721
Pager 07654 581816
http://www.webleycity.co.uk
---




> From: Webleycity <[EMAIL PROTECTED]>
> Date: Sat, 15 Dec 2001 21:44:22 +
> To: James Stewart <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Need high bandwidth provider for my Asian community site
> 
> What bandwidth would you like?
> 
> 
> | Website design and hosting. |
> | Your free website trial including design and webspace, contact: |
> [EMAIL PROTECTED]
> Visit: http://www.webleycity.co.uk/offers
> ---
> 
> WEBLEYCITY CAN DESIGN YOUR WEBSITE TO YOUR EXISTING
> CORPORATE IDENTITY OR CREATE ONE FOR YOU
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---
> Mark Webley
> Multimedia design and development
> 
> WebleyCity Limited
> London  United Kingdom
> 
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Mobile: 07980 213 627
> 
> Fax/Tel: 0208 678 1721
> Pager 07654 581816
> http://www.webleycity.co.uk
> ---
> 
> 
> 
> 
>> From: James Stewart <[EMAIL PROTECTED]>
>> Date: Thu, 13 Dec 2001 18:34:31 +
>> To: [EMAIL PROTECTED]
>> Subject: Re: [PHP] Need high bandwidth provider for my Asian community site
>> 
>> On Thursday, December 13, 2001, at 06:14 PM, l0t3k wrote:
>>> Sunny,
>>> AFAICR,  is for Netscrape, which apparently cant understand
>>> 
>>> for some reason..
>> 
>> It's not a browser thing...
>> 
>>  is the correct syntax for a line break in XHTML. All tags must be
>> closed, hence the / and the white space is necessary to separate the
>> element name from its closure.
>> 
>> All major browsers will recognise  but if you want to be XHTML
>> compliant,  should be used.
>> 
>> James.
>> 
>> --
>> James Stewart
>> http://www.britlinks.co.uk
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] connect to sybase

2001-09-26 Thread Krzysztof Kocjan

Can You describe more detail ??? What kind, version of Sybase server do
You use, what version of PHP, what Linux distribution etc... In other
case I can't help You.

Krzysztof Kocjan

Edney Marcel Imm wrote:

> Hi
>
> How I can connect to syBase?
>
> Tks


--
Sprawdz, jak fantazja staje siê rzeczywistoscia...
> http://final-fantasy.interia.pl/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] connect to sybase

2001-09-25 Thread Edney Marcel Imm

Hi

How I can connect to syBase?

Tks



[PHP] mod_perl + PHP, connect to MySQL -> segfault (signal 11)

2001-07-26 Thread ard


Heya folks.

A few months ago my Apache children were crashing when they attempted a
connect() to a MySQL database from mod_perl scripts, but only when PHP
was compiled into Apache.  There was no solution at the time, so we
ditched PHP.

Now we have a need for PHP once more, and I've moved to the latest
versions of everything (except MySQL, see below), and mod_perl scripts
that have been running happily for months are segfaulting once more.

So here we go again.

Apache 1.3.20 has PHP and mod_perl included statically:

Compiled-in modules:
  http_core.c
  mod_so.c
  mod_perl.c
  mod_php4.c


PHP 4.0.6 configured with:

./configure --with-mysql=/usr/local --with-gd=/usr/local \
--enable-force-cgi-redirect \
--with-apache=../apache_1.3.20 --with-png-dir=/usr \
--with-zlib-dir=/usr --with-jpeg-dir=/usr

("--with-*-dir=/usr" seem unnecessary, but PHP won't configure properly
without them)

Hopefully PHP is using the MySQL client library and not its own support,
as shown by:

# ldd /usr/local/apache/bin/httpd 
libdl.so.2 => /lib/libdl.so.2 (0x40017000)
>   libmysqlclient.so.10 => /usr/local/lib/mysql/libmysqlclient.so.10 (0x4001b000)
libz.so.1 => /usr/lib/libz.so.1 (0x40036000)
libgd.so.4 => /usr/local/lib/libgd.so.4 (0x40045000)
libpng.so.2 => /usr/lib/libpng.so.2 (0x40075000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x4009c000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x400bb000)
libresolv.so.2 => /lib/libresolv.so.2 (0x400e9000)
libm.so.6 => /lib/libm.so.6 (0x400f7000)
libnsl.so.1 => /lib/libnsl.so.1 (0x40113000)
libdb.so.3 => /lib/libdb.so.3 (0x40128000)
libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40161000)
libc.so.6 => /lib/libc.so.6 (0x40167000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000)

mod_perl-1.26

Both mysql 3.23.36 and 3.23.30gamma.


Many people have suffered this in the past, but I haven't seen a solution
yet.  Are the PHP and mod_perl camps playing tennis with this one, or
(please oh please) is there an easy solution?

Many thanks in advance -

-- 
_
Andrew Donkin  Waikato University, Hamilton,  New Zealand

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] connect() vs. pconnect()

2001-07-04 Thread Vikram Vaswani

Hi,

I need some help with a class that I am writing.

class myclass
{
function query($query)
{
// connect
$connection = mysql_connect($this->hostname, $this->user, $this->pass) or
die ("Cannot connect to database");
// run query
$ret = mysql_db_query($this->db, $query, $connection) or die ("Error in
query: $query");
// return result identifier
return $ret;
}

// function: get label for $id
// returns: string
function get_label($id)
{
$query = "SELECT label FROM $this->table WHERE id = '$id'"; 
$result = $this->query($query);
$row = mysql_fetch_row($result);
return $row[0];
}

// function: get link for $id
// returns: string
function get_link($id)
{
$query = "SELECT link FROM $this->table WHERE id = '$id'";  
$result = $this->query($query);
$row = mysql_fetch_row($result);
return $row[0];
}


// function: execute query $query
// returns: result identifier

}

In this class, I have a query() method which accepts a query and returns a
result identifier. All the other class methods use this to run SQL queries.

Now, if I had the following code:

get_link(29) . ">" . $a->get_label(29) . "";
?>

Would two different connections be opened to the DB for the two method calls?

If so, is this optimal?

I suspect it is not. Someone has suggested using mysql_pconnect() in my
query() method - is this better? Why?

If I use pconnect() - how and when will the connection close? Does this
happen automatically?

TIA,

Vikram
--
I took an IQ test, and the results were negative.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Connect local->remote

2001-03-27 Thread David Robley

On Tue, 27 Mar 2001 18:48, Jochen Kaechelin wrote:
> how can I connect to a remote-database from
> my local dos-window?
>
> I use the following without success:
>
> mysql -u XXX -h mysql-XXX -p -D 
>
>
> Jochen Kaechelin

Should you not have a full hostname as the argument for -h ?

-- 
David Robley| WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet| http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Connect local->remote

2001-03-27 Thread Jochen Kaechelin

how can I connect to a remote-database from
my local dos-window?

I use the following without success:

mysql -u XXX -h mysql-XXX -p -D 


Jochen Kaechelin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Could PHP connect to Perl Program

2001-02-02 Thread Jamie Alessio

>   I would like to use a Perl Program to call PHP to do sth. Could I do that?
>   Also, could I use PHP program to call a Perl Program?
>
You could just run the command using the system() function.

http://www.php.net/manual/en/function.system.php

- Jamie


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Could PHP connect to Perl Program

2001-02-02 Thread kn4279

Dear Sir,
  Would you mind solving my problem?
  I would like to use a Perl Program to call PHP to do sth. Could I do that?
  Also, could I use PHP program to call a Perl Program?

Thank you very much,
Kevin


===
·s®ö§K¶O¹q¤l¶l½c http://sinamail.sina.com.hk 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Connect with user and pwd from PHP to MySql !!!

2001-01-11 Thread Yoeri De Bruyn

That one was really helpfull!

Thanxxx!!!
Yoeri.

Try :


MySQL Administration   :

http://devshed.com/Server_Side/MySQL/Administration/



Philip


On Thu, 11 Jan 2001, Yoeri De Bruyn wrote:

> Hi,
> 
> I've been looking on the cool web, but up till now I got only complex
> explanations about how to create users in mysql.
> I know it's more a MySQL question, but since lots of you are using
this
> DB, maybe someone can just send me an example on how to create on a
> proper way (straight forward) users. The meaning is to consolidate the
> DB like:
> 
> $connection = mysql_connect("localhost","nobody","dummy")
>   or die("Couldn't connect to server.");
> $db = mysql_select_db("searchDB", $connection) 
>   or die("Couldn't select database. Mysql said: "
> .mysql_error());
> 
> I tried to add a user with password and host in the myql database and
> supposed to be able to use thatone for the searchDB database?
> 
> Hope this doesn't sound to stupid at all!
> 
> Thanks a lot for any trick or usefull example!
> Yoeri.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Connect with user and pwd from PHP to MySql !!!

2001-01-11 Thread Philip Olson

Try :


MySQL Administration   :

http://devshed.com/Server_Side/MySQL/Administration/



Philip


On Thu, 11 Jan 2001, Yoeri De Bruyn wrote:

> Hi,
> 
> I've been looking on the cool web, but up till now I got only complex
> explanations about how to create users in mysql.
> I know it's more a MySQL question, but since lots of you are using this
> DB, maybe someone can just send me an example on how to create on a
> proper way (straight forward) users. The meaning is to consolidate the
> DB like:
> 
> $connection = mysql_connect("localhost","nobody","dummy")
>   or die("Couldn't connect to server.");
> $db = mysql_select_db("searchDB", $connection) 
>   or die("Couldn't select database. Mysql said: "
> .mysql_error());
> 
> I tried to add a user with password and host in the myql database and
> supposed to be able to use thatone for the searchDB database?
> 
> Hope this doesn't sound to stupid at all!
> 
> Thanks a lot for any trick or usefull example!
> Yoeri.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Connect with user and pwd from PHP to MySql !!!

2001-01-11 Thread Hsieh, Wen-Yang


http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#GRA
NT

- Original Message -
From: "Yoeri De Bruyn" <[EMAIL PROTECTED]>
To: "phpGeneralList (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, January 11, 2001 1:24 AM
Subject: [PHP] Connect with user and pwd from PHP to MySql !!!


Hi,

I've been looking on the cool web, but up till now I got only complex
explanations about how to create users in mysql.
I know it's more a MySQL question, but since lots of you are using this
DB, maybe someone can just send me an example on how to create on a
proper way (straight forward) users. The meaning is to consolidate the
DB like:

$connection = mysql_connect("localhost","nobody","dummy")
or die("Couldn't connect to server.");
$db = mysql_select_db("searchDB", $connection)
or die("Couldn't select database. Mysql said: "
.mysql_error());

I tried to add a user with password and host in the myql database and
supposed to be able to use thatone for the searchDB database?

Hope this doesn't sound to stupid at all!

Thanks a lot for any trick or usefull example!
Yoeri.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Connect with user and pwd from PHP to MySql !!!

2001-01-11 Thread Yoeri De Bruyn

Hi,

I've been looking on the cool web, but up till now I got only complex
explanations about how to create users in mysql.
I know it's more a MySQL question, but since lots of you are using this
DB, maybe someone can just send me an example on how to create on a
proper way (straight forward) users. The meaning is to consolidate the
DB like:

$connection = mysql_connect("localhost","nobody","dummy")
or die("Couldn't connect to server.");
$db = mysql_select_db("searchDB", $connection) 
or die("Couldn't select database. Mysql said: "
.mysql_error());

I tried to add a user with password and host in the myql database and
supposed to be able to use thatone for the searchDB database?

Hope this doesn't sound to stupid at all!

Thanks a lot for any trick or usefull example!
Yoeri.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Connect problem

2001-01-10 Thread Brian Clark


Hello Maximiliano, 

(MB == "Maximiliano Bubenick") [EMAIL PROTECTED] writes:

MB> I run linux red hat 6.2 with apache 1.3.12, php4 and mysql 3.22.32

MB> The first time my problem was Call to undefined function:
MB> mysql_connect(), and I add the line dl("mysql.so"); and then bring
MB> me:

Why put yourself through that abuse? :-)

Just build PHP with MySQL support.

./configure --with-mysql [other options here]



MB> Thanks
MB> Max

-Brian
--
The trouble with a lot of self-made men
is that they worship their creator.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Connect problem

2001-01-09 Thread Maximiliano Bubenick

Hi

I run linux red hat 6.2 with apache  1.3.12,  php4 and mysql 3.22.32

The first time my problem was Call to undefined function: mysql_connect(), and I add 
the line dl("mysql.so"); 
and then bring me: 

 Warning: Unable to load dynamic library '/usr/lib/php4/mysql.so' - undefined symbol: 
Perl_markstack_ptr 

how can I resolv that?

Thanks
Max