[PHP-DB] Compile Error

2006-02-20 Thread Benjamin Stambaugh
Hi. I have been having issues with PHP compiling.  It was workin fine 
until a day ago and now every time I try to access a page with any 
kinda of PHP script I comes up with errors.  I just worte this simple 
code for the purpose to demonstrate my problem.  When I access the file 
through my web browser (firefox) it starts to compile fine and then I 
just stops just about at the 3rd or 4th line of the PHP script and 
treats the rest of the page as if it were just plain HTML code.  It 
does this for anything I have in written in PHP even without using a 
database.  I was wondering if anyone had any clue as to why this is 
happening.


Some back ground info.  Im using the latest version of PHP, Apache2, 
and MySQL5.0 all on a windows platfrom.


Here is the code:

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

http://www.w3.org/1999/xhtml";>
 
   MySQL Server Information
   

   
 
 
   MySQL Database Server Information
   MySQL client version: "
 . mysqli_get_client_info() . "";
echo "MySQL connection: "
 . mysqli_get_host_info($DBConnect) . "";
echo "MySQL protocol version: "
 . mysqli_get_proto_info($DBConnect) . "";
echo "MySQL server version: "
 . mysqli_get_client_info($DBConnect) . "";
mysqli_close($DBConnect);
   ?>
 



Here is the output I got from this code:

MySQL Database Server Information
MySQL client version: " . mysqli_get_client_info() . ""; echo "

MySQL connection: " . mysqli_get_host_info($DBConnect) . "
"; echo "

MySQL protocol version: " . mysqli_get_proto_info($DBConnect) . "
"; echo "

MySQL server version: " . mysqli_get_client_info($DBConnect) . "
"; mysqli_close($DBConnect); ?>


Ben Stambaugh

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



RE: [PHP-DB] Data split: web & local machine

2006-02-20 Thread Bastien Koert


do the last one, but have another empty db on the machine that only accepts 
the data from the web serverprotect and hide the cc data as long as 
possible...then run a query behind the firewall to merge the data and send 
it


bastien


From: Miles Thompson <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] Data split: web & local machine
Date: Mon, 20 Feb 2006 16:04:20 -0400


I have to generate a comma-separated(CSV) file of amounts and credit card 
numbers for secure transmittal to the bank. The CSV file is read by a 
bank-endorsed program, encrypted and transmitted.


Most of the billing information: amount, period date, name, billing number 
is stored on the web server. The billing number and credit card type and 
credit card number are stored locally, call it the cc_file. The local 
storage format has not been decided on, the client is leaning towards 
Excel, but is well aware of how easily data can be damaged or destroyed in 
a spreadsheet.


The procedure I initially thought of, was generating a file on the web 
side, emailing it to the client, then merging it with the cc_file to 
generate the payment file for the bank. I foresee a very messy, and 
fragile, macro in Excel to generate the merge.


Now I'm thinking more along the lines of having a local MySQL database. The 
web side file will be created using  SELECT  INTO OUTFILE 
, and that would be mailed to the client. That file would be 
imported into the local MySQL database. A script / function would then 
generate the payment file.


This local app I would write in PHP, using the PHP-GTK toolkit.

The other possibility would be to access the web database from the local 
app, fetch the data directly and generate the file. That would involve 
having two databases open at the same time, but should be ok - $db_local 
and $db_remote.


Opinions and suggestions will be welcomed.

Regards - Miles Thompson


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 2/17/2006

--
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] Help with Variable Variables in Array

2006-02-20 Thread Andrew Darby
Thanks so much, Naintara, simplifying the field name in the way you
suggested seems to fix it.

Andrew

On 2/20/06, Naintara <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Firstly, if you are assigning the value of variable $myrow['article_title']
> to $right_row,
> you should print $right_row and not $$right_row
>
> Because, if say, $myrow['article_title'] contained value "article1",
> $$right_row would look for variable
> $article1, which probably doesn't exist, hence no value.
>
> You could also try creating your field name simpler, something like:
> $tmp_fldname = $type . "_title';
> $right_row = $myrow[$tmp_fldname];
>
> This should work, I haven't tested it.
>
> Naintara
>
> -Original Message-
> From: Andrew Darby [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 20, 2006 10:19 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Help with Variable Variables in Array
>
> Hi, all.  I can't quite figure out how to call the contents of a
> variable variable in a mysql_fetch_array result and was hoping someone
> could help . . .
>
> inside the "fetch all rows" while loop, i have the following:
>
> $right_row = "$" . myrow . "['" . $type . "_title']";
>
> ($type is assigned elsewhere, but in this case = 'article')
>
> which outputs:
>
> $myrow['article_title']
>
> So far so good, but i can't seem to output the value of this variable
> by printing
>
> $$right_row
>
> Any suggestions?
>
> TIA,
>
> Andrew
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17-Feb-06
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17-Feb-06
>
>
> --
> 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] Future Event

2006-02-20 Thread JupiterHost.Net



Mark Bomgardner wrote:

Is there a way in php to execute a SELECT statement in the future?  What 


only if its running in the future :)

You can trigger it when a visitor visits your page but what are the 
chances someone will visit it at 2:000 AM exactly every night?


You can run it as a daemon, which woudl be kind of stupid, plus if they 
don;t let you run cron they probably don;t want a script to run 24/7 
just to send an email at 2:00 AM


You can cron it.

You can cron a script on a different server to run your script on the 
non-cron machine via SSH, HTTP, etc...


BTW, this applies to scripting of any kind, Actually there are soem Perl 
modules that can do this, have you looked on CPAN?


I am wanting to do is use a page to parse a database at a future time.  
I want to send out some email about an event I am putting on, but I 
don't want to execute the select statement until 2:00am.  I could use 
cron for this, but I would perfer not, as I am writing an application in 
which cron may not be an option.  Is there 3rd party engines that will 
do this?


Yes, Cron is one that 99% of servers will have and several Perl Modules 
on CPAN.


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



Re: [PHP-DB] Issues with Oracle

2006-02-20 Thread Luis Morales
Creo q tu problema esta con la forma de conexion contra oracle, trata de
usar contexiones persistentes contra la base de datos. 

Te anexo una clase que desarrolle y estoy usando desde hace mas de 4
años, quizas te ayude. 


En tu servidor local instala el soporte a pear
http://pear.php.net/package/DB y luego ejecutas:

pear install DB

Con esto ya estaras listo para usar la clase. Te anexo un instructivo de
como usarla:

crear un pagina php:

--- index.php --

db_dbArray($MDB, $q)){
  var_dump($db->_db['data'][0]);
  echo "";
}else{
  echo $db->_db['debug'];
  echo "";
}

?>



Suerte,

Luis Morales



On Mon, 2006-02-20 at 15:22 -0400, ERNESTO PENALOZA wrote:
> php_info
-- 
-
Luis Morales 
Consultor de Tecnologia
Cel: +(58)416-4242091
-
"Empieza por hacer lo necesario, luego lo que es posible... y de pronto
estarás haciendo lo imposible"
-


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

Re: [PHP-DB] Future Event

2006-02-20 Thread RaJeSh VeNkAtA

On Mon, 20 Feb 2006, Mark Bomgardner wrote:

Is there a way in php to execute a SELECT statement in the future?  What I am 
wanting to do is use a page to parse a database at a future time.  I want to 
send out some email about an event I am putting on, but I don't want to 
execute the select statement until 2:00am.  I could use cron for this, but I 
would perfer not, as I am writing an application in which cron may not be an 
option.  Is there 3rd party engines that will do this?



Mark




i think u can just use the time constraint :-? I think its possible

raj


--

Your absence should be long enough so that someone miss you ,
But it shouldn't be so long enough that
Someone learns to live without you
So keep in touch !

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



RE: [PHP-DB] Future Event

2006-02-20 Thread Bastien Koert
Put it all in a separate page and call that page from another machine where 
CRON/SCheduled Tasks are allowedor put a time check in your page and 
call it like a function whevever users hit your site


bastien



From: Mark Bomgardner <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Php-Db 
Subject: [PHP-DB] Future Event
Date: Mon, 20 Feb 2006 13:45:18 -0600

Is there a way in php to execute a SELECT statement in the future?  What I 
am wanting to do is use a page to parse a database at a future time.  I 
want to send out some email about an event I am putting on, but I don't 
want to execute the select statement until 2:00am.  I could use cron for 
this, but I would perfer not, as I am writing an application in which cron 
may not be an option.  Is there 3rd party engines that will do this?



Mark

--
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] Data split: web & local machine

2006-02-20 Thread Miles Thompson


I have to generate a comma-separated(CSV) file of amounts and credit card 
numbers for secure transmittal to the bank. The CSV file is read by a 
bank-endorsed program, encrypted and transmitted.


Most of the billing information: amount, period date, name, billing number 
is stored on the web server. The billing number and credit card type and 
credit card number are stored locally, call it the cc_file. The local 
storage format has not been decided on, the client is leaning towards 
Excel, but is well aware of how easily data can be damaged or destroyed in 
a spreadsheet.


The procedure I initially thought of, was generating a file on the web 
side, emailing it to the client, then merging it with the cc_file to 
generate the payment file for the bank. I foresee a very messy, and 
fragile, macro in Excel to generate the merge.


Now I'm thinking more along the lines of having a local MySQL database. The 
web side file will be created using  SELECT  INTO OUTFILE 
, and that would be mailed to the client. That file would be 
imported into the local MySQL database. A script / function would then 
generate the payment file.


This local app I would write in PHP, using the PHP-GTK toolkit.

The other possibility would be to access the web database from the local 
app, fetch the data directly and generate the file. That would involve 
having two databases open at the same time, but should be ok - $db_local 
and $db_remote.


Opinions and suggestions will be welcomed.

Regards - Miles Thompson


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 2/17/2006

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



[PHP-DB] Future Event

2006-02-20 Thread Mark Bomgardner
Is there a way in php to execute a SELECT statement in the future?  What 
I am wanting to do is use a page to parse a database at a future time.  
I want to send out some email about an event I am putting on, but I 
don't want to execute the select statement until 2:00am.  I could use 
cron for this, but I would perfer not, as I am writing an application in 
which cron may not be an option.  Is there 3rd party engines that will 
do this?



Mark

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



RE: [PHP-DB] Help with Variable Variables in Array

2006-02-20 Thread Naintara
Hi,

Firstly, if you are assigning the value of variable $myrow['article_title']
to $right_row,
you should print $right_row and not $$right_row

Because, if say, $myrow['article_title'] contained value "article1",
$$right_row would look for variable 
$article1, which probably doesn't exist, hence no value.

You could also try creating your field name simpler, something like:
$tmp_fldname = $type . "_title';
$right_row = $myrow[$tmp_fldname];

This should work, I haven't tested it.

Naintara

-Original Message-
From: Andrew Darby [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 20, 2006 10:19 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Help with Variable Variables in Array

Hi, all.  I can't quite figure out how to call the contents of a
variable variable in a mysql_fetch_array result and was hoping someone
could help . . .

inside the "fetch all rows" while loop, i have the following:

$right_row = "$" . myrow . "['" . $type . "_title']";

($type is assigned elsewhere, but in this case = 'article')

which outputs:

$myrow['article_title']

So far so good, but i can't seem to output the value of this variable
by printing

$$right_row

Any suggestions?

TIA,

Andrew

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



-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17-Feb-06
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.11/264 - Release Date: 17-Feb-06
 

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



[PHP-DB] Issues with Oracle

2006-02-20 Thread ERNESTO PENALOZA
--- Begin Message ---

Hi, I'm using Oracle 8i and the propel
project as the persistence layer. In the server is installed Instant Client
of ORACLE v10.2. I'm also using PHP 5.1.2.

The thing here is that after several
hours, I got disconnected from Oracle for configuration reasons, and I
get the message (written from propel)  not
connected to ORACLE.

According to what I've been reading,
I think this happen because PHP doesn't "know", I mean, PHP hasn't
realized that Oracle database dropped the connection, then PHP continue
using the same connection over and over.

Have you noticed that kind of behavior
before?. In case you have noticed that, what is the solution?

I'm copying a piece of the php_info()
function of php just in case.

OCI8
OCI8 Support          
              enabled

Revision            
            $Revision: 1.269.2.8
$ 
Active Persistent Connections        
0 
Active Connections          
      0 
Oracle Instant Client Version        
10.2 
Temporary Lob support         enabled

Collections support          
      enabled 


--- End Message ---
***  PDVSA´S INTERNET E-MAIL USE  ***
This message may contain information solely  of the interest of PDVSA or
its businesses. Copying,  distribution,  disclosure  or any  use  of the
information   contained  in  this  transmission  is  permitted  only  to
authorized  parties. If you have  received this e-mail by  error, please
destroy it and notify [EMAIL PROTECTED] or the sender by reply email.

**  USO DEL CORREO ELECTRONICO DE PDVSA HACIA INTERNET  **
Esta nota puede contener informacion de interes solo  para  PDVSA o  sus
negocios. Solo esta  permitida su  copia, distribucion  o uso a personas
autorizadas. Si recibio esta  nota  por  error,  por  favor destruyala y
notifique al remitente o a [EMAIL PROTECTED]
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Help with Variable Variables in Array

2006-02-20 Thread Andrew Darby
Hi, all.  I can't quite figure out how to call the contents of a
variable variable in a mysql_fetch_array result and was hoping someone
could help . . .

inside the "fetch all rows" while loop, i have the following:

$right_row = "$" . myrow . "['" . $type . "_title']";

($type is assigned elsewhere, but in this case = 'article')

which outputs:

$myrow['article_title']

So far so good, but i can't seem to output the value of this variable
by printing

$$right_row

Any suggestions?

TIA,

Andrew

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



[PHP-DB] PDO Informix

2006-02-20 Thread Jean Georges PERRIN

Hi,
 
I am looking for "php_pdo_informix.dll" which is the compiled version of the
PDO driver for Windows XP. 
 
Any help would be useful.
 
(and it is not in the latest .zip from PHP.net).
  
Thanks.
 

Jean Georges Perrin (aka jgp)
IIUG (International Informix Users Group) - Board of Directors
http://www.iiug.org 
--
GO FURTHER... with DB2 and Informix.
Plan on attending the IDUG 2006 North America Conference.
Tampa, Florida, USA. May 7-11, 2006.
Visit http://www.iiug.org/conf for more information!  

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



[PHP-DB] htacces/ php

2006-02-20 Thread Yemi Obembe
Any php way of knowing if a site has blocked hot linking to its images?

--
http://ngBot.com | http://wap.ngBot.com
Nigeria's #1 website directory.


[PHP-DB] Fsockopen issues

2006-02-20 Thread Yemi Obembe
Is it possible (and advisable) to make multiple Get/head request through one
fsockopen handle.
eg:
 $fp = fsockopen($host, 80);
 $request = "GET /one.htm HTTP/1.0\r\n";
 ...
 fputs($fp, $request);
 .
 //and then, another request through same handle:
 $request2 = "GET /two.htm HTTP/1.0\r\n";
 
 fputs($fp, $request2); //i.e through same handle.


--
http://ngBot.com | http://wap.ngBot.com
Nigeria's #1 website directory.


Re: [PHP-DB] apostrophes everywhere

2006-02-20 Thread Stut

[EMAIL PROTECTED] wrote:


I looked at serveral of the function suggestions and indeed stumbled accross
htmlspecialchars when doing research on another suggestion:
mysqli_real_escape_string which I couldn't use since I'm not on PHP5. While
htmlspecialchars may not offer as much security as the later it should would
for my purposes.
 

Just to clarify, my suggestion was mysql_real_escape_string, not 
mysqli_real_escape_string. The former is available on PHP4 >= 4.3.0 and 
PHP5. That's the function the link I posted goes to 
(http://php.net/mysql_real_escape_string).


-Stut

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