php-windows Digest 13 Dec 2002 04:24:40 -0000 Issue 1484
Topics (messages 17391 through 17396):
Re: can't connect localhost
17391 by: Pat Johnston
win32 installer
17392 by: metac0m
newbie question (forms)
17393 by: Elvin Certeza
17394 by: Stephen Edmonds
17395 by: Dash McElroy
IIS/ISAPI require suddenly stops working
17396 by: Paul Lockaby
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 ---
Hi all
Yes, I had several problems which I've now fixed with the help you guys.
Thnks, Pat
"Toby z" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hay pat
>
> check out ur password and user
> and make sure ur user has all the privilleges to connect to the db
> try to grant privilleges to ur user all over again .....
>
> n there aint anythin relavet to it on the manul except fo r the grant
> privilleges section ......
>
>
> hope ive helped ......
>
> good luck
>
> toby ......
>
>
> --- Pat Johnston <[EMAIL PROTECTED]> wrote: > Hi
> > I'm new at Apache, PHP, MySQL, but have been going okay on my
> > win2000
> > machine. For months, it's been good.
> >
> > But for reason, I get this message when I try to do stuff with
> > mysqladmin
> >
> > ******
> > mysqladmin: connect to server at 'localhost' failed
> > error: 'Can't connect to MySQL server on 'localhost' (10061)'
> > ******
> >
> > Have I done something to cause this?
> >
> > My development sites on 'localhost' just come up with a warning
> > that it
> > can't connect to retrieve data from the MySQL database.
> >
> > I know it may be a small problem, but I can't work it out..
> > I've read the manuals but I can't see anything relevant to it..
> >
> > Thanks in advance
> >
> > Pat
> >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
hey,
I've created win win32 installer that will install Apache (mod_ssl),
PHP, MySQL, OpenSSL -- pre-configured. Just install and run.
sourceforge site
http://sourceforge.net/projects/swamp/
message board
http://swamp.sourceforge.net/
--- End Message ---
--- Begin Message ---
I have just recently installed apache and php into my system (win98).
The system test is ok....(showing php pages)
Now for the question...
I've created a form.. (rather cut and paste a form). This form works online
I have tested it myself.. but locally it gives me an error..
When my php page loads it tells me "Notice: Undefined variable" at line
whatever.. etc..
So what I've done it tested it online to see if it's the code...(full
knowing that code works..since it's a cut out from a tutorial showing it's
samples).. and it does work..
So the question is .. is there anything missing from my local server ???
Elvin
--- End Message ---
--- Begin Message ---
Its just a warning. It tells you that you are using a variable which has no
value. Just ignore the notice, or turn down error reporting to exclude
notices.
All it means is that the variable of $test which you have included in your
script HAS NO VALUE. If you were to write something like
$test = "I Have A Value Now!";
then the 'error' message would disappear. Most of the time, you DO NOT WANT
to give a variable a value, such as when a user submits a form to your
script. The $Variables are filled by the user, not the php script. If the
user misses out a field, they would see the error message you mentioned.
To turn it off...
go to your php.ini
Search for
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
and change the line which looks like (Make sure there is no ; at the start
of the line, if there is then its the wrong line to change!)
error_reporting = E_ALL
to
error_reporting = E_ALL & ~(E_NOTICE | E_USER_NOTICE) ; display all errors
and warnings
This will make php only show the errors which affect the running of your
scripts, not the notices such as 'Empty Variables'
Hope this helps
Stephen
*** This is a quote from a mail I posted earlier. it seems a lot of people
ask the same question :-) ***
----- Original Message -----
From: "Elvin Certeza" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Thursday, December 12, 2002 9:52 PM
Subject: [PHP-WIN] newbie question (forms)
> I have just recently installed apache and php into my system (win98).
>
> The system test is ok....(showing php pages)
>
> Now for the question...
>
> I've created a form.. (rather cut and paste a form). This form works
online
> I have tested it myself.. but locally it gives me an error..
>
> When my php page loads it tells me "Notice: Undefined variable" at line
> whatever.. etc..
>
> So what I've done it tested it online to see if it's the code...(full
> knowing that code works..since it's a cut out from a tutorial showing it's
> samples).. and it does work..
>
>
> So the question is .. is there anything missing from my local server ???
>
>
>
> Elvin
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
This probably has to do with one/both of two things:
1. register_globals is off (not a bad thing - just requires a tidbit more
code. see http://php.net/register_globals)
2. A variable is being called before it has been initialized.
Example PHP script:
<?php
echo $a;
$a = "Hello World";
echo $a;
?>
First you will get the undefined variable message, then "Hello World" (w/o
quotes). Leaving a variable uninitialized before you use it can be a very
bad thing. If your code uses that variable to do something and it's forged
by Joe Black Cracker (i.e. http://host/page.php?var=forged" - not hard to do
at all) you could end up getting incorrect results or worse.
What can you do about this?
1. You can ignore the errors and make the reporting of them go away. Change
your Error Reporting in php.ini to a different level (see
http://php.net/error_reporting for the levels and what they do). Restart
your web server after this change is made (unless you use PHP as CGI, but
safest just to restart it).
2. You can initialize the variables in the script before you use them.
Example of 2:
<?php
$a = "";
//php stuff here
echo $a;
?>
Good luck and have fun.
-Dash (.php)
-----Original Message-----
From: Elvin Certeza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 12, 2002 1:52 PM
To: php
Subject: [PHP-WIN] newbie question (forms)
I have just recently installed apache and php into my system (win98).
The system test is ok....(showing php pages)
Now for the question...
I've created a form.. (rather cut and paste a form). This form works online
I have tested it myself.. but locally it gives me an error..
When my php page loads it tells me "Notice: Undefined variable" at line
whatever.. etc..
So what I've done it tested it online to see if it's the code...(full
knowing that code works..since it's a cut out from a tutorial showing it's
samples).. and it does work..
So the question is .. is there anything missing from my local server ???
Elvin
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello,
I'm using PHP 4.2.3 on IIS as an ISAPI module (for testing only). So
today I'm using my scripts just fine and then all of a sudden, require
stops working. It returns
Fatal error: Failed opening required
'C:/Inetpub/public_html/smarty/Smarty.class.php'
(include_path='.;c:\php4\pear') in C:\Inetpub\public_html\index.php on
line 27
Everytime I try to require or include something it gives me the same
error. And it only gives it to me with that file. The same exact file
includes perfectly on Apache/Linux and other files include just fine. I
tried deleting the contents of the file and leaving only a <?php ?> and
it fails. I tried renaming the file and it fails. Like I said, all other
files work, but this one file doesn't, no matter what it's contents or
what it's name or where it's located in the directory tree or how many
times I recreate it in different places. I am stumped.
~Paul
--- End Message ---