php-windows Digest 14 Mar 2002 23:01:38 -0000 Issue 1047

Topics (messages 12629 through 12638):

PHP execution error
        12629 by: Peter Salvage

Re: Include ()
        12630 by: Mike Flynn

Re: Error::
        12631 by: Nicole Amashta
        12638 by: KONUS

Re: Blank Window - Apache and BadBlue. PHP 4.1.1 WinME
        12632 by: alain

Re: PHPTriad 2.11 (MySQL) connect problem.
        12633 by: Peter Ruan
        12634 by: Vail, Warren

Re: parse error
        12635 by: Phillip Oertel
        12637 by: ChaoticWorks.cs.com

eregi_replace on a text file
        12636 by: Asendorf, John

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

NT4 Server SP6 IIS4

I installed PHP 4.0.6 according to the instructions posted on php.net and ran
the ubiquitous "hello world" script to verify that all was working as
advertised.

My webserver rsponded with a popup window as follows:

<snip>
php.exe - invalid current directory

The process cannot switch to the startup current directory z:\inetpub\www\www84.
Select OK to set current directory to C:\WINNT, or select CANCEL to exit.
</snip>

I've checked the archives of the list, read through the install/config section
of the man pages, but I can't see what I've done wrong.

Could someone please let me know where I screwed up please?
:-)
Cheers,
/wiZZ

--- End Message ---
--- Begin Message ---
Check your PHP.INI file for settings related to automatic escaping of 
characters.  And, uh, you say it's a forward slash like '/', but are you 
sure they aren't backslashes like '\'?  I've never heard of forward slashes 
getting added.  Are you positive that the text files don't have the 
slashes?  If not, then it has something to do with magic quotes, perhaps 
magic_quotes_runtime.

-Mike

At 11:57 PM 3/13/2002 -0500, you wrote:
>When i use the Include() command for a text file it always puts a slash, / ,
>in front of any qotations in the text file. anyone know why? my example is
>http://www.notchmetal.com/bio/
>
>thanks
>
>      -Sean-


Mike Flynn - Burlington, VT
http://www.mikeflynn.net/ - [EMAIL PROTECTED]
home=>work=>home=>store=>home

--- End Message ---
--- Begin Message ---
No way. YOu do not need to reformat. Make sure you have your mysql my.cnf
file setup properly on your c:/ drive and the paths are configured with the
correct paths to mysql.


"Konus" <[EMAIL PROTECTED]> wrote in message
003c01c1c870$40847740$5bfd92ca@kukut">news:003c01c1c870$40847740$5bfd92ca@kukut...
> i did starting the mySQL server, nut it wont start (not a little bit ^^;).
> After several time tring to figure it out the problem, such as tring to
> reinstall the program. But the error massage is still the same.
>
> Mybe i must re-FORMAT my HD (damn!!)
>
>
> ----- Original Message -----
> From: "Brother Bagge" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 14, 2002 3:46 PM
> Subject: RE: [PHP-WIN] Error::
>
>
> > > -----Original Message-----
> > > From: KONUS [mailto:[EMAIL PROTECTED]]
> > >
> > > Warning: MySQL Connection Failed: Can't connect to MySQL
> > > server on 'localhost' (10061) in
> > > C:\apache\htdocs\phpmyadmin\lib.inc.php on line 255
> > > Error
> > > Iam using Win2K Professional.
> > >
> > > What's going on??
> >
> >
> > You haven't switched your mysql server on.
> >
> > c:\mysql\bin\mysqld.exe -install
> > (c:\mysql\bin\mysqld.exe -standalone <- this one will start it without
> > running it as a service, you have to start it every time you want to use
> it,
> > can be nice to know)
> >
> > After installing it as a service you will be able to start and stop the
> > server via NET START/STOP mysql from run.
> >
> > /brother
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>


--- End Message ---
--- Begin Message ---
I have solve the problem, the path in the my.cfg from the previous install
hasn't been changed, so i change it. and it work.... thanks...a lot guys..


----- Original Message -----
From: "Nicole Amashta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 10:48 PM
Subject: Re: [PHP-WIN] Error::


> No way. YOu do not need to reformat. Make sure you have your mysql my.cnf
> file setup properly on your c:/ drive and the paths are configured with
the
> correct paths to mysql.
>
>
> "Konus" <[EMAIL PROTECTED]> wrote in message
> 003c01c1c870$40847740$5bfd92ca@kukut">news:003c01c1c870$40847740$5bfd92ca@kukut...
> > i did starting the mySQL server, nut it wont start (not a little bit
^^;).
> > After several time tring to figure it out the problem, such as tring to
> > reinstall the program. But the error massage is still the same.
> >
> > Mybe i must re-FORMAT my HD (damn!!)
> >
> >
> > ----- Original Message -----
> > From: "Brother Bagge" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, March 14, 2002 3:46 PM
> > Subject: RE: [PHP-WIN] Error::
> >
> >
> > > > -----Original Message-----
> > > > From: KONUS [mailto:[EMAIL PROTECTED]]
> > > >
> > > > Warning: MySQL Connection Failed: Can't connect to MySQL
> > > > server on 'localhost' (10061) in
> > > > C:\apache\htdocs\phpmyadmin\lib.inc.php on line 255
> > > > Error
> > > > Iam using Win2K Professional.
> > > >
> > > > What's going on??
> > >
> > >
> > > You haven't switched your mysql server on.
> > >
> > > c:\mysql\bin\mysqld.exe -install
> > > (c:\mysql\bin\mysqld.exe -standalone <- this one will start it without
> > > running it as a service, you have to start it every time you want to
use
> > it,
> > > can be nice to know)
> > >
> > > After installing it as a service you will be able to start and stop
the
> > > server via NET START/STOP mysql from run.
> > >
> > > /brother
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Which install procedure did you follow for each product? (Did you use an
install program for PHP? If yes which one?)
A+
Alain

On Wed, Mar 13, 2002 at 10:20:15AM -0000, Andy Seabrook wrote:
> Can anybody help! trying to setup SAPI module on apache 1.3, also tried cgi
> on bad blue, niether seem to be passing php, OS is ME.
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---

Hi Warren,
  Unfortunatelly, that didn't work...so I'm still stuck. :(  Suggestions?



>Ran into a similar problem under Windows NT.  I can think of several
>possible causes, 1.) the MySQL server is not started, or 2), as was in my
>case, the MySQL server came up as a service and not as a Standalone server,
>which means the localhost connects didn't work (I think).  I use
>WinMySQLadmin as a controller for the DB Server and placed a shortcut to
>that application in my startup directory.  By default it seemed to start
>things as a Service, but if I shut down the service, and restarted the
>server as Standalone, the admin tool seemed to remember to activate things
>standalone on the next reboot.
>
>good luck,
>
>Warren Vail
>Tools, Metrics & Quality Processes
>(415) 667-7814
>Pager (877) 774-9891
>215 Fremont 02-658
>
>
>-----Original Message-----
>From: Peter Ruan [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, March 13, 2002 2:33 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] PHPTriad 2.11 (MySQL) connect problem.
>
>
>Hi,
>   I have installed PHPTriad 2.1.1 under Windows XP.  When I run
>phpmyAdmin I got this error.
>
>Warning: MySQL Connection Failed: Can't connect to MySQL server on
>'localhost' (10061) in C:\apache\htdocs\phpmyadmin\lib.inc.php on line
>255
>Error
>
>
>It used to work under Win2K.  What's the work around?
>
>Thanks,
>Peter
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

--- End Message ---
--- Begin Message ---
Have you been setting up user id's and passwords on your MySQL database,
failing to connect usually means that your code can't find the tcp/ip
connection, or that the logon/password failed.  Connecting to a specific
database is handled by other functions after connection to the database
server.  If you are using everything right out of the PHP Triad "box",
perhaps seeing a section of your connect code would help (If you have set up
other userid's, I probably can't help so don't send them).

MySQL needs to have the mysql database defined (as distributed) in order for
things to work on the server.  Some newbies have made the mistake of
dropping databases that were not theirs.


Warren Vail
Tools, Metrics & Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658


-----Original Message-----
From: Peter Ruan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 9:25 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] PHPTriad 2.11 (MySQL) connect problem.



Hi Warren,
  Unfortunatelly, that didn't work...so I'm still stuck. :(  Suggestions?



>Ran into a similar problem under Windows NT.  I can think of several
>possible causes, 1.) the MySQL server is not started, or 2), as was in my
>case, the MySQL server came up as a service and not as a Standalone server,
>which means the localhost connects didn't work (I think).  I use
>WinMySQLadmin as a controller for the DB Server and placed a shortcut to
>that application in my startup directory.  By default it seemed to start
>things as a Service, but if I shut down the service, and restarted the
>server as Standalone, the admin tool seemed to remember to activate things
>standalone on the next reboot.
>
>good luck,
>
>Warren Vail
>Tools, Metrics & Quality Processes
>(415) 667-7814
>Pager (877) 774-9891
>215 Fremont 02-658
>
>
>-----Original Message-----
>From: Peter Ruan [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, March 13, 2002 2:33 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP-WIN] PHPTriad 2.11 (MySQL) connect problem.
>
>
>Hi,
>   I have installed PHPTriad 2.1.1 under Windows XP.  When I run
>phpmyAdmin I got this error.
>
>Warning: MySQL Connection Failed: Can't connect to MySQL server on
>'localhost' (10061) in C:\apache\htdocs\phpmyadmin\lib.inc.php on line
>255
>Error
>
>
>It used to work under Win2K.  What's the work around?
>
>Thanks,
>Peter
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
> how come whenever i run this code i get a error ...

open your eyes - check all occurrences of $fp. you are missing a $ sign.

> <?php
> $fp = fopen("./notch/" . $notch_member . ".txt", "r+");
> if (!fp) die ("Cannot open file for writing. Please contact me.");
> fwrite($fp, $notch_member . $bio);  
> ?>
> 


--- End Message ---
--- Begin Message ---
yeah...someone already told me....i feel stupid for that one...for some 
reason the HTML tags were giving me problems...i just opened another text 
file and resaved it and it worked fine. thanks everyone for your help

       -Sean-
--- End Message ---
--- Begin Message ---
I'm trying to figure out how to add a piece of text to the beginning of
every line of a text file.  Somewhere, I'm not understanding how the
filesystem stuff works.  This is what I have right now.  I am certain that
I'm missing some kind of fgets and/or fwrites or something in this and can't
figure out how to get it working...

if ( eregi ( "^ex([0-9]{2})([0-9]{2})([0-9]{2}).log" , $flename ,
$date_piece ) ) {
                
     $year = $date_piece[0] + 2000;
     $date_to_add = $year . "-" . $date_piece[1] . "-" . $date_piece[2];

     echo "<tr><td>$flename will have $date_to_add added to each line<br
/>\n";
        
     $file_path = "$path" . "$file";
        
     echo "<br />" . $file_path . "<br />";
     $fp = fopen ( "$file_path" , "a+" );
        
     while ( !feof ($fp) ) {

          // !!!SOMETHING IS MISSING HERE BUT I CAN'T FIGURE OUT WHAT 
          //maybe $line = fgets ( $fp );


          ereg_replace ( "^" , "$date_to_add " , $line );

          //something's probably missing here too...
          //maybe fwrite ( $line , ereg_replace ( "^" , "$date_to_add " ,
$line ) );
            
     }
        
     fclose ( $fp );
}

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
--- End Message ---

Reply via email to