mysql_connect() problem

mysql_connect() problem

Post by ads mys » Fri, 19 Dec 2003 13:24:52



--0-1892677911-1071721398=:1916
Content-Type: text/plain; charset=us-ascii

Hi,
I am trying to setup network having
1) Linux main server running IPTABLES firewall, squid, dns server.
2) LAN connected to main server.
2) DMZ having apache, mysql and php, mail server connected to main server.
User will use php script from remote host to connect to mysql as follows:

where local host will be dmz.
Is it O.K. if I give all user give host as "localhost" in script?
Will it involve any security problem?
If so what is generally done in this type of case.
My reverse DNS does not point to my domain instead it point sto domain of Internet bandwidth service porvider.
Thanks for support.

---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing
--0-1892677911-1071721398=:1916--

 
 
 

mysql_connect() problem

Post by ads mys » Fri, 19 Dec 2003 14:35:43


--0-2012263256-1071725668=:22300
Content-Type: text/plain; charset=us-ascii

Hi,
I am trying to setup network having
1) Linux main server running IPTABLES firewall, squid, dns server.
2) LAN connected to main server.
2) DMZ having apache, mysql and php, mail server connected to main server.

User will use php script from remote host to connect to mysql as follows:


where local host will be dmz.

Is it O.K. if I give all user give host as "localhost" in script?
Will it involve any security problem?
If so what is generally done in this type of case.
My reverse DNS does not point to my domain instead it point sto domain of Internet bandwidth service porvider.
Thanks for support.

---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing
--0-2012263256-1071725668=:22300--

 
 
 

1. Mysql_connect problem

I'm having a problem with mysql_connect(). Here is the code I am using:

function db_connect() {
   global $dbhost, $dbusername, $dbuserpassword, $default_dbname;
   global $MYSQL_ERRNO, $MYSQL_ERROR;

   $link_id = mysql_connect($dbhost, $dbusername, $dbuserpassword);
   if(!$link_id) {
      $MYSQL_ERRNO = 0;
      $MYSQL_ERROR = "Connection failed to the host $dbhost.";
      return 0;
   }
   else if(!mysql_select_db($dbname)) {
      $MYSQL_ERRNO = mysql_errno();
      $MYSQL_ERROR = mysql_error();
      return 0;
   }
   else return $link_id;

The problem is, that it completely hangs up and times out. I use this
code on many diff websites and servers, but on this particular server
and site, this happens. I have never done anything else on this server,
so I was thinking it might be the settings, but I'm not even sure where
to start. Usually I just get back error message such as invalid password
or user etc....but this completely hangs and times out, just on the
mysql_connect() alone. If I take that out, the page loads up fine, but
of course I can't do any MySQL work. Any help would be appreciated and I
thank you in advance :)

-Chris

****************************
Christopher Moreno
Web Developer
http://www.chaosad2000.com
****************************

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)



Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

2. ScanWizard 5 and ScanMaker E3

3. problems with mysql_connect()

4. WinFax Pro 4

5. Php/Mysql problem -> undiefined method mysql_connect()

6. MonthCalendar control

7. mysql_connect () and mysql_pconnect are not recognized ! Pls help.

8. SpoolFileName

9. Call to undefined function: mysql_connect()

10. mysql_connect() error

11. Fw: Installation issues : Unrecognized function mysql_connect(***)

12. Installation issues : Unrecognized function mysql_connect(***)

13. mysql_pconnect vs mysql_connect