Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

PHP AND MYSQL PROBLEM!


  • Please log in to reply

#1
jrm-hosting

jrm-hosting

    Member

  • Member
  • PipPip
  • 79 posts
First thing first,
I'm RUnning windows 2003 Enterprise, with IIS, PHP, MYSQL. http://jrm-hosting.com/index.php

everytime I try to access it I get the following error.
#1130 - Host '172.16.10.1' is not allowed to connect to this MySQL server

Second, I don't know but I can't seem to add an new user account for my MYSQL server. Everytime try adding one I get an error message:" MySQL Adminstrator Exception: Error while storing the user information. The User have been deleted. Please Refresh the user list". I refresh and the new user account is deleted, now, how do I stop from happening. If someone could help me, I would really Appreciate that!
  • 0

Advertisements


#2
Magosis

Magosis

    Retired Staff

  • Retired Staff
  • 190 posts
Try setting the connect type to LocalHost. as for the user ac[bleep] this could be in relations to invalid access issue caused b y not accessing the sdtatbase from localhost. or this could be an issue with the config.php file or the SQL isntallation. could you post the config.php code (remove the password and username though.)
  • 0

#3
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
I have decided not to use MYSQL anymore, but I do need help with something else pertaining to PHP. I have a script for my contact page. I put the information, in the form as requested, and I hit submit and it process the form and redirect me to the thank you page, but it's not sending me anything to my email or the email I have set for it. Could you give me some help with that one and also if you know exchange could you please also help with that?

Thanks in advance.

link to contact page: http://jrm-hosting.com/contact.html

Edited by jrm-hosting, 08 December 2005 - 02:32 PM.

  • 0

#4
Magosis

Magosis

    Retired Staff

  • Retired Staff
  • 190 posts
Ok well post the code if you could. post it I might be able to see what I can see. It might just not be accessing the mail app you are trying to use properly.
  • 0

#5
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
Bellow is the script that I'm using.

<?
$to = "jmetellus@jrm-hosting.com";
$name = $_POST['name'];
$email = $_POST['email'] ;
$subject = $_POST['subject'];
$comments = $_POST['comments'] ;

mail( $to, $subject, $name, "Feedback Form Results", $comments );
header( "Location: thankyou.htm" );
?>


visit http://jrm-hosting.com/contact.html

and send me anything and you'll that it works, but the problem is that I don't receive anything in my email. Please someone help me please.

Thanks in advance guys.
  • 0

#6
Magosis

Magosis

    Retired Staff

  • Retired Staff
  • 190 posts
it looks like what is happenign is you are refrencing the variables befor they are being submitted. try usng the php mailer functions. for more information on these as I have never actualy needed to use them, go to www.php.net
  • 0

#7
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
Ok, I'll look into that. But can anyone help me with this issue for now?

THanks.
  • 0

#8
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
before doing anything else, please edit the post with your email address(remove the address).

here's some test code, passing 3 arguments to mail():

<?php

$to = " ";
$subject = " test # 1 ";
mail( $to, $subject, "Feedback Form Results" );

$name = $_POST['name'];
$subject = " test # 2 ";
mail( $to, $subject, $name );

$email = $_POST['email'];
$subject = " test # 3 ";
mail( $to, $subject, $email );

$subject = $_POST['subject'];
mail( $to, $subject, " subject test " );

$comments = $_POST['comments'];
$subject = " test # 5 ";
mail( $to, $subject, $comments );

?>

try this code and post your results. you'll need to enter your email address($to = ). once the 3 agr mail() is working, we can move on to 4 & 5 agrs.

Edited by bdlt, 16 December 2005 - 04:43 PM.

  • 0

#9
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
Thanks for the Code, I have tried it and I get the same thing. It's not sending the results to my email. I'm new to PHP, could it be something with the php configuration, can someone please tell me how the config should be in the php.ini file? Better a quick tutorial on how to configure php the right way? I think I have done it the right way, but then again, I may be wrong.


Please someone help!

Thanks.
  • 0

#10
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
please post the php.ini file. I'm not familiar with the php.ini file, but we can see if php is supported on your web host. try the following and post the results that are displayed. save this file(phpTest.php), upload it to your site, then run it. someone else may be able to help with the php.ini file if the code below runs.

<html>
<head></head>
<body>

<?php 
$testString = " PHP is running ";
?>

<p align="center">
PHP site test<br>	
	<?php 		  
		  echo "$testString "; 
	?>
<br>done
</p>

</body>
</html>

here are the 2 most likely results:
1.
PHP site test
done

2.
PHP site test
PHP is running
done

Edited by bdlt, 20 December 2005 - 09:31 AM.

  • 0

Advertisements


#11
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
I am the web host. This is my PHP testpage:

http://jrm-hosting.com/index.php

Edited by jrm-hosting, 20 December 2005 - 09:52 AM.

  • 0

#12
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
I received a page not found error when running your index.php link.

here's a link on php.ini files.

http://www.washingto...ng/php-ini.html

sorry to say that I've never setup a server. maybe the php.ini link will help.
  • 0

#13
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
sorry about the link, try it again.

http://jrm-hosting.com/index.php
  • 0

#14
bdlt

bdlt

    Member

  • Member
  • PipPipPip
  • 875 posts
that one works. let's look at the configuration for an 'email' value.
  • 0

#15
jrm-hosting

jrm-hosting

    Member

  • Topic Starter
  • Member
  • PipPip
  • 79 posts
I don't know if I'm missing something, but when I use the contact form to send me info, I don't them.

This is what I have for the mail config:

[mail function]
; For Win32 only.
SMTP ="localhost"
smtp_port = 25

; For Win32 only.
sendmail_from = "jmetellus@jrm-hosting.com"

Edited by jrm-hosting, 20 December 2005 - 10:00 AM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP