[PHP] RE: OOP-classes in PHP
you can't access $overall->foo because you've never defined it you need: function load($class){ eval("\$this->$class = new $class;"); return true; } Tim > -Original Message- > From: Tularis [mailto:[EMAIL PROTECTED]] > Sent: 17 November 2002 22:21 > To: [EMAIL PROTECTED] > Subject: OOP-classes in PHP > > > currently I have the followig script: > > everything works fine, except for the fact that it doesn't seem to > understand $overall->foo->foo();. It returns this error: > "Fatal error: Call to a member function on a non-object in > d:\apache\htdocs\classes.php on line 32" > > Now, I know the object is loaded, because the constructor is run, and > puts out a 1 onscreen... I wish to know how to make this work... > any help plz? > > thanx > - Tularis > > class overall { > var $loaded; > > function load($class){ > eval("\$$class = new $class;"); > return true; > } > } > > class foo { > var $bar; > > // Constructor > function foo(){ > if(!isset($this->bar)){ > $this->bar = 1; > }else{ > $this->bar++; > } > echo $this->bar.""; > } > } > > // Start actual loading > $overall = new overall; > $overall->load('foo'); > > // As of here it won't work anymore... somehow > $overall->foo-> doesn't > work... > > $overall->foo->foo(); > ?> > > (and if possible, I would also like to change $overall->foo->foo() to > $foo->foo(), but still keeping that class as a 'subclass' to > the overall > one.) > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Problem with Class - incomplete object error
you've included the class definition at the top of every page, right? and why don't you just use $_SESSION["cart"] directly instead of using $cart? that way you don't have to worry about scoping issues and continually passing $cart through to functions. Tim > -Original Message- > From: Paul [mailto:[EMAIL PROTECTED]] > Sent: 18 November 2002 02:59 > To: [EMAIL PROTECTED] > Subject: Problem with Class - incomplete object error > > > Hi All: > > I have a simple page that checks for existence of object in a session. > If the object is not stored in session object, it creates new one: > > If (isset ($_SESSION["cart"])) { > $cart=$_SESSION["cart"]; > } else { > $cart = new ShoppingCart (); > $_SESSION["cart"]= $cart; > } > > So the object cart is available in every page. At this point > the cart is > a simple class: > > class ShoppingCart { > > var $items = array(); > > function AddItem ($item){ > if ($this->items[$item]) { > $this->items[$item]=$this->items[$item]+1; > } else { > $this->items[$item]=1; > } > } // additem > } > > So the cart is either retrieved from the session or created (if non > existent), however, every time the script calls : > $cart->AddItem($_GET['item_id']); > > I get the following error: > Fatal error: The script tried to execute a method or access a property > of an incomplete object. Please ensure that the class definition > shoppingcart of the object you are trying to operate on was loaded > _before_ the session was started in on line 59 > > Where line 59 is pointing to $cart->AddItem($_GET['item_id']) > > Session_start is present in every page. > > Could anyone help me understand where the problem is? > > Thanks > Paul > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Newbie question
This might sound stupid but what the hell. I am running Red Hat 8.0 with Apache. I have apache working fine right now. I am wanting to learn some php but really don't know where to start/look or anything to tell the truth. I do "everything" from my FreeBSD 4.6.2 box but Apache runs on Red Hat. With me? Could someone give me a very "basic" PHP script or whatever they are called, tell me where I "should" or "need" to put it on my Red Hat 8.0 box and what else I need to do to see the script on my webpage? Put it like this. I will make a html file in /var/www/html/ called php and inside php i will make a file named php.ini ( i think it should be .ini right?) and I will edit my index.html file, add a link and point it to the php.ini file and see what happens. I just want to get a very basic idea of php, what it does, where to put the php file and how to get started on the web. I really hope this e-mail doesn't get ignored so could someone just help me out a lil bit here? I would appreciate it. msg86190/pgp0.pgp Description: PGP signature
[PHP] Re: SQLCODE=-930
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 oki im traying with php 4.2.2 . but according to the changelog ... it seems that nothing as change between 4.2.2 and 4.2.3 so ... i don't understand bah this must the voodoo part of the informatics :P Le Vendredi 15 Novembre 2002 16:11, vous avez écrit : > Hello Matthieu, > > i've got the the same problem with apache-2.0.40 and php-4.2.3. > 4.2.2 works fine. > > i have rebuild the php-4.2.2 rpm package for rh8. > (added a few changes for informix: > LD_LIBRARY_PATH="/opt/informix/lib:/opt/informix/lib/esql"; export > LD_LIBRARY_PATH > INFORMIXDIR="/opt/informix"; export INFORMIXDIR > > LDFLAGS="-L/usr/kerberos/lib -L/opt/informix/lib > -L/opt/informix/lib/esql > -L/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext/informix"; export > LDFLAGS > > and added configure option --with-informix\ > ) > > if try to install the php-4.2.3.rpm i get > > error: Failed dependencies: > libifasf.so is needed by php-4.2.3-1 > libifgen.so is needed by php-4.2.3-1 > libifgls.so is needed by php-4.2.3-1 > libifglx.so is needed by php-4.2.3-1 > libifos.so is needed by php-4.2.3-1 > libifsql.so is needed by php-4.2.3-1 > libthasf.so is needed by php-4.2.3-1 > libthgen.so is needed by php-4.2.3-1 > libthos.so is needed by php-4.2.3-1 > libthsql.so is needed by php-4.2.3-1 > > > with php-4.2.2 just: > error: Failed dependencies: > libifasf.so is needed by php-4.2.2-8.0.5 > libifgen.so is needed by php-4.2.2-8.0.5 > libifgls.so is needed by php-4.2.2-8.0.5 > libifglx.so is needed by php-4.2.2-8.0.5 > libifos.so is needed by php-4.2.2-8.0.5 > libifsql.so is needed by php-4.2.2-8.0.5 > > (maybe this could somebody a hint) > > > > Oliver - -- __ / Matthieu Le Corre | Service Informatique | | Inspection Academique de la Sarthe | 72000 LE MANS | | Tel : 02 43 61 58 91 | Mail : [EMAIL PROTECTED] \ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE92MR+iQG6YxCcev4RAgPzAJ957hdRDnCFxmjr/kCoM/XZ4vZFcwCfSYll LhErmzkKYqf9FMavCILp8s0= =DaGC -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Newbie question
http://www.php.net/manual/en/tutorial.php Bryan Cassidy wrote: This might sound stupid but what the hell. I am running Red Hat 8.0 with Apache. I have apache working fine right now. I am wanting to learn some php but really don't know where to start/look or anything to tell the truth. I do "everything" from my FreeBSD 4.6.2 box but Apache runs on Red Hat. With me? Could someone give me a very "basic" PHP script or whatever they are called, tell me where I "should" or "need" to put it on my Red Hat 8.0 box and what else I need to do to see the script on my webpage? Put it like this. I will make a html file in /var/www/html/ called php and inside php i will make a file named php.ini ( i think it should be .ini right?) and I will edit my index.html file, add a link and point it to the php.ini file and see what happens. I just want to get a very basic idea of php, what it does, where to put the php file and how to get started on the web. I really hope this e-mail doesn't get ignored so could someone just help me out a lil bit here? I would appreciate it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Browsing directory
I would like to create a web page which allow people to browse the directory structure and the files listed in every directory. If you have experience about that, could you kindly give me some advice or references? Thanks in advance. Cheers, Helen - Get a bigger mailbox -- choose a size that fits your needs.
[PHP] session_start() and utf-8
hi, i'm having a little problem with session_start() and utf-8 and i want just to figure out if this is a bug or just my incompetence. this is the code: TITLE saving this little piece in ansi encoding everything is working just fine. BUT, saving this with enconding is set to UTF-8 the php-parser says: Warning: Cannot send session cookie - headers already sent by (output started at *:\*\*\*\*\check2.php:1) in *:\*\*\*\*\check2.php on line 1 Warning: Cannot send session cache limiter - headers already sent (output started at *:\*\*\*\*\check2.php:1) in *:\*\*\*\*\check2.php on line 1 the line "echo phpversion()" is working well with both encodings. i checked this with windows2000server, linux red-hat and unix operating systems, with apache and IIS webserver and with different php-versions including the 4.2.2. everytime there was the same warning message. it would be very nice if someone could tell me if i am doing something wrong or not and if (s)he is getting the same error. cheers, marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: Problem with Class - incomplete object error
Yes, I have included class definition on the top of the page. The reason that was using $cart is the fact that I was calling methods/functions of the object such as $cart->AddItem()..and I was not sure whether $_Session['cart']->AddItem would be a correct way or not Paul -Original Message- From: Tim Ward [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 4:17 AM To: 'Paul'; [EMAIL PROTECTED] Subject: [PHP] RE: Problem with Class - incomplete object error you've included the class definition at the top of every page, right? and why don't you just use $_SESSION["cart"] directly instead of using $cart? that way you don't have to worry about scoping issues and continually passing $cart through to functions. Tim > -Original Message- > From: Paul [mailto:[EMAIL PROTECTED]] > Sent: 18 November 2002 02:59 > To: [EMAIL PROTECTED] > Subject: Problem with Class - incomplete object error > > > Hi All: > > I have a simple page that checks for existence of object in a session. > If the object is not stored in session object, it creates new one: > > If (isset ($_SESSION["cart"])) { > $cart=$_SESSION["cart"]; > } else { > $cart = new ShoppingCart (); > $_SESSION["cart"]= $cart; > } > > So the object cart is available in every page. At this point > the cart is > a simple class: > > class ShoppingCart { > > var $items = array(); > > function AddItem ($item){ > if ($this->items[$item]) { > $this->items[$item]=$this->items[$item]+1; > } else { > $this->items[$item]=1; > } > } // additem > } > > So the cart is either retrieved from the session or created (if non > existent), however, every time the script calls : > $cart->AddItem($_GET['item_id']); > > I get the following error: > Fatal error: The script tried to execute a method or access a property > of an incomplete object. Please ensure that the class definition > shoppingcart of the object you are trying to operate on was loaded > _before_ the session was started in on line 59 > > Where line 59 is pointing to $cart->AddItem($_GET['item_id']) > > Session_start is present in every page. > > Could anyone help me understand where the problem is? > > Thanks > Paul > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Get
Hi, I pass arguments in the url, how do i pass multiple args? eg. href="test.php?num=1" (only one arg) Do i use commas , please show me ! Thanks , Shaun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Get[Scanned]
href='test.html?var1=1&var2=2' Michael Egan -Original Message- From: Shaun [mailto:[EMAIL PROTECTED]] Sent: 18 November 2002 12:06 To: [EMAIL PROTECTED] Subject: [PHP] Get[Scanned] Hi, I pass arguments in the url, how do i pass multiple args? eg. href="test.php?num=1" (only one arg) Do i use commas , please show me ! Thanks , Shaun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Get
Like this: http://fqdn.domain.com/path/path/page.php?var1=value1&var2=value2&;... Page.php can then reference $var1 and $var2 if register globals is on (bad idea) or $_GET['var1'] and $_GET['var2'] hth David Russell IT Support Manager Barloworld Optimus (Pty) Ltd Tel: +2711 444-7250 Fax: +2711 444-7256 e-mail: [EMAIL PROTECTED] web: www.BarloworldOptimus.com -Original Message- From: Shaun [mailto:[EMAIL PROTECTED]] Sent: 18 November 2002 02:06 PM To: [EMAIL PROTECTED] Subject: [PHP] Get Hi, I pass arguments in the url, how do i pass multiple args? eg. href="test.php?num=1" (only one arg) Do i use commas , please show me ! Thanks , Shaun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php smime.p7s Description: application/pkcs7-signature
[PHP] php, forms, mysql
Hello, I could use some help. I have two framed pages, upperframe.html and lowerframe.html. In upper frame.html: echo ""; echo "IDSubjectOpenClose"; while($row = MySQL_fetch_array($result)) { echo ""; echo "{$row['id']}"; ?? echo "{$row['subject']}"; echo "{$row['open']}"; echo "{$row['close']}"; } echo ""; I display the content of the main table, which has an autoincrement index. For every index I have another table, something like tableID. What I want is to press on the id from a row in upperframe table and to display in lowerframe the tableID. How can I do that? Thanks a lot, Adrian
[PHP] Query string???
Hi! I need to solve this problem: I have a menu bar on my main page and a dynamic zone on the others levels of my html/php site. When I am clicking the 'item 1' on my menu, I want to load item1.php3 in the dynamic section of the next page. So I think I have to use sometinng like get variable in the adress bar and after put on my 'next page' or something like that ? As you can see I'm a newbie and a quebecer so, sorry for my english and thanks for your help! Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imap_open
On Sun, 17 Nov 2002 22:08:36 -0800 (PST), you wrote: >> The function imap_open() is for opening an connection to an IMAP >> server. It doesn't operate directly on a file system and it is >> ignorant of the actual mailbox implementation as this is all >> abstracted by the IMAP protocol. Where the mail is stored is a >> function of your IMAP server, not PHP. > >That's not actually true. The imap functions are an abstraction on top of >many different backends, not just imap. You can talk to pop and nntp >servers as well, for example, and yes, even a local mailstore with no >server involved at all. Oops, my mistake. I was not aware. And of course I see now the second sentence on the IMAP documentation which says "local mailbox access methods". Is there any more documentation on using this approach? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query string???
So, the link might look like: item 1 Then page.php might look like this: BUT this would be smarter: Enjoy! Justin on 18/11/02 11:07 PM, Cyclone Médias ([EMAIL PROTECTED]) wrote: > Hi! > > I need to solve this problem: > > I have a menu bar on my main page and a dynamic zone on the others levels of > my html/php site. When I am clicking the 'item 1' on my menu, I want to load > item1.php3 in the dynamic section of the next page. > > So I think I have to use sometinng like get variable in the adress bar and > after put on my 'next page' or something like that ? > > > As you can see I'm a newbie and a quebecer so, sorry for my english and > thanks for your help! > > Ben > Justin French http://Indent.com.au Web Developent & Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query string???
instead of if(empty($item)) { ... I would recomend if(is_numeric($item)) { ... Justin French wrote: So, the link might look like: item 1 Then page.php might look like this: include("{$item}.php"); ?> BUT this would be smarter: // uncomment this next line if you have register_globals OFF // $item = $_GET['item']; if(empty($item)) { // set a default item number $item = 1; } $file = "{$item}.php3"; if(file_exists($file)) { include($file); } else { echo "sorry, file {$file} not found"; } ?> Enjoy! Justin on 18/11/02 11:07 PM, Cyclone Médias ([EMAIL PROTECTED]) wrote: Hi! I need to solve this problem: I have a menu bar on my main page and a dynamic zone on the others levels of my html/php site. When I am clicking the 'item 1' on my menu, I want to load item1.php3 in the dynamic section of the next page. So I think I have to use sometinng like get variable in the adress bar and after put on my 'next page' or something like that ? As you can see I'm a newbie and a quebecer so, sorry for my english and thanks for your help! Ben Justin French http://Indent.com.au Web Developent & Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php, forms, mysql
You don't need to use forms (which you got wrong), but simple links with target="lowerframe" and href="lowerframe.php?tableID=$tableID", then you get in your lowerframe.php $_GET['tableID'] Adrian Partenie wrote: Hello, I could use some help. I have two framed pages, upperframe.html and lowerframe.html. In upper frame.html: echo ""; echo "IDSubjectOpenClose"; while($row = MySQL_fetch_array($result)) { echo ""; echo "{$row['id']}"; ?? echo "{$row['subject']}"; echo "{$row['open']}"; echo "{$row['close']}"; } echo ""; I display the content of the main table, which has an autoincrement index. For every index I have another table, something like tableID. What I want is to press on the id from a row in upperframe table and to display in lowerframe the tableID. How can I do that? Thanks a lot, Adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Ereg meadache
<> . . . <> The problem with this is that I need to do it at the Linux level, or else I'm not saving PHP the trouble of searching through every file to find it. __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with variables in email
I am trying to send an email with form vars inside it but I cannot seem to get the vars to be parsed. Here is my code: /* message */ $message = ' Products Purchased: Customer Information: Name {$name} Title .$title. Email .$email. Company .$company. Phone .$phone. Fax .$fax. Address .$address. City .$city. State .$state. Postal Code .$postalcode. Country .$country. Billing Information Card Type .$methodofpay. Card Name .$cardname. Exp Date .$cardexp. '; This outputs this: Customer Information: Name {$name} Title .$title. Email .$email. Company .$company. Phone .$phone. Fax .$fax. Address .$address. City .$city. State .$state. Postal Code .$postalcode. Country .$country. Billing Information Card Type .$methodofpay. Card Name .$cardname. Exp Date .$cardexp. Please help me figure this out. I know its simple, but I cannot see it ;) Thanks, Clint -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with variables in email
You are using single quotes, either do $message = ' '. $some_var . ' .'; or $message = " . $some_var ."; // using double quotes Clint Tredway wrote: I am trying to send an email with form vars inside it but I cannot seem to get the vars to be parsed. Here is my code: /* message */ $message = ' Products Purchased: Customer Information: Name {$name} Title .$title. Email .$email. Company .$company. Phone .$phone. Fax .$fax. Address .$address. City .$city. State .$state. Postal Code .$postalcode. Country .$country. Billing Information Card Type .$methodofpay. Card Name .$cardname. Exp Date .$cardexp. '; This outputs this: Customer Information: Name {$name} Title .$title. Email .$email. Company .$company. Phone .$phone. Fax .$fax. Address .$address. City .$city. State .$state. Postal Code .$postalcode. Country .$country. Billing Information Card Type .$methodofpay. Card Name .$cardname. Exp Date .$cardexp. Please help me figure this out. I know its simple, but I cannot see it ;) Thanks, Clint -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sunrise/sunset programs?
On Monday 18 November 2002 15:45, Adam wrote: > Does anyone know if PHP has the capabilities of being able to calculate > sunrise/sunset times by entering longitude/latitude values if someone was > smart enough to write code for it? I should think so. > If not, is there any > programs/applications around that allow for times to be entered into php > after values have been worked out by the program/app? Have you tried googling around? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The Lord prefers common-looking people. That is the reason that He makes so many of them. -- Abraham Lincoln */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: session handling
> -Original Message- > From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]] > Sent: 16 November 2002 07:23 > To: [EMAIL PROTECTED] > Subject: [PHP] Re: session handling > > > Here's what you need: > > on page 1.php: > > session_start(); > $temp = 'someValue'; > session_register("temp"); > ?> > > on page 2.php: > > session_start(); > print $temp; /* PHP sets the variables back the way they were > for you! */ > ?> > > You have to register the variable with the session first so > it knows that > it's a variable that needs monitored and, when the script > finishes, needs > saved. Actually, Anjali is right on this one, so long as (s)he's using a PHP version that defines the $_SESSION array; in this case, it's actually recommended to use only the $_SESSION array, and not use session_register at all. That said, I can't see anything wrong with the original scripts posted, so the obvious questions are: (1) are you sure you're using a recent version that supports the $_* superglobals arrays? (2) If so, please show how you're reaching 2.php from 1.php. 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: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] can I retrieve jsp varibable with get or post???
> -Original Message- > From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] > Sent: 17 November 2002 17:50 > > ok - the more I look at this the more I'm a bit lost. > passing the variables > from php to java makes sense. however, from your scripts you > listed it is > only possible to pass jsp variables to php by opening a new > page, or by > activating a form. Whoa, hold on a minute here -- are we talking Java or JavaScript? You, Jeff, say Java (and reinforce this with reference to Java Server Pages, which most likely wouldn't actually involve PHP at all!), whereas Marek is talking JavaScript. So, let's get our basics clear before we start talking at cross-purposes!! 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: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] running php as cgi script
> -Original Message- > From: Scott [mailto:[EMAIL PROTECTED]] > Sent: 17 November 2002 20:55 > To: php-general > Subject: Re: [PHP] running php as cgi script > > > Well, I've got a few test scripts to run by following the > suggestions from > the posts. There's just one thing that's not quite right yet. The > "#!/usr/bin/php" line appears at the top of the page. For > instance when I > run the following script from the cgi-bin: > > #!/usr/bin/php > phpinfo(); > ?> > > The phpinfo page comes up fine, but "#!/usr/bin/php" appears > at the top. > This happens whether I call the script "test.php" or > "test.cgi". Appreciate > any tips on how to get rid of it or why it's there. H'mm -- there's at least one reasonably recent version of PHP where this behaviour is recorded as a known bug, so it's probably worth checking at http://bugs.php.net/ to see which one this is (a search for "shebang" should do it). It's 99.9% sure it's been fixed, so just searching "Closed" bug reports should be sufficient. 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: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cannot Print Web-based Report in Netscape
You may try sending some expire headers, but probably won't help you Hakkan Lui wrote: Dear all, I used PHP to generate a report on a browser, using forms. When I print the report using Netscape->Print, a page with the following page appeared instead of the report. -- Data Missing This document resulted from a POST operation and has expired from the cache. If you wish you can repost the form data to recreate the document by pressing the "reload" button. -- How can I solve this problem? Or should I set the timeout value larger (currently 300)? P. S. This problem occurs only in Netscape, but not IE. Thanks for any help. Regards, Hakkan Lui -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query string???
on 19/11/02 12:31 AM, Marek Kilimajer ([EMAIL PROTECTED]) wrote: > instead of > if(empty($item)) { ... > I would recomend > if(is_numeric($item)) { ... very true -- thanks for picking that up! Justin French http://Indent.com.au Web Developent & Graphic Design -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: Problem with Class - incomplete object error
> -Original Message- > From: Paul [mailto:[EMAIL PROTECTED]] > Sent: 18 November 2002 11:49 > To: 'Tim Ward'; [EMAIL PROTECTED] > Subject: RE: [PHP] RE: Problem with Class - incomplete object error > > > Yes, I have included class definition on the top of the page. And are you 100% sure it's before your session_start()? > > The reason that was using $cart is the fact that I was calling > methods/functions of the object such as $cart->AddItem()..and > I was not > sure whether $_Session['cart']->AddItem would be a correct way or not Well, no, but $_SESSION['cart']->AddItem would...;)! 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: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] preg_replace_callback
Me again. I think this really badly documented in the documentation. I hope this is solved soon. To be more detailed: The preg_replace_callback()-function documentation says it is the same as the preg_replacec()-function, except for the second argument. Apparently, it is not, since it doesn't support multiple patterns to be recognized and replaced. I think this should be made clear. I suppose I'll be using the preg_replace(), then. Maybe I'll try to find the way-in-between, with the /e-modifier ... I thought the callback-variant was more elegant, but I have to get it to work, so ... Greetz, Bikeman "John W. Holmes" <[EMAIL PROTECTED]> wrote in message 006101c28e91$4609e190$7c02a8c0@coconut">news:006101c28e91$4609e190$7c02a8c0@coconut... > "callback" should be the name of a function that determines what the > matched pattern will be replaced with. > > Maybe you just need the regular preg_replace(), instead of the one with > callback? > > ---John Holmes... > > > -Original Message- > > From: Bikeman [mailto:[EMAIL PROTECTED]] > > Sent: Sunday, November 17, 2002 2:23 PM > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php- > > [EMAIL PROTECTED] > > Subject: [PHP] preg_replace_callback > > > > Hello. > > > > I have totally no clue at all wether I am posting in the right > newsgroup > > here, and I was not planning on caching all messages in my (first time > > used, > > I prefer Outlook) Outlook Express before searching. So if I am > disobeying > > all rules here ... I'm sorry ... I just am not an experienced news- > > service > > user ... > > > > Now, my question/remark/bug report. It concerns, ad you could guess, > the > > preg_replace_callback function. The manual is very short on this > > function, > > and the comments posted on the online-version of the manual, are not > > helping > > me, either ... I am trying to use this function as the regular > > preg_replace > > can be used, namely woth a patterns-array, a replacement-array (which > gets > > the callback-array) and a subject. This doesn't work, though ... It > > appears as if the callback-variant of the preg_replace version isn't > > capable > > of handling multiple patterns at a time. This is the error-message I > get: > > "Warning: preg_replace_callback() requires argument 2, 'Array', to be > a > > valid callback in ...". I pass it, as a second argument, an Array > that > > consists of strings containing the names of functions I defined later > in > > my > > php-file. (Hmmm ... Could that be the problem? Tha fact that I > define > > the > > functions AFTER I give the Array tot the functions? Don't think so, > > though > > ...) > > > > Did anybody have the same experience, or am I really doing something > > wrong? > > > > Tnx in advance for any reply!! > > > > Bikeman > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DOC] Re: [PHP] preg_replace_callback
On Mon, 18 Nov 2002, Bikeman wrote: > Me again. > > I think this really badly documented in the documentation. I hope this is > solved soon. To be more detailed: The preg_replace_callback()-function > documentation says it is the same as the preg_replacec()-function, except > for the second argument. Apparently, it is not, since it doesn't support > multiple patterns to be recognized and replaced. I think this should be > made clear. I suppose I'll be using the preg_replace(), then. Maybe I'll > try to find the way-in-between, with the /e-modifier ... I thought the > callback-variant was more elegant, but I have to get it to work, so ... Please file a bugreport in the "Documentation problem" so that we won't forget this. Derick > "John W. Holmes" <[EMAIL PROTECTED]> wrote in message > 006101c28e91$4609e190$7c02a8c0@coconut">news:006101c28e91$4609e190$7c02a8c0@coconut... > > "callback" should be the name of a function that determines what the > > matched pattern will be replaced with. > > > > Maybe you just need the regular preg_replace(), instead of the one with > > callback? > > > > ---John Holmes... > > > > > -Original Message- > > > From: Bikeman [mailto:[EMAIL PROTECTED]] > > > Sent: Sunday, November 17, 2002 2:23 PM > > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php- > > > [EMAIL PROTECTED] > > > Subject: [PHP] preg_replace_callback > > > > > > Hello. > > > > > > I have totally no clue at all wether I am posting in the right > > newsgroup > > > here, and I was not planning on caching all messages in my (first time > > > used, > > > I prefer Outlook) Outlook Express before searching. So if I am > > disobeying > > > all rules here ... I'm sorry ... I just am not an experienced news- > > > service > > > user ... > > > > > > Now, my question/remark/bug report. It concerns, ad you could guess, > > the > > > preg_replace_callback function. The manual is very short on this > > > function, > > > and the comments posted on the online-version of the manual, are not > > > helping > > > me, either ... I am trying to use this function as the regular > > > preg_replace > > > can be used, namely woth a patterns-array, a replacement-array (which > > gets > > > the callback-array) and a subject. This doesn't work, though ... It > > > appears as if the callback-variant of the preg_replace version isn't > > > capable > > > of handling multiple patterns at a time. This is the error-message I > > get: > > > "Warning: preg_replace_callback() requires argument 2, 'Array', to be > > a > > > valid callback in ...". I pass it, as a second argument, an Array > > that > > > consists of strings containing the names of functions I defined later > > in > > > my > > > php-file. (Hmmm ... Could that be the problem? Tha fact that I > > define > > > the > > > functions AFTER I give the Array tot the functions? Don't think so, > > > though > > > ...) > > > > > > Did anybody have the same experience, or am I really doing something > > > wrong? > > > > > > Tnx in advance for any reply!! > > > > > > Bikeman > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > -- > PHP Documentation Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What is wrong with this expression?
if (is_uploaded_file($_FILES["imagefile"]["tmp_name"]) && ($_FILES["imagefile"]["type"] != "image/jpeg" && $_FILES["imagefile"]["type"] != "image/gif" && $_FILES["imagefile"]["type"] != "image/jpg" && $_FILES["imagefile"]["type"] != "image/png")) I'm trying to weed out everything that isn't a .jpg, .gif, or .png. What's wrong with this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] howto pass javascript variable to php
You can still use onclick event to pass value kept in a javascript variable: function action(url) { location.href='http://www.domain.net/' + url + '&var=' + javascript_var; return false; } Jeff Bluemel wrote: it's easy enough to pass php variable to javascript, but doing this the other way around without a form submit, or location (passing as a php $_GET variable) seems to be a little nightmare. it's easy enough to do it with the form submit, or a location command. thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browsing directory
Helen, > I would like to create a web page which allow people to browse the directory structure and the files listed in every directory. If you have experience about that, could you kindly give me some advice or references? Thanks in advance. =To this simple boy it seems like a strange, even a potentially insecure sort of thing to do, but ... =Suggest you don't try to implement in PHP. Use your web server, eg Apache, and allow it to display the filesystem if no index.htm or default.htm web page is available. =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Undefined variables?
I installed php 4.2.3 on Apache2. When I write I get an error message telling me that I have an undefined variable $anyvariable. Is this something new that one must declare all variables? In my previous version of php the expression above would return an empty string - no error messages... Hope you understand my problem... Martin Magnusson
Re: [PHP] Problem with Class - incomplete object error
As noted in the error, you must declare the class definition _before_ session_start(): require_once('includes/cart.php'); session_start(); methods are not stored within session Paul wrote: Hi All: I have a simple page that checks for existence of object in a session. If the object is not stored in session object, it creates new one: If (isset ($_SESSION["cart"])) { $cart=$_SESSION["cart"]; } else { $cart = new ShoppingCart (); $_SESSION["cart"]= $cart; } So the object cart is available in every page. At this point the cart is a simple class: class ShoppingCart { var $items = array(); function AddItem ($item){ if ($this->items[$item]) { $this->items[$item]=$this->items[$item]+1; } else { $this->items[$item]=1; } } // additem } So the cart is either retrieved from the session or created (if non existent), however, every time the script calls : $cart->AddItem($_GET['item_id']); I get the following error: Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition shoppingcart of the object you are trying to operate on was loaded _before_ the session was started in on line 59 Where line 59 is pointing to $cart->AddItem($_GET['item_id']) Session_start is present in every page. Could anyone help me understand where the problem is? Thanks Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] explicit dot in open_basedir
Hi, I am using PHP 4.2.2 and would like to know what is the expected behavior when I don't put an explicit dot in the open_basedir path. Should I be able to open a file in "./tmp" ? Another question: let's say my document root is /www and I put a /www in open_basedir, then should I be able to open a file in "./tmp", which is a subdir under /www/marc? Thanks, Marc Delisle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Undefined variables?
At 15:57 18.11.2002, Martin Magnusson spoke out and said: [snip] >I installed php 4.2.3 on Apache2. > >When I write I get an error message telling me that >I have an undefined variable $anyvariable. Is this something new that one >must declare all variables? > >In my previous version of php the expression above would return an empty >string - no error messages... [snip] This is defined by the setting of error_reporting in your php.ini file. What you get is not an error but a notice message that you are using an undefined variable. This can be handy if you want to spot the error when your script doesn't behave like it should... anyway, to turn it off: - in php.ini: error_reporting = E_ALL & ~E_NOTICE - in your script: error_reporting(E_ALL & ~E_NOTICE); - avoiding this: if (isset($anyvariable)) echo $anyvariable; -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/
Re: [PHP] howto pass javascript variable to php
I apologize - javascript. Jeff "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You can still use onclick event to pass value kept in a javascript variable: > > > > function action(url) { > location.href='http://www.domain.net/' + url + '&var=' + javascript_var; > return false; > } > > Jeff Bluemel wrote: > > >it's easy enough to pass php variable to javascript, but doing this the > >other way around without a form submit, or location (passing as a php $_GET > >variable) seems to be a little nightmare. it's easy enough to do it with > >the form submit, or a location command. > > > >thanks, > > > >Jeff > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query to select every other record
You need this: while($row=mysql_fetch_array($res)) { echo first column; if($row=mysql_fetch_array($res)) { echo second column; } } Darren McPhee wrote: Does anybody know of a SELECT QUERY that will select every other record of a table ? I want to do this so that I can display my products in 2 columns (I will also be using arrays of course). The first column would show the result of the first query starting at record 1. The second column would show the result of the second query starting at record 2. Each query just needs to skip a record so that products are ordered correctly (1,2 in first row. 3,4 in second row...) And I want the query to work without relying on ID fields. The reason being is that when you delete a record, you can end up with a column ID of say 1,2,3,5 (like if you delete record 4). Originally, I set up my tables up using Dreamweaver with repeat regions. But that's only ok if you want one record per row going down vertically. The Macromedia web site does show you how to display all your records repeating horizontally but doesn't tell you how to limit to 2 columns. So both ways are useless to me. Darren. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with variables in email
Seems to me that you are missing the opening and closing PHP tags () Quoting Clint Tredway <[EMAIL PROTECTED]>: ### I am trying to send an email with form vars inside it but I cannot seem ### to get the vars to be parsed. ### ### Here is my code: ### /* message */ ### $message = ' ### ### ### Products Purchased: ### ### ### Customer Information: ### ### ### Name ### {$name} ### ### ### Title ### .$title. ### ### ### Email ### .$email. ### ### ### Company ### .$company. ### ### ### Phone ### .$phone. ### ### ### Fax ### .$fax. ### ### ### Address ### .$address. ### ### ### City ### .$city. ### ### ### State ### .$state. ### ### ### Postal Code ### .$postalcode. ### ### ### Country ### .$country. ### ### ### ### ### ### Billing Information ### ### ### Card Type ### .$methodofpay. ### ### ### Card Name ### .$cardname. ### ### ### Exp Date ### .$cardexp. ### ### ### ### ### '; ### ### This outputs this: ### Customer Information: ### ### Name {$name} ### Title .$title. ### Email .$email. ### Company .$company. ### Phone .$phone. ### Fax .$fax. ### Address .$address. ### City .$city. ### State .$state. ### Postal Code .$postalcode. ### Country .$country. ### ### Billing Information ### Card Type .$methodofpay. ### Card Name .$cardname. ### Exp Date .$cardexp. ### ### Please help me figure this out. I know its simple, but I cannot see it ### ;) ### ### Thanks, ### Clint ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with variables in email
I just pulled out the code that I needed help with. I did as was suggested before and now it only outputs to the first variable. I still need some help with this.. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 9:11 AM To: Clint Tredway Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Help with variables in email Seems to me that you are missing the opening and closing PHP tags () Quoting Clint Tredway <[EMAIL PROTECTED]>: ### I am trying to send an email with form vars inside it but I cannot seem ### to get the vars to be parsed. ### ### Here is my code: ### /* message */ ### $message = ' ### ### ### Products Purchased: ### ### ### Customer Information: ### ### ### Name ### {$name} ### ### ### Title ### .$title. ### ### ### Email ### .$email. ### ### ### Company ### .$company. ### ### ### Phone ### .$phone. ### ### ### Fax ### .$fax. ### ### ### Address ### .$address. ### ### ### City ### .$city. ### ### ### State ### .$state. ### ### ### Postal Code ### .$postalcode. ### ### ### Country ### .$country. ### ### ### ### ### ### Billing Information ### ### ### Card Type ### .$methodofpay. ### ### ### Card Name ### .$cardname. ### ### ### Exp Date ### .$cardexp. ### ### ### ### ### '; ### ### This outputs this: ### Customer Information: ### ### Name {$name} ### Title .$title. ### Email .$email. ### Company .$company. ### Phone .$phone. ### Fax .$fax. ### Address .$address. ### City .$city. ### State .$state. ### Postal Code .$postalcode. ### Country .$country. ### ### Billing Information ### Card Type .$methodofpay. ### Card Name .$cardname. ### Exp Date .$cardexp. ### ### Please help me figure this out. I know its simple, but I cannot see it ### ;) ### ### Thanks, ### Clint ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What is wrong with this expression?
Nothing I can see. What is not working? JohnMeyer wrote: if (is_uploaded_file($_FILES["imagefile"]["tmp_name"]) && ($_FILES["imagefile"]["type"] != "image/jpeg" && $_FILES["imagefile"]["type"] != "image/gif" && $_FILES["imagefile"]["type"] != "image/jpg" && $_FILES["imagefile"]["type"] != "image/png")) I'm trying to weed out everything that isn't a .jpg, .gif, or .png. What's wrong with this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with variables in email
On Monday 18 November 2002 23:19, Clint Tredway wrote: > I just pulled out the code that I needed help with. > > I did as was suggested before and now it only outputs to the first > variable. > ### .$title. You did not do as was suggested. You need to do something like: $message = 'some html stuff and now here comes a variable called name ' . $name . ' and some more html and another variable ' . $title . ' etc etc'; Try something simple first with a couple of lines. When you get the hang on of it then build something more complex. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Schshschshchsch. -- The Gorn, "Arena", stardate 3046.2 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imap_open
> >That's not actually true. The imap functions are an abstraction on top of > >many different backends, not just imap. You can talk to pop and nntp > >servers as well, for example, and yes, even a local mailstore with no > >server involved at all. > > Oops, my mistake. I was not aware. And of course I see now the > second sentence on the IMAP documentation which says "local mailbox > access methods". Is there any more documentation on using this > approach? Yes, see the c-client docs. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SQLCODE=-930
could somebody tell me why libphp4.so (php-4.2.3 --with-informix, httpd-2.43, RH8, Intel) links against libthasf.so libthgen.so libthos.so libthsql.so and misses libifasf.so libifgen.so libifos.so libifsql.so 4.2.2 works fine with these libs and does not have the above ones. and why do i have to set LDFLAGS="-L/opt/informix/lib -L/opt/informix/lib/esql -L/tmp/src/php-4.2.3/ext/informix" i saw something like this in the macro file (/ext/informix/config.m4): PHP_ADD_LIBPATH($INFORMIXDIR/lib, INFORMIX_SHARED_LIBADD) PHP_ADD_LIBPATH($INFORMIXDIR/lib/esql, INFORMIX_SHARED_LIBADD) (INFORMIXDIR is set) php-4.2.3: libdl.so.2 => /lib/libdl.so.2 (0x40192000) libpam.so.0 => /lib/libpam.so.0 (0x40196000) libthsql.so => /opt/informix/lib/esql/libthsql.so (0x4019e000) libthasf.so => /opt/informix/lib/libthasf.so (0x401e1000) libthgen.so => /opt/informix/lib/esql/libthgen.so (0x40217000) libthos.so => /opt/informix/lib/esql/libthos.so (0x40269000) libifgls.so => /lib/libifgls.so (0x4028) libcrypt.so.1 => /lib/libcrypt.so.1 (0x402bb000) libifglx.so => /lib/libifglx.so (0x402e8000) libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402ea000) libpspell.so.4 => /usr/lib/libpspell.so.4 (0x4030a000) libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40323000) libgmp.so.3 => /usr/lib/libgmp.so.3 (0x40362000) libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x4038f000) libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403c) libz.so.1 => /usr/lib/libz.so.1 (0x403e3000) libdb-4.0.so => /lib/libdb-4.0.so (0x403f1000) libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40499000) libcurl.so.2 => /usr/lib/libcurl.so.2 (0x404a) libbz2.so.1 => /usr/lib/libbz2.so.1 (0x404c2000) libssl.so.2 => /lib/libssl.so.2 (0x404d1000) libcrypto.so.2 => /lib/libcrypto.so.2 (0x40501000) libresolv.so.2 => /lib/libresolv.so.2 (0x405d5000) libm.so.6 => /lib/i686/libm.so.6 (0x405e7000) libttf.so.2 => /usr/lib/libttf.so.2 (0x40609000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4063) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40679000) libnsl.so.1 => /lib/libnsl.so.1 (0x40697000) libxml2.so.2 => /usr/lib/libxml2.so.2 (0x406ac000) libc.so.6 => /lib/i686/libc.so.6 (0x4200) libltdl.so.3 => /usr/lib/libltdl.so.3 (0x40754000) libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1 (0x4075c000) libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4075e000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4081) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) php-4.2.2: libdl.so.2 => /lib/libdl.so.2 (0x40184000) libpam.so.0 => /lib/libpam.so.0 (0x40188000) libifsql.so => /lib/libifsql.so (0x4019) libifasf.so => /lib/libifasf.so (0x401d) libifgen.so => /lib/libifgen.so (0x40206000) libifos.so => /lib/libifos.so (0x40254000) libifgls.so => /lib/libifgls.so (0x40268000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x402a3000) libifglx.so => /lib/libifglx.so (0x402d) libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402d2000) libpspell.so.4 => /usr/lib/libpspell.so.4 (0x402f2000) libncurses.so.5 => /usr/lib/libncurses.so.5 (0x4030b000) libgmp.so.3 => /usr/lib/libgmp.so.3 (0x4034a000) libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x40377000) libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403a8000) libz.so.1 => /usr/lib/libz.so.1 (0x403cb000) libm.so.6 => /lib/i686/libm.so.6 (0x403d9000) libxml2.so.2 => /usr/lib/libxml2.so.2 (0x403fb000) libdb-4.0.so => /lib/libdb-4.0.so (0x404a3000) libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4054c000) libcurl.so.2 => /usr/lib/libcurl.so.2 (0x40553000) libcrypto.so.2 => /lib/libcrypto.so.2 (0x40574000) libssl.so.2 => /lib/libssl.so.2 (0x40648000) libbz2.so.1 => /usr/lib/libbz2.so.1 (0x40678000) libresolv.so.2 => /lib/libresolv.so.2 (0x40687000) libttf.so.2 => /usr/lib/libttf.so.2 (0x4069a000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x406c) libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40709000) libnsl.so.1 => /lib/libnsl.so.1 (0x40727000) libc.so.6 => /lib/i686/libc.so.6 (0x4200) libltdl.so.3 => /usr/lib/libltdl.so.3 (0x4073c000) libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1 (0x40744000) libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40746000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x407f8000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] post files array and registered globals off
you need to do it another way, e.g.: for($i=0; $i < MAX_FILES; $i++) { if(!$_FILES['photo']['tmp_name']) break; ... now work with the file. } electroteque wrote: hi i need to do a foreach on post files array ie _REQUEST['photo'] or _POST['photo'] doesnt work only _FILES['photo'] works and if i do a foreach on this it gets the 5 associated array values for it not on the input value array ? say i had 2 input files i should get a count of 2 not 5 :| -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD imagettftext problem
Hi, I create images on the fly using imagettftext my isp recently upgraded apache and the images no longer appear. here's the example given in the manual with imagettftext() i've commented out the content type so you can see the error http://www.sitestogo.biz/testimage.php and here's phpinfo(). http://217.114.163.70/info.php tia adrian murphy - Original Message - From: "Oliver Fänger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, November 18, 2002 3:42 PM Subject: [PHP] Re: SQLCODE=-930 > could somebody tell me why libphp4.so (php-4.2.3 --with-informix, > httpd-2.43, RH8, Intel) links against > > libthasf.so > libthgen.so > libthos.so > libthsql.so > > and misses > > libifasf.so > libifgen.so > libifos.so > libifsql.so > > 4.2.2 works fine with these libs and does not have the above ones. > > and why do i have to set LDFLAGS="-L/opt/informix/lib > -L/opt/informix/lib/esql -L/tmp/src/php-4.2.3/ext/informix" > > i saw something like this in the macro file (/ext/informix/config.m4): > > PHP_ADD_LIBPATH($INFORMIXDIR/lib, INFORMIX_SHARED_LIBADD) > PHP_ADD_LIBPATH($INFORMIXDIR/lib/esql, INFORMIX_SHARED_LIBADD) > > (INFORMIXDIR is set) > > php-4.2.3: > libdl.so.2 => /lib/libdl.so.2 (0x40192000) > libpam.so.0 => /lib/libpam.so.0 (0x40196000) > libthsql.so => /opt/informix/lib/esql/libthsql.so (0x4019e000) > libthasf.so => /opt/informix/lib/libthasf.so (0x401e1000) > libthgen.so => /opt/informix/lib/esql/libthgen.so (0x40217000) > libthos.so => /opt/informix/lib/esql/libthos.so (0x40269000) > libifgls.so => /lib/libifgls.so (0x4028) > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402bb000) > libifglx.so => /lib/libifglx.so (0x402e8000) > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402ea000) > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x4030a000) > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40323000) > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x40362000) > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x4038f000) > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403c) > libz.so.1 => /usr/lib/libz.so.1 (0x403e3000) > libdb-4.0.so => /lib/libdb-4.0.so (0x403f1000) > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40499000) > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x404a) > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x404c2000) > libssl.so.2 => /lib/libssl.so.2 (0x404d1000) > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40501000) > libresolv.so.2 => /lib/libresolv.so.2 (0x405d5000) > libm.so.6 => /lib/i686/libm.so.6 (0x405e7000) > libttf.so.2 => /usr/lib/libttf.so.2 (0x40609000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4063) > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40679000) > libnsl.so.1 => /lib/libnsl.so.1 (0x40697000) > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x406ac000) > libc.so.6 => /lib/i686/libc.so.6 (0x4200) > libltdl.so.3 => /usr/lib/libltdl.so.3 (0x40754000) > libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1 > (0x4075c000) > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4075e000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4081) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) > > > php-4.2.2: > > libdl.so.2 => /lib/libdl.so.2 (0x40184000) > libpam.so.0 => /lib/libpam.so.0 (0x40188000) > libifsql.so => /lib/libifsql.so (0x4019) > libifasf.so => /lib/libifasf.so (0x401d) > libifgen.so => /lib/libifgen.so (0x40206000) > libifos.so => /lib/libifos.so (0x40254000) > libifgls.so => /lib/libifgls.so (0x40268000) > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402a3000) > libifglx.so => /lib/libifglx.so (0x402d) > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402d2000) > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x402f2000) > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x4030b000) > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x4034a000) > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x40377000) > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403a8000) > libz.so.1 => /usr/lib/libz.so.1 (0x403cb000) > libm.so.6 => /lib/i686/libm.so.6 (0x403d9000) > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x403fb000) > libdb-4.0.so => /lib/libdb-4.0.so (0x404a3000) > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4054c000) > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x40553000) > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40574000) > libssl.so.2 => /lib/libssl.so.2 (0x40648000) > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x40678000) > libresolv.so.2 => /lib/libresolv.so.2 (0x40687000) > libttf.so.2 => /usr/lib/libttf.so.2 (0x4069a000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x406c) > libjpeg.so.62
Re: [PHP] Re: SQLCODE=-930
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 arf ... I failed to compile php 4.2.2 du to compiling error in sapi/apachefilter module for http2.0.43 on a RH 7.2 it's not my days Le Lundi 18 Novembre 2002 15:42, Oliver Fänger a écrit : > could somebody tell me why libphp4.so (php-4.2.3 --with-informix, > httpd-2.43, RH8, Intel) links against > > libthasf.so > libthgen.so > libthos.so > libthsql.so > > and misses > > libifasf.so > libifgen.so > libifos.so > libifsql.so > > 4.2.2 works fine with these libs and does not have the above ones. > > and why do i have to set LDFLAGS="-L/opt/informix/lib > -L/opt/informix/lib/esql -L/tmp/src/php-4.2.3/ext/informix" > > i saw something like this in the macro file (/ext/informix/config.m4): > > PHP_ADD_LIBPATH($INFORMIXDIR/lib, INFORMIX_SHARED_LIBADD) > PHP_ADD_LIBPATH($INFORMIXDIR/lib/esql, INFORMIX_SHARED_LIBADD) > > (INFORMIXDIR is set) > > php-4.2.3: > libdl.so.2 => /lib/libdl.so.2 (0x40192000) > libpam.so.0 => /lib/libpam.so.0 (0x40196000) > libthsql.so => /opt/informix/lib/esql/libthsql.so (0x4019e000) > libthasf.so => /opt/informix/lib/libthasf.so (0x401e1000) > libthgen.so => /opt/informix/lib/esql/libthgen.so (0x40217000) > libthos.so => /opt/informix/lib/esql/libthos.so (0x40269000) > libifgls.so => /lib/libifgls.so (0x4028) > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402bb000) > libifglx.so => /lib/libifglx.so (0x402e8000) > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402ea000) > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x4030a000) > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40323000) > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x40362000) > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x4038f000) > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403c) > libz.so.1 => /usr/lib/libz.so.1 (0x403e3000) > libdb-4.0.so => /lib/libdb-4.0.so (0x403f1000) > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40499000) > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x404a) > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x404c2000) > libssl.so.2 => /lib/libssl.so.2 (0x404d1000) > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40501000) > libresolv.so.2 => /lib/libresolv.so.2 (0x405d5000) > libm.so.6 => /lib/i686/libm.so.6 (0x405e7000) > libttf.so.2 => /usr/lib/libttf.so.2 (0x40609000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4063) > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40679000) > libnsl.so.1 => /lib/libnsl.so.1 (0x40697000) > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x406ac000) > libc.so.6 => /lib/i686/libc.so.6 (0x4200) > libltdl.so.3 => /usr/lib/libltdl.so.3 (0x40754000) > libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1 > (0x4075c000) > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4075e000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4081) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) > > > php-4.2.2: > > libdl.so.2 => /lib/libdl.so.2 (0x40184000) > libpam.so.0 => /lib/libpam.so.0 (0x40188000) > libifsql.so => /lib/libifsql.so (0x4019) > libifasf.so => /lib/libifasf.so (0x401d) > libifgen.so => /lib/libifgen.so (0x40206000) > libifos.so => /lib/libifos.so (0x40254000) > libifgls.so => /lib/libifgls.so (0x40268000) > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402a3000) > libifglx.so => /lib/libifglx.so (0x402d) > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402d2000) > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x402f2000) > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x4030b000) > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x4034a000) > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x40377000) > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403a8000) > libz.so.1 => /usr/lib/libz.so.1 (0x403cb000) > libm.so.6 => /lib/i686/libm.so.6 (0x403d9000) > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x403fb000) > libdb-4.0.so => /lib/libdb-4.0.so (0x404a3000) > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4054c000) > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x40553000) > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40574000) > libssl.so.2 => /lib/libssl.so.2 (0x40648000) > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x40678000) > libresolv.so.2 => /lib/libresolv.so.2 (0x40687000) > libttf.so.2 => /usr/lib/libttf.so.2 (0x4069a000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x406c) > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40709000) > libnsl.so.1 => /lib/libnsl.so.1 (0x40727000) > libc.so.6 => /lib/i686/libc.so.6 (0x4200) > libltdl.so.3 => /usr/lib/libltdl.so.3 (0x4073c000) > libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1 > (0x40744000) >
Re: [PHP] What is wrong with this expression?
JohnMeyer > if (is_uploaded_file($_FILES["imagefile"]["tmp_name"]) && > ($_FILES["imagefile"]["type"] != "image/jpeg" && > $_FILES["imagefile"]["type"] != "image/gif" && $_FILES["imagefile"]["type"] > != "image/jpg" && $_FILES["imagefile"]["type"] != "image/png")) > > I'm trying to weed out everything that isn't a .jpg, .gif, or .png. What's > wrong with this? =when you have a complex question, simplify! =It would be called the KISS principle if you were better looking! =It doesn't seem to be bothering you, so let's assume that the is_uploaded section works. =First let's plug in an imagefile-type of .TIF TIF != "image/jpeg" is true TIF != "image/gif" is true TIF != "image/jpg" is true TIF != "image/png" is true =So true AND true AND true AND true is true, and presumably you will "weed out" that file***. But... =next let's plug in an imagefile-type of .GIF TIF != "image/jpeg" is true TIF != "image/gif" is false TIF != "image/jpg" is true TIF != "image/png" is true =So true AND false AND true AND true is false, and presumably you will "weed in" that file***. But... =Let's come back to that first phrase that looked so good: is_uploaded_file($_FILES["imagefile"]["tmp_name"]) =(***with such limited visibility as you have afforded us - an incomplete PHP statement -> cries of "unfair" are heard in the land!) It seems that if this is an uploaded file the logic will result in true, but if it is not, false. =Now add that to the above: our .TIF resulted in true so an uploaded file that is in .TIF format will be weeded out. But... =our .GIF resulted in false so regardless of whether we have an uploaded file or not, the result of the ANDs must be false! In other words, a JP(e)G, GIF, or .PNG file will be treated in the same way as a non-uploaded file!? Should the is_uploaded_file() question be separated from the question about the (un)acceptable types of file? =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GD imagettftext problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hum it seems that the freetype support is broken . also phpinfo() lokk like telling it work it seems to failed Le Lundi 18 Novembre 2002 15:56, [EMAIL PROTECTED] a écrit : > Hi, > I create images on the fly using imagettftext > my isp recently upgraded apache and the > images no longer appear. > > here's the example given in the manual with imagettftext() > i've commented out the content type so you can see > the error > http://www.sitestogo.biz/testimage.php > > and here's phpinfo(). > > http://217.114.163.70/info.php > > tia > adrian murphy > > > > - Original Message - > From: "Oliver Fänger" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, November 18, 2002 3:42 PM > Subject: [PHP] Re: SQLCODE=-930 > > > could somebody tell me why libphp4.so (php-4.2.3 --with-informix, > > httpd-2.43, RH8, Intel) links against > > > > libthasf.so > > libthgen.so > > libthos.so > > libthsql.so > > > > and misses > > > > libifasf.so > > libifgen.so > > libifos.so > > libifsql.so > > > > 4.2.2 works fine with these libs and does not have the above ones. > > > > and why do i have to set LDFLAGS="-L/opt/informix/lib > > -L/opt/informix/lib/esql -L/tmp/src/php-4.2.3/ext/informix" > > > > i saw something like this in the macro file (/ext/informix/config.m4): > > > > PHP_ADD_LIBPATH($INFORMIXDIR/lib, INFORMIX_SHARED_LIBADD) > > PHP_ADD_LIBPATH($INFORMIXDIR/lib/esql, INFORMIX_SHARED_LIBADD) > > > > (INFORMIXDIR is set) > > > > php-4.2.3: > > libdl.so.2 => /lib/libdl.so.2 (0x40192000) > > libpam.so.0 => /lib/libpam.so.0 (0x40196000) > > libthsql.so => /opt/informix/lib/esql/libthsql.so (0x4019e000) > > libthasf.so => /opt/informix/lib/libthasf.so (0x401e1000) > > libthgen.so => /opt/informix/lib/esql/libthgen.so (0x40217000) > > libthos.so => /opt/informix/lib/esql/libthos.so (0x40269000) > > libifgls.so => /lib/libifgls.so (0x4028) > > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402bb000) > > libifglx.so => /lib/libifglx.so (0x402e8000) > > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402ea000) > > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x4030a000) > > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40323000) > > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x40362000) > > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x4038f000) > > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403c) > > libz.so.1 => /usr/lib/libz.so.1 (0x403e3000) > > libdb-4.0.so => /lib/libdb-4.0.so (0x403f1000) > > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40499000) > > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x404a) > > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x404c2000) > > libssl.so.2 => /lib/libssl.so.2 (0x404d1000) > > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40501000) > > libresolv.so.2 => /lib/libresolv.so.2 (0x405d5000) > > libm.so.6 => /lib/i686/libm.so.6 (0x405e7000) > > libttf.so.2 => /usr/lib/libttf.so.2 (0x40609000) > > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4063) > > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40679000) > > libnsl.so.1 => /lib/libnsl.so.1 (0x40697000) > > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x406ac000) > > libc.so.6 => /lib/i686/libc.so.6 (0x4200) > > libltdl.so.3 => /usr/lib/libltdl.so.3 (0x40754000) > > libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1 > > (0x4075c000) > > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4075e000) > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4081) > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x8000) > > > > > > php-4.2.2: > > > > libdl.so.2 => /lib/libdl.so.2 (0x40184000) > > libpam.so.0 => /lib/libpam.so.0 (0x40188000) > > libifsql.so => /lib/libifsql.so (0x4019) > > libifasf.so => /lib/libifasf.so (0x401d) > > libifgen.so => /lib/libifgen.so (0x40206000) > > libifos.so => /lib/libifos.so (0x40254000) > > libifgls.so => /lib/libifgls.so (0x40268000) > > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402a3000) > > libifglx.so => /lib/libifglx.so (0x402d) > > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402d2000) > > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x402f2000) > > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x4030b000) > > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x4034a000) > > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x40377000) > > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403a8000) > > libz.so.1 => /usr/lib/libz.so.1 (0x403cb000) > > libm.so.6 => /lib/i686/libm.so.6 (0x403d9000) > > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x403fb000) > > libdb-4.0.so => /lib/libdb-4.0.so (0x404a3000) > > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x
[PHP] best php ide
What is everyone's opinion of the best php ide? Preferably a free one? I currently just use multiedit but downloaded phpcoder this weekend. Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] best php ide
Edward Peloke wrote: What is everyone's opinion of the best php ide? Preferably a free one? I currently just use multiedit but downloaded phpcoder this weekend. This is regularly asked. The archives will give you all the views you need. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems with Caching
When I upgraded to 4.2.3 from 4.2.2 I no longer am able to see HTML before PHP code that takes a while to process. I made sure that I've set "output_buffering =off" but I still have this problem. When I hit the page with the following code on my server, it will wait 10 secs before it displays any of the HTML on the page. I want it to display the HTML at the top and then execute the code after the PHP block when the PHP has finished. This code worked in 4.2.2 but no longer. :-( Example code: Working... DONE! Does anyone know what setting has caused this code to no longer work like it did in 4.2.2? Any input would be helpful. Thanks, Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Undefined variables?
set error reporting to 55 -- Maxim Maletsky [EMAIL PROTECTED] "Martin Magnusson" <[EMAIL PROTECTED]> wrote... : > I installed php 4.2.3 on Apache2. > > When I write I get an error message telling me that > I have an undefined variable $anyvariable. Is this something new that one > must declare all variables? > > In my previous version of php the expression above would return an empty > string - no error messages... > > Hope you understand my problem... > > Martin Magnusson > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with Caching
try calling implicitly flush() function: Example code: Working... -- Maxim Maletsky [EMAIL PROTECTED] "Adam Humphrey" <[EMAIL PROTECTED]> wrote... : > When I upgraded to 4.2.3 from 4.2.2 I no longer am able to see HTML before > PHP code that takes a while to process. > > I made sure that I've set "output_buffering =off" but I still have this > problem. > > When I hit the page with the following code on my server, it will wait 10 > secs before it displays any of the HTML on the page. I want it to display > the HTML at the top and then execute the code after the PHP block when the > PHP has finished. This code worked in 4.2.2 but no longer. :-( > > Example code: > Working... > sleep ( 10 ); > ?> > > DONE! > > > > > Does anyone know what setting has caused this code to no longer work like it > did in 4.2.2? > > Any input would be helpful. > > Thanks, > > Adam > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with variables in email
add single quote ['] before and after every dot [.] : /* message */ $message = ' Products Purchased: Customer Information: Name '.$name.' Title '.$title.' Email '.$email.' . . .. . ... -- Maxim Maletsky [EMAIL PROTECTED] "Clint Tredway" <[EMAIL PROTECTED]> wrote... : > I am trying to send an email with form vars inside it but I cannot seem > to get the vars to be parsed. > > Here is my code: > /* message */ > $message = ' > > >Products Purchased: > > > Customer Information: > > > Name > {$name} > > > Title > .$title. > > > Email > .$email. > > > Company > .$company. > > > Phone > .$phone. > > > Fax > .$fax. > > > Address > .$address. > > > City > .$city. > > > State > .$state. > > > Postal Code > .$postalcode. > > > Country > .$country. > > > > > > Billing Information > > > Card Type > .$methodofpay. > > > Card Name > .$cardname. > > > Exp Date > .$cardexp. > > > > > '; > > This outputs this: > Customer Information: > > Name {$name} > Title .$title. > Email .$email. > Company .$company. > Phone .$phone. > Fax .$fax. > Address .$address. > City .$city. > State .$state. > Postal Code .$postalcode. > Country .$country. > > Billing Information > Card Type .$methodofpay. > Card Name .$cardname. > Exp Date .$cardexp. > > Please help me figure this out. I know its simple, but I cannot see it > ;) > > Thanks, > Clint > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems with Caching
check the value of output_handler or try calling flush() before the code. Did you not change anything in apache? Adam Humphrey wrote: When I upgraded to 4.2.3 from 4.2.2 I no longer am able to see HTML before PHP code that takes a while to process. I made sure that I've set "output_buffering =off" but I still have this problem. When I hit the page with the following code on my server, it will wait 10 secs before it displays any of the HTML on the page. I want it to display the HTML at the top and then execute the code after the PHP block when the PHP has finished. This code worked in 4.2.2 but no longer. :-( Example code: Working... sleep ( 10 ); ?> DONE!
Does anyone know what setting has caused this code to no longer work like it did in 4.2.2? Any input would be helpful. Thanks, Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Newbie question
Steps: 1. Install PHP. Already installed? 2. make a file accessible via browser and call it test.php 3. put this into it: "; phpinfo(); ?> 4. Now, access that file. If you see "Hello World" outputted followed by a long blue-gray table with lots of server data - means everything worked and you could go to the sites like PHP Beginner (www.phpbeginner.com) or many others to read some tutorials and still code to keep testing. If you get asked to download a .php file then make sure you installed your PHP with Apache right (requires some editing of httpd.conf, read the manual) Cheers, -- Maxim Maletsky [EMAIL PROTECTED] Bryan Cassidy <[EMAIL PROTECTED]> wrote... : > This might sound stupid but what the hell. I am running Red Hat 8.0 > with Apache. I have apache working fine right now. I am wanting to > learn some php but really don't know where to start/look or anything > to tell the truth. I do "everything" from my FreeBSD 4.6.2 box but > Apache runs on Red Hat. With me? Could someone give me a very "basic" > PHP script or whatever they are called, tell me where I "should" or > "need" to put it on my Red Hat 8.0 box and what else I need to do to > see the script on my webpage? Put it like this. I will make a html > file in /var/www/html/ called php and inside php i will make a file > named php.ini ( i think it should be .ini right?) and I will edit my > index.html file, add a link and point it to the php.ini file and see > what happens. I just want to get a very basic idea of php, what it > does, where to put the php file and how to get started on the web. I > really hope this e-mail doesn't get ignored so could someone just help > me out a lil bit here? I would appreciate it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browsing directory
look at here: www.php.net/dir -- Maxim Maletsky [EMAIL PROTECTED] Helen Muller <[EMAIL PROTECTED]> wrote... : > > I would like to create a web page which allow people to browse the directory >structure and the files listed in every directory. If you have experience about that, >could you kindly give me some advice or references? Thanks in advance. > > Cheers, > > Helen > > > > > > > - > Get a bigger mailbox -- choose a size that fits your needs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Post Problem
I'm running php-4.2.2-8.0.5 on Redhat 8.0 Lately I've noticed that when doing a form, listbox variables have funky values in certain situations. Unfortunately, I haven't been to determined what the certain situation is. Here's an example. Here is the listbox in the form: 4 6 After clicking submit, when I echo the variable in the post script,I get the following results: SQN=4 I should get the value "4" Doing an echo "$_POST[SQN] "; yields the same results. I didn't start seeing this until this week. I don't know what changed, but it only happens with certain variables on certain posts. Anyone else seen this type of behavior? :) Dave -- "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly)" OSIS Dave J. Hala Jr. 641.485.1606 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sunrise/sunset programs?
I saw some similar code once... But PHP does not have it installed by default. Try searching on Google, HotScripts and SourceForge... I'm sure you will come up with something -- Maxim Maletsky [EMAIL PROTECTED] "Adam" <[EMAIL PROTECTED]> wrote... : > Does anyone know if PHP has the capabilities of being able to calculate > sunrise/sunset times by entering longitude/latitude values if someone was > smart enough to write code for it? If not, is there any > programs/applications around that allow for times to be entered into php > after values have been worked out by the program/app? > > Thanks for any help. > Adam. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] decode
where is that coming from? What encoding is that? Any info of the "b abbab abbab baaba" part? -- Maxim Maletsky [EMAIL PROTECTED] "Roman Duriancik" <[EMAIL PROTECTED]> wrote... : > Please Help me ! > This is not a php problem but if someone knows how to decode this : > I have document in encryption type : B*C*N**N but I don't know how do > decode. > for example : b abbab abbab baaba > > thanks > > roman > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
That is what you should be getting right? When you have a select statement that has a value as the first one then that is what you will get when you post or get the form. if you want a blank one then do and that should not pass anything in the post or get... On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > Lately I've noticed that when doing a form, listbox variables have funky > values in certain situations. Unfortunately, I haven't been to > determined what the certain situation is. > > Here's an example. > > Here is the listbox in the form: > > > 4 > 6 > > > > After clicking submit, when I echo the variable in the post script,I get > the following results: > SQN=4 > > I should get the value "4" > > Doing an echo "$_POST[SQN] "; yields the same results. > > > I didn't start seeing this until this week. I don't know what changed, > but it only happens with certain variables on certain posts. Anyone > else seen this type of behavior? > > > :) Dave > > -- > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > the Ugly)" > > OSIS > Dave J. Hala Jr. > 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explicit dot in open_basedir
The explicit dot is to tell the system that you want the current working directory. So by saying "./tmp" you want the tmp (directory or file) that is located in the current working directory. If i understand what you are saying is that "./tmp" is a directory in the current working directory. If there is a file in that directory that you can open then yes you should be able to open a file in that directory. just remember that "./" means that you want the current working directory. Also, "../" means that you want to move up one in the directory structure. On Mon, 2002-11-18 at 14:58, Marc Delisle wrote: > Hi, > > I am using PHP 4.2.2 and would like to know what is the expected behavior when > I don't put an explicit dot in the open_basedir path. > > Should I be able to open a file in "./tmp" ? > > Another question: let's say my document root is /www and I put a /www in >open_basedir, > then should I be able to open a file in "./tmp", which is a subdir under /www/marc? > > Thanks, > > Marc Delisle -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
No, he's saying that: echo $sqn; displays SQN=4. it should say simply 4 - Original Message - From: "BigDog" <[EMAIL PROTECTED]> To: "Dave J. Hala Jr." <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, November 18, 2002 4:33 AM Subject: Re: [PHP] Post Problem That is what you should be getting right? When you have a select statement that has a value as the first one then that is what you will get when you post or get the form. if you want a blank one then do and that should not pass anything in the post or get... On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > Lately I've noticed that when doing a form, listbox variables have funky > values in certain situations. Unfortunately, I haven't been to > determined what the certain situation is. > > Here's an example. > > Here is the listbox in the form: > > > 4 > 6 > > > > After clicking submit, when I echo the variable in the post script,I get > the following results: > SQN=4 > > I should get the value "4" > > Doing an echo "$_POST[SQN] "; yields the same results. > > > I didn't start seeing this until this week. I don't know what changed, > but it only happens with certain variables on certain posts. Anyone > else seen this type of behavior? > > > :) Dave > > -- > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > the Ugly)" > > OSIS > Dave J. Hala Jr. > 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
I selected the option that would have the value "4", what I get is "4SQN=4" I should get just the value "4" On Mon, 2002-11-18 at 04:33, BigDog wrote: > That is what you should be getting right? > > When you have a select statement that has a value as the first one then > that is what you will get when you post or get the form. > > if you want a blank one then do > > > and that should not pass anything in the post or get... > > > > On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: > > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > > > Lately I've noticed that when doing a form, listbox variables have funky > > values in certain situations. Unfortunately, I haven't been to > > determined what the certain situation is. > > > > Here's an example. > > > > Here is the listbox in the form: > > > > > > 4 > > 6 > > > > > > > > After clicking submit, when I echo the variable in the post script,I get > > the following results: > > SQN=4 > > > > I should get the value "4" > > > > Doing an echo "$_POST[SQN] "; yields the same results. > > > > > > I didn't start seeing this until this week. I don't know what changed, > > but it only happens with certain variables on certain posts. Anyone > > else seen this type of behavior? > > > > > > :) Dave > > > > -- > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > the Ugly)" > > > > OSIS > > Dave J. Hala Jr. > > 641.485.1606 > -- > .: B i g D o g :. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly)" OSIS Dave J. Hala Jr. 641.485.1606 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] echoing date of first and last day of current week.
Probably the best way is to convert the times all into seconds and then do the math to get the last day of the week. Should be relatively easy... HTH On Mon, 2002-11-18 at 05:57, Noodle Snacks wrote: > I want to get the unix timestamps of the first and last days of this week... > > Currently I have this: > > echo 'Words for the week from '.date('jS F Y',strtotime("last sunday")).' > to '.date('jS F Y',strtotime ("next saturday")).'.'; > > on saturday this showed the 10th to 23rd... Is there a good way to do this > mathematically (for speed) or can someone think of a better string to parse? > > > -- > JJ Harrison > [EMAIL PROTECTED] -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
What does the entire form look like? On Mon, 2002-11-18 at 17:43, Dave J. Hala Jr. wrote: > I selected the option that would have the value "4", what I get is > "4SQN=4" I should get just the value "4" > > > On Mon, 2002-11-18 at 04:33, BigDog wrote: > > That is what you should be getting right? > > > > When you have a select statement that has a value as the first one then > > that is what you will get when you post or get the form. > > > > if you want a blank one then do > > > > > > and that should not pass anything in the post or get... > > > > > > > > On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: > > > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > > > > > Lately I've noticed that when doing a form, listbox variables have funky > > > values in certain situations. Unfortunately, I haven't been to > > > determined what the certain situation is. > > > > > > Here's an example. > > > > > > Here is the listbox in the form: > > > > > > > > > 4 > > > 6 > > > > > > > > > > > > After clicking submit, when I echo the variable in the post script,I get > > > the following results: > > > SQN=4 > > > > > > I should get the value "4" > > > > > > Doing an echo "$_POST[SQN] "; yields the same results. > > > > > > > > > I didn't start seeing this until this week. I don't know what changed, > > > but it only happens with certain variables on certain posts. Anyone > > > else seen this type of behavior? > > > > > > > > > :) Dave > > > > > > -- > > > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > > the Ugly)" > > > > > > OSIS > > > Dave J. Hala Jr. > > > 641.485.1606 > > -- > > .: B i g D o g :. > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > -- > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > the Ugly)" > > OSIS > Dave J. Hala Jr. > 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] echoing date of first and last day of current week.
probably, what you tried is the most elegant way. But, you got me: "mathematically" I did *this* for you: \n"; print_r($res); ?> Cheers, and thank my curiousity :) -- Maxim Maletsky [EMAIL PROTECTED] "Noodle Snacks" <[EMAIL PROTECTED]> wrote... : > I want to get the unix timestamps of the first and last days of this week... > > Currently I have this: > > echo 'Words for the week from '.date('jS F Y',strtotime("last sunday")).' > to '.date('jS F Y',strtotime ("next saturday")).'.'; > > on saturday this showed the 10th to 23rd... Is there a good way to do this > mathematically (for speed) or can someone think of a better string to parse? > > > -- > JJ Harrison > [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] testing
just mail: [EMAIL PROTECTED] :) You succeded though :) -- Maxim Maletsky [EMAIL PROTECTED] [EMAIL PROTECTED] wrote... : > > > not sure how to post > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
SQN: 4SQN=4 SQN: 4SQN=4 Nifcap - Export Checks Export Checks https://122.192.204.199/payment/tmp/checks_4SQN=4.zip";>checks_4SQN=4.zip https://122.192.204.199/payment/pay_menu.php";>Liheap Processing Menu https://122.192.204.199/main.php";>Main Menu https://122.192.204.199/logout.php";>Logout What does the entire form look like? > > > > On Mon, 2002-11-18 at 17:43, Dave J. Hala Jr. wrote: > > I selected the option that would have the value "4", what I get is > > "4SQN=4" I should get just the value "4" > > > > > > On Mon, 2002-11-18 at 04:33, BigDog wrote: > > > That is what you should be getting right? > > > > > > When you have a select statement that has a value as the first one then > > > that is what you will get when you post or get the form. > > > > > > if you want a blank one then do > > > > > > > > > and that should not pass anything in the post or get... > > > > > > > > > > > > On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: > > > > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > > > > > > > Lately I've noticed that when doing a form, listbox variables have funky > > > > values in certain situations. Unfortunately, I haven't been to > > > > determined what the certain situation is. > > > > > > > > Here's an example. > > > > > > > > Here is the listbox in the form: > > > > > > > > > > > > 4 > > > > 6 > > > > > > > > > > > > > > > > After clicking submit, when I echo the variable in the post script,I get > > > > the following results: > > > > SQN=4 > > > > > > > > I should get the value "4" > > > > > > > > Doing an echo "$_POST[SQN] "; yields the same results. > > > > > > > > > > > > I didn't start seeing this until this week. I don't know what changed, > > > > but it only happens with certain variables on certain posts. Anyone > > > > else seen this type of behavior? > > > > > > > > > > > > :) Dave > > > > > > > > -- > > > > > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > > > the Ugly)" > > > > > > > > OSIS > > > > Dave J. Hala Jr. > > > > 641.485.1606 > > > -- > > > .: B i g D o g :. > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > the Ugly)" > > > > OSIS > > Dave J. Hala Jr. > > 641.485.1606 > -- > .: B i g D o g :. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly)" OSIS Dave J. Hala Jr. 641.485.1606 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
but where is the form that you created... That was i can see what you have set up inside of the form tag... On Mon, 2002-11-18 at 17:51, Dave J. Hala Jr. wrote: > SQN: 4SQN=4 SQN: 4SQN=4 > > > > Nifcap - Export Checks > > > > > >Export Checks > > > > > > > > >HREF="https://122.192.204.199/payment/tmp/checks_4SQN=4.zip";>checks_4SQN=4.zip WIDTH= 100%> > >HREF="https://122.192.204.199/payment/pay_menu.php";>Liheap Processing > Menu > >HREF="https://122.192.204.199/main.php";>Main Menu >HREF="https://122.192.204.199/logout.php";>Logout > > > > > > > > On Mon, 2002-11-18 at 04:44, BigDog wrote: > > What does the entire form look like? > > > > > > > > On Mon, 2002-11-18 at 17:43, Dave J. Hala Jr. wrote: > > > I selected the option that would have the value "4", what I get is > > > "4SQN=4" I should get just the value "4" > > > > > > > > > On Mon, 2002-11-18 at 04:33, BigDog wrote: > > > > That is what you should be getting right? > > > > > > > > When you have a select statement that has a value as the first one then > > > > that is what you will get when you post or get the form. > > > > > > > > if you want a blank one then do > > > > > > > > > > > > and that should not pass anything in the post or get... > > > > > > > > > > > > > > > > On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: > > > > > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > > > > > > > > > Lately I've noticed that when doing a form, listbox variables have funky > > > > > values in certain situations. Unfortunately, I haven't been to > > > > > determined what the certain situation is. > > > > > > > > > > Here's an example. > > > > > > > > > > Here is the listbox in the form: > > > > > > > > > > > > > > > 4 > > > > > 6 > > > > > > > > > > > > > > > > > > > > After clicking submit, when I echo the variable in the post script,I get > > > > > the following results: > > > > > SQN=4 > > > > > > > > > > I should get the value "4" > > > > > > > > > > Doing an echo "$_POST[SQN] "; yields the same results. > > > > > > > > > > > > > > > I didn't start seeing this until this week. I don't know what changed, > > > > > but it only happens with certain variables on certain posts. Anyone > > > > > else seen this type of behavior? > > > > > > > > > > > > > > > :) Dave > > > > > > > > > > -- > > > > > > > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > > > > the Ugly)" > > > > > > > > > > OSIS > > > > > Dave J. Hala Jr. > > > > > 641.485.1606 > > > > -- > > > > .: B i g D o g :. > > > > > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > > > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > > the Ugly)" > > > > > > OSIS > > > Dave J. Hala Jr. > > > 641.485.1606 > > -- > > .: B i g D o g :. > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > -- > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > the Ugly)" > > OSIS > Dave J. Hala Jr. > 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Post Problem
> -Original Message- > From: Dave J. Hala Jr. [mailto:[EMAIL PROTECTED]] > Sent: 18 November 2002 17:30 > > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > Lately I've noticed that when doing a form, listbox variables > have funky > values in certain situations. Unfortunately, I haven't been to > determined what the certain situation is. > > Here's an example. > > Here is the listbox in the form: > > > 4 > 6 > > > > After clicking submit, when I echo the variable in the post > script,I get > the following results: > SQN=4 I was sure I'd seen this reported as a bug on http://bugs.php.net/, so I did a quick search and came up with this: http://bugs.php.net/bug.php?id=18648 -- this only seems to apply if you're also running Apache 2, but so far it's my best guess. 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: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to use string as variable name?
Hi gang I'm suffering under the lack of an SQL, which would've made this loads easier, so instead I'm forced at using a bunch of arrays to keep track of the info instead... But here's the prob: I'm working on a list of premieredates for movies. Here's the HTML version I made to figure out how to make it into PHP: http://metalbunny.net/dk/film/ (it's in Danish, don't let that confuse you). The current one is static HTML, but I want it to be dynamic PHP, as it, naturally, will make it easier to add to/update the list. So, without the benefit of a database, I'm using arrays, as this: // array with premiere dates $premieredag = array("2002-11-22","2002-11-29","2002-12-06","2002-12-18","2002-12-25","2003-01-03","2003-01-17","2003-01-24"); // each date has its own array, with partial filenames for each movie $d20021122 = array("001"); $d20021129 = array("002","003","004"); $d20021206 = array("005","006","007"); // ... and so on ... I need the string from $premieredag to build the date heading. But want I want to do, is to be able to convert the string contents into the variable name used for each date's array ... so that I pull $premieredag[0] and convert the string from "2002-11-22" into $d20021122, which is easy enough, as a string, but how can I make PHP understand that I want to pull data from the array that is named that??? Current experimental design gives nothing but errors ... so it's useless ... How do you convert a string value into a variable name??? Lost here ... I've only ever done something like this once in JS a looong time ago, and can't even remember how... TIA Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to use string as variable name?
$date = "2002-11-22"; $myvar = "a" . str_replace("-","",$date); $$myvar = "hi"; echo "$a20021122"; Enjoy. On Mon, 2002-11-18 at 13:05, -<[ Rene Brehmer ]>- wrote: > Hi gang > > I'm suffering under the lack of an SQL, which would've made this loads > easier, so instead I'm forced at using a bunch of arrays to keep track of > the info instead... > > But here's the prob: I'm working on a list of premieredates for movies. > Here's the HTML version I made to figure out how to make it into PHP: > http://metalbunny.net/dk/film/ > (it's in Danish, don't let that confuse you). > > The current one is static HTML, but I want it to be dynamic PHP, as it, > naturally, will make it easier to add to/update the list. > > So, without the benefit of a database, I'm using arrays, as this: > > // array with premiere dates > $premieredag = > >array("2002-11-22","2002-11-29","2002-12-06","2002-12-18","2002-12-25","2003-01-03","2003-01-17","2003-01-24"); > > // each date has its own array, with partial filenames for each movie > $d20021122 = array("001"); > $d20021129 = array("002","003","004"); > $d20021206 = array("005","006","007"); > > // ... and so on ... > > I need the string from $premieredag to build the date heading. But want I > want to do, is to be able to convert the string contents into the variable > name used for each date's array ... > > so that I pull $premieredag[0] and convert the string from "2002-11-22" > into $d20021122, which is easy enough, as a string, but how can I make PHP > understand that I want to pull data from the array that is named that??? > Current experimental design gives nothing but errors ... so it's useless > ... > How do you convert a string value into a variable name??? > > Lost here ... I've only ever done something like this once in JS a looong > time ago, and can't even remember how... > > TIA > > Rene > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
Re: [PHP] How to use string as variable name?
Convert $day="2002-11-22" to just $day="d20021122" and $$day will be really $d20021122 -<[ Rene Brehmer ]>- wrote: Hi gang I'm suffering under the lack of an SQL, which would've made this loads easier, so instead I'm forced at using a bunch of arrays to keep track of the info instead... But here's the prob: I'm working on a list of premieredates for movies. Here's the HTML version I made to figure out how to make it into PHP: http://metalbunny.net/dk/film/ (it's in Danish, don't let that confuse you). The current one is static HTML, but I want it to be dynamic PHP, as it, naturally, will make it easier to add to/update the list. So, without the benefit of a database, I'm using arrays, as this: // array with premiere dates $premieredag = array("2002-11-22","2002-11-29","2002-12-06","2002-12-18","2002-12-25","2003-01-03","2003-01-17","2003-01-24"); // each date has its own array, with partial filenames for each movie $d20021122 = array("001"); $d20021129 = array("002","003","004"); $d20021206 = array("005","006","007"); // ... and so on ... I need the string from $premieredag to build the date heading. But want I want to do, is to be able to convert the string contents into the variable name used for each date's array ... so that I pull $premieredag[0] and convert the string from "2002-11-22" into $d20021122, which is easy enough, as a string, but how can I make PHP understand that I want to pull data from the array that is named that??? Current experimental design gives nothing but errors ... so it's useless ... How do you convert a string value into a variable name??? Lost here ... I've only ever done something like this once in JS a looong time ago, and can't even remember how... TIA Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why Yahoo chose PHP
I ran across this recently ... thought you might find it interesting ... http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.pdf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
I think you should comment on this bug: http://bugs.php.net/bug.php?id=18648 provide the details about your system configurations and everything else that might help us to fix it. Though, it seems to be an Apache2 problem, so try upgrading that as well. -- Maxim Maletsky [EMAIL PROTECTED] "Ford, Mike [LSS]" <[EMAIL PROTECTED]> wrote... : > > -Original Message- > > From: Dave J. Hala Jr. [mailto:[EMAIL PROTECTED]] > > Sent: 18 November 2002 17:30 > > > > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > > > Lately I've noticed that when doing a form, listbox variables > > have funky > > values in certain situations. Unfortunately, I haven't been to > > determined what the certain situation is. > > > > Here's an example. > > > > Here is the listbox in the form: > > > > > > 4 > > 6 > > > > > > > > After clicking submit, when I echo the variable in the post > > script,I get > > the following results: > > SQN=4 > > I was sure I'd seen this reported as a bug on http://bugs.php.net/, so I did > a quick search and came up with this: http://bugs.php.net/bug.php?id=18648 > -- this only seems to apply if you're also running Apache 2, but so far it's > my best guess. > > 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: [EMAIL PROTECTED] > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] enable-gd-native-ttf or tt?
i know nothing about building php really but my isp recently upgraded(version 4.1.2) and now imagettftext() function doesn't work.the error i get is: Warning: libgd was not built with FreeType font support .. see phpinfo() http://217.114.163.70/info.php what i noticed was this bit of the configure command 'enable-gd-native-ttf' whereas after a bit of googling i've seen it in other places as 'enable-gd-native-tt' i.e without the 'f' at the end - so which is right? if this is a dumb question please excuse my ignorance. adrian
Re: [PHP] explicit dot in open_basedir
My question was: what is supposed to happen if there is no dot in the open_basedir path, for example: open_basedir = /www Should I be able to open a file in ./tmp ? The way I understand the open_basedir doc, I should not be able. But another PHP user is telling me that he can open a file in ./tmp with no explicit dot in the path of open_basedir, and I cannot reproduce this behavior on my server. Marc BigDog wrote: The explicit dot is to tell the system that you want the current working directory. So by saying "./tmp" you want the tmp (directory or file) that is located in the current working directory. If i understand what you are saying is that "./tmp" is a directory in the current working directory. If there is a file in that directory that you can open then yes you should be able to open a file in that directory. just remember that "./" means that you want the current working directory. Also, "../" means that you want to move up one in the directory structure. On Mon, 2002-11-18 at 14:58, Marc Delisle wrote: Hi, I am using PHP 4.2.2 and would like to know what is the expected behavior when I don't put an explicit dot in the open_basedir path. Should I be able to open a file in "./tmp" ? Another question: let's say my document root is /www and I put a /www in open_basedir, then should I be able to open a file in "./tmp", which is a subdir under /www/marc? Thanks, Marc Delisle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
I'd be willing to post the entire page, but it's 154 lines of embedded php. Here's the FORM block portion of the page. The $sqn_list_box variable contains the listbox. $export_form .=" Export Check file: $sqn_list_box "; On Mon, 2002-11-18 at 04:55, BigDog wrote: > but where is the form that you created... > > That was i can see what you have set up inside of the form tag... > > > On Mon, 2002-11-18 at 17:51, Dave J. Hala Jr. wrote: > > SQN: 4SQN=4 SQN: 4SQN=4 > > > > > > > > Nifcap - Export Checks > > > > > > > > > > > >Export Checks > > > > > > > > > > > > > > > > > >HREF="https://122.192.204.199/payment/tmp/checks_4SQN=4.zip";>checks_4SQN=4.zip WIDTH= 100%> > > > > > HREF="https://122.192.204.199/payment/pay_menu.php";>Liheap Processing > > Menu > > > > > HREF="https://122.192.204.199/main.php";>Main Menu > > > HREF="https://122.192.204.199/logout.php";>Logout > > > > > > > > > > > > > > > > > On Mon, 2002-11-18 at 04:44, BigDog wrote: > > > What does the entire form look like? > > > > > > > > > > > > On Mon, 2002-11-18 at 17:43, Dave J. Hala Jr. wrote: > > > > I selected the option that would have the value "4", what I get is > > > > "4SQN=4" I should get just the value "4" > > > > > > > > > > > > On Mon, 2002-11-18 at 04:33, BigDog wrote: > > > > > That is what you should be getting right? > > > > > > > > > > When you have a select statement that has a value as the first one then > > > > > that is what you will get when you post or get the form. > > > > > > > > > > if you want a blank one then do > > > > > > > > > > > > > > > and that should not pass anything in the post or get... > > > > > > > > > > > > > > > > > > > > On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: > > > > > > I'm running php-4.2.2-8.0.5 on Redhat 8.0 > > > > > > > > > > > > Lately I've noticed that when doing a form, listbox variables have funky > > > > > > values in certain situations. Unfortunately, I haven't been to > > > > > > determined what the certain situation is. > > > > > > > > > > > > Here's an example. > > > > > > > > > > > > Here is the listbox in the form: > > > > > > > > > > > > > > > > > > 4 > > > > > > 6 > > > > > > > > > > > > > > > > > > > > > > > > After clicking submit, when I echo the variable in the post script,I get > > > > > > the following results: > > > > > > SQN=4 > > > > > > > > > > > > I should get the value "4" > > > > > > > > > > > > Doing an echo "$_POST[SQN] "; yields the same results. > > > > > > > > > > > > > > > > > > I didn't start seeing this until this week. I don't know what changed, > > > > > > but it only happens with certain variables on certain posts. Anyone > > > > > > else seen this type of behavior? > > > > > > > > > > > > > > > > > > :) Dave > > > > > > > > > > > > -- > > > > > > > > > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > > > > > the Ugly)" > > > > > > > > > > > > OSIS > > > > > > Dave J. Hala Jr. > > > > > > 641.485.1606 > > > > > -- > > > > > .: B i g D o g :. > > > > > > > > > > > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > > > > > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > > > the Ugly)" > > > > > > > > OSIS > > > > Dave J. Hala Jr. > > > > 641.485.1606 > > > -- > > > .: B i g D o g :. > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > > > > "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and > > the Ugly)" > > > > OSIS > > Dave J. Hala Jr. > > 641.485.1606 > -- > .: B i g D o g :. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- "...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly)" OSIS Dave J. Hala Jr. 641.485.1606 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] output compression
I've enabled output buffering in php.ini with output_buffering = On output_handler = ob_gzhandler I have had one user in the UK email and say their browser is crashing, has anyone seen this with output compression? Any other comments about using ob_gzhandler? Chris Mason [EMAIL PROTECTED] Box 340, The Valley, Anguilla, British West Indies Tel: 264 497 5670 Fax: 264 497 8463 Cell: 264 235 5670 http://www.anguillaguide.com/ The Anguilla Guide Talk to me in real time: Yahoo:netconcepts_anguilla US Fax and Voicemail: (815)301-9759 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] check for \n
Like I have a clue :) I want to convert some fields from TEXT to VARCHAR(255). (Going from a textarea to an input type=text) I've checked the length of each $mydata->ST, so I won't be losing data. What I am worried about is losing data if there are \n in any of the fields. How do I check to see if a \n exists in $mydata->ST in my WHILE statement? $sql = 'SELECT id,ST FROM ccl.ccl_main'; ... $news = mysql_query($sql); while ($mydata = mysql_fetch_object($news)) { if ???$mydata->ST? echo "$mydata->id - $mydata->ST"; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Check Left 4 characters of Form Variable
I have a form that is acting like an email page where there Subject is being submitted from one page to another and tagging the subject with "RE: ". I want to be able tack the RE: on but only if it doesn't already have it there. I know that I can use and if statement, but how to I check the left 4 characters: '" } else { echo "'" } ?> Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Script to remove attachments from emails and store them on the server
Thanks for your help Jason, have you got any examples that you might be able to send me on how you have used reformime to decode email messages -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: 18 November 2002 05:35 To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP Script to remove attachments from emails and store them on the server On Monday 18 November 2002 07:34, Simon Chilmaid wrote: > Hi all > > I have a script that is currently running on my server which intercepts > messages being sent into a specific address, it is piped to this through an > alias in the aliases file. What would I need to add to this script in order > for it to firstly check for the presence of attachments to any email > message and secondly if any are detected how can these be saved to disk > locally on the server that this is running on You can have a look at the chapters "IMAP, POP3 and NNTP functions" & "mailparse functions" to see if there are any suitable functions there. What I do is run reformime (google for that if you need to) to extract all message parts. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* QOTD: Silence is the only virtue he has left. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using mapquest with php
I want to make a very simple form which asks for a starting city/state and an ending city/state. When the user hits submit, the number of miles from city A to City B is displayed ... no directions, no maps, no exact locations .. just the milage. Can I use mapquest to do this? how? Is there another way? Thoughts? Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Distance Based on Zip Code
Does anyone know how I can set something up that tells the distance between one Zip Code and another? I'm needing to be able to set something up where one user's record is compared to another and a distance is measured. Any have any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Distance Based on Zip Code
On Tuesday 19 November 2002 04:21, vernon wrote: > Does anyone know how I can set something up that tells the distance between > one Zip Code and another? I'm needing to be able to set something up where > one user's record is compared to another and a distance is measured. Any > have any ideas? Search the archives "zip code database" or something. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Q: What do you call a boomerang that doesn't come back? A: A stick. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] check for \n
On Tuesday 19 November 2002 03:37, John Taylor-Johnston wrote: > Like I have a clue :) > > I want to convert some fields from TEXT to VARCHAR(255). > (Going from a textarea to an input type=text) > I've checked the length of each $mydata->ST, so I won't be losing data. > What I am worried about is losing data if there are \n in any of the > fields. > > How do I check to see if a \n exists in $mydata->ST in my WHILE statement? > > $sql = 'SELECT id,ST FROM ccl.ccl_main'; > ... > $news = mysql_query($sql); > while ($mydata = mysql_fetch_object($news)) > { > if ???$mydata->ST? > echo "$mydata->id - $mydata->ST"; > } Use strstr() with "\n" as the needle. Check out the "String functions" chapter, lots more goodies there. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* To program is to be. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Check Left 4 characters of Form Variable
On Tuesday 19 November 2002 03:48, vernon wrote: > I have a form that is acting like an email page where there Subject is > being submitted from one page to another and tagging the subject with "RE: > ". I want to be able tack the RE: on but only if it doesn't already have it > there. I know that I can use and if statement, but how to I check the left > 4 characters: substr() -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* A committee is a group that keeps the minutes and loses hours. -- Milton Berle */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Script to remove attachments from emails and store them on the server
On Tuesday 19 November 2002 03:54, Simon Chilmaid wrote: > Thanks for your help Jason, have you got any examples that you might be > able to send me on how you have used reformime to decode email messages Basically if you want to extract and save all attachments then you just pipe the message to reformime specifying the -x switch: cat mail_message | reformime -x -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* I got this powdered water -- now I don't know what to add. -- Steven Wright */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] http_get_var and isset() not working with script generated includes.
I wrote a bug report but [EMAIL PROTECTED] bogusified my report without the least bit of information. My script uses multiple includes and the file names all have the same syntax. So instead of writing each individual include, I created an array which contains all the filenames function LoadSections($sections) { foreach ($sections as $key => $value) { include "mod.section." . $value . ".php"; } } instead of writing include file_x; include file_y; and so on All the files load well except that I cannot access HTTP_GET_VARS and the isset() function always return false (when they are inside the included files). NB My includes work fine when loaded individually -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Create Login Page
Hi All I am trying to create a login page using php and mysql database. This is the code that I am trying to use: // File Name: auth04.php // Check to see if $PHP_AUTH_USER already contains info if (!isset($PHP_AUTH_USER)) { // If empty, send header causing dialog box to appear header('WWW-Authenticate: Basic realm="My Private Stuff"'); header('HTTP/1.0 401 Unauthorized'); exit; } else if (isset($PHP_AUTH_USER)) { // If non-empty, check the database for matches // connect to MySQL mysql_connect("localhost", "mysql", "sunny") or die ("Unable to connect to database."); // select database on MySQL server mysql_select_db("masterstream") or die ("Unable to select database."); // Formulate the query $sql = "SELECT * FROM guest WHERE login='$PHP_AUTH_USER' and password='$PHP_AUTH_PW'"; // Execute the query and put results in $result $result = mysql_query($sql); // Get number of rows in $result. 0 if invalid, 1 if valid. $num = mysql_numrows($result); if ($num != "0") { echo "You're authorized!"; exit; } else { header('WWW-Authenticate: Basic realm="My Private Stuff"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } } ?> This is the error that I get when I point my browser to this page both when the script is run locally and on th eremte webserver. btw: I am running Mac OS Jagaur Warning: Cannot add header information - headers already sent by (output started at /Users/pgarcha/Sites/auth.php:7) in /Users/pgarcha/Sites/auth.php on line 13 Warning: Cannot add header information - headers already sent by (output started at /Users/pgarcha/Sites/auth.php:7) in /Users/pgarcha/Sites/auth.php on line 14 Many Thanks --Pushpinder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] http_get_var and isset() not working with script generated includes.
Copy and pasted from the PHP manual: "If the include occurs inside a function within the calling file, then all of the code contained in the called file will behave as though it had been defined inside that function. So, it will follow the variable scope of that function." So in other words any script you include inside the function LoadSections() will be local to that function. -Kevin - Original Message - From: "Moo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 14, 2002 1:55 PM Subject: [PHP] http_get_var and isset() not working with script generated includes. > I wrote a bug report but [EMAIL PROTECTED] bogusified my report without the > least bit of information. > My script uses multiple includes and the file names all have the same > syntax. So instead of writing each individual include, I created an > array which contains all the filenames > > function LoadSections($sections) > { > foreach ($sections as $key => $value) > { > include "mod.section." . $value . ".php"; > } > } > instead of writing > include file_x; > include file_y; > and so on > > All the files load well except that I cannot access HTTP_GET_VARS and > the isset() function always return false (when they are inside the included > files). > > NB My includes work fine when loaded individually > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Create Login Page
Is To: <[EMAIL PROTECTED]> Sent: Monday, November 18, 2002 2:18 PM Subject: [PHP] Create Login Page > Hi All > > I am trying to create a login page using php and mysql database. > > This is the code that I am trying to use: > // File Name: auth04.php > // Check to see if $PHP_AUTH_USER already contains info > > if (!isset($PHP_AUTH_USER)) { > // If empty, send header causing dialog box to appear > header('WWW-Authenticate: Basic realm="My Private Stuff"'); > header('HTTP/1.0 401 Unauthorized'); > exit; > > } else if (isset($PHP_AUTH_USER)) { > // If non-empty, check the database for matches > // connect to MySQL > > mysql_connect("localhost", "mysql", "sunny") > or die ("Unable to connect to database."); > > // select database on MySQL server > > mysql_select_db("masterstream") > or die ("Unable to select database."); > > // Formulate the query > > $sql = "SELECT * > FROM guest > WHERE login='$PHP_AUTH_USER' and > password='$PHP_AUTH_PW'"; > > // Execute the query and put results in $result > $result = mysql_query($sql); > > // Get number of rows in $result. 0 if invalid, 1 if valid. > > $num = mysql_numrows($result); > > if ($num != "0") { > echo "You're authorized!"; > exit; > > } else { > > header('WWW-Authenticate: Basic realm="My Private Stuff"'); > header('HTTP/1.0 401 Unauthorized'); > echo 'Authorization Required.'; > exit; > } > } > ?> > This is the error that I get when I point my browser to this page both > when the script is run locally and on th eremte webserver. > btw: I am running Mac OS Jagaur > > Warning: Cannot add header information - headers already sent by > (output started at /Users/pgarcha/Sites/auth.php:7) in > /Users/pgarcha/Sites/auth.php on line 13 > > Warning: Cannot add header information - headers already sent by > (output started at /Users/pgarcha/Sites/auth.php:7) in > /Users/pgarcha/Sites/auth.php on line 14 > > > Many Thanks > --Pushpinder > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Create Login Page
I recently set up a log in page. I'm doing it a little differently than you. First I establish a session and set up two session variables (sessusername and sesspassword). I check to see if these variables have been set, if they have, I then check the username and password with the database to make sure the username and password are correct. Might be a little round about way of doing it, but I don't run into any header errors. \n"; // register the username and password session_register("sessuser","sesspass"); // connect to the database {code omitted} ?> \n"; if(!$verifyres = mysql_query("SELECT * FROM users WHERE `username`='$sessuser'")) die(mysql_error()); if(mysql_num_rows($verifyres)>=1) { $verifydata = mysql_fetch_array($verifyres); if($verifydata[2] != $sesspass) { $message = "Incorrect Password"; $sessuser=""; } } else { $message="The username '$sessuser' was not found"; $sessuser=""; } } //insert an if statement looking for the username and password if(!$sessuser) { echo "Please log in.\n"; if($message) echo "$message\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { } Hope this is helpfull Robbert van Andel -Original Message- From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 1:19 PM To: [EMAIL PROTECTED] Subject: [PHP] Create Login Page Hi All I am trying to create a login page using php and mysql database. This is the code that I am trying to use: You're authorized!"; exit; } else { header('WWW-Authenticate: Basic realm="My Private Stuff"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } } ?> This is the error that I get when I point my browser to this page both when the script is run locally and on th eremte webserver. btw: I am running Mac OS Jagaur Warning: Cannot add header information - headers already sent by (output started at /Users/pgarcha/Sites/auth.php:7) in /Users/pgarcha/Sites/auth.php on line 13 Warning: Cannot add header information - headers already sent by (output started at /Users/pgarcha/Sites/auth.php:7) in /Users/pgarcha/Sites/auth.php on line 14 Many Thanks --Pushpinder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php "The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers."
[PHP] is this not possible?
I'm been ignored on this question for 4-5 days now. even if it is not possible could somebody please verify this? is it possible to pass a variable from javascript directly to php WITHOUT using either a link, or a form submit to pass the variables? I've gotten a work around to call an image that's actually a php file, but run my script, and then return an image file. is this the only way? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] http_get_var and isset() not working with script generated includes.
Yep, You need make global every variable used in yout include. Maybe, you should declare- GLOBAL $_GET ; or do not call function to include your include just do simply like this, foreach ($sections as $key => $value) include "mod.section." . $value . ".php"; - Original Message - From: "Moo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 15, 2002 7:55 AM Subject: [PHP] http_get_var and isset() not working with script generated includes. > I wrote a bug report but [EMAIL PROTECTED] bogusified my report without the > least bit of information. > My script uses multiple includes and the file names all have the same > syntax. So instead of writing each individual include, I created an > array which contains all the filenames > > function LoadSections($sections) > { > foreach ($sections as $key => $value) > { > include "mod.section." . $value . ".php"; > } > } > instead of writing > include file_x; > include file_y; > and so on > > All the files load well except that I cannot access HTTP_GET_VARS and > the isset() function always return false (when they are inside the included > files). > > NB My includes work fine when loaded individually > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this not possible?
That, or an iframe. You can't pass variables on the same request, though. Jeff Bluemel wrote: I'm been ignored on this question for 4-5 days now. even if it is not possible could somebody please verify this? is it possible to pass a variable from javascript directly to php WITHOUT using either a link, or a form submit to pass the variables? I've gotten a work around to call an image that's actually a php file, but run my script, and then return an image file. is this the only way? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this not possible?
No... Javascript need to send that data back to the server and how are you going to do that? You will have to use a form or a link or some method to send it to the server. Now you can use php to write your javascript code that can be used to link to a php file that can be run on the client side which will then access the server... but you are really talking about to things here server-side (php) and client-side (javascript)... On Mon, 2002-11-18 at 14:39, Jeff Bluemel wrote: > I'm been ignored on this question for 4-5 days now. even if it is not > possible could somebody please verify this? > > is it possible to pass a variable from javascript directly to php WITHOUT > using either a link, or a form submit to pass the variables? I've gotten a > work around to call an image that's actually a php file, but run my script, > and then return an image file. > > is this the only way? -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sunrise/sunset programs?
yes, have tried googling around... i came across one but the link no longer works: http://www.hotscripts.com/Detailed/4984.html if anyone knows of any, could they post the links here? thanks, adam. - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 1:11 AM Subject: Re: [PHP] sunrise/sunset programs? > On Monday 18 November 2002 15:45, Adam wrote: > > Does anyone know if PHP has the capabilities of being able to calculate > > sunrise/sunset times by entering longitude/latitude values if someone was > > smart enough to write code for it? > > I should think so. > > > If not, is there any > > programs/applications around that allow for times to be entered into php > > after values have been worked out by the program/app? > > Have you tried googling around? > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > > /* > The Lord prefers common-looking people. That is the reason that He makes > so many of them. > -- Abraham Lincoln > */ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php