Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Jason Wong
On Thursday 30 January 2003 08:59, Louis Feng wrote:

> Thanks for your help. The machine [A] is running MySQL is Not behind a
> firewall, therefore all connection to [A] works fine (including 3306).
> The machine [B] running PHP/apache is behind a firewall, and only port
> 80 is open on [B]. If I want to do some query on MySQL of [A] from [B]
> where PHP resides, then the problem occurs (from other machines without
> firewall to do the query on [A] work fine). Basically PHP can send out
> query to [A] (since [A] is open), but when [A] returns the result to
> PHP, it's blocked by the firewall on [B], because I believe PHP uses
> certain port for MySQL return the result. Is it clear?

What firewall/settings are you using? In a standard firewall works something 
like this:


[B] PHP sends request FROM port  TO [A] port <3306>

Because the request was initiated from within the firewall it should open up 
port  and allow the return result from [A] to pass back through.

And as I mentioned before  is not fixed but should be > 1024. So 
basically your firewall needs to allow:

SRC, internal, all non-privileged ports --> DST, external, port 3306
SRC, external, port 3306 --> DST, internal, all non-privileged ports


Also this is getting way off-topic.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
GOOD-NIGHT, everybody ... Now I have to go administer FIRST-AID to my
pet LEISURE SUIT!!
*/


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




RE: [PHP-DB] MySQL result resource

2003-01-29 Thread John W. Holmes
It means your query failed... it always means your query failed for some
reason (unless you typo a variable name...). Learn to use mysql_error()
in conjunction with mysql_query(). Also, like I said before,
mysql_db_query() is depreciated, you should be using mysql_query().

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

> -Original Message-
> From: Addison Ellis [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 10:02 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] MySQL result resource
> 
> hello,
>   i have a new issue... :-)
>   i am getting:
> Warning: Supplied argument is not a valid MySQL result resource in
> /users/infoserv/web/register/ca/admin/catads.php on line 54
> 
> from:
>   while($row = mysql_fetch_object($obj))
>  {
>$scobj = mysql_db_query($dbname,"select * from subcategory
> where id=$row->subcategory");
>$scrow = mysql_fetch_object($scobj);
>$cobj = mysql_db_query($dbname,"select * from category where
> id=$scrow->category");//54
>$crow = mysql_fetch_object($cobj);
> ?>
> 
> 
> any ideas, of course, are most appreciated. thank you and best,
addison
> --
> Addison Ellis
> small independent publishing co.
> 114 B 29th Avenue North
> Nashville, TN 37203
> (615) 321-1791
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> subsidiaries of small independent publishing co.
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]



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




[PHP-DB] MySQL result resource

2003-01-29 Thread Addison Ellis
hello,
	i have a new issue... :-)
	i am getting:
Warning: Supplied argument is not a valid MySQL result resource in 
/users/infoserv/web/register/ca/admin/catads.php on line 54

from:

while($row = mysql_fetch_object($obj))
{
  $scobj = mysql_db_query($dbname,"select * from subcategory 
where id=$row->subcategory");
  $scrow = mysql_fetch_object($scobj);
  $cobj = mysql_db_query($dbname,"select * from category where 
id=$scrow->category");//54
  $crow = mysql_fetch_object($cobj);
?>


any ideas, of course, are most appreciated. thank you and best, addison
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
[EMAIL PROTECTED]
[EMAIL PROTECTED]
subsidiaries of small independent publishing co.
[EMAIL PROTECTED]
[EMAIL PROTECTED]

[PHP-DB] php includes for templates

2003-01-29 Thread Russell Griechen
Daniel Cardenas graciously offered the script but I can not develop the
right syntax.
see code at:
http://sportsmenafield.com/index.txt

Russell Griechen...trying to escape frames to a php include template.



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




[PHP-DB] Array Trouble

2003-01-29 Thread Tyler Whitesides
Hi,
I e-mailed this before, but the attachments didnt go through.  I am
designing something that my tech team can use to track the maintenancing
of our school district computers.  I have a table of data (formitems)
that contains tasks that must be completed for that computer depending
on the platform.  I loaded the results from the apple.php form into an
array ($item).  I need to make a row ($makerow) then, assuming all of
the proper columns are there, load each value in the array into its
corresponding column in the database.  For some reason, PHP is not
returning the current value of the array, it is handing MySQL the whole
array.
Any help would be appreciated.

-Tyler
Web and Database Administrator
East Valley School District






function checkAll()
{

}




  
  

  
  
  


  
  


  





Apple - 
";
echo $id;
echo "Location: ";
echo odbc_result($row, "location");
echo " - ";
echo odbc_result($row, "roomNo");
echo "Teacher: ";
echo odbc_result($row, "teacher");
echo "Model: ";
echo odbc_result($row, "modelNo");
echo "Serial: ";
echo odbc_result($row, "serialNo");
echo "Mac Address:  ";
echo odbc_result($row, "macAddress");
echo "Drop: ";
echo odbc_result($row, "dropID");
echo "OS: ";
echo odbc_result($row, "OS");
echo "Processor: ";
echo odbc_result($row, "processor");
echo "";
echo "Edit This Info";
?>



  







   


  




NotDone   N/A 
  Done
$list[item]\n";
}
?>
This computer is complete.

Comments:




 










  



  
  
 



  

  
  


  
  
  

  






";

if(odbc_result($row,"deviceType") != "1")
{
echo "This device is not a computer.";
}
else
{
  //Make the row
  $makeRow = mysql_query("insert into maintenanceditems (id,comments,complete,user) 
values ('$id','$comments','$done','$LOGON_USER');") or die(mysql_error());
//If the computer was completed, insert the date.
if($complete == "DONE")
  {
mysql_query("update maintenanceditems set date = \"$today\"");
  }
else
  {
// echo "history.back(1);";
  }
//Update the row with the data from the radio buttons
for(end($item);$item >= 0;prev($item))
  {
$current = current($item);
mysql_query("update maintenanceditems set \"$current\"  = \"$current\" 
where id = \"$id\";") or die(mysql_error());
  }
  
}
echo "Computer Successfully 
Maintenanced";
include 'index.php';
?>



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


Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Louis Feng
Hi Jeff,

Thanks for your help. The machine [A] is running MySQL is Not behind a 
firewall, therefore all connection to [A] works fine (including 3306). 
The machine [B] running PHP/apache is behind a firewall, and only port 
80 is open on [B]. If I want to do some query on MySQL of [A] from [B] 
where PHP resides, then the problem occurs (from other machines without 
firewall to do the query on [A] work fine). Basically PHP can send out 
query to [A] (since [A] is open), but when [A] returns the result to 
PHP, it's blocked by the firewall on [B], because I believe PHP uses 
certain port for MySQL return the result. Is it clear?

I attached a picture and hopefully helps. Thanks!

Louis

[EMAIL PROTECTED] wrote:

 
loius.  how do you know it's the mysql host that can not get to the 
php host? i may have misunderstood.  port 3306 needs to be enabled to 
allow traffic though the firewall and into the mysql host, since that 
connection has been established the data is returned back to the php 
host.   the mysql host shouldn't be able to connect to the php host in 
the same way, only through a connection originating through port 3306. 
 then you can also limit to domain names that are allowed to enter the 
mysql host on 3306.

don't know if this helps, but i think this is your scenario.  let me 
know.  i'm definitely interested.  Hopefully i explained it correctly, 
i'm definitely not a firewall guy...but i try to pay attention.

Jeff
*Louis Feng <[EMAIL PROTECTED]>*
01/29/2003 07:11 PM

To: [EMAIL PROTECTED]
cc: Matt Vos <[EMAIL PROTECTED]>, Louis Feng <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED]
bcc:
Subject: Re: [PHP-DB] Question on the port PHP uses to connect to 
remote MySQL


Thanks for reply, I'm going to try that, but how could this be? I just
want to make sure I was clear that there is no problem to connect to the
remote MySQL server and there is nothing blocking that machine. It's the
PHP machine that's blocking any incoming traffic from the MySQL machine.
How could PHP use a port number that is also used by MySQL?

Louis

[EMAIL PROTECTED] wrote:

>it IS 3306(in a default setup) that you'll need to allow traffic through
>the firewall for this scenario.  I have similar needs and that is the 
port
>we open.
>
>
>
>"Matt Vos"
>, <[EMAIL PROTECTED]>
>t.com>   cc:
> Subject: Re: [PHP-DB] 
Question on the port PHP uses to connect to
>01/29/2003remote MySQL
>09:29 AM
>
>
>
>
>
>
>In a default setup, I believe the port is 3306.
>Check your MySQL config files, as this can be changed.
>
>Matt
>- Original Message -
>From: Louis Feng <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, January 28, 2003 10:34 PM
>Subject: [PHP-DB] Question on the port PHP uses to connect to remote 
MySQL
>
>
>
>
>>Here is my problem. I have PHP running on one machine, mysql on another
>>one. Everything works fine till I put a firewall on the PHP machine,
>>which blocks pretty much every port there is except port 80. Now, PHP
>>can't connect to the mysql database anymore. If I disable the firewall
>>on the PHP machine it works again. So I eliminate the reasons down to
>>that PHP must uses some port for mysql return the query. The question is
>>which port does PHP use for the connection? I'm NOT talking about 3306
>>which is used by Mysql. Anyone could help? Thanks in advance.
>>
>>Louis
>>
>>
>>--
>>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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Louis Feng
Thanks for reply, I'm going to try that, but how could this be? I just 
want to make sure I was clear that there is no problem to connect to the 
remote MySQL server and there is nothing blocking that machine. It's the 
PHP machine that's blocking any incoming traffic from the MySQL machine. 
How could PHP use a port number that is also used by MySQL?

Louis

[EMAIL PROTECTED] wrote:

it IS 3306(in a default setup) that you'll need to allow traffic through
the firewall for this scenario.  I have similar needs and that is the port
we open.


   
   "Matt Vos"  
   , <[EMAIL PROTECTED]>   
   t.com>   cc:
Subject: Re: [PHP-DB] Question on the port PHP uses to connect to  
   01/29/2003remote MySQL  
   09:29 AM
   
   




In a default setup, I believe the port is 3306.
Check your MySQL config files, as this can be changed.

Matt
- Original Message -
From: Louis Feng <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 10:34 PM
Subject: [PHP-DB] Question on the port PHP uses to connect to remote MySQL


 

Here is my problem. I have PHP running on one machine, mysql on another
one. Everything works fine till I put a firewall on the PHP machine,
which blocks pretty much every port there is except port 80. Now, PHP
can't connect to the mysql database anymore. If I disable the firewall
on the PHP machine it works again. So I eliminate the reasons down to
that PHP must uses some port for mysql return the query. The question is
which port does PHP use for the connection? I'm NOT talking about 3306
which is used by Mysql. Anyone could help? Thanks in advance.

Louis


--
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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Odd browser problem with sessions

2003-01-29 Thread chip wiegand
On Wed, 29 Jan 2003 08:30:31 -0600
[EMAIL PROTECTED] wrote:

> IE 5.01 has an issue with its basic auth. There is no patch, only an
> upgrade path
> 
> 
> Gary Every

I wish it were that simple, it happens in all versions of IE. I've 
tested it myself in the latest versions and it happens. I get at least
one phone call a day from people asking why they can't log in, the 
screen just reloads. I suggest to them to upgrade to Mozilla, Netscape
or Opera.
--
Chip

> Sr. UNIX Administrator
> Ingram Entertainment
> (615) 287-4876
> "Pay It Forward"
> mailto:[EMAIL PROTECTED]
> http://accessingram.com
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 28, 2003 2:02 PM
> To: PHP-DB List
> Subject: [PHP-DB] Odd browser problem with sessions
> 
> 
> I have a web site that is protected using sessions, and it works fine.
> 
> Only occasionally
> when a end-user tries to log in using IE the login screen will just 
> reload, every time they
> try to log in. I found that by closing IE (all windows) then trying
> again, it will go on to the 
> proper page. This behavior appears to only effect IE, I saw it once on
> 
> either Netscape
> or Mozilla (I don't recall which), and no one I've talked to on the
> phone has had this 
> problem in any browser other than IE, and there have been many calls
> about this. Any
> idea what this might be caused by?
> Thanks,
> --
> Chip Wiegand
> Computer Services
> Simrad, Inc
> www.simradusa.com
> [EMAIL PROTECTED]
> 
> "There is no reason anyone would want a computer in their home."
>  --Ken Olson, president, chairman and founder of Digital Equipment
>  
> Corporation, 1977
>  (Then why do I have 8? Somebody help me!)
> 
> -- 
> 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] Thank you for your help!!!!

2003-01-29 Thread Ruprecht Helms

Hi  Sabina Alejandr Schneider,

you'r welcome   - No problem

Regards,
Ruprecht

--
Ruprecht Helms IT-Service und Softwareentwicklung

Tel/Fax.:  +49[0]7621 16 99 16
Homepage:  http://www.rheyn.de
email:  [EMAIL PROTECTED]
--

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




Re: [PHP-DB] upload time out

2003-01-29 Thread Jason Wong
On Thursday 30 January 2003 04:39, Ryan Holowaychuk wrote:
> Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
> allocate 4000 bytes) in Unknown on line 0
>
> I have gone in and made some changes to allow the file upload larger
> files.  I have gone in as well and turned on the messaging for now so
> that I can see things like the above error.
>
> I believe that this is the area that I am to make the change, but when I
> increase the memory limit I still get the same error
>
> ;;;
> ; Resource Limits ;
> ;;;
>
> max_execution_time = 320 ; Maximum execution time of each script, in
> seconds (default 30)
> memory_limit = 8M  ; Maximum amount of memory a script may consume
> (8MB)

I think PHP keeps the uploaded file(s) in memory until they have completely 
finished uploading and are ready to be written to disk. Thus if you're trying 
to upload a 10MB file you would probably have to increase the memory_limit to 
18MB to be on the safe side.

> as to the question if I should use FTP, yes I can and do for most, but I
> am trying to get this working for most as this is a lot easier for
> people to send files, so if I can get it working for larger files then
> things will fly

Remember HTTP uploads doesn't allow you to resume transfer. Thus if a file was 
99% uploaded and an error occurs you have a very unhappy user ;-)

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
And miles to go before I sleep.
-- Robert Frost
*/


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




RE: [PHP-DB] upload time out

2003-01-29 Thread Ryan Holowaychuk
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
allocate 4000 bytes) in Unknown on line 0

I have gone in and made some changes to allow the file upload larger
files.  I have gone in as well and turned on the messaging for now so
that I can see things like the above error.

I believe that this is the area that I am to make the change, but when I
increase the memory limit I still get the same error

;;;
; Resource Limits ;
;;;

max_execution_time = 320 ; Maximum execution time of each script, in
seconds (default 30)
memory_limit = 8M  ; Maximum amount of memory a script may consume
(8MB)

as to the question if I should use FTP, yes I can and do for most, but I
am trying to get this working for most as this is a lot easier for
people to send files, so if I can get it working for larger files then
things will fly

Thanks

-Original Message-
From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 29, 2003 11:00 AM
To: 'Ryan Holowaychuk'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] upload time out

Yeah, it's a configuration directive, check here:

http://www.php.net/manual/en/configuration.directives.php#ini.upload-max
-fil
esize

If you're moving 10MB, is it possible to use FTP instead? Don't know
your
situation. Just a suggestion.

> -Original Message-
> From: Ryan Holowaychuk [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 1:58 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] upload time out
> 
> 
> I have an upload page on my website, and when I do large 
> files via this
> process, system times out. 
> 
> Are there some setting that I need to "tweek" to allow this process to
> finish, so if some one was to send a 10 meg file it will go through.
> Right now it will not even copy any part of the file.
> 
> Thanks
> Ryan
> 
> 
> 
> -- 
> 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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] upload time out

2003-01-29 Thread Hutchins, Richard
Yeah, it's a configuration directive, check here:

http://www.php.net/manual/en/configuration.directives.php#ini.upload-max-fil
esize

If you're moving 10MB, is it possible to use FTP instead? Don't know your
situation. Just a suggestion.

> -Original Message-
> From: Ryan Holowaychuk [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 1:58 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] upload time out
> 
> 
> I have an upload page on my website, and when I do large 
> files via this
> process, system times out. 
> 
> Are there some setting that I need to "tweek" to allow this process to
> finish, so if some one was to send a 10 meg file it will go through.
> Right now it will not even copy any part of the file.
> 
> Thanks
> Ryan
> 
> 
> 
> -- 
> 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] upload time out

2003-01-29 Thread Ryan Holowaychuk
I have an upload page on my website, and when I do large files via this
process, system times out. 

Are there some setting that I need to "tweek" to allow this process to
finish, so if some one was to send a 10 meg file it will go through.
Right now it will not even copy any part of the file.

Thanks
Ryan



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




[PHP-DB] Thank you for your help!!!!

2003-01-29 Thread Sabina Alejandr Schneider
Hello to everybody!!! this time I'm writing to you to 
thank you all for the help you have iven to me this last 
days. I'm very satisffied with this language and with the 
group of persons that are working here. Thank you once 
more for your time and help! :-)

Sabina Alejandra Schneider
[EMAIL PROTECTED]








_

Tutopia - Acceso a Internet rápido, fácil y a los mejores precios.
http://www.tutopia.com

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



RE: [PHP-DB] MySQL Error

2003-01-29 Thread Jeffrey_N_Dyke

I would check the mysql is running.  can you connect via telnet?

jeff


   
   
Matthew Moldvan
   
, 
[EMAIL PROTECTED]  
yintl.com> cc: 
   
   Subject: RE: [PHP-DB] MySQL Error   
   
01/29/2003 12:50   
   
PM 
   
   
   
   
   




I would guess something is wrong with the services that are running on your
machine, maybe MySQL isn't on the same machine as your PHP? ... Also, are
you running this on a Windows machine or UNIX?

Matt.

-Original Message-
From: JordanW [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 11:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Error


I'm getting this error message when I try the following code:

$link = mysql_connect("localhost")
   or die("Could not connect");
   print ("Connected successfully");
   mysql_close($link);

The scripts outputs:

Warning: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3

Warning: MySQL Connection Failed: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3
Could not connect

Any ideas?

Thanks



--
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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MySQL Error

2003-01-29 Thread Matthew Moldvan
I would guess something is wrong with the services that are running on your
machine, maybe MySQL isn't on the same machine as your PHP? ... Also, are
you running this on a Windows machine or UNIX?

Matt.

-Original Message-
From: JordanW [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 11:37 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Error


I'm getting this error message when I try the following code:

$link = mysql_connect("localhost")
or die("Could not connect");
print ("Connected successfully");
mysql_close($link);

The scripts outputs:

Warning: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3

Warning: MySQL Connection Failed: Can't create TCP/IP socket (10106) in
C:\Projects\WebServer\admin.php on line 3
Could not connect

Any ideas?

Thanks



-- 
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] Connecting to Mysql Server

2003-01-29 Thread Neil Lathwood
web man wrote:
> How can I change the default connecting port using php script.

That depends on hwo you connect currently, try this:

http://www.php.net/manual/en/function.mysql-connect.php

Neil

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




[PHP-DB] Connecting to Mysql Server

2003-01-29 Thread web man

Hi,

How can I change the default connecting port using php script.

Thanks



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


[PHP-DB] PHP and VPOS

2003-01-29 Thread Altug AZCANLI
Hi,
Is there anybody who knows the links/sites about PHP and VPOS? I still search about 
it, but i couldn't any useful information yet.
Thanks.



Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Jeffrey_N_Dyke

it IS 3306(in a default setup) that you'll need to allow traffic through
the firewall for this scenario.  I have similar needs and that is the port
we open.


   
 
"Matt Vos" 
 
, 
<[EMAIL PROTECTED]>   
t.com>   cc:   
 
 Subject: Re: [PHP-DB] Question on the 
port PHP uses to connect to  
01/29/2003remote MySQL 
 
09:29 AM   
 
   
 
   
 




In a default setup, I believe the port is 3306.
Check your MySQL config files, as this can be changed.

Matt
- Original Message -
From: Louis Feng <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 10:34 PM
Subject: [PHP-DB] Question on the port PHP uses to connect to remote MySQL


> Here is my problem. I have PHP running on one machine, mysql on another
> one. Everything works fine till I put a firewall on the PHP machine,
> which blocks pretty much every port there is except port 80. Now, PHP
> can't connect to the mysql database anymore. If I disable the firewall
> on the PHP machine it works again. So I eliminate the reasons down to
> that PHP must uses some port for mysql return the query. The question is
> which port does PHP use for the connection? I'm NOT talking about 3306
> which is used by Mysql. Anyone could help? Thanks in advance.
>
> Louis
>
>
> --
> 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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] mysql_insert_id() vs. last_insert_id()

2003-01-29 Thread Hutchins, Richard
> The one thing that jumps out at me is that if you insert multiple
> rows at the same time with an insert statement, 
> LAST_INSERT_ID() returns the
> value for the first inserted row only, whereas 
> MYSQL_INSERT_ID() returns the
> last id inserted. Am I reading that right?

Yeah, that's the way I interpreted it and I had the same question as you.
Why would you want to do that?

The only think I could think of is if your first INSERT statement inserted a
parent with an ID and the next, say, 5 inserts inserted children, if you
used LAST_INSERT_ID() you could get the ID of the parent.

I might be thinking this through the wrong way, but it IS on a
per-connection basis and if the first query ON THAT CONNECTION was a parent
and the rest were children I guess that scenario would hold true. I'm sure
there are many other examples of how this might be beneficial.

Any further thoughts?

Rich

> -Original Message-
> From: Randy Phillips [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 29, 2003 9:30 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] mysql_insert_id() vs. last_insert_id()
> 
> 
> on 1/28/03 11:42 AM, John W. Holmes at [EMAIL PROTECTED] wrote:
> 
> >> The reason I ask is, if you use mysql_insert_id() on a 
> busy server and
> > it
> >> does not function on a per-connection basis, don't you run 
> the risk of
> >> getting the last ID of somebody else's INSERT query on the server?
> > 
> > Yes, they are both on a per-connection basis. They'd be useless
> > otherwise.
> 
> 
> I agree. Although, the MySQL docs are confusing on the 
> distinction between
> these two functions in my opinion.
> 
> The one thing that jumps out at me is that if you insert multiple
> rows at the same time with an insert statement, 
> LAST_INSERT_ID() returns the
> value for the first inserted row only, whereas 
> MYSQL_INSERT_ID() returns the
> last id inserted. Am I reading that right?
> 
> I guess the question is: Why is it useful to only store the 
> first id? When
> would you want that?
> 
> 
> --
> Randy Phillips www.phillips-it.com
> phillipsIT, L.L.C. voice: 636.390.9468
> Senior Web DevelopereFax: 501.423.3817
> --
>Get SideKick -> for MySQL -> http://www.phillips-it.com/sidekick
> 
> 
> -- 
> 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] Odd browser problem with sessions

2003-01-29 Thread Gary . Every
IE 5.01 has an issue with its basic auth. There is no patch, only an upgrade
path


Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:[EMAIL PROTECTED]
http://accessingram.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 28, 2003 2:02 PM
To: PHP-DB List
Subject: [PHP-DB] Odd browser problem with sessions


I have a web site that is protected using sessions, and it works fine. 
Only occasionally
when a end-user tries to log in using IE the login screen will just 
reload, every time they
try to log in. I found that by closing IE (all windows) then trying again, 
it will go on to the 
proper page. This behavior appears to only effect IE, I saw it once on 
either Netscape
or Mozilla (I don't recall which), and no one I've talked to on the phone 
has had this 
problem in any browser other than IE, and there have been many calls about 
this. Any
idea what this might be caused by?
Thanks,
--
Chip Wiegand
Computer Services
Simrad, Inc
www.simradusa.com
[EMAIL PROTECTED]

"There is no reason anyone would want a computer in their home."
 --Ken Olson, president, chairman and founder of Digital Equipment 
Corporation, 1977
 (Then why do I have 8? Somebody help me!)

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



Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Matt Vos
In a default setup, I believe the port is 3306.
Check your MySQL config files, as this can be changed.

Matt
- Original Message - 
From: Louis Feng <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 10:34 PM
Subject: [PHP-DB] Question on the port PHP uses to connect to remote MySQL


> Here is my problem. I have PHP running on one machine, mysql on another 
> one. Everything works fine till I put a firewall on the PHP machine, 
> which blocks pretty much every port there is except port 80. Now, PHP 
> can't connect to the mysql database anymore. If I disable the firewall 
> on the PHP machine it works again. So I eliminate the reasons down to 
> that PHP must uses some port for mysql return the query. The question is 
> which port does PHP use for the connection? I'm NOT talking about 3306 
> which is used by Mysql. Anyone could help? Thanks in advance.
> 
> Louis
> 
> 
> -- 
> 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] mysql_insert_id() vs. last_insert_id()

2003-01-29 Thread Randy Phillips
on 1/28/03 11:42 AM, John W. Holmes at [EMAIL PROTECTED] wrote:

>> The reason I ask is, if you use mysql_insert_id() on a busy server and
> it
>> does not function on a per-connection basis, don't you run the risk of
>> getting the last ID of somebody else's INSERT query on the server?
> 
> Yes, they are both on a per-connection basis. They'd be useless
> otherwise.


I agree. Although, the MySQL docs are confusing on the distinction between
these two functions in my opinion.

The one thing that jumps out at me is that if you insert multiple
rows at the same time with an insert statement, LAST_INSERT_ID() returns the
value for the first inserted row only, whereas MYSQL_INSERT_ID() returns the
last id inserted. Am I reading that right?

I guess the question is: Why is it useful to only store the first id? When
would you want that?


--
Randy Phillips www.phillips-it.com
phillipsIT, L.L.C. voice: 636.390.9468
Senior Web DevelopereFax: 501.423.3817
--
   Get SideKick -> for MySQL -> http://www.phillips-it.com/sidekick


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




[PHP-DB] Re: Web image database questions

2003-01-29 Thread J.Veenhuijsen
I read a lot of different advice for this
My oppinion would be to store the images in a directory
and store the path names in the database.

It is more easy to make a 'suited' directory structure
for the images.

For 30.000 images you need a lot of diskspace.


Storing the images in the database would make it i guess
to slow.

Jochem



Kim Kohen wrote:

Hi folks,

A friend of mine would like to use PHP/MySQL to host a web based photo
archive. I believe it will hold around 20,000 to 30,000 photos at a
reasonable size for web display - perhaps 100 k or so each.  I expect he'd
have a small preview 'clickable' to a larger version.

I searched the list archives for help but have still come up with two
questions;

For the type and quantity of content, would blob storage of the images be
best or should he use OS/directory storage and display them by calling the
file path?

Is there an easy way to upload an entire folder of images into a MySQL db?
(I've checked hotscripts.com etc but most of the image stuff only handled
single image uploads)

Cheers and thanks

Kim




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




Re: [PHP-DB] sql syntax error

2003-01-29 Thread 1LT John W. Holmes

- Original Message -
From: "Addison Ellis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 28, 2003 10:46 PM
Subject: [PHP-DB] sql syntax error


> hello,
> i can not pinpoint this. your time and help is very much
> appreciated. best, addison
>
> Error:
>   id=, HTTP_POST_VARS=Array, key=, value=, category=, subcategory=,
> [EMAIL PROTECTED]
> Error in query: insert into ads values
>
(year,make,model,color,mileage,condition,price,other,contact,next_,,created)
> values ('',,NOW()),Error:You have an error in your SQL syntax near
> 'created) values ('',,NOW())' at line 1
>
> Code:
> else
>   {
>  foreach($HTTP_POST_VARS as $column_name => $column_value)
>
>  $column_names .= $column_name . ',';
>  $column_values .= "'$column_values',";
>
>  $query = "insert into ads values ($column_names,created)
>values ($column_values,NOW())";
>  $result = mysql_query($query)
> or die ("Error in query: $query,Error:"
.mysql_error());
>  }

Try this:

foreach($HTTP_POST_VARS as $column_name => $column_value)
{
  $column_names .= $column_name . ',';
  $column_values .= "'$column_value',";
 }
  $query = "insert into ads values ($column_names created)
values ($column_values NOW())";
  $result = mysql_query($query)
 or die ("Error in query: $query,Error:"
.mysql_error());

I still don't think it's going to work for you. do you really have a column
called 'next_' in your table? It's probably the button you pressed to submit
the form, which is in HTTP_POST_VARS, but I don't see a reason it would be
in your table...

---John Holmes...


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




[PHP-DB] Web image database questions

2003-01-29 Thread Kim Kohen
Hi folks,

A friend of mine would like to use PHP/MySQL to host a web based photo
archive. I believe it will hold around 20,000 to 30,000 photos at a
reasonable size for web display - perhaps 100 k or so each.  I expect he'd
have a small preview 'clickable' to a larger version.

I searched the list archives for help but have still come up with two
questions;

For the type and quantity of content, would blob storage of the images be
best or should he use OS/directory storage and display them by calling the
file path?

Is there an easy way to upload an entire folder of images into a MySQL db?
(I've checked hotscripts.com etc but most of the image stuff only handled
single image uploads)

Cheers and thanks

Kim


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