php-windows Digest 30 Jun 2003 09:49:54 -0000 Issue 1801
Topics (messages 20614 through 20624):
Re: Survey question of sorts - "editors" and "development environments" have been
generically mentioned in various emails to this list ... I'm interested in
20614 by: Luis Ferro
20617 by: Stephen
authenticating with SQL Server 2000
20615 by: Micah Montoy
20616 by: Luis Ferro
20622 by: Frank M. Kromann
Post-Install prob
20618 by: Mike Goggin
PHP help
20619 by: Bill Pilgrim
20620 by: Rowan Hick
20621 by: Bautista, Rodel D.(Digitel-GSM)
20624 by: Seung Hwan Kang
Re: PEAR
20623 by: Matrix
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 ---
I like Eclipse for instance... and some sort of lightweight editor like
notepad, editpad and the like...
LF
(Eclipse has some nice modules for php which make syntax
highlight/autocompletion and helps integrated)
Rob E wrote:
specific mention of what you folks use when developing PHP code. I am a
newbie; have been using notepad to create small php scripts while
learning syntax, etc. I am curious what you folks use and recommend for
us who are starting out. I, per se, have no problem with notepad, but
am wondering what you're experiences have been with various IDE software
that I have found while googling, i.e., phpide, PHPEdit, et al.
Thanks in advance,
Rob E.
--- End Message ---
--- Begin Message ---
Rob,
Personally, I like Maguma Studio for PHP. It has all the usual highlighting,
function completing/command listing and so on. Also, I find it can open most
files which contain text... quite handy!
http://www.maguma.com/en/index.html
Stephen
----- Original Message -----
From: "Rob E" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 29, 2003 8:44 PM
Subject: [PHP-WIN] Survey question of sorts - "editors" and "development
environments" have been generically mentioned in various emails to this list
... I'm interested in
> specific mention of what you folks use when developing PHP code. I am a
> newbie; have been using notepad to create small php scripts while
> learning syntax, etc. I am curious what you folks use and recommend for
> us who are starting out. I, per se, have no problem with notepad, but
> am wondering what you're experiences have been with various IDE software
> that I have found while googling, i.e., phpide, PHPEdit, et al.
>
> Thanks in advance,
>
> Rob E.
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I'm in the process of learning PHP. I've gotten to the point of having
problems with accessing a database. What is happening is that I am getting
the message "Couldn't connect to SQL Server on BOBOS" (the name of the
server). I've tried putting in a user but with the same results. Now, I'm
wondering if there is some setting in the php.ini file that I missed. I
specified in the php.ini file to use the sql server extension and it
compiles without error. Here is the code.
<?php
$myServer = "BOBOS";
$myUser = "Bobo the Bugbear";
$myPass = ""; //password not required
$myDB = "picture_DB";
$server = @mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
$database = @mssql_select_db($myDB)
or die("Couldn't open database $myDB");
$result = mssql_query("SELECT * FROM category",$database);
printf ("Category: %s<br>n", mssql_result($result,0,"name"));
while($row = mssql_fetch_row($result))
{
echo "<li>" . $row[0] . "</li>";
}
?>
What might I be missing? I already specified the database in the ODBC
connection part of windows. Wasn't sure if this was needed or not but did
it anyway. Anyway, if you could send me a note on what it is I might be
missing, I would greatly appreciate it.
thanks
--- End Message ---
--- Begin Message ---
Do you have the mssql_*.dll uncommented from php.ini?
And the extension directory correctly set-up to the directory where that
dll is inside the php directory?
LF
Micah Montoy wrote:
I'm in the process of learning PHP. I've gotten to the point of having
problems with accessing a database. What is happening is that I am getting
the message "Couldn't connect to SQL Server on BOBOS" (the name of the
server). I've tried putting in a user but with the same results. Now, I'm
wondering if there is some setting in the php.ini file that I missed. I
specified in the php.ini file to use the sql server extension and it
compiles without error. Here is the code.
<?php
$myServer = "BOBOS";
$myUser = "Bobo the Bugbear";
$myPass = ""; //password not required
$myDB = "picture_DB";
$server = @mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
$database = @mssql_select_db($myDB)
or die("Couldn't open database $myDB");
$result = mssql_query("SELECT * FROM category",$database);
printf ("Category: %s<br>n", mssql_result($result,0,"name"));
while($row = mssql_fetch_row($result))
{
echo "<li>" . $row[0] . "</li>";
}
?>
What might I be missing? I already specified the database in the ODBC
connection part of windows. Wasn't sure if this was needed or not but did
it anyway. Anyway, if you could send me a note on what it is I might be
missing, I would greatly appreciate it.
thanks
--- End Message ---
--- Begin Message ---
Hi,
If you remove the @ in front of the mssql_* functions you might get a bit
more information about the problem.
Using the MSSQL Server extension requires these stapes:
1) Install the SQL Server Client tools on the maschine running PHP (if
your are using Win32)
2) Configure a server alias using the client network utility. The alias
specifies name, host name, protocol and port numbers used for the db
communication.
3) Connect to the database using the alias as db name as first parameter
in mssql_connect.
4) If the SQL Server is configured for trusted connections only, enable
this in PHP.INI by setting mssql.secure_connection = On (no need for
userid and password then)
If you are connection from a *nix box. You need to compile and install
FreeTDS and recompile php using the --with-mssql configure option.
There is no need to create any ODBC configurations to use the mssql_*
functions
- Frank
> I'm in the process of learning PHP. I've gotten to the point of having
> problems with accessing a database. What is happening is that I am
getting
> the message "Couldn't connect to SQL Server on BOBOS" (the name of the
> server). I've tried putting in a user but with the same results. Now,
I'm
> wondering if there is some setting in the php.ini file that I missed.
I
> specified in the php.ini file to use the sql server extension and it
> compiles without error. Here is the code.
>
> <?php
> $myServer = "BOBOS";
> $myUser = "Bobo the Bugbear";
> $myPass = ""; //password not required
> $myDB = "picture_DB";
>
> $server = @mssql_connect($myServer, $myUser, $myPass)
> or die("Couldn't connect to SQL Server on $myServer");
>
> $database = @mssql_select_db($myDB)
> or die("Couldn't open database $myDB");
>
> $result = mssql_query("SELECT * FROM category",$database);
> printf ("Category: %s<br>n", mssql_result($result,0,"name"));
> while($row = mssql_fetch_row($result))
>
> {
> echo "<li>" . $row[0] . "</li>";
> }
> ?>
>
> What might I be missing? I already specified the database in the ODBC
> connection part of windows. Wasn't sure if this was needed or not but
did
> it anyway. Anyway, if you could send me a note on what it is I might
be
> missing, I would greatly appreciate it.
>
> thanks
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Howdy.
So I installed Apache 2 and PHP 4 and everything went down without a hitch.
I checked everything on localhost and then tried to access it from my DNS
address. Everything was okay. I didn't get any errors or anything. However,
when I went to test PHP, it worked fine on localhost, but screwed up when I
tried to access it from the DNS. The test page loads, then does a redirect
to "The page cannot be displayed."
Any help would be appreciated.
- Mike Goggin
--- End Message ---
--- Begin Message ---
My System:
Windows 98
Apache 1.3.27
PHP 4
mysql
Hello all, I am a PHP beginner and was wondering if I could get some help from some of
the more experienced on this list. I have been trying to use an html form (with
textboxes, radio buttons, and textareas) to input data into a mysql database. I am
able to connect fully with the database and am able to create tables in it, but when I
try to input information into the tables nothing happens. ever... I don't really know
what to do from here, but I assume that a configuration is not set properly between
mysql, apache, windows, or php. I really don't know what it could be. My code is
here and I have tried to simplify the form in order to get it working, so here is my
barebones code that hopefully has some errors:
HTML:
<html>
<head>
<title>Simplify</title>
</head>
<body>
<form action="addform.php" method="post">
Login: <input type="text" name="login">
<input type="submit">
</form>
</body>
</html>
PHP file called "addform.php":
<?
$user="chris";
$database="test";
mysql_connect(localhost,$user);
@mysql_select_db($database) or die("unable to select database");
$query="INSERT INTO login VALUES ("'$login')";
mysql_query($query);
mysql_close();
?>
Login is the name of the table on the database named test.
I stopped using a password because it wouldn't let anything work even table creation
when I tried to use a password. Any help that anyone could give would be greatly
appreciated; there is probably some grievious error in this script. Thanks, Chris
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
--- End Message ---
--- Begin Message ---
General hints - if you find a query is not working use a gui tool and
try the exact query manually.
Eg place in the script
echo "Line 5 qry:".$query."<br>";
Then copy the output into a gui tool (such as mysqlmanager) and run it,
it will pretty quickly tell you whats wrong.
However a good starting point would be changing your query to
$query = "INSERT INTO login ( column1 ) VALUES ( '$login') ";
Where column1 is the name of the column you're wanting to insert data into.
And you also want to clean the input data, so no one can enter erroneous
custard that may screw up your scripts. Look at resources such as
zend.com, phparch.com etc for good places of learning.
Enjoy
Rowan
http://Mojozone.co.nz/
Bill Pilgrim wrote:
My System:
Windows 98
Apache 1.3.27
PHP 4
mysql
Hello all, I am a PHP beginner and was wondering if I could get some help from some of the more experienced on this list. I have been trying to use an html form (with textboxes, radio buttons, and textareas) to input data into a mysql database. I am able to connect fully with the database and am able to create tables in it, but when I try to input information into the tables nothing happens. ever... I don't really know what to do from here, but I assume that a configuration is not set properly between mysql, apache, windows, or php. I really don't know what it could be. My code is here and I have tried to simplify the form in order to get it working, so here is my barebones code that hopefully has some errors:
HTML:
<html>
<head>
<title>Simplify</title>
</head>
<body>
<form action="addform.php" method="post">
Login: <input type="text" name="login">
<input type="submit">
</form>
</body>
</html>
PHP file called "addform.php":
<?
$user="chris";
$database="test";
mysql_connect(localhost,$user);
@mysql_select_db($database) or die("unable to select database");
$query="INSERT INTO login VALUES ("'$login')";
mysql_query($query);
mysql_close();
?>
Login is the name of the table on the database named test.
I stopped using a password because it wouldn't let anything work even table creation when I tried to use a password. Any help that anyone could give would be greatly appreciated; there is probably some grievious error in this script. Thanks, Chris
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
--- End Message ---
--- Begin Message ---
Sir, kindly try these lines:
1) $query="INSERT INTO login VALUES ("$_POST('login')")";
2) $query="INSERT INTO login VALUES ("$_REQUEST('login')")";
or check in your php.ini file the line
register_globals = on/off
should be "on" if you wish to use
$query="INSERT INTO login VALUES ("$login")";
Note: I've observed an extra double quote in the line above in your script.
I hope this can help.
Rodel D. Bautista
> -----Original Message-----
> From: Bill Pilgrim [SMTP:[EMAIL PROTECTED]
> Sent: Monday, June 30, 2003 1:30 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] PHP help
>
> My System:
> Windows 98
> Apache 1.3.27
> PHP 4
> mysql
> Hello all, I am a PHP beginner and was wondering if I could get some help
> from some of the more experienced on this list. I have been trying to use
> an html form (with textboxes, radio buttons, and textareas) to input data
> into a mysql database. I am able to connect fully with the database and
> am able to create tables in it, but when I try to input information into
> the tables nothing happens. ever... I don't really know what to do from
> here, but I assume that a configuration is not set properly between mysql,
> apache, windows, or php. I really don't know what it could be. My code
> is here and I have tried to simplify the form in order to get it working,
> so here is my barebones code that hopefully has some errors:
> HTML:
> <html>
> <head>
> <title>Simplify</title>
> </head>
> <body>
> <form action="addform.php" method="post">
> Login: <input type="text" name="login">
> <input type="submit">
> </form>
> </body>
> </html>
> PHP file called "addform.php":
> <?
> $user="chris";
> $database="test";
> mysql_connect(localhost,$user);
> @mysql_select_db($database) or die("unable to select database");
> $query="INSERT INTO login VALUES ("'$login')";
> mysql_query($query);
> mysql_close();
> ?>
> Login is the name of the table on the database named test.
> I stopped using a password because it wouldn't let anything work even
> table creation when I tried to use a password. Any help that anyone could
> give would be greatly appreciated; there is probably some grievious error
> in this script. Thanks, Chris
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
--- End Message ---
--- Begin Message ---
i found some mistakes here!
if register_globals = Off in php.ini
$query="INSERT INTO login VALUES (" . $_POST['login'] . ")";
if register_globals = On in php.ini
$query="INSERT INTO login VALUES (" . $login . ")";
Rodel D. Bautista wrote:
Sir, kindly try these lines:
1) $query="INSERT INTO login VALUES ("$_POST('login')")"
2) $query="INSERT INTO login VALUES ("$_REQUEST('login')")";
or check in your php.ini file the line
register_globals = on/off
should be "on" if you wish to use
$query="INSERT INTO login VALUES ("$login")";
Note: I've observed an extra double quote in the line above in your script.
I hope this can help.
Rodel D. Bautista
-----Original Message-----
From: Bill Pilgrim [SMTP:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 1:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP help
My System:
Windows 98
Apache 1.3.27
PHP 4
mysql
Hello all, I am a PHP beginner and was wondering if I could get some help
from some of the more experienced on this list. I have been trying to use
an html form (with textboxes, radio buttons, and textareas) to input data
into a mysql database. I am able to connect fully with the database and
am able to create tables in it, but when I try to input information into
the tables nothing happens. ever... I don't really know what to do from
here, but I assume that a configuration is not set properly between mysql,
apache, windows, or php. I really don't know what it could be. My code
is here and I have tried to simplify the form in order to get it working,
so here is my barebones code that hopefully has some errors:
HTML:
<html>
<head>
<title>Simplify</title>
</head>
<body>
<form action="addform.php" method="post">
Login: <input type="text" name="login">
<input type="submit">
</form>
</body>
</html>
PHP file called "addform.php":
<?
$user="chris";
$database="test";
mysql_connect(localhost,$user);
@mysql_select_db($database) or die("unable to select database");
$query="INSERT INTO login VALUES ("'$login')";
mysql_query($query);
mysql_close();
?>
Login is the name of the table on the database named test.
I stopped using a password because it wouldn't let anything work even
table creation when I tried to use a password. Any help that anyone could
give would be greatly appreciated; there is probably some grievious error
in this script. Thanks, Chris
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
--- End Message ---
--- Begin Message ---
Melih Onvural wrote:
Has anyone found a way to install PEAR components onto a Windows machine?
melih
run "go-pear.bat"
--- End Message ---