Re: [PHP] lost return value during a static call
On 15 September 2011 15:57, Robert Williams rewilli...@thesba.com wrote: On Sep 15, 2011, at 6:03, chamila gayan cgcham...@gmail.com wrote: when it goes through 2 static methods, at some point it stops returning value to the calling method. (please see comments in-line). The getArray() method and the 'else' portion of the getChild() method both lack a return statement, so they're basically just tossing out whatever value they come up with. -- Bob Williams Notice: This communication, including attachments, may contain information that is confidential. It constitutes non-public information intended to be conveyed only to the designated recipient(s). If the reader or recipient of this communication is not the intended recipient, an employee or agent of the intended recipient who is responsible for delivering it to the intended recipient, or if you believe that you have received this communication in error, please notify the sender immediately by return e-mail and promptly delete this e-mail, including attachments without reading or saving them in any manner. The unauthorized use, dissemination, distribution, or reproduction of this e-mail, including attachments, is prohibited and may be unlawful. If you have received this email in error, please notify us immediately by e-mail or telephone and delete the e-mail and the attachments (if any). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Confirmed, putting a return statement on lines 16 and 26 yields the expected result. -- It is not possible to simultaneously understand and appreciate the Intel architecture --Ben Scott
Re: [PHP] Re: htmlentities
On 13 September 2011 23:01, Shawn McKenzie nos...@mckenzies.net wrote: On 09/13/2011 01:38 PM, Ron Piggott wrote: Is there a way to only change accented characters and not HTML (Example: p /p a href =”” /a ) The syntax echo htmlentities( stripslashes(mysql_result($whats_new_result,0,message)) ) . \r\n; is doing everything (as I expect). I store breaking news within the database as HTML formatted text. I am trying to see if a work around is available? Do I need to do a variety of search / replace to convert the noted characters above back after htmlentities ? (I am just starting to get use to accented letters.) Thanks a lot for your help. Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info If it is meant to be HTML then why run htmlentities(), especially before storing it in the DB? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Perhaps something like this might help you $content = htmlspecialchars_decode(htmlentities($content,ENT_NOQUOTES,ISO-8859-1),ENT_NOQUOTES); or perhaps $table_all = get_html_translation_table(HTML_ENTITIES,ENT_NOQUOTES,ISO-8859-1); $table_html = get_html_translation_table(HTML_SPECIALCHARS,ENT_NOQUOTES); $table_nonhtml = array_diff_key($table_all,$table_html); $content1 = strtr($content1,$table_nonhtml); $content2 = strtr($content2,$table_nonhtml); if using it multiple times. -- It is not possible to simultaneously understand and appreciate the Intel architecture --Ben Scott
Re: [PHP] What would you like to see in most in a text editor?
On 13 September 2011 21:56, Brad Huskins brad.husk...@gmail.com wrote: Hello all you php coders out there, I'm doing an Open Source text editor (just a hobby) that's designed for PHP developers and is accessible through the web. This has been stewing for a while, and has gotten to the point where I can use it for my own work. I would like any feedback on things that people really like/dislike about their current editors, as I believe some of these things could be resolved in mine. I currently have username/password protection (with Salted-Hash passwords), a file-system browser, file loading/saving, and syntax highlighting -- and these things seem to work reasonably well. As well, most things about the editor are scriptable with JavaScript. This would seem to imply that in a few weeks I would have something useful. So I would like to get some feedback on what features people would most want, since I am still at a very flexible stage in development. If you would like to see what I have, you can go to un1tware.wordpress.com. You can also peruse the code at github.com/bhus/scriptr. In particular, the README on github gives a little bit better rationality for why something like this might be useful, and how things are currently structured. --Brad [ Yes, this is based on the layout of Linus' original post to comp.os.minix. ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Refactoring (that is, changing the name or arguments of variables or functions and have all references to that variable or function changed accordingly) would be nice to see in an online editor. ^_^ -- It is not possible to simultaneously understand and appreciate the Intel architecture --Ben Scott
[PHP] Re: [PHP-DB] Re: [PHP] Passing variables to a PHP script on clicking a hyperlink
Hi Me again Check on Your setting - ; Whether to use cookies. session.use_cookies = 1 session variable is saved here if the user have cookies turned off it will still work if your have trans-sid turn on. BTW you don't have to use a dropdown radio buttons or tick box will work as well Johan Suamya Srivastava [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thank you all for the help. I did not want to use dropdown box..that was the very reason i was wondering if I can pass the variables through a hyperlink. I used $_GET and it worked fine. However, as mentioned in the posts its not advisable to use $_REQUEST. Could you please elaborate on the reason? This brings me to another question I have registered a variable as a session variable so that I can use it on any page during that session. HOwever, this was not working when I first tried it. I read somewhere that I need to enable register_globals. On doing so, it worked and I could access my session variable on any other page. Is this wrong? Is there an alternative? Please suggest. - suamya On 8/24/07, Goltsios Theodore [EMAIL PROTECTED] wrote: the posted or got option buy using the $_REQUEST array ($_GET and $_POST are included in that like a less lame solution). Let's say you have a Please do not encourage the use of $_REQUEST. You might as well just tell people to enable register_globals again. Use $_GET, $_POST, $_SESSION, $_COOKIE, $_SERVER, etc. for the appropriate source of data. $_REQUEST is laziness and introduces most of the same issues that was the reasoning behind disabling register_globals to begin with. (As for dropdowns, that's just an in-browser method of collecting data and sending the key/value pairs in POST or GET... IMHO the HTML portion should already be known before someone steps into the realm of PHP and server-side programming) - mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Re: [PHP] Passing variables to a PHP script on clicking a hyperlink
Hi I have sessions working like a charm, i use it for my user login vars and so on, here is the settings i used. register_globals = Off session.use_cookies = 1 and switch on session.trans_sid if you know that not all your users will have cookies turned on This worked for me Johan Suamya Srivastava [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi.. in the settings, session.use_cookies is turned ON but session.trans_sid is turned OFF. do i need to enable this as well? by doing this can i disable the register_globals? - suamya Hi Me again Check on Your setting - ; Whether to use cookies. session.use_cookies = 1 session variable is saved here if the user have cookies turned off it will still work if your have trans-sid turn on. BTW you don't have to use a dropdown radio buttons or tick box will work as well Johan Suamya Srivastava [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thank you all for the help. I did not want to use dropdown box..that was the very reason i was wondering if I can pass the variables through a hyperlink. I used $_GET and it worked fine. However, as mentioned in the posts its not advisable to use $_REQUEST. Could you please elaborate on the reason? This brings me to another question I have registered a variable as a session variable so that I can use it on any page during that session. HOwever, this was not working when I first tried it. I read somewhere that I need to enable register_globals. On doing so, it worked and I could access my session variable on any other page. Is this wrong? Is there an alternative? Please suggest. - suamya On 8/24/07, Goltsios Theodore [EMAIL PROTECTED] wrote: the posted or got option buy using the $_REQUEST array ($_GET and $_POST are included in that like a less lame solution). Let's say you have a Please do not encourage the use of $_REQUEST. You might as well just tell people to enable register_globals again. Use $_GET, $_POST, $_SESSION, $_COOKIE, $_SERVER, etc. for the appropriate source of data. $_REQUEST is laziness and introduces most of the same issues that was the reasoning behind disabling register_globals to begin with. (As for dropdowns, that's just an in-browser method of collecting data and sending the key/value pairs in POST or GET... IMHO the HTML portion should already be known before someone steps into the realm of PHP and server-side programming) - mike -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: date format from a database date field
Mike Ryan wrote: Sorry I am a bit of a newbie with php and hope this has not been aswered a million times, but here it goes I have a date base with a couple of date fields when I pull up and display the fields it show 2007-05-21. the question I have is how to convert the field to 05-21-2007? Currently the command I have is print $row['open']; Well the easiest thing is to let MySQL do the work use following SELECT SELECT DATE_FORMAT(your_date_field,'%m-%d-%Y') as date_field FROM yourtable That should do the work... -- Johan Holst Nielsen Freelance PHP Developer - http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: ftp root dir?
Al wrote: Can I assume that all ftp_connect()s will make the current dir the DOC_ROOT? First of all - what do you mean with DOC_ROOT? If it is the document root (of what?!). If not, how can I insure the ftp root dir is the same as DOC_ROOT? Define DOC_ROOT :) if you ftp_chdir() and it's already on the root, it posts an error. Well if you tries to go back to the root - try to use ftp_cdup - but it shouldn't be needed if you combine ftp_pwd and ftp_chdir ftp_pwd() simply returns /, which simply says it's on its root, where ever that is. If is (logical) the root of the ftp server. It can be whereever on the server. It depends on the configuration of the FTP server ;) -- Johan Holst Nielsen Freelance PHP Developer - http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Data Mining/Data Scraping
Shannon Whitty wrote: Hi, I'm looking for a piece of software or coding that will let me post a form to another URL, accept the response, search it for a specific success string and then let me continue processing the rest of my program. I want to accept queries on behalf of my supplier, forward it to them behind the scenes, accept their response and display it within my website. Has anyone had any experience with this? Is there a simple, basic utility to let me do this? I was kind of hoping I could avoid developing it myself. cURL should be able to help you with that :) www.php.net/curl -- Johan Holst Nielsen Freelance PHP Developer - http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ide help needed
On 4/3/07, clive [EMAIL PROTECTED] wrote: Does anyone knows any IDE for PHP like VisualStudio.net? Second the use of eclipse. Look at easyeclipse.org - they have all the necessary plug-ins and add-ons in easy an easy to install package. Packages available for Linux, Mac and Windows. Includes tools for Smarty, database editing and html editing.
Re: [PHP] Mac PHP MySQL
On 02 Nov 2006, at 5:11 PM, Ed Lazor wrote: I'm trying to configure and compile PHP 5. The configure is failing to find the MySQL UNIX socket. Any ideas? ./configure \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-zlib \ --with-mysql=/usr/local/mysql \ --with-mysql-socket=/tmp I had a similar problem and downloaded the tar version of the Mac OS X Mysql Server. Pointed --with-mysql= to the libraries and that folder and it worked. Decided to compile my own because the packages always seem to lag behind the released versions of the software. Also need both postgresql and mysql support. Johan Martin Catenare LLC 534 Pacific Ave San Francisco, CA. 94133 Phone: (415) 834-9802 Fax: (415) 294-4495 http://www.catenare.com AOL: catenarellc Yahoo: martin_johan GTalk: [EMAIL PROTECTED] FreeWorldDialup :716798 - http://www.freeworlddialup.com/ Gizmo Project: 747-627-9132 - http://www.gizmoproject.com/ http://www.linkedin.com/in/catenare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OOP slow -- am I an idiot?
On 10 Oct 2006, at 4:14 PM, Chris de Vidal wrote: I think perhaps I'm using classes and OOP incorrectly. The last time I used them, they were slow. I want to create a customer class which fetches its attributes from a MySQL database. Something like this pseudocode: class customer { ... getName ($id) { $result = mysql_query (SELECT name FROM customers WHERE id = '$id'); return mysql_result ($result, 0); } getRevenue ($id,$department,$month,$year) { $result = mysql_query (SELECT revenue FROM customer_revenue WHERE customer_id = '$id' AND department = '$department' AND month = '$month' AND year = '$year'); return mysql_result ($result, 0); } ... } You should look into getting Professional PHP5 by Lecky-Thompson, Eide-Goodman, Nowicki and Cove from WROX. It's a good introduction to using PHP5 with design patterns to solve problems similar to yours. Plus, the knowledge can be applied to other object oriented programming languages, not just PHP5. It's also been out for a while so it may be in the sale section already. The collection class in chapter 5 discusses a programming problem just like yours. Johan Martin Catenare LLC 534 Pacific Ave San Francisco, CA. 94133 http://www.catenare.com http://www.linkedin.com/in/catenare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New install platform
On 25 Jun 2006, at 4:08 PM, Grae Wolfe - PHP wrote: It has become evident that I need some form of local testing environment so that I can figure out what is wrong with one of my $sql statements. Can anyone tell me what the easiest platform is to set up a PHP/ MySQL system? I have a PC and a Mac on OS X, and with the use of VirtualPC I have the ability to load most flavors of Linux as well. I hate to have to go through this to test a single error, but if anyone can help with this, I would truly appreciate it. http://www.apachefriends.org/en/xampp.html They have complete php/apache/mysql packages for Windows, Mac OS X and Linux. Johan Martin Catenare LLC 534 Pacific Ave San Francisco, CA. 94133 Mailing Address: 268 Bush Street #2826 San Francisco, Ca. 94104 Phone: (415) 834-9802 Fax: (415) 294-4495 http://www.catenare.com AOL: catenarellc Yahoo: martin_johan GTalk: [EMAIL PROTECTED] FreeWorldDialup :716798 - http://www.freeworlddialup.com/ Gizmo Project: 747-627-9132 - http://www.gizmoproject.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CMS for Auto Parts
On 23 Apr 2006, at 8:03 PM, John Hicks wrote: CK wrote: Hi, On Apr 22, 2006, at 1:26 PM, John Hicks wrote: CK wrote: Hi, I've been commissioned to design a web application for auto parts sales. The Flash Front end will communicate with a MySQL DB via PHP. In addition, PHP/XML should be used with a client-side Web GUI to upload images, part no., descriptions and inventory into the DB; a Product Management System. I am curious as to how you plan to using XML for the client's back end? (I don't see any reason to use it.) Using XML to keep an inventory dynamically, was the thought. The XML file would be updated with each entry, then could be imported into a spreadsheet. If you are storing your inventory in an XML document, then what are you using the MySQL database for? After Googling the returned queries have been slim, any leads on more specific examples? What specifically are you looking for and how are you googling for it? --John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You may want to look into openlaszlo. http://www.openlaszlo.org/ You can use it to provide the Internet front-end and use PHP for the back- end. Also, now has the option for either DHTML or Flash on the client side. Johan Martin Catenare LLC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with mysql_query and INSERT INTO
On Saturday, Feb 4, 2006, at 07:22 America/Los_Angeles, Colin Davis wrote: I need to insert a new record into a MySQL table which has an auto_increment field Ref as the primary index. When I have inserted the new record, I need to get the new Ref value in order to name some files to relate to the record. At the moment I have to do a SELECT command and search for another field (Title) which might not be unique. Is there another way that I get the Ref back after an INSERT? When I use mysql_query with INSERT INTO it only returns true or false, rather than the row. The PHP manual says: Return Values For SELECT, SHOW, DESCRIBE or EXPLAIN statements, mysql_query() returns a resource on success, or FALSE on error. For other type of SQL statements, UPDATE, DELETE, DROP, etc, mysql_query() returns TRUE on success or FALSE on error. Regards Colin Davis http://www.php.net/manual/en/function.mysql-insert-id.php This will give you the record id of the last record inserted (or created). Johan Martin Catenare LLC 534 Pacific Ave San Francisco, CA. 94133 Phone: (415) 834-9802 Fax: (415) 294-4495 http://www.catenare.com AOL: catenarellc Yahoo: martin_johan MSN: [EMAIL PROTECTED] GTalk: [EMAIL PROTECTED] FWD: 716798 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with Javascript:...submit()
while ($row = mysql_fetch_array($sql_result)) { echoForm name=\.$row['LITERATURE_title'].\ action=\searchlit.php\ method=\post\ font face=\arial\ size=\2\ a href=\javascript:.$row['LITERATURE_title']..submit();\ .$row['LITERATURE_title']. - .$row['res_fname']. .$row['res_lname']./a ... Everything works as long as $row['LITERATURE_title'] is one word, see this variable contains the names of books, and if the books name is Heaven for instance it works fine but as soon as the title is something like PHP for Dummies it doesnt work and i get a error on page message, I tried using numbers as the form name but then the same thing happens. Any ways around this? thanx Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Peninsula University of Technology or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] code generation
is there a way to limit the time a website is available in php?, if you want to have a database driven website but you would only like it to be active for 6 months for instance, i'm doing a project at univirsity and this is part of the specs, but i cant think of a good way how to do it... Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Peninsula University of Technology or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] code generation
yes sorry about that, i was going to ask about code generation but then rephrased the question without changing the subject... thanx for the responses, i thought of that but wouldn't changing the system date on your machine be a way of getting around that? Jochem Maas [EMAIL PROTECTED] 08/04/05 9:34 AM btw - what has 'code generation' got to do with the question? a oneliner to check 2 dates is not considered code generation - I'd call it 'writing a oneliner' or something similiar :-) [EMAIL PROTECTED] wrote: Couldn't you use a date check with date()? if(todays date end date) { load the site } else { the site has expired } indeed, also checkout time(), mktime(), strtotime() etc. also ... if ($timeIsUp) { // delete site files exit; } // show the site... Andrew Darrow Kronos1 Productions www.pudlz.com - Original Message - From: Johan Grobler [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Wednesday, August 03, 2005 11:04 PM Subject: [PHP] code generation is there a way to limit the time a website is available in php?, if you want to have a database driven website but you would only like it to be active for 6 months for instance, i'm doing a project at univirsity and this is part of the specs, but i cant think of a good way how to do it... Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Peninsula University of Technology or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Peninsula University of Technology or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] str_replace weird output
Hello guys :-) I have a question. I have been using str_replace() quite a lot of times, and never encountered any issue. But this time, something weird happened, and I am wondering wether, in fact, I have never really understood how this function worked, or if there is some kind of bug. If I do that : ?php $test = 'bla'; $un = array ('b', 'l', 'a'); $deux = array ('c', 'd', 'e'); $test = str_replace ($un, $deux, $test); echo $test , 'br /'; ? No prob, the output is the one I would have expected : cde But if I do that : ?php $texte = 'cd' ; $original = array('a', 'b', 'c', 'd', 'e', 'f', 'g'); $modif = array ('c', 'd', 'e', 'f', 'g', 'h', 'i'); $texte = str_replace($original, $modif, $texte) ; echo $texte, ' br /' ; ? The result is : ih Why ? It seems to me that str_replace is messing up a litlle bit if there are identical values in both replacement and search arrays. Or am I missing something ? Thanks a lot :-) Johan
[PHP] PHP Netobjects Fusion problem
Hi All This code: ? print Connected to: ; print ; $host = 10.0.0.3:employee.fdb; //$host = 10.0.0.6:testfb; print_r($host); $username = SYSDBA; $password = masterkey; $dbh = ibase_connect($host, $username, $password); if (!$dbh) { exit (Unable to establish a connection - please try later.); } else { $stmt = SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEE ORDER BY LAST_NAME DESC, FIRST_NAME DESC; $result = ibase_query($stmt); //$row_array = ibase_fetch_row($result); //$row_array = ibase_fetch_row($result); //print_r($row_array); ? TABLE BORDER=0 BGCOLOR='#55BFFF' CELLSPACING=6 CELLPADDING=0 WIDTH='100%' TR TDPBFirst Name/B/P/TD TDPBLast Name/B/P/TD /TR ? While ($row = ibase_fetch_assoc($result)) { echo TR; echo TDSPAN STYLE= 'font-size: 11px;'; echo $row[FIRST_NAME]; echo /TD; echo TDSPAN STYLE= 'font-size: 11px;'; echo $row[LAST_NAME]; echo /TD; echo /TR; } echo /table; ibase_free_result($result); } ? gives me this error: Connected to: 10.0.0.3:employee.fdb First Name Last Name Fatal error: Call to undefined function: ibase_fetch_assoc() in /home/e-smith/files/ibays/Primary/html/html/untitled17.php on line 209 How do I slove this? Thx Johan van Zyl JVZ Systems CC/realcorp.net Customised Software http://www.jvz.co.za [EMAIL PROTECTED] 021 851 7205 082 875 4238 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.1 - Release Date: 2005/03/23 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] newbie question ; calling php script with parrameters from html
can i use this kind of construction in my html code ? a href=test.php?selection=highSelect high/a if yes , how do i retrieve the passed string in the php code Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem
Hi All I use sample code from PHPFreaks i.e. mail($email_address, $subject, $message, From: realcorp.net Webmaster[EMAIL PROTECTED]\nX-Mailer: PHP/ . phpversion()); When the e-mail address is [EMAIL PROTECTED] (hosted by my telco/isp) it works. When I try [EMAIL PROTECTED] (via godaddy) it does not? If I send e-mails to those two addresses, using Outlook, they both work? Please feel free to try and register here. http://realwebonline.myftp.org/mc/register.php so that I can see if it works with other e-mail addresses. I did look this up in the manual - but I am still baffled. Thx Johan van Zyl JVZ Systems CC Box 3469 Somerset West 7129 [EMAIL PROTECTED] http://www.jvz.co.za +27 (0)82 875 4238 +27 (0)21 851 7205 Fax 088 021 852 2387 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: [firebird-php] auto increment last insert
Hi Thx Helen for another non-hostile, and as usual, very informative response! We newbie's are having a though time, well at least in THIS forum! At least I am! You (me) apparently have to RTFM or FOg And thx to all the other POSITIVE responses I have had! It is REALLY appreciated. It is not easy being a PHP newbie! If I am supposed to study ALL manuals in great detail before I am allowed to ask a question here.? Greetings JVZ -Original Message- From: Helen Borrie [mailto:[EMAIL PROTECTED] Sent: 25 November 2004 00:23 To: [EMAIL PROTECTED] Subject: RE: [firebird-php] auto increment last insert At 09:01 AM 25/11/2004 +1100, you wrote: I've just arrived in the office - did this thread get completed? Is the original poster satisfied with the information? Basically, a set-by-step approach to replacing MySQL's autoinc, without procedures, triggers, and trying to get the value after the insert(could be inaccurate if the generator's been used since the insert...) This example will use the following simple table: CREATE TABLE tbl_test ( int_ID NUMERIC(18,0) NOT NULL, str_name VARCHAR(100), PRIMARY KEY(int_ID) ); /* This is the generator for the tbl_test table */ CREATE GENERATOR gen_tbl_test; For safety, you should also create a trigger, in case the database is used by other applications at some point: CREATE TRIGGER BI_tbl_test for tbl_test ACTIVE BEFORE INSERT AS BEGIN IF (new.int_ID IS NULL) THEN new.int_ID = GEN_ID(gen_tbl_test, 1); END ^ Yahoo! Groups Sponsor Get unlimited calls to U.S./Canada -- Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-php/ b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19
[PHP] PHP Affiliate Login
Hi How difficult would it be to write Affiliate software, using PHP, Dreamweaver FireBird hosted on Linux(SME) like http://www.myreferer.com/content/en/order.shtml It does not have to be that sophisticated, I would just like to know who visited my page and where were they directed from. Also, have you got any sample code for this scenario: People accessing this URL must get a screen where they can either with a login and password gain access to other pages, or they can register. When they click register, they must supply a login name and their e-mail address. This will then trigger a SP in firebird that will generate a password and e-mail it back to them. They can now login with this password and must be able to change their password. Thx Johan van Zyl JVZ Systems CC Box 3469 Somerset West 7129 [EMAIL PROTECTED] http://www.jvz.co.za +27 (0)82 875 4238 +27 (0)21 851 7205 Fax 088 021 852 2387 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.799 / Virus Database: 543 - Release Date: 2004/11/19 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with _one_ CE chars - GD library
Hi, Im doing some dynamic image creation with GD library - and I really wonder why I can't get the last character printed out on the image :( I use this file to encode the font: http://phpgeek.dk/ng/88592.enc.txt And the font I use is Frutiger CE 45 Light... I wonder if it is the font that are buggy - I can write out all other characters - but not the last one I need :( The character I can't write out is: (html: #273;) I works fine with the upper character: (html: #272;) (HTML codes added, if the newsserver removes these characters...). When I tries to write the character on the image, I just make white space... Any one tried such problems? Any solution for that? And is it the font, the encoding file - or something else that are wrong? I don't think it is my source - cause all other Central European characters I tried works fine :( (Or maybe this should a happy smiley :D) I hope someone can help me :) With best regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with _one_ CE chars - GD library
Johan Holst Nielsen wrote: Any one tried such problems? Any solution for that? And is it the font, the encoding file - or something else that are wrong? Okay, I found the solution :) I was the encoding file that was wrong... The /dbar should be replaced with /dcroat Now everything works :) Is this a bug in the encoding file, or? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Getting Server time
Alex Hogan wrote: When I'm using the time() function am I getting the time on the server? If not how can I get the time from the server regardless of whether or not its in the same time zone as the client. Use the gmdate() function. http://php.net/manual/en/function.gmdate.php -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: installing php4 in windows 2000
Rohit Mohta wrote: i have configured apache 2.0.49 in my system and included the following lines of code in my http:conf file LoadModule php4_module c:/php/sapi/php4apache2.dll AddType application/x-httpd-php .php i have also configured the php.ini file and created a test script(phpinfo.php,placed it in my htdocs directory) to check whether php has been properly installed or not but when i run the testscript by entering the follwoing line in the address bar of internet explorer localhost/phpinfo.php i get the following error message HTTP 404 - File not found Internet Explorer Check if the DocumentRoot is right in your httpd.conf - it should be the same as the location where phpinfo.php is located. -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: including an html file!!
Little Boy wrote: when i include a html file i alwas do it with: echo(include('htmlfile.html')); everythings works fine except the fact, that after the included file the is a '1' printed out, anybody, an idea why??? Because you dont need echo - include output the html :) just ?php include('htmfile.html'); ? Check the documentation http://php.net/include - include returns 1 - thats why it is printed out when you do echo :) -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: including an html file!!
Godfoca wrote: echo returns 1 on success, so the interpreter first evaluates the expression inside the echo() call, and thus includes the html file, and then, as the evaluation returned 1, it echoes 1 to the final file. Just to clear it out... include does not always return 1. An example File: includeFile.php ?php $foo = Test with return; return $foo; ? ?php $bar = include(includeFile.php); echo $bar; //Output Test with return ? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Data reading and writing for a chat
Stephen Lake wrote: I got a question for you all. What would be more effiecient for datastoring that is going to be constantly extracted like in a chat application? a MySQL database? or a Flat text file? Well, the most effiecient would be the memory :) With some socket programming it should be possible to create a connection to each client - and a server show sent out the incoming messages to the clients. But flat file vs. mysql. I would prefer MySQL - it is fast, it can handle a lot of request. If you use flatfile, you need to do some checking for the if the file is open already - so only one client at the time can write to the file - if can be very slow if a lot of users is on the chat at the same time and write a lot of messages - cause the whole file need to be locked every time a single user write a message. So in my opinion, you should do some socket client and a server - or use a database :) -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Associative array question
[EMAIL PROTECTED] wrote: Hello, If I have an associative array like: $myFriendsAges['Tom']=25; $myFriendsAges['Bill']=35; $myFriendsAges['Al']=45; $myFriendsAges['Mark']=55; Is there a way to index name into a string. I would like to be able to echo something like: My friend Bill is 35 years of age. Is there a way to do this? No sure what you mean... but it is possible this way: ?php foreach($myFriendsAges as $name=$age) { echo My friend .$name. is .$age. years of age.br\n; } ? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Query Query
The Digital E wrote: $query=UPDATE $table_name SET company_name='$company', first_name='$first_name', last_name='$last_name', address='$address', city='$city', state_province='$state', postal_code='$postal', office_phone='$office', fax_phone='$fax', email='$email' WHERE company_name='$mod_dataset'; What does mysql_error() says? Tried to print out the query and execute it directly in the mysql prompt or phpmyadmin? What happens then? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CVS web front end
Lists wrote: tortoise is nice http://www.tortoisecvs.org/ As far as I can see, it have nothing to do with an web frontend? -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CVS web front end
Lists wrote: As far as I can see, it have nothing to do with an web frontend? you're so right. I meant to send the link for horde http://www.horde.org/chora/ Are you able to check out files? check in etc.? As far as I can see - it is just a web cvs viewer? The request was Not just a file/project browser... Anyway - thanks for the link to tcvs :D I have downloaded it and I like it :D -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache crashes on windows XP / PHP MySQL
I have the following software: 1. Apache 2.0.48 (tried with and without SSL) 2. PHP - Latest version 3. MySQL - latest version Running on Microsoft XP The problem that I have is that when accessing MySQL with PHP cause Apache to crash, restart, crash etc Could anybody help me please? Regards Johan Kok -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sort locale problem
Hi! I'm trying to sort an array with strings containing swedish characters. However, the sort order is wrong. The following code produces abäåö while it should be abåäö. $list = array(ö, ä, a,å,b); setlocale(LC_ALL,se_SE.ISO8859-1); usort($list, 'strcoll'); for($i=0;$icount($list);$i++) { echo $list[$i]; } Any ideas? Running Apache/2.0.43 PHP/4.2.3 Linux 2.4.18 /Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mailing with SMTP server requiring authentication
Is it possible and if so, how to send emails through SMTP servers that require authentication (logging in)? Thanks in advance
Re: [PHP] method chaining
If I have understood correctly what you want to do then this will do fine... $foo-${$foo-get(bar)}-getBaz(); / Johan - Original Message - From: Terry McBride [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 11, 2002 4:53 PM Subject: [PHP] method chaining Hello, I have a question about php and OO. I want to chain methods together having them performed on the results of the following method. Meaning something like $foo-get(bar)-getBaz(). I get the following error from the script bellow. Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /usr/local/apache/php/testchain.php on line 47 Anybody know why I can't do this? Anyway to make it it one statement instead of $tmp = $foo-get(bar); $tmp-getBaz(); -- lame --? Is their a config setting or something? Thanks in advance, Terry ?php class Foo { var $vector = array(); function Foo() {} function put($name, $value) { $this-vector[$name] = $value; return $this-vector[$name]; } function get($name) { return $this-vector[$name]; } } class Bar { var $baz = ; function Bar() {} function setBaz($value) { $this-baz = $value; return $this-baz; } function getBaz() { return $this-baz; } } $bar = new Bar(); $bar-setBaz(test succeeded); $foo = new Foo(); $foo-put(bar, $bar); echo $foo-get(bar)-getBaz(), br; ? -- 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: Using '/' instead of '?' in url querystring
When sending variables this is the normal way to do it: /foo.php?id=12 But I have read that the following URL should work: /foo.php/12/ and then fetch the id in this way: $id = ereg_replace('[^0-9]', '', $PATH_INFO); I have even seen it in function but the problem is that I can't get it to work on my local apache server. When I try to write /foo.php/12/ I get a '500 Internal Server Error' and in the apache error-log I can read that 'Premature end of script headers: c:/php/php.exe'. Does anyone know what could cause this error and why the url isn't working?? Try mod_rewrite to apache... http://httpd.apache.org/docs/mod/mod_rewrite.html Else try http://www.phpbuilder.com/columns/tim2526.php3 Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Find DPI ing image?
Hi people... Anyone know a class or a solution so I can find the DPI (dot per inch) of an image? getImageSize do not help me? Any other solutions? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie needs help
Neil Freeman wrote: mysql_db_query has been depreciated since PHP 4.0.6 Yep.. but thats not the only different... mysql_db_query() have an extra parameter that is what Database you want to execute your query in... mysql_query() just use the database you have selected with f.ex. mysql_select_db() But do NOT use mysql_db_query... Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to Detect File in a Specifc Directory on Window Env?
?php //DATEFORMAT MMDD if($dir=@opendir(/yourdirwithpdf)) { echo Found following files: while(($file=readdir($dir))!==false) { if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) { echo 'a href='.$file.''.$file.'\n'; } } } ? UPS if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf, $file)) The ereg line should look like this :) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to Detect File in a Specifc Directory on Window Env?
Johan Holst Nielsen wrote: ?php //DATEFORMAT MMDD if($dir=@opendir(/yourdirwithpdf)) { echo Found following files: while(($file=readdir($dir))!==false) { if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) { echo 'a href='.$file.''.$file.'\n'; } } } ? UPS if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf, $file)) The ereg line should look like this :) Wow, I also forgot to close the dir handle! Well I will let you do that :) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to Detect File in a Specifc Directory on Window Env?
Jack wrote: Dear all I had a folder which contains a lot of pdf file, the name format of the pdf files are : x.dateformat.pdf (eg : abcdefg.20020718.pdf). Now i want to use the php script to detect what files it got in a specific folder. i want to make a user input form which will let user to input the date and then i will look for the pdf report from this specific folder base on the Date given! I think one of the quickest way is to ask php to check the filename from Right to Left which is the Date format! But i don't know which php function will perform this task (Check filename from Right to Left). If you have any other suggestion, pls help me! I think I would do something like this: ?php //DATEFORMAT MMDD if($dir=@opendir(/yourdirwithpdf)) { echo Found following files: while(($file=readdir($dir))!==false) { if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) { echo 'a href='.$file.''.$file.'\n'; } } } ? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql error or PHP
Justin French wrote: try add_slashes($string) before inserting into the database, or turn on magic quotes in php.ini Or Mysql_Escape_String() http://www.php.net/manual/en/function.mysql-escape-string.php Or Mysql_Real_Escape_String() http://www.php.net/manual/en/function.mysql-real-escape-string.php Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: 1 Form, 2 Submit-Buttons
Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back Next). The buttons should be images. How can I make php see, which button has been pressed? ?php if(isset($_POST[submit_back])) { //go back } else { //go forward } ? form action=?=$_SERVER[PHP_SELF]? method=post input type=submit name=submit_back value=Back input type=submit name=submit_next value=Next /form -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: 1 Form, 2 Submit-Buttons
Johan Holst Nielsen wrote: Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back Next). The buttons should be images. How can I make php see, which button has been pressed? ?php if(isset($_POST[submit_back])) { //go back } else { //go forward } ? form action=?=$_SERVER[PHP_SELF]? method=post input type=submit name=submit_back value=Back input type=submit name=submit_next value=Next /form Oooh sorry... offcouse input type=image src=image.png name=submit_back... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie Logical opertaor question
Rw wrote: I have been trying this to no avail. Tryng to say the equivalent of: IF (var1 = 1 AND var2 = a or b or c) i.e. yield true if 1 and a OR 1 and b OR 1 and c I would do something like this: $CheckArr = array(a, b, c); if($var1 == 1 in_array($CheckArr, $var2)) { . } Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Apache2?
Hi, Anyone know how long the developers is from a finale release that support Apache 2? Please advice! Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cookie ?
(yes it's me again) i've got an other problem. i've got an login system, and it has to put an cookie, but it seems he doesn't do it. is it an php.ini problem ?? Dont think it a php.ini file. First of all. Remember to set the cookie before any other headers is sent to the browser. Do you remember to reload the page after the cookie is sent? (some browser cant see the cookie at the page it sent but first after it have been reloaded!). Else? Please post an URL to your source, or post some sources here! Are your sure about your browser settings? Do your denied websites to set cookies? mvh Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cookie ?
it's not the browser or what so ever, i installed php 4.2.1. with apache 1.3.24 on a Redhat 7.1 server. but becuas for some kind a reason it wont work :( any body got an idea ?? try to get the cookie witgh $_COOKIE[cookiename]; if you have register_globals = off! Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: cookie ?
Do you remember to reload the page after the cookie is sent? (some browser cant see the cookie at the page it sent but first after it have been reloaded!). Actualy this is not browser issue but PHP issue Aah, sorry... but it doesn't matter in this case, it could be one of the errors? :) mvh Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cookie ( still not working )
my cookie problem is still not solved :( my browser settings are correct, and the script has worked. but sins i now installed php 4.2.1 with apache 1.3.24 it doesn't work :( does any one have an solution ?? thnx in advance, Sure about your register_globals = off? please show us the source, or a link to at phps file... And a link to a phpinfo() file? I cant help you without further information! Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem : track_vars stopped working.
Okay, mystery to me, when I installed PHP 4.2.1 on Apache 2.0.35, the track_vars function, stopped working. a simple command like, example : file : default.php ¨ ? echo($text); ? then I type in the address in ie6, like : http://127.0.0.1/default.php?text=this but it doesn't show anything. it becomes a blank page instead of echoing out this. Now, I thought track_vars was set to Off but in php.ini, it stood that it always was on. So, now I'm stuck... I'm using the php4apache2.dll module, which I suppose may be the problem, but I don't think they would have forgotten this function in that file. Anyone got any idée's??? I kind of need that function to do multipages. johan ekström [EMAIL PROTECTED] http://www.dynamicduo.nu/
[PHP] Re: PHP 4.2.1 install
If you've installed php as a module, set it to 0 if as a cgi, 1 Ryan Conover [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What do I set cgi_redirect var in the php.ini if I install php 4.2.1 under win2k/iis5. Ryan Conover [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.pitt.edu/~rscst25/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: W2K SP2, PHP 4.2.1, IIS 5
This is what you must do. Copy Part ^^ copy php4ts.dll to c:\winnt\system32\ copy php4sapi.dll to c:\winnt\system32\ if you want any extensions, copy them to to c:\winnt\system32\ configuration part ^^^ in php.ini ¨ edit doc_root like : c:/Inetpub/wwwroot edit extension_dir like : c:/winnt/system32 then remove the ; infront of every extension you would like to have. now, in iis5.0 don't use it as a filter use it as an script/executable in the home flick, where you set document/web root. add c:\winnt\system32\php4sapi.dll and, fileextension, ofcourse .php i hope i make sence... good luck. Joshua E Minnie [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hey all, I have a problem, that I can't seem to find the answer to. I have checked the archives and the website, but to no avail. I have installed PHP 4.2.1 on my local machine with IIS running W2K Pro. When I run php -i, I get the html output expected. But when I try to open the simple php script ?php phpinfo(); ? all I get is the script written directly to the browser as text. I can't figure out why it is not going through php.exe. Any help would be greatly appreciated. -josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Installing PHP 4.2.1
This is what you must do. Copy Part ^^ copy php4ts.dll to c:\winnt\system32\ copy php4sapi.dll to c:\winnt\system32\ if you want any extensions, copy them to to c:\winnt\system32\ configuration part ^^^ in php.ini ¨ edit doc_root like : c:/Inetpub/wwwroot edit extension_dir like : c:/winnt/system32 then remove the ; infront of every extension you would like to have. now, in iis5.0 don't use it as a filter use it as an script/executable in the home flick, where you set document/web root. add c:\winnt\system32\php4sapi.dll and, fileextension, ofcourse .php i hope i make sence... good luck. Ryan Conover [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am having trouble installing PHP 4.2.1 on Win2K/IIS5 as an ISAPI Module. I copied php.ini file with my config to the winnnt folder, and set the the app mappings and Isapi filters to C:\PHP\SAPI\php4isapi.dll, but the module does not read any of the changes in the php.ini file. How can I get php.ini settings to be read? Ryan Conover [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.pitt.edu/~rscst25/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Installing PHP 4.2.1
This is what you must do. Copy Part ^^ copy php4ts.dll to c:\winnt\system32\ copy php4sapi.dll to c:\winnt\system32\ if you want any extensions, copy them to to c:\winnt\system32\ configuration part ^^^ in php.ini ¨ edit doc_root like : c:/Inetpub/wwwroot edit extension_dir like : c:/winnt/system32 then remove the ; infront of every extension you would like to have. now, in iis5.0 don't use it as a filter use it as an script/executable in the home flick, where you set document/web root. add c:\winnt\system32\php4sapi.dll and, fileextension, ofcourse .php i hope i make sence... good luck. Ryan Conover [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am having trouble installing PHP 4.2.1 on Win2K/IIS5 as an ISAPI Module. I copied php.ini file with my config to the winnnt folder, and set the the app mappings and Isapi filters to C:\PHP\SAPI\php4isapi.dll, but the module does not read any of the changes in the php.ini file. How can I get php.ini settings to be read? Ryan Conover [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.pitt.edu/~rscst25/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP parsing XML from Shoutcast
Anyone that has knowledge about this program, regarding it's XML output and php fetching that info and placing it on a php-page for user's to view? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Shoutcast
Anyone that has knowledge about this program, regarding it's XML output and php fetching that info and placing it on a php-page for user's to view? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: array question--help
Mark Pelillo wrote: I am a Newbie at PHP I am sure I am missing something small but... I am trying to create a form selection box which an alphabetically sort list of a unix group file. The group file has the format groupname::groupnumber: I have tried to create an array using the array=fgetcsv($fp, 30, :) which does read each line of the file. I have used this line in a while loop and also a for loop, but everytime I exit the loop, the array now has no information. I found if the change the line to be array[]=fgetcsv($fp, 30, :) then I can exit the loops but now how do extract only the group names from the array and be able to sort them. Ideally what I would like to do is create an array where the keys = group number and value = groupname. I need to be able to natsort the values and display in the selection form box. Well lets try ?php $OutputArray = array(); //Create an array to the output $fp = fopen (yourgroupfile,r); //Open the groupfile while ($d = fgetcsv ($fp, 1000, :)) { //While loop as long there is some data $OutputArray[$d[2]] = $d[0]; //Set groupid as key, and groupname as value } //end of while fclose ($fp); //close file print_r($OutputArray); //Print out the array, to check the values! ? Please reply if this doesn't work? By the way... if you got further problems, please tell us which version of PHP you use. Regards, Johan Holst Nielsen www.weknowthewayout.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Won't save session ids?
Kirk Johnson wrote: The coding style needs to match the register_globals setting in php.ini. register_globals on: $accountsession = $session; $accountemail = $email; session_register(accountsession); session_register(accountemail); Oh, sorry... I have just tried so many ways... but this works! Thank you very much :o) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Won't save session ids?
Hi people, I have a problem with my PHP scripts. I hope someone can help me? I run PHP 4.0.6, Redhat 7.1 When i tries to set a session and then redirect to the next page, the sessions is empty? Someone know how to solve this problem? The script looks like this: session_start(); session_register(accountsession); session_register(accountemail); $HTTP_SESSION_VARS[accountsession] = $session; $HTTP_SESSION_VARS[accountemail] = $email; header(Location: ./main.php); //The session and email variabel is from a output from a mysql query!! And this works fine! The mainpage tries to get the sessions. session_start(); echo Email:.$HTTP_SESSION_VARS[accountemail].br.$HTTP_SESSION_VARS[accountsession]; But i just get a Email: without any content? Please help me? Someone know whats wrong? Best Regards, Johan Holst Nielsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ftp_rawlist doesnt take directories with spaces?
it seems ftp_rawlist doesnt take directories with spaces for me. does anyone have any experience with this? johan kohne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Looping?
How can I make the following work: function start($times) { for...loop starts here... { -- notice only one bracket. } function end() { } -- the ending bracket. } start('10'); html-code... I want this to be repeated 10 times. end(); Try instead: function MakeLoop($loops, $htmlcode) { for($i=0; $i$loops; $i++) { echo $htmlcode; } } MakeLoop(10); Dont know if you can use this? Else, try to tell a bit more about what solution you want? /Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Generating PDF...
Hi, I just have some few question. I hope you can help me, with some links or some information :o) I've to create some pdf files, but the problem is that it have to be printed later. So it have to be in i quality about 304 dpi. I dont know a lot about PDF. Can anyone help me please? Send me some links about how PDF works etc.. I prefer to work in PHP... but if Perl/C/C++ etc. is a better language to this, please post the link anyway. Hope someone can help me :o) Looking forward to hear from ya! :o) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Generating PDF...
ok, i need to include some images in the PDF. But I just make them in the right dpi then. What about fonts? No problem if the font is Postscript or? -Johan Rasmus Lerdorf wrote: dpi doesn't really apply to a PDF file unless your PDF file has embedded images in which case the dpi of these images would affect your output. And PHP is fine for generating PDF with. See http://php.net/pdf -Rasmus On Tue, 11 Dec 2001, Johan Holst Nielsen wrote: Hi, I just have some few question. I hope you can help me, with some links or some information :o) I've to create some pdf files, but the problem is that it have to be printed later. So it have to be in i quality about 304 dpi. I dont know a lot about PDF. Can anyone help me please? Send me some links about how PDF works etc.. I prefer to work in PHP... but if Perl/C/C++ etc. is a better language to this, please post the link anyway. Hope someone can help me :o) Looking forward to hear from ya! :o) Regards, Johan
[PHP] Re: HOW to download PHP files without the use of a FTP client
i hav e big problem i need to download some php files without the use of a FTP client or other . so if you know a solution to my problem please reply Do you have possibility to use the PHP FTP functions? Or do you not havr ftp access?? regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Remove carriage returns
Royw wrote: I have a memo type field in a form and I am looking for the PHP command to strip the carriage returns from the field before inserting into a database. addslashes(); htmlentities(); ?? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Image problem
I've instaled and cofigured php4 on WinNT with Apache Web server. I can't use any fuction of Image manipulation, 'cause I get this error message: ImageGif: No GIF support in this PHP build In phpinfo() is listed that: gd lib. enabled, zlib lib. enabled. What do I still miss there? In the newest version of GD library (think it since about 1.3 or something) does support GIF, because GIF is a commerial image format. Use PNG or JPEG instead. That much better, or find a version with GIF support. You can see what Image formats you GD can use by make a file with follow content: ?php phpinfo(); ? :o) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] [ Re: [PHP] Re: Image problem]
Original Message From: - Fri Dec 07 14:52:01 2001 X-Mozilla-Status: 0001 X-Mozilla-Status2: Message-ID: [EMAIL PROTECTED] Date: Fri, 07 Dec 2001 14:51:56 +0100 From: Johan Holst Nielsen [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: 1WAY2PRINT A/S User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Peter Lalka [EMAIL PROTECTED] Subject: Re: [PHP] Re: Image problem References: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Peter Lalka wrote: Thanks, in phpinfo list really isn't support for GIF:( How can I manipulate jpeg images? Which functions are for this img. format? P. The same, only one difference. You have to open a file with CreateImageFromJPEG etc. and ImageJPEG instead of etc. GIF Regards, Johan
[PHP] Re: mail function
Is it possible to use php's mail function to send an html formated email (one of your pages or a newsletter, whatever...)? If so, how? yes... Make a header called etc. Content-type: text/html Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Statistic analyze for Apache log
Hi Anyone know a good PHP application that generate statistic from apachelog? Please send me an URL. Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Statistic analyze for Apache log
Yes, I have already seen it. But I would prefer a PHP written application. AWSTATS are written in Perl :o(. Do you know anything like this, in PHP? :o) Regards, Johan Manu Verhaegen wrote: You can use AWSTATS, it will working and it is very nice. Greetings, Manu - Original Message - From: Johan Holst Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 04, 2001 10:51 AM Subject: [PHP] Statistic analyze for Apache log Hi Anyone know a good PHP application that generate statistic from apachelog? Please send me an URL. Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: php_xmldom.dll
Antwnhs T. wrote: I have a problem with this dll, the dll exists on my hd and php does not load it. I have win2k pro with iis5, has anyone any kind of solutions ? Do you remeber to include it in your php.ini file? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Statistic analyze for Apache log
If you find this out off list could you let me know as well. I can only find C++ and Perl scripts. Ok, thinking about programming if it don't exists. So I let you know when it's ready :o) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] problem with ImageCreateJPEG ...
sorry for taking your time, but I still dont understand why I got errors with pjeg... I use the following code on other machine with jpeg support to , and it works, while in my machine I got an empty jpeg file ? Header(Content-type: image/jpeg); $im=ImageCreate(400,200); $bcg = ImageColorAllocate($im,240,240,240); $prt = ImageColorAllocate($im,0,0,0); $rd = ImageColorAllocate($im,255,0,0); ImageFill($im,400,200,$bcg); ImageLine($im,110,85,280,85,$rd); ImageString($im,5,130,90,--- OK ---,$prt); ImageLine($im,110,110,280,110,$rd); ImageJPEG($im,a.jpg); ? html body img src=a.jpg /body /html Try to remove all html, and instead make a ImageJPEG($img); You should then only get the JPEG file? You set a header, and the browser doesn't understand the HTML... regards Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] URGENT-HELP !!!!!!
Want to send mail through PHP script such that the receiver of that mail should not contain FROM header. I used mail() function with empty FROM header and even without FROM header, but the receiver is still getting FROM address as [EMAIL PROTECTED] You can't. The mail specification have to get a FROM header, but to make a solution you can make a FROM header like this: FROM: Do Not Reply [EMAIL PROTECTED] regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] URGENT-HELP !!!!!!
hmm, youre right. You can use this header maybe FROM: Do Not Reply nonexists@localhost The SMTP should be able to resolve localhost? Regards, Johan Jon Farmer wrote: Problem with that solution is some SMTP hosts will reject messages from domains that do not resolve to the sending SMTP host. I would recommend setting up a alias on sendmail and pipe all email to that address to /dev/null You would need to stress to your recipients that all replies to that email are ignored. Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key - Original Message - From: Chamarty Prasanna Kumar [EMAIL PROTECTED] To: Johan Holst Nielsen [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, November 30, 2001 10:54 AM Subject: Re: Re: [PHP] URGENT-HELP !! Thanks very much !! Smart solution !! yes, I don't want to get reply from that mail. Just looking for any solution..if u finds one please let me know. Regards, Kumar. On Fri, 30 Nov 2001 Johan Holst Nielsen wrote : Want to send mail through PHP script such that the receiver of that mail should not contain FROM header. I used mail() function with empty FROM header and even without FROM header, but the receiver is still getting FROM address as [EMAIL PROTECTED] You can't. The mail specification have to get a FROM header, but to make a solution you can make a FROM header like this: FROM: Do Not Reply [EMAIL PROTECTED] regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] p.net For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] URGENT-HELP !!!!!!
I am talking about the final SMTP host.. it will do a reverse lookup on the From: domain and if it dont resolve to the IP of the sending STMP host it will reject it. yes I know. But it the final SMTP tries to resolve the host (localhost) it will get a response from it self? I haven't tried it, but I think it would work. By the way... the most of the SMTP doesn't check at the FROM header, but from the sender SMTP. So if you got a nonexisting e-mail it would accept it too, but it the sender host isn't valid it will reject it. Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to work with MySQL tables WITHOUT telnet, SSH orPhpMyAdmin
At 15:19 -0500 30-11-01, [EMAIL PROTECTED] wrote: Our web host does not support telnet or SSH for its clients and is not interested in working with PhpMyAdmin at the moment (I think I need their assistance if I want to use PhpMyAdmin, right?). Is this rather typical of web hosts? You do not need their assistance to use phpMyAdmin - it's just another php site. All you need to do is edit its config file, where you enter the database names, usernames and passwords for all your databases. You can then choose a database from the phpMyAdmin home page. The only limitation is I believe is that to create new databases, you'll have to have create rights on the username for one of the databases you set up, and choose that database in phpMyAdmin before creating the new database with SQL. Sverre -- disclaimer I speak for myself only! /disclaimer to be yourself, in a world that tries, night and day, to make you just like everybody else - is to fight the greatest battle there ever is to fight, and never stop fighting -- e.e. cummings -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Going blind?
$result=@mysql_query($qry,$connection); Try make a line after this: echo mysql_errno().: .mysql_error(); What is the output? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
SV: [PHP] Installing PHP with windows
no you dont have to install linux, apache works really fine under windows read more at http://httpd.apache.org/docs/windows.html good luck /johan -Ursprungligt meddelande- Från: Rob Bennion [mailto:[EMAIL PROTECTED]] Skickat: Wednesday, November 21, 2001 13:05 Till: [EMAIL PROTECTED] Ämne: Re: [PHP] Installing PHP with windows Richard, I have got to admit I don't really understand much about servers and their software. What I want to do is to be able to create and test php pages 'offline' like I currently do with my asp pages using PWS. Would I be able to install apache with my windows set up or would I have to install linux on the machine? Thanks Rob Richard S. Crawford wrote: You can download the win32 PHP binaries from www.php.net. I know it works because I've got it running on my win2k box. But I'm also running Apache so I don't know if it will work with PWS. I'd be interested in knowing. If it doesn't work with PWS, why not just install Apache? It's free and much, much more secure than PWS. At 12:55 PM 11/21/2001, Rob Bennion wrote: Hi I want to try out PHP and wanted to know if it is possible to install it on a windows machine and use it with personal web server. Any help would be appreciated. thanks Rob Sliante, Richard S. Crawford http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford MSN: [EMAIL PROTECTED] It is only with the heart that we see rightly; what is essential is invisible to the eye. --Antoine de Saint Exupéry Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] words in a string
i want php to do an IF, when he founds a special word in a string (ex: text_-_write_-_text ) .. i m not able to manage it .. ?php function doThis($x) { //something? $result = $x. phplover; return $result; } $string = Hi whats your name? Hi whats your name?; $string_arr = explode( , $string); $newstring = for($i=0; $isizeof($string_arr); $i++) { if($string_arr[$i] == Hi) { //Or ereg if the word only have to contain $string_arr[$i] = doThis($string_arr[$i]); } $newstring .= .$string_arr[$i]; } //Return Hi phplover whats your name? Hi phplover whats your name? echo $newstring; ? Could you use this example? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Sending mail without using mail()
Ok, where can I find a tutorial about sending mail using fsockopen ? *** http://www.phpbuilder.com/columns/tim19990221.php3 Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: I suck at regular expressions!
Richard S. Crawford wrote: Not quite. I have the same problem. I tried at test on my localhost. Following works for me: $string = htmlheadtitleSometime i dont wanna know/title/headbody/body/html; if(eregi(title(.+)/title, $string, $arr)) { echo Title: .$arr[1]; } else { echo unknown title; } This works for me? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: how can I get the post content in php
the program just can let me get the post string like my example I want post the xml file content to a php file, then I want get the post string that it's xml content. hehe, thanks for your help Did you solve your problem? I dont think i understand you, but i tries to give a little summary what I think you mean. 1. A page make a post request with XML data to a PHP file. 2. The PHP file get the post request, and get the XML data. 3. An then what? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: how can I get the post content in php
I think you understand my problem. I will use a client program to POST the XML data to a php file on the server base HTTP in php file will get the post request, the question is, how can i get the xml data in post request Hmm, I dont think I understand? Where do you want to do with the XML? Cant you just make a echo() in a xml document? please explain? ?xml version='1.0'? ... ... ?php echo $xmldatavar; ? ... ... ... Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Fatal error: Call to undefined function: imagecreate()
I know it's probabally overkill but in the configure messages, it says yes for everything gd, jpeg, png, and zlib. Any suggestions? If anybody wants to see the configure messages let me know. What do PHP tells you about the GD lib extension. Try making a phpinfo() file and send the output in the GD lib section. Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: JPG Images from database to filename.jpg
Header(Content-type: image/jpeg); echo $Images; I can't figure out how to create the header. There's lots of examples of how to do the above, but I have yet to stumble across an example which allows you to write the header into a file You could make a PHP script that generate the picture? Like this: ?php /* Picture file need an ID!! */ $connection = mysql_connect(host, user, pwd); mysql_select_db(dbname); $query = 'SELECT imagefiled FROM imagetabel WHERE id = '.$id; $result = mysql_query($query); if(mysql_num_rows($result) 0) { //You got the image header(Content-type: image/jpeg); $row = mysql_fetch_row($result); echo $row[0]; } else { //No image with that id! } mysql_close($connection); ? HTML file where the image is: html body img src=phpfile.php?id=23 border=0 alt= /body /html Dont know if you misunderstand you? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Controlling length of table data
This is really a combination html/php question, I believe. The problem is that I have a table that displays a field of text that can be several hundred bytes long. If, however, someone holds down a key and produces 500 letter 'x' the table data then distorts the table! Since the length of the data needs to be several hundred bytes, is there someway to either control the table data width so that the length of a non breaking string of characters will not distort the table, or is there a php string function to break the sentence into words and then I'd have to build some logic to test the length? Use wordwrap() ? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Session help
Start at index.html. It goes to postcard.php. When I click on submit in postcard.php, if I change any of the values in the form, the session values received in send_mail.php do not change. Anyone have an idea what I have done wrong now? Try to make a session_unregister(), and make session_register() again with the new values. Think it will help you :o) Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mail() function
$mailheaders = From: \Do Not Reply\\r\nReply-To: Do Not Reply@Do Not Reply\n; If I use the above headers it says from Do Not [EMAIL PROTECTED] Does anyone know how to make it just say Do Not Reply? You cant... but try making it like this: $mailheaders = FROM: Do Not Reply DoNotReply@localhost\nREPLY-TO: DoNotReply@localhost; regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP + apache .htaccess
After I research security issue from the web, I had found apache .htaccess which can solve my problem. What my problem is that, can .htaccess perform like a database system which can store users loginID and password, and also set those users have a expired time each ?? If you want to use .htaccess can you make some links like this, to the customers who is logged in: http://username:[EMAIL PROTECTED]/secretfolder/ Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP + apache .htaccess
then, can .htaccess store the user expried date ? like Peter is not allowed to login after 2Feb 2001, Sam is expired after 11Nov 2002.. Yes and no. You just have to make a change in the .htaccess file. and also, is it possible to maintain the .htaccess automatically ? like I write a shell script and run it schedully to delete those expired entry ? Yes it a possibility. Think you can make it with a simply fopen() fwrite(), with the cron daemon. The other possibility is to make a folder outside webscope. Then you can make a loginscript in mysql like: ?php $connection = mysql_connect(host, user, pwd); mysql_select_db(db); $query = SELECT id FROM users WHERE user = '$user' AND pwd = '$pwd': $result = mysql_query($query); if(mysql_num_rows($result) 0) { header(Content-type: you choose); header(Content-length: filesize('/home/filename')); header(Content-Disposotion: inline; filename=filename.tar.gz); readfile(/home/filename); } else { echo you are not allowed to download this file!: } ? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: I suck at regular expressions!
Richard S. Crawford wrote: I am trying to get the title of an html file... you know, the string between the title and /title tags... Here is the function I've got so far: function fileTitle($fileName) { $myFile = fopen($fileName, r); $myText=; while (!feof($myFile)) { $myText .= fgets($myFile,255); } fclose($myFile); if (eregi(TITLE(.+)/TITLE,$myText,$theTitle)) return $theTitle[0]; else return (No Title); } Try: function getTitle($filename) { $fp = fopen($filename, r); $filecontent = fread($fp, filesize($filename)); if(eregi(title(.+)/title, $content, $title_arr)) { return addslashes(htmlspecialchars(trim(strip_tags($title_arr[1]; } else { return (No Title); } } Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: how can I get the post content in php
I mean post content string not a lot of variables etc: aaa.html post a=1b=2 to bbb.php I want use php to read the string a=1b=2 not $a and $b I not sure I understand you, but are you looking for $HTTP_SERVER_VARS['QUERY_STRING'] ?? Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: how can I get the post content in php
$HTTP_SERVER_VARS['QUERY_STRING'] -- it just can read the content by GET method. I want POST content Ah okay. Try this: $post_query = ; $keys_arr = array_keys($HTTP_POST_VARS); $keys_size = sizeof($key_arr); for($i=0; $i$keys_size; $i++) { if($i == 0) { $post_query .= $keys_arr[$i].=.$HTTP_POST_VARS[$keys_arr[$i]]; } else { $post_query .= .$keys_arr[$i].=.$HTTP_POST_VARS[$keys_arr[$i]]; } } Regards, Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Database tags ala Lasso
Hi, For the futurists around here: Is there any chance that php will include database tags ala Lasso? For those who don't know what I mean, here's an axample (not quite correct Lasso code, but it should get the point across): [db select=somedb] [db query=sql] table [record] tr !-- everything in this tag is repeated for each record td [field=name] /td td [field=address] /td /tr [/record] /table Err... You get the point... Or, for those of you who have problems recognizing simple stuff when you see it (like myself when trying to learn applescript when I was used to stuff like C), the point is that you don't have to do all that annoying escaping of quotes, and if you open the code in a graphical editor, you can edit to your heart's delight, cuz the db tags stays put. Regards, Sverre Johan Toevik -- disclaimer I speak for myself only! /disclaimer to be yourself, in a world that tries, night and day, to make you just like everybody else - is to fight the greatest battle there ever is to fight, and never stop fighting -- e.e. cummings -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Timestamp math and format
Thanks, That was just what I needed, ie: SELECT DATE_FORMAT(DATE_SUB(insert_date, INTERVAL 2 HOUR), '%b %e (%r)') Johan On 17-Oct-2001 Alfredeen Johan K wrote: I store a timestamp in a database of when a record was inserted. When I pull it out, I format it like this SELECT DATE_FORMAT(insert_date,'%b %e (%r)') AS idate Now I would like to subtract 2 hours from the hour part of the timestamp. What's the easiest way to do this, before or after the formatting? In PHP or mySQL function? Can someone give me some code of how they would do this. SELECT DATE_FORMAT(DATE_SUB(insert_date, INTERVAL 2 HOUR), '%b %e (%r)') Regards, -- Don Read [EMAIL PROTECTED] -- It is necessary for me to learn from others' mistakes. I will not live long enough to make them all by myself. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]