[PHP] imap_fetch_overview to get unseen mail
Hi ppl, I'm trying to mark unseen email messages. 1) Do I use imap_fetch_overview or other functions? 2) Here's the rough structure: if (this_is_an_unseen_mail) { ...codes... } What do I put in the argument for if? Thanx a lot. Enjoy your day! Oh a the latest PHP manual in CHM file is out! _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] word wrapping again
On Mon, 2002-02-25 at 20:36, Michael P. Carel wrote: Hi there, Is there any function that can i used in wrapping a continuous line of words that will be displayed in the HTML table to avoid destroying its table format. I've tried wordwrapping function but it only wraps word with spaces between them. I have a REPORT NO. that is continously incrementing that's why i need that approach. The table will be destroyed if it contains a continuous line of alhanumeric numbers. Please help. Did the third parameter to wordwrap() not work for you? http://www.php.net/wordwrap Cheers, Torben Regards, Mike -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to get information about the php installation
Hi there, I saw on the website of my provider that he is displaying environment variables about his php installation. Not only the version with phpversion() but also about installed libraries etc.. Is there a function for that? Thanx Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How many files can be in one directory?
So this means, that I can not increas the amount by splitting the files into more than 1 directory? In fact it would make it even less, because dirs also need those i-nods, right? Thanx Andy Thalis A. Kalfigopoulos [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 25 Feb 2002, Andy wrote: Hi there, I am building a web application which is storing pictures. Is there a limit of files in one directory on LINUX systems? Perhaps it might end in a problem after having 3 files in the same dir? Performance issues ore something else. The limit depends on how many inodes you have on the filesystem this dir resides on. This is a parameter when first mke3fs was ran to create the fs. Usually you'll have 1 i-node every 4096 bytes and you need 1 inode per file. So do your calculations depending on the size of your partition. cheers, thalis Has anybody got experiance on that? Thanx for any comment, Andy -- 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] array_search
Hi, Can anybody explain why the output of this script is not found Found! Here is the script... $legalfields = array(reasonForRepair); if (array_search(reasonForRepair, $legalfields) == TRUE) { echo Found!br; } else { echo not foundbr; } $legalfields = array(foo, reasonForRepair); if (array_search(reasonForRepair, $legalfields) == TRUE) { echo Found!; } else { echo not found; } ? Thanks in advance, Roger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP features
Hi! Which function should i turn on in the PHP installation to get rid of variables being sent in the url (if i don´t explicitly want them there of course)? - D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] eregi, ereg or smth. else???
I've never had time to get into those ereg, eregi etc. functions, and now I am affraid I probably need to use them. Here is the problem I need to solve: I have a string (lead of an article), about 200-250 characters long. And then I do have a search query - variable $q Now, what I'd like to do is to check wheter this string contains the search query or not. Case sensitivity is not important, so if the $q equals to 'SoMeThInG', the script would find also 'sOmEtHiNg'. If the string contains the search query, I'd like to display 100 characters of this string (lead) - the search query should be in the middle of this substring and within BOLD and /BOLD tags. If the search query is in the beginning of the string, say at position 10, then I'd like to display 100 first characters of the string... and if it is say at position 230 (250 chars together), it should display the string starting at position 250-100. I know it shouldn't be difficult to do, but I am kind of stuck and frustrated. TIA, Kristjan P.S. Pls. CC me as well - I am only in the digest. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array_search
On Tue, 2002-02-26 at 01:29, Roger Keays wrote: Hi, Can anybody explain why the output of this script is not found Found! Yup. array_search() returns the key of the found object, as noted in the docs (http://www.php.net/array_search). Since the first test has the searched-for field at index 0, array_search() will return an int. You're doing a loose (==) test against TRUE (a boolean, not an int), so you get 'not found.'. In the second example, the searched-for item is at index 1, which does loosely evaluate to TRUE. I think the function you're looking for is in_array(): http://www.php.net/in_array Cheers, Torben Here is the script... $legalfields = array(reasonForRepair); if (array_search(reasonForRepair, $legalfields) == TRUE) { echo Found!br; } else { echo not foundbr; } $legalfields = array(foo, reasonForRepair); if (array_search(reasonForRepair, $legalfields) == TRUE) { echo Found!; } else { echo not found; } ? Thanks in advance, Roger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] array_search
array_search returns the key-value of the searched value that is found... in the first case... the returned key is 0 because it's the first element... however... 0 is also the same as FALSE... you should use === (three ='s) ... it's used to compare both value and type... (and 0 is not the same type as FALSE)... Greets, Edward - Original Message - From: Roger Keays [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 10:29 AM Subject: [PHP] array_search Hi, Can anybody explain why the output of this script is not found Found! Here is the script... $legalfields = array(reasonForRepair); if (array_search(reasonForRepair, $legalfields) == TRUE) { echo Found!br; } else { echo not foundbr; } $legalfields = array(foo, reasonForRepair); if (array_search(reasonForRepair, $legalfields) == TRUE) { echo Found!; } else { echo not found; } ? Thanks in advance, Roger -- 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] How to get information about the php installation
I saw on the website of my provider that he is displaying environment variables about his php installation. Not only the version with phpversion() but also about installed libraries etc.. phpinfo(); HTH Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: str_replace and associative arrays
From the manual (http://www.php.net/manual/en/function.str-replace.php http://www.php.net/manual/en/function.str-replace.php ) In PHP 4.0.5 and later, every parameter to str_replace() can be an array. I tried a test case (php 4.0.0) and found that if I passed an array in as the subject the search and replace was performed on the string array. Tim Ward Internet chess www.chessish.com http://www.chessish.com -- From: Michael Crowl [SMTP:[EMAIL PROTECTED]] Sent: 25 February 2002 22:01 To: [EMAIL PROTECTED] Subject: str_replace and associative arrays I haven't been able to find any leads on this in the archives, nor in the documentation, so here goes. When feeding an associative array to str_replace as the subject, does it still return an associative array? My instance: extract(str_replace(,,,$result_row)); After pulling an associative array using mysql_fetch_array(), I can feed it to extract() by itself and it works as predicted and documented. However, if I do the above, where I want to make sure that the text fields (from the db) that I'm using have the commas stripped out of them, extract() chokes with a Warning: Bad datatype for extract(). I'm sure there are no commas in the key names, so those shouldn't be altered. My only assumption is that str_replace returns array results without keys, even though it should take and return mixed subjects, correct? I may just be missing something obvious here, so have pity on a poor soul. You've all been there. (And one of the problems may be that I'm working off of PHP 4.0.3...) $leepless_in_seattle(me); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] eregi, ereg or smth. else???
You don't need regular expressions for this. To match case insensitive, just upper or lower case both strings and use strpos() to find an occurence. Now you allready have the position of the match it'll be easy to get that part of the string. I suggest you substr() it into 3 parts and put the B and /B in between. bvr. On Tue, 26 Feb 2002 11:50:31 +0200 (EET), Kristjan Kanarik wrote: I've never had time to get into those ereg, eregi etc. functions, and now I am affraid I probably need to use them. Here is the problem I need to solve: I have a string (lead of an article), about 200-250 characters long. And then I do have a search query - variable $q Now, what I'd like to do is to check wheter this string contains the search query or not. Case sensitivity is not important, so if the $q equals to 'SoMeThInG', the script would find also 'sOmEtHiNg'. If the string contains the search query, I'd like to display 100 characters of this string (lead) - the search query should be in the middle of this substring and within BOLD and /BOLD tags. If the search query is in the beginning of the string, say at position 10, then I'd like to display 100 first characters of the string... and if it is say at position 230 (250 chars together), it should display the string starting at position 250-100. I know it shouldn't be difficult to do, but I am kind of stuck and frustrated. TIA, Kristjan P.S. Pls. CC me as well - I am only in the digest. -- 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] Converting arrays
Why dont you just use timezones? =S. On Mon, 25 Feb 2002, Gary wrote: Simon Willison wrote: Gary wrote: Hi All, I am not too bad at building arrays in php but I need to convert a javascript form into php. How wuld I conver the small snippit here? var d = new Array(), l = new Array(); l[0] = new Array(1, -360, 1, CHICAGO); l[1] = new Array(1, -420, 1, EDMONTON); l[2] = new Array(1, -540, 1, FAIRBANKS); TIA Gary ?php $l = array(); $d = array(); $l[] = array(1, -360, 1, CHICAGO); $l[] = array(1, -420, 1, EDMONTON); $l[] = array(1, -540, 1, FAIRBANKS); ? The code won't be much use without knowing how it will be used though. Thanks! in the end it is going to be a kind of time converter for internet time. Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: php - assigning date variables
How about SELECT * FROM table WHERE date = '$startdate' AND date = '$enddate'; You can then define startdate and enddate depending on whether you want a date earlier later or the same i.e. if the same then make startdate and enddate the date you want, if earlier then make the startdate blank, etc. Tim Ward Internet chess www.chessish.com http://www.chessish.com -- From: Craig Westerman [SMTP:[EMAIL PROTECTED]] Sent: 25 February 2002 19:32 To: Lerp Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Re: php - assigning date variables Joe, I don't want to change the query itself like you show. I want to use this query $query = mysql_query(SELECT * FROM table WHERE date LIKE '%. $query .%'); and change only the variable $query = I use $query throughout script for other things. Thanks Craig [EMAIL PROTECTED] Hi there :) 1. mysql_query(SELECT * FROM table WHERE date ='$mydate'); # where date is same 2. mysql_query(SELECT * FROM table WHERE date '$mydate'); # where date is newer 3. mysql_query(SELECT * FROM table WHERE date '$mydate'); # where date is older 4.mysql_query(SELECT * FROM table WHERE date BETWEEN '$myfirstdate' AND '$myseconddate'); # where date is between 2 dates Hope this helps, Joe :) Craig Westerman [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... $query = mysql_query(SELECT * FROM table WHERE date LIKE '%. $query .%'); // returns all items in database $query = 2001-01-01 mysql_query(SELECT * FROM table WHERE date LIKE '%. $query .%'); // returns all rows that have 2001-01-01 as the date What is proper way to define a variable to include all dates newer than 1995-01-01? $query = ??? What is proper way to define a variable to include all dates older than 1995-01-01? $query = ??? What is proper way to define a variable to include all dates between 1995-01-01 and 1998-12-31? $query = ??? Everything I tried gives me a error. This has to be simple, but I must be overlooking something. Where would I find the answer? Thanks Craig [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] format text
hello i am looking for a way of formatting my text when i select it from mysql, looking for a function like cold fusion paragraphformat() that will preserve line breaks etc when i select my data from the database. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: word wrapping again
This is really an html issue. HTML will only text wrap (in a compliant browser) on white space. If you want a server side solution to solve this you'll need to break up long words with a space or line-break. Tim Ward Internet chess www.chessish.com http://www.chessish.com -- From: Michael P. Carel [SMTP:[EMAIL PROTECTED]] Sent: 26 February 2002 04:37 To: php Subject: word wrapping again Hi there, Is there any function that can i used in wrapping a continuous line of words that will be displayed in the HTML table to avoid destroying its table format. I've tried wordwrapping function but it only wraps word with spaces between them. I have a REPORT NO. that is continously incrementing that's why i need that approach. The table will be destroyed if it contains a continuous line of alhanumeric numbers. Please help. Regards, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Forms
Hi I think your mysql_query is wrong. You need to include the $db variable in the query otherwise it doesn't know where to put the stuff. $result = mysql_query($sql, $db); Cheers JD -Original Message- From: Chiew, Richard [mailto:[EMAIL PROTECTED]] Sent: Monday, February 25, 2002 6:31 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP Forms I have the following php code to asks for a new student to fill out a registration form. Using php, take what the user enters and put it into the students table. But when i select * from students in mysql, it didn't show, why? HTML BODY bgColor=#ff ?php if ($submit) { // process form $db = mysql_connect (localhost, root, mollier); $select=mysql_select_db (mydb); $sql = INSERT INTO students (student_id, firstname,lastname, address) VALUES ('$student_id', '$firstname', '$lastname', '$address'); $result = mysql_query($sql); echo Thank you! Information entered.\n; } else{ // display form ? FORM onsubmit=return formvalidation(this) action=?php echo $PHP_SELF? method=postINPUT type=hidden value=New Student Registration - BBS name=FORM_NAME P style=LINE-HEIGHT: 100%; BACKGROUND-COLOR: #ff align=centerBFONT color=#ff size=5BRREGISTRATION FORMBRBR/FONT/B/P PREB FONT color=#ffREQUIRED QUESTIONS:/FONT/B BR 1. What is your student id number?nbsp;INPUT tabIndex=2 maxLength=46 size=46 name=student_idBR 2. What is your name?BR First name:input type=Text name=firstnamebr Last name:input type=Text name=lastnamebr Address: input type=Text name=address size=60BR /PRE UL LI P style=BACKGROUND-COLOR: #fffont color=#FF3300Please click the Submit Button only once/font /P LI P style=BACKGROUND-COLOR: #fffont color=#FF3300Then wait for your confirmation screen/font /P LI P style=BACKGROUND-COLOR: #fffont color=#FF3300Save the confirmation screen because it has information you will need/font /P /LI/UL P style=BACKGROUND-COLOR: #ffINPUT type=submit value=Submit Registrationnbsp;/P P style=BACKGROUND-COLOR: #ff align=centerEnd of Form-Thank You!/P/FORM HR H5 style=BACKGROUND-COLOR: #ff /H5 ?php } // end if ? /BODY/HTML
Re: [PHP] SOAP status
On Mon, 25 Feb 2002, Robert Mena wrote: I was wondering if anyone has developed web services using SOAP with php. I'd like to use it in a future project but was wondering which tools (classes, exemples) do we have and how stable are they. PEAR has an ongoin work going on with SOAP. See: http://chora.php.net/cvs.php/pear/SOAP -- Mika Tuupola http://www.appelsiini.net/~tuupola/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache is not parsing my php...sometimes...
Kevin, I'm posting this to the list as a private email to you was returned with a 550 Access denied error. Without a filename extension, apache assumes it is whatever DefaultType (in httpd.conf) is set to. Usually this is text/plain. In one (Oracle) application I've had to set this to text/html. If you want php assumed then I guess you need to set it to application/x-httpd-php but I don't know that this is a good idea. Maybe someone else knows better? Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a way to put a scroll in a table ???
Hello Sir, Thanks for your response, but my problem is I have a main form, from which I get the user's input(i.e user can select the start date and end date), using these date I have to fetch records from the tables. If I use frames, then how to send the prameters from main form to other three scripts, I tried this before but I'am not able to get the arguments in the frames file. I don't want to use Java Applet. I have to do this with PHP and HTML, If there is a way to send a value to three different file at a time then that would be great. If possible please send me some samples. Heck I would probably suggest using frames. You could even get pretty slick with it by going with iFrames for IE and frames for Netscape. Of course there is the other option of using a Java Applet... There are what first occured to me, Im sure there are plenty more options out there if I where to give it some concreate thought. - Original Message - From: J.F.Kishor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 12:21 AM Subject: [PHP] Is there a way to put a scroll in a table ??? Hi all, I'am breaking my head by trying to put a scroll in a table, my problem is, using php 'am trying to display a report and the report should have three tables, data to display are taken from three different tables and number of rows returned are three different values, the number of rows returned may be 10, 100 or more then 100, since I have to show all three table in a single form, I have decided to display five rows in each table, so I need to put a scroll in all the tables through which the user could scroll till the last records. 1. Is there any other solution to solve it out ? 2. Is there a way to put a scroll in a table ? I tried using layers and its working fine in Internet explorer, and in Netscape the scroll does'nt work. I kindly request you, to help me out in this problem. Thanks in adv.. - JFK kishor Nilgiri Networks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - JFK kishor Nilgiri Networks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] extending a class?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all Is it possible to extend a class based on a value passed to the constructor? Here's the scenario: I'm going to build a class to help me knock out contanct forms for clients and I want to be able to run certain routines with either Danish or English msg's. So I was thinking: $form=new form('dk') Would extend the class to include all the dk language routines and $form=new form('en') Would do likewise for english. Do you see what I mean? Many thanks. - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8e252HpvrrTa6L5oRAnKFAJ9+bWkCFst5Y1YB/y0E8bbgqMnUUgCfVwQN +IB7iaz5lgzE7EkE/OfqmqE= =kfok -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a way to put a scroll in a table ???
J.F.Kishor wrote: 1. Is there any other solution to solve it out ? 2. Is there a way to put a scroll in a table ? I tried using layers and its working fine in Internet explorer, and in Netscape the scroll does'nt work. Try using iframes - they are supported in IE, Netscape 6 / Mozilla and Opera - however they won't work in Netscape 4. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Fetching the values from previous page
-Original Message- From: Steven Walker [mailto:[EMAIL PROTECTED]] Sent: 25 February 2002 18:04 There are global variables that serve this purpose. You must have register_globals turned on: Actually, no -- that's the wrong way round. The associative arrays are always there -- it's the individual variables matching the form fieldnames that need register_globals. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: str_replace and associative arrays
Actually, that may be part of the problem, I'm using the more recent PHP Manual on my local machine, while deving on a remote machine running 4.0.3. I had assumed the subject had always accepted and returned mixed variables in previous versions, but apparently that isn't the case. Ah well, we're upgrading tomorrow anyway. Thanks for verifying, Tim. -- mike On Tue, 26 Feb 2002, Tim Ward wrote: From the manual (http://www.php.net/manual/en/function.str-replace.php http://www.php.net/manual/en/function.str-replace.php ) In PHP 4.0.5 and later, every parameter to str_replace() can be an array. I tried a test case (php 4.0.0) and found that if I passed an array in as the subject the search and replace was performed on the string array. Tim Ward Internet chess www.chessish.com http://www.chessish.com -- From: Michael Crowl [SMTP:[EMAIL PROTECTED]] Sent: 25 February 2002 22:01 To: [EMAIL PROTECTED] Subject: str_replace and associative arrays I haven't been able to find any leads on this in the archives, nor in the documentation, so here goes. When feeding an associative array to str_replace as the subject, does it still return an associative array? My instance: extract(str_replace(,,,$result_row)); After pulling an associative array using mysql_fetch_array(), I can feed it to extract() by itself and it works as predicted and documented. However, if I do the above, where I want to make sure that the text fields (from the db) that I'm using have the commas stripped out of them, extract() chokes with a Warning: Bad datatype for extract(). I'm sure there are no commas in the key names, so those shouldn't be altered. My only assumption is that str_replace returns array results without keys, even though it should take and return mixed subjects, correct? I may just be missing something obvious here, so have pity on a poor soul. You've all been there. (And one of the problems may be that I'm working off of PHP 4.0.3...) $leepless_in_seattle(me); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] extending a class?
Nick Wilson wrote: So I was thinking: $form=new form('dk') Would extend the class to include all the dk language routines and $form=new form('en') Would do likewise for english. You can do this with encapsulation. Your form object would actually be a wrapper around an encapsulated object which does all of the actual work. When you call the constructer it specifies which object is encapsulated by the wrapper. For example: class FormBase { // Contains any methods shared by both formDK and formEN } class FormDK extends FormBase { // The class for DK language support } class FormEN extends FormBase { // The class for EN language support } class Form { var $formObject; function form($language) { if ($language == 'dk') { $this-formObject = new FormDK; } else { $this-formObject = new FormEN; } } // The other methods in this class simply pass through to $this-formObject - e.g function doSomething($variable) { return $this-formObject-doSomething($variable); } } Another different of doing the same kind of thing would be to use an object factory as seen in the PEAR DB abstraction layer. This works by having a static class method (i.e a method that can be called without creating an instance of the class first) which returns a different object depending on what arguments you use. Here is an example (it expects FormEN and FormDK to have been defined as above): class Form { function getFormObject($language) { if ($language == 'dk') { return new FormDK; } else { return new FormEN; } } You can now create you object with the following code: $form = Form::getFormObject('en'); or $form = Form::getFormObject('dk'); disclaimer: I haven't tested any of the above code but the principles should be sound Cheers, Simon Willison -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] extending a class?
Hi Instead of extending the class you can create a language object inside 'form' class and refer it for all your stuffs regardless of language. class form { function form($lang) { if($lang == dk) { $this-lang = new dk(); } else if ($lang == en) { $this-lang = new en(); } } do what ever language stuff with $form-lang-somefunc(); Is it Ok...? On Tue, 26 Feb 2002, Nick Wilson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all Is it possible to extend a class based on a value passed to the constructor? Here's the scenario: I'm going to build a class to help me knock out contanct forms for clients and I want to be able to run certain routines with either Danish or English msg's. So I was thinking: $form=new form('dk') Would extend the class to include all the dk language routines and $form=new form('en') Would do likewise for english. Do you see what I mean? Many thanks. - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8e252HpvrrTa6L5oRAnKFAJ9+bWkCFst5Y1YB/y0E8bbgqMnUUgCfVwQN +IB7iaz5lgzE7EkE/OfqmqE= =kfok -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php [EMAIL PROTECTED] --- We must use time wisely and forever realize that the time is always ripe to do right. -- Nelson Mandela --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php, win32, xml bug?
J Wynia [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The first thing I'd do is run your transformation through one of (or all of) the rest of the XSL engines out there. There's a lot more variability out there in XSL engines. Unfortunately, Sablotron isn't the most conformant of the field. I haven't used Sablotron in a while for XSLT processing so am not sure of your specific question. I left Sablotron behind for reasons like this one. It fails on a great many transformations that run through Xalan, Saxon and MSXML identically with no errors. My general rule is if it blows up all XSLT engines, it's probably my XSLT. If Sablotron's the only one that chokes, it's Sablotron. The new API for XSLT should allow for the other engines, however, I haven't seen anything on putting the rest of them into the equation, yet. i tested it on MSXSL, no problem, all runs fine. but how to choose another xsl-engine? thanks alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP features
If you are talking about the session variables use --enable-trans-sid, if you are talking about variables passed from your form fields to another script use form method=post ... on in your html. =S. On Tue, 26 Feb 2002, Daniel Alsén wrote: Hi! Which function should i turn on in the PHP installation to get rid of variables being sent in the url (if i don´t explicitly want them there of course)? - D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] extending a class?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Simon Willison declared Another different of doing the same kind of thing would be to use an object factory as seen in the PEAR DB abstraction layer. This works by having a static class method (i.e a method that can be called without creating an instance of the class first) which returns a different object depending on what arguments you use. Here is an example (it expects FormEN and FormDK to have been defined as above): class Form { function getFormObject($language) { if ($language == 'dk') { return new FormDK; } else { return new FormEN; } } You can now create you object with the following code: $form = Form::getFormObject('en'); or $form = Form::getFormObject('dk'); Yep, I'll give that a go. That seems to be a nice clean way to do it and I understand it a little better than your first example. :: is a construct I've not used in php before. I know of Pear and have seen the :: jobbie before but thought it unique to Pear and not available to mear mortals. Thanks very much... - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8e3ryHpvrrTa6L5oRAt7aAJ9HquqJx/hRTfJUUyuwVWOb9lG3RgCfU2ZF 4O+mJugGsM95XhoUj6Tc0PY= =2X43 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] extending a class?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then S.Murali Krishna declared Hi Instead of extending the class you can create a language object inside 'form' class and refer it for all your stuffs regardless of language. class form { function form($lang) { if($lang == dk) { $this-lang = new dk(); } else if ($lang == en) { $this-lang = new en(); } } do what ever language stuff with $form-lang-somefunc(); Is it Ok...? Yes, I think I see what you mean, I'ts similar to the first example of Simons. I think I'll try the 'Pear like' one and hope it doesn't go 'Pear shaped'! Thanks for the help - -- - --- www.explodingnet.com |Projects, Forums and +Articles for website owners - -- Nick Wilson -- |and designers. -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8e3tWHpvrrTa6L5oRAqT3AJ9IY9w8Q4nNVcagOx8K5RVNAHH3CwCglx/a /NRExSB2a+/t81N5gbJEme8= =YeLr -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: GD - dynamic PNG generation
I managed to fix my problem, it seems that it was taking so long because of the consturction of a for loop of mine. I was calling the ImagePNG function too early, menaing it seemed to take forever to execute. it's now running at a fraction of it's original time. Conor On Mon, Feb 25, 2002 at 06:30:35PM +, Conor McTernan wrote: hmm, sounds like a good idea, i'll give it a try. it seems too, that if i dont break up my text, i.e. print all of it in one long line, it runs a lot faster i'm running this under Win2k, i got a PIII i dunno how many mhz(it's a college PC, and everything is locked down on me) but i'd guess at 800mhz or something like that. i think i'm also running about 256mb or ram. so my specs are pretty good, i would imagine. i'll look into the multiple images soloution. cheers i'll get back to y'all with my results. Conor On Mon, Feb 25, 2002 at 01:21:42PM -0500, Michael Kimsal wrote: Holy cow that's a big graphic. 20 seconds does sound a tad long, but might not be depending on the server and memory - what are the specs? What might possibly speed it up a bit is to create multiple small versions first (20 one line graphics, for example) and build them all together at the end by loading and copying into the final large area - this MIGHT cut down time a bit, because all the drawing operations would take place against a smaller memory area. Just a hunch though. Conor McTernan wrote: I'm currently using the GD extension to generate dynamic PNG's containing text, that should eventually be coming from a database. the deal is, it seems to take a long time, which is probably my own fault, seeing that I'm generating so much text. I am generating an image containing approx 160 lines of text, and it takes about 20seconds to create, this unfortunatley is too long for me. I was wondering if this is a common time with GD or if I am doing something wrong. Coding wise, I currently read the text in from a file, then put the text into an array, each line being a seperate entry in the array. I then create a PNG image approx 490*1848(i change the image size depending on the amount of text). I dont do anything really strange in my image function, apart from performing a wordwrap on the text before i start displaying it, just to make the image readable. ideally I would like this to come in considerably quicker. that said, if this is going to be used, it will probably done as a cron job, so if need be I will have toaccept it being super slow. any help is appreciated bros Conor -- 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] Compiled php again but running still old php version
Hi there, I did build php4.1.1 on RH7.2 with a different configuration command. After restarting the server, the phpinfo shows still the same version and the old configure command. Do I have to point to the new installation? This suprises me, because everything went ok during compile. Thanx for any help Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamic pulldown list generation help
Basically I am setting ls array(). I want each item to be an option in the array. I have have scoured for some time now and this is what I have come up with, but it is not populating each file as an option? The select box is just empty. I know this is an array because I have tested with print_r. Stuck! Can someone tell me what I am doing wrong? ? $shell_scripts=`ls -1 /sm_scripts|grep -v backup|grep -v outmail|grep -v c_`; $shell_scripts=rtrim($shell_scripts); $arr1=split(\n, $shell_scripts); //print_r($arr1); echo p; echo select name=test; function generate_option_list($arr1, $set) { reset($arr1); while (list($key,$value) = each($arr1) ) { {$var.=option value='$key'$value/option;} } return $var; } echo /select; ? TIA, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiled php again but running still old php version
On Mar 26 Feb 2002 09:46, you wrote: Hi there, I did build php4.1.1 on RH7.2 with a different configuration command. After restarting the server, the phpinfo shows still the same version and the old configure command. Do I have to point to the new installation? This suprises me, because everything went ok during compile. locate mod_php or, if updatedb hasn't been runned yet find /usr -name mod_php* -print Check the output of those commands to see where the old php module is, and where the new one was installed. Then, just copy the new one over the old one. Saludos... :-0 -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? - Martín Marqués |[EMAIL PROTECTED] Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache is not parsing my php...sometimes...
I'm posting this to the list as a private email to you was returned with a 550 Access denied error. Surely open systems means 'open' - in the support community as well as other aspects!? Echoing/amplifying Torben's comment earlier: Private replies do not benefit others on the list (presumably with similar questions/learning need), nor do they end up in any archive. It is annoying to reply to a question 'back up the list' only to be told that you have wasted your time and effort because someone else replied earlier (but you couldn't save yourself the trouble because he/she/it didn't CC the list). Nuff said? =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: php email question
Terry, I am trying to set up a MIME email that would include an HTML and Plain Text version of content, such that if the recipient's email client did not understand html or have html disabled, that the content would come through as plain text, but if html were accepted, the plain text would be ignored so that it did not show as duplication. What I have currently works good for the html but the plain text shows up as well. The mail class is from PROFESSIONAL PHP PROGRAMMING. Snippet of code is: include(include/plain.inc); // the plain text version -- returns $body include(include/format.inc); // html version -- returns $data $subject = ; $to = [EMAIL PROTECTED]; $from = adfarm; // create an instance $mail = new mime_mail; $mail-from = $from; $mail-to = $to; $mail-subject = $subject; $mail-body = ; $content_type=text/html; charset=us-ascii; $mail-add_attachment($data, , $content_type); $content_type=text/plain; $mail-add_attachment($body, , $content_type); $mail-send(); echo(h2Newsletter has been sent./h2); It is a good idea to have some content in text even though the main message is in HTML - for those who have text-only email clients! However not all clients handle the one-or-the-other scenario. So your 'problem' may be with the particular client, or may be with the MIME encoding. Recommend a visit to http://ww.phpguru.org/ and adapt/upgrade to the MIME and SMTP classes there (download includes a set of examples - one sounds just like your construction). Have no complaints with my service/combined HTML and simple-text messages, built on these classes! Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Changing arguments in the php.ini file
Hi my system is: Windows Me Apache Server for Windows 1.3... PHP 4.1.1 I have the following problem. I change the variables in the C:\WINDOWS\php.ini file but there is no affect. Also after the change I always restart the Apache server and icall the php.info() function. The function's results are not changed. Example I change the register_globals from Off to On but there is no affect also for the display_errors. Any ideas? _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamic pulldown list generation help
On Tuesday 26 February 2002 20:50, Andrew Slezak wrote: Basically I am setting ls array(). I want each item to be an option in the array. I have have scoured for some time now and this is what I have come up with, but it is not populating each file as an option? The select box is just empty. I know this is an array because I have tested with print_r. Stuck! Can someone tell me what I am doing wrong? ? $shell_scripts=`ls -1 /sm_scripts|grep -v backup|grep -v outmail|grep -v c_`; $shell_scripts=rtrim($shell_scripts); $arr1=split(\n, $shell_scripts); //print_r($arr1); echo p; echo select name=test; function generate_option_list($arr1, $set) { reset($arr1); while (list($key,$value) = each($arr1) ) { {$var.=option value='$key'$value/option;} } return $var; } echo /select; ? You've defined a function generate_option_list, but you haven't called it! -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Somehow, the world always affects you more than you affect it. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache is not parsing my php...sometimes...
DL Neil wrote: Echoing/amplifying Torben's comment earlier: Private replies do not benefit others on the list (presumably with similar questions/learning need), nor do they end up in any archive. I did not feel the particular question added to the sum total of information so replied privately. I take the point though and will err on the side of adding noise to the list rather than the list missing any useful information. Thanks for the prompt, I take it constructively. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CGI
Hey I have some cgi files who are in the /usr/lib/xxx/cgi-bin/ directory How can i make them a part of my php meaning that in the current situation the url is something like this http://x.x.xxx/cgi-bin/cgiscripts/.cgi and i want it to be something like this http://../index.php?action=cgiscripts=xxx.cgi Maybe a stupid question but Kind regards Sven
Re: [PHP] Changing arguments in the php.ini file
Try to STOP and then START apache, not restart. If it doesn't work make sure that there is no php.ini file in the c:\phpinstalldir\.but only in your WINDIR. - Original Message - From: Kostas Karadamoglou [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 4:06 PM Subject: [PHP] Changing arguments in the php.ini file Hi my system is: Windows Me Apache Server for Windows 1.3... PHP 4.1.1 I have the following problem. I change the variables in the C:\WINDOWS\php.ini file but there is no affect. Also after the change I always restart the Apache server and icall the php.info() function. The function's results are not changed. Example I change the register_globals from Off to On but there is no affect also for the display_errors. Any ideas? _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- 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] CGI
in index.php, you can do: ? if (action==cgi) header(Location: cgi-bin/cgiscripts/.$scripts); ? or ? if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`; ? Op dinsdag 26 februari 2002 15:30, schreef u: Hey I have some cgi files who are in the /usr/lib/xxx/cgi-bin/ directory How can i make them a part of my php meaning that in the current situation the url is something like this http://x.x.xxx/cgi-bin/cgiscripts/.cgi and i want it to be something like this http://../index.php?action=cgiscripts=xxx.cgi Maybe a stupid question but Kind regards Sven Op dinsdag 26 februari 2002 15:30, schreef Sven Jacobs: Hey I have some cgi files who are in the /usr/lib/xxx/cgi-bin/ directory How can i make them a part of my php meaning that in the current situation the url is something like this http://x.x.xxx/cgi-bin/cgiscripts/.cgi and i want it to be something like this http://../index.php?action=cgiscripts=xxx.cgi Maybe a stupid question but Kind regards Sven -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Damned HTTP_HOST
Hi, I'm trying to find the HTTP_HOST adress of my website. I've try the followings : $HTTP_HOST : nothing $ALL_HTTP[HTTP_HOST ] : nothing $_SERVER[HTTP_HOST ] : nothing But when I print $ALL_HTTP or $_SERVER, I obtain the followings lines : HTTP_ACCEPT_CHARSET iso-8859-1,*,utf-8 HTTP_ACCEPT_LANGUAGE en,fr-BE HTTP_ACCEPT_ENCODING gzip HTTP_PRAGMA no-cache HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, HTTP_HOST 193.190.218.xxx So, how can I receive this damned HTTP_HOST adress ? Thank you in advance Dominique van der Wal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP + ODBC on IIS (Win2k)
Hello! I am having a really ugly problem here and I hope somebody can help me with this. I work on - Windows 2000 Advanced Server - PHP for Windows and IIS (it works ok) I have a DBTest.mdb database (Access 2000) and an ODBC connection to this database: System DSN=DBTest, no user and password to connect! I have tested this ODBC connection with a VBasic simple application and it works just fine. Now I create a Test.php file with this content: ?php odbc_connect(DBTest, , ); ? When I open this file in the browser http://localhost/directory/Test.php? I get the next error: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect in C:\inetpub\wwwroot\directory\Test.php on line 3 I have checked everything and the database is not opened by anybody. Plus, the Security rights are set to enable Everyone and Internet Guest Account (IUSR_myserver) to have Full Control ont the database. So, could anybody help me with this PLEASE?? :`-( Thank you in advance, Sebastian. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] CGI
Maybe I'm misunderstanding the question, but you should be able to make an alias in your httpd.conf file that points /cgi-bin/cgiscripts to /usr/lib/xxx/cgi-bin/ . Then in your scripts variable you would need something like this: scripts=/cgi-bin/cgiscripts/xxx.cgi Someone please correct me if I'm wrong. Hope this helps. -Original Message- From: Sven Jacobs [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 9:31 AM To: '[EMAIL PROTECTED]' Subject: [PHP] CGI Hey I have some cgi files who are in the /usr/lib/xxx/cgi-bin/ directory How can i make them a part of my php meaning that in the current situation the url is something like this http://x.x.xxx/cgi-bin/cgiscripts/.cgi and i want it to be something like this http://../index.php?action=cgiscripts=xxx.cgi Maybe a stupid question but Kind regards Sven
Re: [PHP] CGI
Please note that plain this: or ? if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`; ? is not a good idea, because it allows a visitor to run arbitrary commands on your server. bvr. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Changing arguments in the php.ini file
Hi my system is: Windows Me Apache Server for Windows 1.3... PHP 4.1.1 I have the following problem. I change the variables in the C:\WINDOWS\php.ini file but there is no affect. Also after the change I always restart the Apache server and icall the php.info() function. The function's results are not changed. Example I change the register_globals from Off to On but there is no affect also for the display_errors. Any ideas? --- Reply: Try to STOP and then START apache, not restart. If it doesn't work make sure that there is no php.ini file in the c:\phpinstalldir\.but only in your WINDIR. --- After this reply I Stop and then Start Apache but there is no affect It does not work even if i delete the php.ini... in the c:\phpinstalldir\ _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP + ODBC on IIS (Win2k)
Sebastian, Check your System DSN - Options button, and verify that you don't have Exclusive checked off. Hope this helps. Best regards, Andrew Hill Director of Technology Evangelism http://www.openlinksw.com/virtuoso/whatis.htm OpenLink Virtuoso Internet Data Integration Server -Original Message- From: Sebastian Timocea [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 9:47 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP + ODBC on IIS (Win2k) Hello! I am having a really ugly problem here and I hope somebody can help me with this. I work on - Windows 2000 Advanced Server - PHP for Windows and IIS (it works ok) I have a DBTest.mdb database (Access 2000) and an ODBC connection to this database: System DSN=DBTest, no user and password to connect! I have tested this ODBC connection with a VBasic simple application and it works just fine. Now I create a Test.php file with this content: ?php odbc_connect(DBTest, , ); ? When I open this file in the browser http://localhost/directory/Test.php? I get the next error: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect in C:\inetpub\wwwroot\directory\Test.php on line 3 I have checked everything and the database is not opened by anybody. Plus, the Security rights are set to enable Everyone and Internet Guest Account (IUSR_myserver) to have Full Control ont the database. So, could anybody help me with this PLEASE?? :`-( Thank you in advance, Sebastian. -- 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] extension crashing php 4.11/Apache 1.3
Hi! If this is not the group to discuss the issues of writing extensions please let me know, but for now I have a question: What causes php to crash after 256 executions of my extension? / How can this be avoided? The extension opens a file (on the server), writes some values into it and closes the file (yes, I did not forget the fclose!). I use the standard C file handling commands (fopen, ...). Additionally some mysql requests are done. The whole extension works fine, it reads the right values, creates the file and stores the values in a correct way. It's just that it crashes after 256 executions. With PHP used as a module it does not make a difference if the requests to the ext were made from one or from several pages. With PHP used as a cgi binary it crashes only if the requests were all done from one page. The error messages are: for the CGI binary: PHP caused an invalid page fault in PHP4TS.DLL for the module: APACHE caused an invalid page fault in PHP4TS.DLL In the first case APACHE continues to behave exactly like before the crash, and I get an Internal Sever Error, if the latter case APACHE crashes again and again until I press the stop button of the browser. I would be grateful If you could tell me were the error lies, Basti PS: some more useful information: About the environment: Windows 98 SE, PHP 4.1.1, Apache 1.3.14, MySql 3.23 beta, The extension was compiled using MS Visual C++ 6.0 The browser is running on the same machine as the servers. Some part of the code: FILE * open_matfile(char * mode){ FILE * mf; mf=fopen(d:\\studium\\pilanesberg\\homepage\\matrix.dat, mode); if (!mf) { zend_printf(Error opening matrix file in mode %s: %i.br,mode, ferror(mf)); } return (mf); } int store_matrix(int dMat[][MAXI], int nMat[][MAXI], int nodes[], int numOfNodes){ FILE *matFile; //the matrix file matFile=open_matfile(wb); {...} fclose(matFile); return(0); } int load_matrix(int dMat[][MAXI], int nMat[][MAXI], int nodes[MAXI/2]){ FILE *matFile; matFile=open_matfile(rb); if (!matFile) {return(0);} {...} if (fclose(matFile)){ zend_printf(Error closing matrix filebr); return(0); } {...} } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CGI
bvr wrote: Please note that plain this: or ? if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`; ? is not a good idea, because it allows a visitor to run arbitrary commands on your server. bvr. If you still want to use that method have a look at these two functions which can be used to make user input safe for use on a command line: http://www.php.net/manual/en/function.escapeshellarg.php http://www.php.net/manual/en/function.escapeshellcmd.php Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] CGI
Also, make sure that if you run the script with user input that you validate the input... Input like 'username; cat /etc/passwd' would be no fun at all -Original Message- From: Simon Willison [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 7:14 AM To: bvr Cc: php-general Subject: Re: [PHP] CGI bvr wrote: Please note that plain this: or ? if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`; ? is not a good idea, because it allows a visitor to run arbitrary commands on your server. bvr. If you still want to use that method have a look at these two functions which can be used to make user input safe for use on a command line: http://www.php.net/manual/en/function.escapeshellarg.php http://www.php.net/manual/en/function.escapeshellcmd.php Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help needed with Sessions
Start here: http://www.php.net/manual/en/ref.session.php You will need to call session_start() to initiate the session. You will also need to register the variables you want in the session with session_register(). Good luck! Kirk -Original Message- From: WG4- Cook, Janet [mailto:[EMAIL PROTECTED]] Sent: Monday, February 25, 2002 10:06 PM To: PHP List Subject: [PHP] Help needed with Sessions Hi all, I am trying to get sessions to work to use to pass some data around, but the values do not seem to be coming through - I've probably got something basic wrong PHP version is 4.0.4pl1 sources are validate.php ?php include(header.inc); ? HTML HEAD TITLEToday's Date/TITLE /HEAD BODY ?php $dbcnx=@mysql_connect(localhost,root,); echo ( P Connection established on $dbcnx/P); if (!$dbcnx) { echo( PUnable to connect to MySql Server at this time./P); exit(); } else { echo (PConnected to My Sql Server on connection $dbcnx./P); }; if (! mysql_select_db(DMS, $dbcnx)) { echo( PUnable to connect to DMS database at this time./P); exit(); } else { echo( Established connection to DMS db); }; $whoid=10; ? A HREF=jtest.php?name=3?testlink/A /BODY /HTML and in jtest.php I have ?php include(header.inc); ? ?php echo In jtest values are $dbcnx $whoid; ? The connection establishes, but the values do not appear to be there in the jtest page? Any ideas Thanks Janet -- 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] Compiled php again but running still old php version
I did build php4.1.1 on RH7.2 with a different configuration command. After restarting the server, the phpinfo shows still the same version and the old configure command. Do I have to point to the new installation? This suprises me, because everything went ok during compile. locate mod_php or, if updatedb hasn't been runned yet find /usr -name mod_php* -print please note: if you run php compiled into apache you should recompile apache after a make install in the php dir... run a make and a make install in your apache sourcetree and restart apache using apachectl with kind regards, Joffrey van Wageningen -- .-[ Joffrey van Wageningen | WoLFjuh | [EMAIL PROTECTED] ]-- | Networking Event 2000 - www.ne2000.nl - IRCnet:#ne2000, Undernet:#clue | PGP:1024D/C6BA5863 - 3B93 52D3 CB91 9CB7 C50D FA79 865F 628A C6BA 5863 | * We demand guaranteed rigidly defined areas of doubt and uncertainty. | -- Douglas Adams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP + ODBC on IIS (Win2k)
PHP will not work on that way in order to retrieve data from Access using ODBC. Check the URL: http://www.phpbuilder.com/columns/timuckun20001207.php3 See you !!! Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+6469 - Remitido por Ignacio Estrada Fonseca/CEN/GDL/CFE con fecha 02/26/2002 09:34 - Andrew Hill ahill@openliPara: Sebastian Timocea [EMAIL PROTECTED], [EMAIL PROTECTED] nksw.comcc: Asunto: RE: [PHP] PHP + ODBC on IIS (Win2k) 02/26/2002 08:53 Sebastian, Check your System DSN - Options button, and verify that you don't have Exclusive checked off. Hope this helps. Best regards, Andrew Hill Director of Technology Evangelism http://www.openlinksw.com/virtuoso/whatis.htm OpenLink Virtuoso Internet Data Integration Server -Original Message- From: Sebastian Timocea [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 9:47 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP + ODBC on IIS (Win2k) Hello! I am having a really ugly problem here and I hope somebody can help me with this. I work on - Windows 2000 Advanced Server - PHP for Windows and IIS (it works ok) I have a DBTest.mdb database (Access 2000) and an ODBC connection to this database: System DSN=DBTest, no user and password to connect! I have tested this ODBC connection with a VBasic simple application and it works just fine. Now I create a Test.php file with this content: ?php odbc_connect(DBTest, , ); ? When I open this file in the browser http://localhost/directory/Test.php? I get the next error: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect in C:\inetpub\wwwroot\directory\Test.php on line 3 I have checked everything and the database is not opened by anybody. Plus, the Security rights are set to enable Everyone and Internet Guest Account (IUSR_myserver) to have Full Control ont the database. So, could anybody help me with this PLEASE?? :`-( Thank you in advance, Sebastian. -- 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] CGI
Well, okay. It was an example. Then do: if (action==cgi file_exists($script)) Op dinsdag 26 februari 2002 16:00, schreef bvr: Please note that plain this: or ? if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`; ? is not a good idea, because it allows a visitor to run arbitrary commands on your server. bvr. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How many files can be in one directory?
On a Unix or Unix-like operating systems you should be able to do a df -i to get a report on how many inodes are being used and the number remaining. The output differs slightly from os to os but the base information should be there. Example output from FreeBSD 4.5 follows Filesystem 1K-blocks UsedAvail Capacity iused ifree %iused Mounted on /dev/da1s1a124015392047489034%1348 29882 4% / /dev/da1s1f 1731162 973505 61916561% 76234 35672418% /usr /dev/da1s1e 49583172352838238%2350 1019219% /var /dev/da0s1f711792 316939 32367449% 46523 13158726% /usr/src /dev/da2s1e 3096462 128792 2719954 5%4767 384607 1% /usr/home /dev/da2s1f856770 231188 53990530% 19125 195145 9% /usr/local Jason -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 2:32 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] How many files can be in one directory? So this means, that I can not increas the amount by splitting the files into more than 1 directory? In fact it would make it even less, because dirs also need those i-nods, right? Thanx Andy Thalis A. Kalfigopoulos [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 25 Feb 2002, Andy wrote: Hi there, I am building a web application which is storing pictures. Is there a limit of files in one directory on LINUX systems? Perhaps it might end in a problem after having 3 files in the same dir? Performance issues ore something else. The limit depends on how many inodes you have on the filesystem this dir resides on. This is a parameter when first mke3fs was ran to create the fs. Usually you'll have 1 i-node every 4096 bytes and you need 1 inode per file. So do your calculations depending on the size of your partition. cheers, thalis Has anybody got experiance on that? Thanx for any comment, Andy -- 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] PHP + ODBC on IIS (Win2k)
Ignacio, He can use Access and local ODBC just fine, as he is on a Windows box. Actually, the ODBC Socket server isn't needed from Linux either, as OpenLink provides Single-Tier and Multi-Tier ODBC drivers from *nix platforms to many databases. Best regards, Andrew Hill Director of Technology Evangelism http://www.openlinksw.com/virtuoso/whatis.htm OpenLink Virtuoso Internet Data Integration Server -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 10:35 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] PHP + ODBC on IIS (Win2k) PHP will not work on that way in order to retrieve data from Access using ODBC. Check the URL: http://www.phpbuilder.com/columns/timuckun20001207.php3 See you !!! Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+6469 - Remitido por Ignacio Estrada Fonseca/CEN/GDL/CFE con fecha 02/26/2002 09:34 - Andrew Hill ahill@openliPara: Sebastian Timocea [EMAIL PROTECTED], [EMAIL PROTECTED] nksw.comcc: Asunto: RE: [PHP] PHP + ODBC on IIS (Win2k) 02/26/2002 08:53 Sebastian, Check your System DSN - Options button, and verify that you don't have Exclusive checked off. Hope this helps. Best regards, Andrew Hill Director of Technology Evangelism http://www.openlinksw.com/virtuoso/whatis.htm OpenLink Virtuoso Internet Data Integration Server -Original Message- From: Sebastian Timocea [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 9:47 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP + ODBC on IIS (Win2k) Hello! I am having a really ugly problem here and I hope somebody can help me with this. I work on - Windows 2000 Advanced Server - PHP for Windows and IIS (it works ok) I have a DBTest.mdb database (Access 2000) and an ODBC connection to this database: System DSN=DBTest, no user and password to connect! I have tested this ODBC connection with a VBasic simple application and it works just fine. Now I create a Test.php file with this content: ?php odbc_connect(DBTest, , ); ? When I open this file in the browser http://localhost/directory/Test.php? I get the next error: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data., SQL state S1000 in SQLConnect in C:\inetpub\wwwroot\directory\Test.php on line 3 I have checked everything and the database is not opened by anybody. Plus, the Security rights are set to enable Everyone and Internet Guest Account (IUSR_myserver) to have Full Control ont the database. So, could anybody help me with this PLEASE?? :`-( Thank you in advance, Sebastian. -- 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] Help needed with Sessions
You can look at this articles too: http://www.phpbuilder.com/columns/mattias2312.php3 http://www.phpbuilder.com/columns/mattias2105.php3 William. El mar, 26-02-2002 a las 10:27, Johnson, Kirk escribió: Start here: http://www.php.net/manual/en/ref.session.php You will need to call session_start() to initiate the session. You will also need to register the variables you want in the session with session_register(). Good luck! Kirk _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php - assigning date variables
I think you can't achieve this with the example you've provided. Perhaps something like this will work: query = ; mysql_query(SELECT * FROM table . $query ); query = WHERE date = '2001-01-01'; // This should return all rows with 2001-01-01 as date. query = WHERE date '1995-01-01'; // All items newer than 1995-01-01. query = WHERE date '1995-01-01'; // All items older than 1995-01-01. query = WHERE date '1995-01-01' AND date '1998-01-01'; // All items between 1995-01-01 and 1998-01-01. Hope this helps /Joakim -Original Message- From: Craig Westerman [mailto:[EMAIL PROTECTED]] Sent: Monday, February 25, 2002 7:34 PM To: [EMAIL PROTECTED] Subject: [PHP] php - assigning date variables $query = mysql_query(SELECT * FROM table WHERE date LIKE '%. $query .%'); // returns all items in database $query = 2001-01-01 mysql_query(SELECT * FROM table WHERE date LIKE '%. $query .%'); // returns all rows that have 2001-01-01 as the date What is proper way to define a variable to include all dates newer than 1995-01-01? $query = ??? What is proper way to define a variable to include all dates older than 1995-01-01? $query = ??? What is proper way to define a variable to include all dates between 1995-01-01 and 1998-12-31? $query = ??? Everything I tried gives me a error. This has to be simple, but I must be overlooking something. Where would I find the answer? Thanks Craig [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Damned HTTP_HOST
Dominique, You have a space after HTTP_HOST. I think HTTP_HOST should be HTTP_HOST Regards Chris Dominique van der Wal wrote: Hi, I'm trying to find the HTTP_HOST adress of my website. I've try the followings : $HTTP_HOST : nothing $ALL_HTTP[HTTP_HOST ] : nothing $_SERVER[HTTP_HOST ] : nothing But when I print $ALL_HTTP or $_SERVER, I obtain the followings lines : HTTP_ACCEPT_CHARSET iso-8859-1,*,utf-8 HTTP_ACCEPT_LANGUAGE en,fr-BE HTTP_ACCEPT_ENCODING gzip HTTP_PRAGMA no-cache HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, HTTP_HOST 193.190.218.xxx So, how can I receive this damned HTTP_HOST adress ? Thank you in advance Dominique van der Wal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache is not parsing my php...sometimes...
Echoing/amplifying Torben's comment earlier: Private replies do not benefit others on the list (presumably with similar questions/learning need), nor do they end up in any archive. I did not feel the particular question added to the sum total of information so replied privately. I take the point though and will err on the side of adding noise to the list rather than the list missing any useful information. Thanks for the prompt, I take it constructively. Just as it was meant! I cannot believe that your/someone's helpful advice could even begin to 'compete' with some of the F-A-Qs and the I'm too lazy to think/RTFM cowboys, for the title of noise! Keep up the good work! =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CGI
bvr wrote: Still this wouldn't prevent a visitor from passing something like : ../../../../bin/cat /etc/passwd bvr. Erk good point - I should have mentioned that it's a very good idea to run basename() on user input as well as this will knock off any directory paths they may have attempted to add. Alternatively run a regular expression so ensure their input consists only of harmless characters (for example[a-zA-Z0-9] ) http://www.php.net/basename if (action==cgi) echo `./cgi-bin/cgiscripts/${scripts} 21`; If you still want to use that method have a look at these two functions which can be used to make user input safe for use on a command line: http://www.php.net/manual/en/function.escapeshellarg.php http://www.php.net/manual/en/function.escapeshellcmd.php Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is there an in qualifier in PHP?
I have a problem with some code (posted below), which I think I can solve using a method similar to that found in Python: if ($item in $potential_items) { // do one thing } else { // do another } Is there something like this available in PHP? Thank you, Erik If you wish to see more detail, I am trying to execute code that is very similar to the following: ?php // in this example, $selected_users is an array of strings that have been // selected from a multiple listbox in the previous instantiation of the // page. I am redisplaying the form because the user has made a mistake, // but trying to get those same strings to be selected='yes' in the new // form. $db = // mysql connection parameters $sql = SELECT id, name FROM users ORDER BY id ASC; $result = mysql_query($sql, $db); $c = 0; // this is a counter for the while loop while ($row = mysql_fetch_assoc($result)) { if ($row['id'] == $selected_users[$c]) { echo option value=\{$row['id']}\ selected=\yes\{$row['name']}/option; } else { echo option value=\{$row['id']}\{$row['name']}/option; } $c++; // bump up the counter for the next iteration of the fetched $row } ? Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] header problem
question, is this on a process page or on a page that renders text? Jim Lucas - Original Message - From: Michael P. Carel [EMAIL PROTECTED] To: george Pitcher [EMAIL PROTECTED] Cc: php [EMAIL PROTECTED] Sent: Monday, February 25, 2002 5:44 PM Subject: Re: [PHP] header problem Thank you George you are right, Im looking for a redirector once details have been checked in the form and written in the database, but how can i do it what whould be the second option? i 've searching for javascript redirector but i cant find one. Could you please help me im stuck here. Regards, Mike - Original Message - From: george Pitcher [EMAIL PROTECTED] To: Michael P. Carel [EMAIL PROTECTED] Sent: Friday, February 22, 2002 5:44 PM Subject: Re: [PHP] header problem Michael, You cannot have any 'displayed' text prior to using the header function. You'll need to do this another way. Are you looking for automatic submission after completing a form or redirection once details have been checked. The first one is only possible with client-side scripting such as javascript (and I'm not sure if it's possible there). The second option is easy. HTH George On Fri, 2002-02-22 at 09:28, Michael P. Carel wrote: Hi , I have a problem in using the Header() function. I want to automatically redirect the page into another php script after a form completion but im receiving this error Warning: Cannot add header information - headers already sent by .. Heres the script line: header(Location: 8D_Anaform_Admin.php?action=form); Please help im stuck here. Regards, Mike _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is there an in qualifier in PHP?
http://www.php.net/manual/en/function.in-array.php Kirk -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 9:34 AM To: PHP Subject: [PHP] is there an in qualifier in PHP? I have a problem with some code (posted below), which I think I can solve using a method similar to that found in Python: if ($item in $potential_items) { // do one thing } else { // do another } Is there something like this available in PHP? Thank you, Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] format text
try nl2br() it converts \n into br Jim - Original Message - From: eoghan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 2:23 AM Subject: [PHP] format text hello i am looking for a way of formatting my text when i select it from mysql, looking for a function like cold fusion paragraphformat() that will preserve line breaks etc when i select my data from the database. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php, win32, xml bug?
If you happen to be running PHP on Windows, you can use the MSXML engine through it's COM interface. Unfortunately, I haven't seen any documentation on plugging any of the other engines into the new (for PHP4.1) XSLT API. So, I don't know of a solution on UNIX (most of my XSLT work is in a Websphere on Win2K environment). Here's the basic COM code for Windows servers: $xml_com = new COM(MSXML.DOMDocument) or die(MSXML must be installed on server.); $xsl_com = new COM(MSXML.DOMDocument) or die(MSXML must be installed on server.); $xml_com - loadXML($xml_string); $xsl_com - loadXML($xsl_string); $output = $xml_com - transformNode($xsl_com); Alexander GräF [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... J Wynia [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The first thing I'd do is run your transformation through one of (or all of) the rest of the XSL engines out there. There's a lot more variability out there in XSL engines. Unfortunately, Sablotron isn't the most conformant of the field. I haven't used Sablotron in a while for XSLT processing so am not sure of your specific question. I left Sablotron behind for reasons like this one. It fails on a great many transformations that run through Xalan, Saxon and MSXML identically with no errors. My general rule is if it blows up all XSLT engines, it's probably my XSLT. If Sablotron's the only one that chokes, it's Sablotron. The new API for XSLT should allow for the other engines, however, I haven't seen anything on putting the rest of them into the equation, yet. i tested it on MSXSL, no problem, all runs fine. but how to choose another xsl-engine? thanks alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] changing the http status from file not found to....
I have a php site that I am working on and I am using a 404 page to display db contents. It works great in a web browser but it is still returning HTTP_STATUS_NOT_FOUND to a crawler when it crawls the site. Does anyone know if this can be changed from within the php to trick the crawler into thinking that it is an actual page?? Or maybe its an Apache setting to fiddle with you think?? Any help would be appreciated Thanks! Ben
Re: [PHP] Damned HTTP_HOST
there is always a way. $IP = $GLOBALS['SERVER_ADDR']; $IP = $GLOBLAS['HTTP_HOST']; $IP = $GLOBALS[HTTP_SERVER_VARS][HTTP_HOST]; do a print_r() on $HTTP_SERVER_VARS and see what you get or use this function ? function list_array ($array) { foreach($array AS $key = $value) { echo b$key:/b $valuebr\n; } } list_array ($GLOBALS[HTTP_SERVER_VARS]); ? Jim Lucas - Original Message - From: Dominique van der Wal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 6:38 AM Subject: [PHP] Damned HTTP_HOST Hi, I'm trying to find the HTTP_HOST adress of my website. I've try the followings : $HTTP_HOST : nothing $ALL_HTTP[HTTP_HOST ] : nothing $_SERVER[HTTP_HOST ] : nothing But when I print $ALL_HTTP or $_SERVER, I obtain the followings lines : HTTP_ACCEPT_CHARSET iso-8859-1,*,utf-8 HTTP_ACCEPT_LANGUAGE en,fr-BE HTTP_ACCEPT_ENCODING gzip HTTP_PRAGMA no-cache HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, HTTP_HOST 193.190.218.xxx So, how can I receive this damned HTTP_HOST adress ? Thank you in advance Dominique van der Wal -- 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] Damned HTTP_HOST
I should mention that if you HTTP_HOST resolves to a DNS entry, that is what gets displayed in the HTTP_HOST Jim - Original Message - From: Dominique van der Wal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 6:38 AM Subject: [PHP] Damned HTTP_HOST Hi, I'm trying to find the HTTP_HOST adress of my website. I've try the followings : $HTTP_HOST : nothing $ALL_HTTP[HTTP_HOST ] : nothing $_SERVER[HTTP_HOST ] : nothing But when I print $ALL_HTTP or $_SERVER, I obtain the followings lines : HTTP_ACCEPT_CHARSET iso-8859-1,*,utf-8 HTTP_ACCEPT_LANGUAGE en,fr-BE HTTP_ACCEPT_ENCODING gzip HTTP_PRAGMA no-cache HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, HTTP_HOST 193.190.218.xxx So, how can I receive this damned HTTP_HOST adress ? Thank you in advance Dominique van der Wal -- 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] dynamic pulldown list generation help
I got this to work, it list all file (type f) in the current directory, you can extend it further. $ls = split(\n, rtrim (`ls`)); print select name=\test\; while (list ($key, $value) = each ($ls)) { if (is_file ($value)) print option value=\$key\$value/option\n; } print /select; =S. On Tue, 26 Feb 2002, Andrew Slezak wrote: Basically I am setting ls array(). I want each item to be an option in the array. I have have scoured for some time now and this is what I have come up with, but it is not populating each file as an option? The select box is just empty. I know this is an array because I have tested with print_r. Stuck! Can someone tell me what I am doing wrong? ? $shell_scripts=`ls -1 /sm_scripts|grep -v backup|grep -v outmail|grep -v c_`; $shell_scripts=rtrim($shell_scripts); $arr1=split(\n, $shell_scripts); //print_r($arr1); echo p; echo select name=test; function generate_option_list($arr1, $set) { reset($arr1); while (list($key,$value) = each($arr1) ) { {$var.=option value='$key'$value/option;} } return $var; } echo /select; ? TIA, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Valid characters for filenames. List available?
Hi guys, I am wondering if there is anywhere a list of characters which are not allowed in a unix file name. I gues somethin like ' or \ is not allowed, but what else? cheers Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] changing the http status from file not found to....
I guess if anyone knows of a place, is there a source on the web that details the headers sent to the page for valid pages??? I checked php.net and nothing was there on the subject - Original Message - From: Ben Turner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 9:52 AM Subject: [PHP] changing the http status from file not found to I have a php site that I am working on and I am using a 404 page to display db contents. It works great in a web browser but it is still returning HTTP_STATUS_NOT_FOUND to a crawler when it crawls the site. Does anyone know if this can be changed from within the php to trick the crawler into thinking that it is an actual page?? Or maybe its an Apache setting to fiddle with you think?? Any help would be appreciated Thanks! Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How many files can be in one directory?
True, but by putting them in multiple directories if you ran out of room you could move one of those directories to a new disk/filesystem thereby making more room... On Tue, 26 Feb 2002, Andy wrote: So this means, that I can not increas the amount by splitting the files into more than 1 directory? In fact it would make it even less, because dirs also need those i-nods, right? Thanx Andy Thalis A. Kalfigopoulos [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 25 Feb 2002, Andy wrote: Hi there, I am building a web application which is storing pictures. Is there a limit of files in one directory on LINUX systems? Perhaps it might end in a problem after having 3 files in the same dir? Performance issues ore something else. The limit depends on how many inodes you have on the filesystem this dir resides on. This is a parameter when first mke3fs was ran to create the fs. Usually you'll have 1 i-node every 4096 bytes and you need 1 inode per file. So do your calculations depending on the size of your partition. cheers, thalis Has anybody got experiance on that? Thanx for any comment, Andy -- 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: Option for Serial or Comm port communication with PHP?
I don't about accessing a serial port directly from PHP, but you can control an X10 Firecracker on a Linix/BSD system by using the exec() command to run BottleRocket: http://mlug.missouri.edu/~tymm/ I threw together a script that would turn a lamp on and off from a web page without to much difficulty. As if that wasn't geeky enough, I pointed a webcam at it so that people could watch the light go on and off as they clicked the link. :) Having the light turn on and off without warning got old pretty quickly, so I took the script down... neat stuff, though! -Andy -Original Message- From: Ken Lancaster [mailto:[EMAIL PROTECTED]] I was hoping to work on a hairbrained idea that would allow me to use php to control an X10 or other serial device (security system, irrigation controller, etc,). I have read several hints at using the fopen function to do serial communications but these posts were a year old. Is it possbile to do serial communications using php. What are the options? Thanks in advance for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there an in qualifier in PHP?
if ($row['id'] in_array ($selected_users)) { // execute } =S. On Tue, 26 Feb 2002, Erik Price wrote: I have a problem with some code (posted below), which I think I can solve using a method similar to that found in Python: if ($item in $potential_items) { // do one thing } else { // do another } Is there something like this available in PHP? Thank you, Erik If you wish to see more detail, I am trying to execute code that is very similar to the following: ?php // in this example, $selected_users is an array of strings that have been // selected from a multiple listbox in the previous instantiation of the // page. I am redisplaying the form because the user has made a mistake, // but trying to get those same strings to be selected='yes' in the new // form. $db = // mysql connection parameters $sql = SELECT id, name FROM users ORDER BY id ASC; $result = mysql_query($sql, $db); $c = 0; // this is a counter for the while loop while ($row = mysql_fetch_assoc($result)) { if ($row['id'] == $selected_users[$c]) { echo option value=\{$row['id']}\ selected=\yes\{$row['name']}/option; } else { echo option value=\{$row['id']}\{$row['name']}/option; } $c++; // bump up the counter for the next iteration of the fetched $row } ? Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] magic_quotes_gpc
I don't know if anyone has answered your question yet, but you should be able to use the ini_alter command. http://www.php.net/manual/en/function.ini-alter.php Zara -Original Message- From: Tim Thorburn [mailto:[EMAIL PROTECTED]] Sent: Monday, February 25, 2002 12:40 PM To: [EMAIL PROTECTED] Subject: [PHP] magic_quotes_gpc Hi, Is it possible to activate magic_quotes_gpc on a server running PHP 3.0.16 without the php.ini settings being physically altered? I ask became my hosting company is hesitant to activate it for some unknown reason - however without it I cannot enter information into a database for a content management system I'm working on. Thanks -Tim -- 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] socket_create()
Anyone having an issue with socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) not working on a FreeBSD box? socket_create(AF_INET, SOCK_STREAM, SOL_TCP) work fine, just not udp.
[PHP] Curl: Reuse cookie vars
( Code at the bottom of the message) I logged in to a page, using the Curl-extension. I want to use the vars set in the cookie to continue being logged in and download another page. In regular Curl, I need to save the headers, containing the cookie information, to a file. In the next step I need to use that file to fake the cookies... In regular Curl I use this to dump the headers to a file: --dump-header c:\curl\headers.txt How would I do this using the Curl-extension? Any thoughts? // Tobias // Login $url = http://mydomain.com/login.php;; $postvars = user=joeuserpass=password; $user_agent = Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0); $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $postvars); curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); // Here I get the headers, but waht to do with them? curl_setopt ($ch, CURLOPT_HEADER, 1); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 0); // Somewhere here would be nice to save the cookies to a file curl_exec ($ch); curl_close ($ch); // Download next page $url = http://mydomain.com/otherpage.php;; $user_agent = Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0); $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt ($ch, CURLOPT_HEADER, 1); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // Read the headers in the saved file and use them to fake cookies $result = curl_exec ($ch); curl_close ($ch); echo $result; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP: PHP COM with Distiller
Hi All, Installed Apache, PHP, Office and Adobe Distiller on Win2000 Professional. By using $pdf = new COM(pdfdistiller.pdfdistiller.1); $pdf-FileToPdf($psfile, , ); I am able to convert PS to PDF. In the same fashion I want to convert DOC, XLS and PPT to PDF format. Is that possible, please explain in detail. Thanks in advance, Regards, Kumar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Valid characters for filenames. List available?
Andy wrote: Hi guys, I am wondering if there is anywhere a list of characters which are not allowed in a unix file name. I gues somethin like ' or \ is not allowed, but what else? cheers Andy My old Teach Yourself Unix book makes it: !@#$%^()[]'?\|;`+- space tab backspace though it says technically some could be used but might cause problems. Hope this helps. Regards Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is PHP4.0.3 on a commercial webserver Justifiable ?
My Webhost, www.easily.co.uk wou.ld appear to be running PHP 4.0.3 even although PHP 4.1.1 is out. (www.jsa3d.co.uk/test.php) as you can see. I will be writing to them about this as I belive it is a factor leading to why i need to recode when going from my local server (php4.1.1 apache) to there systems. If someone would like to try and justify such an old version running I would like to hear your suggestions. (personal servers is not included here :) ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] magic_quotes_gpc
Is your ISP running Apache? If so, they should allow you to create a .htaccess file. You can set all of PHP's ini parameters from there with the php_value/php_flag directives in PHP 4 or (in)directly using PHP 3. Like this: # PHP 4 php_flag magic_quotes_gpc on # PHP 3 php3_magic_quotes_gpc on Note, not only must you be allowed to use .htaccess files, but Apache needs to be configured with AllowOverride All. Pete Note, Tim Thorburn wrote: Hi, Is it possible to activate magic_quotes_gpc on a server running PHP 3.0.16 without the php.ini settings being physically altered? I ask became my hosting company is hesitant to activate it for some unknown reason - however without it I cannot enter information into a database for a content management system I'm working on. Thanks -Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is PHP4.0.3 on a commercial webserver Justifiable ?
You have made a jusification why they should stick with PHP 4.0.3, because they might have to re-code alot, and their clients might have to recode alot!. Also their admins may work on the principle that if it works why change. Andrew - Original Message - From: John Cuthbert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 6:44 PM Subject: [PHP] is PHP4.0.3 on a commercial webserver Justifiable ? My Webhost, www.easily.co.uk wou.ld appear to be running PHP 4.0.3 even although PHP 4.1.1 is out. (www.jsa3d.co.uk/test.php) as you can see. I will be writing to them about this as I belive it is a factor leading to why i need to recode when going from my local server (php4.1.1 apache) to there systems. If someone would like to try and justify such an old version running I would like to hear your suggestions. (personal servers is not included here :) ) -- 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] Converting arrays
I am using date(B); http://www.php.net/manual/en/function.date.php that break 24 hours into 1000 beats I will still have to use timezone but break them into beats. Gary Stewart G. wrote: Why dont you just use timezones? =S. On Mon, 25 Feb 2002, Gary wrote: Simon Willison wrote: Gary wrote: Hi All, I am not too bad at building arrays in php but I need to convert a javascript form into php. How wuld I conver the small snippit here? var d = new Array(), l = new Array(); l[0] = new Array(1, -360, 1, CHICAGO); l[1] = new Array(1, -420, 1, EDMONTON); l[2] = new Array(1, -540, 1, FAIRBANKS); TIA Gary ?php $l = array(); $d = array(); $l[] = array(1, -360, 1, CHICAGO); $l[] = array(1, -420, 1, EDMONTON); $l[] = array(1, -540, 1, FAIRBANKS); ? The code won't be much use without knowing how it will be used though. Thanks! in the end it is going to be a kind of time converter for internet time. Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cool PHP sites
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It strikes me that my students really don't have a good grasp of what PHP is capable of doing, since they are getting bogged down in learning the minutiae of the language itself. So (quickly if possible-- I'd like to demo some sites tonight) what are some examples of cool and publically accessible sites that use PHP? I'm looking for sites that demonstrate what PHP can do, examples of big name sites using PHP, etc. I can explain how the back end technology is working if I have some good sites to use as a framework. I'd like to keep them excited about the potential, you know? c -BEGIN PGP SIGNATURE- Version: 6.5.8ckt - KeyID: 0x51046CFD - http://www.chrislott.org/geek/pgp/ iQA/AwUBPHvc/daLYehRBGz9EQI9KwCgu7SKkrKqmcQ7zf+lAZBwKgvAlWcAmwQ7 xCs+oCAo6Hn5UkHuDmR4ZzlT =koDz -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Login to account
I am trying to create website similar to ones that credit card companies use to provide their clients with transaction history of their credit cards. What I have seen is that they uses template pages and call the results from a database. When going to the different template pages would the variables carryover from the login page to the subsequent pages or how would that work? Would MySQL be powerful enough to support something like this? Please give me your thoughts. Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How to get information about the php installation
phpinfo(); Andy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I saw on the website of my provider that he is displaying environment variables about his php installation. Not only the version with phpversion() but also about installed libraries etc.. Is there a function for that? Thanx Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is PHP4.0.3 on a commercial webserver Justifiable ?
Even... there are a lot of people still working with PHP 3 El mar, 26-02-2002 a las 13:44, John Cuthbert escribió: My Webhost, www.easily.co.uk wou.ld appear to be running PHP 4.0.3 even although PHP 4.1.1 is out. (www.jsa3d.co.uk/test.php) as you can see. I will be writing to them about this as I belive it is a factor leading to why i need to recode when going from my local server (php4.1.1 apache) to there systems. If someone would like to try and justify such an old version running I would like to hear your suggestions. (personal servers is not included here :) ) _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is PHP4.0.3 on a commercial webserver Justifiable ?
Yes, clients _do_ have to recode to get compatible with there systems. Ah well, I'll see what they say :) Andrew Brampton [EMAIL PROTECTED] wrote in message 008901c1bef8$4cf55d40$2528260a@STUDENT5830">news:008901c1bef8$4cf55d40$2528260a@STUDENT5830... You have made a jusification why they should stick with PHP 4.0.3, because they might have to re-code alot, and their clients might have to recode alot!. Also their admins may work on the principle that if it works why change. Andrew - Original Message - From: John Cuthbert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 26, 2002 6:44 PM Subject: [PHP] is PHP4.0.3 on a commercial webserver Justifiable ? My Webhost, www.easily.co.uk wou.ld appear to be running PHP 4.0.3 even although PHP 4.1.1 is out. (www.jsa3d.co.uk/test.php) as you can see. I will be writing to them about this as I belive it is a factor leading to why i need to recode when going from my local server (php4.1.1 apache) to there systems. If someone would like to try and justify such an old version running I would like to hear your suggestions. (personal servers is not included here :) ) -- 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] Valid characters for filenames. List available?
On Tuesday, February 26, 2002, at 01:34 PM, Chris Hewitt wrote: I am wondering if there is anywhere a list of characters which are not allowed in a unix file name. I gues somethin like ' or \ is not allowed, but what else? My old Teach Yourself Unix book makes it: !@#$%^()[]'?\|;`+- space tab backspace though it says technically some could be used but might cause problems. As a general rule, filenames should only ever be composed of the following characters: letters (A-Z and a-z) numbers (0-9) underscorese (_) hyphens (-) dots (.) Surely there will be some disagreement with this, but it's our policy where I work to make certain that filenames can only be composed of these characters. I even have the CMS I'm designing set so that nonconformant filenames are not allowed, with a message explaining why. The characters to be especially careful to avoid are: forward-slashes (/) backslashes (\) quotes (') doublequotes () colons (:) spaces ( ) The slashes are usually filesystem hierarchic delimiters on Windows and Unix, as is the colon on pre-OS 9 Mac filesystems. Quotes and doublequotes are usually used to escape command line strings, so they can cause confusion (note that this includes singlequotes used as apostrophes, like John'spicture.jpg). It's not that you can't use quotes, but it forces the person manipulating them to be very careful about how they refer to the filename. Likewise, spaces need to be escaped, so they're a bad idea. This is just my opinion, but I'm sure others will agree. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: is PHP4.0.3 on a commercial webserver Justifiable ?
John Cuthbert wrote: My Webhost, www.easily.co.uk wou.ld appear to be running PHP 4.0.3 even although PHP 4.1.1 is out. (www.jsa3d.co.uk/test.php) as you can see. I will be writing to them about this as I belive it is a factor leading to why i need to recode when going from my local server (php4.1.1 apache) to there systems. If someone would like to try and justify such an old version running I would like to hear your suggestions. (personal servers is not included here :) ) When most host upgrade the don't only upgrade PHP. They will up grade everything running on the server Apache, PHP, Perl, Python, SQL databases, and upgrading to SSH, ETC. That is a major undertaking when you have 20+ servers. Ask you host if they have any new servers and what version is running on them. Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] cool PHP sites
well my site isn't 'big name' but it's got a very cool catch to it... it's got an ftp indexer that I'm developing. You submit an ftp site, and it logs onto the ftp, grabs all of the filenames and sizes, pops everything into a mysql database, which is searchable from a web page (located on the same site, and also written in php) plus the source is available in .phps format (I haven't gotten any time to package it nicely into an what I would call an end-user-quality .tgz yet...) http://www.apokalyptik.com and http://www.apokalyptik.com/ftp/ respectively... the entire web site runs purely off of php... not that you are interested, but just in case... -Original Message- From: Chris Lott [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 11:08 AM To: [EMAIL PROTECTED] Subject: [PHP] cool PHP sites -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It strikes me that my students really don't have a good grasp of what PHP is capable of doing, since they are getting bogged down in learning the minutiae of the language itself. So (quickly if possible-- I'd like to demo some sites tonight) what are some examples of cool and publically accessible sites that use PHP? I'm looking for sites that demonstrate what PHP can do, examples of big name sites using PHP, etc. I can explain how the back end technology is working if I have some good sites to use as a framework. I'd like to keep them excited about the potential, you know? c -BEGIN PGP SIGNATURE- Version: 6.5.8ckt - KeyID: 0x51046CFD - http://www.chrislott.org/geek/pgp/ iQA/AwUBPHvc/daLYehRBGz9EQI9KwCgu7SKkrKqmcQ7zf+lAZBwKgvAlWcAmwQ7 xCs+oCAo6Hn5UkHuDmR4ZzlT =koDz -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP COM with Distiller
Don't have sample code handy, but you'd create a new Word, Excel or Powerpoint object (depending), and use the print methods of those objects to send it to Distiller. Kumar [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi All, Installed Apache, PHP, Office and Adobe Distiller on Win2000 Professional. By using $pdf = new COM(pdfdistiller.pdfdistiller.1); $pdf-FileToPdf($psfile, , ); I am able to convert PS to PDF. In the same fashion I want to convert DOC, XLS and PPT to PDF format. Is that possible, please explain in detail. Thanks in advance, Regards, Kumar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] another GD question
two in two days, i must look like a real retard. anyway, i'm having another problem with GD now, it seems that when i create my image, if i specify too many pixels i.e. imagecreate(600, 2290) it will not create the image, just a blank file it's sort of hard to explain, but i'll try. i am currently reading in a html file, which i want to display as an image. I read in my HTML and strip it of all HTML tags, this is stored as a varaible. i now explode this string using every occurence of a new line (\n), into an array, this gives me an array of lines. I now want to format the text a little bit, because I dont want my lines to be too long, so i word wrap it to 40 cols, followed by a rtrim, just to remove any chars that will appear in the image that i dont want. i then pass this array into my imageMake method. i create my image, using imagecreate, now, for my x value, i set it to be 500, and i set my y value to be 1963(i'll explain why in a minute). i then execute a for loop, which runs through each of the elements of the array(each line of text) and runs the GD ImageString function, this will take an incrementing value, making sure that each new line is below each other. when the for loop is completed, i call ImagePNG and then ImageDestroy. I suppose I should mention that I am creating a seperate image, and not displaying it imediattly. anyway, so long as I keep the Y value of the imagecreate function below 1963 the image will be created, but not all of the text is dispayed, since there seems to be more lines of text than area displayed.. if it is larger than that, all i get is a blank image, and if i try opening it in an image viewer i get an error. i have a feeling that it is someway related to the size of my text set, i.e. it is currently 216 lines long(after i perform the word wrap on it). also, if I run the exact same code on the same text formatted differntly (HTML removed, wordwrapped all done in pre-processing) it seems that I am able to increase the Y value in the imagecreate function, but, I still cannot raise it so far as to be able to include all of the text. this seems very strange, and I was wondering if anyone else has encountered this problem before. i'm not sure if i've made myself too clear here, if you have any questions, fire away. sorry for the long post Conor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is PHP4.0.3 on a commercial webserver Justifiable ?
Hi, Consider yourself lucky - my hosting company is still using 3.0.16. Even though at least once a month I complain about this bitterly (the client has already paid several years in advance so moving is not in the cards). They tell me that there are major security issues with PHP version 4 and that's why they have not upgraded yet. My question is, if this is the case - why are there a great number of ISP's and individuals using version 4 if there are so many security issues? I can understand the point that alot of the hosting companies online management systems were all written in PHP3 - but you'd think they would keep their stuff on a separate server from client pages. It just makes it difficult when there are new and improved features that either cannot be utilized at all - or at least not without pages and pages of work arounds. At 06:44 PM 2/26/2002 +, you wrote: My Webhost, www.easily.co.uk wou.ld appear to be running PHP 4.0.3 even although PHP 4.1.1 is out. (www.jsa3d.co.uk/test.php) as you can see. I will be writing to them about this as I belive it is a factor leading to why i need to recode when going from my local server (php4.1.1 apache) to there systems. If someone would like to try and justify such an old version running I would like to hear your suggestions. (personal servers is not included here :) ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is PHP4.0.3 on a commercial webserver Justifiable ?
Well, every version of every program have security issues, PHP 3 have security issues as well as PHP 4. Ask them for what specifics security problems are they talking about. William. El mar, 26-02-2002 a las 14:29, Tim Thorburn escribió: Hi, Consider yourself lucky - my hosting company is still using 3.0.16. Even though at least once a month I complain about this bitterly (the client has already paid several years in advance so moving is not in the cards). They tell me that there are major security issues with PHP version 4 and that's why they have not upgraded yet. My question is, if this is the case - why are there a great number of ISP's and individuals using version 4 if there are so many security issues? _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Login to account
Ben Clumeck wrote: I am trying to create website similar to ones that credit card companies use to provide their clients with transaction history of their credit cards. What I have seen is that they uses template pages and call the results from a database. When going to the different template pages would the variables carryover from the login page to the subsequent pages or how would that work? Would MySQL be powerful enough to support something like this? Please give me your thoughts. Ben It's more than capable, depending on your needs. Do you want to support hundreds or thousands of simultaneous users? MySQL might not be your best bet. Dozens-hundreds, yes. The MySQL question is unrelated to the 'variables' carryover - that has to do with the concept of sessions. php.net/sessions should have more info, although that mechanism isn't the only way of doing it. :) If you're looking to do something commercial, and need support, my company would be happy to discuss your requirements in more detail and advise/consult/develop as necessary (as I'm sure others on the list would too). If you're looking for a personal site, or learning, or a proof of concept, there are many good code examples and tutorials at places like zend.com and phpbuilder.com. (and weberdev.com if memory servers, right boaz?) :) Good luck. :) Michael Kimsal 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php on PWS win Me
Hi, Currently running Win Me with pws, want to run php purely for testing. Have just installed apace http://127.0.0.1 but need to turn off pws to make this work, I have downloaded the following binaries from php.net: PHP 4.1.1 zip package [4,953Kb] - 03 January 2002 and PHP 4.1.1 installer [909Kb] - 03 January 2002 Bit unsure what to do now, can someone walk me thru the next steps. Cheers S -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dedicated hosting
Hi PHPers, If anyone is interested in a dedicated Linux/Apache/MySQL/PHP server for a not-so-expensive price, please contact me. __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php