[PHP] PHP, LDAP and SASL
I have an OS X box that has been running PHP 4.1.2 and OpenLDAP 2.0.23 without any problems. I can bind to the LDAP database from PHP and everyone is happy. I wanted to build a new box with Cyrus-IMAP, Cyrus-SASL and OpenLDAP, moving my mail and authentication to it and leave the first box to just Apache and PHP. The second box appears to work fine. Where I'm having problems is binding from my PHP/Apache box to the new OpenLDAP box. With identical schema and data, I get errors trying to bind to the SASL/LDAP box from my PHP/Apache box that I don't get trying to bind to the local LDAP database. I can authenticate locally using the LDAP tools with a password against the SASL system. Does anyone have any idea if any of the following are true: 1) Do I have to build SASL and rebuild LDAP and then build a PHP against that LDAP to enable my PHP to bind to my Cyrus/SASL/LDAP box? 2) Is there something special on has to do to bind to a OpenLDAP/SASL rather than just OpenLDAP with PHP? Quinn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variable scoping...
unfortunately, this doesnt seem to work. Rather, it works, but it doesnt seem to work any differently than an include() (although you can't use output buffering on it, so in that regard its different). It seems to pass in all the variables and classes. My other option, which I have been avoiding, is to rename the classes... not all that hard really; and then for variables either rename them all, or do this: backupallglobalvariablesandunsetthem(); setvariablesthatscriptisexpectingtosee(); include(script); unsetallvariablesnotinbackup(); restorebackupvariables(); and then repeat this for each script I'm trying to embed... basicaly wrap each script/application in a clean sterilized php envirionment. I dont know how much overhead this would add. But it seems like the only solution at this point. It just occured to me that this might actualy make things more secure in a way since the parent script will totaly control what variables get passed in.. Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The documentation is outdated. That restriction has been lifted as of PHP version 4.0.6. (cc'ing phpdoc to fix) -Rasmus On Fri, 12 Apr 2002, Aric Caley wrote: but the virtual() documentation says you can't use it on a php script? Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I guess the only real way is to use virtual() in this case. That's a bit clunky as well, but it isn't quite as bad as going through CGI or all the way out to the port 80 level. -Rasmus On Fri, 12 Apr 2002, Aric Caley wrote: Is it possible to keep the variable name-space separate between, say, two files (one included into the other) to avoid name collisions? I'm trying to get two scripts to work together on the same page. Each script defines some classes that have the same names but work differently (ex., class Template). All I need is to embed the output of one script into the other. Now, I could do this by just getting the output from a URL but that seems really inefficient. Or I could run the script from the CGI version of PHP using exec() but that also seems like it could be really slow and clunky. Is there some efficient way of doing this? It would be cool if you could just put the include() inside of a function and have all the classes and variable names be local inside that function but that didnt seem to work... plus the scripts explicitly access global variable names. -- 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
[PHP] Re: Forms in PHP
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hi all, Now I have a weird problem. I am using this code and can't understand why it doesn't work. When the script is run it returns a blank page, no error or done. here it is and any help would be appreciated. if(($type == book) or ($type == weapon)){ The above line is probably causing a problem. The values being compared are probably being treated as constants, as they are not enclosed in quotes. As you haven't declared the constants, there will be no match. Try if(($type == 'book') or ($type == 'weapon')){ echo form action=\$PHP_SELF\ method=\post\; echo SELECT NAME=\sort\ SIZE=\1\; echo OPTION VALUE=\shop\Put in my shop/OPTION; echo OPTION VALUE=\locker\Put into my Footlocker/OPTION; echo OPTION VALUE=\discard\Discard this item/OPTION; echo OPTION VALUE=\donate\Donate this item/OPTION; echo /SELECT; echo INPUT TYPE=\submit\ VALUE=\Do It!\submit\; if(isset($submit)) { if($sort == shop) { echo done or die(Not!); } } } elseif($type==food) Same problem as above { echo SELECT NAME=\sort\ SIZE=\1\; echo OPTION VALUE=\feed\Feed my pet/OPTION; echo OPTION VALUE=\shop\Put in my shop/OPTION; echo OPTION VALUE=\locker\Put into my Footlocker/OPTION; echo OPTION VALUE=\discard\Discard this item/OPTION; echo OPTION VALUE=\donate\Donate this item/OPTION; echo /SELECT; echo INPUT TYPE=\submit\ VALUE=\Do it!\ NAME=\submit\; echo /form; } } } Thanks for your time Jennifer -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Switching from Register_Globals=On
To prototype my site, I've used register_globals=on, and track_vars=on. I'm at the point where I would like to switch the globals off', and prepare the site for production use. My problem is that I don't know how to implement the use of $HTTP_SESSION_VARS or $_SESSION in my webapages (or where to put the if (isset($_SESSION . . .) I assumed the logical place would be at the opening page (index.php) that has the menu structure. I put the call the if(isset . . .) right at the top of this page (before the HTML), and the page loads. However, when I call other pages and attempt to call up the database conection, I get an undefined function error [ Btw: everything worked great with globals=on]. What I'm not clear on: if I'm using $HTTP_SESSION_VARS or $_SESSION do I have to put something declaring such on every page that I've written (at this point there are 47 of them)? Or do I declare a session on the opening page? I assumed that by doing so, with track_vars enabled, the vars would automatically be transferred to each new page within the session. Am I missing something here? All my variables are in the form of $sfname or $rcity, and so on. I've read the manual on Session handling functions, but I must have a thick block on this concept . What should I do now that I want to use $HTTP_SESSION_VARS or $_SESSION ? How do I implement it on secondary pages? Will I be facing a major re-write of all my code? [Gulp :] Any help or pointers where to read up would be greatly appreciated. Tia, Andre -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the Holy Souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 13 Apr 2002 11:17:33 -0000 Issue 1284
php-general Digest 13 Apr 2002 11:17:33 - Issue 1284 Topics (messages 92821 through 92861): PHP 4.0.6 and xsl-transformation 92821 by: K. Pihl how to detect error 92822 by: Charmaine Tian 92843 by: Rasmus Lerdorf Re: Wanting a better understanding of classes in PHP... 92823 by: Shu Chow XHTML tag attribute quoting (Was Re: Forms in PHP) 92824 by: Andrew Chase Re: session_is_registered 92825 by: Oliver Beddows 92830 by: Norman Zhang 92834 by: Oliver Beddows 92836 by: Oliver Beddows including class files with unserialize_callback_func 92826 by: Ian Re: mysql question -- 92827 by: Jason Caldwell passing array from one page to itself? 92828 by: sundogcurt 92832 by: sundogcurt 92833 by: Richard Baskett Monitoring a SSL Auth'd page 92829 by: Ninety-Nine Ways To Die 92837 by: Rasmus Lerdorf New to web / PHP development. Please take pity on me. 92831 by: Marc Shlaes Re: country ip recognition and php 92835 by: Manuel Lemos Regilar expressions problem 92838 by: Leif K-Brooks 92844 by: Oliver Beddows Re: variable scoping... 92839 by: Aric Caley 92840 by: Aric Caley 92842 by: Rasmus Lerdorf 92859 by: Aric Caley inclusion of class definitions with unserialize_callback_func in php.ini 92841 by: Ian Closing curly brackets? 92845 by: Jennifer Downey 92848 by: Jennifer Downey Re: quotes 92846 by: Analysis Solutions Re: using php for keywords 92847 by: olinux form mail with attachment 92849 by: mm fernandez Re: Local Test | Different folder - Help!! (part2) 92850 by: phplists.woodenpickle.com 92853 by: phplists.woodenpickle.com Re: Pass variables via URL 92851 by: phplists.woodenpickle.com How can I read client-side files or upload them to a server? 92852 by: Don 92855 by: Justin French Cannot enter single quotation marks in fields 92854 by: Denis L. Menezes Error accessing class 92856 by: Andrew Schoenherr 92857 by: Tyler Longren PHP, LDAP and SASL 92858 by: Quinn Perkins Re: Forms in PHP 92860 by: David Robley Switching from Register_Globals=On 92861 by: Andre Dubuc Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Hey PHP-gurus! How do I run and invoke PHP XSL-parsing and transformation using PHP version 4.0.6.? Here is the sample code I want to run. files included: PHP-script XML-file and XSL-file:They are formatted nicely client-side by IE6.0. (Please disregard the stupid text in the XML-file, it is an extract from a database with a lot of test postings) When I run the script (post.php) I get an 'empty' XHTML-document, which is probably the result of applying the XSL-stylesheet(standard.xsl) on the XML-document (writeout.xml), and getting nothing - a 'bad' transformation. The script doen't display any errors, and the logging does not seem to work. Please help. PS : I didn't do the server setup myself, how can I check if the XSL-parser is configured correctly? YT Karsten Pihl, denmark __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ ?php // constants define(XSL1, standard.xsl); define(XMLLINK, '?xml-stylesheet type=text/xsl href='.XSL1.'?'); define(XMLHEAD, '?xml version=1.0 encoding=iso-8859-1?'.\n.XMLLINK); define(XMLFILE, writeout.xml); define(LOG, 'transform.log'); // ## executing transform(); // functions function load($fromFile){ //returns file $fromFile as string $str $fh = fopen($fromFile, r) or die(Can't open file .$fromFile); $str = fread($fh, filesize($fromFile)); fclose($fh); return $str; }//load function save($str, $toFile){ // writes string $str to file $toFile, returns boolean for succes $fh = fopen($toFile, wb) or die(Can't open file .$toFile); $bf = fwrite($fh, $str); fclose($fh); // if ($bf == -1) return false; else return true; }//save function transform(){ // echo 'valid: ', $valid_user; // almindelige brugere må gerne se nyheder // filtrerer(parser) xml dokumentet igennem stylesheet'et. $myxml = load(XMLFILE); $mystyle = load(XSL1); $handle = @xslt_create() or die(Can't create XSLT handle!); xslt_set_log($handle, true); xslt_set_log($handle, getcwd().LOG); // $xsltproc = xslt_create(); // create processer handle echo $handle; // do transformation $result = xslt_process($handle, $myxml, $myxsl); // echo $out; // echo 'res', $result; if ($result){ echo $result; // pre($result); $res = $result; }
Re: [PHP] Closing curly brackets?
No it's okay lots' of people post general HTML questions in here.. I love studying other people's..code style... You really need to work on your style I think.. No offence but it's quite hard to read.. I had to painstakingly (thank God it was fairly small script) space it all out and set the format all nice so it made sense. The hardest thing in the world I think is trying to read anothers code :) anyway after this process I finally saw where the error most possibly is occuring.. the formatting of my style made it really easy to pick out.. ok.. I have attached it anyway.. so it should retain it's formatting.. make sure you have wordwrap off if your using some old text editor I strongly suggest getting a good text editor if your planning on coding a lot.. I use TextPad 4 and I love it.. It has full code colouring, PLENTY of features for text-searches and replacement, macros etc... multiple files.. there are so many diff. text editors out there like it, but they are much better than Notepad once you get the hang on them... trust me :) I used to use Notepad for around 3-4 years for all my Javascript, Java, Turbopascal, Perl... e.. terrible really.. hard to read.. anyways yes I believe you are putting that closing brace in the right spot (as in the spot you said it should work but doesn't due to the parse error) but you unfortunately that's not where the problem lies.. You somehow have put one TOO many closing braces further up in your code around this part: $thisoption=; } } } == one of these should be taken out //check if form has been submitted if($submit){ see how there's 3 closing braces?? try with two and then also put in one where you thought you were supposed to: echo You have $quantity of this item and it's id is $iidBR; } // it seems like the first while statement's closing curly bracket should go here but if I put it here I get a pars error. } //== This is the one you were missing.. } else { //if the form has not been submitted run the following ? hope it helps.. if not please email me: [EMAIL PROTECTED] would love to find out how it goes... what are you making anyway? some kinda virtual creature/pet game?? sounds fun :) ::: Julien Bonastre [The-Spectrum.org CEO] A.K.A. The_RadiX [EMAIL PROTECTED] ABN: 64 235 749 494 Mobile: 0407 122 268 QUT Student #: 04475739 ::: - Original Message - From: Jennifer Downey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 13, 2002 1:09 PM Subject: [PHP] Re: Closing curly brackets? My apologies for putting this in the wrong list. Jennifer Jennifer Downey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi everyone, I have a question about this code. The way it sits now it always shows the last record in the table. in other words if the user has 6 items, like: item id 1 item id 2 item id 5 item id 6 item id 7 item id 8 it will only show the last record item id 8. I believe it has something to do with the first while statement's closing curly bracker But I can't seem to get it in the right place. Can someone spot the mistake and show me how to fix it. see also comments in code. $id = $HTTP_GET_VARS[id]; $query = SELECT id, name, image, quantity, type FROM {$config[prefix]}_my_items WHERE uid={$session[uid]} ORDER BY id; $ret = mysql_query($query); while($row = mysql_fetch_array($ret)) { $iid = $row['id']; $image = $row['image']; $name = $row['name']; $quantity = $row['quantity']; $type = $row['type']; if($iid == $id) { $display_block =CENTERimg src=$image border=0brfont size = 2$nameBR$quantityBR$type/font/CENTER; echo $display_blockBRBR; if($type == food) //if book or weapon is present then set an option and include in the form later {$thisoption=OPTION VALUE=\feed\Feed my pet\n/OPTION; }else{ //if any other type is present then set a blank $thisoption=;} } } //check if form has been submitted if($submit){ if($sort == 'shop') { echo This item has been taken care ofBR; // We are selecting user id to insert into the users items. $db=SELECT uid FROM {$config[prefix]}_users WHERE uid={$session[uid]}; $ret = mysql_query($db); while(list($db)=mysql_fetch_row($ret)) { $user = $db; echo Your user ID is $userBR; } echo You have $quantity of this item and it's id is $iidBR; } // it seems like the first while statement's closing curly bracket should go here but if I put it here I get a pars error. }else{ //if the form has not been submitted run the following ? FORM ACTION=?echo$PHP_SELF;? METHOD=post SELECT NAME=sort SIZE=1 ?echo $thisoption;? OPTION VALUE=shopPut in my shop/OPTION OPTION
[PHP] Re: Php/Mysql
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Just a noob php/mysql question... (I suppose) When I try just putting php code in my insert queries, it goes like this: insert into mytable values('?php echo some string; ?') select * from mytable, returns: ?php echo some string; ?Some string So the insert-query inserts both the code AND the string that the code echoes... Any help would be greatly appreciated! You haven't given enough code to know excatly what your problem is. However, for an educated guess, try something like: $sql = INSERT INTO mytable VALUES( . $mystring . ); where of course $mystring is the correctly formatted set of values to insert. Note that using this method you must have a value for each field in the table, in the order in which the fields appear in the table. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Cannot enter single quotation marks in fields
In article 000701c1e2a8$d1600ac0$9e75fea9@pcdenis, [EMAIL PROTECTED] says... Hello friends , I cannot enter single quotation marks in fields. Is this a standard feature ? Is there a workaround? I am using mysql + php4 on unix. Thanks Denis Look at addslashes/stripslashes -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form mail with attachment
At 13.04.2002 03:17, you wrote: i have this code for my form mail: ?php mail ([EMAIL PROTECTED], $subject, From: $name\r\nEmail: $email\r\nWebsite: $website\r\nMessage: $message, From: $email\r\n); ? i need to add an attachment file with the variable $file. what do i need to add in the code so that i will also be able to receive the attached file sent from the website? _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. Hi, can´t you delete this f*ing advertisment ;-) Look at http://www.php-resource.de/scripts.php?cat=listcaty=PHPcatTyp=MailCR=49RL=20 scroll down to class mime_mail, and load it down. All you need (and only this). There are some other classes around, but this work fine(for me) and is real small. Sorry it´s a german link, but it was on page 2 of google. HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Switching from Register_Globals=On
I've read the manual on Session handling functions, but I must have a thick block on this concept . What should I do now that I want to use $HTTP_SESSION_VARS or $_SESSION ? How do I implement it on secondary pages? Will I be facing a major re-write of all my code? [Gulp :] Yes. 1. You must use session_start() on every page with sessions because session_register() won't work with the associative arrays. 2. Every reference to session_register must come out and replaced with the code to set the session var $_SESSION[]. These two actions are probably at different places in the script, so remove the reference to session_start, and at: 3. Every reference in every script to a global session var will need to be replaced with a reference to $_SESSION['rcity']; 4. You'll also need to change any references to session session_unregister to unset($_SESSION['rcity']). Read the notes in the manual, as you can't mix the use of $_SESSION and session_register(), session_unset(), etc. If you use the arrays, everything must be done with the arrays. I'd suspect the reference to undefined function is caused by a typo and placing a $ in front of a function name such as $session_start(). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Switching from Register_Globals=On
Thanks Matt, Actually, at this point, I've reverted back to register_globals=on until I figure out what's the best way to do this. So far, I have no references to session_register() on any page. In your opinion, should I go with $_SESSION or use the other approach, $HTTP_SESSION_VARS. I gather I've some fun ahead with #3! If I use $HTTP_SESSION_VARS, will I still need to do this? Tia, Andre On Saturday 13 April 2002 07:53 am, you wrote: I've read the manual on Session handling functions, but I must have a thick block on this concept . What should I do now that I want to use $HTTP_SESSION_VARS or $_SESSION ? How do I implement it on secondary pages? Will I be facing a major re-write of all my code? [Gulp :] Yes. 1. You must use session_start() on every page with sessions because session_register() won't work with the associative arrays. 2. Every reference to session_register must come out and replaced with the code to set the session var $_SESSION[]. These two actions are probably at different places in the script, so remove the reference to session_start, and at: 3. Every reference in every script to a global session var will need to be replaced with a reference to $_SESSION['rcity']; 4. You'll also need to change any references to session session_unregister to unset($_SESSION['rcity']). Read the notes in the manual, as you can't mix the use of $_SESSION and session_register(), session_unset(), etc. If you use the arrays, everything must be done with the arrays. I'd suspect the reference to undefined function is caused by a typo and placing a $ in front of a function name such as $session_start(). -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the Holy Souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newsgroups? Which ones
just a quick question what's the major newsgroup most people use here?? I just wanna know cos my alt.php and alt.php.sql are quite dead and empty... thx in adv. ::: Julien Bonastre [The-Spectrum.org CEO] A.K.A. The_RadiX [EMAIL PROTECTED] ABN: 64 235 749 494 Mobile: 0407 122 268 QUT Student #: 04475739 :::
Re: [PHP] Switching from Register_Globals=On
Thanks Matt. Well, I guess the best time to start is now. I'll use $_SESSION -- sounds like less work. Wish I had used them to begin with . . . but back then, I only had two pages -- I sort of forgot to switch over while coding. Thanks for your advice, Regards, Andre On Saturday 13 April 2002 08:19 am, you wrote: So far, I have no references to session_register() on any page. In your opinion, should I go with $_SESSION or use the other approach, $HTTP_SESSION_VARS. So you'll need to replace the first reference to session_register() with a session_start(); I gather I've some fun ahead with #3! If I use $HTTP_SESSION_VARS, will I still need to do this? Yes, you have a lot of work to do. You should use $_SESSION[] if you're on php 4.1+ because is a magic global and you won't need to global it inside functions. That makes the arrays much easier to use. You should use one or the other arrays and don't mix them. Plus $_SESSION is less typing. The hard part is making sure you find all of the references to the old global session vars. Also, don't forget that the get and post vars won't be globals and you have the reference them through the $_GET/$_POST arrays. -- Please pray the Holy Rosary to end the holocaust of abortion. Remember in your prayers the Holy Souls in Purgatory. May God bless you abundantly in His love! For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] WDDX
Hello List, I want to use WDDX in PHP but I don't have access to the WDDX module. Does anyone know if there is WDDX serializer/deserializer written in PHP? I've been working on one for about a day now, and it works pretty sweet. I'm relatively new to PHP and don't trust using it in commercial projects just yet. So, if anyone knows of one please direct me to where I can find one. Thanks in advance Stuart Schoneveld www.xs4all.nl/~stuartmx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Including only I want
Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Including only I want
Break those lines out into another file... =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 4:33 AM To: Php General Mailling List Subject: [PHP] Including only I want Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- 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] Mailings Lists?
www.list.org * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Randum Ian [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 7:44 AM To: PHP Subject: [PHP] Mailings Lists? Hi there, I want to be able to send an email to '[EMAIL PROTECTED]' and have it sent to everybody in my 'newsletter' database. Are there any resources online that would show me how to do this? Ive searched but found nothing so far. Regards, Ian. ___ Ian Roke Webmaster, DancePortal (UK) Limited [EMAIL PROTECTED] http://www.danceportal.co.uk DancePortal.co.uk - Global dance music media -- 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] Cannot enter single quotation marks in fields
What happens when you try to enter them? What does the HTML source for your input field look like? Is ' being turned into \' ? Jason - Original Message - From: Denis L. Menezes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 12, 2002 11:05 PM Subject: [PHP] Cannot enter single quotation marks in fields Hello friends , I cannot enter single quotation marks in fields. Is this a standard feature ? Is there a workaround? I am using mysql + php4 on unix. Thanks Denis -- 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: RE: [PHP] Including only I want
But its exactely what I don't want 13/04/2002 11:11:54, Cal Evans [EMAIL PROTECTED] wrote: Break those lines out into another file... =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 4:33 AM To: Php General Mailling List Subject: [PHP] Including only I want Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- 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: RE: [PHP] Including only I want
You can't do a partial include. Put some logic into your include file so only the appropriate lines are executed. Or if you are not executing anything but simply reading a file containing data, use fopen()/fgets() and read past the first 5 lines. -Rasmus On Sat, 13 Apr 2002, Alberto Wagner wrote: But its exactely what I don't want 13/04/2002 11:11:54, Cal Evans [EMAIL PROTECTED] wrote: Break those lines out into another file... =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 4:33 AM To: Php General Mailling List Subject: [PHP] Including only I want Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Including only I want
Best hope is to include some if statements into the included file, and establish what you want to get out of the file, eg: ? $section = a; include('file.php'); ? --file.php-- ? if($section == a) { // do something } ? -- Or perhaps make the few lines you're after a function, then all you have to do is include your functions library on every page it's needed, and then call the function to do the selected lines/calculations, with a simple ? domyfunction(); ? Regards, Justin French on 13/04/02 7:32 PM, Alberto Wagner ([EMAIL PROTECTED]) wrote: Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mailings Lists?
Contact your ISP, because it depends on your set-up... you basicaly need to pipe all emails to that address to the CGI version of PHP, and then you can grab the message and forward it to the entire list. But your ISP may also have other tools for this... if I send to all@ one of my domains, it forwards to a pre-determined list of site contributors (a mailing list/group)... this is a simple text file that I can edit too. So, best advice is to start by telling your ISP what you want to achieve, and asking what they have available, or if it's your own server, post the set-up. Justin French Creative Director http://Indent.com.au on 13/04/02 10:44 PM, Randum Ian ([EMAIL PROTECTED]) wrote: Hi there, I want to be able to send an email to '[EMAIL PROTECTED]' and have it sent to everybody in my 'newsletter' database. Are there any resources online that would show me how to do this? Ive searched but found nothing so far. Regards, Ian. ___ Ian Roke Webmaster, DancePortal (UK) Limited [EMAIL PROTECTED] http://www.danceportal.co.uk DancePortal.co.uk - Global dance music media -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: RE: [PHP] Including only I want
I guess it would help if you explained what you are trying to do. the answer to your initial question is no. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 5:09 AM To: [EMAIL PROTECTED]; Php General Mailling List Subject: Re: RE: [PHP] Including only I want But its exactely what I don't want 13/04/2002 11:11:54, Cal Evans [EMAIL PROTECTED] wrote: Break those lines out into another file... =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 4:33 AM To: Php General Mailling List Subject: [PHP] Including only I want Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mailings Lists?
Can I just grab the required info from phpinfo() and post it here? Ian. - Original Message - From: Justin French [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Saturday, April 13, 2002 4:21 PM Subject: Re: [PHP] Mailings Lists? Contact your ISP, because it depends on your set-up... you basicaly need to pipe all emails to that address to the CGI version of PHP, and then you can grab the message and forward it to the entire list. But your ISP may also have other tools for this... if I send to all@ one of my domains, it forwards to a pre-determined list of site contributors (a mailing list/group)... this is a simple text file that I can edit too. So, best advice is to start by telling your ISP what you want to achieve, and asking what they have available, or if it's your own server, post the set-up. Justin French Creative Director http://Indent.com.au on 13/04/02 10:44 PM, Randum Ian ([EMAIL PROTECTED]) wrote: Hi there, I want to be able to send an email to '[EMAIL PROTECTED]' and have it sent to everybody in my 'newsletter' database. Are there any resources online that would show me how to do this? Ive searched but found nothing so far. Regards, Ian. ___ Ian Roke Webmaster, DancePortal (UK) Limited [EMAIL PROTECTED] http://www.danceportal.co.uk DancePortal.co.uk - Global dance music media -- 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] Does $_SESSION work in any release?
Running Apache,linux,php4.1.2 and I can't get $_SESSION to work, creates the temp file but doesn't actually put anything in it. There appears to be a bug report saying it is broke but does anyone know what version (if any) $_SESSION actually works in? I'm trying 4.1.1 also and its doing the same thing. I am running the the code from the manual's session page: session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; } else { $_SESSION['count']++; } print(SESSION : .$_SESSION['count']); and only get 0. Thanks. patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] special charicters in form output
when i enter sZZsçe in to a form it's changed to s#377;Z#351;ç#281; I didn't code it to change it to html special characters, is php doing this? Paul Roberts [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] special charicters in form output
If you are using METHOD=GET, your browser is probably doing it. Try METHOD=POST =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Paul Roberts [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 12:14 PM To: php Subject: [PHP] special charicters in form output when i enter sZZsçe in to a form it's changed to s#377;Z#351;ç#281; I didn't code it to change it to html special characters, is php doing this? Paul Roberts [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
[PHP] Empty delimiter error - ??
I'm totally unfamiliar with php, and making some slight modificiations to Chris Heilmann's nice v 1.1 Newsleterscript. What exactly is meant by an empty delimiter? This code works just fine, but I get the following error: Warning: Empty delimiter in /home/sites/site56/web/trailcrew.php on line 63 # Put the entries into the array lines $lines = explode(%,$content); for ($key=1;$keysizeof($lines);$key++){ # when the email is not in the list, add the old entries if (!stristr($lines[$key], $email)) { offending line - line 63 $out .= %.$lines[$key]; } # when it's already in the list, set found else { $found=1; } } Thanks Rich Pinder
[PHP] globals in functions
Is there a quick way to set all variables as global so that they are avalible to a function, i'm doing an eval inside, so i need all the submitted variables to be avalible, or do i have to decalre them individualy. Paul Roberts [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RE: RE: [PHP] Including only I want
I want to make a module system, that open a module and get the first $numberlines of it that will be some configuration variables, the $numberlines will probably be at top of file, at line 1, then I want to script to get the variables and execute them in the kernel.php, allowing me to make modules with configs with only one file 13/04/2002 12:23:50, Cal Evans [EMAIL PROTECTED] wrote: I guess it would help if you explained what you are trying to do. the answer to your initial question is no. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 5:09 AM To: [EMAIL PROTECTED]; Php General Mailling List Subject: Re: RE: [PHP] Including only I want But its exactely what I don't want 13/04/2002 11:11:54, Cal Evans [EMAIL PROTECTED] wrote: Break those lines out into another file... =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 4:33 AM To: Php General Mailling List Subject: [PHP] Including only I want Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] special charicters in form output
it's METHOD=POST already, I'm trying to find out why a Polish address was changed! Paul Roberts [EMAIL PROTECTED] - Original Message - From: Cal Evans [EMAIL PROTECTED] To: Paul Roberts [EMAIL PROTECTED]; php [EMAIL PROTECTED] Sent: Saturday, April 13, 2002 6:37 PM Subject: RE: [PHP] special charicters in form output If you are using METHOD=GET, your browser is probably doing it. Try METHOD=POST =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Paul Roberts [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 12:14 PM To: php Subject: [PHP] special charicters in form output when i enter sZZsçe in to a form it's changed to s#377;Z#351;ç#281; I didn't code it to change it to html special characters, is php doing this? Paul Roberts [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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: globals in functions
function someCommand() { global $var1, $var2, $var3; stuff(); } I think you could also use define(); maybe.. Later, Bob Weaver Paul Roberts [EMAIL PROTECTED] wrote in message 00f301c1e311$fa421af0$dde5883e@laptop1">news:00f301c1e311$fa421af0$dde5883e@laptop1... Is there a quick way to set all variables as global so that they are avalible to a function, i'm doing an eval inside, so i need all the submitted variables to be avalible, or do i have to decalre them individualy. Paul Roberts [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] globals in functions
1: Globals are bad...m'kay. You should never use globals. If your function needs a variable, you should pass it in. There are exceptions to this rule but it's not a good idea to program normally this way. 2: Is this a form? It sounds (from the way you word it) that the variables are part of a form. If so, pass $_POST into your form and it will be able to evaluate them. If it's METHOD=GET then use $_GET. This is also a much more generic way to program since if you add a new variable to the form, you don't have to make it global in this function. if (myFunction($_GET)){ echo Everything is hunky dory!; } else { echo Blow Chow; } function myFunction($formArray=null){ if (isNull($formArray){ return false; } if (isarray($formArray)){ return true; } else { return false; } } // function myFunction($formArray=null) WARNING: I have not tried the code above. Use at your own risk. But the concepts are there. * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Paul Roberts [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 12:37 PM To: [EMAIL PROTECTED] Subject: [PHP] globals in functions Is there a quick way to set all variables as global so that they are avalible to a function, i'm doing an eval inside, so i need all the submitted variables to be avalible, or do i have to decalre them individualy. Paul Roberts [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: RE: RE: [PHP] Including only I want
Ok, if you just want to retrieve values form the file and not PHP code, try opening it as a file instead of 'including' it. Read the lines you want, use the values you read in to set variables or branch or whatever. Personally (because I'm a database bigot) I'd stuff them in a table in a database but that's up to you. If you need to read in and execute PHP code, you MIGHT could get away with reading them in as described above and then using eval() to do execute them one at a time...but I'd steer clear of this. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 8:13 AM To: [EMAIL PROTECTED]; Php General Mailling List Subject: Re: RE: RE: [PHP] Including only I want I want to make a module system, that open a module and get the first $numberlines of it that will be some configuration variables, the $numberlines will probably be at top of file, at line 1, then I want to script to get the variables and execute them in the kernel.php, allowing me to make modules with configs with only one file 13/04/2002 12:23:50, Cal Evans [EMAIL PROTECTED] wrote: I guess it would help if you explained what you are trying to do. the answer to your initial question is no. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 5:09 AM To: [EMAIL PROTECTED]; Php General Mailling List Subject: Re: RE: [PHP] Including only I want But its exactely what I don't want 13/04/2002 11:11:54, Cal Evans [EMAIL PROTECTED] wrote: Break those lines out into another file... =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Alberto Wagner [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 4:33 AM To: Php General Mailling List Subject: [PHP] Including only I want Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- 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 -- 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] Does $_SESSION work in any release?
I am doing a session_start and am definately not using session_register (minus ? and ?, the exact code is in my original email). phpinfo reports register_globals is off. Is there something else in the php.ini file I need to turn on to 'enable' $_SESSION? I tried using the php.ini-recommended and it didn't work either. Any other ideas? On Sat, Apr 13, 2002 at 11:42:49AM -0600, Jason Sheets wrote: $_SESSION has worked for me on Unix since it was introduced. Make sure your PHP is properly configured. session_start() must be called before you can use $_SESSION. I've heard that if you use $_SESSION you may not use session_register. The reports I've seen are reporting it is broken on Windows, however it appears to be fixed on Windows in 4.2 RC2. Jason - Original Message - From: Patrick Aland [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 13, 2002 11:22 AM Subject: [PHP] Does $_SESSION work in any release? Running Apache,linux,php4.1.2 and I can't get $_SESSION to work, creates the temp file but doesn't actually put anything in it. There appears to be a bug report saying it is broke but does anyone know what version (if any) $_SESSION actually works in? I'm trying 4.1.1 also and its doing the same thing. I am running the the code from the manual's session page: session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; } else { $_SESSION['count']++; } print(SESSION : .$_SESSION['count']); and only get 0. Thanks. patrick -- 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] IMAGING WITH PHP
How would I find out the image size ratio so that I could resize and image without the image pixelating ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IMAGING WITH PHP
On Sunday 14 April 2002 02:08, Vins wrote: How would I find out the image size ratio so that I could resize and image without the image pixelating ? Manual Image functions -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* QOTD: If you're looking for trouble, I can offer you a wide selection. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Including only I want
You can call for this include inside a function and then Return inside included file. Not sure if it's suitable for you, inside functions there are quite a few extra things to do like Globals etc. Or, you could fopen(), read the needed lines, assign to a variable and eval() it. Quite a silly way though. Sincerely, Maxim Maletsky Founder, Chief Developer [EMAIL PROTECTED] PHPBeginner.com (Where PHP Begins) www.phpbeginner.com -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 5:16 PM To: Alberto Wagner; Php General Mailling List Subject: Re: [PHP] Including only I want Best hope is to include some if statements into the included file, and establish what you want to get out of the file, eg: ? $section = a; include('file.php'); ? --file.php-- ? if($section == a) { // do something } ? -- Or perhaps make the few lines you're after a function, then all you have to do is include your functions library on every page it's needed, and then call the function to do the selected lines/calculations, with a simple ? domyfunction(); ? Regards, Justin French on 13/04/02 7:32 PM, Alberto Wagner ([EMAIL PROTECTED]) wrote: Is there any way to include only the lines that I want in an other PHP file? something like Include(); like lines number 5,6 and 7. only this ones and not the entire script? -- 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: Closing curly brackets?
Well as I have seen lot's of people get yelled at if they post in the wrong list. So rather than letting that happen and risk not getting any help I thought I would apologize and send it to the right list. Anyway the file you sent is it in the correct format? I have asked about a tutorial on proper code formatting and got back a tutorial that was extremely hard to understand. While lots of people have screamed at me for my coding format no one has supplied an understandable answer. That is until this morning. From Paul Burney : Hi Jennifer, The first thing you should do is properly indent your code. If you do so, you'll be sure to find the missing bracket. Basically, for each new block, tab out again. It really helps to use a programmer's editor with syntax highlighting like vim or BBEdit. Thought that was the best tutorial I could ever get. Short and sweet and oh so easy to understand. I am using HTML_Kit as it has the same features as all the othere editors (color coding and such) but it also has a lot more I can get plugins for anything I would ever need. Except a formatting tutorial ;) I will use your code as an example of formatting. It doesn't work as far as the script goes as it returns multiple: Warning: Supplied argument is not a valid MySQL result resource. So I am going to study your formatting and start at the beginning. But thank you for your time and help! :) You have been a great help, look at my new signature. Thanks again Jennifer --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IMAGING WITH PHP
There is nothing in there about image ratios but let me double check again. maybe it was my error and if so... forgive me I'm from South Africa LOL Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Sunday 14 April 2002 02:08, Vins wrote: How would I find out the image size ratio so that I could resize and image without the image pixelating ? Manual Image functions -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* QOTD: If you're looking for trouble, I can offer you a wide selection. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IMAGING WITH PHP
nope i'm not wrong. no functin to determine the image ratio Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Sunday 14 April 2002 02:08, Vins wrote: How would I find out the image size ratio so that I could resize and image without the image pixelating ? Manual Image functions -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* QOTD: If you're looking for trouble, I can offer you a wide selection. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IMAGING WITH PHP
Since you get width height the ratio is trivial. mark C. -Original Message- From: Vins [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 13, 2002 3:02 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] IMAGING WITH PHP There is nothing in there about image ratios but let me double check again. maybe it was my error and if so... forgive me I'm from South Africa LOL Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Sunday 14 April 2002 02:08, Vins wrote: How would I find out the image size ratio so that I could resize and image without the image pixelating ? Manual Image functions -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* QOTD: If you're looking for trouble, I can offer you a wide selection. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Empty Delimiter error
Let me try again: This line of the script: if (!stristr($lines[$key], $email)) { yields the following error: Warning: Empty delimiter in /home/sites/site56/web. Do you know what causes this error ? Thanks r -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP MySQL Hosting services
Hi everyone, I am wondering if anyone has a good hosting service? I am currently with Aletia which has an excellant package good tech support but sometimes not very functional servers. My site has gone down at least 3 times within the last 20 days. Too many for me. It has to be at least 50 mb disk space, 10 to 15gig /m transfer, of course PHP and MySQL, ftp, ssh or telnet, cgi/perl, free domain transfer, at least 15 POP3 email accounts, cron support. Thanks Jennifer -- The sleeper has awaken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] first time user
hi folks, i am somewhat like a new newbie, just read my first php tutorial, installed an apache server on my windows and php on top for testing , first question is : is this the right place for me here to ask questions or is this newsgroup rather for advanced users? second question is my task i want to complete in PHP : i have an array for a dhtml navigation menu for my site. all the links are hard coded inside the array and are , of course , the same for the whole site EXCEPT for the language selection. now, for example, i am on a page called about.php, i am clicking on the link for the german version and a page called german/about.php should be retrieved. same for spanish. now, what do i do? i have found a php snippet that reads the current url ?php $filelocation=$HTTP_HOST.$PHP_SELF; echo($filelocation);? but can i use this somehow and how do i do that? i would be happy for any kind of advice . thankyou cookie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 13 Apr 2002 23:37:19 -0000 Issue 1285
php-general Digest 13 Apr 2002 23:37:19 - Issue 1285 Topics (messages 92862 through 92904): Re: Closing curly brackets? 92862 by: The_RadiX 92897 by: Jennifer Downey Re: Php/Mysql 92863 by: David Robley Re: Cannot enter single quotation marks in fields 92864 by: David Robley 92876 by: Jason Sheets Re: form mail with attachment 92865 by: heinisch.creaction.de Re: Switching from Register_Globals=On 92866 by: Matt 92867 by: Andre Dubuc 92871 by: Andre Dubuc Newsgroups? Which ones 92868 by: The_RadiX Re: quotes 92869 by: Heidi Belal Mailings Lists? 92870 by: Randum Ian 92875 by: Cal Evans 92880 by: Justin French 92882 by: Randum Ian WDDX 92872 by: Stuart S Including only I want 92873 by: Alberto Wagner 92874 by: Cal Evans 92877 by: Alberto Wagner 92878 by: Rasmus Lerdorf 92879 by: Justin French 92881 by: Cal Evans 92888 by: Alberto Wagner 92892 by: Cal Evans 92896 by: Maxim Maletsky Does $_SESSION work in any release? 92883 by: Patrick Aland 92893 by: Patrick Aland special charicters in form output 92884 by: Paul Roberts 92885 by: Cal Evans 92889 by: Paul Roberts Empty delimiter error - ?? 92886 by: Rich Pinder globals in functions 92887 by: Paul Roberts 92890 by: phplists.woodenpickle.com 92891 by: Cal Evans IMAGING WITH PHP 92894 by: Vins 92895 by: Jason Wong 92898 by: Vins 92899 by: Vins 92900 by: Mark Charette Re: include through HTTP 92901 by: Barýþ Empty Delimiter error 92902 by: Rich Pinder PHP MySQL Hosting services 92903 by: Jennifer Downey first time user 92904 by: zookie Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- No it's okay lots' of people post general HTML questions in here.. I love studying other people's..code style... You really need to work on your style I think.. No offence but it's quite hard to read.. I had to painstakingly (thank God it was fairly small script) space it all out and set the format all nice so it made sense. The hardest thing in the world I think is trying to read anothers code :) anyway after this process I finally saw where the error most possibly is occuring.. the formatting of my style made it really easy to pick out.. ok.. I have attached it anyway.. so it should retain it's formatting.. make sure you have wordwrap off if your using some old text editor I strongly suggest getting a good text editor if your planning on coding a lot.. I use TextPad 4 and I love it.. It has full code colouring, PLENTY of features for text-searches and replacement, macros etc... multiple files.. there are so many diff. text editors out there like it, but they are much better than Notepad once you get the hang on them... trust me :) I used to use Notepad for around 3-4 years for all my Javascript, Java, Turbopascal, Perl... e.. terrible really.. hard to read.. anyways yes I believe you are putting that closing brace in the right spot (as in the spot you said it should work but doesn't due to the parse error) but you unfortunately that's not where the problem lies.. You somehow have put one TOO many closing braces further up in your code around this part: $thisoption=; } } } == one of these should be taken out //check if form has been submitted if($submit){ see how there's 3 closing braces?? try with two and then also put in one where you thought you were supposed to: echo You have $quantity of this item and it's id is $iidBR; } // it seems like the first while statement's closing curly bracket should go here but if I put it here I get a pars error. } //== This is the one you were missing.. } else { //if the form has not been submitted run the following ? hope it helps.. if not please email me: [EMAIL PROTECTED] would love to find out how it goes... what are you making anyway? some kinda virtual creature/pet game?? sounds fun :) ::: Julien Bonastre [The-Spectrum.org CEO] A.K.A. The_RadiX [EMAIL PROTECTED] ABN: 64 235 749 494 Mobile: 0407 122 268 QUT Student #: 04475739 ::: - Original Message - From: Jennifer Downey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 13, 2002 1:09 PM Subject: [PHP] Re: Closing curly brackets? My apologies for putting this in the wrong list. Jennifer Jennifer Downey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL
[PHP] Re: Closing curly brackets? and BEING IGNORED!
- Original Message - From: The_RadiX [EMAIL PROTECTED] To: Jennifer Downey [EMAIL PROTECTED] Sent: Sunday, April 14, 2002 9:47 AM Subject: [PHP] Re: Closing curly brackets? and BEING IGNORED! Happy to hear you fixed your problem... I sent you a reply about how you should correctly format your code as well.. Ooh about probably hang on will check sent items 9:28pm saturday I sent one to you and at 10:01 I sent it off to the mail list itself.. With an attached file... In nicer format... Clearly formatted.. But it seems even after all this my postings here were ignored... Hmm, leads me to think either a) I am posting these emails to wrong address.. b) People don't like my name The_RadiX maybe I will rename it to Julien Bonastre as it should be Well I will soon find out if people are getting my emails anyway ;) Okay, well thanks Paul for helping out someone here anyway and backing up the email I sent last night... Remind to spend my time selfishly on my own work, instead of helping others.. Sorry.. getting carried away Anywayz.. will stop whinging.. back to trying to help the others in this place.. Actually it's just occured to me.. That those emails were sent through the HTML format.. It's happened before and it's possible now I think about it that this maybe one of the reasons they have never been replied to?? ::: Julien Bonastre [The-Spectrum.org CEO] A.K.A. The_RadiX [EMAIL PROTECTED] ABN: 64 235 749 494 Mobile: 0407 122 268 QUT Student #: 04475739 ::: - Original Message - From: Jennifer Downey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 14, 2002 4:57 AM Subject: [PHP] Re: Closing curly brackets? Well as I have seen lot's of people get yelled at if they post in the wrong list. So rather than letting that happen and risk not getting any help I thought I would apologize and send it to the right list. Anyway the file you sent is it in the correct format? I have asked about a tutorial on proper code formatting and got back a tutorial that was extremely hard to understand. While lots of people have screamed at me for my coding format no one has supplied an understandable answer. That is until this morning. From Paul Burney : Hi Jennifer, The first thing you should do is properly indent your code. If you do so, you'll be sure to find the missing bracket. Basically, for each new block, tab out again. It really helps to use a programmer's editor with syntax highlighting like vim or BBEdit. Thought that was the best tutorial I could ever get. Short and sweet and oh so easy to understand. I am using HTML_Kit as it has the same features as all the othere editors (color coding and such) but it also has a lot more I can get plugins for anything I would ever need. Except a formatting tutorial ;) I will use your code as an example of formatting. It doesn't work as far as the script goes as it returns multiple: Warning: Supplied argument is not a valid MySQL result resource. So I am going to study your formatting and start at the beginning. But thank you for your time and help! :) You have been a great help, look at my new signature. Thanks again Jennifer --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- 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] PHP MySQL Hosting services
wow.. 10-15gb.. where do you get that kinda hosting and for how much?? Here in Aus it'd cost you a packet.. Don't know where abouts in the globe you are though.. Here in AUS my host only gives me 1gb p/m and 50mb space... for AUD$399p/a that's USD$198... bit of a ripoff I think. but unbelievably they're one of the cheapest I have ever seen in AUS and best quality... ::: Julien Bonastre [The-Spectrum.org CEO] A.K.A. The_RadiX [EMAIL PROTECTED] ABN: 64 235 749 494 Mobile: 0407 122 268 QUT Student #: 04475739 ::: - Original Message - From: Jennifer Downey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 14, 2002 7:46 AM Subject: [PHP] PHP MySQL Hosting services Hi everyone, I am wondering if anyone has a good hosting service? I am currently with Aletia which has an excellant package good tech support but sometimes not very functional servers. My site has gone down at least 3 times within the last 20 days. Too many for me. It has to be at least 50 mb disk space, 10 to 15gig /m transfer, of course PHP and MySQL, ftp, ssh or telnet, cgi/perl, free domain transfer, at least 15 POP3 email accounts, cron support. Thanks Jennifer -- The sleeper has awaken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- 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: globals in functions
Just one thing... Is there an easier way than having to manually place global in each function...?? Other than passing by parameter? Like is it possible to actually declare var's in PHP as global? thx.. ::: Julien Bonastre [The-Spectrum.org CEO] A.K.A. The_RadiX [EMAIL PROTECTED] ABN: 64 235 749 494 Mobile: 0407 122 268 QUT Student #: 04475739 ::: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP MySQL Hosting services
http://webpipe.net They seem to be doing good with uptime.. In the last couple months I've been having a monitoring service check them frequently and so far we're at 100%.. Standard Virtual Package ($24.95/mo - $14.95 setup): Linux RedHat 7.1 300mb Disk Space 25 POP3 Accounts 10GB/mo transfer Static IP Address Apache 1.3.20 PHP 4.0.6 Dedicated MySQL Server CRON Telnet/SSH/FTP Sendmail SSL Webmin Control Panel Host up to 25 Apache VHosts Premium Virtual Package ($34.95/mo - $14.95 setup):: Linux RedHat 7.1 500mb Disk Space 50 POP3 Accounts 20GB/mo transfer Static IP Address Apache 1.3.20 PHP 4.0.6 Dedicated MySQL Server CRON Telnet/SSH/FTP Sendmail SSL Webmin Control Panel Priority Technical Support Host up to 50 Apache VHosts Plus you get a free month credit for referring others.. Hint, hint.. (it's Bob Weaver, account: custompcweb.com) Later, Bob Weaver The_radix [EMAIL PROTECTED] wrote in message 010401c1e346$5e494300$3200a8c0@oracle">news:010401c1e346$5e494300$3200a8c0@oracle... wow.. 10-15gb.. where do you get that kinda hosting and for how much?? Here in Aus it'd cost you a packet.. Don't know where abouts in the globe you are though.. Here in AUS my host only gives me 1gb p/m and 50mb space... for AUD$399p/a that's USD$198... bit of a ripoff I think. but unbelievably they're one of the cheapest I have ever seen in AUS and best quality... ::: Julien Bonastre [The-Spectrum.org CEO] A.K.A. The_RadiX [EMAIL PROTECTED] ABN: 64 235 749 494 Mobile: 0407 122 268 QUT Student #: 04475739 ::: - Original Message - From: Jennifer Downey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 14, 2002 7:46 AM Subject: [PHP] PHP MySQL Hosting services Hi everyone, I am wondering if anyone has a good hosting service? I am currently with Aletia which has an excellant package good tech support but sometimes not very functional servers. My site has gone down at least 3 times within the last 20 days. Too many for me. It has to be at least 50 mb disk space, 10 to 15gig /m transfer, of course PHP and MySQL, ftp, ssh or telnet, cgi/perl, free domain transfer, at least 15 POP3 email accounts, cron support. Thanks Jennifer -- The sleeper has awaken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- 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] HTML select JS
HI I was wondering if anyone can answer my question :) it's more HTML related though, but I'll dare to post it here and apologize in advance if I am going against the rules. The issues is, if I am using the following code: select name=rows_per_page option selected25 option10 option50 option100 /select The problem I am having is that when I get rid of '/select' it gives the formatting like I needed, and with '/select' it increases the CELL where I am using this SELECT, like it is like having br, i.e. it's maximizing the height. When I get rid of /select the whole SELECT thing doesn't show in NETSCAPE but does show and work fine in IE 5-6.0 Also can someone help with JS for this option... like as soon as you selected something the page will go loading without having to click SUBMIT. Thanks a lot. Vlad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTML select JS
Yeah, this really has nothing to do with PHP.. The Javascript question you ask can be answered with a simple query at http://www.google.com/search?hl=enq=select+onchange As for the other, can't help.. You should try an HTML group.. Later, Bob Vladislav Kulchitski [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... HI I was wondering if anyone can answer my question :) it's more HTML related though, but I'll dare to post it here and apologize in advance if I am going against the rules. The issues is, if I am using the following code: select name=rows_per_page option selected25 option10 option50 option100 /select The problem I am having is that when I get rid of '/select' it gives the formatting like I needed, and with '/select' it increases the CELL where I am using this SELECT, like it is like having br, i.e. it's maximizing the height. When I get rid of /select the whole SELECT thing doesn't show in NETSCAPE but does show and work fine in IE 5-6.0 Also can someone help with JS for this option... like as soon as you selected something the page will go loading without having to click SUBMIT. Thanks a lot. Vlad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mailings Lists?
No, it's not an issue of what PHP can do, it's an issue about the actual server, what mail programs they're running, what sort of filtering you can do on mail, whether you have a CGI version of PHP running, and the fact that they already may have a solution on the server which doesn't require any programming at all. At the risk of repeating myself, talk to your ISP, and tell them what you want to achieve... chances are, they've already got it all sorted out for another client. Justin French Creative Director http://Indent.com.au on 14/04/02 1:38 AM, Randum Ian ([EMAIL PROTECTED]) wrote: Can I just grab the required info from phpinfo() and post it here? Ian. - Original Message - From: Justin French [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Sent: Saturday, April 13, 2002 4:21 PM Subject: Re: [PHP] Mailings Lists? Contact your ISP, because it depends on your set-up... you basicaly need to pipe all emails to that address to the CGI version of PHP, and then you can grab the message and forward it to the entire list. But your ISP may also have other tools for this... if I send to all@ one of my domains, it forwards to a pre-determined list of site contributors (a mailing list/group)... this is a simple text file that I can edit too. So, best advice is to start by telling your ISP what you want to achieve, and asking what they have available, or if it's your own server, post the set-up. Justin French Creative Director http://Indent.com.au on 13/04/02 10:44 PM, Randum Ian ([EMAIL PROTECTED]) wrote: Hi there, I want to be able to send an email to '[EMAIL PROTECTED]' and have it sent to everybody in my 'newsletter' database. Are there any resources online that would show me how to do this? Ive searched but found nothing so far. Regards, Ian. ___ Ian Roke Webmaster, DancePortal (UK) Limited [EMAIL PROTECTED] http://www.danceportal.co.uk DancePortal.co.uk - Global dance music media -- 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] Multiple Threads?
I dont remember the name of the module offhand, but once upon a time, I used a perl module that would fork multiple threads so that you could execute several web queries at the same time. This saved a lot of time, if, for instance, you had to get information from UPS, FedEx, and the USPS about shipping rates to display on a page. If you had to query them one at a time, the delay would be unacceptable. However, with that perl module, you could query them all at the same time, making it much faster. Does anyone know if such a thing exists for PHP? Matthew Walker Senior Software Engineer ePliant Marketing --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] IMAGING WITH PHP
On Sunday 14 April 2002 04:05, Vins wrote: nope i'm not wrong. no functin to determine the image ratio Let's go back to basics. What do you need to know to determine the image size ratio? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Absent, adj.: Exposed to the attacks of friends and acquaintances; defamed; slandered. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Closing curly brackets?
On Saturday 13 April 2002 19:24, The_RadiX wrote: No it's okay lots' of people post general HTML questions in here.. I hope people don't get the wrong impression. General HTML questions is NOT what this list is for. This list is called php-general for a very good reason! -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* A good scapegoat is hard to find. A guilty conscience is the mother of invention. -- Carolyn Wells */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php