Re: [PHP] Pagination
> I am wanting to paginate records from a MySQL Database. > I want there to be 5 records on a page, on multiple pages. example for selecting page of records from mysql table: $sql=sprintf(" SELECT SQL_CALC_FOUND_ROWS * FROM table LIMIT %d, %d", $position*$records, $records ); after get count of all records: $sql='SELECT FOUND_ROWS()'; > (I would like there to be a "next" and "previous.") you can use http://pear.php.net/package/Pager -- Pavel Vrany http://ogi.cz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I destroy parameters by page
> IHow Can I destroy some variable that I pass by url, exmple: > http://webadmin/paginas/personalidades.php?ac2=delete&item=18# > then when i get the varibale ac2 and item, I want to delete the value of > this variable. unset($_GET['item']) ? http://www.php.net/manual/en/function.unset.php -- Pavel Vrany http://ogi.cz/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP with C++[Zend Engine?]
You wrote: > 4) Post questions here if you have problems but be sure you show that > you've done 1-3 or we'll ignore you. I read this book and some else,but nothing book helped me in writing Zend - Extension... I'd like to wrote some similar but simplier them Zend Encoder... If you can, help me please. PS.Sorry for my English. -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: PS Документация zsh - просто нечеловеческая. -- vyt in community@ [fortune]
Re: [PHP] PHP with C++
You wrote: > 4) Post questions here if you have problems but be sure you show that > you've done 1-3 or we'll ignore you. I read this book and some else,but nothing book helped me in writing Zend - Extension... I'd like to wrote some similar but simplier them Zend Encoder... If you can, help me please. PS.Sorry for my English. -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: PS Документация zsh - просто нечеловеческая. -- vyt in community@ [fortune]
Re: [PHP] HTML 5
В сообщении от Thursday 12 June 2008 16:43:59 Richard Heyes написал(а): > This may be of interest (HTML 5 diffences to HTML 4 overview): what about xHTML? html died few years ago and i thought is was official.. //sorry for my english -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: If there were a school for, say, sheet metal workers, that after three years left its graduates as unprepared for their careers as does law school, it would be closed down in a minute, and no doubt by lawyers. -- Michael Levin, "The Socratic Method [fortune]
Re: [PHP] phpinfo shows wrong value of post_max_size
В сообщении от Wednesday 18 June 2008 14:25:35 Yi Wang написал(а): > Hi, > > These day I'm working around large file uploading. php runs on the > windows server 2003. > > I changed the post_max_size value in the registry. Then phpinfo > reports the value changed from 8M to 200M (local value. Master value > stayed still 8M.). > > I think phpinfo should report that value as 8M, not 200M. So does ini_get. > > > -- > Regards, > Wang Yi restart your IIS server :) -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: В результате упорных тренировок гимнаст Петров стал в совершенстве владеть своим телом. И теперь другие тела ему до лампочки. [fortune]
Re: [PHP] Case sensitive password
В сообщении от Friday 20 June 2008 23:05:55 Andrew Ballard написал(а): > >> > if(preg_match('/^'.$_SESSION['userpass'].'$/i',$login)) { So, why you use "/i" ? :-) -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: The higher the "higher-ups" are who have come to see your demo, the lower your chances are of giving a successful one -- Fundamental Law of Thermodynamics n?4 [fortune]
Re: [PHP] Creating zip files
В сообщении от Wednesday 09 July 2008 01:22:32 Eric Butera написал(а): > [1] http://us2.php.net/manual/en/ref.zip.php Thank you for this link! -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: Родился сам - помоги другому. -- Неизвестный автор [fortune]
Re: [PHP] Re: PHP editor for linux
I use Zend Studio (shareware, but i couldn't find better things). There are some plugins for Eclipse,but if you used Zend before, you will be cunfused by that plugins... P.S. Sorry for my English... -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: В каждом толстом человеке сидит худой и требует, чтобы его выпустили. -- Сирил Коннолли [fortune]
[PHP] include methods of one class in another
Hello, firstly, sorry for my English... I have class: //--- class manageClassError{ private $errorsList=array(); private function addError($ex){ $errorsList[]=$ex; } public function isError(){ return (bool)(count($this->errorsList)); } public function getErrorsList(){ return $this->errorsList; } public function returnLastError(){ $cErrorsList=count($this->errorsList); If($cErrorsList==0){ return false; }else{ return $this->errorsList[$cErrorsList-1]; } } } //--- this class alone can't do anything practicality, but if "include" this class to another it can salve other class to copy code of first class... so i had many class,which contain all method of manageClassError and i need to mark managing error in other class...can you help me? P.S. I think, use "extends" isn't good for my idea... -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: I was at this restaurant. The sign said "Breakfast Anytime." So I ordered French Toast in the Rennaissance. -- Steven Wright [fortune] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include methods of one class in another
> use a decorator pattern or wait till hell freezes over and the core devs > actually allow the Traits functionality into php. I must read about patterns, thanks :) -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise. -- Larry Wall [fortune]
Re: [PHP] Which Exception to use ....
//sorry for my english Firstly, this list of exception show only registered in system exceptions, which (excluding one-two) are exceptions of some php mobules:mysqli,sqllite and so on... I use only Exception class and my extends on it (so and exceptions from your list are extends...). -- === С уважением, Манылов Павел aka [R-k] icq: 949-388-0 mailto:[EMAIL PROTECTED] === А ещё говорят так: Наш народ вот yже 80 лет качает права... скачать yдалось пока только процентов 10... [fortune]
[PHP] PHP/Apache - Problem with REMOTE_USER var.
Hello everyone, I have installed apache and PHP (using Windows :o(() on two computers, where httpd.conf and php.ini seem to be same. But, on one mashine is variable REMOTE_USER working well and on the second it is empty all the time, however apache auth.-function works well on both of them. (The computer, whitch is OK is using apache 1.32 and the bad comp. is using apache 2.0.X(?)... - if this information can help anyone to find the mistake)... Any idea, where is the problem? Thank you very much for any help!!! Pavel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Little help
I've just visited your web from Czech rep... Does your script work OK? :o)) Pavel "Mike Mannakee" <[EMAIL PROTECTED]> pí¹e v diskusním pøíspìvku news:[EMAIL PROTECTED] > Hi, I have a script that records the languange and time zone of every user > that comes to the site. Currently I am testing this and need some people to > just surf a couple pages in the site, from around the world. If you don't > mind, please just see a page or two on this site. It doesn't matter > anything else (you like it, do anything, etc) , I just need some browsers > from outside the US to surf a page or two. > > www.basementideas.com/index.php > > TIA > > Mike > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] condensing a list from MySQL
> How about just fixing this so it'll be easier in the future? You should > have a separate table where each "keyword" is in it's own row, with or > without duplicates (depends if you want a "count" of how often the > keyword is used), and an ID relating back to the "article" or whatever > you have. I think, that the problem with duplicates can be solved by using "distinct" parametr in SQL-query whitch count each keyword only once, however it is there ten times... Pavel > > The process of creating the table and creating the array are about the > same. The table will give you more flexibility, though, when the client > starts asking for more "stats". > > To use the array method, like you originally asked: > > $var = array(); > $query = "SELECT keyword FROM table"; > $rs = mysql_query($query); > while($row = mysql_fetch_assoc($rs)) > { > $ar = explode(' ',$row['keyword']); > array_merge($var,$ar); > } > $var = array_unique($var); > $final_array = sort($var); > > To INSERT everything into a second table: > > $query = "SELECT keyword FROM table"; > $rs = mysql_query($query); > while($row = mysql_fetch_assoc($rs)) > { > $keywords = explode(' ',$row['keyword']); > $insert_string = "'" . implode("','",$keywords) . "'"; > //assumes no ' characters in $keywords > $query = "INSERT INTO keywords_table VALUES ($insert_string)"; > $rs2 = mysql_query($query); > } > Make the keywords column UNIQUE if you don't want duplicates, although > it would probably be better to just leave duplicates in there and do a > SELECT DISTINCT to remove them. Leaving them in there will allow you to > produce more stats on which keywords are most popular, etc. > > ---John W. Holmes... > > Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Linux PHP editor
JJ Harrison\\ wrote: > I just switched over to Red Hat Linux from Win2k... > > Only to find my fav editor only works on windows systems... > > could someone suggest a good replacement? > > > -- > JJ Harrison > [EMAIL PROTECTED] > www.tececo.com > > > Try this: http://www.scintilla.org/ Scintilla is a free source code editing component. As well as features found in standard text editing components, Scintilla includes features especially useful when editing and debugging source code. These include support for syntax styling, error indicators, code completion and call tips. The selection margin can contain markers like those used in debuggers to indicate breakpoints and the current line. Styling choices are more open than with many editors, allowing the use of proportional fonts, bold and italics, multiple foreground and background colours and multiple fonts. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ps command in php
Michael P. Carel wrote: When I do this: I can also see the HTML code, i need to put the output inside the table. Is there any solution for this? Just remove first line of Your code or replace 'text/plain' with 'text/html'. And put inside -tags, as anwsered previously. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Object and properties
Cosmin wrote: Is there a way to find out all the properties from an object? ... > Try this: http://www.php.net/manual/en/function.get-object-vars.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error in creating BTML(BT Markup Language)
Bas wrote: > ... > echo "; > Seems that U don't have closing double-quote (") in line above. It should be: echo ""; -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Count lines or chars
Markus wrote: Hi PHP-gurus :-) I'd like to count the lines within a file and store the result within a variable. Every line begins with the char %. Would it be easier to count these chars and how could I do that? Thanks for your help. markus Maybe this way: $file = file( '/some/file.ext' ); $lines_count = count( $file ); -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] replace special chars
Victor Spång Arthursson wrote: Are there any good function to replace special characters, for example double qoutes, with something that are more html-safe? For example: The above is generated with PHP and fetched from a database (postgresql). I'ld like to have the double qoutes replaced with "something else" ;) There could be other strange characters as well that needs to be replaced, so some sort of universal function would be really nice to get tips on… ;) Sincerely Victor Try "htmlspecialchars()" and/or "htmlentities()". -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About php
webmaster wrote: We have a data base in access 2000. Could you advise which version of php will connect to the access. Please advise also how can i open the connection . Look into ODBC-functions: http://www.php.net/manual/en/function.odbc-connect.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reset auto_increment field
Christian Ista wrote: How reset a MySQL auto_incrment field ? ALTER TABLE table_name AUTO_INCREMENT = value -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Remove HTML TAGS
D. Jame wrote: HI, Is ther any way to remove HTML tags from Source File with PHP http://www.php.net/manual/en/function.strip-tags.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include/require not allowed in classes?
Ryan A wrote: ... > class ads_DB extends DB_Sql { var $Host = $MR_Host; var $Database = $MR_Database; var $User = $MR_User; var $Password = $MR_Password; } > I think, Your problem is here. If i remember correctly, then PHP4 doesn't allow to initialize "var"-s with non-constant values. Solutions: 1) Define those connection parameters as constants, i.e. define( 'MR_Host', "some.host" ) etc. And use those constants in "ads_DB"-class definition. 2) Create constructor for "ads_DB"-class and initialize "var"-s there. Hope that helps. :) -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include/require not allowed in classes?
Boyan Nedkov wrote: Initializing data members ("var"-s) of a class with non-constant values is completely legal operation in PHP, so I don't think this could be a reason for the problem. hmmm... PHP manual says something else... http://www.php.net/manual/en/language.oop.php "In PHP 4, only constant initializers for var variables are allowed. To initialize variables with non-constant values, you need an initialization function which is called automatically when an object is being constructed from the class. Such a function is called a constructor (see below)." -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP browser windows control.
Carles Xavier Munyoz Baldó wrote: ... May I do it using PHP ? No, PHP is "unfortunately" server-side. :) I believe thah I can do it using javascript ... may someone give me a web address where can I get any help about this iussue ? Maybe here: http://javascript.internet.com/ -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] setting a global var so that all pages can see var
PAUL FERRIE wrote: > ... add new data to the DB On the links have: View database U are outputting those links incorrectly, because resulting HTML contains "$tablename". Try output those links this way... View database ...or this way echo 'View database'; ?> -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a php built-in function to determine the number of dimensions of the array?
[EMAIL PROTECTED] wrote: Hello all mailing list, I am wondering if it exists a PHP built-in function to determine the numbers of dimensions of any type of array (indexed, and associative), thanks for any help, bye. http://www.php.net/manual/en/function.count.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Telling GD2 Where Fonts Are
[EMAIL PROTECTED] wrote: Tom, when I switch code to: putenv('GDFONTPATH=/Macintosh HD/Fonts/'); $font = Macintosh HD/Fonts./'arial.ttf'; ... Parse error: parse error, unexpected T_STRING in /Users/stephent/Sites/php_mysql_web_dev/chapter_19/make_button.php on line 16 Whattaya make of that? Because "Macintosh HD/Fonts" should be part of string, i.e.: $font = '/Macintosh HD/Fonts/arial.ttf'; This will eliminate "parse error", but does it solve Your actual problem, i don't know. Maybe You should set $font like Chris suggested (..."Macintosh HD" is actually / to the UNIX layer of the OS...): $font = '/Fonts/arial.ttf'; Hope that helps. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file uploads
Jon Bennett wrote: Just to clarify about using move_uploaded_file() ... function addProduct(){ // Move the uploaded file to the correct location move_uploaded_file($$_FILES["image"]["tmp_name"], BASE_DIR."/_img/_products/".$iProductId."_".$fileName); } ... function storeBigImage($ID, $aImage){ // create filenames fopen($aImage['name'], 'r'); $aNewImage['real_name'] = $aImage['name']; $aNewImage['new_name'] = $ID . '_' . 'big' . '_' . $aNewImage['real_name']; $aNewImage['image_loc'] = BASE_DIR . '_lib/_products/' . $aNewImage['new_name']; ... Just noticed one thing... maybe it's just a typo, but directory, where You save uploaded image isn't the same in those examples. In "move_uploaded_file()" it contains "_img/...", but in "storeBigImage()" there is "_lib/...". And therefore first case is working and second isn't. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Generate automatic list of dates
Tommi Virtanen wrote: Hi! $first_date = 2003-12-01 $end_date = 2004-01-15 while ( $first_date <= $end_date) { $sql = "INSERT INTO time_table (id, date, person_id) VALUES (35,$first_date,0)"; $result = mysql_query($sql, $conn); [next date] WHAT CODE TO HERE 1) Convert current $first_date into timestamp, 2) add 1 day (in seconds), 3) convert it back to SQL-format and use it in next cycle-step. } -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: question on which day is the first day of the week
>??? wrote: > > ... > How can readjust the date function to make each week start with Sunday, instead of Monday? > > > thank you http://www.php.net/manual/en/function.strftime.php Look at conversion specifiers like "%U" and "%W". -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: can tomcat server run PHP??
Sheawh wrote: Can i run PHP using Apache tomcat server?? From Google: http://www.mail-archive.com/[EMAIL PROTECTED]/msg108708.html -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Inserting function into mail()???
Tristan Pretty wrote: Ok, here's my code that I want to pick a random line from a text file, and then mail myself 10 times with a different line each time... But It simply won't work... Anyone know why? ... while (2 > $i) { ... Seems that this "while"-loop will execute only 2 times.. not 10. Maybe this is the reason. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: pgp form handler will not display data
Jack E. Wasserstein wrote: There must be something obvious that I am missing but I cant get the php form handler with the script below to display the vairables. The form which sends this data has the correct field names. I am also using the get action, so I can see the variables and values so I know that they are being passed correctly to the form. On submit, the form below displays as follows below. print " the referring doctor is $referringdr .\n"; ... Better try to use superglobals like $_GET, $_POST or $_REQUEST. Eg.: \n"; // etc... ?> -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Time Limit in save-mode
Hello, a have this problem. I am reading some data from another server via http-conection for which I have used fsock_open. But sometimes, it is possible, that reading is longer, than for example 5 seconds, and I want to stop this reading a return false... I found function set_time_limit, which is working only if server is not in safe-mode... But server, where is my script have to be in safe-mode... I have tried socket_set_timeout() too, but it seems, that it doesn't work (I've used a example from php.net)... Does anybody have any idea, how to solve this? I have PHP 4.1.0 (and because I am not the admin, I cannot change it...) Thank you! PJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: not sure why regex is doing this
Hi Craig, the mistake is in regex, because you replace only the pair of "," with ",NULL,"... So in case, that there are tree "," in row, there is only one pair and it means one replacing.. For example, when your string is like this: (12345) //two pair of ",," the result is (12345,NULL,,NULL,) But now - I don't know, how to change regex easily to help you... :o)) In case, that I have any idea, I will write you again :o) PJ PS: I hope, that I am right :o) "Craig" <[EMAIL PROTECTED]> píse v diskusním príspevku news:[EMAIL PROTECTED] > Hi, > > I have a text file that I have to parse and insert into a db. > these are a couple of sample lines (they are part of the > variable $query) > > (4536,'golf tournament management',430,0,0), > (1434,'Premium golf balls',,,0), > > I have to replace the blank entries (,,) with NULLs, > and I am using this regex: > $query = preg_replace('/,\s*,/',',NULL,', $query, -1); > > after this line, only ONE of the ,, sets is replaced > by ,NULL, like this: > (4536,'golf tournament management',430,0,0), > (1434,'Premium golf balls',NULL,,0), > > So, my problem is that I have to run the regex twice to > replace both sets of ,, with ,NULL, and I really don't > want to do that. Why isn't it getting them both with the > first regex, and how should I modify it to catch them > both? > > TIA, > Craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: not sure why regex is doing this
Hi again, I am not sure, that it is the clearest way, how to do it, but I've tried this: As you can see, I've added more ","s to your string to try, if it works good and it seems, that yes... PJ "Craig" <[EMAIL PROTECTED]> píse v diskusním príspevku news:[EMAIL PROTECTED] > Hi, > > I have a text file that I have to parse and insert into a db. > these are a couple of sample lines (they are part of the > variable $query) > > (4536,'golf tournament management',430,0,0), > (1434,'Premium golf balls',,,0), > > I have to replace the blank entries (,,) with NULLs, > and I am using this regex: > $query = preg_replace('/,\s*,/',',NULL,', $query, -1); > > after this line, only ONE of the ,, sets is replaced > by ,NULL, like this: > (4536,'golf tournament management',430,0,0), > (1434,'Premium golf balls',NULL,,0), > > So, my problem is that I have to run the regex twice to > replace both sets of ,, with ,NULL, and I really don't > want to do that. Why isn't it getting them both with the > first regex, and how should I modify it to catch them > both? > > TIA, > Craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Making coockies valid for multiple domains possible?
"Merlin" <[EMAIL PROTECTED]> píse v diskusním príspevku news:[EMAIL PROTECTED] > Hello everybody, > > I am working on translating my site into multiple languages (i18n). Each > different language is hosted on the same server, but on a different > subdomain. > > example: > de.server.com - german > en.server.com - english > > Here comes the problem. Sessions are validated through coockies on my > site. The system checks if the coockie is valid and compares it with a > sessionid inside the database. > > It seems to me that coockies are only valid for one domain for security > reasons. > > QUESTION: > Is there a way to make that coockie valid for multiple domains? Yes, it is... See: http://cz.php.net/manual/en/function.setcookie.php When you set parametr domain to ".server.com" - see carfully, there are two dots :) - the cookie will be available for all subdomains... PJ > > Thank you for any help on that. > > Regards, > > Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Making coockies valid for multiple domains possible?
> Someone correct me if I'm wrong, but if you set this in your php.ini or with > session_set_cookie_params() to server.com, it's valid across any sub > domains, whereas if you set it to de.server.com, it would only be valid in > the de.server.com sub domain. > > Or possibly try *server.com. I havn't played with this, since I only use > cookies when I manually set them, not for sessions. As written on http://cz.php.net/manual/en/function.setcookie.php "server.com" should be enought, bud it's recommended to use ".server.com"... PJ > > > Hope this helps, > > Jake -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looking for a PHP editor
"Markus H. Maussner" wrote: > > hi.. > > ..i am curious if theres anny linux (x, KDE, Gnome) php editor with syntax > highliting and this things... > bluefish is quite nice. http://bluefish.openoffice.nl/ -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Calling a Windows Com object or an Extended Fetch?
The DCOM (COM on a remote server) works fine but you still have to run PHP on a windows machine. AFAIK there's no decent way to use COM from a unix box. Pavel - Original Message - From: "Niel Zeeman" <[EMAIL PROTECTED]> To: "Paulson, Joseph V. "Jay"" <[EMAIL PROTECTED]>; "php gen list" <[EMAIL PROTECTED]> Sent: Wednesday, January 10, 2001 5:16 PM Subject: Re: [PHP] Calling a Windows Com object or an Extended Fetch? > Try this article > http://www.phpbuilder.com/columns/alain20001003.php3 > > it helped me allot, If you go deeper into the Com object you will find that > you can actually call an object from a > remote server -- have not tried it myself yet : ) > Niel Zeeman > > - Original Message - > From: Paulson, Joseph V. "Jay" <[EMAIL PROTECTED]> > To: 'bard' <[EMAIL PROTECTED]>; Miles Thompson > <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, January 10, 2001 5:42 PM > Subject: RE: [PHP] Calling a Windows Com object or an Extended Fetch? > > > > Well the next problem I have found is that php has to be running on a > > windows machine for the com objects to actually work and well we are > running > > it on a Unix box. So we can't use the com objects. Thanks for all the > help > > thought! > > Jay > > > > -Original Message- > > From: bard [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 09, 2001 5:37 PM > > To: Miles Thompson > > Cc: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED] > > Subject: Re: [PHP] Calling a Windows Com object or an Extended Fetch? > > > > > > Or you could just look at the phpbuilder.com column on using COM objects > in > > php, or you could RTFM at the php.net site. just type in php.net/com and > see > > what happens. > > > > We use php and com here a lot, and while the implementation lacks a few > > features of the asp/vb implementation it's handy when migrating from > NT/ASP > > to NT/PHP. > > > > > > On Tue, 9 Jan 2001, Miles Thompson wrote: > > > > > I don't know, but I was glancing through an article on PHP in the > current > > > issue of Dr. Dobb's Journal last week. At the very end I *think* there > was > > > > > an example of calling a COM object. It was a VbScript <-> PHP > comparision. > > > > > Have a look, might help. > > > > > > Miles > > > > > > (Yes, I've been known to make notes while in the newsstand.) > > > > > > At 10:01 AM 01/09/2001 -0600, Paulson, Joseph V. \"Jay\" wrote: > > > >Hello everyone-- > > > >I was wondering if PHP can call Windows COM objects in memory? If PHP > > can > > > >do this does anyone know how to do it or can you point me in the > > direction > > > >were I can pissibly figure it out. Also, does anyone know if PHP can > > call > > > >an Extended Fetch? > > > >Thanks, > > > >Jay Paulson > > > > > > > >-- > > > >PHP General Mailing List (http://www.php.net/) > > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >To contact the list administrators, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTTP autentification
http://www.php.net/manual/features.http-auth.php Pavel P.S. Manual je nekdy docela prima cteni. ;-) - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2001 12:42 PM Subject: [PHP] HTTP autentification > Please, can you send me where could I find more information about > HTTP autentification and PHP support. > > Thanks. > > Regards, PETER. > > - > Tento e-mail byl odeslán ze serveru www.worldmail.cz > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strange error
"Leon Mergen, BlazeNetwork" wrote: > > ... > > $string = eregi_replace(">:(","width=\"15\" height=\"15\"",$string); > > What is wrong with this? What can I do to fix it? > Use this pattern: ">:\(" Point is, you must escape "(" here, 'cause it's metacharacter in regexp. Hope this helps. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] is 1 a Variable...Discoverd it just now...
Dhaval Desai wrote: > > ... > > for($i=1; $i<=$recepients; $i++) > { > echo "" .""; Maybe this line should be: echo ""; -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] WML/WAP and PHP
Hi Rick, you are not doing anything wrong. You just have to send the proper content-type depending on what you're outputing. For example if you want to produce a gif image you have to use header("Content-type: image/gif"); There's nothing wrong with it as PHP can't predict what you want to do. text/html is set as default simply because it's the type most users in most cases need. Pavel - Original Message - From: "Rick Hodger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 16, 2001 2:10 PM Subject: [PHP] WML/WAP and PHP > Here's a fun little thing I discovered, possibly a bug in PHP itself? > > To output a WAP page you must output a content-type header else the phone's > browser won't recognise the page. Dead simple. Use: > > header("Content-type: text/vnd.wap.wml"); > > And all is well and good as long as you use echo/printf etc to output your > page. The second you deviate out of PHP and back to HTML the content-type > gets overwritten with a text/html, and so the page doesn't work. ASP used > to be able to cope with this, is it a bug or something I'm doing wrong? > > -- > Rick Hodger > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Reading specific data from a .txt file into PHP
check the manual for fgets() function. then you can maybe explode() the string using " " (space) as separator. Pavel - Original Message - From: "James Holloway" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 16, 2001 4:13 PM Subject: Re: [PHP] Reading specific data from a .txt file into PHP > > Glen Scott <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > James, > > > > The trouble is, that there are about 3000 cities in the text file. I'm > > >assuming that I fill use fopen(); and fread(); to open and read the > files, > > >but does anyone know of a way of singling out one line (say: > > > > > >CYGL 161346Z 34004KT 15SM -SN BKN011 BKN030 RMK SF6SC1 > > > > > >) from the whole text file? Like if a variable, $city = CYGL, is it > > >possible to then go to that one line in the text file and read all the > > >information from just one line? I'm pretty confident I could then split > the > > >information up into readable variable using the split(); function :) > > > > Assuming the first field (i.e. CYGL) is unique, just read each line and > > check using a regular expression whether it matches the city you > > require. If it matches, you can stop reading the file and do whatever you > > need to do with the line. > > That's just it, I don't know how to 'read' each line and stop And the > first field is unique Sorry to be such a dummy, I'm still very new to > PHP, and have never really used Perl either ;) > > By 'using a regular expression', do you mean that something as simple as an > "if" statement might do the job? > > Can you help any further? > > Thanks for getting me this far. > > James. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] WML/WAP and PHP
are you sure that there's nothing in the file in before you call the header() function? The situation you describe could happen if there was an empty line at the begining of the file and the warnings were turned off. When I tried your code it worked as expected: C:\>c:\php4\php test.php X-Powered-By: PHP/4.0.4 Content-type: text/vnd.wap.wml Hello world! C:\> Pavel - Original Message - From: "Rick Hodger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 16, 2001 5:02 PM Subject: Re: [PHP] WML/WAP and PHP > > "Pavel Kalian" <[EMAIL PROTECTED]> wrote in message > 028e01c07fc1$dffdecf0$8361d4c2@pavelk">news:028e01c07fc1$dffdecf0$8361d4c2@pavelk... > > Hi Rick, > > you are not doing anything wrong. You just have to send the proper > > content-type depending on what you're outputing. For example if you want > to > > produce a gif image you have to use header("Content-type: image/gif"); > > There's nothing wrong with it as PHP can't predict what you want to do. > > text/html is set as default simply because it's the type most users in > most > > cases need. > > Yes, I know that. But what I'm saying is that eg. > > header("Content-type: text/vnd.wap.wml"); > ?> > > > Hello world! > > > > ...gets put out with a text/html content type as opposed to the specified > text/vnd.wap.wml. Having said that, I just tried it on the linux machine and > it worked fine. A Windows thing? > > -- > Rick Hodger > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to handle multiple lines in PHP?
nl2br() will do the translation for you, just store the text in database in the form user writes it (allows later editing of the messages in the db without having to deal with 's) and then echo(nl2br($message)) it. Pavel - Original Message - From: "Ignacio Vazquez-Abrams" <[EMAIL PROTECTED]> To: "david klein" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, January 16, 2001 5:25 PM Subject: Re: [PHP] How to handle multiple lines in PHP? > On Tue, 16 Jan 2001, david klein wrote: > > > I have a textarea in one php page to allow user to leave message. How ever, > > if the user input(three lines): > > > > 123 > > 456 > > 567 > > > > after I get it through some php scripts, and put it into database, later on, > > I try to display it, but it becomes(only one line): > > > > 123 456 789 > > > > Does anyone know how to handle this? One idea is to convert the > CHAR> to "" before putting it into the database, but how can we detect > > the in PHP? Or is there any other ways? > > > > Thank you very much in advance. > > > > The newline char in PHP is '\n'. > > -- > Ignacio Vazquez-Abrams <[EMAIL PROTECTED]> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SESSIONS
David Tandberg-Johansen wrote: > > Hello! > > Could anyone give me an direction where I can find information something > like "session for dummies"! > It's not funny anymore. I don't have anymore hair left :-] http://www.zend.com/zend/tut/session.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Sorting an array
Nicklas af Ekenstam wrote: > > Hi! > > I have an array that looks kinda like this: > > NAMEADDRESS > John DoeSome Street 1 > Jane DoeAnother Street 2 > Bill Gates Helsinki 666 > > How do I sort this array based on NAME? ADDRESS? http://www.php.net/manual/en/function.usort.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Error connecting to MySQL server
Isn't it possible that you're just not allowed to connect to the MySQL host remotely? Pavel - Original Message - From: "Rosen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 19, 2001 10:55 AM Subject: Re: [PHP] Error connecting to MySQL server > When I connect via WEB based admin, there is no problems ! > The MySQL Server is remote. > But when I install on my computer software ( Artronoc Admin, DbTools ) > I receive error "Can't connect to MySQL server on host . (10060). > > Please Help ! > Thanks, > Rosen Marinov > > > > "Brian Clark" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > Hello Rosen, > > > > (R == "Rosen") [EMAIL PROTECTED] writes: > > > > R> When I try to connect to MySQL server I get message "Can't connect > > R> to MySQL server (10060 )! > > > > Where's your code? > > > > Are you using someone else's application? > > > > Is mysqld even running? Is it /still/ running after you get that error? > > > > Are you trying to connect locally (localhost), or are you trying to > > connect to another server running mysqld? > > > > This can be cause by any number of things. > > > > R> Please Help! > > R> Thanks > > R> Rosen Marinov > > > > > > -Brian > > -- > > An adequate bootstrap is a contradiction in terms. > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mysql auto increment question
David Banning wrote: > > I am working with php-mysql > and am inserting into mysql using a NULL value, > which allows mysql to auto-insert (increment) > a number - how could I find out what the value was > mysql inserted, say on the next line of code after the insert? http://www.php.net/manual/en/function.mysql-insert-id.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SQL Server DB to mySQL DB
1. Generate SQL script for your database in the MS SQL Server Enterprise Manager 2. Modify generated SQL to be compatible with MySQL 3. Run the script on your MySQL server Pretty easy if you aren't using any feature of MS SQL that MySQL doesn't support (for example stored procedures) Another way is to connect both the servers to Access using ODBC and just copy the tables - it's the easiest way to do that but resulting MySQL tables are quite screwed up. Pavel - Original Message - From: "Jason Bouwmeester" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 25, 2001 4:44 PM Subject: [PHP] SQL Server DB to mySQL DB > Is there an easy way to do this? I know that SQL Server can export a comma > delimited file, can mySQL import this? I imagine the PHP will be easy to > modify as long as the field names are the same. > > Thanks, > jb > > Jason Bouwmeester > New Media Consultant > InterVisual > > Suite 200, 709 - 11th Ave SW > Calgary, AB T2R 0E3 > Ph: 403.264.9199 > Fax: 403.264.9225 > www.intervisual.com > "Internet Solutions Developer" > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How do I see the data in list()?
Scott Fletcher wrote: > > ... > > What are the better way to see the data in the array? > Maybe var_dump(). http://www.php.net/manual/en/function.var-dump.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Outputting a 2 digit number < 10
Jamie wrote: > > ... > > "; > $day = (date ("d")); > $daysinmonth = (date("t")); > for ($i=00;$i<$daysinmonth;$i++){ > if ($i == $day) { >echo("$i\n"); > } else { > echo("$i\n"); >} > } > echo"" > ?> > > ... Maybe this for-cycle is doing what u want (if i didn't misunderstood your question). $i2\n"; } ?> Hope this helps. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] array headaches
a) $menu[] = array("name" => $db->f("name"), "url" => $db->f("topic_id")); b) echo $menu[0]["name"]; //for example - depends on what you want to do BTW have a look into the manual, the array stuff is described pretty well Pavel - Original Message - From: "Matt Williams" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "PHP_UK@egroups. com" <[EMAIL PROTECTED]> Sent: Wednesday, February 21, 2001 3:56 PM Subject: [PHP] array headaches > Hi > > could anybody please help me get my head around the following. > > I get some url information from the database (title, url) > I am trying to then put this into an array so I can pass it to the page to > display a menu. > so > a) how do I get the data into the array. would this be the way to do it?? > > $menu = array(); > while($db->next_record()) > { > $menu[]["name"] = $db->f("name"); > $menu[]["url"] = $db->f("topic_id"); > } > which leads me onto > b) how do I get the data back out. I can't test to see if the above works as > I can't get at the data > > TIA > > M@ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Accessing variables from a form
Don wrote: > > Hi, > > I'm in a quandary here. I have a form which contains sever tables each > containing similar fields. The number of tables are dynamic based on > vales I retrieve from a database. Each table has the following fields: > > ... > Maybe this approach is simpler. If you create your fields like this: '; echo ''; echo ''; ... ?> then after submitting you will have arrays: $name, $phone, $fax. Now, for values from first table use: $name[0], $phone[0], $fax[0]. For second: $name[1], $phone[1], $fax[1]. etc... And there's no need for huge amount of variables. Hope this helps. :) -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Making .phtml an extension
Brandon Orther wrote: > > Hello, > > I am trying to get .phtml to work for php files. How would I do this? If you have Apache, then following line in httpd.conf should help: AddType application/x-httpd-php .php .php3 .phtml -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] help change filename.
Jan Grafström wrote: > > Hi! > I am trying to change a filename this is my php: > change $filename = "yourfile.php3.xml"; > to $filename = "yourfile2.php3.xml"; > ?> > It doesn´t work do I need some more code to get it working, something > like fopen? > > Thanks for any help. > > Regards > > Jan http://www.php.net/manual/en/function.rename.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie: Can't find function error.
Darren Ward wrote: > > ... > > The file looks like: > > > > Any ideas on what i should be looking at or for? > Try phpinfo(). :) -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Session problem
set the session.save_path to a directory that exists on your system (for example: session.save_path = c:\temp) Pavel - Original Message - From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: Tuesday, March 13, 2001 10:56 PM Subject: [PHP] Session problem > Hello, > > Does anyone know how to fix this error? > > Warning: open(/tmp\sess_4fb4c5778fe97ab351baca1d8db90abf, O_RDWR) failed: m > (2) in c:/htdocs/br/br.php on line 2 > > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] xml parsing
Jon A wrote: > > ... > > print ""; > break; > > ... > print ""; > break; > > - this will let it parse, but it won't do anything with the html. > > can somebody help me?? > Try this: print ''; -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] bug or feature?
indrek siitan wrote: > > Hi, > >$value=0; > if ($value=="NULL") > echo "Value is NULL!"; > else > echo "Value is not null."; > ?> > > output: Value is NULL! > > is it a bug or expected behaviour? tested it on 4.0.4pl1. > i got around it by using strcasecmp(), but just wondering. :) > It's expected behaviour, i think. 'cause $value is integer, "NULL" is string and compare will convert "NULL" into integer. If condition is ($value==="NULL"), then output will be "Value is not null.". RTFM ;-) -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR
"Boget, Chris" wrote: > > Unless I'm missing something, I've looked all over the > PHP site for a link to PEAR but have been unable to find > one (including in the PEAR section of the manual, where > you would think it would be...). > Could someone please provide a link? > > Chris http://www.php.net/manual/en/pear.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How many color can html recongize in Word.
"Mark Lo (3)" wrote: > > Hi, > > I would like to know how many colors can html recongized in WORD such as > orange.. red.. blue.. > > eg. Blue > > where can I find out the sources of how many color can html recrongized in > word. and what wording should I use.. Maybe this link helps a little: http://developer.netscape.com/docs/manuals/htmlguid/colortab.htm -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PLEASE HELP!! STRANGE ERROR!! IS THERE ANY PHP DEVELOPER?
Daniel BI wrote: > > Did anybody have the same error? > > I have this simple script: > > === > session_start() ; > ?> > > ENCTYPE="multipart/form-data" ACTION="another_script.php"> > > -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] simple form validation
Jamie Saunders wrote: > > ... > > Right, you still with me? What I'd like to know is how to validate a text > field in an HTML form to make sure it only contains numbers. > > ... > Try this: Hope this helps. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Tough comparison problem.
"[EMAIL PROTECTED]" wrote: > > I've got two functions that return data in an array. I need to compare the > individual elements of one array against the elements of another, and do > something within an if-else statement. > > ... > If i didn't misunderstood Your question, then this double-loop should do the thing: 'aa','b'=>'bb'); $arr2=array('c'=>'cc','d'=>'cc'); for(reset($arr1);$i=key($arr1);next($arr1)){ for(reset($arr2);$j=key($arr2);next($arr2)){ /* * compare here $arr1[$i] with $arr2[$j] and do something */ ... } } ?> -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Passing Objects Vol II
In index2.php change the line $myInstance=urldecode ( unserialize($passedClass) ); to $myInstance=unserialize ( urldecode($passedClass) ); and you should be happy... I also assume you have register_globals turned on in php.ini. Pavel - Original Message - From: <[EMAIL PROTECTED]> To: "Php-General (E-mail)" <[EMAIL PROTECTED]> Sent: Friday, May 11, 2001 4:21 AM Subject: [PHP] Passing Objects Vol II > hmm well I tried it perhaps another step is in order. Once I can see it > work once I will be happy. > > // > // index.php contains: > // > > > include( "classes.inc" ); > $myInstance=new Main( $REMOTE_HOST , "nick" , "zzyzx" , true); > > echo $myInstance->client . "\n"; > echo $myInstance->user . "\n"; > echo $myInstance->password . "\n"; > echo $myInstance->allowed . "\n"; > > ?> > Test > > > // > // index2.php contains: > // > > > include("classes.inc"); > $myInstance=urldecode ( unserialize($passedClass) ); > > echo $myInstance->client . "\n"; > echo $myInstance->user . "\n"; > echo $myInstance->password . "\n"; > echo $myInstance->allowed . "\n"; > > ?> > > > // > // classes.inc contains: > // > class Main > { > > var $client; > var $user; > var $password; > var $allowed; > > function Main( $client="0.0.0.0" , $user= "" , $password="" , $allowed = > false) > { > $this->client= $client; > $this->user = $user; > $this->password = $password; > $this->allowed = $allowed; > } > > } > ?> > > > // > // THE MSG I GET > // > > Warning: unserialize() failed at offset 3 of 130 bytes > on line 6 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Refresh problems
Andrew Kirilenko wrote: > > Hello! > > Sorry for offtopic. > > I'm developing PHP page for the displaying some kind of statistic. > It displays graphics for the selected user. Pictures updates every 5 minutes > by external program. I've form with submit button. If I press this button > with different user selected, everything is OK. But if I press this button > for the same user selected, images doesn't update!!! > I've added and http-equiv="pragma" content="no-cache"> to the page - it doesn't help! > Let your php generates sources for images like this: '; ?> Now, for browser this image source is a little different every time and it must be requested from server, not from cache. At least Netscape does. Hope this helps. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Recompiling PHP with MySQL
Chris Lee wrote: > > Jason, > > Sorry for newbie question, how I compile MySQL from SRPM? > I know how to compile from source tar bar but not form SRPM. > > Simple step to show how would be nice. > rpm --rebuild .src.rpm And compiled binaries will be under /usr/src/RPM/RPMS/. (Talking about Mandrake). -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Converting MySQL Date (2001-05-21) to Friendly Date (21 May 2001)
Matthew Ralston wrote: > > I've got a date stored in a MySQL database in a "DATE" field, so it is > stored as "2001-05-21". How do I convert that into a more friendly date like > "21 May 2001" or even "21st May 2001" for display on a web page? > > I've tried > > print date("jS F Y", $dbtable[date]); > > but I always get "1st January 1970" because I don't know how to convert the > MySQL date into a PHP timestamp. > > Can someone tell me how to do it please? > Maybe it's not very nice, but it works: Hope this helps. -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Executing PHP stored in MySQL-database?
aquariuz wrote: > > Hi, > Is it possible to execute PHP stored in a MySQL-database? > If so, how to do it? > > In the example below I store "Hello world!" in a database, and next I > echo it. "Hello world!" is printed on the screen. > > But how to > * store PHP-code in a database > * and execute it? > > > ... Use eval(). http://www.php.net/manual/en/function.eval.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building a Chat Room
"ryan.barnett1" wrote: > > Hey All, > > Does anyone know where I can find a nice PHP chat room script? > > ... > Have you tried this site: http://freshmeat.net/search/?q=php+chat -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem "input in flex scanner failed"
Hi, Has anybody encountered the following error: "Fatal error: input in flex scanner failed in /***path***/info on line 1" The code that is most likely causing this is: I'm running 4.0.6 on a Redhat 6.2 I'm completely stumped, this looks like a completely innocent code. Any help or hits would be really appreciated!! Sincerely, Pavel Kharitonov Project Manager Intechnic Corporation http://www.intechnic.com Phone: (847) 816-1231 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Newbie question
The problem is here: $nfl_player_id = mysql_query("SELECT player_id FROM nfl_players WHERE first_name='$aqfl_player_first' AND last_name='$aqfl_player_last' AND position='$aqfl_player_position' AND nfl_team='$aqfl_player_nfl_team'"); mysql_query does not return the ID, but the handle of the connection. What you need to do is fetch the results that the query has generated. You can replace the above code with this one: //start $result = mysql_query("SELECT player_id FROM nfl_players WHERE first_name='$aqfl_player_first' AND last_name='$aqfl_player_last' AND position='$aqfl_player_position' AND nfl_team='$aqfl_player_nfl_team'"); $row_id=mysql_fetch_array($result); $nfl_player_id = $row_id[0]; //end This will get you the right ID and should allow to do the update, unless there are other pbs :) Sincerely, Pavel Kharitonov Project Manager Intechnic Corporation http://www.intechnic.com Phone: (847) 816-1231 -Original Message- From: Bob Eldred [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 1:54 PM To: [EMAIL PROTECTED] Subject: [PHP] Newbie question Hi there, I'm really really new to both PHP and MySQL, so this is probably going to turn out to be an easy fix. The basis is this: I have a MySQL database with two tables in it. I'm trying to update 1 of the fields (aqfl_team) in the first table (nfl_players) with a value from a field (aqfl_team) from the second table (temp_aqfl_rosters). The PHP document looks like this: The end result is that I get a screenful of data (every player, NFL team, and AQFL team is correct) stating that the various players are updated, but but the field update in nfl_players is not actually done. I'm sure it's a syntax issue, but I don't know what's the actual problem. Any help? Thanks, Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Form Problem
I had the same problem happen to me a couple of days ago. A form that has been working has stopped working all of a sudden - all fields would be submitting as blank (undefined). Unfortunately, I was not able figure out what the problem was :-( I got it down to the line that was causing my form to stop submitting - a tag. I still do not understand why. I ended up deleting the entire directory, re-uploading the files and they started working all of a sudden. I know it's not much help, just my 2 cents. Sincerely, Pavel Kharitonov Project Manager Intechnic Corporation http://www.intechnic.com Phone: (847) 816-1231 -Original Message- From: Chris Kwasneski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 1:30 PM To: [EMAIL PROTECTED] Subject: [PHP] Form Problem I'm having a problem with a HTML form. When it gets submitted, I keep getting an undefined variable error message. And a blank page (aside from a 'Hi' written on it...). I don't think its a problem with my install of PHP as other PHP code is running fine, but can't get it to print out this name. I'm probably missing something simple, but I just can't figure it out. Any help would be appreciated. the form: My Form My name is: Test2.php file: Form test... Hi The url that is getting passed to the file: http://localhost/test2.php?YourName=Chris&submit=Submit The error message I'm getting: [Wed Jan 09 14:24:47 2002] [error] [client 127.0.0.1] PHP Warning: Undefined variable: YourName in c:\program files\apache group\apache\htdocs\test2.php on line 10 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: Print ONCE ONLY?????
I think this is actually the problem The first time you do $row = mysql_fetch_array($result); it reads the first row. Then you don't do anything with that data, but move on to the next one right away in the while: while ($row = mysql_fetch_array($result)) and only then you print out the data. So you are always skipping the first record. Sincerely, Pavel Kharitonov Project Manager Intechnic Corporation http://www.intechnic.com Phone: (847) 816-1231 -Original Message- From: Michael Kimsal [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 12, 2002 5:14 PM To: Dani Cc: PHP LIST Subject: [PHP] Re: Print ONCE ONLY? Dani wrote: > Hi Again! > > Why does this print only one record? > > 1. I have checked on the table on MYSQL and I have 2 records with this > data. > 2. Can I actually use the word "and" twice or three times for filtering > the data that I need during query?? (example: $query = "select * from > main_table where item_type = 'hotel' and class = 'melati' and price = > '200' and facilities = 'swimming pool' " > #2 - yes. that's what SQL is all about... #1 - Why do the $row=, then also do it in a while loop? Why not just do it in a while loop? I'm not sure that'd necessarily help in this case (most likely won't) but it would certainly be less typing in the future. Are you postive 2 rows match the 'hotel' and 'melati'? > Could some body help please??? > > here is my code > > ... > $query = "select * from main_table where item_type = 'hotel' and class = > 'melati'"; > $result = mysql_query($query); > $row = mysql_fetch_array($result); > echo "$row[item_id]",""; > while ($row = mysql_fetch_array($result)) > { > echo "WHILE RESULT","$row[item_type]","","$row[class]"; > } > Michael Kimsal PHP Training Courses http://www.tapinternet.com/php/ 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Array !!!
Help!! How to move an array's internal pointer to the required element not the first one or last one??? Thanks!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] include, include_once bug or feature ?
Hello! I have a trouble :( When I try this: --[index.php]-- -- --[M/one.php]-- \n"; print_r(get_defined_vars()); print "\n"; ?> -- At output i'll gets nothing :( No any global variables. But, at index.php I get it all. If I move include() to global scope, all ok. It's feature, or bug ? -- Pavel Plesov Simpage support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include, include_once bug or feature ?
: I think that since you are including a file into a function - the vars : become local so they only exist when the function is running. Therefore, : a call to get_defined_vars will not show them since the vars do not : exist in the global scope. In fact, during the call to get_defined_vars, : the included vars do not exist at all. : : This is a feature, not a bug. Thanks. Now, I understood :) -- Pavel Plesov Simpage support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] graphing packages
Christian Calloway wrote: > hey ppl, > > I need to create some fairly complex graphs dynamically, and I need to be > able to specify line, bar, or pie charts. Are there any PHP packages that > someone could point me to that would fill my needs. Thanks > > > Maybe this helps a little: http://freshmeat.net/projects/phpgraphs/ -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] preg_match_all...grrrr!!!
"PHPGalaxy.com" wrote: > > ... > > A link from one such entry looks like this: > >psPhoneEntry.py?firstname=Adam&lastname=Collier&street=3912+Foley+Glen+Cir&city=Fenton&state=MI&zip=48430-3435&phone=8107507456 > > My matching pattern looks like this: > $engreg = > >'/psPhoneEntry.py?firstname=(.*?)&lastname=(.*?)&street=(.*?)&city=(.*?)&state=(.*?)&zip=(.*?)&phone=(.*?)\">/i'; > Try this pattern: $engreg = '/psPhoneEntry\.py\?firstname=(.*)&lastname=(.*)&street=(.*)&city=(.*)&state=(.*)&zip=(.*)&phone=(.*)/i'; -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Matching strings in a flat/text file?
Nick Richardson wrote: > > ... > > Example: I want to pass a string using the URL (blah.php?car=civic_si) then > search for ##civic_si in the text file, and print everything until it finds > ##end. So the text file will look like this: > > ##civic_si > This is my content, blah blah > ##end > > ##nissan > This is more content... yadda yadda > ##end > > ... > Try this little code snippet: "; ?> Hope this helps. :) -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] editor for working with php
Ray Todd Stevens wrote: > I ahve been using go-live (4.0) to edit pages containing php scripts. > this is not really working well. Is there a better way or a better editor > to use for this? Try SciTE: http://www.scintilla.org/ -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] %20
Oosten, Sjoerd van wrote: > Hello > > I just discovered a netscape 4.7 bug when sending a string. The variable > cannot contain a space. So a string like this does not work in netscape 4.7 > > objectdetail.php?Bouw=variable&Object_type=normal&Street_type=normal > street&. > > The variable Street_type doesn't get through netscape 4.7, but IE and > Netscape 6 do let the variable through. > > > Is there a way to automatically let a spacer fill with %20 so it works at > all browsers and i don't have to reprogram my system? > You need this: http://www.php.net/manual/en/function.rawurlencode.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] problem with xgettext and php with javascript file
Hello all! I want to use gettext for multilanguage webs, so I'm pleasing you to help me. When I use this: xgettext --keyword=_ file.php on this file: --- <!-- function zmen_cenu() { window.opener.document.celkem.cena_celkem.value = "<? echo _("nìjaký blábol"); ?> } // --> --- I get this message: file.php: 4: warning: unterminated string literal but when I use the same on this file: --- <!-- function zmen_cenu() { window.opener.document.celkem.cena_celkem.value = "<?= $str?>"; } // --> --- gettext makes this good. Do you know where is a problem? My gettext version is 0.10.35 Thanks, Pavel Novák -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: problem with xgettext and php with javascript file
now it is the same problem without javascript: FIRST file includes only this row: " class="tlacitko"> SECOND file includes this: When I use: xgettext --keyword=_ file.php on FIRST file I don't get any error message, but it doesn't create the file 'messages.po' but on SECOND file it creates the file 'messages.po' correctly... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: problem with xgettext and php with javascript file
so I know where is the problem: "> gettext is seeking through all of strings in the file, it thinks that one string is: "" And it doesn't work even with this: value="" or this: value='' Does anybody know how I can do it to be good? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Excel and PHP in Unix
Iván Toda Caraballo wrote: > Hello, > > I am using the Unix version of PHP, and i would write some information from > the HTML in a Excel file. I was made this using COM functions in a Windows > version of PHP and it works. But COM functions are only available on the > Windows version of PHP. > > I want to know how I can write a Excel file but using a Unix version of > PHP. > > Thanks! > Maybe this helps a little: http://sourceforge.net/projects/psxlsgen/ -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Dynamic PHP
Chris Hemmings wrote: > Hello! > > I'm sure I read this somewhere but I'm just not so sure now. Can you > produce PHP code in a PHP page and then run it. Kind of like this: > > $mycode="echo'Hello';"; > > # Something here to execute $mycode > ?> > Maybe U need this function: http://www.php.net/manual/en/function.eval.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Partial answer to "FOLLOW UP on "column names not liked by odbc/php/access"
mweb wrote: > OOPS... > of couse the query below doesn't work, it doesn't have the table name > (see below however) > >>ISQL_exec_String = "Insert Into (Artista, Opera, Label, Anno, Nazione, >>CDNow, Autore, AutoreNome, Genere, GenereCustom, SulWeb, Autorizzato, >>Unico, VALUES ('prova2', 'inedita', 'ignota', >>'2001','IT', 'nonesiste', 'io', 'lui','3', 'ulteriori dettagli sul genere >>musicale', 'http://www.no.it', '1', '20011205111456', 'asdas erfver', 'ciao >>ni', '2.5', 'Non andare a capo!');" >> >> Maybe it's just typo (like missing table name), but U have in statement " ... Unico, VALUES ( ... ". It should be " ... Unico) VALUES ( ... ". -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parsing syntax to add a HTML line break
[EMAIL PROTECTED] wrote: > I have a form to be used for data submission and to be added to MySQL. How do I >parse the syntax so that it automatically inserts a HTML line break whenever a >carriage return is present?? > > Thanks. > > Another PHP newbie, > Steph > > One possibility is to use 'nl2br()': http://www.php.net/manual/en/function.nl2br.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] About php
You can only reference such elements using it's indexes in javascript. try formName.elements[3].value //(replace 3 with the index of your ) Pavel > > "vishak tomy" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > I have a doubt about multi select from drop down, if i set it as > then how could I check it for javascript > validation. for this select, If any alternative for this please inform > me. > > Vishak > > > Get free email and a permanent address at http://www.netaddress.com/?N=1 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session handling
- Original Message - From: "[Inf] F!RE-WALL" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 28, 2001 12:10 PM Subject: [PHP] session handling > Every time I want to initiate a session i get this: > > Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR) failed: m > (2) in e:\webserver\phptest\page1.php on line 2 > > Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR) failed: m > (2) in Unknown on line 0 > > Warning: Failed to write session data (files). Please verify that the > current setting of session.save_path is correct (/tmp) in Unknown on line 0 > > I run an Apache webserver under Windows and I have the latest version of > PHP. I looked up the "session.save_path" in the php.ini file and it sais: > > [Session] > session.save_handler = files ; handler used to store/retrieve data > session.save_path = /tmp; argument passed to save_handler > ; in the case of files, this is the > ; path where data files are stored > session.use_cookies = 1 ; whether to use cookies > session.name = PHPSESSID > ; name of the session > ; is used as cookie name > session.auto_start= 0 ; initialize session on request startup > session.cookie_lifetime = 1814400 ; lifetime in seconds of cookie > ; or if 0, until browser is restarted > session.cookie_path = / ; the path the cookie is valid for > session.cookie_domain = ; the domain the cookie is valid for > session.serialize_handler = php ; handler used to serialize data > ; php is the standard serializer of PHP > session.gc_probability= 1 ; percentual probability that the > ; 'garbage collection' process is > started > ; on every session initialization > session.gc_maxlifetime= 1440; after this number of seconds, stored > ; data will be seen as 'garbage' and > ; cleaned up by the gc process > session.referer_check = ; check HTTP Referer to invalidate > ; externally stored URLs containing ids > session.entropy_length= 0 ; how many bytes to read from the file > session.entropy_file = ; specified here to create the session > id > ; session.entropy_length= 16 > ; session.entropy_file = /dev/urandom > session.cache_limiter = nocache ; set to {nocache,private,public} to > ; determine HTTP caching aspects > session.cache_expire = 180 ; document expires after n minutes > session.use_trans_sid = 1 ; use transient sid support if enabled > ; by compiling with --enable-trans-sid > url_rewriter.tags = > "a=href,area=href,frame=src,input=src,form=fakeentry" > > What's wrong with /tmp ? Where's that map located? Do I need to change the > entry? Should I create the dir? If so, where? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session handling
Sorry, hit the submit button too soon :-) The session.save_path must exist on your system. Try session.save_path = C:\winnt\temp (if you're on NT/2000) or C:\windows\temp instead of /tmp Pavel - Original Message - From: "Pavel Kalian" <[EMAIL PROTECTED]> To: "[Inf] F!RE-WALL" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, March 28, 2001 12:17 PM Subject: Re: [PHP] session handling > > - Original Message - > From: "[Inf] F!RE-WALL" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, March 28, 2001 12:10 PM > Subject: [PHP] session handling > > > > Every time I want to initiate a session i get this: > > > > Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR) failed: > m > > (2) in e:\webserver\phptest\page1.php on line 2 > > > > Warning: open(/tmp\sess_b18426d4011c38e033bd0ed54bd2d2f1, O_RDWR) failed: > m > > (2) in Unknown on line 0 > > > > Warning: Failed to write session data (files). Please verify that the > > current setting of session.save_path is correct (/tmp) in Unknown on line > 0 > > > > I run an Apache webserver under Windows and I have the latest version of > > PHP. I looked up the "session.save_path" in the php.ini file and it sais: > > > > [Session] > > session.save_handler = files ; handler used to store/retrieve data > > session.save_path = /tmp; argument passed to save_handler > > ; in the case of files, this is the > > ; path where data files are stored > > session.use_cookies = 1 ; whether to use cookies > > session.name = PHPSESSID > > ; name of the session > > ; is used as cookie name > > session.auto_start= 0 ; initialize session on request > startup > > session.cookie_lifetime = 1814400 ; lifetime in seconds of cookie > > ; or if 0, until browser is restarted > > session.cookie_path = / ; the path the cookie is valid for > > session.cookie_domain = ; the domain the cookie is valid for > > session.serialize_handler = php ; handler used to serialize data > > ; php is the standard serializer of > PHP > > session.gc_probability= 1 ; percentual probability that the > > ; 'garbage collection' process is > > started > > ; on every session initialization > > session.gc_maxlifetime= 1440; after this number of seconds, stored > > ; data will be seen as 'garbage' and > > ; cleaned up by the gc process > > session.referer_check = ; check HTTP Referer to invalidate > > ; externally stored URLs containing > ids > > session.entropy_length= 0 ; how many bytes to read from the file > > session.entropy_file = ; specified here to create the session > > id > > ; session.entropy_length= 16 > > ; session.entropy_file = /dev/urandom > > session.cache_limiter = nocache ; set to {nocache,private,public} to > > ; determine HTTP caching aspects > > session.cache_expire = 180 ; document expires after n minutes > > session.use_trans_sid = 1 ; use transient sid support if enabled > > ; by compiling with --enable-trans-sid > > url_rewriter.tags = > > "a=href,area=href,frame=src,input=src,form=fakeentry" > > > > What's wrong with /tmp ? Where's that map located? Do I need to change the > > entry? Should I create the dir? If so, where? > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How may :)
Nilesh Parmar wrote: > > Hi >Does anyone know how many keywords does PHP have.And where can I find > them ? > You can find them here: http://www.php.net/manual/en/reserved.php -- Pavel a.k.a. Papi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Compile .php file is possible ?
Zend Compiler got renamed to Zend Encoder. Pavel - Original Message - From: "Marian Vasile" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 30, 2001 11:19 AM Subject: Re: [PHP] Compile .php file is possible ? > I've seen many people talking about Zend compiler... > Where is that Zend compiler ? > > "Marian Vasile" <[EMAIL PROTECTED]> wrote in message > 9a1cr4$5fr$[EMAIL PROTECTED]">news:9a1cr4$5fr$[EMAIL PROTECTED]... > > I need a method to compile my php files to give them to a customer. > > > > The main problem is that this customer have an account on a shared hosting > > service and (I think) he can't install a compiler or something new on that > > server. > > > > Is it possible to encrypt my files ? > > > > Plz HELP ASAP > > > > Yours, > > Marian > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]