RE: [PHP-DB] Re: Is MySQL available from my host.
| From: | Hutchins, Richard | Date: | Fri, 03 Jan 2003 21:31:52 +0000 |
| Subject: | RE: [PHP-DB] Re: Is MySQL available from my host. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24528@lists.php.net to get a copy of this message | ||
I know when I first started working with a host that provided MySQL support,
there was a very specific path I had to use in the connection string because
"...the MySQL server is behind a very strict firewall." If I didn't use the
path exactly as their prototype indicated, I'd get errors like you have
posted.
I'd suggest you check your host's self-help tech support pages, drop them an
e-mail or call them.
> -----Original Message-----
> From: Robert Wagner [mailto:RobertWagner@alum.mit.edu]
> Sent: Friday, January 03, 2003 4:27 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Re: Is MySQL available from my host.
>
>
> "Robert Wagner" <RobertWagner@alum.mit.edu> wrote in message
> news:20030103211456.51527.qmail@pb1.pair.com...
> > I recently signed up with a "low-cost" web server, in order
> to do some
> > web-page accessed database work. The server has PHP Version
> 4.0.6 and
> > phpinfo() yields (in part):
> >
> > PHP Version 4.0.6
> >
> > System SunOS src 5.7 Generic_106541-12 sun4u sparc
> > SUNW,UltraSPARC-IIi-cEngine
> > Build Date Feb 28 2002
> > Configure Command './configure' '--disable-pear'
> '--enable-ftp'
> > '--with-sybase-ct=/usr/local/freetds' '--enable-trans-sid'
> > '--enable-force-cgi-redirect'
> > Server API CGI
> > Virtual Directory Support disabled
> > Configuration File (php.ini) Path
> /usr/local/affinity/etc/php.ini
> > ZEND_DEBUG disabled
> > Thread Safety disabled
> >
> > This program makes use of the Zend scripting language engine:
> > Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend Technologies
> >
> >
> >
> > |
> > (Some output omitted here)
> > |
> > mysql
> > MySQL Support enabled
> > Active Persistent Links 0
> > Active Links 0
> > Client API version 3.23.32
> > MYSQL_MODULE_TYPE builtin
> > MYSQL_SOCKET /tmp/mysql.sock
> > MYSQL_INCLUDE
> > MYSQL_LIBS
> >
> >
> >
> > Directive Local Value Master Value
> > mysql.allow_persistent
> > On On
> > mysql.default_host
> > no value no value
> > mysql.default_password
> > no value no value
> > mysql.default_port
> > no value no value
> > mysql.default_socket
> > no value no value
> > mysql.default_user
> > no value no value
> > mysql.max_links
> > Unlimited Unlimited
> > mysql.max_persistent
> > Unlimited Unlimited
> >
> >
> > ftp
> > FTP support enabled
> >
> >
> > Additional Modules
> >
> >
> > Environment
> > Variable Value
> > TZ US/Pacific
> > DOCUMENT_ROOT /nfs/cust/9/36/06/260639/web
> > HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg,
> image/pjpeg,
> > application/vnd.ms-excel, application/msword,
> > application/vnd.ms-powerpoint, application/x-shockwave-flash, */*
> > HTTP_ACCEPT_ENCODING gzip, deflate
> > HTTP_ACCEPT_LANGUAGE en-us
> > HTTP_CONNECTION Keep-Alive
> > HTTP_HOST www.mymain.com (<Renamed for his message!)
> > HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
> 5.1)
> > PATH /usr/bin:/bin:/usr/local/bin
> > REDIRECT_DOCUMENT_ROOT /nfs/cust/9/36/06/260639/web
> > REDIRECT_STATUS 200
> > REDIRECT_URL /Experiments/PHP_Info.php
> > REMOTE_ADDR (Deleted for this message)
> > REMOTE_PORT 7016
> > SCRIPT_FILENAME /usr/local/apache/cgi-bin/php.cgi
> > SERVER_ADDR 10.3.1.126
> > SERVER_ADMIN webmaster@mymain.com (<Renamed for his message!)
> > SERVER_NAME www.mymain.com (<Renamed for his message!)
> > SERVER_PORT 80
> > SERVER_SIGNATURE
> > SERVER_SOFTWARE Apache/1.3.26 (Unix) mod_mhp mod_mhp_log
> > mod_virtcgi frontPage/5.0 mod_status_mhp
> > GATEWAY_INTERFACE CGI/1.1
> > SERVER_PROTOCOL HTTP/1.1
> > REQUEST_METHOD GET
> > QUERY_STRING
> > REQUEST_URI /Experiments/PHP_Info.php
> > SCRIPT_NAME /bin/php.cgi
> > PATH_INFO /Experiments/PHP_Info.php
> > PATH_TRANSLATED
> > /nfs/cust/9/36/06/260639/web/ET_Experiments/PHP_Info.php
> > REMOTE_HOST (Deleted for this message)
> > (Moreoutput omitted after this)
> ---------------
> When I posted my original message, I forgot to include the result I'm
> getting from the script:
> <?php
> mysql_connect() or
> die("Could not connect (sob): " . mysql_error());
> printf ("MySQL host info: %s\n", mysql_get_host_info());
> ?>
> ----------
> The result:
> ----------
> Warning: Can't connect to local MySQL server through socket
> '/tmp/mysql.sock' (2) in
> /nfs/cust/9/36/06/260639/web/ET_Experiments/MySQL_Info.php on line 7
>
> Warning: MySQL Connection Failed: Can't connect to local MySQL server
> through socket '/tmp/mysql.sock' (2) in
> /nfs/cust/9/36/06/260639/web/ET_Experiments/MySQL_Info.php on line 7
> Could not connect (sob): Can't connect to local MySQL server through
> socket '/tmp/mysql.sock' (2)
> ---------------
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>