php-windows Digest 14 May 2001 13:09:19 -0000 Issue 597 Topics (messages 7527 through 7538): Re: PHP installation error on win98 7527 by: Liquidice Re: PHP4 Refuses to Run in Any Directory Except c:\PHP4 7528 by: Alan Popow Re: Php4.0.4 Installation on Win98 for Apache 1.3.19 7529 by: Alan Popow Installation of Apache & PHP4 on Windows 7530 by: Rachel Baillie 7533 by: OoCobra97.aol.com Installation of Apache & PHP4 on Linux 7531 by: zamily Re: Code still doesn't function correctly 7532 by: Tom Mathews Jump to other url... 7534 by: Germán A 7535 by: Asendorf, John 7536 by: Michael Rudel Exec and IIS 7537 by: Nick Howard Re: error message: php4ts.DLL-ts_rescource win98, Apache, PHP4.0 7538 by: Vern DeHaven 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] ----------------------------------------------------------------------
it may be a dll problem.. i'm pretty sure it is.. php4ts.dll may be needing one of the following dlls: . kernel32.dll (its not missing this one.. your computer needs it to run) . user32.dll (this one ether :p) . wsock32.dll . advapi32.dll . ole32.dll . oleaut32,dll . odbc32.dll . msvcrt.dll . msvcirt.dll . winsock.dll search for those on your system and see if maybe your missing one :) hope i helped.. Liquidice ""nobody special"" <[EMAIL PROTECTED]> wrote in message 9dmvkd$g4$[EMAIL PROTECTED]">news:9dmvkd$g4$[EMAIL PROTECTED]... > Hi everyone, > > I'm, having trouble with getting PHP4 to run on my win98 machine with Apache > 1.3.19. Apache works fine: when I type http://localhost/ I see the Apache > Welcome Page. However, when I try to display a PHPinfo() page, I get the > following error message: > > The File PHP.EXE is connected to missing output PHP4TS.DLL-ts_resource > > Meanwhile, Apache gives a 500 Internal Server error. The log states it > couldn't spawn a child process. Also, when I double-click on php.exe in > c:\php4\, I get the above error message, as well as the following message: > > C:\php4\ a device connected to the system doen's work > > (both error messages are translated from dutch, I hope you can make some > sense of it) Could anyone tell me what's going on and advise me how to solve > the problem? More detailed config info can be found below: > > the variables I added/changed in php.ini are literally this: > doc_root = C:\program files\apache group\apache\htdocs > extension_dir = C:\php4 > > the variables I added/changed in Apache's httpd.conf are as follows: > ServerName localhost > ScriptAlias /php4/ "C:/php4/" > AddType application/x-httpd-php .phtml .php > AddType application/x-httpd-php-source .phps > > I've changed/ added/ deleted NOTHING else in the above two files > > Furthermore, my phpinfo.php file looks like this: > <? phpinfo(); ?> > > I also tried the folowing file: > <?php > echo "<P> This is a test using the first tag type.</P>";?> > <? echo "<P>This is a test using the second tag type</P>';?> > <script language="php"> > echo "<P> This is a test using the third tag type.</P>"; > </script> > > Both give the above error message > > My php.ini file is in C:\windows\ > msvcrt.dll and php4ts.dll are in C:\windows\system\ > > Any help would be greatly appreciated! > > Kind regards, > Paul > > > > -- > 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] >
On Sun, 13 May 2001 20:02:11 -0500, you wrote: >I followed the install directions for php4 exactly but a simple phpinfo page >wouldn't work. So I extracted all the files to c:\php instead and changed >the paths accordingly, then it worked. So I started to change all the >directory references back and I can change them all except for this line: >Action application/x-httpd-php /php4/php.exe > >If I change it to Action application/x-httpd-php /dir/dir/dir/php.exe it >gives me a type 400 error. I know that is the correct path however. >Anybody else had this problem? In the 'Action application' line, the /php4/ that appears gets substituted by whatever you had in the initial ScriptAlias line. In other words, if your scriptalias says ScriptAlias /php4/ /dir/dir/dir/ Then for Apache, the action line written as: Action application/x-httpd-php /php4/php.exe becomes effectively: Action application/x-httpd-php /dir/dir/dir/php.exe If, instead, you type the action line with the '/dir/dir/dir/', then to apache I think it pretty much ends up being meaningless gibberish since /dir/dir/dir/ has never been defined as an alias. Alan
On Sun, 13 May 2001 22:54:42 +0200, you wrote: I assume you set up an alias (scriptalias probably) in your httpd.conf file. Have you tried running the test.php by using the url: http://localhost/php/test.php Or, if your alias is /php4/, then: http://localhost/php4/test.php If that doesn't work, then I can't really see what you might be doing wrong. If you like, send my your httpd.conf and your php.ini and I'll take a look at them (no guarantees, though). Alan >Hi Alan >Thank you, but i have not yet resolved the problem, even if i reduced it. >So, i follewed what you said to me about doc_root. Furthermore i became >aware of one my mistake: i put inside the file httpd.conf of Apache the row > >Port 3000 > >that is wrong. This is right > >Port 80 > >So Apache works fine. >I did the change inside the file php.ini that is placed into C:\Windows. >So I have: >doc_root=D:\Inetpub\Scripts\Php; > >and Document_root of Apache is: >D:\programs\Apache Groups\Apache >If i call http://localhost/ then i see the home page, >if i call http://localhost/test.php then the brouser goes into a waiting >state. I read in the low bar: >Connect: host localhost contacted.Waiting for replay. >The file test.php, coming with PHP, i put into >D:\Inetpub\Scripts and also into D:\Inetpub\Scripts\PHP. If i do CTRL+ALT+CANC i >see PHP >in the list of processes PHP so i deduce thai PHPm is running, but the >brouser stays waiting. >Thank you for your kindness, but i still need help for solving this problem. >Thank you in advance. > > >Alan Popow wrote: > >> On Sun, 13 May 2001 02:03:45 +0200, you wrote: >> >> I haven't tried running easywindows installer, so I'm just winging it here >> ignoring whatever the installer might be changing from defaults (though I >> doubt it changes the httpd.conf file defaults). >> >> Remember that apache thinks by default that the document root is at >> ....../apache/htdocs, and if you are using the normal iis setup, then your >> index.html is likely not there. In the httpd.conf file, make sure that the >> document root is pointing to the right place. >> >> Then, assuming you added the appropriate lines to Apache's httpd.conf file, >> open up your php.ini and make sure that the doc_root path points to where >> your scripts are. >> >> ie: doc_root = "d:\inetpub\scripts\php" (if that's where they are - in other >> words, where is test.php located). >> >> Alan >> >> >Hello everyone >> >I am trying to install PHP4 with Apache 1.3.19 following the procedure >> >that I see >> > in http://php.weblogs.com/easywindows using the >> > PHP4.0.4easywindows Installer. There is also a mistake, >> > "C:/inetpub/scripts/php/" is wrong, "D:/inetpub/scripts/php/" is right >> >. >> >However, when I run Apache and call http://localhost/ i don't see the >> >home page index.html, >> >furthermore if I call test.php with http://localhost/test.php >> >i don't see any page. In both cases I have a file not found messagge. >> >Can someone explain this behavior. I would like to use PHP with >> >Apache on Win98. How do i do ? Can someone help me? >> >thank you in advance >> >> -- >> 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 recently brought the book PHP fast & east web development. I am having problems trying to run PHP and an Apache Server on Windows. I have Windows ME. It was suggested to me that I had a spelling mistake. I am not sure where that would be as I have followed the instructions in the book very carefully. It was suggested that I should correct the spelling mistake while in Apache but I received the following message. APACHE.EXE: cannot determine local host name. Use the ServerName directive to set it manually. I am not sure how to read and then fix the error. Are there any names other than "localhost" that might recognise the local software for Windows ME. Thank you for your suggestions. Rachel Baillie
Hello, Apache does some of the setting up for you...but there are some parameters you need to set...with the server name being the major one, or else it wont run. In your apache directory, you will see a folder named "conf" open that up, and find the file "httpd.conf" open this file in wordpad. Once this is done do a find, or manually look through the document for "servername" once you find this make sure its not commented out (doesnt have a # before it) and set the servername, localhost will work fine, as well as your machine name (if you have it on a network). Then save this document and start (or restart) apache. This httpd.conf file is also where you will tell apache how to find php as well, so you may want to do these settings as well. Hope this helps! ~Jeff I recently brought the book PHP fast & east web development. I am having problems trying to run PHP and an Apache Server on Windows. I have Windows ME. It was suggested to me that I had a spelling mistake. I am not sure where that would be as I have followed the instructions in the book very carefully. It was suggested that I should correct the spelling mistake while in Apache but I received the following message. APACHE.EXE: cannot determine local host name. Use the ServerName directive to set it manually. I am not sure how to read and then fix the error. Are there any names other than "localhost" that might recognise the local software for Windows ME. Thank you for your suggestions. Rachel Baillie
hello... somebody help me how to install freetds + php4 + apache which version is ok?? recently i use freetds 0.51, php4.0.5 and apache 1.3.19 php4 fail to communicate with freetds....
If at first youdon't succeed, then give up and try a bulldozer approach: - Create a seperate php script for the new window. >From your existing page, open the new window with javascript, passing in the required id parameter to identify the cart contents that you want to display. If you can't identify that shoppers contents by a single ID, (or at worst a combo of a couple of ID's) then you will have to pass all the required parameters as javascript variables and in the querystring you use to open the new window so that PHP can find them. To pass a php value to javascript, try something like: - Calling funciton: - <a href=javascript:AddItem($ID)> where $ID is a php variable in your main script and the jscript function is something like: - function AddItem(IDent) { msgWindow=window.open("AddWindow.php?ID="+IDent,"displayWindow","menubar=no,width=400,height=200") } It's not ideal, but it should get you up and running! Tom Bob Sears wrote: > I am probably driving everyone ballistic, but I am going to get to the > bottom of this code problem with PHP/Javascript > because I don't want to rewrite the application in HTML/ASP/Oracle, if at > all possible. > > I want to be able to generate a pop-up window and populate that window with > a formatted representation of a customer's current shopping cart status. Since > PHP does not do client-side stuff and Javascript does not do data base I/O, > I have to use both in concert. > > The PHP program in question follows, with the location given by "here is > the problem code". > > Everything is contained in that one program. > > Reads the data base and displays the contents of the product data base > based on selection criteria passed by the preceding program. This function > works very well. The problem is when the customer clicks on the "View Cart" > link. > At that point, I want to have a pop-up screen and populate it with the > current order status. No where in the Wrox Press "Professional PHP > Programming" > text do I find an example. > > The module needs to overlay the first panel, thereby preserving all > pointers into the data base and not destroy or reassign the session > variables, which is used as the index into the temporary order MySQL table. > I can > get the pop-up window to display but it never populates it with the order > status, which > is written to a file and pointed to by the Javascript logic. The > onClick="do the > Javascript windowing" functions correctly in opening a new window. When I > change it to onClick="<? do the PHP stuff ?>", the function doesn't work. When > combining the two to generate the report and open the window ... > onClick="<? do the PHP stuff ?>; do the Java windowing stuff", I quickly > receive an error message that halts execution. > > Can a combination of PHP and Javascript do what needs to be done or am I > asking too much of either language and > what I am asking cannot be accomplished? If it can be accomplished but I am > doing it incorrectly, what is a correct > logic flow? This little snag is causing the entire project to be put on > hold. I would dearly welcome any suggestions. > > <? > function output_order_to_file(){ > . > .--------------------------------------------------------------------------- > -----------------------------> this PHP generates the cart status report to > a file > . > $theScreen .= "<table width=90% border=0 align=center cellpadding=3>"; > $theScreen .= ""; > $theScreen .= " <tr>"; > $theScreen .= "<td class=largeprint align=center colspan=5 align=center > bgcolor=#7FFFD4>"; > $theScreen .= "HERE IS YOUR ORDER"; > $theScreen .= "</td>"; > $theScreen .= "</tr>"; > $theScreen .= "<tr>"; > $theScreen .= "<td align=center > bgcolor=".$headerColor.">INVENTORY<BR>NUMBER</td>"; > $theScreen .= "<td align=center bgcolor=".$headerColor.">DESCRIPTION</td>"; > $theScreen .= "<td align=right bgcolor=".$headerColor.">QUANTITY</td>"; > $theScreen .= "<td align=right bgcolor=".$headerColor.">PRICE</td>"; > $theScreen .= "<td align=right bgcolor=".$headerColor.">SUBTOTAL</td>"; > $theScreen .= "</tr>"; > $grandTotalRetail = 0; > $grandTotalQty = 0; > while ($row = mysql_fetch_array($result)){ > $storedDescription = $row['Description']; > $storedID = $row['Id']; > $storedRetail = $row['Retail']; > $storedQty = $row['Qty']; > settype ($storedRetail, "integer"); > settype ($storedQty, "integer"); > if ($colorSwitch == 0){ > $colorOfTD = $color0; > $colorSwitch = 1; > } else { > $colorOfTD = $color1; > $colorSwitch = 0; > } > . > . > . > $theScreen .= "</tr>"; > $theScreen .= "</table>"; > $theScreen .= "</BODY>"; > $theScreen .= "</HTML>"; > > ---------------------------------------------------------------------------- > -------------------------------- here is the file i/o > ---------------------------------------------------------------------------- > -------------------------------- but the logic never enters this paragraph > $filename = "temporderfile.html"; > $fd = fopen ($filename, "w"); > fwrite ($fd, $theScreen); > fclose ($fd); > } > //-------------------------------------------------------------------------- > -------- > //--------------------------- end of generating report of the shopping cart > contents > //-------------------------------------------------------------------------- > -------- > > . > . > . > . > session_start(); > //session_register("rnumber"); > if (!IsSet($rnumber)){ > $mtime = explode (" ",microtime()); > $mseconds = $mtime[0] * 1000000000; > srand($mseconds); > $rnumber = rand(); > session_register("rnumber"); > } > . > . > . > $db_name = "frogpond"; > $table_name = "product"; > $connection = mysql_connect ("localhost","","") or > die ("Couldn't connect to localhost"); > $db = mysql_select_db ($db_name, $connection) or > die ("Couldn't select $db_name"); > parse_str($QUERY_STRING); > $newCategory = strtolower($category); > $category = $newCategory; > switch ($testCat){ > case 0: $sql_statement = "SELECT * from $table_name where Category = > \"$category\";"; > $theTitle = strtoupper($category); > break; > case 1: $sql_statement = "SELECT * from $table_name where Vendor = > \"$supplier\";"; > $theTitle = strtoupper($supplier); > break; > default: exit; > } > . > . > . > $theScreen .= "<script language=\"javascript\">"; > //-------------------------------------------------------------------------- > --------------------------------------NewWindow function > //-------------------------------------------------------------------------- > ------------------------------------- which process correctly when PHP is > hot introduced > $theScreen .= "function NewWindow(mypage){"; > $theScreen .= "var scroll = 'yes';"; > $theScreen .= "var myname = 'temp';"; > $theScreen .= "var winl = (screen.width - 875) / 2;"; > $theScreen .= "var wint = (screen.height - 650) / 2;"; > $theScreen .= "winprops = > \"height=625,width=850,top=50,left=100,scrollbars=yes\";"; > $theScreen .= " win = window.open(mypage, myname, winprops);"; > $theScreen .= "if (parseInt(navigator.appVersion) >= 4) { > win.window.focus(); }"; > $theScreen .= "}"; > //---------------------------------------------------------------------- > //-----------------------------------------------closeNewWindow function > //---------------------------------------------------------------------- > $theScreen .= "function closeNewWindow(){"; > $theScreen .= " window.close();"; > $theScreen .= "}"; > . > . > . > if ($outputCounter > 1){ > //-------------------------------------------- > //--------------------------- the red up arrow > //-------------------------------------------- > $theScreen .= "<td width=110px>"; > $theScreen .= "<a href=\"#top\"><img > src=\"d:\\html\\frogpond\\images\\arrow_red_up.jpg\" border=0>"; > $theScreen .= " Top</a><br>"; > //--------------------------------------------------------- > //-------------------------------------------------------------------------- > ------------------------------------------- indicate to create the > temporderfile.html file > //-------------------------------------------------------------------------- > ------------------------------------------- here is the problem code !!! > //--------------------------------------------------------- > $TheParameters = "<? output_order_to_file(); ?>; > "; ------------------------------------------- when this is omitted, the > pup-up window is generated > > //-------------------------------------------------------------------------- > ------------------------------------------- indicate to open a new window > //-------------------------------------------------------------------------- > ------------------------------------------- which operates correctly when > the above instruction is > //-------------------------------------------------------------------------- > ------------------------------------------- not present > $TheParameters .= "NewWindow(this.href); return false;"; > //-------------------------------------------------------------------------- > ------------------------------------------- the need is to write the PHP > report to via output_order_to_file() > //-------------------------------------------------------------------------- > ------------------------------------------- and display it in the pop-up > window via NewWindow(this.href) > //---------- when $TheParameters = "<? output_order_to_file(); ?>; > NewWindow(this.href)"; ... PHP really gets a headache, which is passed on > to me > //-------------------------------------------------------------------------- > ---- > //-------------------------------------------------------------------------- > -------------------------------------------html file the new window will > display > //-------------------------------------------------------------------------- > ---- > $theScreen .= "<a href=\"temporderfile.html\" onclick=\"$TheParameters\">"; > //-------------------------------------------------------------------------- > ----------------------------------------- output the shopping cart image > $theScreen .= "<img border=0 "; > $theScreen .= "src=\"d:\html\frogpond\images\shopping-cart-image.gif\">"; > $theScreen .= " Check Cart</a><br>"; > //-------------------------------------------------------------------------- > ---------------------------------------- the red down arrow > $theScreen .= "<a href=\"#bottom\"><img > src=\"d:\\html\\frogpond\\images\\arrow_red_down.jpg\" border=0>"; > $theScreen .= " Bottom</a>"; > $theScreen .= "</td>"; > $outputCounter = 0; > } else { > //-------------------------------------------------------------------------- > -------------------------------------- generate a blank box as the last td > $theScreen .= "<td>"; > $theScreen .= " "; > $theScreen .= "</td>"; > } > $outputCounter++; > $theScreen .= "</tr>"; > } > $theScreen .= "<tr>"; > $theScreen .= "<td colspan=3 align=center>"; > if ($MYSTATUS == $TEST){ > $theScreen .= "<H2><A HREF=\"d:\\html\\frogpond\\b.html\"><BR><BR>TO > MENU</A></H2></td>"; > } else { > $theScreen .= "<H2><A HREF=\"b.html\"><BR><BR>TO MENU</A></H2></td>"; > } > $theScreen .= "</tr>"; > $theScreen .= "</table>"; > $theScreen .= "</form>"; > $theScreen .= "<a name=bottom>"; > $theScreen .= "<script language=\"javascript\">"; > $theScreen .= "WriteFrogPondGourmet();"; > $theScreen .= "</script>"; > $theScreen .= "</BODY>"; > $theScreen .= "</HTML>"; > print ($theScreen); > ?> > > Bob Sears > Application Developer/Programmer > Internet --> Mainframe, Unix/Aix, OS/JCL > HTML, PHP, Perl, Javascript, VBScript, VB, C, COBOL, C++, Fortran, RPG and > 21 more > Informix, MySQL, Total > 317-882-8056 (residence) > 317-488-5022 (office) > [EMAIL PROTECTED] > Resume on-line: <http://www.on-net.net/~rsears/resumes/bob/bob.html> > Site samples : <http://www.on-net.net/~rsears/webwyshez/webwyshez.html>
How to jump to other URL with php With Javascript i'm use location.href="target.html" please help me....
What do you mean by "jump to"? Do you want the page to autorefresh or something? John --------------------- John Asendorf - [EMAIL PROTECTED] Web Applications Developer http://www.lcounty.com - NEW FEATURES ADDED DAILY! Licking County, Ohio, USA 740-349-3631 Aliquando et insanire iucundum est > -----Original Message----- > From: Germán A [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 14, 2001 7:53 AM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Jump to other url... > > > How to jump to other URL with php > > With Javascript i'm use location.href="target.html" > > please help me.... > > > > -- > 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] >
@John: No, he wants a redirect. @Germán: Use this one: <?php header ("Location: http://www.php.net"); exit(); ?> Muchos saludos, Mike Michael Rudel - Web-Development, Systemadministration - _______________________________________________________________ Suchtreffer AG Bleicherstraße 20 D-78467 Konstanz Germany fon: +49-(0)7531-89207-17 fax: +49-(0)7531-89207-13 e-mail: mailto:[EMAIL PROTECTED] internet: http://www.suchtreffer.de _______________________________________________________________ > -----Original Message----- > From: Asendorf, John [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 14, 2001 2:25 PM > To: Germán A; Php-Windows (E-mail) > Subject: RE: [PHP-WIN] Jump to other url... > > > What do you mean by "jump to"? Do you want the page to autorefresh or > something? > > John > > --------------------- > John Asendorf - [EMAIL PROTECTED] > Web Applications Developer > http://www.lcounty.com - NEW FEATURES ADDED DAILY! > Licking County, Ohio, USA > 740-349-3631 > Aliquando et insanire iucundum est > > > > -----Original Message----- > > From: Germán A [mailto:[EMAIL PROTECTED]] > > Sent: Monday, May 14, 2001 7:53 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP-WIN] Jump to other url... > > > > > > How to jump to other URL with php > > > > With Javascript i'm use location.href="target.html" > > > > please help me.... > > > > > > > > -- > > 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] >
Hello, I feel like I'm beating a dead horse (I think that's the saying), but I'm having trouble with IIS and exec. I've read everything I can find on the subject, but I'm still unclear on a few things. What I want to do is fairly simple. Basically, some user will come to my page and select an option from a dropdown box. Their selection will be entered into a database. Then I would like to start an exe. When I go to the php page that has the exec command I never get the output. When I look at the server I can see my exe in the task manager, but it never ends and the program is not open on the desktop. If I run it again, the exe again shows up in the task manager, but again it does not end. I cannot manually end the process either. Any thoughts or suggestions? I really appreciate any help, this has been driving me nuts. Thanks, Nick __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Paul, Check to see if php4ts.dll is in your \windows\system folder. Peace, Vern ------------------------- Hi, Iv'e installed Apache, configured and tested it: works fine. Installed PHP4 and made a file phpinfo.php. When I type 'http://localhost/phpinfo.php' I get the following message: 'Error starting program The file PHP.EXE is connected to missing output PHP4TS.DLL-st_resource Does anyone know how to fix this? thnx, Paul _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com