php-db Digest 4 May 2001 07:42:01 -0000 Issue 595

Topics (messages 9104 through 9118):

Re: Newbie question
        9104 by: CC Zona
        9107 by: ~BD~

Re: Mystery variable query?
        9105 by: CC Zona
        9108 by: martin helie
        9109 by: Gyozo Papp
        9110 by: CC Zona
        9111 by: Johannes Janson
        9112 by: martin helie

Re: interbase (?) field contents does not show
        9106 by: Larry Rivera

ora_logon receive ora-12154
        9113 by: Miguel
        9115 by: Steve Farmer

mp3 upload????
        9114 by: Kelvin

Re: updating database on internet server
        9116 by: Benny

Re: PHP and Access to DB2.
        9117 by: Chris Lee

Apache+PHP+MySQL installation at once - HOW?
        9118 by: Vojtech Dvorak

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


In article <034101c0d3f3$0dd747e0$41041dd8@winbox>,
 [EMAIL PROTECTED] ("~BD~") wrote:

> at the end of my script, I run a set of closing and clean-up procedures..
> what I would like to be able to do is that when a user bails out of the
> script by closing the browser or leaving the site/page, detect that they've
> gone, and then go ahead and run my closing procedures.. is this possible?

http://php.net/manual/en/features.connection-handling.php
http://php.net/register-shutdown-function

-- 
CC




EXACTLY what I was looking for...
Thanks!

http://www.bustdustr.net
Home of Radio Free Bd


----- Original Message -----
From: CC Zona <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 1:42 PM
Subject: Re: [PHP-DB] Newbie question


> In article <034101c0d3f3$0dd747e0$41041dd8@winbox>,
>  [EMAIL PROTECTED] ("~BD~") wrote:
>
> > at the end of my script, I run a set of closing and clean-up
procedures..
> > what I would like to be able to do is that when a user bails out of the
> > script by closing the browser or leaving the site/page, detect that
they've
> > gone, and then go ahead and run my closing procedures.. is this
possible?
>
> http://php.net/manual/en/features.connection-handling.php
> http://php.net/register-shutdown-function
>
> --
> CC
>
> --
> PHP Database 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]





In article <9crr9l$4c4$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("martin helie") wrote:

> assuming:
> 
> $var="1234";    (type does not seem to matter)
> 
> this query returns no error, but no result either:
> 
> mysql("database","SELECT * FROM table WHERE id='$var'");

When you call mysql_query is it perhaps from inside a function, where 
variable $var has not been passed or made global?

(BTW, whenever you experience problems with a query, it's a good idea to 
echo the query string to the browser.  Often, this simple step makes it 
very clear where the problem lies.  Using mysql_error() and $php_errormsg 
on a query failure also can give you very useful information.)

-- 
CC




Hi guys,

I'll answer this and the previous mail.

First, thanks for the insight.

1. There is such a function as "mysql" whose arguments are
    mysql("database","query",[resource id])
    very useful as it avoids having to call mysql_connect_db()

As for printing the query, I had done that, and everything was fine. I have
however, found the problem!
(sorry about the waste of bandwidth, but maybe someone will avoid making the
same mistake).

The problem was not related to variable scope, but rather because the
variable "1234" had some HTML formatting added to it somewhere in the
script.

The problem, evidently, is that echoing the variable didn't show the html
formatting (it was something like "<font color=black>" in an obvious way!

I wish there were a php debugger.

Again, thanks for the suggestions,

Martin

"CC Zona" <[EMAIL PROTECTED]> wrote in message
9cs5ef$6js$[EMAIL PROTECTED]">news:9cs5ef$6js$[EMAIL PROTECTED]...
> In article <9crr9l$4c4$[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] ("martin helie") wrote:
>
> > assuming:
> >
> > $var="1234";    (type does not seem to matter)
> >
> > this query returns no error, but no result either:
> >
> > mysql("database","SELECT * FROM table WHERE id='$var'");
>
> When you call mysql_query is it perhaps from inside a function, where
> variable $var has not been passed or made global?
>
> (BTW, whenever you experience problems with a query, it's a good idea to
> echo the query string to the browser.  Often, this simple step makes it
> very clear where the problem lies.  Using mysql_error() and $php_errormsg
> on a query failure also can give you very useful information.)
>
> --
> CC
>
> --
> PHP Database 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]
>






> I wish there were a php debugger.

maybe, this would satisfy you:

http://dd.cron.ru/dbg/home.php

best regards, 

Papp Gyozo 
- [EMAIL PROTECTED]





In article <9cs791$mn3$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("martin helie") wrote:

> The problem, evidently, is that echoing the variable didn't show the html
> formatting (it was something like "<font color=black>" in an obvious way!

Look at it via source view next time.  Echoing the content wrapped in a 
<pre> tag can also be handy.

> I wish there were a php debugger.

<http://php.net/manual/en/debugger.php> There's a built-in for PHP3.  For 
PHP4, scroll down toward the bottom of the user annotations for a couple of 
options.

-- 
CC




Hi,

""martin helie"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9cs791$mn3$[EMAIL PROTECTED]">news:9cs791$mn3$[EMAIL PROTECTED]...
[..]
>
> 1. There is such a function as "mysql" whose arguments are
>     mysql("database","query",[resource id])
>     very useful as it avoids having to call mysql_connect_db()

ooops, sorry didn't know or find it.

johannes






Cool! I'll give it a try.
Thanks,

Martin

""Gyozo Papp"" <[EMAIL PROTECTED]> wrote in message
02e601c0d3ff$d89a83a0$5145c5d5@jaguar">news:02e601c0d3ff$d89a83a0$5145c5d5@jaguar...
> I wish there were a php debugger.

maybe, this would satisfy you:

http://dd.cron.ru/dbg/home.php

best regards,

Papp Gyozo
- [EMAIL PROTECTED]


--
PHP Database 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]








Beacuse u are using an object structure, Check OOP in PHP, the pointer
$variable->name is for objects that why its used in the fetch object and not
fetch row fetch row would be $rs["rowname"] or $rs[0]. Check the
documentation for more detailed info

-----Original Message-----
From: GMansky [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 10:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] interbase (?) field contents does not show


Meir,

Thanks for the response.  I believe I tried it with caps but did not get any
message.  Anyway, I tried it again, and it's now working.

Why does $row->LASTNAME give me a result on an ibase_fetch_object() and not
on ibase_fetch_row()?

Thanks,
George




--
PHP Database 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]





Hi,

I'am having serious problems in put php acessing a remote oracle 8 database,
i have tried several configurations but always end up with

Oracle: Connection Failed: ORA-12154: TNS:could not resolve service name in
/var/www/htdocs/support/teste.php on line 5

I can access this database from sqlplus and when I start apache all oracle
variables are set. If I get rid of the connect string and access my local
database then everything is ok.

My code is something like...

putenv("ORACLE_HOME=/apps/oracle/8.1.7");
putenv("TNS_ADMIN=/apps/oracle/8.1.7/network/admin");

// main
if(!($conn=ora_logon("user@SERVICE","pass")))

echo "Error: Cannot connect to database\n";
exit;
}

....

Using:

apache: apache_1.3.19
php4: php-4.0.5
Linux: Red Hat 7.0 with latest patch's
Remote Oracle DB: Oracle 8.1.6 W2K
Local DB: Oracle 8.1.7 Linux

php build with: --with-oci8 --with-oracle

Any help would be apreciated...

Thanks,
Miguel






Hi Miguel,

try

>if(!($conn=ora_logon("user","pass","SERVICE")))

it always works for me

HTH
Steve


At 10:47 PM +0100 3/5/01, Miguel wrote:
>Hi,
>
>I'am having serious problems in put php acessing a remote oracle 8 database,
>i have tried several configurations but always end up with
>
>Oracle: Connection Failed: ORA-12154: TNS:could not resolve service name in
>/var/www/htdocs/support/teste.php on line 5
>
>I can access this database from sqlplus and when I start apache all oracle
>variables are set. If I get rid of the connect string and access my local
>database then everything is ok.
>
>My code is something like...
>
>putenv("ORACLE_HOME=/apps/oracle/8.1.7");
>putenv("TNS_ADMIN=/apps/oracle/8.1.7/network/admin");
>
>// main
>if(!($conn=ora_logon("user@SERVICE","pass")))
>
>echo "Error: Cannot connect to database\n";
>exit;
>}
>
>....
>
>Using:
>
>apache: apache_1.3.19
>php4: php-4.0.5
>Linux: Red Hat 7.0 with latest patch's
>Remote Oracle DB: Oracle 8.1.6 W2K
>Local DB: Oracle 8.1.7 Linux
>
>php build with: --with-oci8 --with-oracle
>
>Any help would be apreciated...
>
>Thanks,
>Miguel
>
>
>
>--
>PHP Database 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]

-- 
---------------------------------------------------
"Minds are like parachutes, they work best when open"
Support free speech; visit http://www.efa.org.au/

Heads Together Systems Pty Ltd http://www.hts.com.au
Email: [EMAIL PROTECTED]     Tel: 612 9982 6767     Fax: 612 9981 3081 




Hi,

   I want to setup a upload program thats only allow MP3 file type.

So,  this is my coding under the file

............
.........
if ($imgfile_type == "audio/mp3")
......
.......

But when I upload my song, it said "mp3 is not the format type"   What
should I do?

Please help..... I will be very appreciate.

Best regards,
Kelvin.






I want to update the internet server from my local computer. I used MySQL
both in local and internet server.

Regards;

Benny.

-----Original Message-----
From: Marko Lesnik [mailto:[EMAIL PROTECTED]]
Sent: 03 Mei 2001 14:39
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] updating database on internet server


That's exactly I'm trying to do. It seems that if you supply an IP of the
server instead 'localhost' in mysql_connect that you would connect directly
to the Mysql database on the server. Where are you programming the update
module and what database are you using on local computer?

""Benny"" <[EMAIL PROTECTED]> je napisal v sporocilo
[EMAIL PROTECTED]">news:[EMAIL PROTECTED] ...
> I have 2 systems, local and internet.
> I want my Internet database is updated from local database.
> How can I make this?
>
> Regards;
>
> Benny.
>
>
> --
> PHP Database 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 Database 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]






Nicolas,

Take a look of the following link:
Hope this help.

AS/400
Connection from a Linux Box to AS/400 DB2
Connection from a Linux Box to IBM DB2 Mainframes
http://www.faqts.com/knowledge_base/view.phtml/aid/5613/fid/12

Can I use PHP to interface with an AS/400 database?
http://www.faqts.com/knowledge_base/view.phtml/aid/257/fid/14

Can you connect to an AS/400 DB2 database from a Linux web server? 
http://www.faqts.com/knowledge_base/view.phtml/aid/3536/fid/10

Regards,
Chris Lee


On 30 Apr 2001 08:40:42 -0700, [EMAIL PROTECTED] ("Nicolas
Machado") wrote:

>Hy, somebody knows if exist a driver for database access to DB2/400, running
>on AS/400.
>Something like a module.
>
>Thanks.
>
>
>---
>Este Mail NO contiene Virus.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.250 / Virus Database: 123 - Release Date: 18/04/01





Hi,
I want to install this great trio Apache+PHP+MySQL and don't want it install
step by step, program by program.
I remember, that I saw somewhere some prepared package for very fast and
comfortable installation of these three at once.
Don't you now where I can find it?
Thanks
Vojtech





-- 
PHP Database 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]

Reply via email to