[PHP-DB] anonymous select error

2004-06-15 Thread Joshuah Goldstein

To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

I'm trying this query:

$link = mysql_connect( $site, $id, $pass );
if (!$link) {
   die('Could not connect: ' . mysql_error());
}
echo 'Connected successfullybr';

$db = mysql_select_db( $dbname, $link);
if( !$db ) {
   echo DB falsebr;
   exit;
}

$result = mysql_query( 'Select * From
newsletter_subscribers;', $db );

if (!$result) {
   echo DB Error, could not list tablesbr;
   echo 'MySQL Error: ' . mysql_error();
   exit;
}


with this output:

Connected successfully
DB Error, could not list tables
MySQL Error:

I dont understand why there is an error, but it prints
nothing for the error.  Any ideas?  Thanks, Josh




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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



Re: [PHP-DB] Oracle Client Libraries for Linux

2004-06-15 Thread Christopher Jones
Peter Beckman wrote:
 How do I get connected from a remote PHP+Apache box to Oracle9i on linux?
The current Oracle Instant Client bundle is fine for using PHP on
Windows, but does not have headers for compiling PHP with Oracle
support on other platforms.  An Instant Client SDK with headers is
coming soon I'm told, so scenarios like yours will be made a lot
simpler.
In the meantime, to link with Oracle 9i drivers, download the
Oracle9i Database Release 2, run the installer and choose the
Client option.  Without knowing your hardware, I'd guess along with
you that you want the 9.2.0.4 bundle marked Enterprise/Standard
Edition for Linux New.
For Oracle 10g drivers download the Oracle Database 10g Client
Release, run the installer and choose the Administrator option.
I'd go with the 10g option.
There are some documents (including one on PHP/Oracle/Linux) that may
help at http://otn.oracle.com/tech/opensource/index.html
Chris
Peter Beckman wrote:
Folks --
I've been trying to figure out where the Oracle client libraries live, but
I'm confused as hell.
I've read the PHP-DB archives, and everyone keeps talking about installing
the client libraries (libclntsh et al), and how that's all you need for
Oracle 9i PHP support.  Great -- but which options presented horribly by
Oracle do I download?
On this page:
http://otn.oracle.com/software/products/oracle9i/index.html
It lists:
   Oracle9i Release 2 (9.2.0.4)
Oracle9i Database Release 2 Enterprise/Standard Edition for Linux x86-64 New 
(03-May-04)
Oracle9i Database Release 2 Enterprise/Standard Edition for Linux New 
(26-Mar-04)
Oracle9i Release 2 (9.2.0.2)
Oracle9i Database Release 2 Enterprise/Standard/Personal/Client Edition for 
Windows XP 2003/Windows Server 2003 (64-bit)
Oracle9i Database Release 2 Enterprise/Standard Edition for HP-UX/IA64 
(v9.2.0.2)
Oracle9i Database Release 2 Enterprise/Standard Edition for HP Alpha OpenVMS
Oracle9i Database Release 2 Enterprise/Standard Edition for Linux/IA64, 
Release 2 (v9.2.0.2)
Oracle9i Release 2 (9.2.0.1)
Oracle9i Database Release 2 Enterprise/Standard/Personal/Client Edition for 
Windows Server 2003 (32-bit)
Oracle9i Database Release 2 Enterprise/Standard/Personal Edition for Windows 
NT/2000/XP
Oracle9i Database Release 2 Enterprise/Standard Edition for Sun SPARC Solaris 
(32-bit)
Oracle9i Database Release 2 Enterprise Edition for Sun SPARC Solaris (64-bit)
Oracle9i Database Release 2 Enterprise/Standard Edition for HP-UX
Oracle9i Database Release 2 Enterprise/Standard Edition for Compaq Tru64
Oracle9i Database Release 2 Enterprise/Standard Edition for AIX
Oracle9i Database Release 2 Enterprise/Standard Edition for AIX-Based 5L 
Systems
Oracle9i Database Release 2 Enterprise Edition for Linux/390
Oracle9i Database Release 2 Client for Windows 98/NT/2000/XP
Oracle9i Release 2 - Developer's Releases
Oracle9i Database Release 2 for IBM Power based Linux New! [01-Dec-03]
Oracle9i Developer Release 1 (9.2.0.3.0) for Linux / AMD64
Oracle9i Database Release 2 Enterprise Edition for Apple Mac OS X Version 10.2 
Jaguar
Oracle9i Release 1 (9.0.1)
Oracle9i Release 1 (9.0.1) Enterprise Edition (all platforms)
Oracle9i Personal Edition for Microsoft Windows 98
Oracle9i Release 1 - Developer's Releases
Oracle9i Enterprise Edition for z/Linux, Release 1 - Developer's Release
I'm running Linux RH Enterprise 3 on this server, and the Oracle box is
remote.  My original assumption is to download the second link, 9iR2 for
Linux.  However, this is 1.5GB worth of a download for three friggin
drivers.  What the hell?
All of the clients are for Windows, Even the 9.0.1 release is 1.1GB.
What do I need to download from Oracle to get the drivers for PHP?  Please
don't just say go to otn.oracle.com and download the client because I've
been there and cannot for the life of me find it.
I don't have the ability to display X Windows remotely, so whatever
solution has got to be command line.  I'm at my wits end!
I've installed Instant Client, so I have the 10g libraries:
/usr/lib/oracle/10.1.0.2/client/lib -- ll
total 109664
drwxr-xr-x2 root root 4096 Jun 14 12:36 ./
drwxr-xr-x4 root root 4096 Jun 14 12:36 ../
-rw-r--r--2 root root  1417242 Feb 23 19:32 classes12.jar
-rw-r--r--1 root root 1353 Feb 23 19:32 glogin.sql
-rwxr-xr-x2 root root 13347415 Feb 23 19:32 libclntsh.so.10.1*
-rw-r--r--2 root root  2838283 Feb 23 19:32 libnnz10.so
-rw-r--r--2 root root   969980 Feb 23 19:32 libocci.so.10.1
-rwxr-xr-x2 root root 91345295 Feb 23 19:32 libociei.so*
-rw-r--r--2 root root96117 Feb 23 19:32 libocijdbc10.so
-rw-r--r--1 root root   759920 Feb 23 19:32 libsqlplus.so

[PHP-DB] Re: Delete Subquery

2004-06-15 Thread Rui Cunha
...I want to be able to delete a rowid from the ROLES TABLE, but only if 
the roleid does not exist in the USERS TABLE... 

DELETE FROM roles
WHERE roleid NOT IN ( SELECT DISTINCT roleid FROM users); 

Rui 

Chris Bolt writes: 

How about: 

DELETE FROM users WHERE userid IN (SELECT u.userid FROM users AS u
LEFT JOIN roles AS r ON (u.roleid = r.roleid) WHERE r.roleid IS NULL
LIMIT 1); 

On Mon, 14 Jun 2004 11:59:25 -0400, Brock Jimmy D Contr 74 MDSS/SGSI
[EMAIL PROTECTED] wrote:
I've been able to figure how to use a delete subquery to delete all rows, but how do I use a delete subquery to delete only one row? 

I have two tables: users and roles with the following fields: 

Users: 

userid 

roleid 

Roles: 

roleid 

I want to be able to delete a rowid from the roles table, but only if the roleid does not exist in the users table. 

thanks 



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


[PHP-DB] Beta Testers Needed

2004-06-15 Thread Kenny
Hi All,
 
I am currently looking for beta testers to test my server monitoring
software,
 
Brief synopsis of what it entails,
 
Install a small (2.92 k) file on your web server
Add either a new db or use and existing db this will only be 1 table
with minimal information just basically holding your Key
 
What I will monitor
 
Server Load averages
Server Uptime
HTTP
PHP
MySQL
 
If any of these services go down then I will automatically send you an
alert to your e-mail address, (For the testing phases we will not be
sending SMS alerts)
 
I will generate graphs indicating load averages and server outages
I will send daily reports telling you how the web server is performing.
 
The testing phase will last approx 1 month but you can terminate at any
time if you wish to
There is no payment involved either from my side or yours.
 
We are initially looking for 50 testers but this could increase in the
future,
 
Please only *nix servers for now running Apache / MySQL / PHP 
 
Please send your interest off the list to [EMAIL PROTECTED] and I will send
you full instructions on how we would like to proceed and when the
testing will start
 
Thanks
 
Kenny
 
 


RE: [PHP-DB] Beta Testers Needed

2004-06-15 Thread Kenny
Sorry all

The e-mail address is [EMAIL PROTECTED]


-Original Message-
From: Kenny [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 11:44
To: DBList
Subject: [PHP-DB] Beta Testers Needed

Hi All,
 
I am currently looking for beta testers to test my server monitoring
software,
 
Brief synopsis of what it entails,
 
Install a small (2.92 k) file on your web server
Add either a new db or use and existing db this will only be 1 table
with minimal information just basically holding your Key
 
What I will monitor
 
Server Load averages
Server Uptime
HTTP
PHP
MySQL
 
If any of these services go down then I will automatically send you an
alert to your e-mail address, (For the testing phases we will not be
sending SMS alerts)
 
I will generate graphs indicating load averages and server outages
I will send daily reports telling you how the web server is performing.
 
The testing phase will last approx 1 month but you can terminate at any
time if you wish to
There is no payment involved either from my side or yours.
 
We are initially looking for 50 testers but this could increase in the
future,
 
Please only *nix servers for now running Apache / MySQL / PHP 
 
Please send your interest off the list to [EMAIL PROTECTED] and I will send
you full instructions on how we would like to proceed and when the
testing will start
 
Thanks
 
Kenny
 
 

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



[PHP-DB] Re: anonymous select error

2004-06-15 Thread franciccio
Here is the lean, corrected code:
?php
$link = mysql_connect( $site, $id, $pass ) or die (error connecting);
echo 'connection okbr';
mysql_select_db( $dbname, $link) or die (eror selecting db);
echo 'selected db ok'br;
$result = mysql_query( 'Select * From newsletter_subscribers',$link) or die
(error query);
// some here code to disply result
?
It is easier to evaluate each time the return of the functions using the
expression or die
Also some sintax error:
resource mysql_query(string query [, connection id], int result mode])
you used the mysql_select_db() return instead of mysql_connect() return
value (altough it is optional), also it is not necessary to write ; at the
end of the query string inside the function.

Bye


Joshuah Goldstein [EMAIL PROTECTED] ha scritto nel messaggio
news:[EMAIL PROTECTED]

 To: [EMAIL PROTECTED]
 MIME-Version: 1.0
 Content-Type: text/plain; charset=us-ascii

 I'm trying this query:

 $link = mysql_connect( $site, $id, $pass );
 if (!$link) {
die('Could not connect: ' . mysql_error());
 }
 echo 'Connected successfullybr';

 $db = mysql_select_db( $dbname, $link);
 if( !$db ) {
echo DB falsebr;
exit;
 }

 $result = mysql_query( 'Select * From
 newsletter_subscribers;', $db );

 if (!$result) {
echo DB Error, could not list tablesbr;
echo 'MySQL Error: ' . mysql_error();
exit;
 }


 with this output:

 Connected successfully
 DB Error, could not list tables
 MySQL Error:

 I dont understand why there is an error, but it prints
 nothing for the error.  Any ideas?  Thanks, Josh




 __
 Do you Yahoo!?
 Friends.  Fun.  Try the all-new Yahoo! Messenger.
 http://messenger.yahoo.com/


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



Re: [PHP-DB] anonymous select error

2004-06-15 Thread Daniel Clark
I'm not sure you need a semi-colon after the table name.

$result = mysql_query( 'Select * From newsletter_subscribers', $db );


To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

I'm trying this query:

$link = mysql_connect( $site, $id, $pass );
if (!$link) {
   die('Could not connect: ' . mysql_error());
}
echo 'Connected successfullybr';

$db = mysql_select_db( $dbname, $link);
if( !$db ) {
   echo DB falsebr;
   exit;
}

$result = mysql_query( 'Select * From
newsletter_subscribers;', $db );

if (!$result) {
   echo DB Error, could not list tablesbr;
   echo 'MySQL Error: ' . mysql_error();
   exit;
}


with this output:

Connected successfully
DB Error, could not list tables
MySQL Error:

I dont understand why there is an error, but it prints
nothing for the error.  Any ideas?  Thanks, Josh




[PHP-DB] php5 mysql

2004-06-15 Thread landic
I want to mysql on apache2 with php5 under winxp.
When I use apache 1.3 and start mysql in php.ini =
extension=php_mysql.dll - it is OK
but when I use apache2 - then i see error PHP Startup: Unable to load
dynamic library c:\php\ext\php_mysql.dll
in php.ini is extension to c:\php\ext, and file on disk is also in
c:\php\ext, and I copy libmysql.dll from php5.0.0rc3 package to windows,
windows/system32, windows/system.
Where is the mistake?
thanks

Kamil Landa
icq 94850674
http://landic.mysteria.cz

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



[PHP-DB] Connecting to Oracle DB on antother server

2004-06-15 Thread Beni Buess
Hi,
I'm trying to connect to an oracle database which is itself on antother
server than php is running. on the php machine is an oracle client
succesfully installed.
i've tried the different functions to connect to oracle:
ociplogon('user','pass');
as well as ocinlogon, both with and without the optional third
parameter, where i gave the name of the entry in tnsnames.ora as well as
the value of ORACLE_SID.
i always got a following error message:
Warning: ociplogon() [function.ociplogon]: _oci_open_server: Error while
trying to retrieve text for error ORA-12154
could anybody point me to the right direction, or is there somebody who
has already done such a connection and could give me an example.
thanks a lot...
Beni

This message may contain legally privileged or confidential 
information and is therefore addressed to the named persons only. 
The recipient should inform the sender and delete this message, 
if he/she is not named as addressee. 
The sender disclaims any and all liability for the integrity 
and punctuality of this message. 
The sender has activated an automatic virus scanning by 
Messagelabs, but does not guarantee the virus free 
transmission of this message.

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


Re: [PHP-DB] Connecting to Oracle DB on another server

2004-06-15 Thread roy . a . jones
Beni ... I am using the same setup as you are describing ... Here is my 
connect information ...

OCILogon($username,$password,$tns_alias)

The error that you are getting ORA-12154 has the following text on a 
lookup ... This leads me to believe that php is unable to find your 
tnsnames.ora file or the tns entry is invalid.  I would try to connect to 
your DB from sqlplus from your php server [ sqlplus 
username/[EMAIL PROTECTED] ].

[oracle @ usphdba]: oerr ora 12154
12154, 0, TNS:could not resolve service name
// *Cause:  The service name specified is not defined correctly in the
// TNSNAMES.ORA file.
// *Action:  Make the following checks and correct the error:
//   - Verify that a TNSNAMES.ORA file exists and is in the proper
// place and accessible. See the operating system specific 
manual
// for details on the required name and location.
//   - Check to see that the service name exists in one of the
// TNSNAMES.ORA files and add it if necessary.
//   - Make sure there are no syntax errors anywhere in the file.
// Particularly look for unmatched parentheses or stray 
characters.
// Any error in a TNSNAMES.ORA file makes it unusable. See
// Chapter 4 in the SQL*Net V2 Administrator's Guide. If
// possible, regenerate the configuration files using the 
Oracle
// Network Manager.



Roy A. Jones 
US Pharma Database Administration 
GlaxoSmithKline Inc. US Pharma IT, Shared Services 
Email: [EMAIL PROTECTED] 




Beni Buess [EMAIL PROTECTED] 
15-Jun-2004 10:14
 
To
[EMAIL PROTECTED]
cc

Subject
[PHP-DB] Connecting to Oracle DB on antother server






Hi,

I'm trying to connect to an oracle database which is itself on antother
server than php is running. on the php machine is an oracle client
succesfully installed.
i've tried the different functions to connect to oracle:

ociplogon('user','pass');

as well as ocinlogon, both with and without the optional third
parameter, where i gave the name of the entry in tnsnames.ora as well as
the value of ORACLE_SID.

i always got a following error message:
Warning: ociplogon() [function.ociplogon]: _oci_open_server: Error while
trying to retrieve text for error ORA-12154


could anybody point me to the right direction, or is there somebody who
has already done such a connection and could give me an example.


thanks a lot...


Beni


This message may contain legally privileged or confidential 
information and is therefore addressed to the named persons only. 
The recipient should inform the sender and delete this message, 
if he/she is not named as addressee. 
The sender disclaims any and all liability for the integrity 
and punctuality of this message. 
The sender has activated an automatic virus scanning by 
Messagelabs, but does not guarantee the virus free 
transmission of this message.

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





Re: [PHP-DB] Beta Testers Needed

2004-06-15 Thread Hans Lellelid
Yeah, this is a joke, right?
You want people to intall your software on their webservers which will 
send information about their servers accross the network to your server?

Can we just cut to the chase  I'll send you the root password on my severs?
Anyone interested in being alerted when their servers are down can use 
one of the many, many existing open-source solutions (which do a heck of 
a lot more than monitor uptime  apache).

Hans
Kenny wrote:
Sorry all
The e-mail address is [EMAIL PROTECTED]
-Original Message-
From: Kenny [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 11:44
To: DBList
Subject: [PHP-DB] Beta Testers Needed

Hi All,
 
I am currently looking for beta testers to test my server monitoring
software,
 
Brief synopsis of what it entails,
 
Install a small (2.92 k) file on your web server
Add either a new db or use and existing db this will only be 1 table
with minimal information just basically holding your Key
 
What I will monitor
 
Server Load averages
Server Uptime
HTTP
PHP
MySQL
 
If any of these services go down then I will automatically send you an
alert to your e-mail address, (For the testing phases we will not be
sending SMS alerts)
 
I will generate graphs indicating load averages and server outages
I will send daily reports telling you how the web server is performing.
 
The testing phase will last approx 1 month but you can terminate at any
time if you wish to
There is no payment involved either from my side or yours.
 
We are initially looking for 50 testers but this could increase in the
future,
 
Please only *nix servers for now running Apache / MySQL / PHP 
 
Please send your interest off the list to [EMAIL PROTECTED] and I will send
you full instructions on how we would like to proceed and when the
testing will start
 
Thanks
 
Kenny
 
 
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re[2]: [PHP-DB] Beta Testers Needed

2004-06-15 Thread Pablo M. Rivas
Hello Kenny,

   Hans is right, but i'll take the challenge, send me the code
   and I will look it for a while and tell you...

-- 
Best regards,
 Pablomailto:[EMAIL PROTECTED]
Tuesday, June 15, 2004, 12:17:48 PM, you wrote:

HL Yeah, this is a joke, right?

HL You want people to intall your software on their webservers which will 
HL send information about their servers accross the network to your server?

HL Can we just cut to the chase  I'll send you the root password on my severs?

HL Anyone interested in being alerted when their servers are down can use 
HL one of the many, many existing open-source solutions (which do a heck of 
HL a lot more than monitor uptime  apache).

HL Hans

HL Kenny wrote:

 Sorry all
 
 The e-mail address is [EMAIL PROTECTED]
 
 
 -Original Message-
 From: Kenny [mailto:[EMAIL PROTECTED] 
 Sent: 15 June 2004 11:44
 To: DBList
 Subject: [PHP-DB] Beta Testers Needed
 
 Hi All,
  
 I am currently looking for beta testers to test my server monitoring
 software,
  
 Brief synopsis of what it entails,
  
 Install a small (2.92 k) file on your web server
 Add either a new db or use and existing db this will only be 1 table
 with minimal information just basically holding your Key
  
 What I will monitor
  
 Server Load averages
 Server Uptime
 HTTP
 PHP
 MySQL
  
 If any of these services go down then I will automatically send you an
 alert to your e-mail address, (For the testing phases we will not be
 sending SMS alerts)
  
 I will generate graphs indicating load averages and server outages
 I will send daily reports telling you how the web server is performing.
  
 The testing phase will last approx 1 month but you can terminate at any
 time if you wish to
 There is no payment involved either from my side or yours.
  
 We are initially looking for 50 testers but this could increase in the
 future,
  
 Please only *nix servers for now running Apache / MySQL / PHP 
  
 Please send your interest off the list to [EMAIL PROTECTED] and I will send
 you full instructions on how we would like to proceed and when the
 testing will start
  
 Thanks
  
 Kenny
  
  

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



RE: [PHP-DB] Beta Testers Needed

2004-06-15 Thread Kenny
Hi Hans,

Thanks for your concerns

I really have nothing to hide,
When I say software all it is, is a small script the generates a xml
file, most of the Open source software that does this type of
monitoring only pings your ports so there is no way of actually telling
if the service is really running,

And at the moment we are only testing for critical services that are
crucial for website administrators,

Please feel free to view the parsed file at
www.xarex.com/monitor/client.php
If you find any security flaws please let me know so that I can block
them, this is one of the main reasons for having a beta test

Regards

Kenny 

-Original Message-
From: Hans Lellelid [mailto:[EMAIL PROTECTED] 
Sent: 15 June 2004 16:18
To: Kenny
Cc: DBList
Subject: Re: [PHP-DB] Beta Testers Needed

Yeah, this is a joke, right?

You want people to intall your software on their webservers which will 
send information about their servers accross the network to your server?

Can we just cut to the chase  I'll send you the root password on my
severs?

Anyone interested in being alerted when their servers are down can use 
one of the many, many existing open-source solutions (which do a heck of

a lot more than monitor uptime  apache).

Hans

Kenny wrote:

 Sorry all
 
 The e-mail address is [EMAIL PROTECTED]
 
 
 -Original Message-
 From: Kenny [mailto:[EMAIL PROTECTED] 
 Sent: 15 June 2004 11:44
 To: DBList
 Subject: [PHP-DB] Beta Testers Needed
 
 Hi All,
  
 I am currently looking for beta testers to test my server monitoring
 software,
  
 Brief synopsis of what it entails,
  
 Install a small (2.92 k) file on your web server
 Add either a new db or use and existing db this will only be 1 table
 with minimal information just basically holding your Key
  
 What I will monitor
  
 Server Load averages
 Server Uptime
 HTTP
 PHP
 MySQL
  
 If any of these services go down then I will automatically send you an
 alert to your e-mail address, (For the testing phases we will not be
 sending SMS alerts)
  
 I will generate graphs indicating load averages and server outages
 I will send daily reports telling you how the web server is
performing.
  
 The testing phase will last approx 1 month but you can terminate at
any
 time if you wish to
 There is no payment involved either from my side or yours.
  
 We are initially looking for 50 testers but this could increase in the
 future,
  
 Please only *nix servers for now running Apache / MySQL / PHP 
  
 Please send your interest off the list to [EMAIL PROTECTED] and I will
send
 you full instructions on how we would like to proceed and when the
 testing will start
  
 Thanks
  
 Kenny
  
  

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

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



Re: [PHP-DB] Beta Testers Needed

2004-06-15 Thread Hans Lellelid
Hi Kenny,
I'm not trying to trash, what might very well be a great product.  I'm 
just very wary (as everyone should be) about communicating private 
server data to some remote host.  Even things that seem trivial could 
probably be used in creative ways.  I'm a litlte paranoid, but not 
without reason :)

Making it open-source is certainly a good start.
 When I say software all it is, is a small script the generates a xml
 file, most of the Open source software that does this type of
 monitoring only pings your ports so there is no way of actually telling
 if the service is really running,
Yes, that's true.  But Nagios, for instance, uses the model you are 
suggesting -- it has a daemon on the inside that communicates w/ master 
server.  Your script may be more secure than Nagios, but seems to be 
operating on exactly the same principle.  The big difference, however, 
is that w/ Nagios deployments you are not trusting some 3rd party server 
to your data.

Please feel free to view the parsed file at
www.xarex.com/monitor/client.php
If you find any security flaws please let me know so that I can block
them, this is one of the main reasons for having a beta test
I'll definitely check it out.
Again, perhaps my initial reaction was a little strong :) and server 
monitoring software is good.  BUT ... You are asking for a lot if you 
want people to entrust information about their servers that is not 
public (otherwise you wouldn't need to install anything) to an unknown 
server.  Even to a trusted server; (think of all the uprise against MS 
Passport, which arguably stores rather benign information).

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


Fwd: [PHP-DB] anonymous select error

2004-06-15 Thread Philip Thompson
I agree about the semi-colon: not allowed. But also, specify '$link' in 
your mysql_error(). This tells it explicitly what the error is 
referring to, even though it should be able to figure it out on it's 
own.

echo 'MySQL Error: ' . mysql_error($link);
Hope this helps - seems to work for me.
~Philip
I'm not sure you need a semi-colon after the table name.
$result = mysql_query( 'Select * From newsletter_subscribers', $db );
To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
I'm trying this query:
$link = mysql_connect( $site, $id, $pass );
if (!$link) {
  die('Could not connect: ' . mysql_error());
}
echo 'Connected successfullybr';
$db = mysql_select_db( $dbname, $link);
if( !$db ) {
  echo DB falsebr;
  exit;
}
$result = mysql_query( 'Select * From
newsletter_subscribers;', $db );
if (!$result) {
  echo DB Error, could not list tablesbr;
  echo 'MySQL Error: ' . mysql_error();
  exit;
}
with this output:
Connected successfully
DB Error, could not list tables
MySQL Error:
I dont understand why there is an error, but it prints
nothing for the error.  Any ideas?  Thanks, Josh

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


[PHP-DB] Sample Code

2004-06-15 Thread Mike Koponick
Hello all,

I was wondering if anyone had some sample code that I could use for a
small project.

What I would like to do is select data in a date field, like:

From: 6-1-04
To: 6-15-04

Then output to a text file. I have other selections within this data
that I will make, and I think can figure out. The part I'm having
trouble with is exporting the data and selecting between two dates.

I'm running PHP4 and MySQL 4.1.

Thank in advance for your help.

Mike

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



[PHP-DB] Re: Sample Code

2004-06-15 Thread pete M
lots of sample code here
http://www.zend.com/codex.php
Mike Koponick wrote:
Hello all,
I was wondering if anyone had some sample code that I could use for a
small project.
What I would like to do is select data in a date field, like:
From: 6-1-04
To: 6-15-04
Then output to a text file. I have other selections within this data
that I will make, and I think can figure out. The part I'm having
trouble with is exporting the data and selecting between two dates.
I'm running PHP4 and MySQL 4.1.
Thank in advance for your help.
Mike
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Sample Code

2004-06-15 Thread Gary Every
Here's a quick and easy one though:

SELECT * from your_table WHERE your_date_field BETWEEN '2004-06-01' AND
'2004-06-15';


Gary Every
Sr. UNIX Administrator
Ingram Entertainment Inc.
2 Ingram Blvd, La Vergne, TN 37089
Pay It Forward!

-Original Message-
From: Mike Koponick [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Sample Code

Hello all,

I was wondering if anyone had some sample code that I could use for a
small project.

What I would like to do is select data in a date field, like:

From: 6-1-04
To: 6-15-04

Then output to a text file. I have other selections within this data
that I will make, and I think can figure out. The part I'm having
trouble with is exporting the data and selecting between two dates.

I'm running PHP4 and MySQL 4.1.

Thank in advance for your help.

Mike

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

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



[PHP-DB] Erroneous date and time

2004-06-15 Thread Philip Thompson
Hi all.
Maybe there's something I'm doing incorrectly, but I cannot get the 
date() function to return the appropriate time. It's always 12 hours 
off. I've tried using 24-hour time and 12-hour time (with AM/PM), but 
they both give the wrong time. I even emailed the server admin to make 
sure that the server clock was set correctly, and he said that it was. 
I don't know... Here's my PHP:

$problemDateTime = date(Y-m-d g:i:s A);
which returns: 2004-06-13 11:24:21 PM
To the untrained eye ;), that might appear correct. But that was 
actually submitted at 11:24 AM, not PM. So, that's my code. Any 
suggestions??

Thanks a bunch,
~Philip
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] delete a record not working

2004-06-15 Thread Justin
Hello, I have a simple script to retrieve and then delete a selected script, but it 
does not work.

When I hit the button I get:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL 
server version for the right syntax to use near 'id' at line 11064

Any help would be appreciated.
Thanks


form action=? echo $PHP_SELF ? method=post
?php

mysql_pconnect(localhost,root,password);
mysql_select_db(options);
$result = mysql_query(select * from open_trades);

while ($row = mysql_fetch_array($result))
{
print trtd;
print INPUT TYPE='RADIO' NAME='id' VALUE='id';
print /tdtd;
print $row[id];
print /tdtd;
print $row[open_date];
print /tdtd;
print $row[short_long_trade];
print /tdtd;
print $row[expiry];
print /td/tr\n;

}
print /table\n;
?
input type=submit name=submit value=close/form
?php
if($submit)

 {
  mysql_query(DELETE FROM open_trades WHERE id=$id);
  echo Thank you! Information updated.;
  echo mysql_error();
  echo mysql_errno();
  }
?