php-windows Digest 5 Jun 2002 19:40:26 -0000 Issue 1177
Topics (messages 14077 through 14092): CGI-Application-Error on 1% of pagehits... 14077 by: Jan Schmitz Re: notice:undefined variable 14078 by: Marius Venter Problem Solved 14079 by: Marius Venter Re: How do I get PHP 4.1.2 to work with Apache 2.0.36 on win32? 14080 by: Dr. D. Wagner cookie problem 14081 by: Cassiano Dal Pizzol CSV. Parsing a defined row? 14082 by: FrankThiel newbie problem with quotes 14083 by: prachi shroff 14085 by: prachi shroff 14086 by: prachi shroff Form Problem 14084 by: James Meers redirecting to a new page 14087 by: Renaldo De Silva 14088 by: Scott Carr 14092 by: Scott Hurring Error compiling php4ts.dll on Win2000 14089 by: Christian 14090 by: Michael Davey Compiling extensions in VC++6 14091 by: Michael Davey 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 folks, we try to run PHP as CGI on a Win2000SP2(IIS5)-Sever. On round about every 100 pages we get a HTTP-Error500 (CGI-Application Error, CGI-Server doesn't return a complete set of http-headers). At the beginning we thought this is just another problem with PHP. But then we wrote our own simple CGI-Module that just returns a HTTP-Header and a simple text. The result of this cgi-module is that we get the same error. Then we wrote a skript for the 500-Error which refreshes the site. This works fine in most cases but sometimes the IIS has its "strange 5 Minutes". In this time the server doesn't execute CGI and is only able to send the messages. Everything the skript does in this case is to refresh the Error-Message - which isn't really a solution;) This problem is only reproduceable if SQL2000 is installed on the server. I searched the MSDN for an article about this but can't find anything. In fact this is no PHP-Specific problem this isn't really the right place to post this, but does anyone know whats going on here? Thanks for every hint, Jan--- End Message ---
--- Begin Message ---Michael, Thanks for your effort. I tried that and the email error at the bottom disappeared. However, the following messages (I include only a few) still appear: Notice: Undefined variable: referers in D:\inetpub\reservationhouse\formmail.php on line 112 Notice: Undefined variable: banlist in D:\inetpub\reservationhouse\formmail.php on line 115 A new message appear at the bottom: Warning: Cannot add header information - headers already sent by (output started at D:\inetpub\reservationhouse\formmail.php:112) in D:\inetpub\reservationhouse\formmail.php on line 324 This is our own ISP so we can change whatever we need to. Your first paragraph requires a comment. I read all the articles on the site of the originator - that is the first thing to do, is'nt it? It would be a little bit silly not to do that first! Secondly, as far as I understand mailing lists are for people requiring assistance, whatever the definition of the subscriber. Anyway, thanks for the help - it is much appreciated. Regards, Marius . Michael Davey <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > OK - couple of things first: > > a) The PHP mailing list is for programmers of PHP looking for help making > their own scripts - not for people who want support for implementing someone > else's script. There is a link on the site where I found a copy of your > script offering support, this is where you should have gone first. > > b) This is a mailing list, and as such replies should be made to the list - > not to individuals who subscribe the list. > > c) You still didn't send the source code for the form - I had to go and look > for it myself on the net. > > > Hi Michael, > > > > Our client uses the formmail.php script. He said to me that he > > used it as is > > with his previous ISP - it was not necessary for him to change anything. > > I configured the php.ini in the NTWin directory correctly. As a test I do > > not add anything to the email field (on the form) but it does not make any > > difference in the errror message. > > > > The page can be found at www.reservationhouse.co.za and then the > > link on the > > lefthand side: bookings and information. > > However, the problem appears to be quite simple - if you create a simple > script like the one below and run it on your server, you should see a > setting called "register_globals". This setting need to be "On" for your > script to work. Newer versions of PHP disable this by default as it > compromises both speed and security. > > List config script: > > <? > phpinfo(); > ?> > > > If you are leasing space, you will probably not have access to the php.ini > file to make this change. You can however specify php settings in a file > named ".htaccess" placed in your root web directory, eg: > > .htaccess: > php_value register_globals On > > regards, > > Mikey >--- End Message ---
--- Begin Message ---Hi, Thanks to everybody trying to solve the problem! The solution was to set the E_ALL to E_ALL & ~E_NOTICE in the php.ini file!! Regards, MARIUS Marius Venter <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I installed PHP 4.1 on NT 4 with IIS 4. My client getting many of these > error messages when he runs his html form: > > > Notice: Undefined variable: background in > D:\inetpub\reservationhouse\formmail.php on line 183 > The form was not submitted for the following reasons: > > I NEED VALID RECIPIENT EMAIL ADDRESS () TO CONTINUE > Please use your browser's back button to return to the form and try again. > > User rights are set correctly and PHP's installation went smooth. I also > tested PHP and it seems OK. Anys suggestions? > > Marius Venter > > >--- End Message ---
--- Begin Message ---On Monday, 03 June 2002 at 20:34, Stuart Dallas scribbled "Re: [PHP-WIN] How do I get PHP 4.1.2 to work with": > On Monday, June 3, 2002 at 2:13:03 PM, you wrote: > > I'm having a little trouble setting up PHP 4.1.2 to run on my Win32 > > Apache 2.0.36 installation. Apache is working flawlessly > > ortherwise, but If I try and add/uncomment the "LoadModule" line for > > php4apache.dll then Apache doesn't even load, just exits. > > PHP 4.1.2 doesn't support Apache 2. You need to get PHP 4.2.x - it has > a module specifically for Apache 2. > > -- > Stuart Thanks to both Stuart and Dash McElroy for pointing out that, regardless of what my tired, bloodshot, eyes were telling me while scouring the web, there is a major difference between "4.1.2" and "4.2.1". Ohh, the humility of it all. Thanks again. -- ><> ><> ><> ><> ><> ><> ><> ooOOoo <>< <>< <>< <>< <>< <>< <>< Dr. Dameon Wagner Network Administrator Zoology Department, University of Port Elizabeth, South Africa. Phone +27 41 504 2335 Fax +27 41 504 2317 E-mail: [EMAIL PROTECTED] ><> ><> ><> ><> ><> ><> ><> ><> ooOOoo <>< <>< <>< <>< <>< <><--- End Message ---
--- Begin Message ------ End Message ---
guys i have a cookie problemi´m developing a site who uses cookies to count the visits and to access the database, all works fine in almost every browser i test...all but one!!!this one don´t accept the cookie i pass to it, by the way he doesn´t even register the cookie!!!in all other browser and diferent O/S (XP, win98, win95, w2k) i test all works fine but this one is a mystery to me...well some tech specs bout the hated oneos win98browser i6 6.0 (with some updates)the script who sets the cookie$servidor
=$_SERVER['SERVER_NAME'];
if (isset($_COOKIE['identidade']))
{
$identidade=$_COOKIE['identidade'];
setcookie('identidade',$identidade,time()+3600,"/","$servidor",0);
}
else
{
$identidade = rand (1, 20000);
setcookie('identidade',$identidade,time()+3600,"/","$servidor",0);
some lines in the sql
}
hope u guys can help me
--- Begin Message ---Hello, i couldn´t find an answer in the NewsArchive. How can i parse a CSV file, and show a defined row taken from an url. I have got this link www.something.com/something.php?id=234 the CSV example: id,article,category 233,art1,cat1 234,art2,cat2 235,art3,cat3 I do know how i can parse a whole file with fgetcsv, but not how to parse an explicit line. THX for help. Frank Thiel--- End Message ---
--- Begin Message ---Hi! I am a newcomer to the list and am also new to working with PHP. My question might seem really silly to you, but I would really appreaciate any help. I am trying to fit the following line of HTML in the PHP echo or print statements, because this is somewhere in the middle of a larger php program. I cannot separate the javascript thing into a different javascript function and call the function because the TITLE and BODY of this HTML page start in another php program and declaring a javascript function there does not help, as the call here does not recognize that function. The problem with putting the following line in the echo statement is the quotes. Because there are a lot of instances of quotes which I need PHP to ignore. Putting slashes manually or using addslashes does not help. Could anyone please explain the working of single (') and double (") quotes in PHP or suggest a solution to my problem? <a href="javascript:window.open("addfossilpage.php?me=$folder_id","width=430","height=450" )"> So, I want the line to be like: echo '<a href="javascript:window.open("addfossilpage.php?me='.$folder_id.' ","width=430","height=450" )">' and ask PHP to recognize only the single quotes. And $folder_id is a PHP variable. thanks, Prachi. --------------------------------- Do You Yahoo!? Sign-up for Video Highlights of 2002 FIFA World Cup--- End Message ---
--- Begin Message ---Thank You for your prompt reply. Well, I have already tried these two options but somehow they dont work. When I click on the hyperlink created by this line, the link just says javascript:window.open( Why would that happen? It is ok with the first quote, but it ignores everything after the second one. thanks, Prachi. R'twick Niceorgaw <[EMAIL PROTECTED]> wrote: echo " href=\"javascript:window.open(\"addfossilpage.php?me=$folder_id\",\"width=43 0\",\"height=450\" )\">"; OR echo ' . " ?,?width='430","height=450"' )?>'; ----- Original Message ----- From: "prachi shroff" To: "php php" Sent: Wednesday, June 05, 2002 9:38 AM Subject: [PHP-WIN] newbie problem with quotes > > Hi! > > I am a newcomer to the list and am also new to working with PHP. My question might seem really silly to you, but I would really appreaciate any help. > > I am trying to fit the following line of HTML in the PHP echo or print statements, because this is somewhere in the middle of a larger php program. I cannot separate the javascript thing into a different javascript function and call the function because the TITLE and BODY of this HTML page start in another php program and declaring a javascript function there does not help, as the call here does not recognize that function. > > The problem with putting the following line in the echo statement is the quotes. Because there are a lot of instances of quotes which I need PHP to ignore. Putting slashes manually or using addslashes does not help. Could anyone please explain the working of single (') and double (") quotes in PHP or suggest a solution to my problem? > > href="javascript:window.open("addfossilpage.php?me=$folder_id","width=430"," height=450" > )"> > > So, I want the line to be like: > > echo '","width=430","height=450" > )">' > > and ask PHP to recognize only the single quotes. And $folder_id is a PHP variable. > > thanks, > > Prachi. > > > > --------------------------------- > Do You Yahoo!? > Sign-up for Video Highlights of 2002 FIFA World Cup --------------------------------- Do You Yahoo!? Sign-up for Video Highlights of 2002 FIFA World Cup--- End Message ---
--- Begin Message ---Well, I thought you need to define the javascript functions in the HEAD of the HTML page, and as the HEAD and the start of BODY is done in some other php program which includes the one in question, it is not possible to make a function. On your suggestion I tried to put the javascript function in the BODy, right before the A HREF I am having problems with, but that does not work either. thanks, Prachi. R'twick Niceorgaw <[EMAIL PROTECTED]> wrote: why not create a javascript function through php like echo ""; echo "function openwindow () {"; echo "window.open (\"addfossilpage.php?me=$folder_id\",\"width=430\",\"height=450\");"; echo "}"; echo " "; echo 'Open New Window'; ----- Original Message ----- From: "prachi shroff" To: "R'twick Niceorgaw" Cc: "php php" Sent: Wednesday, June 05, 2002 10:00 AM Subject: Re: [PHP-WIN] newbie problem with quotes > > Thank You for your prompt reply. Well, I have already tried these two options but somehow they dont work. When I click on the hyperlink created by this line, the link just says > javascript:window.open( > Why would that happen? It is ok with the first quote, but it ignores everything after the second one. > thanks, > Prachi. > > R'twick Niceorgaw wrote: echo " href=\"javascript:window.open(\"addfossilpage.php?me=$folder_id\",\"width=43 > 0\",\"height=450\" )\">"; > > OR > > echo ' . " ?,?width='430","height=450"' )?>'; > > > > ----- Original Message ----- > From: "prachi shroff" > > To: "php php" > > Sent: Wednesday, June 05, 2002 9:38 AM > Subject: [PHP-WIN] newbie problem with quotes > > > > > > Hi! > > > > I am a newcomer to the list and am also new to working with PHP. My > question might seem really silly to you, but I would really appreaciate any > help. > > > > I am trying to fit the following line of HTML in the PHP echo or print > statements, because this is somewhere in the middle of a larger php program. > I cannot separate the javascript thing into a different javascript function > and call the function because the TITLE and BODY of this HTML page start in > another php program and declaring a javascript function there does not help, > as the call here does not recognize that function. > > > > The problem with putting the following line in the echo statement is the > quotes. Because there are a lot of instances of quotes which I need PHP to > ignore. Putting slashes manually or using addslashes does not help. Could > anyone please explain the working of single (') and double (") quotes in PHP > or suggest a solution to my problem? > > > > href="javascript:window.open("addfossilpage.php?me=$folder_id","width=430"," > height=450" > > )"> > > > > So, I want the line to be like: > > > > echo '","width=430","height=450" > > )">' > > > > and ask PHP to recognize only the single quotes. And $folder_id is a PHP > variable. > > > > thanks, > > > > Prachi. > > > > > > > > --------------------------------- > > Do You Yahoo!? > > Sign-up for Video Highlights of 2002 FIFA World Cup > > > > > --------------------------------- > Do You Yahoo!? > Sign-up for Video Highlights of 2002 FIFA World Cup --------------------------------- Do You Yahoo!? Sign-up for Video Highlights of 2002 FIFA World Cup--- End Message ---
--- Begin Message ---Hello, I have this form and its just not picking up the submit variable however it is posting them!!! Can someone double check this, what have i done? James <html> <body> <?php include("newsconf.php3"); while (list($name, $value) = each($HTTP_POST_VARS)) { echo "$name = $value<br>\n"; } if (isset($submit)) { mysql_query("INSERT INTO $ntable VALUES ('','$title','$posted_by','$entry',NULL)"); print("$title<br>\n"); print("Posted by $posted_by<br>\n"); print("$entry\n"); } else { print("<form action=\"addnews.php3\" method=post>\n"); $result = mysql_query("select name from $ptable") or die("Query broke!<br>\n"); print("Posted By : <SELECT name=\"posted_by\">\n"); while ($row = mysql_fetch_array($result)) { $name=$row["name"]; print("<OPTION value=\"$name\">$name\n"); } print("</SELECT><br>\n"); ?> Title : <input type="Text" name="title" size=50><br> News :<br> <textarea rows=20 cols=80 name="entry"></textarea> <p> <input type="Submit" value="submit" name="submit"> </form> <?php exit; } ?> </body> </html>--- End Message ---
--- Begin Message ---is there any way other than header("Location: http://www.php.net/"); to redirect to another page.--- End Message ---
--- Begin Message ---After the <html> tag, you can put: <META HTTP-EQUIV="refresh" content="2;URL={WHEREVER you wanna go}"> The 2 is for seconds to wait before a send. This works in standard HTML files as well. -- Scott Carr OpenOffice.org Whiteboard-Doc Maintainer http://whiteboard.openoffice.org/doc/ Quoting Renaldo De Silva <[EMAIL PROTECTED]>: > is there any way other than > > header("Location: http://www.php.net/"); > > to redirect to another page. > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/--- End Message ---
--- Begin Message ---Well, for browsers that support Javascript: print "<SCRIPT>window.location='URL';</SCRIPT>"; Or, you could load the document that you want the user to see and print it out. $contents = join("", file("URL")); print $contents; exit; AFAIK, there's not too many ways to tell a browser "go here instead". 'Location: ...' is by far the reliable. --- Scott Hurring Systems Programmer EAC Corporation [EMAIL PROTECTED] Voice: 201-462-2149 Fax: 201-288-1515 > -----Original Message----- > From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 05, 2002 2:44 PM > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] redirecting to a new page > > > is there any way other than > > header("Location: http://www.php.net/"); > > to redirect to another page. > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >--- End Message ---
--- Begin Message ---Hello guys, I get the following error message when compiling : D:\Travail\php-4.2.1\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory The piece of code is : #ifdef PHP_WIN32 # ifndef WINNT # define WINNT 1 # endif # undef FD_SETSIZE # include "arpa/inet.h" # define socklen_t unsigned int #endif OS : Win2000 MSVC++ 6.0 PHP 4.2.1 I got the .dsp file from the php release. Any idea ? Christian.--- End Message ---
--- Begin Message ---Ooops! > -----Original Message----- > From: Michael Davey [mailto:[EMAIL PROTECTED]] > Sent: 05 June 2002 18:16 > To: Christian > Subject: RE: [PHP-WIN] Error compiling php4ts.dll on Win2000 > > > Did you compile your own version of resolv.lib from the DNS > source given at: http://www.php.net/extra/bindlib_w32.zip > > I did this and it builds fine on exactly the same setup as yours. > > regards, > > Mikey > > > > -----Original Message----- > > From: Christian [mailto:[EMAIL PROTECTED]] > > Sent: 05 June 2002 15:54 > > To: [EMAIL PROTECTED] > > Subject: [PHP-WIN] Error compiling php4ts.dll on Win2000 > > > > > > Hello guys, > > > > I get the following error message when compiling : > > > > D:\Travail\php-4.2.1\main\php_network.h(28) : fatal error C1083: > > Cannot open > > include file: 'arpa/inet.h': No such file or directory > > > > The piece of code is : > > > > #ifdef PHP_WIN32 > > # ifndef WINNT > > # define WINNT 1 > > # endif > > # undef FD_SETSIZE > > # include "arpa/inet.h" > > # define socklen_t unsigned int > > #endif > > > > OS : Win2000 > > MSVC++ 6.0 > > PHP 4.2.1 > > > > I got the .dsp file from the php release. > > > > Any idea ? > > > > Christian. > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > >--- End Message ---
--- Begin Message ---I was wondering if anyone here had any experience with building any of the extensions supplied with the PHP source code? I have so far managed to successfully compile both the CGI and Apache module versions of PHP itself, but I am having mixed luck with the extensions. Some I can get libraries for and they build fine, but GD comes up with so many errors, none of which seem down to a missing library - any help greatly appreciated... Mikey--- End Message ---