php-general Digest 2 Oct 2006 07:52:35 -0000 Issue 4379

Topics (messages 242443 through 242449):

Re: newbie php tutorial question
        242443 by: Stut
        242448 by: J R

Strange error in PHP/MySQL
        242444 by: Deckard

Problems creating a user in MySQL
        242445 by: Deckard
        242446 by: Prathaban Mookiah

Re: Hotmail and junk mail
        242447 by: Stefan van der Linden
        242449 by: J R

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
srdaniel wrote:
> I setup Apache 2.2.3.0 and PHP 5.1.6.6.
> 
> When I run this PHP file:
> 
> ----------------
> <html>
>  <head>
>   <title>PHP Test</title>
>  </head>
>  <body>
>  <?php echo '<p>Hello World</p>'; ?>
>  </body>
> </html>
> ----------------
> 
> Any ideas why I get this for output?
> 
> ----------------
> Hello World
> 
> '; ?>
> ----------------

Apache has not been set up correctly to run this file as PHP. Have a
look at the installation section of the PHP manual - odds are you'll
find the answer there: http://php.net/install

-Stut

--- End Message ---
--- Begin Message ---
run this bit of code to check if everything is working.

<?php
phpinfo();
?>

On 10/2/06, Stut <[EMAIL PROTECTED]> wrote:

srdaniel wrote:
> I setup Apache 2.2.3.0 and PHP 5.1.6.6.
>
> When I run this PHP file:
>
> ----------------
> <html>
>  <head>
>   <title>PHP Test</title>
>  </head>
>  <body>
>  <?php echo '<p>Hello World</p>'; ?>
>  </body>
> </html>
> ----------------
>
> Any ideas why I get this for output?
>
> ----------------
> Hello World
>
> '; ?>
> ----------------

Apache has not been set up correctly to run this file as PHP. Have a
look at the installation section of the PHP manual - odds are you'll
find the answer there: http://php.net/install

-Stut

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




--
GMail Rocks!!!

--- End Message ---
--- Begin Message ---
Hello,

I have this code:

 // insert new user in mysql user table
  $sqlInsertUser = "INSERT INTO user (Host, User , Password ,
Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('$hostname',
'$mysql_username', '$mysql_password', 'N', 'N', 'N', 'N')";

  if (mysql_query($sqlInsertUser, $conn))
   $messagesqlInsertUser = 'Success...';
  else
   $messagesqlInsertUser = 'Error: ' . mysql_error();
  $result = mysql_query($sqlInsertUser);

that gives me the error:
"Error: Duplicate entry 'localhost-' for key 1"

I can't see nothing wrong with it and if i run it in MySQL's prompt
everything's fine.

Any ideas ?

Besta Regards,
Deckard.

--- End Message ---
--- Begin Message ---
Hello,


I have this code:
-------------------------------------------------------
  // use mysql database
  mysql_select_db('mysql') or die('Cannot select MySQL database.' .
mysql_error());

  // insert new user in mysql user table
  $sqlInsertUser = "INSERT INTO user (Host, User , Password ,
Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('$hostname',
'$mysql_username', '$mysql_password', 'N', 'N', 'N', 'N')";

  if (mysql_query($sqlInsertUser, $conn))
   $messagesqlInsertUser = 'Success...';
  else
   $messagesqlInsertUser = 'Error: ' . mysql_error();
  $result = mysql_query($sqlInsertUser);
-------------------------------------------------------

that gives me the error:
---------------------------------------------------
Error: Duplicate entry 'localhost-gamito' for key 1
---------------------------------------------------

although the pair 'localhost-gamito' is not duplicated and i can be
assured os this, because it works perfectly well in the MySQL prompt.

Can someone help me, please ?

Best Regards,
Deckard

--- End Message ---
--- Begin Message ---
I am not sure why you get this error message, but are you sure about the 
permsissions? i.e. does this user have permission to write to the MYSQL 
database and user table?

Prathap


---------- Original Message -----------
From: Deckard <[EMAIL PROTECTED]>
To: [email protected]
Sent: Sun, 01 Oct 2006 21:48:21 +0100
Subject: [PHP] Problems creating a user in MySQL

> Hello,
> 
> I have this code:
> -------------------------------------------------------
>   // use mysql database
>   mysql_select_db('mysql') or die('Cannot select MySQL database.' .
> mysql_error());
> 
>   // insert new user in mysql user table
>   $sqlInsertUser = "INSERT INTO user (Host, User , Password ,
> Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES 
> ('$hostname', '$mysql_username', '$mysql_password', 'N', 'N', 'N', 
> 'N')";
> 
>   if (mysql_query($sqlInsertUser, $conn))
>    $messagesqlInsertUser = 'Success...';
>   else
>    $messagesqlInsertUser = 'Error: ' . mysql_error();
>   $result = mysql_query($sqlInsertUser);
> -------------------------------------------------------
> 
> that gives me the error:
> ---------------------------------------------------
> Error: Duplicate entry 'localhost-gamito' for key 1
> ---------------------------------------------------
> 
> although the pair 'localhost-gamito' is not duplicated and i can be
> assured os this, because it works perfectly well in the MySQL prompt.
> 
> Can someone help me, please ?
> 
> Best Regards,
> Deckard
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
------- End of Original Message -------

--- End Message ---
--- Begin Message ---
hello every one :)

what ever i do emails i sent got in the junk mail

i fixed the header
add spf record to the domain
using mail server with specific IP
fix all dns error

nothing work

any one get it correct ?

Can you please be more specific by giving the headers you use?

Regards,
Stefan

--- End Message ---
--- Begin Message ---
if i get you right. your email to hotmail goes to junk/spam mail?

i think i encounter this way way back when our email domain got listed into
spam emailer :D

so better check if your domain is on that list. i forgot what was the URL.

anyway just an idea.


hth,
John

On 10/2/06, Stefan van der Linden <[EMAIL PROTECTED]> wrote:

>hello every one :)
>
>what ever i do emails i sent got in the junk mail
>
>i fixed the header
>add spf record to the domain
>using mail server with specific IP
>fix all dns error
>
>nothing work
>
>any one get it correct ?

Can you please be more specific by giving the headers you use?

Regards,
Stefan

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




--
GMail Rocks!!!

--- End Message ---

Reply via email to