Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Cannot Make Connection To Local MySQL Server From Within Dreamweaver.


I am using OS X and Dreamweaver MX. I am trying to make a connection
to the MySQL Server from within Dreamweaver using the Applications
panel and clicking on the "+". A window opens asking for:
Connection Name: Apress
MySQL Server: localhost
User Name: apress
Password: xxxxxx
Database (Select):
When I click select so the Dreamweaver can browse to the databases in
MySQL the connection is not being made because Dreamweaver cannot find
the MySQL Server. I think that "localhost" is wrong even though I am
using the APRESS book: PHP Dreamweaver MX 2004 and it says to use
localhost. MySQL and PHP are on my local machine. I am NOT using a
remote machine. I used phpMyAdmin to create the databases.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Php MySQL Works On Remote Server, Only Partially On Local Server
code to populate form select fields with data from a MySQL database, so a user
can use those to sort/filter and view the 3,000 records. No inserts --
just selects; very simple.

I originally set this up using URL-based query strings at
http://stjuliana.org/school/ar/BUindex.php but since that only allowed
sorting and not filtering, hence all 3k records load, I made a form
verson at http://stjuliana.org/school/ar/index.php . Everything works
just fine, however, there's still a lot of tweaking I want to do, such
as splitting the form input and output into two pages (_blank), having
a printable version, etc. To that end I just set up the latest builds
of Apache, php and MySQL on my local Windows XP box, lest I blow my
beer budget for the month on bandwidth overage. <g>

I have a very simple page I used to test my localhost setup and
everything's fine. I can connect to MySQL, create, insert and select
from DBs, so I know my config is fine. All my other .php pages on this
site work fine locally as well.

The two abovementioned pages, however, are giving me fits when run
locally...

For the URL-query-string version, it loads up with the default view
(=name_ns), which grabs all records and sorts by name and point asc.
No matter which of the other sort 'views' I might choose, it still
loads up all the records in that default sort. The server's holding on
to something and I don't know how to clear it. The remote version
correctly sorts based on the query string chosen.

The form version is worse. It connects to the DB and populates the
select boxes with the field data -- that part's fine. But no matter
which submit button is selected, no data is retrieved. I get no error,
but no data either. The form's action is set to $_SERVER['PHP_SELF']
and I've tried both GET and POST -- no change.

Since the exact same pages work on the remote server I know it has to
be something on the local setup. But where do I look if there's no
obvious error?

This is probably something incredibly basic but I'm bleary-eyed from
reading tutorials and forums all over the Internet and can't come up
with anything.

Transferring A MySQL Database From Local PC Onto An ISP Server
If I have an MySQL database on my local w2k, how do I transfer it onto my
ISP server?
The ISP gave me the name of an empty MySQL database they set up for me, the
username and the password with no further explanations.
I came here from ASP/Access where I was just uploading a mdb file into my
webspace.
But with MySQL there should be a different procedure,

Can't Connect To Local MySQL Server Through Socket
I created a test web form, that successfully input the data into my test database.  However, today I created a second form, added the layout code, putting the layout and mysql connection details into a php include code. 

These are the only changes I have made, apart from field names etc, but today, I get the following error message:

QuoteWarning: mysql_query(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/fhlinux177/f/further-flight.co.uk/user/htdocs/napsters/enter.php on line 50

Warning: mysql_query(): A link to the server could not be established in /home/fhlinux177/f/further-flight.co.uk/user/htdocs/napsters/enter.php on line 50

Your nap has been added to the database. Good Luck!
I checked, but the nap hasn't been added to the database.

I use the code I found on phpmac.com.  It currently looks like this: Code:

Can't Connect To Local MySQL Server Through Socke
What does this mean. The code below is where its occuring:

Error retrieving records adam: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Code:

Connection With MySQL. Navicat - CANNOT CONNECT TO MYSQL SERVER ON LOCALHOST
I am new in PHP & MYSQL. I installed PHP & MYSQL properly. To easy
operate for MYSQL I installed Navicat and it installed properly. But
when I am going to test the connection between MYSQL & Navicate the
error message showing CANNOT CONNECT TO MYSQL SERVER ON LOCALHOST
(10022) it should mention that my connection name = localhost, Ip =
localhost,port = 3306 , user name = root in Navicat.


How To Automatically Upload Data From Mysql Database Local Server To Web
Please any one help me to provide php code to automatically upload data from mysql database local server to web mysql database.

MySQL Server Sometimes Refusing Connection
My site is setup on two servers. One to serve apache and the other is a database server.

However, if you keep refreshing the site, sometimes it gives a mySQL server connection error, sometimes it connects fine.

Our chief technologist is away right now so I'm stuck...does anyone have any ideas?

Lost Connection To MySQL Server During Query
I have php4/mysql/apache installed and working together in solaris 2.7. When ever I try to send a query to the MySql database it gives the following error "Lost connection to MySQL server during query"

I can do other stuff like create tables and databases and but sending a query is giving me problems. I searched through a forum and found someone else who encountered the same problem. he said that it was caused by the gcc version that was used to compile Php4. he said that gcc 2.8.1 is causing this error and the solution is to use gcc 2.91.x

Before I ask my sysadmin to update gcc I want make sure that this the solution to the problem. If you know of any other way that the above error can be resolved.

Lost Connection To MySQL Server During Query
i am haveing an issue connecting to a mysql database i get the following error

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /home/cutencud/public_html/testing.php on line 1

now testing.php only has one line and it looks like this

<?php mysql_connect("66.97.165.60", "root", "") ?>
anyone know what would cause that? (and i removed the password before posting

Connection Failure (Can't Connect To MySQL Server Through Socket) (111)
I am receiving the message WARNING MySQL Connection failed: Can't connect to MySQL server through socket '/var/lib/mysql/mysql.sock' (111).

I have been following the script 'Setting Up Database Driven Websites' by Ying Zhang posted on this website and all was well up to the point of executing the index.php3. That is, MySQL is working and the <? echo "Hello World"; ?> script to verify that PHP is functional worked.

I did a global search on 'mysql.sock' and found only 1 which is in /tmp/mysql.sock. Based upon the date/timestamp it was either created or touched by the 'Hello World' script mentioned above. Software: Mandrake 6.0 (RedHat 6.0), MySQL 3.23.2, PHP 3.0.8, Apache 1.3.6.

I only installed MySQL, as PHP3 was already in Apache. After checking all the conf and ini files of which I am aware, I am at a loss as to a remedy.

ERROR 2013: Lost Connection To MySQL Server During Query
I periodically recieve the following error from my MySQL server. "ERROR 2013: Lost connection to MySQL server during query" The server load is always very low (0.06). I can't figure out why I am getting these errors. Here is an extened status report from MySQL.
+--------------------------+------------+
| Variable_name | Value |
+--------------------------+------------+
| Aborted_clients | 5 |
| Aborted_connects | 340 |
| Created_tmp_tables | 2 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 1 |
| Handler_delete | 25306 |
| Handler_read_first | 23 |
| Handler_read_key | 60061392 |
| Handler_read_next | 40329034 |
| Handler_read_rnd | 3588071416 |
| Handler_update | 33411189 |
| Handler_write | 433799 |
| Key_blocks_used | 7822 |
| Key_read_requests | 485870614 |
| Key_reads | 5508 |
| Key_write_requests | 536763 |
| Key_writes | 103759 |
| Max_used_connections | 152 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 125 |
| Open_files | 84 |
| Open_streams | 0 |
| Opened_tables | 287 |
| Questions | 76301760 |
| Running_threads | 87 |
| Slow_queries | 55 |
| Uptime | 2499787 |
+--------------------------+------------+

Dreamweaver Testing Server Help
I am trying to set up a localhost testing server on windows xp home system using xampp. It installs and runs fine but I am having issues trying to get dreamweaver MX to connect to it for testing a MySQL database and PHP pages. Also wondering how to view php pages on local machine with IE7.

Make Connection Global
How can I make a connection to a dbase global so I can use it in multiple functions. eg.
PHP Code:

How To Make A Database Connection Available To All Pages?
How can I make a database connection available to all the pages in my
application? I tried doing it with session but it doesn't seem to work.

here's what a did:

Connecting Dreamweaver To MySQL
I'm new to MySQL. I recently installed it as part of a preconfigured package (Apache, PHP and MySQL) from "Apache Friends (XAMPP).

I was following a tutorial on connecting Dreamweaver to MySQL at
http://www.macromedia.com/support/dr...sql_config.htm
when I hit a snag. I think I created the MySQL username and password in the wrong directory, and it messed everything up. I reinstalled XAMPP and am giving it another try.

But before I mess with the MySQL password again, I'd like to ask a couple questions. First, do I really need one? I'm only using MySQL on my computer, which no one else uses. I publish my sites to an ISP, which has their own MySQL program installed. Or is MySQL something that has to be customized and published along with your websites?

This is what the Deramweaver instructions say about the password:

"During the MySQL installation, MySQL creates an account called root with no password, which can be used to log into the database. It is highly recommended that a password is assigned to this account since root has full control over the MySQL databases. To assign the root account a password run the following command, which will set the root password to new-password. You should replace new-password with a password of your choice that is harder to guess."

> mysqladmin -u root password new-password

My next question regards this statement:

"It is recommended that separate MySQL accounts are created for each PHP web application. You can create as many MySQL accounts as you wish and assign different rights and permissions to each account. Web application users do not need the same level of privileges as the root account."

When they say "each PHP web application," do they mean create a separate MySQL account for each WEBSITE? Does that mean I have to create a new MySQL password for each of my websites and connect it to Dreamweaver individually?

I also have PHPMyAdmin installed, but I haven't learned how to use it yet. When I click "Test PHPMyAdmin," I get a page that has a setting labeled "Create new database."

There's also a link to "Privileges," which leads to a page with keywords like "user," "password," "root" and "edit." Maybe I should use one of these pages to add a MySQL password (if necessary).

But I thought I should first ask if it's NECESSARY to create a password for MySQL.

PHP, Apache, MySQL, Dreamweaver MX
How to get it all to work!!! I've tried looking at docs, and notepad files, and text and manuals..I'm lost. I'm not sure how to set them all up to run with each other, and get DMX to recognize the apache server, and what to config, and edit and all that mess.

Mysql Question Using Dreamweaver
I can add a repeat region no problem to a page, but how do i reset the
recordset to add a second loop
Is it something to do with reset()

Export Local DB To Server DB
can anybody refer me to a tool so that i can upload data from my local
mysql DB to server DB without phpmyadmin. I have FTP and other access
to server. my DB is like 100 MB.

Local IMAP Server
I've installed EasyPHP on my Windows machine, which does the job really
fine. Apache, PHP and MySQL easy going.

What are the possibilities for installing a local IMAP and POP server for
the same test/develop purposes?

Reading Local File Not On Server
I am trying to parse a file which is located on the users local drive and then take this data and put it into the mySQL DB. However, I get errors when I pass in a file path such as C:Documents and SettingsAdministratorDesktopfooSLInfo.txt.

Upload To Local Server Problem
Can anyone see where i am going wrong? I'm testing an upload facility. Here's the code for displaying the upload form:

Local Apache Web Server Revisited
I would like to replicate an apache server on my home computer. Conclusions of a previous thread on this topic:

1) Use the same operating system for your local apache server as your host uses.

Any comments on just how important this is would be very welcome because i am thinking of cutting a corner and running my local apache server on windows XP. My prospective host uses Linux.

2) There are some nice "neat, easy, tidy" installs of apache (with PHP and MySQL) available.

easyphp
AppServ
XAMPP

Any comments on which one is best would be highly appreciated. As would further suggestions.

3) Things that I want to do which are a bit special:

) Use the PHP IMAP functions. These are a PHP extension.

http://uk2.php.net/imap

So, I will have to add this extension. How easy is this with these local apache servers?

) Does anyone know an IMAP email client that I can put on my local host apache server?

courier-imap or CyrusIMAPD are apparantly possibilities. Can anyone point me to any reseources that would guide me through setting up these clients so that they are integrated with the apache web server - so that PHP code on the apache server could have access to emails in the IMAP email inbox. PHP code on the server can send emails from the IMAP email inbox.

Apache Local Test Server On XP Pro
I'm hoping someone can help me with the following. My son is learning
PHP and wants to install an apache test server on our XP pro home
computer so he can test his code before uploading it to his hosting
company. I don't have a problem with this in principle but I do have
the following concerns:

1) We connect to the internet via AOL and my son's account is a "young
person access" account. Will this be compromised by apache?

2) Will the installation of this apache server allow my son to breach
Windows security at all (he is a restricted user at present)?

3) Any other possible security issues?

How To Setup A Local Server Environment:
I want to setup a localserver environment in my desktop (OS : Win XP)so that i could use ASP.Net , PHP , Ajax ,Mysql and SQL server in that local host.
I want to know wat are the things i should download? and from where it to
be download?

$_FILES From The Server - Not Local Machine
I'm just playing with someone else's code and was wondering how to get details of a file that's already uploaded to my server into the $_FILES super global.

the code I have is: ...$uploadedFileName = $_FILES['filename']['name'];
if($_FILES['filename']['size'] > $maxSize)
{...
all the checks are done using this and I just want to parse all this info without the user having any control / knowledge of it at all.

It's for an image upload script which has been built already, but I want lots of differing quality thumbnails to be generated, but the current code keeps asking the user to input size variables and path details to upload a file from their local machine.

Mail() Not Working On Local Server
I've got a form on a local server that has a working internet and network connection and it uses the mail function and it doesn't work. It works perfectly when I execute it online but it won't work locally. Essentially, I'm trying to mail html and here is my code:

Local Apache Server Error, But Ok When Hosted
I have just used a script that includes the first line

session_start();

On my computer where I have apache php and mysql installed I get the error:

Warning: session_start(): open(/tmpsess_4e8a9cf51a21ab1c9fe26630d5446262, O_RDWR) failed: No such file or directory (2) in c:serverapachehtdocsmaindex.php on line 2

But when I upload it to my host the page works without errors. Is there a problem with my apache setup or is it a php thing?

Time Different Between My Apache Server And My Local Clock
I actually have two questions:

1. I try to get current time, but the time I got is 1 hour different from my
local time. I assume it is caused by Time Zone. So is there any easy way to
fix this? I assume that I can first get the Time Zone of the server by using
the T option in date, and then using my local Time Zone to calculate the
difference. But I am wondering if there is some buil-in function to do it.

2. I found out this also today while workng on the same project. My apache
clock is 10 mins slower than my local clock. Any suggection to calibrate the
apache server clock (I don't own the server)?

I Need To Test The Mail() Function On A Local Server?
I want to test the mail() function in my scripts(noob) where I can send and receive e-mail using the same localmachine without having to connect to the internet. What do I need to do this?

Download Files From Remote Server To Local Webserver
I am trying to create a php page whereby people can download files from a remote server to their own server (to update their webdirectory with updated files/images etc). So for example one php page (e.g. update.php) should be able to download files from a remote server to a specific directory on their local webserver. Is this possible?

Making A Database Backup To Local Server And Upload Files To Another?
I want to make a script that backups the *.frm and *.MYD files to my server and I also want to upload those files to another server via FTP? I have a copy of the database files in the directory, that works fine. But my ftp part doesn't! PHP Code:

Redirect Page On Remote Web Host When Local Server Is Offline
Hope some one can help . I have my web site hosted on powweb (my remote web host)and I want a user to be redirected when they access my local server through a link on my remote web site to another page on my remote web site when my local server is offline.

SQL Server... Trusted Connection? Help...
I show MS SQL support when I issue PHP info, and I have a test table with testinfo in it... But, when using a connection test routine, I get the following error:

Warning: MS SQL message: Login failed for user 'hhalstead'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in D:HMWebhmmtdb.php on line 12


here is the connect code I am using:

<pre>
<?
// YOUR MSSQL 7.0 SERVER PARAMETERS
$hostname = "xxx.xxx.xxx.xxx";
$username = "hhalstead";
$password = "xxxxxxxxxx";

// YOUR MSSQL 7.0 DATABASE
$dbname = "mydb";
$tablename = "mytable" ;

// CONNECT TO THE MSSQL 7.0 DATABASE
$connection = mssql_connect($hostname,$username,$password);
mssql_select_db($dbname);
$sql_query = "select * from $tablename" ;
$query_result =mssql_query($sql_query) ;
$number_rows = mssql_num_rows($query_result) ;
$number_fields = mssql_num_fields($query_result) ;
?>
</pre>

Connection To MSSQL Server Has Stopped Working
I made all the necessary changes to my server (windows 2k3 r2) in
order to get my php page to read from my MS SQL (v6.5) server (on
another machine). I was able to pull data down last night with no
problem. Today, however, I get nothing. The server I'm pulling from
is up and has no errors. If I change the login/password for the
connection string to something wrong, I don't get an error message.
In fact, the page is blank as if there was an error within the code
(this is regardless of whether I use a correct or incorrect login).
Yesterday when it was working, if I used the wrong login, I got the
usual error message back. If I comment out all the lines regarding
the connection, it builds the table just fine.

I've attached my code below (stripped out some table columns and data
manipulation code).

I have copied ntwlibd.dll to my windowssystem32 directory and
enabled the "extension=php_mssql.dll" line in my php.ini file.

If anyone has seen this before or has any suggestions, please let me
know... this is quite frustrating.

<?php
$con = mssql_connect('server', 'login', 'password');
if (!$con)
{
die('Could not connect: ' . mssql_error());
}
mssql_select_db("CM", $con);
$sql="SELECT *FROM Private_Build";
$result = mssql_query($sql);
echo "<table border=&#391;'>
<tr>
<COL width=ï`'>
<th bgcolor='black' style ='color:white'>Patch ID</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Packages'] . "</td>";
echo "</tr>";
}
echo "</table>";
mssql_close($con);
?>

Secure Soap Connection Where Server Is In Java ?
I have been trying to figure out apache/rampart soap security. We
have a soap server in java and the client is PHP. I just read this
article which concerns me because it seems to imply rampart/java won't
work with PHP. Are there any other good solutions, particularly simple
ones ? I have been trying to get rampart/java working for the past 3
days and haven't even gotten to the PHP client part as of yet, then it
occured to me to do a google search to see if the client being in PHP
might be an issue:

in interview from this past february:

OT: There is also Apache Rampart/Java [2]. What is the relationship
between these two?

Kaushalye: Well...Rampart/ Java is our big brother. Just like Apache
Rampart/Java serves for Apache Axis2/Java, Apache Rampart/C serves for
Apache Axis2/C. We are trying our best to keep both implementations
similar, especially to keep the configurations similar. This is a bit
challenging due to the differences in the platforms. The C
implementation is not just for C developers. Our aim is to let PHP, C+
+, and Perl developers use Apache Rampart/C. So we have to make the
Apache Rampart/C implementation more flexible. We also need to provide
easy-to-use APIs for all these platforms.

Need Help With Https Socket Proxy Server Connection
here is code, that makes http connection to a
website throu
a proxy server, and it works fine:

==========================================
$proxy = "111.111.111.111";
$port = "8080";

$url = "http://www.myhost.com/folder/script.dll?variable=hello";

$fp = fsockopen($proxy, $port, $errno, $errstr,5);
fputs($fp, "GET $url HTTP/1.0
Host: $proxy

");
while(!feof($fp)){
$line = fgets($fp, 9000);
}
fclose($fp);
print($line);
==========================================

I need it to be able to make https connection, like that:

$url = "https://www.myhost.com/folder/script.dll?variable=hello";

For some reason it does not work. Proxy server does support https.
I am using http/https proxy server, but it can be changed to socks4/5
server, if its crucial. (i did that and it still does not work, no
data is returned).

Aborting HTTP Connection From Server-side
I wonder if this is possible: I have a script that does things that
take time. In the first part of the script it does data checking and
other verifications, then comes the long part. I wish to be able to
send the result of the first part to the client, disconnect the HTTP
(so the client can do whatever they want), the script should then
continue with the rest of the time consuming tasks, at the end of
execution (or if an error occurs) an e-mail is sent.

The key here is that it's the script that aborts the connection. It
would be like putting the PHP process in the background to return the
hand to web server, which in turn would close the connection.

I already used the ignore_user_abort() to better control what's going
on in the script.

I've had a look at apache_child_terminate() but it still waits that
the PHP script ends.

I don't want to use an HTTP refresh and for security reason I'd rather
avoid using a system() or exec() call.

My script is actually called by another script on another server
(using CURL)

I've also tried to add "Content-length: ..." in the HTTP headers and
use flush() to force the client to read the output and close the
connection when the byte count is reached. But it doesn't seem to work
that well... I can't either set a too short client timeout because it
needs to wait for the first part to be over (and it may depend on
server load.)

Your ideas are welcomed... of course if that could be implemented
inside PHP itself that would be great. I don't think Apache or not
matters...

MSSQL Connection From PHP Slower When Server Is Remote (crosspost)
I'm trying to get some clues on why I get (much) slower responses from
my PHP applications when dealing with a remote sql server as opposed to
a local sql server.

Here's my situation:

Server #1
MSSQL 2000 sp4
Windows 2000 Server
PHP4 on IIS5 (CGI)

Server #2
MSSQL 2000 sp4
Windows 2003 Server
PHP4 on IIS6 (CGI)

Server #1 and #2 are on the same local network and the same switch. We
use TCP/IP as the connection protocol and our connections use IPs
instead of domain names.

Server#1PHP --> Server#2 MSSQL = slow
Server#2PHP --> Server#1 MSSQL = slow
Server#1PHP --> Server#1 MSSQL = fast
Server#2PHP --> Server#2 MSSQL = fast

This slower behavior is most noticable when many stored procedures
(10-15) are being executed on one php page. When the database is local
on a page such as this, the response time is around 2 seconds. When the
sql server is remote, the response time is between 8 and 15 seconds.

Does this make sense at all?

How To Make A Server Run A Script When An Email Arrives?
I want to build a PHP-based mailing list manager. The problem is how to handle processes initiated by emails, say if a person sends an email from his/her regular email program or webmail site (hotmail, aol, pandora, whatever), e.g. to send an email message to a list he/she is subscribed to or to send an email for automatic unsubscription (with "unsubscribe" in the subject line) from a list, etc.

How would the manager handle such a process? Is there a way to get a server to automatically run a PHP script whenever, say, an email comes in addressed to some email address at @lists.MYDOMAIN.org

(say if the email is addressed to SOMELIST@lists.MYDOMAIN.org)? Or could I solve the problem by using some other scripting language, say, Perl or Python (which I don't know too well currently)?

Having Connection Timeout Problem When Calling A Php Script While Downloading A File From The Same Server.
My dot net client downloads files and checks for any new files time to
time. The server is apache2.0.53 server. So what happens is that my
file download thing works fine if I dont try to call any page from the
server while downloading. If I try to call a single page while
downloading a file then the page request goes time out and the server
then closes the existing download stream and the client doestn't throw
any exception. So many a time I end up with incomplete downloaded file.
The server side code is in PHP and every thing like calling a page or
downloading a file is done by calling some PHP script.

What is the reason behind this type of behaviour.Has this anything to
do with PHP and server settings.

Protect Local Mysql DB Access
I just password-protected an intranet site by including a password
authentication script in each page of a private section. The script
checks the login against the mySQL database. Appropriate file
permissions have been set up on the private directory.

My concern is now about protecting the Mysql password. Let's assume I
use Apache to protect the access to this password (<files></files> or
SetEnv in httpd.conf).

In my intranet directory, I have a public folder where I let users put
their html/php files to build their own pages.

How can I prevent a user from creating a php file like this :

$conn = mysql_connect($_SERVER['SQL_DB'],$_SERVER['SQL_USER'],$_SERVER['SQL_PASS'])
or die(mysql_error());

$sql = 'update user set private_access= &#391;' where username =
'myself''
$result = mysql_query($sql) or die(mysql_error());

In that way, without knowing the Mysql pwd, any user can finally have
access to the private section.

Mail() [function.mail]: SMTP Server Response: 550 Not Local Host Gmail.com
I do a mail() and get:

Warning: mail() [function.mail]: SMTP server response: 550 not local host gmail.com, not a gateway in C:xamppxampphtdocs estsitemail.php on line 7


<?php
ini_set("SMTP","rlwatkins.com");
ini_set("sendmail_from","hunter@rlwatkins.com");
mail("huntercjcarroll@gmail.com","hello me","spamtastic","From: hunter@rlwatkins.com");
?>

what is wrong with this, how do i set it so that i can send to something other than localhost?

Importing To Mysql Without LOAD DATA LOCAL
I've just gone through the learning curve of realizing most virtual hosts have "LOAD DATA LOCAL" disabled :(

I have a two meg delimited ascii file I need to import on a regular basis (26 fields)

Anyone have a nice import routine using fopen they are willing to share before I attempt to hack one out myself? I can't seem to find such an animal out there (though some are close).

Such a shame, from what I have read, load data is much faster...

Advice For Setting Up Local Hosting/mysql/php ?
this is going to sound dumb to most but here goes. Please keep in
mind, I am coming from a windows background.

I want to do some development using PhP and animated gifs. I see that the
patch can be applied to PhP 4.3.2 and 4.3.3 to enable imagegif and animate
functions. I have come to the realization that I am going to have to run
my own local linux server.

My question then is what do I need to install a local server to host web
pages from, I will also need a database. I want to run a typical hosted
site except I want to be able to easily create gif animations and I also
want access to ImageMagick. My current host has access to neither.

The installation of the MySql I think I can handle. It's the apache and
other web stuff part I think I am going to have trouble with.

So what do I need to run a typical host site then? PhP, Perl, cgi-bin,
MySql, Apache, umm?? Any good books or sites for setting up a server
step-by-step?

PHP SSH And Mysql Connection
For a long time I've been trying to connect to mysql through a SSH tunnel. Although that si possible by setting up the tunnel manually (with 'ssh -L ...'), I'd like it to be done by PHP itself.

Now, with the SSH2 extension (http://www.php.net/manual/en/ref.ssh2.php) it is possible to issue a 'ssh2_connect' and then a 'ssh2_tunnel' command.
That returns a socket resource to the destination server.
So far, all fine.

Problem:
How can I force that socket onto 'mysql_connect'?
I mean, what I have is:
$tunnel = ssh2_tunnel($connection, &#3910;.0.0.101', 12345);

But $tunnel is a PHP resource, and not in the format ':/path/to/socket' that mysql_connect expects...

Is this possible at all?

MySql Connection
Is it necessary to close a db connection at the end of a session?? Or does it autoclose?

Getting Same Mysql Connection With Php?
I have a database class i made however when i create 2 instances of it, it gives me the same connect resource id, is that normal?  is there a way in php to have different resource connection id but connect to the same database with the same login on the same server?

Common Prob With Mysql LOAD DATA LOCAL INFILE ...
i have most recent php & mysql versions running on a linuxmachine

i want to use LOAD DATA LOCAL INFILE and pass it from php to mysql.

- the file i load is given with full path and the directory is readble
- On MySQL local-infile = ON
- From PHP i connect using client flag (128) to allow passing a file over
that connection: mysq_connect( $host, $usr, $pwd, false, 128)

Ive followed all advice from php & mysql sites and deja.com ...

But i still get the message: The command is not allowed with this MySql
Version or something ...

any ideas where i should look further?

what are *all* the requirements for a LOAD DATA LOCAL INFILE to work
seamingly?

Local Access Database To Shared PHP/MySql Hosting Export
My client has an MS Access database application on her local machine. I have
full access to that in terms of changing the design.

I've got a simple PHP/MySql application on shared hosting, so no direct
access to the db server.

I'd like to give her the facility to export the information in her local
Access application to the shared PHP/MySql site. From one command button (or
similar) in the Access application.

It would be probably be a complete overwrite. That is to say all the
information on the shared site would be overwritten with that from the local
machine.

I'm assuming that I'd have to make an HTTP request to some PHP page which
would then run the SQL to delete all the records, then append all the new
ones.

Is this the right approach? I don't want to spend weeks finding out that
this is fundamentally flawed in some way. The client has an ADSL connection.


Copyright © 2005-08 www.BigResource.com, All rights reserved