|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Wed Oct 02 2002 - 11:49:16 CDT
php-general Digest 2 Oct 2002 16:49:16 -0000 Issue 1620
Topics (messages 118532 through 118617):
Re: PHP and Flash
118532 by: Peter Houchin
118533 by: Peter Houchin
118536 by: Bob Irwin
118584 by: Lowell Allen
118589 by: Debbie Dyer
Re: XML Parser
118534 by: Manuel Lemos
Access denied to php files in Netscape 6
118535 by: Chris Nielsen
118544 by: Chris Shiflett
118545 by: Smith, Benjamin
How to send POST info without a form?
118537 by: Chris Nielsen
118538 by: Martin Towell
118542 by: lallous
118555 by: Girish Nath
118586 by: Jay Blanchard
118590 by: Khalid El-Kary
Re: Quick question.
118539 by: Simon Angell
118594 by: Robert Cummings
118597 by: Simon Angell
118598 by: Robert Cummings
118599 by: Simon Angell
Re: Unable to load dynamic Library-Access Denied
118540 by: John W. Holmes
Re: backwards compat for newly developed scripts ($_GET / $HTTP_GET_VARS)
118541 by: John W. Holmes
118581 by: Ford, Mike [LSS]
118588 by: Paul Nicholson
ええと
118543 by: 松本創
Re: tricky gd question
118546 by: electroteque
Re: XML Parser additional
118547 by: Justin French
Cookie
118548 by: Max Buvry
118549 by: Bob Irwin
118550 by: Smith, Benjamin
118557 by: Max Buvry
Re: mail function problems
118551 by: Debbie Dyer
118571 by: David Robley
118595 by: Dan McCullough
Re: Undefined index:
118552 by: Erwin
Re: submitting a form to multiple places!!!
118553 by: olinux
118554 by: olinux
"VERY NEWBIE" php_* mod_* --with- question
118556 by: Aleksandar
Help required on cookies
118558 by: Balaji Ankem
118560 by: Chris Shiflett
118564 by: Balaji Ankem
118565 by: Chris Shiflett
118567 by: Balaji Ankem
118568 by: Chris Shiflett
get access to define() constants with dynamic names
118559 by: Heiko Mundle
118562 by: Scott Houseman
118566 by: Heiko Mundle
Re: PHP with Oracle
118561 by: Philippe Saladin
Re: Connect to oracle on another host
118563 by: Philippe Saladin
Re: Can I pass the ftp transfer mode in a string?
118569 by: David Robley
Re: Works from the command line but NOT from PHP
118570 by: David Robley
Re: OOP class names
118572 by: Debbie Dyer
quotes in text strings
118573 by: Javier Montserat
118574 by: David Robley
118575 by: Erwin
Recursive Replace
118576 by: Rick Beckman
118578 by: Jon Haworth
118579 by: Rick Beckman
118583 by: Ford, Mike [LSS]
118585 by: Rick Beckman
118604 by: John W. Holmes
Re: eregi_replace / preg_match_all
118577 by: Ford, Mike [LSS]
Re: php question
118580 by: Ford, Mike [LSS]
access denied
118582 by: Simon Angell
Re: Regular expression help converting doc to xml
118587 by: Geoff
Using PHP to create tables?
118591 by: Andre Dubuc
118592 by: Jay Blanchard
118593 by: Andrew Brampton
118596 by: Andre Dubuc
Re: [PHP-INST] "VERY NEWBIE" php_* mod_* --with- question
118600 by: Brian.Duke.Level3.com
Images problem
118601 by: Mihaela Ratri
118602 by: Mihaela Ratri
118608 by: Mihaela Ratri
php 4.2.3 giving prob.
118603 by: Anil Garg
118605 by: Rasmus Lerdorf
How can I check for variances in spelling within form text input fields?
118606 by: DonPro
PHP with GD and Jpeg
118607 by: new.php.net
Apache2 and PHP4.2.3 - errors
118609 by: Chris Aitken
118610 by: Rasmus Lerdorf
118616 by: Ionut Ciocirlan
Looking for work
118611 by: Clint Tredway
Getting users IP address into a variable.
118612 by: Webmaster MBTRADINGCO
118613 by: Rasmus Lerdorf
118614 by: Merritt, Dave
118615 by: Jon Haworth
118617 by: Bill Farrell
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
do you mean load into the menu as in populate the menu? if so then that is
working but if u mean u click on a link then nothing comes up
> -----Original Message-----
> From: Rebekah Garner [mailto:rebekah
powergothgirls.com]
> Sent: Wednesday, 2 October 2002 2:15 PM
> To: php-general
lists.php.net
> Subject: [PHP] PHP and Flash
>
>
> Okay, this may be a bit off topic, BUT we just finished a website
> using PHP, MySql and Flash....well, I need someone...anyone to
> check out this URL for me and click on the Stallions menu, and
> tell me if anything loads into the text field. The client swears
> that it isn't, but it is dammit. Or is it?
>
> http://www.overbrookfarm.myiglou.com/
>
> Rebekah Garner
>
attached mail follows:
am assuming tis up the top ( it loads other menu names) and the white space
down the bottom. but either way it don't
> -----Original Message-----
> From: Justin French [mailto:justin
indent.com.au]
> Sent: Wednesday, 2 October 2002 2:29 PM
> To: Rebekah Garner; php-general
lists.php.net
> Subject: Re: [PHP] PHP and Flash
>
>
> What f'n text field?
>
> Justin
>
>
> on 02/10/02 2:15 PM, Rebekah Garner (rebekah
powergothgirls.com) wrote:
>
> > Okay, this may be a bit off topic, BUT we just finished a
> website using PHP,
> > MySql and Flash....well, I need someone...anyone to check out
> this URL for me
> > and click on the Stallions menu, and tell me if anything loads
> into the text
> > field. The client swears that it isn't, but it is dammit. Or is it?
> >
> > http://www.overbrookfarm.myiglou.com/
> >
> > Rebekah Garner
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Works fine for me...
IE 6.023
Flash 6.0
if I click on 'stallions' I get a list of the stallions with pics.
If I choose a horse from the dropdown menu, I get a picture of a horse with
a flash textbox full of details. Not all of them do this though - some are
missing info and pics - I'm assuming it's still in dev.
Netscape 6.2.3 works as well. Mozilla loads the horse, but doesn't load the
textbox for some reason.
Best Regards
Bob Irwin
Server Admin & Web Programmer
Planet Netcom
----- Original Message -----
From: "Peter Houchin" <php
vfsa.com.au>
To: "Rebekah Garner" <rebekah
powergothgirls.com>;
<php-general
lists.php.net>
Sent: Wednesday, October 02, 2002 2:59 PM
Subject: RE: [PHP] PHP and Flash
>
> do you mean load into the menu as in populate the menu? if so then that is
> working but if u mean u click on a link then nothing comes up
>
>
> > -----Original Message-----
> > From: Rebekah Garner [mailto:rebekah
powergothgirls.com]
> > Sent: Wednesday, 2 October 2002 2:15 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] PHP and Flash
> >
> >
> > Okay, this may be a bit off topic, BUT we just finished a website
> > using PHP, MySql and Flash....well, I need someone...anyone to
> > check out this URL for me and click on the Stallions menu, and
> > tell me if anything loads into the text field. The client swears
> > that it isn't, but it is dammit. Or is it?
> >
> > http://www.overbrookfarm.myiglou.com/
> >
> > Rebekah Garner
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
>
> Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
>
attached mail follows:
> From: "Rebekah Garner" <rebekah
powergothgirls.com>
>
> Okay, this may be a bit off topic, BUT we just finished a website using PHP,
> MySql and Flash....well, I need someone...anyone to check out this URL for me
> and click on the Stallions menu, and tell me if anything loads into the text
> field. The client swears that it isn't, but it is dammit. Or is it?
>
> http://www.overbrookfarm.myiglou.com/
>
Works fine for me in Mac OS 9.2, both Mozilla 1.0 and IE 5.1, Flash player
6. But with Mac OS 9, IE 5.1 and Flash player 5, I get a blank page.
-- Lowell Allen
attached mail follows:
Not sure where you mean by 'into the text field' but I see a drop down menu with a photo loaded underneath and then underneath that further menus with more pics of horses.
Debbie
----- Original Message -----
From: "Lowell Allen" <la
lowellallen.com>
To: "PHP" <php-general
lists.php.net>
Sent: Wednesday, October 02, 2002 12:40 PM
Subject: Re: [PHP] PHP and Flash
> > From: "Rebekah Garner" <rebekah
powergothgirls.com>
> >
> > Okay, this may be a bit off topic, BUT we just finished a website using
PHP,
> > MySql and Flash....well, I need someone...anyone to check out this URL
for me
> > and click on the Stallions menu, and tell me if anything loads into the
text
> > field. The client swears that it isn't, but it is dammit. Or is it?
> >
> > http://www.overbrookfarm.myiglou.com/
> >
> Works fine for me in Mac OS 9.2, both Mozilla 1.0 and IE 5.1, Flash player
> 6. But with Mac OS 9, IE 5.1 and Flash player 5, I get a blank page.
>
> --
> Lowell Allen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hello,
On 10/02/2002 01:15 AM, Khalid El-Kary wrote: > hi, > i have developped an XML parser that's easy to use and very fast, and i > have run two websites using it. > > http://creaturesx.ma.cx > http://creaturesx.ma.cx/osman/jokes/index.php (not complete website) > > the question comes now what's best way to contribute this parser to the > PHP community without losing my ownership rights?
If your parse is based on an object oriented PHP class, you may want to contribute it to the PHPClasses site: http://www.phpclasses.org/
You can upload it and maintain it later when you make any improvements of bug fixes. Nobody will be able to mess with your code, the copyright remains your and the software license is up to you to decide.
When your class is approved for publication, the subscribers of the site receive a message letting them know about it. If they find it interesting, they will go on the site and download it. If they see any problems or want to make any improvement suggestions, eventually you will receive plenty of feedback.
If your class becomes popular, the class and your name will feature in the top charts.
--Regards, Manuel Lemos
attached mail follows:
I'm running PWS on WinXP Pro. I can't test my php stuffs in Netscape cause it says Access Denied when I try to access any php file. They work fine in IE6.
Any ideas?
attached mail follows:
This seems absolutely impossible. Can you verify that you are using the *exact* same URL with each browser? I would recommend copy/pasting the URL from each into a text document or something to be sure every slash, etc., is identical.
This will also ensure that you are accessing these scripts via the http:// scheme rather than the file:// scheme.
Chris
Chris Nielsen wrote:
>I'm running PWS on WinXP Pro. I can't test my php stuffs in Netscape cause >it says Access Denied when I try to access any php file. They work fine in >IE6. >
attached mail follows:
It's not impossible if the site is not opened up to full public access, and he is using different proxy settings on each browser.
Check those.
-----Original Message-----
From: Chris Shiflett [mailto:shiflett
php.net]
Sent: Wednesday, 2 October 2002 4:23 PM
To: Chris Nielsen
Cc: php-general
lists.php.net
Subject: Re: [PHP] Access denied to php files in Netscape 6
This seems absolutely impossible. Can you verify that you are using the *exact* same URL with each browser? I would recommend copy/pasting the URL from each into a text document or something to be sure every slash, etc., is identical.
This will also ensure that you are accessing these scripts via the http:// scheme rather than the file:// scheme.
Chris
Chris Nielsen wrote:
>I'm running PWS on WinXP Pro. I can't test my php stuffs in Netscape cause >it says Access Denied when I try to access any php file. They work fine in >IE6. >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I have a single php file that I want to do some different things (only one at a time, based on a conditional):
display a form to the user for input submit information from (above) form to database list information in database (that has been INSERTed by the above)
I want this file to be able to call itself using the following code:
$input = $_SERVER['PHP_SELF']."?action=INPUT"; $list = $_SERVER['PHP_SELF']."?action=LIST"; print '<a href="'.$input.'">Input a new user</a><br>'; print '<a href="'.$list.'">List all users</a>';
but I want to submit the action value as a POST rather than a GET. I then have conditionals around each of my modules that check $_POST['action'] for one of three values and only print that module if that's the action I need the file to perform.
Basically I'm trying to figure out how to lump this all into one file. Obviously I could split it into three files that do each of the desired actions, but I would then also have to have a fourth file which provides a front end into it, which I don't want to do and is what got me started down this path.
How can I submit POST information to a php file without using an HTML form?
TIA.
attached mail follows:
from the client end, you can't from the server end, you can use curl. HTH Martin
-----Original Message-----
From: Chris Nielsen [mailto:cnielsen
newdawntech.com]
Sent: Wednesday, October 02, 2002 3:09 PM
To: php-general
lists.php.net
Subject: [PHP] How to send POST info without a form?
I have a single php file that I want to do some different things (only one at a time, based on a conditional):
display a form to the user for input submit information from (above) form to database list information in database (that has been INSERTed by the above)
I want this file to be able to call itself using the following code:
$input = $_SERVER['PHP_SELF']."?action=INPUT"; $list = $_SERVER['PHP_SELF']."?action=LIST"; print '<a href="'.$input.'">Input a new user</a><br>'; print '<a href="'.$list.'">List all users</a>';
but I want to submit the action value as a POST rather than a GET. I then have conditionals around each of my modules that check $_POST['action'] for one of three values and only print that module if that's the action I need the file to perform.
Basically I'm trying to figure out how to lump this all into one file. Obviously I could split it into three files that do each of the desired actions, but I would then also have to have a fourth file which provides a front end into it, which I don't want to do and is what got me started down this path.
How can I submit POST information to a php file without using an HTML form?
TIA.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
try www.sloppycode.net
* ゥ Sloppycode.net All rights reserved.
*
title Html Source class - api for getting/posting to websites
*
author C.Small
*
version 1.0
or phpclasses.org
Elias,
"Chris Nielsen" <cnielsen
newdawntech.com> wrote in message
news:20021002050851.90480.qmail
pb1.pair.com...
> I have a single php file that I want to do some different things (only one
> at a time, based on a conditional):
>
> display a form to the user for input
> submit information from (above) form to database
> list information in database (that has been INSERTed by the above)
>
> I want this file to be able to call itself using the following code:
>
> $input = $_SERVER['PHP_SELF']."?action=INPUT";
> $list = $_SERVER['PHP_SELF']."?action=LIST";
> print '<a href="'.$input.'">Input a new user</a><br>';
> print '<a href="'.$list.'">List all users</a>';
>
> but I want to submit the action value as a POST rather than a GET. I then
> have conditionals around each of my modules that check $_POST['action']
for
> one of three values and only print that module if that's the action I need
> the file to perform.
>
> Basically I'm trying to figure out how to lump this all into one file.
> Obviously I could split it into three files that do each of the desired
> actions, but I would then also have to have a fourth file which provides a
> front end into it, which I don't want to do and is what got me started
down
> this path.
>
> How can I submit POST information to a php file without using an HTML
form?
>
> TIA.
>
>
attached mail follows:
Hi
Snoopy can do this too:
http://sourceforge.net/projects/snoopy/
Regards
Girish
-- www.girishnath.co.uk"Lallous" <phplist
lgwm.org> wrote in message news:20021002054800.15498.qmail
pb1.pair.com... > try www.sloppycode.net > > * ゥ Sloppycode.net All rights reserved. > *
title Html Source class - api for getting/posting to websites > *
author C.Small > *
version 1.0 > > or phpclasses.org > > Elias, > > "Chris Nielsen" <cnielsen
newdawntech.com> wrote in message > news:20021002050851.90480.qmail
pb1.pair.com... > > I have a single php file that I want to do some different things (only one > > at a time, based on a conditional): > > > > display a form to the user for input > > submit information from (above) form to database > > list information in database (that has been INSERTed by the above) > > > > I want this file to be able to call itself using the following code: > > > > $input = $_SERVER['PHP_SELF']."?action=INPUT"; > > $list = $_SERVER['PHP_SELF']."?action=LIST"; > > print '<a href="'.$input.'">Input a new user</a><br>'; > > print '<a href="'.$list.'">List all users</a>'; > > > > but I want to submit the action value as a POST rather than a GET. I then > > have conditionals around each of my modules that check $_POST['action'] > for > > one of three values and only print that module if that's the action I need > > the file to perform. > > > > Basically I'm trying to figure out how to lump this all into one file. > > Obviously I could split it into three files that do each of the desired > > actions, but I would then also have to have a fourth file which provides a > > front end into it, which I don't want to do and is what got me started > down > > this path. > > > > How can I submit POST information to a php file without using an HTML > form? > > > > TIA. > > > > > >
attached mail follows:
[snip] from the client end, you can't from the server end, you can use curl.
...
but I want to submit the action value as a POST rather than a GET. I then have conditionals around each of my modules that check $_POST['action'] for one of three values and only print that module if that's the action I need the file to perform.
Basically I'm trying to figure out how to lump this all into one file. Obviously I could split it into three files that do each of the desired actions, but I would then also have to have a fourth file which provides a front end into it, which I don't want to do and is what got me started down this path.
How can I submit POST information to a php file without using an HTML form? [/snip]
http://www.faqts.com/knowledge_base/view.phtml/aid/12039/fid/51
HTH!
Jay
attached mail follows:
hi, you can make a hidden form l like this
<form style="visibilty:hidden;position:absolute;top:0px;left:0px;" action="yourpage.php" method="post" id="myform"> .. form fields </form>
//in javascript you can use this myform.submit()
and your form will be submited
khalid
_________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
attached mail follows:
Thanks for that Robert *it works*, now i have 1 more problem, after uploading to my web server i get this... Warning: fopen("wtest.txt", "wb+") - Permission denied in /home/canberra/public_html/bomonster/canberra.php on line 6
Dunno why either, the directory is not protected, can you help me with that one?
-- Cheers --------------------------------------------------------- Simon Angell Canberra ACT www.canberra-wx.com --------------------------------------------------------- Member of: Australian Severe Weather Association. www.severeweather.asn.au --------------------------------------------------------- This email is virus free. Scanned before leaving my mailbox using Norton Antivirus 2002 for Win2k Scanned with the latest definition File."Robert Cummings" <robert.cummings
webmotion.com> wrote in message news:3D99E2DF.2F7BBFC5
webmotion.com... > Windows makes me cry... this will fix the problem... > > Change: $rContents = implode( "\n", file( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > To: $rContents = implode( "\r\n", file( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > If that doesn't work: > > To: $rContents = implode( "\n\r", file( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > I can never remember the order :) > > Cheers, > Rob. > > Simon Angell wrote: > > > > i removed a / and it worked :) > > <?php > > $rContents = implode( "\n", file( > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > > > if( ($fp = fopen( 'test/canberratest.txt', 'w+' )) !== false ) > > { > > fputs( $fp, $rContents ); > > fclose( $fp ); > > } > > ?> > > > > Now the format of the content is no longer, can this be fixed? > > This is how it is originally. > > IDN10035 > > BUREAU OF METEOROLOGY > > CANBERRA METEOROLOGICAL OFFICE > > FORECAST FOR THE ACT > > Issued at 3:34pm on Tuesday the 1st of October 2002 > > > > SITUATION: > > > > AND this is how the text file writes > > IDN10035BUREAU OF METEOROLOGYCANBERRA METEOROLOGICAL OFFICEFORECAST FOR THE > > ACTIssued at 3:34pm on Tuesday the 1st of October 2002SITUATION: > > > > with all through it where a new line is suppose to be. > > > > Can this be fixed, or will i just need to work around it? > > -- > > Cheers > > --------------------------------------------------------- > > Simon Angell > > Canberra ACT > > www.canberra-wx.com > > --------------------------------------------------------- > > Member of: > > Australian Severe Weather Association. > > www.severeweather.asn.au > > --------------------------------------------------------- > > This email is virus free. > > Scanned before leaving my mailbox > > using Norton Antivirus 2002 for Win2k > > Scanned with the latest definition File. > > > > "Simon Angell" <seangell
iprimus.com.au> wrote in message > > news:20021001171322.85344.qmail
pb1.pair.com... > > > i tried that ine and got this... > > > Warning: fopen("/test/canberra.txt", "w+") - No such file or directory in > > > C:\Xitami\webpages\bomonster\test2.php on line 4 > > > > > > code.. > > > <?php > > > $rContents = implode( "\n", file( > > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > > > > > if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false ) > > > { > > > fputs( $fp, $rContents ); > > > fclose( $fp ); > > > } > > > ?> > > > > > > I think i know what the probelm is. > > > .if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false ) > > > should be > > > if( ($fp = fopen( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' , > > > 'w+' )) !== false ) > > > > > > But, where do i put the file name and directory to write? > > > > > > -- > > > Cheers > > > --------------------------------------------------------- > > > Simon Angell > > > Canberra ACT > > > www.canberra-wx.com > > > --------------------------------------------------------- > > > Member of: > > > Australian Severe Weather Association. > > > www.severeweather.asn.au > > > --------------------------------------------------------- > > > This email is virus free. > > > Scanned before leaving my mailbox > > > using Norton Antivirus 2002 for Win2k > > > Scanned with the latest definition File. > > > > > > "Robert Cummings" <robert.cummings
webmotion.com> wrote in message > > > news:3D99C5B5.182CE6F6
webmotion.com... > > > > Simon Angell wrote: > > > > > > > > > > Hi everyone. > > > > > I asked this a week or so ago but i am unsure if it got to the list, > > so > > > here > > > > > we go again. > > > > > > > > > > I am trying to get a remote file to be copied onto my own web server, > > I > > > have > > > > > looked at fopen() and fread() and fwrite() and get the general idea of > > > each, > > > > > but im wondering how to join the commandes to get the file i want from > > > the > > > > > remote ftp server, copied and written onto my own server. > > > > > > > > Something like the following might work (not tested AT ALL): > > > > > > > > $rContents = implode( "\n", file( > > 'ftp://www.foo.bar/me/my/data.txt' ) ); > > > > > > > > if( ($fp = fopen( '/tmp/myFile.txt', 'w+' )) !== false ) > > > > { > > > > fputs( $fp, $rContents ); > > > > fclose( $fp ); > > > > } > > -- > .-----------------. > | Robert Cummings | > :-----------------`----------------------------. > | Webdeployer - Chief PHP and Java Programmer | > :----------------------------------------------: > | Mail : mailto:robert.cummings
webmotion.com | > | Phone : (613) 731-4046 x.109 | > :----------------------------------------------: > | Website : http://www.webmotion.com | > | Fax : (613) 260-9545 | > `----------------------------------------------'
attached mail follows:
Simon Angell wrote: > > Thanks for that Robert *it works*, now i have 1 more problem, after > uploading to my web server i get this... > Warning: fopen("wtest.txt", "wb+") - Permission denied in > /home/canberra/public_html/bomonster/canberra.php on line 6 > > Dunno why either, the directory is not protected, can you help me with that > one?
What are the permissions and ownerships? Do these ownerships and permissions match up with the webserver versus your own ownership?
Cheers, Rob.
>
> --
> Cheers
> ---------------------------------------------------------
> Simon Angell
> Canberra ACT
> www.canberra-wx.com
> ---------------------------------------------------------
> Member of:
> Australian Severe Weather Association.
> www.severeweather.asn.au
> ---------------------------------------------------------
> This email is virus free.
> Scanned before leaving my mailbox
> using Norton Antivirus 2002 for Win2k
> Scanned with the latest definition File.
>
> "Robert Cummings" <robert.cummings
webmotion.com> wrote in message
> news:3D99E2DF.2F7BBFC5
webmotion.com...
> > Windows makes me cry... this will fix the problem...
> >
> > Change: $rContents = implode( "\n", file(
> 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
> > To: $rContents = implode( "\r\n", file(
> 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
> >
> > If that doesn't work:
> >
> > To: $rContents = implode( "\n\r", file(
> 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
> >
> > I can never remember the order :)
> >
> > Cheers,
> > Rob.
> >
> > Simon Angell wrote:
> > >
> > > i removed a / and it worked :)
> > > <?php
> > > $rContents = implode( "\n", file(
> > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
> > >
> > > if( ($fp = fopen( 'test/canberratest.txt', 'w+' )) !== false )
> > > {
> > > fputs( $fp, $rContents );
> > > fclose( $fp );
> > > }
> > > ?>
> > >
> > > Now the format of the content is no longer, can this be fixed?
> > > This is how it is originally.
> > > IDN10035
> > > BUREAU OF METEOROLOGY
> > > CANBERRA METEOROLOGICAL OFFICE
> > > FORECAST FOR THE ACT
> > > Issued at 3:34pm on Tuesday the 1st of October 2002
> > >
> > > SITUATION:
> > >
> > > AND this is how the text file writes
> > > IDN10035BUREAU OF METEOROLOGYCANBERRA METEOROLOGICAL OFFICEFORECAST FOR
> THE
> > > ACTIssued at 3:34pm on Tuesday the 1st of October 2002SITUATION:
> > >
> > > with all through it where a new line is suppose to be.
> > >
> > > Can this be fixed, or will i just need to work around it?
> > > --
> > > Cheers
> > > ---------------------------------------------------------
> > > Simon Angell
> > > Canberra ACT
> > > www.canberra-wx.com
> > > ---------------------------------------------------------
> > > Member of:
> > > Australian Severe Weather Association.
> > > www.severeweather.asn.au
> > > ---------------------------------------------------------
> > > This email is virus free.
> > > Scanned before leaving my mailbox
> > > using Norton Antivirus 2002 for Win2k
> > > Scanned with the latest definition File.
> > >
> > > "Simon Angell" <seangell
iprimus.com.au> wrote in message
> > > news:20021001171322.85344.qmail
pb1.pair.com...
> > > > i tried that ine and got this...
> > > > Warning: fopen("/test/canberra.txt", "w+") - No such file or directory
> in
> > > > C:\Xitami\webpages\bomonster\test2.php on line 4
> > > >
> > > > code..
> > > > <?php
> > > > $rContents = implode( "\n", file(
> > > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
> > > >
> > > > if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
> > > > {
> > > > fputs( $fp, $rContents );
> > > > fclose( $fp );
> > > > }
> > > > ?>
> > > >
> > > > I think i know what the probelm is.
> > > > .if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false )
> > > > should be
> > > > if( ($fp = fopen( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ,
> > > > 'w+' )) !== false )
> > > >
> > > > But, where do i put the file name and directory to write?
> > > >
> > > > --
> > > > Cheers
> > > > ---------------------------------------------------------
> > > > Simon Angell
> > > > Canberra ACT
> > > > www.canberra-wx.com
> > > > ---------------------------------------------------------
> > > > Member of:
> > > > Australian Severe Weather Association.
> > > > www.severeweather.asn.au
> > > > ---------------------------------------------------------
> > > > This email is virus free.
> > > > Scanned before leaving my mailbox
> > > > using Norton Antivirus 2002 for Win2k
> > > > Scanned with the latest definition File.
> > > >
> > > > "Robert Cummings" <robert.cummings
webmotion.com> wrote in message
> > > > news:3D99C5B5.182CE6F6
webmotion.com...
> > > > > Simon Angell wrote:
> > > > > >
> > > > > > Hi everyone.
> > > > > > I asked this a week or so ago but i am unsure if it got to the
> list,
> > > so
> > > > here
> > > > > > we go again.
> > > > > >
> > > > > > I am trying to get a remote file to be copied onto my own web
> server,
> > > I
> > > > have
> > > > > > looked at fopen() and fread() and fwrite() and get the general
> idea of
> > > > each,
> > > > > > but im wondering how to join the commandes to get the file i want
> from
> > > > the
> > > > > > remote ftp server, copied and written onto my own server.
> > > > >
> > > > > Something like the following might work (not tested AT ALL):
> > > > >
> > > > > $rContents = implode( "\n", file(
> > > 'ftp://www.foo.bar/me/my/data.txt' ) );
> > > > >
> > > > > if( ($fp = fopen( '/tmp/myFile.txt', 'w+' )) !== false )
> > > > > {
> > > > > fputs( $fp, $rContents );
> > > > > fclose( $fp );
> > > > > }
> >
> > --
> > .-----------------.
> > | Robert Cummings |
> > :-----------------`----------------------------.
> > | Webdeployer - Chief PHP and Java Programmer |
> > :----------------------------------------------:
> > | Mail : mailto:robert.cummings
webmotion.com |
> > | Phone : (613) 731-4046 x.109 |
> > :----------------------------------------------:
> > | Website : http://www.webmotion.com |
> > | Fax : (613) 260-9545 |
> > `----------------------------------------------'
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
-- .-----------------. | Robert Cummings | :-----------------`----------------------------. | Webdeployer - Chief PHP and Java Programmer | :----------------------------------------------: | Mail : mailto:robert.cummingswebmotion.com | | Phone : (613) 731-4046 x.109 | :----------------------------------------------: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `----------------------------------------------'
attached mail follows:
I am the webmaster of the site, i pay for the server space, is that what you mean?
-- Cheers --------------------------------------------------------- Simon Angell Canberra ACT www.canberra-wx.com --------------------------------------------------------- Member of: Australian Severe Weather Association. www.severeweather.asn.au --------------------------------------------------------- This email is virus free. Scanned before leaving my mailbox using Norton Antivirus 2002 for Win2k Scanned with the latest definition File."Robert Cummings" <robert.cummings
webmotion.com> wrote in message news:3D9AFAA0.4EC2C2DF
webmotion.com... > Simon Angell wrote: > > > > Thanks for that Robert *it works*, now i have 1 more problem, after > > uploading to my web server i get this... > > Warning: fopen("wtest.txt", "wb+") - Permission denied in > > /home/canberra/public_html/bomonster/canberra.php on line 6 > > > > Dunno why either, the directory is not protected, can you help me with that > > one? > > What are the permissions and ownerships? Do these ownerships and > permissions match up with the webserver versus your own ownership? > > Cheers, > Rob. > > > > > -- > > Cheers > > --------------------------------------------------------- > > Simon Angell > > Canberra ACT > > www.canberra-wx.com > > --------------------------------------------------------- > > Member of: > > Australian Severe Weather Association. > > www.severeweather.asn.au > > --------------------------------------------------------- > > This email is virus free. > > Scanned before leaving my mailbox > > using Norton Antivirus 2002 for Win2k > > Scanned with the latest definition File. > > > > "Robert Cummings" <robert.cummings
webmotion.com> wrote in message > > news:3D99E2DF.2F7BBFC5
webmotion.com... > > > Windows makes me cry... this will fix the problem... > > > > > > Change: $rContents = implode( "\n", file( > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > > To: $rContents = implode( "\r\n", file( > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > > > > > If that doesn't work: > > > > > > To: $rContents = implode( "\n\r", file( > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > > > > > I can never remember the order :) > > > > > > Cheers, > > > Rob. > > > > > > Simon Angell wrote: > > > > > > > > i removed a / and it worked :) > > > > <?php > > > > $rContents = implode( "\n", file( > > > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > > > > > > > if( ($fp = fopen( 'test/canberratest.txt', 'w+' )) !== false ) > > > > { > > > > fputs( $fp, $rContents ); > > > > fclose( $fp ); > > > > } > > > > ?> > > > > > > > > Now the format of the content is no longer, can this be fixed? > > > > This is how it is originally. > > > > IDN10035 > > > > BUREAU OF METEOROLOGY > > > > CANBERRA METEOROLOGICAL OFFICE > > > > FORECAST FOR THE ACT > > > > Issued at 3:34pm on Tuesday the 1st of October 2002 > > > > > > > > SITUATION: > > > > > > > > AND this is how the text file writes > > > > IDN10035BUREAU OF METEOROLOGYCANBERRA METEOROLOGICAL OFFICEFORECAST FOR > > THE > > > > ACTIssued at 3:34pm on Tuesday the 1st of October 2002SITUATION: > > > > > > > > with all through it where a new line is suppose to be. > > > > > > > > Can this be fixed, or will i just need to work around it? > > > > -- > > > > Cheers > > > > --------------------------------------------------------- > > > > Simon Angell > > > > Canberra ACT > > > > www.canberra-wx.com > > > > --------------------------------------------------------- > > > > Member of: > > > > Australian Severe Weather Association. > > > > www.severeweather.asn.au > > > > --------------------------------------------------------- > > > > This email is virus free. > > > > Scanned before leaving my mailbox > > > > using Norton Antivirus 2002 for Win2k > > > > Scanned with the latest definition File. > > > > > > > > "Simon Angell" <seangell
iprimus.com.au> wrote in message > > > > news:20021001171322.85344.qmail
pb1.pair.com... > > > > > i tried that ine and got this... > > > > > Warning: fopen("/test/canberra.txt", "w+") - No such file or directory > > in > > > > > C:\Xitami\webpages\bomonster\test2.php on line 4 > > > > > > > > > > code.. > > > > > <?php > > > > > $rContents = implode( "\n", file( > > > > > 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) ); > > > > > > > > > > if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false ) > > > > > { > > > > > fputs( $fp, $rContents ); > > > > > fclose( $fp ); > > > > > } > > > > > ?> > > > > > > > > > > I think i know what the probelm is. > > > > > .if( ($fp = fopen( '/test/canberra.txt', 'w+' )) !== false ) > > > > > should be > > > > > if( ($fp = fopen( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' , > > > > > 'w+' )) !== false ) > > > > > > > > > > But, where do i put the file name and directory to write? > > > > > > > > > > -- > > > > > Cheers > > > > > --------------------------------------------------------- > > > > > Simon Angell > > > > > Canberra ACT > > > > > www.canberra-wx.com > > > > > --------------------------------------------------------- > > > > > Member of: > > > > > Australian Severe Weather Association. > > > > > www.severeweather.asn.au > > > > > --------------------------------------------------------- > > > > > This email is virus free. > > > > > Scanned before leaving my mailbox > > > > > using Norton Antivirus 2002 for Win2k > > > > > Scanned with the latest definition File. > > > > > > > > > > "Robert Cummings" <robert.cummings
webmotion.com> wrote in message > > > > > news:3D99C5B5.182CE6F6
webmotion.com... > > > > > > Simon Angell wrote: > > > > > > > > > > > > > > Hi everyone. > > > > > > > I asked this a week or so ago but i am unsure if it got to the > > list, > > > > so > > > > > here > > > > > > > we go again. > > > > > > > > > > > > > > I am trying to get a remote file to be copied onto my own web > > server, > > > > I > > > > > have > > > > > > > looked at fopen() and fread() and fwrite() and get the general > > idea of > > > > > each, > > > > > > > but im wondering how to join the commandes to get the file i want > > from > > > > > the > > > > > > > remote ftp server, copied and written onto my own server. > > > > > > > > > > > > Something like the following might work (not tested AT ALL): > > > > > > > > > > > > $rContents = implode( "\n", file( > > > > 'ftp://www.foo.bar/me/my/data.txt' ) ); > > > > > > > > > > > > if( ($fp = fopen( '/tmp/myFile.txt', 'w+' )) !== false ) > > > > > > { > > > > > > fputs( $fp, $rContents ); > > > > > > fclose( $fp ); > > > > > > } > > > > > > -- > > > .-----------------. > > > | Robert Cummings | > > > :-----------------`----------------------------. > > > | Webdeployer - Chief PHP and Java Programmer | > > > :----------------------------------------------: > > > | Mail : mailto:robert.cummings
webmotion.com | > > > | Phone : (613) 731-4046 x.109 | > > > :----------------------------------------------: > > > | Website : http://www.webmotion.com | > > > | Fax : (613) 260-9545 | > > > `----------------------------------------------' > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > .-----------------. > | Robert Cummings | > :-----------------`----------------------------. > | Webdeployer - Chief PHP and Java Programmer | > :----------------------------------------------: > | Mail : mailto:robert.cummings
webmotion.com | > | Phone : (613) 731-4046 x.109 | > :----------------------------------------------: > | Website : http://www.webmotion.com | > | Fax : (613) 260-9545 | > `----------------------------------------------'
attached mail follows:
No i mean switch to the directory in which you have th file with the code and type 'ls -al' Then look at the permissions and ownerships. Don't forget the web server runs with different permissions thatn you do at home.
Cheers, Rob.
Simon Angell wrote:
>
> I am the webmaster of the site, i pay for the server space, is that what you
> mean?
>
> --
> Cheers
> ---------------------------------------------------------
> Simon Angell
> Canberra ACT
> www.canberra-wx.com
> ---------------------------------------------------------
> Member of:
> Australian Severe Weather Association.
> www.severeweather.asn.au
> ---------------------------------------------------------
> This email is virus free.
> Scanned before leaving my mailbox
> using Norton Antivirus 2002 for Win2k
> Scanned with the latest definition File.
>
> "Robert Cummings" <robert.cummings
webmotion.com> wrote in message
> news:3D9AFAA0.4EC2C2DF
webmotion.com...
> > Simon Angell wrote:
> > >
> > > Thanks for that Robert *it works*, now i have 1 more problem, after
> > > uploading to my web server i get this...
> > > Warning: fopen("wtest.txt", "wb+") - Permission denied in
> > > /home/canberra/public_html/bomonster/canberra.php on line 6
> > >
> > > Dunno why either, the directory is not protected, can you help me with
> that
> > > one?
> >
> > What are the permissions and ownerships? Do these ownerships and
> > permissions match up with the webserver versus your own ownership?
> >
> > Cheers,
> > Rob.
-- .-----------------. | Robert Cummings | :-----------------`----------------------------. | Webdeployer - Chief PHP and Java Programmer | :----------------------------------------------: | Mail : mailto:robert.cummingswebmotion.com | | Phone : (613) 731-4046 x.109 | :----------------------------------------------: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `----------------------------------------------'
attached mail follows:
i am unsure what you mean, where exactly do it type in 'ls -al' ?
-- Cheers --------------------------------------------------------- Simon Angell Canberra ACT www.canberra-wx.com --------------------------------------------------------- Member of: Australian Severe Weather Association. www.severeweather.asn.au --------------------------------------------------------- This email is virus free. Scanned before leaving my mailbox using Norton Antivirus 2002 for Win2k Scanned with the latest definition File."Robert Cummings" <robert.cummings
webmotion.com> wrote in message news:3D9AFDC0.D762B32B
webmotion.com... > No i mean switch to the directory in which you have th file with the code > and type 'ls -al' Then look at the permissions and ownerships. Don't forget > the web server runs with different permissions thatn you do at home. > > Cheers, > Rob. > > Simon Angell wrote: > > > > I am the webmaster of the site, i pay for the server space, is that what you > > mean? > > > > -- > > Cheers > > --------------------------------------------------------- > > Simon Angell > > Canberra ACT > > www.canberra-wx.com > > --------------------------------------------------------- > > Member of: > > Australian Severe Weather Association. > > www.severeweather.asn.au > > --------------------------------------------------------- > > This email is virus free. > > Scanned before leaving my mailbox > > using Norton Antivirus 2002 for Win2k > > Scanned with the latest definition File. > > > > "Robert Cummings" <robert.cummings
webmotion.com> wrote in message > > news:3D9AFAA0.4EC2C2DF
webmotion.com... > > > Simon Angell wrote: > > > > > > > > Thanks for that Robert *it works*, now i have 1 more problem, after > > > > uploading to my web server i get this... > > > > Warning: fopen("wtest.txt", "wb+") - Permission denied in > > > > /home/canberra/public_html/bomonster/canberra.php on line 6 > > > > > > > > Dunno why either, the directory is not protected, can you help me with > > that > > > > one? > > > > > > What are the permissions and ownerships? Do these ownerships and > > > permissions match up with the webserver versus your own ownership? > > > > > > Cheers, > > > Rob. > > -- > .-----------------. > | Robert Cummings | > :-----------------`----------------------------. > | Webdeployer - Chief PHP and Java Programmer | > :----------------------------------------------: > | Mail : mailto:robert.cummings
webmotion.com | > | Phone : (613) 731-4046 x.109 | > :----------------------------------------------: > | Website : http://www.webmotion.com | > | Fax : (613) 260-9545 | > `----------------------------------------------'
attached mail follows:
> Environment: PHP 4.2.3/IIS/Win2k Server > > I tried to enable the PHP_MSSQL.dll module, but got the above error. > Does anyone know what is causing this? > > I've tried sharing (web sharing) the folders, and looked around the server > configuration...I found nothing that would explain this. > > Please help. > -john
Does the IIS user IUSR_<computer_name> have access to the .dll file? Can it read it? That may be the issue.
---John Holmes...
attached mail follows:
> I've been wondering about developing scripts that the end-user might run > on > php < 4.1.0. I've heard allot of ways except for one that I recently > thought > of. > How about using: > - ---- > if(!isset($_GET)) { global $HTTP_GET_VARS; $_GET = &$HTTP_GET_VARS; } > - ---- > ? That allows you to use $_GET as if you were using the new versions and > it > only requires one line....and doesn't depend on the new versions to have > $HTTP_*_VARS. It also works for the other vars(POST, SESSION, etc).
Except the $_GET that you would create with older version would not be superglobal. You would have to make it global in each function if it's used within it.
---John Holmes...
attached mail follows:
> -----Original Message-----
> From: Paul Nicholson [mailto:paul
dtnicholson.com]
> Sent: 02 October 2002 02:11
>
> Hey gang,
> I've been wondering about developing scripts that the
> end-user might run on
> php < 4.1.0. I've heard allot of ways except for one that I
> recently thought
> of.
> How about using:
> - ----
> if(!isset($_GET)) { global $HTTP_GET_VARS; $_GET = &$HTTP_GET_VARS; }
> - ----
> ? That allows you to use $_GET as if you were using the new
> versions and it
> only requires one line....and doesn't depend on the new
> versions to have
> $HTTP_*_VARS. It also works for the other vars(POST, SESSION, etc).
I think this is going the wrong way about it -- the $HTTP_*_VARS arrays may be deprecated, but the PHP developers have confirmed that they are not going to disappear any time soon, so for code that has to work regardless of register_globals setting and existence or not of superglobals, I'd stick with those.
(And, as already pointed out, the $_* arrays you create in this way are *not* superglobals, and so would need to be globalled in every function which references them, just like the $HTTP_*_VARS arrays -- so the only saving is maybe a few characters less to type, but with the addition of much potential for confusion.)
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
yeah, at the top of each function....where you would normally put "global $HTTP_GET_VARS;" The created $_GET is not a superglobal so its scope is only in the function its defined in or if you define it in the global namespace you'd have to "global $_GET;" inside of your function & I'm sure that'll conflict with the superglobals on newer versions.
On Wednesday 02 October 2002 12:13 am, Sascha Cunz wrote: > At the top of each _function_? Urgs. Sounds like a hell of a lot of work. > Would be enough at the beginning of the script - or even better, creating a > dummy include for that or it might even be posibile to run it via an > .htaccess (how is this option named php_prepend or such?). > > ... > > If they can't update the PHP Version they should update the ISP :-) Well, > 4.0.6 might be a "famous" release (as you can find this very often), but > it's about 1 year old now... If ISPs don't updated, they make their own > machines vulnerable - the only conclusion (to make them learn their lesson) > can be, that customers keep on running away, ain't it? Thats if they notice the one or two clients that leave over this issue. :|
- --
~Paul Nicholson
Design Specialist
WebPower Design
"The web....the way you want it!"
paul
webpowerdesign.net
"It said uses Windows 98 or better, so I loaded Linux!" Registered Linux User #183202 using Register Linux System # 81891 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE9muqkDyXNIUN3+UQRAiHUAJ4mxVd+makwIpmvsgIYauKCPl+mhwCeMrFA z4cX5Z3+ib/hirVLc5cSHbA= =Se8t -----END PGP SIGNATURE-----
attached mail follows:
これってどうやって解読するんでしょう・・・
attached mail follows:
imagecopyresampled($dst_img,$src_img,50,0,0,0,$new_w,$new_h,imagesx($src_img ),imagesy($src_img));
i have this
basically if i half the width of the ratio scaled image , it puts the entire image into that area not just half the image like a crop would ?
"Mike Mannakee" <mike
basementideas.com> wrote in message
news:20021001170113.74610.qmail
pb1.pair.com...
> Have a look at ImageCopy in the manual.
>
> HTH
>
> Mike
>
>
> "Electroteque" <daniel
electroteque.org> wrote in message
> news:20021001103119.29896.qmail
pb1.pair.com...
> > here is a tricky question, i have created a photo gallery script where i
> can
> > edit the photo and gammacorrect the photos, at the moment i post the
gamma
> > value and refreshes the resized preview image , what i'd like to do is
be
> > able to have a before and after preview so half the image is the normal
> > image and half the image is the gamma corrected image , is this possible
?
> > any leads would be excellent
> >
> >
>
>
attached mail follows:
You want to retain ownership, AND take contributions?
Generally it'd be an either/or proposition wouldn't it?
Justin French
on 02/10/02 2:26 PM, Khalid El-Kary (khalid_kary
hotmail.com) wrote:
> hi, > i wanted to add something, i want to receive contribtions from developers as > well to make the parser be better > > > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com >
attached mail follows:
Hi,
I use : apache 1.3.26, php 4.2.3, postgresql 7.2 (under solaris 7).
I attempt to modify my old sources which run with the previous versions and I meet a problem with the cookie.
I read that we can see the contents of a cookie with 2 methods :
echo $testcookie echo $_COOKIE["testcookie"]
For me, only the second method runs.
An idea ?
In advance, thanks
mb
attached mail follows:
I'm pretty sure this is a global variables problem.
There is an option in your ini.php file that refers to 'global variables' You need to set this on, otherwise reference to them with the absolute variable name.
Best Regards
Bob Irwin
Server Admin & Web Programmer
Planet Netcom
----- Original Message -----
From: "Max Buvry" <Max.Buvry
enseeiht.fr>
To: <php-general
lists.php.net>
Sent: Wednesday, October 02, 2002 2:37 AM
Subject: [PHP] Cookie
> > > Hi, > > I use : apache 1.3.26, php 4.2.3, postgresql 7.2 (under solaris 7). > > I attempt to modify my old sources which run with the previous versions > and I meet a problem with the cookie. > > I read that we can see the contents of a cookie with 2 methods : > > echo $testcookie > echo $_COOKIE["testcookie"] > > For me, only the second method runs. > > An idea ? > > In advance, thanks > > mb > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > Scanned by PeNiCillin http://safe-t-net.pnc.com.au/ > > Scanned by PeNiCillin http://safe-t-net.pnc.com.au/ >
attached mail follows:
The register globals function must be turned ON in your php.ini for the first method to work.
-----Original Message-----
From: Max Buvry [mailto:Max.Buvry
enseeiht.fr]
Sent: Wednesday, 2 October 2002 2:38 AM
To: php-general
lists.php.net
Subject: [PHP] Cookie
Hi,
I use : apache 1.3.26, php 4.2.3, postgresql 7.2 (under solaris 7).
I attempt to modify my old sources which run with the previous versions and I meet a problem with the cookie.
I read that we can see the contents of a cookie with 2 methods :
echo $testcookie echo $_COOKIE["testcookie"]
For me, only the second method runs.
An idea ?
In advance, thanks
mb
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Thanks for your response.
The doc isn't explicit when it explains this two methods and don't focus on the register globals function for the first method.
So I use the second method only.
Thanks
mb
Bob Irwin wrote:
>
> I'm pretty sure this is a global variables problem.
>
> There is an option in your ini.php file that refers to 'global variables'
> You need to set this on, otherwise reference to them with the absolute
> variable name.
>
> Best Regards
> Bob Irwin
> Server Admin & Web Programmer
> Planet Netcom
> ----- Original Message -----
> From: "Max Buvry" <Max.Buvry
enseeiht.fr>
> To: <php-general
lists.php.net>
> Sent: Wednesday, October 02, 2002 2:37 AM
> Subject: [PHP] Cookie
>
> >
> >
> > Hi,
> >
> > I use : apache 1.3.26, php 4.2.3, postgresql 7.2 (under solaris 7).
> >
> > I attempt to modify my old sources which run with the previous versions
> > and I meet a problem with the cookie.
> >
> > I read that we can see the contents of a cookie with 2 methods :
> >
> > echo $testcookie
> > echo $_COOKIE["testcookie"]
> >
> > For me, only the second method runs.
> >
> > An idea ?
> >
> > In advance, thanks
> >
> > mb
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
> >
> > Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
> >
attached mail follows:
Hi Dan
I (and others I know) have similar probs of seemingly disappearing emails - I thought it was down to mail filtering because I cant think of another explanation (but I dont know that for sure). I was given some advice here yesterday so I am forwarding you the mails.
Debbie
----- Original Message -----
From: "Dan McCullough" <McWC
rocketmail.com>
To: <php-general
lists.php.net>
Sent: Wednesday, October 02, 2002 12:46 AM
Subject: [PHP] mail function problems
> I use the mail function tons, never had a problem. I am working with a client with a different > hosting vendor, they are using PHP 4.2.3, which I guess was a recient upgrade, anyway I was > informed by the client that he wasnt getting email submissions from the website, but he was > getting other emails, to those same accounts that were from outside the website. Short story > long, I took one of the functions that uses the mail function inside of it, and I placed it on my > server, and it worked flawlessly, place the same exact code on back on the other site, and > nothing. Oh and I dont have access to their error logs. :( > > What sounds wrong? What sounds bad? Any thoughts? Anything i can look for? > > thanks, > > dan > > __________________________________________________ > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > http://sbc.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
In article <20021001234656.50379.qmail
web11805.mail.yahoo.com>,
McWC
rocketmail.com says...
> I use the mail function tons, never had a problem. I am working with a client with a different
> hosting vendor, they are using PHP 4.2.3, which I guess was a recient upgrade, anyway I was
> informed by the client that he wasnt getting email submissions from the website, but he was
> getting other emails, to those same accounts that were from outside the website. Short story
> long, I took one of the functions that uses the mail function inside of it, and I placed it on my
> server, and it worked flawlessly, place the same exact code on back on the other site, and
> nothing. Oh and I dont have access to their error logs. :(
>
> What sounds wrong? What sounds bad? Any thoughts? Anything i can look for?
>
> thanks,
>
> dan
Are you setting a From: field? It may be that the from address as sent by the provider won't resolve, which may cause problems.
-- David Robley Temporary Kiwi!Quod subigo farinam
attached mail follows:
They found the problem, the webserver that the client was on had the wrong path to sendmail, a correction in php.ini and a restart and it was working again.
> > --- Debbie Dyer <debbie.dyer
c-u-online.co.uk> wrote:
> > > Hi Dan
> > >
> > > I (and others I know) have similar probs of seemingly disappearing
> emails -
> > > I thought it was down to mail filtering because I cant think of another
> > > explanation (but I dont know that for sure). I was given some advice
> here
> > > yesterday so I am forwarding you the mails.
> > >
> > > Debbie
> > >
> > > ----- Original Message -----
> > > From: "Dan McCullough" <McWC
rocketmail.com>
> > > To: <php-general
lists.php.net>
> > > Sent: Wednesday, October 02, 2002 12:46 AM
> > > Subject: [PHP] mail function problems
> > >
> > >
> > > > I use the mail function tons, never had a problem. I am working with
> a
> > > client with a different
> > > > hosting vendor, they are using PHP 4.2.3, which I guess was a recient
> > > upgrade, anyway I was
> > > > informed by the client that he wasnt getting email submissions from
> the
> > > website, but he was
> > > > getting other emails, to those same accounts that were from outside
> the
> > > website. Short story
> > > > long, I took one of the functions that uses the mail function inside
> of
> > > it, and I placed it on my
> > > > server, and it worked flawlessly, place the same exact code on back on
> the
> > > other site, and
> > > > nothing. Oh and I dont have access to their error logs. :(
> > > >
> > > > What sounds wrong? What sounds bad? Any thoughts? Anything i can
> look
> > > for?
> > > >
> > > > thanks,
> > > >
> > > > dan
> > > >
> > > > __________________________________________________
> > > > Do you Yahoo!?
> > > > New DSL Internet Access from SBC & Yahoo!
> > > > http://sbc.yahoo.com
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > > >
> > >
> >
> >
> > =====
> > --------------------------------------------------------
> > "Theres no such thing as a problem unless the servers are on fire!"
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> >
>
===== -------------------------------------------------------- "Theres no such thing as a problem unless the servers are on fire!"
__________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com
attached mail follows:
Voisine wrote: > Hi, > > I'm learning php from a book but because of global off I have have > several "Undefined index" message! I don't want to change the default > setting in my php.ini because I want to learn the good way. > What I'm doing wrong? > > Undefined index: categorie > if ($_POST['categorie'] == "New") {
You're not doing anything wrong. The problem here is that error_reporting has notices on. The $_POST['categorie'] is not defined. Change the error_reporting to excluse ERR_NOTICE, or use:
if ( isset( $_POST['categorie'] ) && $_POST['categorie'] == 'New' ) } // Your code here }
HTH Erwin
attached mail follows:
Here's what I do.
We have an outsourced email newsletter management system that accepts GET method - so I just use fopen() to send the data to our list management system and then drop the information into a database on our server.
$form1_submit_url = 'http://www.whatever.com/page.htm?something=123&something=456'; $fp = fopen ("c:\\data\\info.txt", "r");
- then my script continues to insert info an output confirmation message
olinux
--- Henry <henry
teacake.f9.co.uk> wrote:
> Hi All,
>
> I have a problem that I hope you can help me with.
>
> I'm using a third party shopping cart solution which
> is quite frankly naff.
> They bundle some autoresponders with it.
> Unfortunately the autoresponders do
> not work!. I want to find a temporary solution to
> this. The easiest way
> would be to allow a form to be submitted to more
> than one place!
>
> Basically I would lke to have an intermediate php
> page that will submit the
> details (submitted to it) to two other pages and
> then follow the response of
> one of those other pages (the primary page). That
> way I can insert a
> different autoresponder handling system into the
> submission process but
> continue to use the shopping carts pages for the
> time being.
>
> Any suggestions?
>
> Henry
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com
attached mail follows:
If you need something more complex look into CURL as suggested earlier
http://curl.haxx.se/ http://www.php.net/curl
olinux
--- olinux <olnx
yahoo.com> wrote:
> Here's what I do.
>
> We have an outsourced email newsletter management
> system that accepts GET method - so I just use
> fopen()
> to send the data to our list management system and
> then drop the information into a database on our
> server.
>
> $form1_submit_url =
>
'http://www.whatever.com/page.htm?something=123&something=456';
> $fp = fopen ("c:\\data\\info.txt", "r");
>
> - then my script continues to insert info an output
> confirmation message
>
> olinux
>
>
>
> --- Henry <henry
teacake.f9.co.uk> wrote:
> > Hi All,
> >
> > I have a problem that I hope you can help me with.
> >
> > I'm using a third party shopping cart solution
> which
> > is quite frankly naff.
> > They bundle some autoresponders with it.
> > Unfortunately the autoresponders do
> > not work!. I want to find a temporary solution
> to
> > this. The easiest way
> > would be to allow a form to be submitted to more
> > than one place!
> >
> > Basically I would lke to have an intermediate php
> > page that will submit the
> > details (submitted to it) to two other pages and
> > then follow the response of
> > one of those other pages (the primary page). That
> > way I can insert a
> > different autoresponder handling system into the
> > submission process but
> > continue to use the shopping carts pages for the
> > time being.
> >
> > Any suggestions?
> >
> > Henry
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com
attached mail follows:
Hello List for the first time, I am very new to php but impressed from what i've seen so far. I managed to configure php w/ mysql and db2 do some selects, inserts ... What I am inerested in is what are all those mod_php* and php_* on the distribution's CDs e.g. if they are installed how do i get support for which i thought i have installed the module( like rpm -i php-oracle-4.2.2-1j1.i686.rpm means that i can somehow get oracle support without recompiling php ??? or no). Another thing that bothers me is should I (can I) use for example Oracle's apache or install "regular" apache and work with it. Is Apache-PHP-Linux on one machine and OracleDB-Win/Lin on another machine big trouble or peace of cake (It asks me for oci8 lib which I don't know where to get if I don't want to install any oracle products on the web server (can i get them from php-oci8...rpm for example) DSO e.g. oracle.so is a shared object but where to include it for the support and is it enough) Thank you all and looking forward to hearing from you
attached mail follows:
Hi Friends,
I would like to know where the cookies will be stored?
I have enabled cookies using session.use_cookies = 1.
I found cookies will be stored in the environmental variable HTPP_COOKIE_VARS.
But I didn't find anywhere this variable in my php.ini file.
If I want to print all cookies stored in my browser how can I print?
I tried to print in this way
========================
<?php
echo "All cookies :".$HTTP_COOKIE_VARS; echo "<br>previous cookie :".$HTTP_COOKIE_VARS[$Tamilnadu];
echo "<br>previous cookie :".$Tamilnadu; ?>
Output:
Allcookies: Previouscookie: Previouscookie:Chennai
===========================
Please tell me how to print all the stored cookies in my browser and where these cookies will be stored?
Where Can I see all these cookies?? Any logs we have to check??
Where can I see the http response headers?? (like cookies and stuff )..Do I need to use any protocol analyzer?
Thanks in advance
Balaji
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
Balaji Ankem wrote:
>Hi Friends, > >I would like to know where the cookies will be stored? >
Cookies are stored on the client, either in memory or written to disk.
>If I want to print all cookies stored in my browser how can I print? >
I'm going to assume this isn't really what you mean, and you want to print all of the cookies made available to PHP. You see, as I said, the cookies are stored on the client. If PHP, running on a remote Web site, had access to "all cookies" stored in your browser, this would be a big security problem, wouldn't it?
I think what you're looking for is this:
<pre> <? print_r($_COOKIE); ?> </pre>
>Where can I see the http response headers?? (like cookies and stuff >)..Do I need to use any protocol analyzer? >
I wrote a simple utility in PHP to help me view the HTTP communication regardless of what Web site I'm interacting with. It basically uses the PHP sockets extension to behave like an HTTP proxy, so that you just configure your browser to use it as a proxy while you browse. It then embeds the HTTP transactions into the replies (text replies only) for convenience, so that they're just displayed at the bottom of each Web page. You're welcome to have a look to see if it might be useful to you. See http://protoscope.org/ for more information or http://shiflett.org/projects/protoscope/sample.html for an example of what it looks like when you use it.
Happy hacking.
Chris
attached mail follows:
Hi Chris, Thanks for the help.
<? print_r($_COOKIE); ?>
It is giving error saying call to undefined function _r();
And Setcookie in php is not conforming to the RFC2109.
Comment and version how do we set?
Thanks in advance Balaji
-----Original Message-----
From: Chris Shiflett [mailto:shiflett
php.net]
Sent: Wednesday, October 02, 2002 2:21 PM
To: Balaji Ankem
Cc: php-general
lists.php.net
Subject: Re: [PHP] Help required on cookies
Balaji Ankem wrote:
>Hi Friends, > >I would like to know where the cookies will be stored? >
Cookies are stored on the client, either in memory or written to disk.
>If I want to print all cookies stored in my browser how can I print? >
I'm going to assume this isn't really what you mean, and you want to print all of the cookies made available to PHP. You see, as I said, the cookies are stored on the client. If PHP, running on a remote Web site, had access to "all cookies" stored in your browser, this would be a big security problem, wouldn't it?
I think what you're looking for is this:
<pre> <? print_r($_COOKIE); ?> </pre>
>Where can I see the http response headers?? (like cookies and stuff >)..Do I need to use any protocol analyzer? >
I wrote a simple utility in PHP to help me view the HTTP communication regardless of what Web site I'm interacting with. It basically uses the PHP sockets extension to behave like an HTTP proxy, so that you just configure your browser to use it as a proxy while you browse. It then embeds the HTTP transactions into the replies (text replies only) for convenience, so that they're just displayed at the bottom of each Web page. You're welcome to have a look to see if it might be useful to you.
See http://protoscope.org/ for more information or http://shiflett.org/projects/protoscope/sample.html for an example of what it looks like when you use it.
Happy hacking.
Chris
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
Balaji Ankem wrote:
><? print_r($_COOKIE); ?> > >It is giving error saying call to undefined function _r(); >
That's weird. Maybe you have a space between print and _r? The function is print_r() with no spaces.
>And Setcookie in php is not conforming to the RFC2109. >
In what way? Remember that the setcookie() function itself does not need to conform to any syntax guidelines. Only the resulting HTTP header must conform to specifications such as those described in RFC 2109.
Chris
attached mail follows:
But in RFC2109 they mentioned Comment and version are also attributes of the setcookie header.
How do you set these attributes using php??
How this print_r() function works??
Thanks in advance Balaji
-----Original Message-----
From: Chris Shiflett [mailto:shiflett
php.net]
Sent: Wednesday, October 02, 2002 2:52 PM
To: Balaji Ankem
Cc: php-general
lists.php.net
Subject: Re: [PHP] Help required on cookies
Balaji Ankem wrote:
><? print_r($_COOKIE); ?> > >It is giving error saying call to undefined function _r(); >
That's weird. Maybe you have a space between print and _r? The function is print_r() with no spaces.
>And Setcookie in php is not conforming to the RFC2109. >
In what way? Remember that the setcookie() function itself does not need
to conform to any syntax guidelines. Only the resulting HTTP header must
conform to specifications such as those described in RFC 2109.
Chris
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
Balaji Ankem wrote:
>But in RFC2109 they mentioned Comment and version are also attributes of >the setcookie header. > >How do you set these attributes using php?? >
These attributes are optional. Be careful not to confuse the setcookie() PHP function with the Set-Cookie HTTP header. I'm not certain if the setcookie() function itself provides a way to specify some of the less common optional attributes, because I never use it. PHP gives you complete control over cookies with the header() function, and that's what I generally use. You can specify your Set-Cookie header however you want with code like this:
header("Set-Cookie: whatever you want");
>How this print_r() function works?? >
Just use it like I mentioned:
<pre> <? print_r($_COOKIE); ?> </pre>
You'll see.
Chris
attached mail follows:
Hi all,
my script knows three different constants
define(G_T_USER, "user_profile"); define(G_T_TEAM, "SAFETOUR_team"); define(G_T_CALL, "SAFETOUR_call");
Is it possible to get access to them, if I have the names (USER, TEAM, CALL) in a variable?
It must be something like that:
aName = "TEAM"; myString = "G_T_$sName"; // myString = "SAFETOUR_team"
Any hint to solve this problem would be useful.
heiko
attached mail follows:
Hi Heiko
Try this: $aName = "TEAM"; eval( '$myString = G_T_'.$aName.';' ); // evaluates to: $myString = G_T_TEAM echo $myString; // Should print out SAFETOUR_team
I haven't tested this, but it should work.
Regards
Scott
On 10/2/2002 10:47 AM, Heiko Mundle wrote: > Hi all, > > my script knows three different constants > > define(G_T_USER, "user_profile"); > define(G_T_TEAM, "SAFETOUR_team"); > define(G_T_CALL, "SAFETOUR_call"); > > Is it possible to get access to them, if I have the names (USER, TEAM, > CALL) in a variable? > > It must be something like that: > > aName = "TEAM"; > myString = "G_T_$sName"; // myString = "SAFETOUR_team" > > > Any hint to solve this problem would be useful. > > heiko > >
-- //--------------------------------------------// // Scott Houseman // // Jam Warehouse http://www.jamwarehouse.com/ // // Smart Business Innovation // // +27 21 4477440 / +27 82 4918021 // //--------------------------------------------//
attached mail follows:
Thanks, it works!
Scott Houseman wrote: > Hi Heiko > > Try this: > $aName = "TEAM"; > eval( '$myString = G_T_'.$aName.';' ); // evaluates to: $myString = > G_T_TEAM > echo $myString; // Should print out SAFETOUR_team > > I haven't tested this, but it should work. > > Regards > > Scott > > On 10/2/2002 10:47 AM, Heiko Mundle wrote: > >> Hi all, >> >> my script knows three different constants >> >> define(G_T_USER, "user_profile"); >> define(G_T_TEAM, "SAFETOUR_team"); >> define(G_T_CALL, "SAFETOUR_call"); >> >> Is it possible to get access to them, if I have the names (USER, TEAM, >> CALL) in a variable? >> >> It must be something like that: >> >> aName = "TEAM"; >> myString = "G_T_$sName"; // myString = "SAFETOUR_team" >> >> >> Any hint to solve this problem would be useful. >> >> heiko >> >> > >
attached mail follows:
> Warning: Unable to load dynamic library 'C:\PHP\extensions/php_oci8.dll' -
there are slashes and backslashes in the string 'C:\PHP\extensions/php_oci8.dll'. it looks odd. May be you would have a look to include_path and extension_dir in php.ini ? Regards,
Philippe
attached mail follows:
> I've been writing PHP scripts for a long time but never needed to get data > from an Oracle database. Till now.
- First, you need php compile with --oci - Then, you have to install the "oracle client". Note : you can't find the "oracle client" alone. you need to download the entire oracle (500Mb !!) at http://otn.oracle.com/software/products/oracle8i/content.html and then choose in the setup to install the oracle client.
After that, it would be possible to connect your remote oracle with ocilogon($username, $pw, $host).
> host (e.g. somewhere.somewhere.com) Note that I'm dubitative about your example. host is normally a string you should see in the oracle file tnsnames.ora. I've never seen a "host" oracle variable as an url ??
Hope it will help you Regards, Phlippe
attached mail follows:
In article <20021001032309.45254.qmail
pb1.pair.com>,
johnkelly
hotmail.com says...
> Thanks guys, I was unaware having quotes around it would make a difference.
> Works fine once I removed the quotes.
>
> "John Kelly" <> wrote in message
> news:20021001023646.11527.qmail
pb1.pair.com...
> > Can I pass the ftp transfer mode in a string like ...
> >
> > $filetype = "FTP_ASCII";
> > $upload = ftp_fput($conid, $dfile, $sfile, $filetype);
> >
> > I ask as when I do I get the following error message ...
> >
> > Warning: ftp_fput() expects parameter 4 to be long, string given
> >
> > If I replace $filetype with the text FTP_ASCII or FTP_BINARY it works
> fine.
Quick explanation: FTP_ASCII is a symbolic constant, "FTP_ASCII" is a string.
-- David RobleyA: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet?
attached mail follows:
In article <3D99CF40.1080007
manordat.demon.co.uk>,
g0pae
manordat.demon.co.uk says...
> DonPro wrote:
>
> >$queryID = mysql_query("SELECT HSCode, UOM, EDescript FROM HSCodes WHERE
> >MATCH(EDescript) AGAINST ('" . $description . "') ORDER BY HSCode, UOM,
> >EDescript");
> >
> I don't see what is wrong but try echoing the text of the query itself
> and see if it contains what you think it does around the $desription area.
>
> HTH
> Chris
Two bob says this is a register_globals problem
-- David Robley Temporary Kiwi!Quod subigo farinam
attached mail follows:
I told you something incorrectly yesterday:-
-> "From what you say you dont want get_class_name because this gives you the name of the class not the instance of it."
get_class is PHP's function for getting the name of a class not get_class_name
Sorry - I must have been thinking in Java mode.
Debbie
----- Original Message -----
From: "Dav ヨrn Jhannsson" <david
atom.is>
To: <php-general
lists.php.net>
Sent: Tuesday, October 01, 2002 1:59 PM
Subject: [PHP] OOP class names
> Is there any way to get a print out of class names of an object, lets > say I have a object called obj and I have x number of classes and I want > to find out, theyr names, for example obj->class1 obj->class2 etc. > > Thanks David >
attached mail follows:
Hi
Single quote's in strings entered via a text input field are subsequently appearing with what appears to be an escape character -
comm\'ents
how can i correct this? I've tried htmlspecialchars($string, ENT_QUOTES); and htmlentities($string, ENT_QUOTES);
but these don't seem to work (maybe its me).
Thanks
Javier
_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
attached mail follows:
In article <F72Y5wOqGp8wx4Otaz900007d2c
hotmail.com>, codareef
hotmail.com
says...
> Hi
>
> Single quote's in strings entered via a text input field are subsequently
> appearing with what appears to be an escape character -
>
> comm\'ents
>
> how can i correct this? I've tried
> htmlspecialchars($string, ENT_QUOTES);
> and
> htmlentities($string, ENT_QUOTES);
>
> but these don't seem to work (maybe its me).
stripslashes() is the immediate solution, but you might also want to consider the various 'magic_quotes' settings in your php.ini
-- David Robley Temporary Kiwi!Quod subigo farinam
attached mail follows:
Javier Montserat wrote: > Hi > > Single quote's in strings entered via a text input field are > subsequently appearing with what appears to be an escape character - > > comm\'ents > > how can i correct this? I've tried > htmlspecialchars($string, ENT_QUOTES); > and > htmlentities($string, ENT_QUOTES); > > but these don't seem to work (maybe its me).
Probably you have magic_quotes_gpc set to On in php.ini...you can change this to Off, or you can use stripslashes() on the $string variable...
HTH Erwin
attached mail follows:
<? for ($i = 7; $i < sizeof($info); $i+=1) { echo $info[$i]; } ?>
That line of code successfully will display lines 7 and on of an included text file into my HTML boilerplate. However, in my hundreds of source text files, "<br>" is not included at the end of the lines, therefore lines 7 and on appear as one chunk of text, rather than neatly formatted lines. How can I combine that line of code with str_replace() or some other replace function in order to turn "\n" into "<br>" for each line. I've experimented with several different possibilities, but none of them output anything.
Please help ASAP. The lyrics site is the most popular part of my website, and unfortunately it's down until I get this code figured out.
-- Kyrie Eleison, Rick www.spiritsword.com/phpBB2/
attached mail follows:
Hi Rick,
> How can I combine that line of code with > str_replace() or some other replace function > in order to turn "\n" into "<br>" for each line.
I think you're looking for http://www.php.net/nl2br. Specifically: for ($i = 7; $i < sizeof($info); $i+=1) echo nl2br($info[$i]);
Cheers Jon
attached mail follows:
Nevermind. Leave it to me to make a very stupid mistake. I fixed it though, and now it works great. For any who are interested, here is the working code... Dunno why you'd need it, but whatever:
<? for ($i = 7; $i < sizeof($info); $i+=1) { $new7 = str_replace("\n","<br>",$info[$i]); echo $new7; } ?>
My mistake was leaving that I left the second '$' out of '$info[$i]'. At least I found it before I frustrated myself. Thanks anyway! :-)
-- Kyrie Eleison, Rick www.spiritsword.com/phpBB2/Rick Beckman wrote: > <? for ($i = 7; $i < sizeof($info); $i+=1) { echo $info[$i]; } ?> > > That line of code successfully will display lines 7 and on of an > included text file into my HTML boilerplate. However, in my hundreds > of source text files, "<br>" is not included at the end of the lines, > therefore lines 7 and on appear as one chunk of text, rather than > neatly formatted lines. How can I combine that line of code with > str_replace() or some other replace function in order to turn "\n" > into "<br>" for each line. I've experimented with several different > possibilities, but none of them output anything. > > Please help ASAP. The lyrics site is the most popular part of my > website, and unfortunately it's down until I get this code figured > out.
attached mail follows:
> -----Original Message-----
> From: Rick Beckman [mailto:romans1423
hotmail.com]
> Sent: 02 October 2002 12:12
>
> <? for ($i = 7; $i < sizeof($info); $i+=1) { echo $info[$i]; } ?>
>
> That line of code successfully will display lines 7 and on of
> an included
> text file into my HTML boilerplate. However, in my hundreds
> of source text
> files, "<br>" is not included at the end of the lines,
> therefore lines 7 and
> on appear as one chunk of text, rather than neatly formatted
> lines. How can
> I combine that line of code with str_replace() or some other replace
> function in order to turn "\n" into "<br>" for each line.
If it's genuinely one line per $info[] element, just add the dad-blamed <br> to your echo:
<? for ($i = 7; $i < sizeof($info); $i+=1) { echo $info[$i], '<br>'; } ?>
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Thanks everyone! Works great! :-) If only I would have noticed how obvious it was before trying making it more difficult than I had to.
-- Kyrie Eleison, Rick www.spiritsword.com/phpBB2/Mike Ford wrote: >> -----Original Message----- >> From: Rick Beckman [mailto:romans1423
hotmail.com] >> Sent: 02 October 2002 12:12 >> >> <? for ($i = 7; $i < sizeof($info); $i+=1) { echo $info[$i]; } ?> >> >> That line of code successfully will display lines 7 and on of >> an included >> text file into my HTML boilerplate. However, in my hundreds >> of source text >> files, "<br>" is not included at the end of the lines, >> therefore lines 7 and >> on appear as one chunk of text, rather than neatly formatted >> lines. How can >> I combine that line of code with str_replace() or some other replace >> function in order to turn "\n" into "<br>" for each line. > > If it's genuinely one line per $info[] element, just add the > dad-blamed <br> to your echo: > > <? for ($i = 7; $i < sizeof($info); $i+=1) { echo $info[$i], '<br>'; > } ?> > > Cheers! > > Mike > > --------------------------------------------------------------------- > Mike Ford, Electronic Information Services Adviser, > Learning Support Services, Learning & Information Services, > JG125, James Graham Building, Leeds Metropolitan University, > Beckett Park, LEEDS, LS6 3QS, United Kingdom > Email: m.ford
lmu.ac.uk > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
> If it's genuinely one line per $info[] element, just add the dad-blamed > <br> to your echo: > > <? for ($i = 7; $i < sizeof($info); $i+=1) { echo $info[$i], '<br>'; } ?> >
Also, just an FYI to the OP, you may want to calculate sizeof($info) before hand, and use a variable in your for() statement. That way it doesn't have to calculate sizeof() each loop...
---John Holmes...
attached mail follows:
> -----Original Message-----
> From: Jennifer Swofford [mailto:jen_lizzie
yahoo.com]
> Sent: 01 October 2002 21:21
> To: php-general
lists.php.net
> Subject: [PHP] eregi_replace / preg_match_all
>
>
> Why does this work:
>
> $contents =
> eregi_replace("(\")(.(/))*[A-Z0-9_/-]+(.gif|.jpg)",
> "\"blah.gif", $contents);
>
> But this does not:
>
> preg_match_all("(\")(.(/))*[A-Z0-9_/-]+(.gif|.jpg)",
> $contents, $matches);
>
> for ($i=0; $i< count($matches[0]); $i++) {
> echo "matched: ".$matches[0][$i]."\n"
> }
>
> I get this error:
>
> Warning: Unknown modifier '(' in
> /home/littleduck/www/www/newcontrol/temp/fread.php on
> line 20
Well, first of all you've switched from a POSIX-extended regular expression function, eregi_replace(), to a Perl-compatible regular expression (PCRE) function, preg_match_all() -- all the POSIX-extended function names begin with an e, and all the PCRE ones with a p. The rules are different for the two sets, and one of the most important ones is that the PCRE functions require the pattern to be enclosed within delimiters, and the POSIX-extended ones don't (this is because you can add optional _modifiers_ after the ending delimiter for PCRE matching). The syntax of the regular expressions is also slightly different, and a pattern that works reliably for PCRE won't necessarily for POSIX-extended, and vice versa -- especially as PCRE is far more versatile and feature-rich.
So, your basic problem in the preg_match_all() is that you haven't *added* delimiters -- the requirement is that you must use the same character both before and after your pattern, or a matched pair from one of the sets (), {}, [], and <>. So, the pattern parser is seeing the initial "(" in your expression, treating it as the opening delimiter, and taking your basic pattern to be the text up to the matching ")" -- that is, just (\"). It then looks to see if the next character is a valid _modifier_ (remember them?), finds "(" which isn't one, and complains -- and bingo!, there's your "Unknown modifier '('" message.
So, this, for example, would work:
preg_match_all("{(\")(.(/))*[A-Z0-9_/-]+(.gif|.jpg)}", $contents, $matches);
although I'd point out that "." is a pattern-matching element that means "any character", so you might prefer to escape it -- unfortunately, both regular expressions and PHP's double-quoted strings use \ as their escape character, so to get a single backslash into the expression to escape the ".", you've got to use two \\s (and to match an actual single backslash, you have to write no less than *four* backslashes!). So this would give:
preg_match_all("{(\")(\\.(/))*[A-Z0-9_/-]+(\\.gif|\\.jpg)}', $contents, $matches);
Because of the problems with "backslash breeding" that this can cause, I'd always recommend using single-quoted strings for your patterns -- especially as, in this case, you have a double-quote in the pattern! Thus, my final effort would be:
preg_match_all('{(")(\.(/))*[A-Z0-9_/-]+(\.gif|\.jpg)}', $contents, $matches);
Lastly, you may care to search the archives of this list for postings about the relative efficiency of the two types of expressions -- I know one set is frequently recommended as more efficient than the other, but can never remember which!
Hope this is helpful,
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
> -----Original Message-----
> From: michael saxbury [mailto:msaxbury
hotmail.com]
> Sent: 01 October 2002 22:57
>
> I am trying to understand in deatil exactly what PHP is, I
> know that it is a
> scripting markup type language, but.....
>
> Is it correct to say that PHP is essentially just C++ code
> wrapped in PHP
> blocks which are embedded in HTML?
Good grief, no!
PHP syntax may be c-*like*, but it is definitely *not* c++. There are many important differences (some of them very subtle) that will reach out and bite you if you think of it as c++.
PHP is itself, a separate and distinct language, and should not be thought of in any other clothes...!! Its original and principal use is as a server-side scripting language, but it now has a command-line version, and people have even played with active-scripting and (if I've read recent postings right!) c-embedded versions.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
The PHP script im using works on my computers server, but when after uploading to my web server i get this... Warning: fopen("wtest.txt", "wb+") - Permission denied in /home/canberra/public_html/bomonster/canberra.php on line 6
Dunno why either, the directory is not protected, can anyne help me with this? one? The particular code in question... //Writing of local file
$rContents = implode( "\r\n", file( 'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
if( ($fp = fopen( 'wtest.txt', 'wb+' )) !== false ) { fputs( $fp, $rContents ); fclose( $fp ); }
-- Cheers --------------------------------------------------------- Simon Angell Canberra ACT www.canberra-wx.com --------------------------------------------------------- Member of: Australian Severe Weather Association. www.severeweather.asn.au --------------------------------------------------------- This email is virus free. Scanned before leaving my mailbox using Norton Antivirus 2002 for Win2k Scanned with the latest definition File.
attached mail follows:
(For the archives) The RegEx I finally used was this: search: <D>(.*)
replace: <DD>\1</DD>
I tried this in 3 editors: jEdit, eMacs and BBEdit jEdit interpreted the replace expression as literally "\1" eMacs didn't like the parenthesis in the search string In BBEdit it worked like a charm.
Not sure why. Perhaps different implementations of RegEx. Is this true?
On Fri, 2002-09-27 at 16:53, John Holmes wrote: > > I have a fairly large html document that I need to convert to xml. > > The current format is is: > > <DD> A whole bunch of text > > <DT> Something else </DT> > > (There is a new line in there before <DT>) > > > > Which I need to convert to > > <DD> A whole bunch of text </DD> > > <DT> Something else </DT> > > $new_text = str_replace("\n\t<DT>","</DD>\n\t<DT>",$your_text); > > Assuming there is a tab in there... > > You'd be better off getting an editor that'll do this for you. Textpad > lets you search and replace with regular expressions. Other programs do > too. > > ---John Holmes... >
attached mail follows:
In order to get my site on-line, I need to upload all my files, and create a few PostgreSQL tables that the scripts rely upon.
I've created a script that should create these tables, but in testing it, nothing happens - no tables are created. I wondering whether it's even possible to create these tables from php?
The other possibility is to use pg_dump, but again, wouln't that require that the tables already exist on the server?
So, I guess my question is: can I use php to accomplish these tasks, or do I have to have access to psql (server-side)?
Here's the script I've created:
<?php include("dbc.php"); /* db connection script to pre-existing db on server*/ $ct = "CREATE TABLE dip ( rid serial int4 NOT NULL, rfname varchar(50) NOT NULL, rsname varchar(50) NOT NULL, rm1name varcahr(50), rm2name varchar(50), rm3name varchar(50), rinit varchar(8), rnee varchar(50), rcity varchar(50), rprov varchar(50), rcountry varchar(50), rdate date, rsponsor int4, radopt int4, rpix varchar(50), rproduct varchar(50), rplacement varchar(50), robid int4, rmemid int4, rbook text, rconfirm int4, rupload varchar(200) )";
?>
Sorry for the real 'newbie' question here, but this is something I've never done, so I'm going in totally blind. I'd greatly appreciate any advice concerning what to do, or watch out for.
Tia, Andre
attached mail follows:
[snip] I've created a script that should create these tables, but in testing it, nothing happens - no tables are created. I wondering whether it's even possible to create these tables from php? ... So, I guess my question is: can I use php to accomplish these tasks, or do I have to have access to psql (server-side)? ... [/snip]
Yes it is possible, and you should include some sort of error checking to find why you are having problems. I recommend the mysql_error() function as a good place to start. You'll probably get some sort of permissions problem.
HTH!
Jay
attached mail follows:
It appears to me you are not actually executing the SQL you are storing in the varible.
Did you accidently miss that out of your email?
I would supply you with more information but I don't know how to use PostgreSQL, but since you are coding with it, I guess you should be able to figure out the correct command
Andrew
----- Original Message -----
From: "Andre Dubuc" <aajdubuc
webhart.net>
To: <php-general
lists.php.net>
Sent: Wednesday, October 02, 2002 2:44 PM
Subject: [PHP] Using PHP to create tables?
> In order to get my site on-line, I need to upload all my files, and create a > few PostgreSQL tables that the scripts rely upon. > > I've created a script that should create these tables, but in testing it, > nothing happens - no tables are created. I wondering whether it's even > possible to create these tables from php? > > The other possibility is to use pg_dump, but again, wouln't that require that > the tables already exist on the server? > > So, I guess my question is: can I use php to accomplish these tasks, or do I > have to have access to psql (server-side)? > > Here's the script I've created: > > <?php > include("dbc.php"); /* db connection script to pre-existing db on server*/ > $ct = "CREATE TABLE dip ( > rid serial int4 NOT NULL, > rfname varchar(50) NOT NULL, > rsname varchar(50) NOT NULL, > rm1name varcahr(50), > rm2name varchar(50), > rm3name varchar(50), > rinit varchar(8), > rnee varchar(50), > rcity varchar(50), > rprov varchar(50), > rcountry varchar(50), > rdate date, > rsponsor int4, > radopt int4, > rpix varchar(50), > rproduct varchar(50), > rplacement varchar(50), > robid int4, > rmemid int4, > rbook text, > rconfirm int4, > rupload varchar(200) > )"; > > ?> > > Sorry for the real 'newbie' questi