[PHP] newbie php tutorial question

2006-10-01 Thread srdaniel

I setup Apache 2.2.3.0 and PHP 5.1.6.6.

When I run this PHP file:



 
  PHP Test
 
 
 Hello World'; ?>
 



Any ideas why I get this for output?


Hello World

'; ?>




srdaniel

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



Re: [PHP] newbie php tutorial question

2006-10-01 Thread Stut
srdaniel wrote:
> I setup Apache 2.2.3.0 and PHP 5.1.6.6.
> 
> When I run this PHP file:
> 
> 
> 
>  
>   PHP Test
>  
>  
>  Hello World'; ?>
>  
> 
> 
> 
> 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



[PHP] Problems creating a user in MySQL

2006-10-01 Thread Deckard
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



[PHP] Strange error in PHP/MySQL

2006-10-01 Thread Deckard
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.

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



Re: [PHP] Problems creating a user in MySQL

2006-10-01 Thread Prathaban Mookiah
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: php-general@lists.php.net
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 ---

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



Re: [PHP] Hotmail and junk mail

2006-10-01 Thread Stefan van der Linden

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



Re: [PHP] newbie php tutorial question

2006-10-01 Thread J R

run this bit of code to check if everything is working.



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:
>
> 
> 
>  
>   PHP Test
>  
>  
>  Hello World'; ?>
>  
> 
> 
>
> 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!!!