[PHP] Next Book
Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox. Other good books I should think about? Recommendations? Reviews? I know the PHP FAQ has pointers to books, but I am looking for recommendations on what I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :) Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly is pretty dated. c -- 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] Next Book
I started off with a Core PHP4 book and quickly outgrew it. I find that most of the books don't get much past the basics either, so I find myself sticking to www.php.net and it's wonderful searchable documentation. I have read Web Application Development with PHP4.0 (http://www.phpwizard.net), which I enjoyed. While it does go into some more advanced PHP syntax, it mostly discusses application development concepts -- stuff that would be boring for any experienced programmer of other languages. I think it's geared at the people who picked PHP up as their first language (me included). I'd be interested in some good PHP books as well, I feel like I'm in a rut. At first, PHP was all new, and I was learning s much... but now if I think up a task I can visualize how to do it in PHP pretty easily. I know I have a LOT to learn, but I think my problem is I don't know proper programming techniques... Has anyone tried to expand into other languages? I like perl due to its heavy similarity to PHP, but I like to focus on web stuff. rick - Original Message - From: Chris Lott [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Saturday, July 07, 2001 11:23 PM Subject: [PHP] Next Book Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox. Other good books I should think about? Recommendations? Reviews? I know the PHP FAQ has pointers to books, but I am looking for recommendations on what I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :) Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly is pretty dated. c -- 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] ok!
A quick plug for Mysql-front at http://www.mysqlfront.de/ that Hennik meantions here... If you use Win98/ME/2k/NT, and are looking for a utility to admin a MySQL database, this is hands-down the best front end I've ever used... -Original Message- From: Henrik Hansen [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 5:42 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] ok! Johan Vikerskog (ECS) [EMAIL PROTECTED] wrote: Simple question and i know that i shouldent post it here. Hope you bare with me. I have a mysql database that is called supportdb How do i create an account for my user so he can connect to this database? http://www.mysql.com/doc/P/r/Privilege_system.html Do i use mysqlacccess? i only know of mysqlfront.de -- Henrik Hansen -- 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] open_basedir
mornin, i´m new to the list and to php, so please don´t jump to hard on me, when you think the question is dump. okay: is there a possibility to make a server only execute the php scripts in the document root it was called from? I saw something about open_basedir, but am not sure if that is the way. I badly need to protect the server from i.e. includes, that read out or manipulated server config files, like passwd. I have systems run under redhat, if that matters. could anyone please just let me know how and where? I´ll definatelly need the correct syntax, since thats my main-problem with php. thanks a lot - ulrich
Re: [PHP] Next Book
Rick wrote: [...] I'd be interested in some good PHP books as well, I feel like I'm in a rut. At first, PHP was all new, and I was learning s much... but now if I think up a task I can visualize how to do it in PHP pretty easily. I know I have a LOT to learn, but I think my problem is I don't know proper programming techniques... I would recommend the PHP Developer's Dictionary - it is high-quality, practical and covers a lot of ground - from basic PHP to advanced PHP to building your own PHP extension. Disclosure: I reviewed the manuscript for the author (as a favor :) [...] --zak -- 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] Next Book
On Sat, Jul 07, 2001 at 10:23:58PM -0800, Chris Lott wrote: Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly is pretty dated. Please read MySQL from Paul DuBois. Some Reviewers are on the last day on the LinuxDays in Stuttgart, Germany. -Egon -- LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/ All known books about PHP and related books: http://php.net/books.php Concert Band of the University of Hohenheim: http://www.concert-band.de/ First and second bestselling book in German: http://www.php-buch.de/ -- 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] multiple outputs to mysql_query()
i want my mysql query result to output 2 mysql output rows for every tr set. I'm used to just doing a do/while statement for a single mysql output per row. example: //the code i have essentially does this - ?php echo 'table'; $result = mysql_query(SELECT * from table WHERE type='default'); do { echo 'trtd ' . $myresult[column] . '/td/tr'; } while ($myresult == mysql_fetch_array($result)); echo '/table'; ? //outputs: table tr tddata for row 1/td /tr tr tddata for row 2/td /tr ...etc... /table --- i want it to output like this: table tr tddata for row 1/td tddata for row 2/td /tr tr tddata for row 3/td tddata for row 4/td /tr ...etc... /table -- if anyone can help me with alternating like this or knows where i can find a resource tutorial on it please tell me.. thanks -Adam -- 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] multiple outputs to mysql_query()
on 7/8/01 3:39 AM, Adam at [EMAIL PROTECTED] wrote: i want my mysql query result to output 2 mysql output rows for every tr set. I'm used to just doing a do/while statement for a single mysql output per row. I'd do this: ?php echo 'table'; $result = mysql_query(SELECT * from table WHERE type='default'); $numrows = mysql_num_rows ($result); while ($numrows) { $row = mysql_fetch_row ($result); echo tr\ntd$row[0]/td\n; $row = mysql_fetch_row ($result); echo td$row[0]/td\n/tr; $numrows = ($numrows - 2); } echo '/table'; ? -- 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] Sort an array by its values
Hi All, I'm trying to sort an array of objects by the value of one of those objects... for instance, I'll have an object with 2 properties, id and score, where id is unique and score is its relevant (and sometimes simelar) score. i've tried using sort() and asort() but i can't figure how to base the sorting off the value (i.e. score) of the object in the array. Any help? -- Aaron
Re: [PHP] Next Book
Good books for advanced topics are: PHP4 Developer's Guide (Schwendiman) PHP Developer's Cookbook (Hughes) Web Application Development for PHP 4.0 (Ratschiller, Gerken) And for MySQL, Surprisingly, O'Reilly's version is weak, but Dubois' MySQL for New Riders is very comprehensive. NuSphere hired Dubois as a tech writer for them a few months back, too... :-) /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Chris Lott [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 2:23 AM Subject: [PHP] Next Book | Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox. | Other good books I should think about? Recommendations? Reviews? I know the | PHP FAQ has pointers to books, but I am looking for recommendations on what | I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :) | | Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly is | pretty dated. | | c | | -- | 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] Sort an array by its values
Do you mean something like www.php.net/ksort or www.php.net/krsort? I'm not sure of the actual structure of your array, though, so those might not work as expected. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Aaron Bennett [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 4:25 AM Subject: [PHP] Sort an array by its values | Hi All, | I'm trying to sort an array of objects by the value of one of those | objects... | for instance, I'll have an object with 2 properties, id and score, where | id is unique and score is its relevant (and sometimes simelar) score. i've | tried using sort() and asort() but i can't figure how to base the sorting | off the value (i.e. score) of the object in the array. Any help? | -- | Aaron | -- 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] Sort an array by its values
Chris, I'm looking at ksort as i type... the problem i'm having is that i'm trying to sort a value inside an object inside that array (rather than paired values in an assoc. array) -- Aaron -Original Message- From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:33 AM To: Aaron Bennett Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Sort an array by its values Do you mean something like www.php.net/ksort or www.php.net/krsort? I'm not sure of the actual structure of your array, though, so those might not work as expected. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Aaron Bennett [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 4:25 AM Subject: [PHP] Sort an array by its values | Hi All, | I'm trying to sort an array of objects by the value of one of those | objects... | for instance, I'll have an object with 2 properties, id and score, where | id is unique and score is its relevant (and sometimes simelar) score. i've | tried using sort() and asort() but i can't figure how to base the sorting | off the value (i.e. score) of the object in the array. Any help? | -- | Aaron |
[PHP] I'm Looking for a PHP Tutor in Los Angeles.
Hello, I'm new to this list (today, as a matter of fact). Normally I would lurk awhile to get a feel for the list etiquette but feel the pressure to learn PHP quickly. I want to apologize, in advance, if I'm committing any list sins. I am looking to find a someone who is well versed in PHP that would consider tutoring someone in the Los Angeles area. I am really looking for someone in this area so that we can work face to face. I have several years experience programming other languages but am having trouble with sessions in PHP (amongst other things). I can be flexible with my time to accommodate your schedule. If you are interested, please email me with some information about your experience, some contact info and a best time to call. Thank you in advance for your responses. Sincerely, Mario A. Salinas -- 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] Sort an array by its values
Can you print_r($variable) and post it here? /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Aaron Bennett [EMAIL PROTECTED] To: 'Chris Lambert - WhiteCrown Networks' [EMAIL PROTECTED]; Aaron Bennett [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 4:34 AM Subject: RE: [PHP] Sort an array by its values | Chris, | I'm looking at ksort as i type... the problem i'm having is that i'm | trying to sort a value inside an object inside that array (rather than | paired values in an assoc. array) | -- | Aaron | | -Original Message- | From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] | Sent: Sunday, July 08, 2001 1:33 AM | To: Aaron Bennett | Cc: [EMAIL PROTECTED] | Subject: Re: [PHP] Sort an array by its values | | | Do you mean something like www.php.net/ksort or www.php.net/krsort? | | I'm not sure of the actual structure of your array, though, so those might | not work as expected. | | /* Chris Lambert, CTO - [EMAIL PROTECTED] | WhiteCrown Networks - More Than White Hats | Web Application Security - www.whitecrown.net | */ | | - Original Message - | From: Aaron Bennett [EMAIL PROTECTED] | To: Php-General (E-mail) [EMAIL PROTECTED] | Sent: Sunday, July 08, 2001 4:25 AM | Subject: [PHP] Sort an array by its values | | | | Hi All, | | I'm trying to sort an array of objects by the value of one of those | | objects... | | for instance, I'll have an object with 2 properties, id and score, | where | | id is unique and score is its relevant (and sometimes simelar) score. i've | | tried using sort() and asort() but i can't figure how to base the sorting | | off the value (i.e. score) of the object in the array. Any help? | | -- | | Aaron | | | -- 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] I'm Looking for a PHP Tutor in Los Angeles.
Just wondering mario what other programming do you know , and were did you learn it ? I just started programming so I know how you feel . Luis - Original Message - From: Mario A. Salinas [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 1:36 AM Subject: [PHP] I'm Looking for a PHP Tutor in Los Angeles. Hello, I'm new to this list (today, as a matter of fact). Normally I would lurk awhile to get a feel for the list etiquette but feel the pressure to learn PHP quickly. I want to apologize, in advance, if I'm committing any list sins. I am looking to find a someone who is well versed in PHP that would consider tutoring someone in the Los Angeles area. I am really looking for someone in this area so that we can work face to face. I have several years experience programming other languages but am having trouble with sessions in PHP (amongst other things). I can be flexible with my time to accommodate your schedule. If you are interested, please email me with some information about your experience, some contact info and a best time to call. Thank you in advance for your responses. Sincerely, Mario A. Salinas -- 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] Sort an array by its values
I think array_multisort is supposed to do this but I couldn't get it to work. Have a look at the usort call in the following routine; // Reads a directory and puts filenames into a array sorted by date function GetFiles ($DataPath, $files, $nfiles) { $handle=@opendir($DataPath); if ($handle) { $nfiles = 0; while (false!==($file = readdir($handle))) { if ($file != . $file != .. ) { $files[$nfiles][name] = $file; $files[$nfiles][date] = filemtime($DataPath.\\.$file); $nfiles++; } } if($nfiles1){ usort($files, create_function( '$a,$b', 'return $a[date]==$b[date]?0:($a[date]$b[date]?1:-1);') ); } closedir($handle); } } HTH Andrew Braund -Original Message- From: Aaron Bennett [mailto:[EMAIL PROTECTED]] Sent: Sunday, 8 July 2001 17:56 To: Php-General (E-mail) Subject: [PHP] Sort an array by its values Hi All, I'm trying to sort an array of objects by the value of one of those objects... for instance, I'll have an object with 2 properties, id and score, where id is unique and score is its relevant (and sometimes simelar) score. i've tried using sort() and asort() but i can't figure how to base the sorting off the value (i.e. score) of the object in the array. Any help? -- Aaron -- 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] Sort an array by its values
Chris, Due to the amount of HTML contained within the object, it would be nearly impossible to decipher from a print_r() the way it was... I was able to make an assoc. array with the id as the key and score as value, so i get something more like: Array ( [29] = 152 [13] = 98 [58] = 134 [6] = 66 [9] = 66 [15] = 68 [18] = 86 [49] = 66 [50] = 104 [51] = 66 [52] = 66 [59] = 100 [61] = 68 [66] = 68 ) which i should be able to use uasort() and array_reverse() to order them and maintain the correct index... Thanks for the help, i think i got it from here. -- Aaron -Original Message- From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:38 AM To: Aaron Bennett Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Sort an array by its values Can you print_r($variable) and post it here? /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Aaron Bennett [EMAIL PROTECTED] To: 'Chris Lambert - WhiteCrown Networks' [EMAIL PROTECTED]; Aaron Bennett [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 4:34 AM Subject: RE: [PHP] Sort an array by its values | Chris, | I'm looking at ksort as i type... the problem i'm having is that i'm | trying to sort a value inside an object inside that array (rather than | paired values in an assoc. array) | -- | Aaron | | -Original Message- | From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] | Sent: Sunday, July 08, 2001 1:33 AM | To: Aaron Bennett | Cc: [EMAIL PROTECTED] | Subject: Re: [PHP] Sort an array by its values | | | Do you mean something like www.php.net/ksort or www.php.net/krsort? | | I'm not sure of the actual structure of your array, though, so those might | not work as expected. | | /* Chris Lambert, CTO - [EMAIL PROTECTED] | WhiteCrown Networks - More Than White Hats | Web Application Security - www.whitecrown.net | */ | | - Original Message - | From: Aaron Bennett [EMAIL PROTECTED] | To: Php-General (E-mail) [EMAIL PROTECTED] | Sent: Sunday, July 08, 2001 4:25 AM | Subject: [PHP] Sort an array by its values | | | | Hi All, | | I'm trying to sort an array of objects by the value of one of those | | objects... | | for instance, I'll have an object with 2 properties, id and score, | where | | id is unique and score is its relevant (and sometimes simelar) score. i've | | tried using sort() and asort() but i can't figure how to base the sorting | | off the value (i.e. score) of the object in the array. Any help? | | -- | | Aaron | | |
Re: [PHP] Sort an array by its values
Try something like: uasort($your_hash[$first_level][$any_second_level], create_function('$a,$b', 'return $a[what_level] - $b[what_level];')); and adjust this according to the level and what you want to sort on accordingly... _jef Aaron Bennett wrote: Hi All, I'm trying to sort an array of objects by the value of one of those objects... for instance, I'll have an object with 2 properties, id and score, where id is unique and score is its relevant (and sometimes simelar) score. i've tried using sort() and asort() but i can't figure how to base the sorting off the value (i.e. score) of the object in the array. Any help? -- Aaron -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 -- 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] multiple outputs to mysql_query()
I'd do this: ?php echo 'table'; $result = mysql_query(SELECT * from table WHERE type='default'); $numrows = mysql_num_rows ($result); while ($numrows) { $row = mysql_fetch_row ($result); echo tr\ntd$row[0]/td\n; $row = mysql_fetch_row ($result); echo td$row[0]/td\n/tr; $numrows = ($numrows - 2); } echo '/table'; ? thanks so much for the help, that'll be a great reference for any other similar types of output i need. some things i had to fix for others viewing this thread: while ($numrows) had to be changed to while ($numrows = 1) or the while statement would loop forever. (server hangup) i had to accomidate and if statement to check if the amount of $numrows left was = 1 -Adam -- 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] can't generate gif!!!
Rama [EMAIL PROTECTED] wrote: I have problem using all image functions for gif. Does anyone have a suggestion how to convert gif images to png images? It's ok if I have to use other programming language instead of PHP. Ps: in case you wonder, I can't control the input file type. It will be very helpful if I can at least convert to other image format. what gdlib version do you use, as gif support is removed in the newer versions, due to license stuff. -- Henrik Hansen -- 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] test
test
[PHP] session management
Can a web hosting company decide whether or not session control is allowed in their servers. it is something you need to have access top the server to control. ie set up in the php.ini file or similar thanks andrew -- 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] can I fopen an https url?
On Saturday 07 July 2001 09:27, Jeff Orrok wrote: and assuming I can, will this dump the resulting page to the browser? $fp = fopen( $buildURI, r ); fpassthru( $fp ); fclose( $fp ); Why don't you just try it? -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match. - /. posting discussing the likelihood that an AC post that claimed to be posted by John Carmack during his honeymoon (and having the login info at home) was actually from him. -- 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] registering objects as session variables
Hi mike! On Sat, 07 Jul 2001, mike cullerton wrote: hey folks, i'm trying to register an object as a session variable and feel like i'm chasing my tail. i either get the define class before starting session problem or the can't send header error. as soon as i fix one, i cause the other. you are doing something wrong somewhere in the process :) All you need is the class definition before the session starts. That's all. Post some code to see what are you doing. -- teodor -- 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] High Ascii chars
Hi rm! On Sat, 07 Jul 2001, rm wrote: php3.x We have a large number of people submitting a large number of docs...I'm having a problem with some docs coming through with high ascii characters in the text, apparently the dbm database we're using chokes on some high ascii chars. I need to eliminate characters in the text from 122 to 255. I can't seem to find a simple way to do thisI have a routine, it works but it takes too long, something like; for ($i=122; $i256; $i++){ $textline=str_replace(chr($i),'',$textline) } $textline = preg_replace(/[\x7A-\xFF]+/,'', $textline); -- teodor -- 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 variables from php to bash script..
Hi Mark! On Sun, 08 Jul 2001, Mark Lo wrote: Hi, I would like to know. Is it possible to use php to exec a bash script with variable passing from php to bash. If so how to do this. either set them in the environment or pass them as arguments. but before that you man want to type man bash at the prompt to meet a new friend ;) proof of concept [joe.php] ?php $var1=hello; $var2=joe!; putenv(VAR1=$var1); system(/home/joe/bin/foo.sh $var2); [foo.sh] VAR2=$1 # or VAR2=${1:-not defined} where $1 means the first positional parameter # after the script name echo -e var1: $VAR1, var2: $var2 ciao -- teodor -- 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] Next Book
PHP Developer's Cookbook, most definetly. http://www.amazon.com/exec/obidos/ASIN/0672319241/telvinsarchive In all honesty, if I had just one book to choose, this would be it, and along with the PHP Manual online, is a wonderful reference. Jason Lotito www.NewbieNetwork.net PHP Newsletter: http://www.newbienetwork.net/ciao.php PHP, MySQL, PostgreSQL Tutorials, Code Snippets, and so much more -Original Message- From: Chris Lott [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 2:24 AM To: Php-General (E-mail) Subject: [PHP] Next Book Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox. Other good books I should think about? Recommendations? Reviews? I know the PHP FAQ has pointers to books, but I am looking for recommendations on what I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :) Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly is pretty dated. c -- 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] Polls
Sveiki, php-general, I'm making some kinf of poll system. I want to use mysql table like this: date question answer1 answer2 answer3 . answern but how to do this table. To write new fields isn't very good. So, is there any better way? 2001.07.08, sekmadienis Marius Pertravèius [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] Next Book
Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] wrote in message 007901c10788$6ba051a0$6401a8c0@server">news:007901c10788$6ba051a0$6401a8c0@server... [SNIP] Web Application Development for PHP 4.0 (Ratschiller, Gerken) I can recommend this book for people who are already somewhat familiar with PHP and who have a fair amount of programmin experience... Most of it is not really so much about as it is about good programming style (with transcends languages)... It's a good inspiration source and has helped me change the (not so optimal) way I did many tings... :-) Definetely not a beginner's book though... Also it has a chapter on hacking the PHP core contatining information you probably won't find anywhere else... -- Lasse -- 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] Polls
have 2 tables. Questions Table: Question ID Date Question Answers Table: Question ID Answer Then you can make as many answers as you like as long as the Question ID is for your question This make sense? Andrew - Original Message - From: Marius Pertravèius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 12:31 PM Subject: [PHP] Polls Sveiki, php-general, I'm making some kinf of poll system. I want to use mysql table like this: date question answer1 answer2 answer3 . answern but how to do this table. To write new fields isn't very good. So, is there any better way? 2001.07.08, sekmadienis Marius Pertravèius [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] Re: [PHP-DB] Parsing Error
To expand on that.. printf is short for print-formatted... its a function inherited from c (I think) which basically allows your to format variable for the display within the function, eg if you had $x=1.2243 then you could, for example, use ptinf to only display it as 1.22 To cut a long story short, Larry was right in his advice.. just thought I'ld stick my ha'penny's worth in too.. give you an idea why! I don't see why you are using printf there try print instead or echo ;)0 -Original Message- From: Jeff Grossman [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 07, 2001 6:56 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Parsing Error Thanks Larry. Now I am getting a printf too few arguments error on this line: printf(A HREF=\mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\;$jobdesc/ABR \n); Thanks, Jeff Larry Rivera [EMAIL PROTECTED] wrote: After a brief look it appears that your call to mysql_query is incorrect after the query then , then the link resource -Original Message- From: Jeff Grossman [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 07, 2001 6:23 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Parsing Error I keep getting the following error: Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/stats/jobs/listing.php on line 33 Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/html/stats/jobs/listing.php on line 43 when I try to display the following webpage. What am I doing wrong? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd; html head titleTitle/title /head body ?php $hostName=localhost; $userName=jeff; $password=jeff; $databaseName=jobs; $tableName=listings; // connnect to the database if (!($link=mysql_pconnect($hostName, $userName, $password))) { DisplayErrMsg(sprintf(error connecting to host %s by user %s, $hostName, $userName)); exit(); } // select the database if (!mysql_select_db($databaseName, $link)) { DisplayErrMsg(sprintf(Error in selecting %s database, $databaseName)); DisplayErrMsg(sprintf(error:%d %s, mysql_errno($link), mysql_error($link))); exit(); } // send the SQL queries $result=mysql_query(SELECT * FROM listings WHERE store='West Covina', $link); // return how many rows $num_rows=mysql_num_rows($result); // check if greater than zero if($num_rows!=0) { printf(FONT SIZE=+3West Covina/FONT FONT SIZE=-2IA HREF=\../test/stores.php#WC\address/A/I/FONTBRBR); while ($row=mysql_fetch_array($result)) { $store=$rowid[store]; $jobdesc=$rowid[jobdesc]; printf(A HREF=\mailto:[EMAIL PROTECTED]?subject=$store\%20$jobdesc\;$jobdesc/AB R \n); } } mysql_free_result($result); ? /body /html Thank you, Jeff --- Jeff Grossman ([EMAIL PROTECTED]) --- Jeff Grossman ([EMAIL PROTECTED]) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database 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] Printable Report Generator
Hi!! I'm new on this listand already have a problem :) I need to create a report to send it to printer based on datas from my database.firstly I tried pdf, but it's too hard to manage and it generate big sized archives. Any suggestions There's any way to do it in plain html with line breaks and page breaks?? There's any free tool out there?? Thx, Keyser Soze
[PHP] simple question
is there a function to turn all chars that are not alphanumric to show \xhh but hh being the hex version of it :)?
Re: [PHP] simple question
Hi ReDucTor! On Mon, 09 Jul 2001, ReDucTor wrote: is there a function to turn all chars that are not alphanumric to show \xhh but hh being the hex version of it :)? you mean bin2hex() under String Function section? :) -- teodor -- 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] Printable Report Generator
On 08-Jul-01 Keyser Soze wrote: Hi!! I'm new on this listand already have a problem :) I need to create a report to send it to printer based on datas from my database.firstly I tried pdf, but it's too hard to manage and it generate big sized archives. Any suggestions I'm assuming you want to veiw on your browser have the browser print ? There's any way to do it in plain html with line breaks and page breaks?? Ain't no such critter as a page break in html, but you can let the browser help out. All the versions i've worked with will avoid spliting a table across pages. So use that fact to nudge the wanted behaviour : TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0 TRTD PRE crank out 60 lines ... /PRE /TD/TR /TABLE !-- next page -- TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0 TRTD PRE 60 more lines ... /PRE /TD/TR /TABLE repeat until you either run out of memory or lines ... There's any free tool out there?? if you're writing html to disk, there's html2ps; i've no idea if it handles tables likewise. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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 question
eval(\$string=\.eregi_replace(([^A-Z]), \\x\.dechex(ord(\\\1\)).\, $string).\;); ;-) /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: ReDucTor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 10:18 AM Subject: [PHP] simple question is there a function to turn all chars that are not alphanumric to show \xhh but hh being the hex version of it :)? -- 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] Global Variables -- why not have them?
You must learn it's way if you want to be effective. Also take a look at design features proposed for PHP5. Looks promising and more C++ like, so better compare it with the later one. I went to php.net and searched for some kind of docs on PHP5, but found not a word. Where can I see this feature list? -- Julio Nobrega. Yes, I am developing another 'Portal-System' Have a look: http://sourceforge.net/projects/toca -- 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] Global Variables -- why not have them?
Hi Inércia! On Sun, 08 Jul 2001, Inércia Sensorial wrote: You must learn it's way if you want to be effective. Also take a look at design features proposed for PHP5. Looks promising and more C++ like, so better compare it with the later one. I went to php.net and searched for some kind of docs on PHP5, but found not a word. Where can I see this feature list? erm, Zeev wrote to the list some time ago and gave a link somewhere inside www.zend.com site. As I don't have it handy I'll just point you to the site. [n.b. is on zend.com cause the features regard the Zend engine] -- teodor -- 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] open_basedir
Ulrich, Pretty sure that the way to fix this will be to make sure that PHP just can't read those files... so that the apache (or whatever server) user that runs the PHP [module/binary] doesn't have access to read them. If you are concerned specifically about /etc/passwd, shadow it. You can find more information in the HOWTO's off of RedHat's site or at linux.com. This may not be correct, but I'm fairly certain. I trust someone will correct me if I'm wrong. Good Luck, Ben -Original Message- From: Yacoon [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 12:18 AM To: [EMAIL PROTECTED] Subject: [PHP] open_basedir mornin, i´m new to the list and to php, so please don´t jump to hard on me, when you think the question is dump. okay: is there a possibility to make a server only execute the php scripts in the document root it was called from? I saw something about open_basedir, but am not sure if that is the way. I badly need to protect the server from i.e. includes, that read out or manipulated server config files, like passwd. I have systems run under redhat, if that matters. could anyone please just let me know how and where? I´ll definatelly need the correct syntax, since thats my main-problem with php. thanks a lot - ulrich -- 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] registering objects as session variables
on 7/8/01 5:53 AM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: Hi mike! On Sat, 07 Jul 2001, mike cullerton wrote: hey folks, i'm trying to register an object as a session variable and feel like i'm chasing my tail. i either get the define class before starting session problem or the can't send header error. as soon as i fix one, i cause the other. you are doing something wrong somewhere in the process :) All you need is the class definition before the session starts. That's all. Post some code to see what are you doing. thanks, this is really involved code. (YA weblog program) the index has one include file, but that include file has _many_ includes and lots of interdependence. the object i want to register maintains the page layout, and has a db object and member object as variables. i've got some test code working that doesn't exhibit the problem. now i'm just trying to track it down. :( again, thanks, mike -- teodor -- mike cullerton -- 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: get a screen resolution
Hi Marc, This is one for JavaScript, methinks. html head titleScreen detection/title SCRIPT LANGUAGE=JavaScript !-- function GetSW() { var sw = screen.width; return sw; } function GetSH() { var sh = screen.height; return sh; } //-- /SCRIPT /head body Your browser resolution is SCRIPT LANGUAGE=JavaScript !-- document.write(GetSW() + ' by ' + GetSH()); //-- /SCRIPT pixels, so it's therefore recommended you view the site using this resolution (or whatever's closes to it). /body /html Marc van Duivenvoorde [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm trying to make a small browser and screen resolution script for my site, the browser part isn't a problem, but I can't find a function for screen resolutions, does anyone know whether such a function exists. Thanks, Marc van Duivenvoorde -- 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] can't generate gif!!!
Also, if you don't need to do this on the fly (or even if you do, in certain cases) just use 'convert', a standard unix tool (fairly standard, anyway). So if, for instance, your users are uploading a gif, and you need a png (so that you can tweak with it), you could write it to a file, and then echo `convert upload.gif output.png`; your_functions_here('output.png'); Ben -Original Message- From: Henrik Hansen [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:16 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] can't generate gif!!! Rama [EMAIL PROTECTED] wrote: I have problem using all image functions for gif. Does anyone have a suggestion how to convert gif images to png images? It's ok if I have to use other programming language instead of PHP. Ps: in case you wonder, I can't control the input file type. It will be very helpful if I can at least convert to other image format. what gdlib version do you use, as gif support is removed in the newer versions, due to license stuff. -- Henrik Hansen -- 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 question
Lowercase letters are included (eregI_replace) but you could add number support with: [^A-Z0-9] __ / Chris Lambert - [EMAIL PROTECTED] |- ICQ #: 16435685 - AIM: ClipperChris `- Cell: (401) 743-2786 - http://sms.clambert.org/ - Original Message - From: ReDucTor [EMAIL PROTECTED] To: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 11:45 AM Subject: Re: [PHP] simple question | nice, but i might change it to have lower case and numbers...hehehe | | btw thx | - Original Message - | From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] | To: [EMAIL PROTECTED] | Sent: Monday, July 09, 2001 12:50 AM | Subject: Re: [PHP] simple question | | | eval(\$string=\.eregi_replace(([^A-Z]), | \\x\.dechex(ord(\\\1\)).\, $string).\;); | | ;-) | | /* Chris Lambert, CTO - [EMAIL PROTECTED] | WhiteCrown Networks - More Than White Hats | Web Application Security - www.whitecrown.net | */ | | - Original Message - | From: ReDucTor [EMAIL PROTECTED] | To: [EMAIL PROTECTED] | Sent: Sunday, July 08, 2001 10:18 AM | Subject: [PHP] simple question | | | is there a function to turn all chars that are not alphanumric to show | \xhh | but hh being the hex version of it :)? | | | | -- | 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] can't generate gif!!!
I thought convert was an imagemagick command, rather than unix by default? could be wrong tho... - Original Message - From: Ben Bleything [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 5:23 PM Subject: RE: [PHP] can't generate gif!!! Also, if you don't need to do this on the fly (or even if you do, in certain cases) just use 'convert', a standard unix tool (fairly standard, anyway). So if, for instance, your users are uploading a gif, and you need a png (so that you can tweak with it), you could write it to a file, and then echo `convert upload.gif output.png`; your_functions_here('output.png'); Ben -Original Message- From: Henrik Hansen [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:16 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] can't generate gif!!! Rama [EMAIL PROTECTED] wrote: I have problem using all image functions for gif. Does anyone have a suggestion how to convert gif images to png images? It's ok if I have to use other programming language instead of PHP. Ps: in case you wonder, I can't control the input file type. It will be very helpful if I can at least convert to other image format. what gdlib version do you use, as gif support is removed in the newer versions, due to license stuff. -- Henrik Hansen -- 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] Next Book
Web Application Development for PHP 4.0 (Ratschiller, Gerken) I'm reading through this one now, I like it. - k - Original Message - From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] To: Chris Lott [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 4:31 AM Subject: Re: [PHP] Next Book Good books for advanced topics are: PHP4 Developer's Guide (Schwendiman) PHP Developer's Cookbook (Hughes) Web Application Development for PHP 4.0 (Ratschiller, Gerken) And for MySQL, Surprisingly, O'Reilly's version is weak, but Dubois' MySQL for New Riders is very comprehensive. NuSphere hired Dubois as a tech writer for them a few months back, too... :-) /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Chris Lott [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 2:23 AM Subject: [PHP] Next Book | Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox. | Other good books I should think about? Recommendations? Reviews? I know the | PHP FAQ has pointers to books, but I am looking for recommendations on what | I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :) | | Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly is | pretty dated. | | c | | -- | 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] can't generate gif!!!
on 7/8/01 10:51 AM, Tom Carter at [EMAIL PROTECTED] wrote: I thought convert was an imagemagick command, rather than unix by default? could be wrong tho... yes, but you can install it on a box without xwindows and still use it. a pretty cool tool. -- mike cullerton -- 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] can't generate gif!!!
Oh yeah = That's probably true. Howver, every machine I have ever used has had convert. I do a lot of photography, and so I use it a lot = Ben -Original Message- From: Tom Carter [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] can't generate gif!!! I thought convert was an imagemagick command, rather than unix by default? could be wrong tho... - Original Message - From: Ben Bleything [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 5:23 PM Subject: RE: [PHP] can't generate gif!!! Also, if you don't need to do this on the fly (or even if you do, in certain cases) just use 'convert', a standard unix tool (fairly standard, anyway). So if, for instance, your users are uploading a gif, and you need a png (so that you can tweak with it), you could write it to a file, and then echo `convert upload.gif output.png`; your_functions_here('output.png'); Ben -Original Message- From: Henrik Hansen [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:16 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] can't generate gif!!! Rama [EMAIL PROTECTED] wrote: I have problem using all image functions for gif. Does anyone have a suggestion how to convert gif images to png images? It's ok if I have to use other programming language instead of PHP. Ps: in case you wonder, I can't control the input file type. It will be very helpful if I can at least convert to other image format. what gdlib version do you use, as gif support is removed in the newer versions, due to license stuff. -- Henrik Hansen -- 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] add user from the web interface
on 7/8/01 4:30 AM, INFO (www.trade-revenues.com) at [EMAIL PROTECTED] wrote: Hi, If I want to add a system user from the web interface using Apache + Redhat 6.2. What language should I use. Should I use PHP or Bash or Perl. Which one is the best ?? I know PHP can always exec shell command using exec() function. But, the apache server is set to nobody.. So I can not exec the root command from the web interface. Advice is need in this situation. if you want to use a web interface, you're stuck with the user that apache runs as. (nobody in your case) one option is to have the web application create a file, and then have a cron job as root come by and read the file and add the user(s). -- mike cullerton -- 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] can't generate gif!!!
Sensible thing to have installed.. I do lots of command line image processing thru php on the command line.. conversion, distortions,resizing, manipulation etc /plug lol http://www.imagemagick.org Oh yeah = That's probably true. Howver, every machine I have ever used has had convert. I do a lot of photography, and so I use it a lot = Ben -Original Message- From: Tom Carter [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 9:52 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] can't generate gif!!! I thought convert was an imagemagick command, rather than unix by default? could be wrong tho... - Original Message - From: Ben Bleything [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 5:23 PM Subject: RE: [PHP] can't generate gif!!! Also, if you don't need to do this on the fly (or even if you do, in certain cases) just use 'convert', a standard unix tool (fairly standard, anyway). So if, for instance, your users are uploading a gif, and you need a png (so that you can tweak with it), you could write it to a file, and then echo `convert upload.gif output.png`; your_functions_here('output.png'); Ben -Original Message- From: Henrik Hansen [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:16 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] can't generate gif!!! Rama [EMAIL PROTECTED] wrote: I have problem using all image functions for gif. Does anyone have a suggestion how to convert gif images to png images? It's ok if I have to use other programming language instead of PHP. Ps: in case you wonder, I can't control the input file type. It will be very helpful if I can at least convert to other image format. what gdlib version do you use, as gif support is removed in the newer versions, due to license stuff. -- Henrik Hansen -- 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] simple question
this is wierd, i have the following... $buffer = eregi_replace([^A-Z0-9], (\\x.dechex(ord(\\1)).) , $buffer); and this is what buffer is m192.168.0.2:27015Counter-Strike 1.1 Serverde_dust2cstrikeCounterStrike+dwwww.nuclearbox.com/podbot but this is what comes out (\x5c)(\x5c)(\x5c)(\x5c)m192(\x5c)168(\x5c)0(\x5c)2(\x5c)27015 and \x5c is \ ne1 know why? - Original Message - From: Chris Lambert [EMAIL PROTECTED] To: ReDucTor [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 09, 2001 2:47 AM Subject: Re: [PHP] simple question Lowercase letters are included (eregI_replace) but you could add number support with: [^A-Z0-9] __ / Chris Lambert - [EMAIL PROTECTED] |- ICQ #: 16435685 - AIM: ClipperChris `- Cell: (401) 743-2786 - http://sms.clambert.org/ - Original Message - From: ReDucTor [EMAIL PROTECTED] To: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 11:45 AM Subject: Re: [PHP] simple question | nice, but i might change it to have lower case and numbers...hehehe | | btw thx | - Original Message - | From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] | To: [EMAIL PROTECTED] | Sent: Monday, July 09, 2001 12:50 AM | Subject: Re: [PHP] simple question | | | eval(\$string=\.eregi_replace(([^A-Z]), | \\x\.dechex(ord(\\\1\)).\, $string).\;); | | ;-) | | /* Chris Lambert, CTO - [EMAIL PROTECTED] | WhiteCrown Networks - More Than White Hats | Web Application Security - www.whitecrown.net | */ | | - Original Message - | From: ReDucTor [EMAIL PROTECTED] | To: [EMAIL PROTECTED] | Sent: Sunday, July 08, 2001 10:18 AM | Subject: [PHP] simple question | | | is there a function to turn all chars that are not alphanumric to show | \xhh | but hh being the hex version of it :)? | | | | -- | 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] simple question
You messed up the regular expression I gave you. The parenthesis need to go in the first paramater, not the second. Otherwise it will replace an string instead of a single character. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: ReDucTor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 1:28 PM Subject: Re: [PHP] simple question this is wierd, i have the following... $buffer = eregi_replace([^A-Z0-9], (\\x.dechex(ord(\\1)).) , $buffer); and this is what buffer is m192.168.0.2:27015Counter-Strike 1.1 Serverde_dust2cstrikeCounterStrike+dwwww.nuclearbox.com/podbot but this is what comes out (\x5c)(\x5c)(\x5c)(\x5c)m192(\x5c)168(\x5c)0(\x5c)2(\x5c)27015 and \x5c is \ ne1 know why? - Original Message - From: Chris Lambert [EMAIL PROTECTED] To: ReDucTor [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 09, 2001 2:47 AM Subject: Re: [PHP] simple question Lowercase letters are included (eregI_replace) but you could add number support with: [^A-Z0-9] __ / Chris Lambert - [EMAIL PROTECTED] |- ICQ #: 16435685 - AIM: ClipperChris `- Cell: (401) 743-2786 - http://sms.clambert.org/ - Original Message - From: ReDucTor [EMAIL PROTECTED] To: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 11:45 AM Subject: Re: [PHP] simple question | nice, but i might change it to have lower case and numbers...hehehe | | btw thx | - Original Message - | From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] | To: [EMAIL PROTECTED] | Sent: Monday, July 09, 2001 12:50 AM | Subject: Re: [PHP] simple question | | | eval(\$string=\.eregi_replace(([^A-Z]), | \\x\.dechex(ord(\\\1\)).\, $string).\;); | | ;-) | | /* Chris Lambert, CTO - [EMAIL PROTECTED] | WhiteCrown Networks - More Than White Hats | Web Application Security - www.whitecrown.net | */ | | - Original Message - | From: ReDucTor [EMAIL PROTECTED] | To: [EMAIL PROTECTED] | Sent: Sunday, July 08, 2001 10:18 AM | Subject: [PHP] simple question | | | is there a function to turn all chars that are not alphanumric to show | \xhh | but hh being the hex version of it :)? | | | | -- | 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]
[PHP] Re: How to create a button with a icon inside ?
? Header(Content-type: image/png); $font = php.ttf; if(!$si) $si = 66; $im = ImageCreateFromPNG(php-blank.png); $tsize = imagettfbbox($si,0,$font,$text); $dx = abs($tsize[2]-$tsize[0]); $dy = abs($tsize[5]-$tsize[3]); $x = ( imagesx($im) - $dx ) / 2; $y = ( imagesy($im) - $dy ) / 2 + 3*$dy/4; $blue = ImageColorAllocate($im,0x5B,0x69,0xA6); $white = ImageColorAllocate($im,255,255,255); $black = ImageColorAllocate($im,0,0,0); ImageTTFText($im, $si, 0, $x, $y, $white, $font, $text); ImageTTFText($im, $si, 0, $x+2, $y, $white, $font, $text); ImageTTFText($im, $si, 0, $x, $y+2, $white, $font, $text); ImageTTFText($im, $si, 0, $x+2, $y+2, $white, $font, $text); ImageTTFText($im, $si, 0, $x+1, $y+1, $black, $font, $text); ImagePNG($im); ? ...from one of the PHP conferences. php.ttf is the font php-blank.png is the base image $text is the text you want to write, and $si is the size of the font __ / Chris Lambert - [EMAIL PROTECTED] |- ICQ #: 16435685 - AIM: ClipperChris `- Cell: (401) 743-2786 - http://sms.clambert.org/ - Original Message - From: Mauro Ferreira [EMAIL PROTECTED] Newsgroups: php.gtk To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 1:10 PM Subject: How to create a button with a icon inside ? Can someone show me a example ? I'm doing some refinements in an database-oriented app, and show database navigation and action buttons with small icons instead of text will do a lot for the visual - and cuts a lot in internationalization too ! If isn't ask for too much, a example of a combined icon+text button too will be great too - some not-so-obvious actions, like data integrity check need a text anyway. Know how to make this will simplify my work a lot, not to mention the visual aspect. Thanks ! -- 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: How to create a button with a icon inside ?
Argh, responded to the wrong list. Apologies. :-) /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Chris Lambert [EMAIL PROTECTED] To: Mauro Ferreira [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 1:43 PM Subject: [PHP] Re: How to create a button with a icon inside ? | ? | Header(Content-type: image/png); | $font = php.ttf; | if(!$si) $si = 66; | $im = ImageCreateFromPNG(php-blank.png); | $tsize = imagettfbbox($si,0,$font,$text); | $dx = abs($tsize[2]-$tsize[0]); | $dy = abs($tsize[5]-$tsize[3]); | $x = ( imagesx($im) - $dx ) / 2; | $y = ( imagesy($im) - $dy ) / 2 + 3*$dy/4; | $blue = ImageColorAllocate($im,0x5B,0x69,0xA6); | $white = ImageColorAllocate($im,255,255,255); | $black = ImageColorAllocate($im,0,0,0); | ImageTTFText($im, $si, 0, $x, $y, $white, $font, $text); | ImageTTFText($im, $si, 0, $x+2, $y, $white, $font, $text); | ImageTTFText($im, $si, 0, $x, $y+2, $white, $font, $text); | ImageTTFText($im, $si, 0, $x+2, $y+2, $white, $font, $text); | ImageTTFText($im, $si, 0, $x+1, $y+1, $black, $font, $text); | ImagePNG($im); | ? | | ..from one of the PHP conferences. | | php.ttf is the font | | php-blank.png is the base image | | $text is the text you want to write, and $si is the size of the font | __ | / Chris Lambert - [EMAIL PROTECTED] | |- ICQ #: 16435685 - AIM: ClipperChris | `- Cell: (401) 743-2786 - http://sms.clambert.org/ | - Original Message - | From: Mauro Ferreira [EMAIL PROTECTED] | Newsgroups: php.gtk | To: [EMAIL PROTECTED] | Sent: Sunday, July 08, 2001 1:10 PM | Subject: How to create a button with a icon inside ? | | | Can someone show me a example ? | | I'm doing some refinements in an database-oriented app, and show database | navigation and action buttons with small icons instead of text will do a lot | for the visual - and cuts a lot in internationalization too ! | | If isn't ask for too much, a example of a combined icon+text button too will | be great too - some not-so-obvious actions, like data integrity check need a | text anyway. | | Know how to make this will simplify my work a lot, not to mention the visual | aspect. | | Thanks ! | | | | -- | 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] Re: when to delete a temporary file ?
Arash Dejkam [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... [SNIP] this was the first approach I thought about, but I don't know how to check session IDs other that current one I use session_is_registered() to check for the current session but how can I check for other sessions ? tell me please :) Um... I'm not sure... I've never actually used sessions myself.. :-) I just figured that it would be possible... Sounds to me like the best solution for you would be to make your own session-handling routines... This way you'd have complete control over your sessions... -- Lasse -- 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] case sensitive
hi, is there a little thingy that - put into a script - tells php within a mysql query to not care about cases? problem is a mailing script, that always stops, when a mailaddress contains uppercase letters. thanks - u. -- 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] case sensitive
MySQL, on non binary comparisons, is case insensitive. I'm not sure what your problem is, though. Could you try and explain in a little more detail? /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: prosite [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 1:47 PM Subject: [PHP] case sensitive | hi, | is there a little thingy that - put into a script - tells php within a mysql | query to not care about cases? problem is a mailing script, that always | stops, when a mailaddress contains uppercase letters. | thanks - u. | | | -- | 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] Re: case sensitive
You could convert to lower case either on the record or on the retrieve, or update the curret data with a simple loop. -- Julio Nobrega. Yes, I am developing another 'Portal-System' Have a look: http://sourceforge.net/projects/toca prosite [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi, is there a little thingy that - put into a script - tells php within a mysql query to not care about cases? problem is a mailing script, that always stops, when a mailaddress contains uppercase letters. thanks - u. -- 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: when to delete a temporary file ?
on 7/8/01 11:45 AM, Lasse at [EMAIL PROTECTED] wrote: this was the first approach I thought about, but I don't know how to check session IDs other that current one I use session_is_registered() to check for the current session but how can I check for other sessions ? tell me please :) Um... I'm not sure... I've never actually used sessions myself.. :-) I just figured that it would be possible... php session info can be stored a couple differet ways on your server. the default is a file (one for each session) in /tmp. the name of the file includes the session id. http://www.php.net/session -- mike cullerton -- 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] Storing multi-page texts
What kind of methods have any of you used for storing text that needs to be displayed as both multi-page (for reading) and single-page (for printing)? My plan is to store the articles with basic HTML formatting that will render based on the site stylesheet(s). I'm using MySQL. My main question is how to deal with the multiple pages. Higher-ups would prefer that article authors not have to split the file into various fields when composing. My idea is to have the authors insert a code/comment that indicates a page break in the text (something like, cryptically, PAGEBREAK) and then when pulling the article from the DB, create a menu for selecting pages (there has to be a small menu at the bottom of each article with a link to each article page and an indication where the user is), display the proper page, etc. I've still not got my head completely around how I am going to do this, so I am looking for suggestions on how other sites manage this need. c -- 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] multiple outputs to mysql_query()
on 7/8/01 5:53 AM, Adam at [EMAIL PROTECTED] wrote: thanks so much for the help, that'll be a great reference for any other similar types of output i need. some things i had to fix for others viewing this thread: while ($numrows) had to be changed to while ($numrows = 1) or the while statement would loop forever. (server hangup) i had to accomidate and if statement to check if the amount of $numrows left was = 1 -Adam Have you tried this? ?php echo 'table'; $result = mysql_query(SELECT * from table WHERE type='default'); while (mysql_fetch_row ($result)) { echo tr\ntd$row[0]/td\n; $row = mysql_fetch_row ($result); echo td$row[0]/td\n/tr; } echo '/table'; ? It might be a more simple way of doing it ... but I haven't tried it... -- 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] I thought I beat the safe mode ... now this ...
Can anyone see anything wrong with this code? $chmodresult = chmod ($imageloc, 0777); $trashpath = trash/$filenamec; $trashed = rename ($trashpath, $imageloc); echo moving $imageloc to $trashpath, $trashed, $chmodresultbr; I'm trying to move the file at $imageloc to a folder called 'trash' (in the same folder as $imageloc. The pasths are OK. Could this be a safe mode problem? $chmodresult returns 1 or true, but the file is still protected when I go look at it... Susan -- 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] Printable Report Generator
on 7/8/01 10:04 AM, Keyser Soze at [EMAIL PROTECTED] wrote: I need to create a report to send it to printer based on datas from my database.firstly I tried pdf, but it's too hard to manage and it generate big sized archives. Any suggestions What kind of report? a report of what? Susan -- 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] magic functions
hey folks, hope the day is treating you well. i believe i have solved my chasing the tail problem with registering an object as a session variable. now, i'm having trouble with my database connection. in the object i am registering, one of its variables is a pear db object. the first connection to the page works, any subsequent connection gets the following error Warning: Supplied argument is not a valid MySQL-Link resource in DB/mysql.php so, i am wondering how to use __sleep and __wake. there aren't any examples on php.net about this. it mentions something about returning an array of variables to serialize. should i include the db object in this array? anyone have a simple example to start from? any help appreciated, thanks, mike -- mike cullerton -- 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] ? include (http://www.myserver.de/page2.php); ?
Hi, does anyone know, how to get the following line working an windows? ? include (http://www.myserver.de/page2.php;); ? I know, this way to access a remote file works on UNIX. I simply can't get it to work on window. Is there a patch/trick out, wich enables this? I tried it on windows with IIS and APACHE. Both attempts have failed. I need it, because I do develop most of my pages on a Win2k system, later, the pages gets published on a LINUX server. Thanks for your help Dieter -- 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] custom tag support
dc wrote: I was curious if there was any custom tag support like jsp or cold fusion in php (or outside libraries). I'm looking at trying to make re-usuable components and want to use something more than including simple classes or function calls. Thanks for your time, If you know C, then yes. You can write your own C libraries to be compiled in to PHP to give you new 'built in' functions. Personally, I'm not good enough with C to do that, and am not sure that you'd get enough of a speed boost to justify it. Probably in some cases you would, but is that the reason (speed?) you're asking? I wonder how many CF people will be writing custom tags still now that CF5 finally allows user-defined functions.; Michael Kimsal http://www.tapinternet.com/php/ PHP Training Courses 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] mcrypt
I have compiled PHP with mcrypt and it works fine if I run a script from the command line but through a browswer such as IE I get the following error: Fatal error: Call to undefined function: mcrypt_module_open() in /home/wheit/html/test.php on line 6 What do I need to do to be able to use these functions through a browser I use apache as a web server Randy -- 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] mcrypt
Have you made sure that the php on the command line and the php that apache is using are indeed the same one? It's possible that apache is looking at a module somewhere and that the php on the command line is the binary you built. Just a thought. Ben -Original Message- From: Power Programmer [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 12:29 PM To: [EMAIL PROTECTED]; Keyser Soze; [EMAIL PROTECTED] Subject: [PHP] mcrypt I have compiled PHP with mcrypt and it works fine if I run a script from the command line but through a browswer such as IE I get the following error: Fatal error: Call to undefined function: mcrypt_module_open() in /home/wheit/html/test.php on line 6 What do I need to do to be able to use these functions through a browser I use apache as a web server Randy -- 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] Question about how to do this...
hey- so I want to have my site so that the urls are like /index.php?page=bio the way I made the index.php so far is just one gigantic switch statement...is there a better way to do it? chris -- 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] Question about how to do this...
Use a database. With mysql, you can store the text into a table with primary key called 'page' or something like that, and a text field of some sort. Then, do mysql_query(SELECT pagetext FROM website WHERE page=$page;); = Dive into it. It's easier than it looks. Ben -Original Message- From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:44 PM To: PHP General List (E-mail) Subject: [PHP] Question about how to do this... hey- so I want to have my site so that the urls are like /index.php?page=bio the way I made the index.php so far is just one gigantic switch statement...is there a better way to do it? chris -- 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] Question about how to do this...
what if I'm storing HTML into the database, or even PHP code itself for that matter, is this method that you mentioned still better than the switch statement method? chris -Original Message- From: Ben Bleything [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 4:59 PM To: [EMAIL PROTECTED]; 'PHP General List (E-mail)' Subject: RE: [PHP] Question about how to do this... Use a database. With mysql, you can store the text into a table with primary key called 'page' or something like that, and a text field of some sort. Then, do mysql_query(SELECT pagetext FROM website WHERE page=$page;); = Dive into it. It's easier than it looks. Ben -Original Message- From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:44 PM To: PHP General List (E-mail) Subject: [PHP] Question about how to do this... hey- so I want to have my site so that the urls are like /index.php?page=bio the way I made the index.php so far is just one gigantic switch statement...is there a better way to do it? chris -- 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] Question about how to do this...
This is probably not a good idea if the data is mostly static. There's no real reason to use the power of a db engine for something this trivial, and static serving will be faster than a DB system. Mark C. - Original Message - From: Ben Bleything [EMAIL PROTECTED] To: [EMAIL PROTECTED]; 'PHP General List (E-mail)' [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 3:59 PM Subject: RE: [PHP] Question about how to do this... Use a database. With mysql, you can store the text into a table with primary key called 'page' or something like that, and a text field of some sort. Then, do mysql_query(SELECT pagetext FROM website WHERE page=$page;); = Dive into it. It's easier than it looks. Ben -Original Message- From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:44 PM To: PHP General List (E-mail) Subject: [PHP] Question about how to do this... hey- so I want to have my site so that the urls are like /index.php?page=bio the way I made the index.php so far is just one gigantic switch statement...is there a better way to do it? chris -- 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] Question about how to do this...
This is a very good valid point that I completely failed to consider = Chris, to answer your last question, yes, it _would_ work, but as Mark points out, it's probably not a very good idea. Still cool, but hey, you can tell I don't work in a production environment = The other method I sent will reduce the size (and maintenance cost) of your index.php page, while being fast (as Mark says). Ben -Original Message- From: Mark Charette [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 2:05 PM To: Ben Bleything; [EMAIL PROTECTED]; 'PHP General List (E-mail)' Subject: Re: [PHP] Question about how to do this... This is probably not a good idea if the data is mostly static. There's no real reason to use the power of a db engine for something this trivial, and static serving will be faster than a DB system. Mark C. - Original Message - From: Ben Bleything [EMAIL PROTECTED] To: [EMAIL PROTECTED]; 'PHP General List (E-mail)' [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 3:59 PM Subject: RE: [PHP] Question about how to do this... Use a database. With mysql, you can store the text into a table with primary key called 'page' or something like that, and a text field of some sort. Then, do mysql_query(SELECT pagetext FROM website WHERE page=$page;); = Dive into it. It's easier than it looks. Ben -Original Message- From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:44 PM To: PHP General List (E-mail) Subject: [PHP] Question about how to do this... hey- so I want to have my site so that the urls are like /index.php?page=bio the way I made the index.php so far is just one gigantic switch statement...is there a better way to do it? chris -- 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] datetime on MSSQL doesn't work with PHP
why does PHP converts the 'datetime' and 'smalldatetime' types of MSSQL to a 'prettier' output? in the table I have '2001-07-01 12:45:01' but when I run a query in PHP to get it I recieve 'Jul 7 2001 12:45AM'. I didn't ask for that... I want the exact value in the field with seconds and all, not a converted value. How can I prevent this? . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web 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]
RE: [PHP] Question about how to do this...
so the switch statement idea works I guess. sounds good. -Original Message- From: Mark Charette [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 5:05 PM To: Ben Bleything; [EMAIL PROTECTED]; 'PHP General List (E-mail)' Subject: Re: [PHP] Question about how to do this... This is probably not a good idea if the data is mostly static. There's no real reason to use the power of a db engine for something this trivial, and static serving will be faster than a DB system. Mark C. - Original Message - From: Ben Bleything [EMAIL PROTECTED] To: [EMAIL PROTECTED]; 'PHP General List (E-mail)' [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 3:59 PM Subject: RE: [PHP] Question about how to do this... Use a database. With mysql, you can store the text into a table with primary key called 'page' or something like that, and a text field of some sort. Then, do mysql_query(SELECT pagetext FROM website WHERE page=$page;); = Dive into it. It's easier than it looks. Ben -Original Message- From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:44 PM To: PHP General List (E-mail) Subject: [PHP] Question about how to do this... hey- so I want to have my site so that the urls are like /index.php?page=bio the way I made the index.php so far is just one gigantic switch statement...is there a better way to do it? chris -- 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] Question about how to do this...
Yup = Try splitting the pages out into separate files. I'm betting you'll find it easier to work with. Ben -Original Message- From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 2:02 PM To: PHP General List (E-mail) Subject: RE: [PHP] Question about how to do this... so the switch statement idea works I guess. sounds good. -Original Message- From: Mark Charette [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 5:05 PM To: Ben Bleything; [EMAIL PROTECTED]; 'PHP General List (E-mail)' Subject: Re: [PHP] Question about how to do this... This is probably not a good idea if the data is mostly static. There's no real reason to use the power of a db engine for something this trivial, and static serving will be faster than a DB system. Mark C. - Original Message - From: Ben Bleything [EMAIL PROTECTED] To: [EMAIL PROTECTED]; 'PHP General List (E-mail)' [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 3:59 PM Subject: RE: [PHP] Question about how to do this... Use a database. With mysql, you can store the text into a table with primary key called 'page' or something like that, and a text field of some sort. Then, do mysql_query(SELECT pagetext FROM website WHERE page=$page;); = Dive into it. It's easier than it looks. Ben -Original Message- From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:44 PM To: PHP General List (E-mail) Subject: [PHP] Question about how to do this... hey- so I want to have my site so that the urls are like /index.php?page=bio the way I made the index.php so far is just one gigantic switch statement...is there a better way to do it? chris -- 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] -- 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] Mcrypt Part2
What causes this error when apache is starting? # ./apachectl startssl Syntax error on line 238 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: libmcrypt.so.4: cannot open shared object file: No such file or directory ./apachectl startssl: httpd could not be started Libphp4.so does exist. Thanks Randy -- 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] Question about how to do this...
Or even better, create a system where you can create new pages without adding to the switch statement: ? $page = /home/full/path/to/site/page_includes/.str_replace(.., , $page); if (file_exists($page)) require($page); ? Note that you _need_ to have the full path, else you're creating a security issue. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Ben Bleything [EMAIL PROTECTED] To: [EMAIL PROTECTED]; 'PHP General List (E-mail)' [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 5:17 PM Subject: RE: [PHP] Question about how to do this... | Yup = Try splitting the pages out into separate files. I'm betting | you'll find it easier to work with. | | Ben | | | -Original Message- | From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] | Sent: Sunday, July 08, 2001 2:02 PM | To: PHP General List (E-mail) | Subject: RE: [PHP] Question about how to do this... | | so the switch statement idea works I guess. sounds good. | | -Original Message- | From: Mark Charette [mailto:[EMAIL PROTECTED]] | Sent: Sunday, July 08, 2001 5:05 PM | To: Ben Bleything; [EMAIL PROTECTED]; 'PHP General List (E-mail)' | Subject: Re: [PHP] Question about how to do this... | | | This is probably not a good idea if the data is mostly static. There's | no | real reason to use the power of a db engine for something this trivial, | and | static serving will be faster than a DB system. | | Mark C. | | - Original Message - | From: Ben Bleything [EMAIL PROTECTED] | To: [EMAIL PROTECTED]; 'PHP General List (E-mail)' | [EMAIL PROTECTED] | Sent: Sunday, July 08, 2001 3:59 PM | Subject: RE: [PHP] Question about how to do this... | | | Use a database. With mysql, you can store the text into a table with | primary key called 'page' or something like that, and a text field of | some sort. | | Then, do mysql_query(SELECT pagetext FROM website WHERE | page=$page;); | | = | | Dive into it. It's easier than it looks. | | Ben | | -Original Message- | From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] | Sent: Sunday, July 08, 2001 1:44 PM | To: PHP General List (E-mail) | Subject: [PHP] Question about how to do this... | | hey- | | so I want to have my site so that the urls are like | /index.php?page=bio | | the way I made the index.php so far is just one gigantic switch | statement...is there a better way to do it? | | | chris | | | -- | 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] | | | | -- | 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] Mcrypt Part2
the lib directories you specify for apache in the httpd.conf are incorrect. - Original Message - From: Power Programmer [EMAIL PROTECTED] To: Ben Bleything [EMAIL PROTECTED]; 'Power Programmer' [EMAIL PROTECTED]; [EMAIL PROTECTED]; 'Keyser Soze' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 5:16 PM Subject: [PHP] Mcrypt Part2 What causes this error when apache is starting? # ./apachectl startssl Syntax error on line 238 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: libmcrypt.so.4: cannot open shared object file: No such file or directory ./apachectl startssl: httpd could not be started Libphp4.so does exist. Thanks Randy -- 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] ? include (http://www.myserver.de/page2.php); ?
You could try fopen()ing the contents that way. maybe exec() them? - Original Message - From: Dieter Stolpmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 3:18 PM Subject: [PHP] ? include (http://www.myserver.de/page2.php;); ? Hi, does anyone know, how to get the following line working an windows? ? include (http://www.myserver.de/page2.php;); ? I know, this way to access a remote file works on UNIX. I simply can't get it to work on window. Is there a patch/trick out, wich enables this? I tried it on windows with IIS and APACHE. Both attempts have failed. I need it, because I do develop most of my pages on a Win2k system, later, the pages gets published on a LINUX server. Thanks for your help Dieter -- 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] OT--.pdf file header info
Dear list, This is sort of off topic. I have been asked by a client to parse the header info of all the .pdf files in a directory to identify the dpi of images, files with imbedded fonts, etc. I have made a search of the Adobe site and of google and can't find any information about .pdf file headers. Can any one on the list point me to some resources? Kathleen -- 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] UPS and USPS shipping labels?
I know that both UPS and the USPS (US Postal Service) have servers that requests can be submitted to which return back formatted shipping labels. Does anyone know of any existing functions that work with either of these services? Thank you, Mark _ Get your FREE download of MSN Explorer at http://explorer.msn.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] Americart order manager
I have been hapily using americart for the last three years. I now have the need to expand upon the features that Americart provides. In particular I'm looking for an order manager that will take the Americart orders and enter them into a database for tracking the status of a customer's order. Also I'd be intersted in any other feature enhancements that people have created for Americart. Thank you, Mark _ Get your FREE download of MSN Explorer at http://explorer.msn.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] Re: poor HTML syntax crashing (!) netscape
I've had the same problem with Netscape, where it would crash/choke on any platform. I never figured it out, but it has something to do with Netscape choking on your HTML, it has nothing to do with CSS or Javascript or PHP for that matter. I'm not an IE fan, but lets face it, Netscape sucks. Tom Carter [EMAIL PROTECTED] wrote in message 02bb01c103fe$c51d1ac0$0a00a8c0@bjorn">news:02bb01c103fe$c51d1ac0$0a00a8c0@bjorn... Hi guys, I have an interesting situation at the moment... my (slightly sloppy) HTML is obviously missing a closing tag here or there but displays fine in opera, ie etc however when I try and view it netscape (4.x, windows, linux, any platform) netscape just nice and cleanly crashes!! If anyone knows of a bug which would cause netscape to do this then please let me know. The code in question is very dynamic (what I mean is that it can vary by quite a lot depending upon many many different things). Its qutie hard to debug, especially seeing as the page returned is browser specific.. the one thing I have ruled out is that it is JavaScript.. I removed all of that and no change. Any tips will be helpful... in the meanwhile I'm going to go thru all my functions to attempt to work out what is doing it *yawn* TIA Tom. -- 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] UPS and USPS shipping labels?
PHP has _a lot_ of functions, but not enough to cover shipping labels for UPS... ;-) You could either use fsockopen() to post the required data, or GD to make the labels yourself. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Mark Bean [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 5:44 PM Subject: [PHP] UPS and USPS shipping labels? | I know that both UPS and the USPS (US Postal Service) have servers that | requests can be submitted to which return back formatted shipping labels. | Does anyone know of any existing functions that work with either of these | services? | | Thank you, | Mark | _ | Get your FREE download of MSN Explorer at http://explorer.msn.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] Restoring a Dump File With PHP
Click on a database in the left column, and you should see a textarea/file combination. If the dump is small, you can just paste it in the textarea and hit submit. Otherwise, choose the file from your local hard drive and it'll upload it from your browser. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Chris Anderson [EMAIL PROTECTED] To: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 5:52 PM Subject: Re: [PHP] Restoring a Dump File With PHP | How can phpmyadmin restore from a dump file? | - Original Message - | From: Chris Lambert - WhiteCrown Networks [EMAIL PROTECTED] | To: Chris Anderson [EMAIL PROTECTED] | Cc: [EMAIL PROTECTED] | Sent: Saturday, July 07, 2001 4:44 PM | Subject: Re: [PHP] Restoring a Dump File With PHP | | | phpMyAdmin - www.phpwizard.net/ | | or... | | http://www.sitepointforums.com/showthread.php?postid=193539#post193539 | | /* Chris Lambert, CTO - [EMAIL PROTECTED] | WhiteCrown Networks - More Than White Hats | Web Application Security - www.whitecrown.net | */ | | - Original Message - | From: Chris Anderson [EMAIL PROTECTED] | To: [EMAIL PROTECTED] | Sent: Saturday, July 07, 2001 4:25 PM | Subject: [PHP] Restoring a Dump File With PHP | | | I created a MySQL dump file (.sql) and I wanted to use it to restore my | database. Unfortunately the manual (MySQL) only shows the command line | method: | mysql database file.sql | I tried this in PHP and it didn't work. Does anyone know how to load the | sql | file into the database through PHP? Thanks | | | -- 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] OT--.pdf file header info
Kathleen L. Ballard [EMAIL PROTECTED] wrote: Dear list, This is sort of off topic. I have been asked by a client to parse the header info of all the .pdf files in a directory to identify the dpi of images, files with imbedded fonts, etc. I have made a search of the Adobe site and of google and can't find any information about .pdf file headers. Can any one on the list point me to some resources? try the newsgroup: comp.text.pdf -- Henrik Hansen -- 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] mcrypt
Here is an error I get now when it is doing the make any ideas what is going on:? make[1]: Entering directory `/tmp/php-4.0.6' /bin/sh /tmp/php-4.0.6/libtool --silent --mode=link gcc -I. -I/tmp/php-4.0.6/ -I/tmp/php-4.0.6/main -I/tmp/php-4.0.6 -I/usr/loc al/apache/include -I/tmp/php-4.0.6/Zend -I/usr/local/include -I/tmp/php-4.0. 6/ext/mysql/libmysql -I/tmp/php-4.0.6/ext/xml/expat/xmltok -I/tmp/php-4.0.6/ ext/xml/expat/xmlparse -I/tmp/php-4.0.6/TSRM -DLINUX=2 -DMOD_SSL=207101 -DU SE_HSREGEX -DEAPI -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -o libphp4.la -rpath /tmp/php-4.0.6/libs -avoid-version -L/usr/local/lib -R /usr/local/lib stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/mcrypt/libmcrypt.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la ext/xml/libxml.la TSRM/libtsrm.la -lpam -ldl -lmcrypt -lltdl -lcrypt -lresolv -lm -ldl -lnsl - lresolv stub.lo: file not recognized: File truncated collect2: ld returned 1 exit status make[1]: *** [libphp4.la] Error 1 make[1]: Leaving directory `/tmp/php-4.0.6' make: *** [all-recursive] Error 1 -Original Message- From: Ben Bleything [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:36 PM To: 'Power Programmer'; [EMAIL PROTECTED]; 'Keyser Soze'; [EMAIL PROTECTED] Subject: RE: [PHP] mcrypt Have you made sure that the php on the command line and the php that apache is using are indeed the same one? It's possible that apache is looking at a module somewhere and that the php on the command line is the binary you built. Just a thought. Ben -Original Message- From: Power Programmer [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 12:29 PM To: [EMAIL PROTECTED]; Keyser Soze; [EMAIL PROTECTED] Subject: [PHP] mcrypt I have compiled PHP with mcrypt and it works fine if I run a script from the command line but through a browswer such as IE I get the following error: Fatal error: Call to undefined function: mcrypt_module_open() in /home/wheit/html/test.php on line 6 What do I need to do to be able to use these functions through a browser I use apache as a web server Randy -- 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] Running PHP as a cron job....
Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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]
RE: [PHP] Running PHP as a cron job....
How are you executing the script? Does it come by and run 'php yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in it? I've found that works well... just put that as the first line, and it behaves as a shell script (after you make it executable, of course) Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Running PHP as a cron job Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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] Running PHP as a cron job....
Hi Ben, When running it as a normal PHP file, I get the cron daemon emailing me stuff like: automation/mail.php: ?: No such file or directory automation/mail.php: =: command not found automation/mail.php: =: command not found automation/mail.php: line 7: syntax error near unexpected token `mail(emailaddress@takenout,' automation/mail.php: line 7: `mail(emailaddress@takenout, mail test, $mailcontent, $sender);' When running it with the Perl style line at the top (as you suggested) I get, no such file or directory. The script is Chmodded to 755 in both cases. And I saved it as a .php and .cgi file (with the root to bin/php in it). God knows what I'm doing wrong ;) James. How are you executing the script? Does it come by and run 'php yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in it? I've found that works well... just put that as the first line, and it behaves as a shell script (after you make it executable, of course) Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Running PHP as a cron job Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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] shared object not open (Solution ?)
Hi You all, after there was no solution in the mailing-lists and the news-group, I decided to go to the Linux-Tage in Stuttgart and not to leave the PHP booth until I have an answer: Here it is: That guy supposed that my problem has to do with the preconfigured apache from my SuSE-distribution and gave my to hints: 1. Try to configure PHP with the option --enable-rules=EAPI 2. fetch the apache-server from internet and install this one instead of SuSE's. No. 1 I tried and it works, as long as I do not include --with-informix. So I will have to try no.2 also. Martin Martin Schmidt wrote: I had ldconfig running several times (editing ld.so.conf in between by even changing the sequence in the ld.so.conf) but it doesn't help me. Thanks Martin Richard Lynch wrote: Try running ldconfig from your command line. I think you just run it and it does things, and it all then works... It's been ages since I did it though... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Martin Schmidt [EMAIL PROTECTED] Newsgroups: php.general Sent: Monday, June 25, 2001 4:14 PM Subject: [PHP] shared object not open Hi, I am just starting with PHP, I installed the new version on my Suse 7.1 with apache 1.3.14, because I need a tool for accessing databases (Informix/Oracle). Everything seemed fine, until I tried to start apache, it told me: Cannot load /usr/lib/apache/libphp4.so into server: shared object not open All my investigations showed me a very kind member of bug.php.net, who told someone else, that this isn't a bug and we should connect the mailing-lists. He generously had a hint : /etc/ld.so.conf and ldconfig. In the archive of the mailing lists I found the same informations ( a little bit more informative), but my ld.so.conf is o.k. and at this point any help stops. I hope, that someone found out what's happening here and helps me. So I have: Intel Celreon 366 on Asus Mainboard, 256 MB RAM, Adaptec 2940UW with all together 20GB HD, 5 swap-Areas with 128MB each. SuSE 7.1 Prof-Edition, from this distribution I installed apache and PHP (everything working fine, but no idea how to activate informix/oracle-support) Apache says, PHP4-module installed. Thanks a lot for any help Martin Schmidt -- 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] Running PHP as a cron job....
Make sure the code is like: #!/usr/local/bin/php -q ?php ...code... ? (obviously the location of php may be different, but the above works for me, I'm running a daily e-mail batch from a PHP script via cron) Make sure you chmod ug+x it. -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 6:57 PM To: Ben Bleything; [EMAIL PROTECTED] Subject: Re: [PHP] Running PHP as a cron job Hi Ben, When running it as a normal PHP file, I get the cron daemon emailing me stuff like: automation/mail.php: ?: No such file or directory automation/mail.php: =: command not found automation/mail.php: =: command not found automation/mail.php: line 7: syntax error near unexpected token `mail(emailaddress@takenout,' automation/mail.php: line 7: `mail(emailaddress@takenout, mail test, $mailcontent, $sender);' When running it with the Perl style line at the top (as you suggested) I get, no such file or directory. The script is Chmodded to 755 in both cases. And I saved it as a .php and .cgi file (with the root to bin/php in it). God knows what I'm doing wrong ;) James. How are you executing the script? Does it come by and run 'php yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in it? I've found that works well... just put that as the first line, and it behaves as a shell script (after you make it executable, of course) Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Running PHP as a cron job Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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] -- 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] Running PHP as a cron job....
Otay... So, to get the shebang right, you need to know the path to the php binary... it may not be where I said it was... You probably already figured that out. You will also need to set it executable. It looks, from what you sent, that crond is interpreting the php file (and not having much luck) So... I'm not extremely familiar with cron, so, let me guess a little... in your /etc/cron.hourly (or whatever) directory, you've got this script, right? My guess would be, if you 'chmod +x file' on this, with the shebang (with proper path) it will work. Let me know, Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:57 PM To: Ben Bleything; [EMAIL PROTECTED] Subject: Re: [PHP] Running PHP as a cron job Hi Ben, When running it as a normal PHP file, I get the cron daemon emailing me stuff like: automation/mail.php: ?: No such file or directory automation/mail.php: =: command not found automation/mail.php: =: command not found automation/mail.php: line 7: syntax error near unexpected token `mail(emailaddress@takenout,' automation/mail.php: line 7: `mail(emailaddress@takenout, mail test, $mailcontent, $sender);' When running it with the Perl style line at the top (as you suggested) I get, no such file or directory. The script is Chmodded to 755 in both cases. And I saved it as a .php and .cgi file (with the root to bin/php in it). God knows what I'm doing wrong ;) James. How are you executing the script? Does it come by and run 'php yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in it? I've found that works well... just put that as the first line, and it behaves as a shell script (after you make it executable, of course) Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Running PHP as a cron job Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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] -- 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 with custom session handler
Hello Aral, On 30-Jun-01 13:05:40, you wrote: I'm writing a custom session handler that saves sessions using Manuel Lemos' excellent Metabase library. The problem is, although I've got the session_set_save_handler function pointing to the correct start, end, read, write, destroy and garbage collection functions, when I call session_start and session_register, the write function does not get called (the only function that gets called is the read function.) There is a serious bug in PHP that seems to lead to inconsistent handling of memory allocation that affects code that uses functions like strtok from inside session handler functions. A new version of Metabase that does not use strtok was uploaded to the PHP Classes site. Everybody that uses Metabase for session handling is encouraged to download this version because PHP trashes the memory and eventually crashes you Web server when the strtok function is used. http://phpclasses.UpperDesign.com/browse.html/package/20 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- 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] Running PHP as a cron job....
On 08-Jul-01 James, Yz wrote: Hi Ben, When running it as a normal PHP file, I get the cron daemon emailing me stuff like: automation/mail.php: ?: No such file or directory automation/mail.php: =: command not found automation/mail.php: =: command not found automation/mail.php: line 7: syntax error near unexpected token `mail(emailaddress@takenout,' automation/mail.php: line 7: `mail(emailaddress@takenout, mail test, $mailcontent, $sender);' try a wrapper When running it with the Perl style line at the top (as you suggested) I get, no such file or directory. The script is Chmodded to 755 in both cases. And I saved it as a .php and .cgi file (with the root to bin/php in it). God knows what I'm doing wrong ;) James. How are you executing the script? Does it come by and run 'php yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in it? I've found that works well... just put that as the first line, and it behaves as a shell script (after you make it executable, of course) Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Running PHP as a cron job Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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] -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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 with custom session handler
There is a serious bug in PHP that seems to lead to inconsistent handling of memory allocation that affects code that uses functions like strtok from inside session handler functions. That is a *very* inaccurate description. It affects only session handler functions which are called during the request shutdown (write, close). It does not affect the other four handlers. Second, it is not a general problem with memory allocations. Strtok just assumed that it would not be called after request shutdown. The attached patch should fix that. - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg Index: basic_functions.c === RCS file: /repository/php4/ext/standard/basic_functions.c,v retrieving revision 1.355 diff -u -r1.355 basic_functions.c --- basic_functions.c 2001/07/04 10:10:29 1.355 +++ basic_functions.c 2001/07/08 23:09:25 @@ -885,6 +885,7 @@ BLS_FETCH(); STR_FREE(BG(strtok_string)); + BG(strtok_string) = NULL; #ifdef HAVE_PUTENV zend_hash_destroy(BG(putenv_ht)); #endif -- 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] Running PHP as a cron job....
Check the path to your php cgi executable - which php - you'll probably find that it's #!/usr/local/bin/php This is what the no such file or directory is referring to. Chris Don Read wrote: On 08-Jul-01 James, Yz wrote: Hi Ben, When running it as a normal PHP file, I get the cron daemon emailing me stuff like: automation/mail.php: ?: No such file or directory automation/mail.php: =: command not found automation/mail.php: =: command not found automation/mail.php: line 7: syntax error near unexpected token `mail(emailaddress@takenout,' automation/mail.php: line 7: `mail(emailaddress@takenout, mail test, $mailcontent, $sender);' try a wrapper When running it with the Perl style line at the top (as you suggested) I get, no such file or directory. The script is Chmodded to 755 in both cases. And I saved it as a .php and .cgi file (with the root to bin/php in it). God knows what I'm doing wrong ;) James. How are you executing the script? Does it come by and run 'php yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in it? I've found that works well... just put that as the first line, and it behaves as a shell script (after you make it executable, of course) Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Running PHP as a cron job Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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] -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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] -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed. -- 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] High Ascii chars---thanks
Thanks for your help people, I appreciate it rm __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.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]
Re: [PHP] Running PHP as a cron job....
This looks like a good place for me to step in and maybe clear up something I've been wondering about ... With all the advice that has been offered so far, has it been assumed that php is installed in the CGI rather than DSO manner? Can PHP as a DSO interpret shell script-like files with a shebang at the top? Alternatively, I've read somewhere about using lynx to run a .php cron job. Does this apply to DSO setups? For example, would James put something like this in his crontab: * * * * lynx mail.php TIA Mick On Mon, 9 Jul 2001, Chris Fry wrote: Check the path to your php cgi executable - which php - you'll probably find that it's #!/usr/local/bin/php This is what the no such file or directory is referring to. Chris Don Read wrote: On 08-Jul-01 James, Yz wrote: Hi Ben, When running it as a normal PHP file, I get the cron daemon emailing me stuff like: automation/mail.php: ?: No such file or directory automation/mail.php: =: command not found automation/mail.php: =: command not found automation/mail.php: line 7: syntax error near unexpected token `mail(emailaddress@takenout,' automation/mail.php: line 7: `mail(emailaddress@takenout, mail test, $mailcontent, $sender);' try a wrapper When running it with the Perl style line at the top (as you suggested) I get, no such file or directory. The script is Chmodded to 755 in both cases. And I saved it as a .php and .cgi file (with the root to bin/php in it). God knows what I'm doing wrong ;) James. How are you executing the script? Does it come by and run 'php yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in it? I've found that works well... just put that as the first line, and it behaves as a shell script (after you make it executable, of course) Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Running PHP as a cron job Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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] -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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] -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP
RE: [PHP] Running PHP as a cron job....
Interesting method, with the lynx... I imagine that if you've only built the DSO, then that would be the way to do it.. if it worked. My guess would be, you would have to do lynx 'http://localhost/path/to/script/script.php' to force it to go through the server. TO be totally honest with you, I'm too lazy to learn bash scripting, so I've been using php (it's fast and easy and does everything I need! Honest!) so when I build a new version of php, I make both... =P ANYWAY, thanks for clarifying... I think we all had been assuming = Ben -Original Message- From: Michael Hall [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:16 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Running PHP as a cron job This looks like a good place for me to step in and maybe clear up something I've been wondering about ... With all the advice that has been offered so far, has it been assumed that php is installed in the CGI rather than DSO manner? Can PHP as a DSO interpret shell script-like files with a shebang at the top? Alternatively, I've read somewhere about using lynx to run a .php cron job. Does this apply to DSO setups? For example, would James put something like this in his crontab: * * * * lynx mail.php TIA Mick On Mon, 9 Jul 2001, Chris Fry wrote: Check the path to your php cgi executable - which php - you'll probably find that it's #!/usr/local/bin/php This is what the no such file or directory is referring to. Chris Don Read wrote: On 08-Jul-01 James, Yz wrote: Hi Ben, When running it as a normal PHP file, I get the cron daemon emailing me stuff like: automation/mail.php: ?: No such file or directory automation/mail.php: =: command not found automation/mail.php: =: command not found automation/mail.php: line 7: syntax error near unexpected token `mail(emailaddress@takenout,' automation/mail.php: line 7: `mail(emailaddress@takenout, mail test, $mailcontent, $sender);' try a wrapper When running it with the Perl style line at the top (as you suggested) I get, no such file or directory. The script is Chmodded to 755 in both cases. And I saved it as a .php and .cgi file (with the root to bin/php in it). God knows what I'm doing wrong ;) James. How are you executing the script? Does it come by and run 'php yourscript.php' or does the script have a shebang ('#!/usr/bin/php') in it? I've found that works well... just put that as the first line, and it behaves as a shell script (after you make it executable, of course) Ben -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 3:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Running PHP as a cron job Hi all, This is probably going to sound incoherant, but Do I have to do anything (other than change the permissions of a php file) to get it to run as part of a cron job? I created an extremely simple file that should just send a blank email to me (using mail()). I got an email from the cron daemon saying, bad token, or something like that, yet when executed through a browser, the script behaves as it should. Do I have to write the php scripts differently to how I would if they were to be displayed in a browser? Neeed...Slp ;) Cheers, 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] -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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] -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you