php-windows Digest 23 Jun 2003 19:03:05 -0000 Issue 1791 Topics (messages 20507 through 20524):
Re: Apache acts weird I think it's because of PHP 20507 by: Cristian MARIN Re: Using PHP4 20508 by: Cristian MARIN Re: php.ini values ignored? 20509 by: Cristian MARIN 20524 by: Kit DeKat Re: Problem on passing value. 20510 by: Cristian MARIN 20514 by: Stephen 20515 by: Cristian MARIN 20522 by: Melih Onvural Re: PHP Sub-Routine 20511 by: Cristian MARIN Re: multiple mails problem 20512 by: Cristian MARIN Re: PHP Sub Routine II 20513 by: Cristian MARIN Printing functions 20516 by: Luis Moreira Search Engine Friendly URL's 20517 by: Gary Holyoak Re: Parsing Error: Short just a few lines of code, please look 20518 by: sven Opening a file 20519 by: Seth Buntin 20523 by: Melih Onvural Re: Phpinfo.php 20520 by: sven 20521 by: Stuart Felenstein 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 ---It could be the pages fault ... if this happen on the same page could be an infinit loop or a very big loop on the page. -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 [EMAIL PROTECTED] "Moroswitie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have this strange problem, > I have apache version 2.0.46 installed and the latest version of php. (all > windows version) > > sometimes the webservers doesn't respond anymore. > in your webbrowser you see that it has contacted the webserver, > but all is extremely slow. > > After a while everything is oke again, but on the server-status page > I see that, under Parent server generations: the number has Increased bij > 1 > > So if it says 5, I know that this problem has accured 5 times. > > Does anybody know what could be the cause ? >
--- End Message ---
--- Begin Message ---Because of your apache - php configuration, because of the rights that the file has, because contain an error which make the file to be ignored ... and many, many other reason ... -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 [EMAIL PROTECTED] "Mathias" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > Now when I make a php file why can't I open it? Can anyone please help? > > > Mathias > >
--- End Message ---
--- Begin Message ---maybe is not the good php.ini you are using ... You are modifing a php.ini and php use another one. First of all look in the phpinfo() and see what file is it used. Second add a dummy line in the php.ini like: lkjasdlaksdj;alskdas;ldkajsd and you should be prompted with an error when the apache restart, if you are prompted then try to change for example the path of stored session and see the changes in the phpinfo. Second problem is that IE keeps the history in mind and sometimes you have to do many time a refresh to see the new page. Always is better to open a new explorer to see the page. I heved because of this multiple time the impression that php ignore my file but it proved that IE haven't refresh the page. If you are able to see the apache log take a look there to see if the IE is updating the file you are seeing. -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 [EMAIL PROTECTED] "Kit Dekat" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 03:55 PM 6/21/2003, you wrote: > >Did you restart Apache? > > > >Ignatius > > Please give me *some* credit... > restarted everytime i changed the httpd.conf and php.ini > files, which would happen to be over 20 times recently, > as i tried different configurations to see what happens. > > > Best regards, > Kit DeKat mailto:[EMAIL PROTECTED] > Systems Programmer > > -----BEGIN PERL GEEK CODE BLOCK----- > Version: 0.01 > P++>[EMAIL PROTECTED] >++M+$O+>+++(++)$MA >+E+PU >+BD >++C >*$ > D++S++>[EMAIL PROTECTED]>++WP?MO?PP!n?CO?PO--o?G A--Ee+++Ev w+m! > ------END PERL GEEK CODE BLOCK------ >
--- End Message ---
--- Begin Message --- At 01:14 PM 6/23/2003, you wrote:maybe is not the good php.ini you are using ... You are modifing a php.ini and php use another one. First of all look in the phpinfo() and see what file is it used. Second add a dummy line in the php.ini like: lkjasdlaksdj;alskdas;ldkajsd and you should be prompted with an error when the apache restart, if you are prompted then try to change for example the path of stored session and see the changes in the phpinfo.
wrote the 'garbage' into both installed php-dir (D:/var/php/php.ini) and into the (%SYSTEMROOT%/system32/php.ini) and it was ignored; ie: no apache2 errors. copied the php.ini (w/ garbarge) into the %SYSTEMROOT% directory and restarted, had no errors BUT did see all my modification to the php.ini finally appear.
had it everywhere but where it mattered, and now my sessions work!!
Thanks "Cristian MARIN - Developer"
Best regards, Kit DeKat mailto:[EMAIL PROTECTED] Systems Programmer
-----BEGIN PERL GEEK CODE BLOCK-----
Version: 0.01
P++>[EMAIL PROTECTED] >++M+$O+>+++(++)$MA >+E+PU >+BD >++C >*$
D++S++>[EMAIL PROTECTED]>++WP?MO?PP!n?CO?PO--o?G A--Ee+++Ev w+m!
------END PERL GEEK CODE BLOCK------
--- End Message ---
--- Begin Message ---Of corse: The code should look like this : <? if ( $HTTP_GET_VARS['a'] == 1 ) { echo "True."; } else { echo "False." } ?> Now if you type the http://localhost/show.php?a=1 you'll have 'true' otherwise 'false' -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 [EMAIL PROTECTED] "Joe Phyism" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The source of show.php: > <? > if ( $a == 1 ) { > echo "True."; > } else { > echo "False." > } > ?> > > However, no matter what I type in URL of browser, like > http://localhost/show.php?a=1 or http://localhost/show.php, the result is > the same - "False.". > Can anyone help me? Is it the problem of my setting in Apache? > >
--- End Message ---
--- Begin Message ---$HTTP_GET_VARS - This is an example of the old style super globals. However, php is now moving over to a simpler method... $HTTP_GET_VARS is becoming $_GET['x'] Post variables all arrvie as $_POST['x'] Session variables are $_SESSION['x'] Cookie variables are $_COOKIE['x'] and so on. I strongly suggest reading more about the new variables at http://uk2.php.net/manual/en/language.variables.predefined.php Stephen P.S. The variables are case sensitive... ie they have to be written all in capitals! ----- Original Message ----- From: "Cristian MARIN" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 23, 2003 6:17 PM Subject: [PHP-WIN] Re: Problem on passing value. > Of corse: > > The code should look like this : > > <? > if ( $HTTP_GET_VARS['a'] == 1 ) { > echo "True."; > } else { > echo "False." > } > ?> > > Now if you type the http://localhost/show.php?a=1 you'll have 'true' > otherwise 'false' > > > -- > ------------------------------------------------- > Cristian MARIN - Developer > InterAKT Online (www.interakt.ro) > Tel: +4021 312.53.12 > Tel/Fax: +4021 312.51.91 > [EMAIL PROTECTED] > "Joe Phyism" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > The source of show.php: > > <? > > if ( $a == 1 ) { > > echo "True."; > > } else { > > echo "False." > > } > > ?> > > > > However, no matter what I type in URL of browser, like > > http://localhost/show.php?a=1 or http://localhost/show.php, the result is > > the same - "False.". > > Can anyone help me? Is it the problem of my setting in Apache? > > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
--- End Message ---
--- Begin Message ---Then try: <?php if ( $_GET['a'] == 1 ) { echo "True."; } else { echo "False." } ?> Any of this will work for the moment. -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 [EMAIL PROTECTED] "Stephen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > $HTTP_GET_VARS - This is an example of the old style super globals. However, > php is now moving over to a simpler method... > > $HTTP_GET_VARS is becoming $_GET['x'] > Post variables all arrvie as $_POST['x'] > Session variables are $_SESSION['x'] > Cookie variables are $_COOKIE['x'] > and so on. I strongly suggest reading more about the new variables at > http://uk2.php.net/manual/en/language.variables.predefined.php > > Stephen > > P.S. The variables are case sensitive... ie they have to be written all in > capitals! > > ----- Original Message ----- > From: "Cristian MARIN" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, June 23, 2003 6:17 PM > Subject: [PHP-WIN] Re: Problem on passing value. > > > > Of corse: > > > > The code should look like this : > > > > <? > > if ( $HTTP_GET_VARS['a'] == 1 ) { > > echo "True."; > > } else { > > echo "False." > > } > > ?> > > > > Now if you type the http://localhost/show.php?a=1 you'll have 'true' > > otherwise 'false' > > > > > > -- > > ------------------------------------------------- > > Cristian MARIN - Developer > > InterAKT Online (www.interakt.ro) > > Tel: +4021 312.53.12 > > Tel/Fax: +4021 312.51.91 > > [EMAIL PROTECTED] > > "Joe Phyism" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > The source of show.php: > > > <? > > > if ( $a == 1 ) { > > > echo "True."; > > > } else { > > > echo "False." > > > } > > > ?> > > > > > > However, no matter what I type in URL of browser, like > > > http://localhost/show.php?a=1 or http://localhost/show.php, the result > is > > > the same - "False.". > > > Can anyone help me? Is it the problem of my setting in Apache? > > > > > > > > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > >
--- End Message ---
--- Begin Message ---Actually the super global variable that were accepted before PHP 4 have all been depreciated. if you're using get then there's a new server variable _SERVER[formTagName] that passes variables across pages. melih > > From: "Cristian MARIN" <[EMAIL PROTECTED]> > Date: 2003/06/23 Mon PM 01:17:34 EDT > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Re: Problem on passing value. > >
replyAll
Description: null
--- End Message ---
--- Begin Message ---You cannot call a php file index.html. If they are called with the html extension apache it will think that this is a html file so he don't have to parse the page and it will send the page as is to the explorer which cannot understend php. You should call your page index.php. Also make a index.html which redirect you to the index.php or add the index.php to the autoloading pages in the http.conf. -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 [EMAIL PROTECTED] "Hermann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi! I have a little problem! I wrote follwing code! <?php $type = 'file'; //$type = 'db'; // determine the tracker type if ($type == 'file') { require_once 'docs/php/IPTracker/IPTrackerFile.php'; $tracker = new IPTrackerFile('docs/php/IPTracker/ip.log'); } else { require_once 'IPTrackerDB.php'; require_once '../abstractdb/AbstractFactory.php'; $db = AbstractFactory::getDbLayer('MYSQL', '', 'mysql'); $tracker = new IPTrackerDB($db, 'localhost', 'php', '', ''); } // track the current visitor $tracker->track(); ?> If my file ist called index.php, it runs without problems! If I call the file index.html (should also work) he can't parse the line with $tracker->track(); He interpretes the "->" wrong! Is there a other way to call a sub routine in php (without ->)??? Why are these two commandos in php and html the same with other functions? There is a redunancy-bug!!! Regards, Hermann.
--- End Message ---
--- Begin Message ---Better then that is to send the mail to everyone in the list. This way no other user can see the others mail (if you are using the bcc the user can still see all the adresses by looking into the mime of that e-mail) and you may even personalize them in your script ... -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 [EMAIL PROTECTED] "Narayanak" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > First, I want to thank whoever takes this on ahead of time. > > I'm just starting to learn php and I had a problem with sending the mail to > multiple users , when i send an email to some users it shows their email > addresses to everyone. I do not want the people receiving the email to see > everybody elses email address that is on the list. > > My Problem is : i want send the same mail to multiple users ,these mail ids > are collected from the database and concatnated with each other by > separating them with commas > > and i was used the mail function as > > mail($to,$subject,$message,$headers) > > where $to='[EMAIL PROTECTED],[EMAIL PROTECTED],...'; > > But my intension is "I do not want the people receiving the email to see > everybody elses email address that is on the list." > If i can use Bcc then only 2 mails goes i.e., to and bcc . > > I don't know how to solve this problem, Please help me anyone > > > Regards > Narayana > > [EMAIL PROTECTED] > >
--- End Message ---
--- Begin Message ---I already answered you at the first post. -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 [EMAIL PROTECTED] "Hermann" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi! > > I have a little problem! > > I wrote follwing code! > > <?php > > $type = 'file'; > //$type = 'db'; > > // determine the tracker type > if ($type == 'file') { > require_once 'docs/php/IPTracker/IPTrackerFile.php'; > $tracker = new IPTrackerFile('docs/php/IPTracker/ip.log'); > } else { > require_once 'IPTrackerDB.php'; > require_once '../abstractdb/AbstractFactory.php'; > $db = AbstractFactory::getDbLayer('MYSQL', '', 'mysql'); > > $tracker = new IPTrackerDB($db, 'localhost', 'php', '', ''); > } > > // track the current visitor > $tracker->track(); > > ?> > > If my file ist called index.php, it runs without problems! > > If I call the file index.html (should also work) he can't parse the line > with $tracker->track(); > > He interpretes the "->" wrong! > > Is there a other way to call a sub routine in php (without ->)??? > > Why are these two commandos in php and html the same with other functions? > There is a redunancy-bug!!! > > Regards, Hermann. > >
--- End Message ---
--- Begin Message ---
HiCan someone tell me why on earth the following script writes one line per page (besides a blank page between pages 1 and 2) ?And this only if I specify a default printer on PHP.INI, otherwise the printer_open function fails ...Thanks<?php
$handle = printer_open();
print "Printer handle opened\n\n";
printer_start_doc($handle,"Doc1");
printer_start_page($handle);
printer_write($handle,"Line 1\n\n\n");
printer_write($handle,"Line 2\n");
printer_write($handle,"Line 3\n");
printer_write($handle,"Line 4\n");
printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);
print "Printer closed\n";
?>
--- End Message ---
--- Begin Message ---Hi, Recently read an article about search engine friendly urls. (http://www.zend.com/zend/spotlight/searchengine.php?days=10000&f_id=searche ngine&mode=&kind=sl&article=searchengine) Seems good but for the life of me I cant get it to work on my IIS server. I've tried all the suggestions in the comments section of the above article to no avail. I've run PHP as both CGI and ISAPI, and I've run the MS knowledge base fix. Can anybody help with how to get $PATH_INFO from '...index.php/value1/value2/value3' using WK2 server and IIS. It works fine on the hosted Apache/*nix box but not on intranet w2k/IIS All I keep getting is : Warning: Unknown(D:\public_html\fun): failed to create stream: No such file or directory in Unknown on line 0 Warning: Unknown(): Failed opening 'D:\public_html\fun' for inclusion (include_path='.;d:\includes') in Unknown on line 0
--- End Message ---
--- Begin Message ---hi stuart, Stuart Felenstein wrote: > <?php > //create short variable names > $LastName = $HTTP_POST_VARS['LastName']; > $Address1 = $HTTP_POST_VARS['Address1']; > $City = $HTTP_POST_VARS['City']; > $State = $HTTP_POST_VARS['State']; > $Zip = $HTTP_POST_VARS['Zip']; > $HTele = $HTTP_POST_VARS['HTele']; > either you exit php here with '?>' > <tr> > <td colspan="2">Last Name</td> and start it again, where you want to output your vars like <td><?php echo $LastName; ?></td> > <td>$LastName;</td> > </tr> > <tr> > <td colspan="2">Address 1</td> > <td>$Address1;</td> > </tr> > <tr> > <td colspan="2">City</td> > <td>$City;</td> > </tr> > <tr> > <td colspan="2">State</td> > <td>$State;</td> > </tr> > <tr> > <td colspan="2">Zip</td> > <td>$Zip;</td> > </tr> > <tr> > <td colspan="2">Telephone</td> > <td>$HTele;</td> > > </tr> > </table> >> > <p></p> > <p></p> > <p></p> > </form> > <hr> > <p></p> > <p></p> > <p></p> > <p></p> > </body> > </html> or you put all your html into echo, but then you have to escape quotation marks: echo "<tr>". "<td colspan=\"2\">Last Name</td>". "<td>$LastName</td>". "</tr>"; hope this helps. ciao SVEN
--- End Message ---
--- Begin Message ---I need a little bit of help. I have created a program that will list all the files in a directory I just need to know how to make a link to these files so that when you click on them it opens them up... Thanks, Seth
--- End Message ---
--- Begin Message ---the fopen function does a really good job of opening files and also allows you to limit what the user can do. However, if you wanted to simply open up a word file then just make it a link using <a href="document.doc"></a> and it will open the file for you melih > > From: "Seth Buntin" <[EMAIL PROTECTED]> > Date: 2003/06/23 Mon AM 09:19:49 EDT > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Opening a file > >
replyAll
Description: null
--- End Message ---
--- Begin Message ---hi stuart, try this: move php.ini to \winnt leave php4ts.dll and php4apache2.dll in \winnt\system32 in httpd.conf change the loadmodule line to: LoadModule php4_module /PATH_TO/php/sapi/php4apache2.dll (note the apache2!) and tell me if this worked for you. ciao SVEN Stuart Felenstein wrote: > I also put php.ini, php4ts, php4apache2 all into my system32 > directory. > > Stuart > > Dean Hayes <[EMAIL PROTECTED]> wrote: > > Did you add the lines > > LoadModule php4_module c:/php/sapi/php4apache.dll > AddType application/x-httpd-php .php > > to your httpd.conf file???? > > > Dean "The Insane Guy" Hayes > Mystical Web Designs > http://www.mystical-sector.com > > <-- I design and i redesign but still i never designed true beauty > like you --> > > > > > > From: "Mathias" > Reply-To: "Mathias" > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Phpinfo.php > Date: Fri, 20 Jun 2003 11:31:30 -0500 > > I use Microsoft Windows XP Pro, and PHP4. Im reading the book Sams > teach yourself PHP, Mysql and Apache. > I setup mysql apache2 and php4. I cannot get to work. Can > anyone HELP PLEASE?!?!??? > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > _________________________________________________________________ > Hotmail is now available on Australian mobile phones. Go to > http://ninemsn.com.au/mobilecentral/signup.asp
--- End Message ---
--- Begin Message ---Oh sorry, no I was just responding to Mathias...my php is working. Thanks though Stuart sven <[EMAIL PROTECTED]> wrote: hi stuart, try this: move php.ini to \winnt leave php4ts.dll and php4apache2.dll in \winnt\system32 in httpd.conf change the loadmodule line to: LoadModule php4_module /PATH_TO/php/sapi/php4apache2.dll (note the apache2!) and tell me if this worked for you. ciao SVEN Stuart Felenstein wrote: > I also put php.ini, php4ts, php4apache2 all into my system32 > directory. > > Stuart > > Dean Hayes wrote: > > Did you add the lines > > LoadModule php4_module c:/php/sapi/php4apache.dll > AddType application/x-httpd-php .php > > to your httpd.conf file???? > > > Dean "The Insane Guy" Hayes > Mystical Web Designs > http://www.mystical-sector.com > > <-- I design and i redesign but still i never designed true beauty > like you --> > > > > > > From: "Mathias" > Reply-To: "Mathias" > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] Phpinfo.php > Date: Fri, 20 Jun 2003 11:31:30 -0500 > > I use Microsoft Windows XP Pro, and PHP4. Im reading the book Sams > teach yourself PHP, Mysql and Apache. > I setup mysql apache2 and php4. I cannot get to work. Can > anyone HELP PLEASE?!?!??? > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > _________________________________________________________________ > Hotmail is now available on Australian mobile phones. Go to > http://ninemsn.com.au/mobilecentral/signup.asp -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---