php-windows Digest 16 Apr 2001 03:55:26 -0000 Issue 546 Topics (messages 6743 through 6765): Re: MySQL problem 6743 by: Plutarck 6746 by: Patrick 6748 by: Svensson, B.A.T. Re: MySql pconnect 6744 by: Plutarck 6749 by: Daniel Beulshausen 6752 by: Plutarck 6755 by: Svensson, B.A.T. 6760 by: Daniel Beulshausen 6761 by: Joe Brown 6762 by: Daniel Beulshausen Re: WinNT, PHP4, IIS4, exec() Nothing Happens at all! 6745 by: Patrick 6747 by: Svensson, B.A.T. Re: Instaling PHP in windows with Apache 6750 by: Manuela DIALLO PHP install : no result!!! 6751 by: Manuela DIALLO 6753 by: Julie Meloni 6754 by: Phil Driscoll 6763 by: Manuela DIALLO 6764 by: Phil Driscoll Re: Supplied argument is not valid MS SQL-Link resource 6756 by: Frank M. Kromann PHP4 won't display page 6757 by: Warren Hemming 6759 by: Phil Driscoll 6765 by: OoCobra97.aol.com Re: Problem with PHP and tiny web server 6758 by: Animorph840 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] ----------------------------------------------------------------------
Press Ctrl+Alt+Delete once, and see if you see any running programs such as "Mysqld-opt" or something to that effect. If not, I don't think MySQL is running on your system. Go back into your mysql directory and execute the file mysqld.exe I believe that should start MySQL. Then try connecting again. -- Plutarck Should be working on something... ...but forgot what it was. "Chris" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks for the reply. > > I went to mysql bin directory and typed mysql.exe, I get an error > message > "Error 2003: Can't connect to MySQL server on 'localhost' (10061)" > > What's the problem? Please advise. > > I am running Win98SE with Apache. > > > > Plutarck wrote: > > > > Try going into your mysql bin directory, then type: > > > > mysql.exe > > > > Then try using connect, or just doing your query. > > > > If that doesn't work, ensure MySQL is running. If that doesn't work...then > > there is some other problem. > > > > -- > > Plutarck > > Should be working on something... > > ...but forgot what it was. > > > > "Chris" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I was trying to create a database for PHP using MySQL with the command > > > c:\mysql\bin>mysqladmin create database01 and I received the following > > > error message > > > "Can't connect to MySQL server on 'localhost' (10061) > > > Check that mysql is running on localhost and that the port is 3306. > > > You can check this by doing 'telnet localhost 3306'" > > > > > > The Apache server is running. What should I do now? > > > > > > -- > > > PHP Windows Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
"Chris" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks for the reply. > > I went to mysql bin directory and typed mysql.exe, I get an error > message > "Error 2003: Can't connect to MySQL server on 'localhost' (10061)" > > What's the problem? Please advise. > > I am running Win98SE with Apache. > > > > Plutarck wrote: > > > > Try going into your mysql bin directory, then type: > > > > mysql.exe > > > > Then try using connect, or just doing your query. > > > > If that doesn't work, ensure MySQL is running. If that doesn't work...then > > there is some other problem. > > > > -- > > Plutarck > > Should be working on something... > > ...but forgot what it was. > > > > "Chris" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I was trying to create a database for PHP using MySQL with the command > > > c:\mysql\bin>mysqladmin create database01 and I received the following > > > error message > > > "Can't connect to MySQL server on 'localhost' (10061) > > > Check that mysql is running on localhost and that the port is 3306. > > > You can check this by doing 'telnet localhost 3306'" > > > > > > The Apache server is running. What should I do now? C:\mysql\bin\winmysqladmin.exe #loads and Icon in your systray or C:\mysql\bin\mysqld-opt.exe # optimized for Pentium processor or C:\mysql\bin\mysqld.exe # debug-enabled if none of these are there you got the scr file. need to download the binary version or compile it yourself. check out C:\mysql\Docs
You first error message says: TRY TO DO A TELNET TO 'LOCALHOST' AT PORT '3306'. Do this!!! by starting telnet. Type in localhost or IP# 127.0.0.1 and adjust the port number to 3306. Then try to connect. If you gets the message "connection refused" it means that either you SQL server is not up and running. Or it not really running at your LOCAL host, but somewhere else. If it is the case that the server should run locally, then restart the server... If you don't know how to do that, then do RTFM. >-----Original Message----- >From: Chris [mailto:[EMAIL PROTECTED]] >Sent: Sunday, April 15, 2001 1:54 PM >To: [EMAIL PROTECTED] >Subject: Re: [PHP-WIN] MySQL problem > > >Thanks for the reply. > >I went to mysql bin directory and typed mysql.exe, I get an error message >"Error 2003: Can't connect to MySQL server on 'localhost' (10061)" > >What's the problem? Please advise. > >I am running Win98SE with Apache. > > > >Plutarck wrote: >> >> Try going into your mysql bin directory, then type: >> >> mysql.exe >> >> Then try using connect, or just doing your query. >> >> If that doesn't work, ensure MySQL is running. If that >doesn't work...then >> there is some other problem. >> >> -- >> Plutarck >> Should be working on something... >> ...but forgot what it was. >> >> "Chris" <[EMAIL PROTECTED]> wrote in message >> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> > I was trying to create a database for PHP using MySQL with >the command >> > c:\mysql\bin>mysqladmin create database01 and I received >the following >> > error message >> > "Can't connect to MySQL server on 'localhost' (10061) >> > Check that mysql is running on localhost and that the port is 3306. >> > You can check this by doing 'telnet localhost 3306'" >> > >> > The Apache server is running. What should I do now?
Hm...ok, let's see here. Persistant connection vs. non. Pros and cons...*ponder* I haven't heard a whole lot about the debate, but here is what I'm thinking. When you call pconnect when a persistant connection is already available, it is approximately the same speed as when you call connect for the second time in a script. It still is a delay. It's not "instant", because PHP has to check and see if a persistant connection is open. It can't "remember" on it's own. The speed difference with pconnect and connect is in the initial connection creation by MySQL. When a connection is requested, MySQL must create a new connection ID and respond. If a persistant connection is already available it needs only respond with the current ID. The creation of a connection can't be all that taxing, so it really doesn't matter on a per script basis, but the point is "which is better". I imagine the best use for pconnect is when the same host, username, and password connection must be called many times very often. If you are something like, say, hotornot.com, where every single page has a call to a database, I imagine pconnect would be the better way to go. The connection never needs to be closed, because you are using them constantly. The downside of pconnect is you _can't_ close the connection once it's started. If you use it only once an hour, that's 59 minutes that MySQL has to keep open an unitilized connection. With connect it would of been closed immediatly. But in a situation where you must utilize connections to a database consistantly all day, with the same hostname, username, and password, I suppose a persistant connection would be better. However, I still say that "when in doubt, use connect". There are no downsides to connect, and you can always easily switch over to using pconnect. But once you've used pconnect, the connections stay...and stay...and stay... Anyone know of an article or benchmarking study that dealt with pconnect and connect? I'd love to see the hard numbers on them. Moral of the story: It's fine to use connect until you start to notice any sort of real resource drain. Then you can try switching to pconnect and see if it hurts anything. At Datablocks.net I heard the use of pconnect was really giving the database server troubles, because it had to keep open a few thousand connections which it would much prefer just close. Eventually it maxed out the available connections until it couldn't issue more, so connections started queing, and the whole system effectively locked up. Many different persistant connections = bad Only a few constantly used ones = good -- Plutarck Should be working on something... ...but forgot what it was. ""James Moore"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > > > For connect vs. pconnect, the instances where you should use pconnect are > > really rare. > > > > When in doubt, use connect. If you know of a specifically good > > reason to use > > it, then feel free. > > > > But I personally have never had a situation where pconnect worked better > > than connect. > > pconnect is better to use IMHO on any site with a decent amount of hits as > youll get better performance due to the lack of the overhead of making a new > connection every time a page is called. I would totally disagree with you > here plutarck pconnect is there to make things quicker which it does by > keeping the connection open between page requests. > > > And as for extended server status, I haven't a clue about it :) > > Never looked into it really.. probably not worth it.. try asking on the > php-db list. > > -James > -- > James Moore > [EMAIL PROTECTED] > http://www.perl.com/search/index.php - we must be doing somthing right > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Sunday, April 15, 2001, 3:38:48 PM, you wrote: > When you call pconnect when a persistant connection is already available, it > is approximately the same speed as when you call connect for the second time > in a script. It still is a delay. It's not "instant", because PHP has to > check and see if a persistant connection is open. It can't "remember" on > it's own. sure it can, but that's why it only works for threaded sapi's. like in every threaded application, the threads of the parent process share the same name/access space, and that space is persistent until the parent process exits. so persistent storage between requests can't work for the cgi, as it's shuting down on each webserver request, while the server module is only shuting down if the server goes down. if you're using normal connects php is registering the connection(s) of the actual page for the working thread, other threads can't access it. on request shutdown (php is finished parsing the page) php closes those connections, if you forgot to. the pconnects work different, php manages an hash of connections which is shared amongst the threads, upon a new connection request php simply looks if the hash holds a connection that isn't locked/used by another thread. if there's one connection available php is locking and reusing the open connection, if there's no connection available php creates another one and adds that to the hash. when the page is finished, php unlocks/makes the connection reusable to the other threads. only upon the server shutdown (or after the connections are timing out) those connections are closed. > The creation of a connection can't be all that taxing, so it really doesn't > matter on a per script basis, but the point is "which is better". the mysql connects are fast already, so the performance gain shouldn't be too high, but for other db's (i.e. oracle or mssql, which take care of alot more things during the logon) the pconnect can really speed things up. > The downside of pconnect is you _can't_ close the connection once it's > started. If you use it only once an hour, that's 59 minutes that MySQL has > to keep open an unitilized connection. With connect it would of been closed > immediatly. why is this a downside? the connections are reused. > Many different persistant connections = bad > Only a few constantly used ones = good there will always be more normal connections (just as many as php processes), which are open/close in short intervals (and that is producing the overhead!), as compared to pconnects, where there would be as much connections as php processes in the worst case. daniel /*-- daniel beulshausen - [EMAIL PROTECTED] using php on windows? http://www.php4win.de
http://www.webtechniques.com/archives/2001/01/jagielski/ Skip down to where it mentions databases...very enlightening. I think I may just consider slipping a "p" into my db_connect() function :) -- Plutarck Should be working on something... ...but forgot what it was. "Daniel Beulshausen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Sunday, April 15, 2001, 3:38:48 PM, you wrote: > > When you call pconnect when a persistant connection is already available, it > > is approximately the same speed as when you call connect for the second time > > in a script. It still is a delay. It's not "instant", because PHP has to > > check and see if a persistant connection is open. It can't "remember" on > > it's own. > > sure it can, but that's why it only works for threaded sapi's. > > like in every threaded application, the threads of the parent process share the same name/access space, and that space is > persistent until the parent process exits. > so persistent storage between requests can't work for the cgi, as it's > shuting down on each webserver request, while the server module is > only shuting down if the server goes down. > if you're using normal connects php is registering the connection(s) of the > actual page for the working thread, other threads can't access it. > on request shutdown (php is finished parsing the page) php closes > those connections, if you forgot to. > the pconnects work different, php manages an hash of connections which > is shared amongst the threads, upon a new connection request php > simply looks if the hash holds a connection that isn't locked/used by > another thread. if there's one connection available php is locking and reusing the open > connection, if there's no connection available php creates another one > and adds that to the hash. > when the page is finished, php unlocks/makes the connection reusable > to the other threads. > only upon the server shutdown (or after the connections are timing > out) those connections are closed. > > > The creation of a connection can't be all that taxing, so it really doesn't > > matter on a per script basis, but the point is "which is better". > > the mysql connects are fast already, so the performance gain shouldn't > be too high, but for other db's (i.e. oracle or mssql, which take care of > alot more things during the logon) the pconnect can really speed > things up. > > > The downside of pconnect is you _can't_ close the connection once it's > > started. If you use it only once an hour, that's 59 minutes that MySQL has > > to keep open an unitilized connection. With connect it would of been closed > > immediatly. > > why is this a downside? the connections are reused. > > > Many different persistant connections = bad > > Only a few constantly used ones = good > > there will always be more normal connections (just as many as php > processes), which are open/close in > short intervals (and that is producing the overhead!), as compared to > pconnects, where there would be as much connections as php processes > in the worst case. > > daniel > > /*-- > daniel beulshausen - [EMAIL PROTECTED] > using php on windows? http://www.php4win.de > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
>-----Original Message----- >From: Plutarck [] >http://www.webtechniques.com/archives/2001/01/jagielski/ > >Skip down to where it mentions databases...very enlightening. Yeah... MySQL is even a worse RDBM's than I thought since before. No stored procedure, no transactions, no .... jezus!!!
Sunday, April 15, 2001, 6:45:14 PM, you wrote: > Your comment reguarding threaded sapi's although accurate, leaves > out > process based systems. They also benefit from pconnects, because > the PHP > process lives on past the life of a single web page. such things can't be shared amongst processes. it works differently on multi process based systems (like apache), there are persistent connections as well, but they can only be used by one worker process. that's one working process has a pool of persistent connections which is reused only by that working process. i've left that out because multi process based systems are rare (generally bad design as well) and a follow there own rules. daniel /*-- daniel beulshausen - [EMAIL PROTECTED] using php on windows? http://www.php4win.de
But my point is that the communication overhead is still gained by process based systems. True they don't have the same pooling ability, as does a threaded process management. Overhead saved using pconnect is that which is being debated here. On a side note.... The OCI8 module in it's latest rendition does not take advantage of threaded environments (well, it never really did, but it was crashing, when it thought it could). Anybody want to help me fix that? I don't have a whole lot of time to devote to this task. I have a good understanding of what needs to be done. With out help, it may be a while before I get around to it. -Joe "Daniel Beulshausen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Sunday, April 15, 2001, 6:45:14 PM, you wrote: > > Your comment reguarding threaded sapi's although accurate, leaves > > out > > process based systems. They also benefit from pconnects, because > > the PHP > > process lives on past the life of a single web page. > > such things can't be shared amongst processes. > it works differently on multi process based systems (like apache), > there are persistent connections as well, but they can only be used by > one worker process. > that's one working process has a pool of persistent connections which > is reused only by that working process. > i've left that out because multi process based systems are rare > (generally bad design as well) and a follow there own rules. > > daniel > > /*-- > daniel beulshausen - [EMAIL PROTECTED] > using php on windows? http://www.php4win.de > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
i'm going to specify at apache now :) Sunday, April 15, 2001, 8:52:59 PM, you wrote: > But my point is that the communication overhead is still gained by process > based systems. True they don't have the same pooling ability, as does a > threaded process management. Overhead saved using pconnect is that which is > being debated here. that is only the case for *optimal* configured system. Just for those who don't know, Apache is configured by utilising "MinClients" (number of min. worker processes), "MaxClients" (max. number of worker processes), "MinSpareServers" (min. number of unused worker processes) and "MaxSpareServers" (max. number of unused worker processes). Now let's compare multi-thread and multi-process based systems :) Threads: the max number of pconnects is valid for *all* threads of the parent process, also *every* persistent connections made by *every* thread is shared. Process: the max number of pconnects is only valid for *one* working process, the connections can't be shared amongst the working processes in the worst case you'll have (pconnects * (user/password combinations) * MaxClients) If one worker process already made a connection to the db, short time after another worker process making a pconnect using the same user/password combination, they still will use different connections. While in the thread based the next thread simply reuses the connection made by the other thread. Another big disadvantage is that if "MaxSpareServers" is reached, the manager process wil begin the shutdown the unused worker processes until "MinSpareServers" is reached. Surely the persistent connections by those unused processes are closed as well. So if you're using a process based system there *has* to be alot of more connectivity to be done when compared to a thread based system under the same load. daniel /*-- daniel beulshausen - [EMAIL PROTECTED] using php on windows? http://www.php4win.de
""Dave Faulkner"" <[EMAIL PROTECTED]> wrote in message 9bb3cf$ck0$[EMAIL PROTECTED]">news:9bb3cf$ck0$[EMAIL PROTECTED]... > Hi People!, > > this seems like an age old question that just doesnt seem to be able to get > solved. I too have a problem calling NT programs from within my PHP script. > Hoepfull there is a guru out there who will be able to tell me what i am > doing wrong. > > As the subject states, i am running WinNT4, SP6, IIS4, PHP4. I have a web > page that users can use to upload pictures to my server. This script it > pasted below > > <? > > include "header.inc"; > if ($image_name != "") { > copy("$image", "../aviation/uploads/$image_name") or die ("Couldn't copy the > file."); > > } else { > > die("You forgot to add a filename"); > > } > > $img_location = "aviation/uploads/$image_name"; > > $db = mysql_connect("user", "password") or die("Can't connect to server."); > mysql_select_db("database", $db) or die("Can't select database."); > > > > $insert_data = "INSERT INTO table (image, fname, lname, email, location, > rego, remarks, airline) VALUES ('URL/$image_name', '$fname', '$lname', > '$email', '$location', '$rego', '$remarks', '$airline')"; > > mysql_query($insert_data) or die("Couldn't insert data."); > > system("echo File has been uploaded! | blat - -s \"$image_name > uploaded --\" -t $email"); > > ?> > > This php file is called from another HTML file. All this info is passed into > the database, and at the same time the image itself is copied to another > directory on the server. All that works excellently!!!. However, what i want > to do is, i want to add some form of compression to the picture (before or > after doesnt matter) when it is copied to the directory. The idea behind > this is so that when people come to my web site and query the database on > pictures, they are compressed a little to save download time. > > PROBLEM: I have tried all sorts of things from cjpeg/djpeg to trying to call > an expternal program called "autobatchit.exe" with the php file to add > compression etc. > > Below is some of the stuff i have tried: > > // exec("I:\Perl\bin\cjpeg.exe -quality 30 -progressive $image_name"); > // exec("c:/autobatchit!/autobatchit.exe"); > // exec("c:\autobatchit!\autobatchit.exe"); > // exec("c:\command.com /k autobatchit.bat" ); > > And other variations which i have not added. The results are varying. If i > use "cmd" int he exec() anywhere, the script seems to halt at that point and > wont go any further. However all of the above lines result in NOTHING > happening at all!........if i look at the task manager while i run the > script, nithing comes up at all in relation to what i am trying to execute. > > SO thats about it!!.............the persont hat solves the problem for me > gets a free freddo!!! > > In all honesty i have tried a lot of different stuff that just doesnt seem > to work. If anyone can help me out with this i owuld be very appreciative. I > have been trying for days to ge tthis working with no luck. It is quite > possible that i have missed something very simple as i have only been > working with php (or any coding for that matter) for about two weeks now. > > Thanks in advnace for any help anyone can give me > > Regards > > Dave Faulkner Dave here is a simple script that calls an batch file the first example does not work using double quotes the second example does work using single quotes. <? print "<HTML>\r\n"; print "<HEAD>\r\n"; print "<TITLE> EXEC() TEST</TITLE>\r\n"; print "</HEAD>\r\n"; print "<BODY>\r\n"; exec("D:\Xitami\temp\cleanup.bat", $returnstring,$returnvar); print "Return var: ".$returnvar."<BR>\r\n"; print "Printing output ".count($returnstring)." lines:<BR>"; print "\r\n"; while (list($line, $text) = each($returnstring)) { print "[$line] $text<br>"; } print "</BODY>\r\n"; print "</HTML>\r\n"; ?> ############# <? print "<HTML>\r\n"; print "<HEAD>\r\n"; print "<TITLE> New Document </TITLE>\r\n"; print "</HEAD>\r\n"; print "<BODY>\r\n"; exec('D:\Xitami\temp\cleanup.bat', $returnstring,$returnvar); print "Return var: ".$returnvar."<BR>\r\n"; print "Printing output ".count($returnstring)." lines:<BR>"; print "\r\n"; while (list($line, $text) = each($returnstring)) { print "[$line] $text<br>"; } print "</BODY>\r\n"; print "</HTML>\r\n"; ?> the .bat file has del pipe*.* del *.tmp as per-perl the single quote say's 'Yes really use this like this'. in earlier post I said that one has to escape the backslash but this does not appear to be the case with PHP/Apache. The two problems I can think of (Not having NT, IIS) are permission settings in both NT and IIS. try running the EXEC() on something that stays in /root/webpages/ and see if you get the same results. I wish I had more cpu time with nt but the only time I have on it is setting up permissions for network conections. hope something clicks for ya soon have fun I am Patrick
>-----Original Message----- >From: Dave Faulkner [mailto:[EMAIL PROTECTED]] >Sent: Sunday, April 15, 2001 5:15 AM >To: [EMAIL PROTECTED] >Subject: [PHP-WIN] WinNT, PHP4, IIS4, exec() Nothing Happens at all! >Below is some of the stuff i have tried: > >// exec("I:\Perl\bin\cjpeg.exe -quality 30 -progressive $image_name"); >// exec("c:/autobatchit!/autobatchit.exe"); >// exec("c:\autobatchit!\autobatchit.exe"); >// exec("c:\command.com /k autobatchit.bat" ); > >And other variations which i have not added. The results are varying. If i >use "cmd" int he exec() anywhere, the script seems to halt at that point and >wont go any further. However all of the above lines result in NOTHING >happening at all!........if i look at the task manager while i run the >script, nithing comes up at all in relation to what i am >trying to execute. I duno if this helps, but when you write C/C++ programs and wants to include backslash, you have to "escape" it with an backslash. I guess the php engine is written in C or C++ and if they haven't compensated for the string parsing facilities in C/C++ then you will have to write it like this: // exec("I:\\Perl\\bin\\cjpeg.exe -quality 30 -progressive $image_name");
Dear Giro, Thank you for your inputs. I've done the same as you explained to Margarida, but... my browser is displaying nothing... I've installed PHP and Apache on my PC under win98. Apache is running fine and launching PHP at the same time. When I open a php file (.php) under my browser, the PC is launching a console window which is immediately closing... I suppose it's a PHP console window. This window is empty and my browser's also... What a deception! Please help! Thank you in advance for your help. Barrou PS: Apache seems to run correctly ( http://localhost works fine) "Giro De Roover" <[EMAIL PROTECTED]> a écrit dans le message : 9amuv3$421$[EMAIL PROTECTED] > Dear Margarida, > I don't know what exactly you have done so far but this is a clear > explanation that help me when I started, it is basic I don't mean to insult > your knowledge but sometimes we miss a little thing and it's gone. Tell me > if this works, otherwise i can mail you my php.ini and httpd.conf because > this is where you should look at. > > If I recall the 2 dlls are going the windows/system not just windows, one of > them (msccrt.dll)you most likely already have it and the computer tell you > that it is existing, keep the existing one.The other one (php4ts.dll) goes > to windows/system. > Also don't forget to add a couple of line in apache open httpd.conf with a > text editor > 1/ Find a line that said : > ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/" > and add right under it: > ScriptAlias /php4/ "c:/php4/" > 2/Find a line that said: > #AddType application/x-httpd-php3 .phtml > #AddType application/x-httpd-php3-source .phps > and add right under it: > AddType application/x-httpd-php .phtml .php > AddType application/x-httpd-php-source .phps > 3/Find a line that said: > # Format: Action media/type /cgi-script/location > # Format: Action handler-name /cgi-script/location > # > and add right under it: > Action application/x-httpd-php /php4/php.exe > > That's it you are done, > Now first restart Apache and test > Write a script that you will name phpinfo.php > <? phpinfo(); ?> > Open you browswer and type : > http://localhost/phpinfo.php > It will normally works. > > Another think if you run under win95 make sure you have winsock2 install if > not download it at microsoft.com > > ""Margarida"" <[EMAIL PROTECTED]> wrote in message > 9alm10$euu$[EMAIL PROTECTED]">news:9alm10$euu$[EMAIL PROTECTED]... > > Dear All > > > > I've installed Apache Server in my PC (windows9*) and it is running ok. I > > get an answer when I ping my own machine and I can see apache's default > > homepage. I've made the changes necessary in the httpd.conf file. > > > > I've configured my php.ini and copied the dlls to the windows directory. > > > > Still when I try to see the result of a simple code such as the one below > > on a browser... > > <html> > > <head></head> > > <body> > > <? > > echo("hello world!") > > ?> > > </body> > > </html> > > > > ...I get black page > > > > Has anyone gone through the same problem? > > Can anyone point out a solution? > > > > Thank you! > > > > Margarida > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Dear all, I've installed PHP and Apache on my PC under win98. Apache is running fine and launching PHP at the same time. When I open a php file (.php) under my browser, the PC is launching a console window which is immediately closing... I suppose it's a PHP console window. This window is empty and my browser's also... What a deception! Please help! Thank you in advance for your help. Manuela PS: Apache seems to run correctly ( http://localhost works fine)
Manuela DIALLO wrote: > Dear all, > > I've installed PHP and Apache on my PC under win98. Apache is running fine > and launching PHP at the same time. > When I open a php file (.php) under my browser, the PC is launching a > console window which is immediately closing... It sounds as if your Action line is screwed up (or something else...) somehow. Post the relevant changes you made to httpd.conf +----------------------------------------+ | Julie Meloni ([EMAIL PROTECTED]) | | | | "PHP Essentials" and "PHP Fast & Easy" | | http://www.thickbook.com | +----------------------------------------+
Can you show us what you have done in your httpd.conf file? -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
> Can you show us what you have done in your httpd.conf file? Yes of course! Here included the relevant lines , thank you! Manu ============ LoadModule php4_module c:/php/sapi/php4apache.dll ServerName 127.0.0.1 ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/" ScriptAlias /php4/ "c:/php/" AddType application/x-httpd-php3 .php3 .phtml .php AddType application/x-httpd-php3-source .phps # # And for PHP 4.x, use: # AddType application/x-httpd-php .php .phtml AddType application/x-httpd-php-source .phps AddType application/x-httpd-php4 .php .phtml .php4 AddType application/x-httpd-php4-source .phps AddHandler cgi-script .cgi Action application/x-httpd-php /php/php.exe Action application/x-httpd-php3 /php/php.exe Action application/x-httpd-php4 /php/php.exe
Change ScriptAlias /php4/ "c:/php/" to ScriptAlias /php/ "c:/php/" Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
mssql_select_db returns true or false and not a link resource. You should change the code to: $Conn=mssql_connect('192.168.1.20','username','password'); if (mssql_select_db('My_Database',$Conn)) { $QueryString="select id, name from my_table"; $Test=mssql_query($QueryString, $Conn); .... } - Frank > Does anybody know how to fix this error? "Supplied argument is not valid MS > SQL-Link resource" I am running: > > NT4 > MSSQL7.0 > IIS4 > PHP 4.0.4pl1 > > I've been running php3 for some time now without any problems but want to > upgrade to 4. This error seems to be occuring at the mssql_query() > function. > > $Conn=mssql_connect('192.168.1.20','username','password'); > $ThisConnect=mssql_select_db('My_Database',$Conn); > $QueryString="select id, name from my_table"; > $Test=mssql_query($QueryString, $ThisConnect); > > Please help! Thanks. > Dave > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > >
I have installed apache and PhP4 on a win 2000 machine. The apache server will start up saying that PHP is running. I have created a test page in the htdocs folder with the extention .php and saved as an ANSI endcoding. When I view the apache server everything looks good, but when I put the test page onto the URL all I see is the PHP code I wrote. Anyone have any suggestions on how to fix this? The httpd.conf file is correct. I have loaded this module LoadModule php4_module c:/php4/sapi/php4apache.dll, and have the correct addtypes in place. The php.ini file is in the WINNT folder, and the php4ts.dll is in the system32 folder. I have tried all the help docs and have tried all the books I could find. This all the editing I did to the httpd.conf file: LoadModule php4_module c:/php4/sapi/php4apache.dll ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/" ScriptAlias /php4/ "C:/php4/" AddType application/x-httpd-php .phtml .phps AddType application/x-httpd-php-source .phps Action application/x-httpd-php /php4/php.exe Can anyone tell my why the page is not loading correctly?
Change AddType application/x-httpd-php .phtml .phps to AddType application/x-httpd-php .phtml .php Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
Ok, first as mentioned on another email, change your AddType application/x-httpd-php .phtml .phps to: AddType application/x-httpd-php .phtml .php also, try putting your php scripts in your script alias, in your case c:\php4 and call them by using yourdomain/php4/scriptname hope this helps ~Jeff I have installed apache and PhP4 on a win 2000 machine. The apache server will start up saying that PHP is running. I have created a test page in the htdocs folder with the extention .php and saved as an ANSI endcoding. When I view the apache server everything looks good, but when I put the test page onto the URL all I see is the PHP code I wrote. Anyone have any suggestions on how to fix this? The httpd.conf file is correct. I have loaded this module LoadModule php4_module c:/php4/sapi/php4apache.dll, and have the correct addtypes in place. The php.ini file is in the WINNT folder, and the php4ts.dll is in the system32 folder. I have tried all the help docs and have tried all the books I could find. This all the editing I did to the httpd.conf file: LoadModule php4_module c:/php4/sapi/php4apache.dll ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/" ScriptAlias /php4/ "C:/php4/" AddType application/x-httpd-php .phtml .phps AddType application/x-httpd-php-source .phps Action application/x-httpd-php /php4/php.exe Can anyone tell my why the page is not loading correctly?
I'm using it to run a small website on my local network, but I want a minimum of a performance hit in games and things. ""Phil Driscoll"" <[EMAIL PROTECTED]> wrote in message 00af01c0c589$fca950c0$0c01a8c0@philsntserver">news:00af01c0c589$fca950c0$0c01a8c0@philsntserver... > >I already have PHP running on it as a filter, but Xitami, although small, > is > >about 10 times bigger than tiny webserver, and has a tray icon. I want to > >keep ram usage to a bare minimum. > Sadly though, it appears that the tiny web server has saved some of its > memory by not implementing a cgi interface. How about calling php directly > rather than using a web server at all? > > Cheers > -- > Phil Driscoll > Dial Solutions > +44 (0)113 294 5112 > http://www.dialsolutions.com > http://www.dtonline.org > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >