[PHP] easy CMS
Hi! sorry for my impudence :) But may be you will be interesting in not cool CMS :) - elementalSiteMaker I have made it in Object-Oriented style, i.e. more interesting are code-inside :) http://www.elemental-sm.by.ru Thanks Ilya ps: I had some troubles with generalization (may needed new PHP4.3)... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Redirecting to PHP
Alberto Brea wrote: Dear list, My home page is index.html, that doesn't run PHP. I also have index.php which shows the same content with PHP. Can I do to automatically redirect a visitor from index.html to index.php? TIA Alberto maybe you should just delete index.html, and index.php will be your home page if not then apache httpd.conf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] testing for negative numbers
I realize this should be about the simplest thing in the world to do, but for this reason or that it's not working... I'm using PHP version 4.2.3 Whether I have a negative number in an array, for example: $myArray[ID] = -2 Or the number comes from the database, for example: $row[id] = -2 I cannot get this simple operation to work: if ($row[id] 0) Instead, positive or negative, it seems to think this expression is always true: if ($row[id] 0) It's like it takes the absolute value of the number (whether the number is 2 or -2, it thinks it is 2) I've tried many things, including type casting using (int) in front of the expression. Nothing has worked. Any ideas why in the world this is happening? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] testing for negative numbers
Please provide a complete test script. Are you perhaps not realizing that array indices along with all variables in PHP are case sensitive? $row[ID] and $row[id] are not the same thing. The trivial test of your example: $myArray[id] = -2; if ($myArray[id] 0) echo Negative; else echo Positive; Prints Negative as expected. -Rasmus On Thu, 6 Feb 2003, Robert Samuel White wrote: I realize this should be about the simplest thing in the world to do, but for this reason or that it's not working... I'm using PHP version 4.2.3 Whether I have a negative number in an array, for example: $myArray[ID] = -2 Or the number comes from the database, for example: $row[id] = -2 I cannot get this simple operation to work: if ($row[id] 0) Instead, positive or negative, it seems to think this expression is always true: if ($row[id] 0) It's like it takes the absolute value of the number (whether the number is 2 or -2, it thinks it is 2) I've tried many things, including type casting using (int) in front of the expression. Nothing has worked. Any ideas why in the world this is happening? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] testing for negative numbers
Hi Rasmus: Yes, I'm totally aware of case sensitivity...and basically the script you wrote here is exactly what I'm trying to doing. This is a problem I've been having with several scripts...always when the number is negative. I've also echoed my variables just to make sure they are in fact negative numbers. This is an odd thing I've been dealing with for a while now. This only happens when the value is negative. But anyway, here's the part of the script I'm encountering the problem at: $result = $Database-Query(SELECT * FROM .DBT__MATRIX_STRUCTURE_CONTENT. WHERE content_id = '.$tmpParentId.'); while ($row = $Database-FetchArray($result)) { $tmpArray[$tmpCount][ID-PARENT] = $row[parent_id]; $tmpArray[$tmpCount][ID-DIR]= $row[dir_id]; $tmpArray[$tmpCount][TYPE] = $row[content_type]; $tmpArray[$tmpCount][FILE] = $row[content_file]; $tmpArray[$tmpCount][TITLE] = $row[content_title]; $tmpArray[$tmpCount][VERSION] = $row[content_version]; if ($row[dir_id] 0) { $resultc = $Database-Query(SELECT * FROM .DBT__MATRIX_STRUCTURE_DIR. WHERE dir_id = '.$row[dir_id].'); while ($rowc = $Database-FetchArray($resultc)) { $tmpArray[$tmpCount][PATH] = $rowc[dir_path]; } $Database-FreeResult($resultc); } if ((int)$row[dir_id] 0) { $resultc = $Database-Query(SELECT * FROM .DBT__MATRIX_STRUCTURE_ROUTES. WHERE dir_id = '.$row[dir_id].'); while ($rowc = $Database-FetchArray($resultc)) { $tmpArray[$tmpCount][ALIAS] = $rowc[dir_alias]; $tmpArray[$tmpCount][PATH] = $rowc[dir_path]; echo xxx; exit(); } $Database-FreeResult($resultc); } Rasmus Lerdorf wrote: Please provide a complete test script. Are you perhaps not realizing that array indices along with all variables in PHP are case sensitive? $row[ID] and $row[id] are not the same thing. The trivial test of your example: $myArray[id] = -2; if ($myArray[id] 0) echo Negative; else echo Positive; Prints Negative as expected. -Rasmus On Thu, 6 Feb 2003, Robert Samuel White wrote: I realize this should be about the simplest thing in the world to do, but for this reason or that it's not working... I'm using PHP version 4.2.3 Whether I have a negative number in an array, for example: $myArray[ID] = -2 Or the number comes from the database, for example: $row[id] = -2 I cannot get this simple operation to work: if ($row[id] 0) Instead, positive or negative, it seems to think this expression is always true: if ($row[id] 0) It's like it takes the absolute value of the number (whether the number is 2 or -2, it thinks it is 2) I've tried many things, including type casting using (int) in front of the expression. Nothing has worked. Any ideas why in the world this is happening? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] testing for negative numbers
Well, I just tried your test script and that works just as it should, so I must be having some other issue. But that still doesn't explain why I can print out the results of $row[dir_id] and it shows it being -2, yet my script (as printed in the last email) never makes it to the correct conditional statement. Rasmus Lerdorf wrote: Please provide a complete test script. Are you perhaps not realizing that array indices along with all variables in PHP are case sensitive? $row[ID] and $row[id] are not the same thing. The trivial test of your example: $myArray[id] = -2; if ($myArray[id] 0) echo Negative; else echo Positive; Prints Negative as expected. -Rasmus On Thu, 6 Feb 2003, Robert Samuel White wrote: I realize this should be about the simplest thing in the world to do, but for this reason or that it's not working... I'm using PHP version 4.2.3 Whether I have a negative number in an array, for example: $myArray[ID] = -2 Or the number comes from the database, for example: $row[id] = -2 I cannot get this simple operation to work: if ($row[id] 0) Instead, positive or negative, it seems to think this expression is always true: if ($row[id] 0) It's like it takes the absolute value of the number (whether the number is 2 or -2, it thinks it is 2) I've tried many things, including type casting using (int) in front of the expression. Nothing has worked. Any ideas why in the world this is happening? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] testing for negative numbers
Is it possible that the value is actually -2 (with the space)? Robert Samuel White wrote: Well, I just tried your test script and that works just as it should, so I must be having some other issue. But that still doesn't explain why I can print out the results of $row[dir_id] and it shows it being -2, yet my script (as printed in the last email) never makes it to the correct conditional statement. Rasmus Lerdorf wrote: Please provide a complete test script. Are you perhaps not realizing that array indices along with all variables in PHP are case sensitive? $row[ID] and $row[id] are not the same thing. The trivial test of your example: $myArray[id] = -2; if ($myArray[id] 0) echo Negative; else echo Positive; Prints Negative as expected. -Rasmus On Thu, 6 Feb 2003, Robert Samuel White wrote: I realize this should be about the simplest thing in the world to do, but for this reason or that it's not working... I'm using PHP version 4.2.3 Whether I have a negative number in an array, for example: $myArray[ID] = -2 Or the number comes from the database, for example: $row[id] = -2 I cannot get this simple operation to work: if ($row[id] 0) Instead, positive or negative, it seems to think this expression is always true: if ($row[id] 0) It's like it takes the absolute value of the number (whether the number is 2 or -2, it thinks it is 2) I've tried many things, including type casting using (int) in front of the expression. Nothing has worked. Any ideas why in the world this is happening? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] testing for negative numbers
Okay, I'm an idiot. It *was* making it to the statement, but the row_id in the table matrix_structure_routes are actually positive numbers, so when it gets to that point I need to use the absolute value. The reason for using the negative and postive counterparts are to determine which type of directory it is (and therefore which table the meta information is stored in). Stupid me for not catching that first! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] compiling php 4.3.0 with gd
I am trying to compile PHP 4.3.0 with GD and also with-png,with-jpg and with-freetype. I have installed both png and jpg from a tar file but know mater what I do PHP configure stops with and error. here is the error I keep getting. checking for GD support... yes checking for the location of libjpeg... yes checking for the location of libpng... yes checking for the location of libXpm... yes checking for FreeType 1.x support... yes checking for FreeType 2... yes checking for T1lib support... yes checking whether to enable truetype string function in GD... yes checking for fabsf... yes checking for floorf... yes configure: error: libjpeg.(a|so) not found. Can somebody give me the step to get this to work below is my compleat configuration. ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --with-gettext=/usr --enable-safe-mode --with-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable-magic-quotes --with-regex=system --with-ttf --with-gdbm --enable-mbstring --enable-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --enable-mm=shared --enable-xml --enable-ftp --disable-debug --with-libdir=/usr/lib --with-dba --with-interbase=shared --with-ldap --with-pdflib=shared --with-xml --with-readline --with-mysql=/usr/ --with-curl=/usr/bin/ --enable-sockets --enable-ftp --with-gdbm --with-pgsql=/usr/ --with-mhash --with-zip=/usr/local/lib/ --with-gd --with-freetype-dir=/usr --enable-gd-native-ttf --enable-gd-imgstrttf --with-jpeg-dir=/usr/local/bin --with-png-dir=/usr/local/bin -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] compiling php 4.3.0 with gd
On Thursday 06 February 2003 17:47, [EMAIL PROTECTED] wrote: I am trying to compile PHP 4.3.0 with GD and also with-png,with-jpg and with-freetype. I have installed both png and jpg from a tar file but know mater what I do PHP configure stops with and error. here is the error I keep getting. configure: error: libjpeg.(a|so) not found. It's telling you that it cannot find libjpeg.a or libjpeg.so. Use find / -name libjpeg.a and find / -name libjpeg.so to find out where they are hiding. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* It may be that your whole purpose in life is simply to serve as a warning to others. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] compiling php 4.3.0 with gd
This one time, at band camp, [EMAIL PROTECTED] wrote: configure: error: libjpeg.(a|so) not found. Install libjpeg Kevin -- __ (_ \ _) ) | / / _ ) / _ | / ___) / _ ) | | ( (/ / ( ( | |( (___ ( (/ / |_| \) \_||_| \) \) Kevin Waterson Port Macquarie, Australia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] compiling php 4.3.0 with gd
Hello Jason, I know that is what it means and I do know where libjpeg.so and libjpeg.a are on the server. I also have pointed the configuration to where they are with this --with-jpeg-dir=/usr/local/bin but no mater what I do it still can not find them.and keeps giving me the error configure: error: libjpeg.(a|so) not found Thursday, February 6, 2003, 1:52:44 AM, you wrote: JW On Thursday 06 February 2003 17:47, [EMAIL PROTECTED] wrote: I am trying to compile PHP 4.3.0 with GD and also with-png,with-jpg and with-freetype. I have installed both png and jpg from a tar file but know mater what I do PHP configure stops with and error. here is the error I keep getting. configure: error: libjpeg.(a|so) not found. JW It's telling you that it cannot find libjpeg.a or libjpeg.so. JW Use find / -name libjpeg.a and find / -name libjpeg.so to find out where JW they are hiding. JW -- Jason Wong - Gremlins Associates - www.gremlins.biz JW Open Source Software Systems Integrators JW * Web Design Hosting * Internet Intranet Applications Development * JW -- JW Search the list archives before you post JW http://marc.theaimsgroup.com/?l=php-general JW -- JW /* JW It may be that your whole purpose in life is simply to serve as a JW warning to others. JW */ -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] restricting acces to files
Hi, i've written a secure PHP login script which will allow users to login to a directory such as this: smezone.com/members/index.php however, how do I restrict people from accessing HTML files in that directory (which they can easily do so by typing the URL into their browser), such as: smezone.com/members/document1.html ? Since its a regular HTML files (and we have lots), I can't check whether the user has a valid session as I would do in a PHP file. Thanks for any help! Shams -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] compiling php 4.3.0 with gd
Hello Kevin, It is installed from a tar file Thursday, February 6, 2003, 2:12:15 AM, you wrote: KW This one time, at band camp, KW [EMAIL PROTECTED] wrote: configure: error: libjpeg.(a|so) not found. KW Install libjpeg KW Kevin KW -- KW __ KW (_ \ KW _) ) KW | / / _ ) / _ | / ___) / _ ) KW | | ( (/ / ( ( | |( (___ ( (/ / KW |_| \) \_||_| \) \) KW Kevin Waterson KW Port Macquarie, Australia -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] compiling php 4.3.0 with gd
I know that is what it means and I do know where libjpeg.so and libjpeg.a are on the server. I also have pointed the configuration to where they are with this --with-jpeg-dir=/usr/local/bin but no mater what I do it still can not find them.and keeps giving me the error configure: error: libjpeg.(a|so) not found Somehow I doubt your jpeg library is somewhere under /usr/local/bin -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] compiling php 4.3.0 with gd
On Thursday 06 February 2003 18:15, [EMAIL PROTECTED] wrote: I know that is what it means and I do know where libjpeg.so and libjpeg.a are on the server. I also have pointed the configuration to where they are with this --with-jpeg-dir=/usr/local/bin but no mater what I do it still can not find them.and keeps giving me the error configure: error: libjpeg.(a|so) not found OK, so what is the full path to your libjpeg.* ? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* How can you have any pudding if you don't eat your meat? -- Pink Floyd */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] restricting acces to files
On Thursday 06 February 2003 18:09, Shams wrote: i've written a secure PHP login script which will allow users to login to a directory such as this: smezone.com/members/index.php however, how do I restrict people from accessing HTML files in that directory (which they can easily do so by typing the URL into their browser), such as: smezone.com/members/document1.html ? Since its a regular HTML files (and we have lots), I can't check whether the user has a valid session as I would do in a PHP file. Perhaps instead of posting and reposting the same question, you should spend the time looking at the archives where this question has been answered and discussed many times before -- the most recent being earlier this week. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* There is always one thing to remember: writers are always selling somebody out. -- Joan Didion, Slouching Towards Bethlehem */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[4]: [PHP] compiling php 4.3.0 with gd
Hello Jason, /usr/lib/libjpeg.so Thursday, February 6, 2003, 2:19:36 AM, you wrote: JW On Thursday 06 February 2003 18:15, [EMAIL PROTECTED] wrote: I know that is what it means and I do know where libjpeg.so and libjpeg.a are on the server. I also have pointed the configuration to where they are with this --with-jpeg-dir=/usr/local/bin but no mater what I do it still can not find them.and keeps giving me the error configure: error: libjpeg.(a|so) not found JW OK, so what is the full path to your libjpeg.* ? JW -- Jason Wong - Gremlins Associates - www.gremlins.biz JW Open Source Software Systems Integrators JW * Web Design Hosting * Internet Intranet Applications Development * JW -- JW Search the list archives before you post JW http://marc.theaimsgroup.com/?l=php-general JW -- JW /* JW How can you have any pudding if you don't eat your meat? JW -- Pink Floyd JW */ -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[4]: [PHP] compiling php 4.3.0 with gd
On Thursday 06 February 2003 18:37, [EMAIL PROTECTED] wrote: /usr/lib/libjpeg.so Then use: --with-jpeg-dir=/usr -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The chain which can be yanked is not the eternal chain. -- G. Fitch */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[6]: [PHP] compiling php 4.3.0 with gd
Hello Jason, That worked an got me through the configuration but now after doing a make I get this error. What do I do to fix this. /gd_jpeg.c -o ext/gd/libgd/gd_jpeg.lo /home/tmp/php-4.3.0/ext/gd/libgd/gd_jpeg.c:34: jpeglib.h: No such file or directory /home/tmp/php-4.3.0/ext/gd/libgd/gd_jpeg.c:35: jerror.h: No such file or directory /home/tmp/php-4.3.0/ext/gd/libgd/gd_jpeg.c:240: #error IJG JPEG library BITS_IN_JSAMPLE value must be 8 or 12 make: *** [ext/gd/libgd/gd_jpeg.lo] Error 1 Thursday, February 6, 2003, 2:35:11 AM, you wrote: JW On Thursday 06 February 2003 18:37, [EMAIL PROTECTED] wrote: /usr/lib/libjpeg.so JW Then use: JW --with-jpeg-dir=/usr JW -- Jason Wong - Gremlins Associates - www.gremlins.biz JW Open Source Software Systems Integrators JW * Web Design Hosting * Internet Intranet Applications Development * JW -- JW Search the list archives before you post JW http://marc.theaimsgroup.com/?l=php-general JW -- JW /* JW The chain which can be yanked is not the eternal chain. JW -- G. Fitch JW */ -- Best regards, rdkurthmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re-passing array varibles
I have a quite complex search form where I have multi select drop down menu..the form can be seen at http://www.bangladeshimatch.com/advance_search.php. I can pass the array variables from the form to another page to process the form without any problem, but when I try to pass the same array variables to the same page into a function for record navigation purposes I have problem, I tried to put the variables into sessions and it seemed worked fine on my local systems but not on the live site. I was wondering if someone came across same problem and how it was solved? Thanks in advance.. Awlad
Re: Re[6]: [PHP] compiling php 4.3.0 with gd
On Thursday 06 February 2003 19:15, [EMAIL PROTECTED] wrote: That worked an got me through the configuration but now after doing a make I get this error. What do I do to fix this. /gd_jpeg.c -o ext/gd/libgd/gd_jpeg.lo /home/tmp/php-4.3.0/ext/gd/libgd/gd_jpeg.c:34: jpeglib.h: No such file or directory /home/tmp/php-4.3.0/ext/gd/libgd/gd_jpeg.c:35: jerror.h: No such file or directory And where are those files hiding? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Children are like cats, they can tell when you don't like them. That's when they come over and violate your body space. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Decoding Base64
Hello all, I'm trying to convert some images held as base64-encoded text files back into images, using a form to paste the text into, but having no luck. I can't tell whether the decoding is failing or whether I'm unable to output the final image. I'm sending the correct headers through, that much I know, but there's no output. Anyone else written something similar? Many Thanks, Vish -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re-passing array varibles
On Thursday 06 February 2003 19:26, PHP wrote: I have a quite complex search form where I have multi select drop down menu..the form can be seen at http://www.bangladeshimatch.com/advance_search.php. I can pass the array variables from the form to another page to process the form without any problem, but when I try to pass the same array variables to the same page into a function for record navigation purposes I have problem, I tried to put the variables into sessions and it seemed worked fine on my local systems but not on the live site. I was wondering if someone came across same problem and how it was solved? Please post your code. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* They also surf who only stand on waves. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Call to undefined function: imagetypes()
Dear Supportteam Im Runing a Apache Webserver under Debian sid (testing). I've installed PHP Version 4.1.2. Now I would like to create a Webalbum, but my Server doesn't know the funktion imagetypes. He gives me the Error-message: Call to undefined function: imagetypes(). I found the same Error on you messageboard, and their I found your E-mail adress. Could you help me, I'm a beginner in Linux and PHP. phpinfo() and Errormessage: http://www.e-women.ch/growcenter/picalbum/picture1.php With kind regards Stefan Vogel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WYSIWYG Content Management system?
I am working on such a CMS right yet. I want to implement infinitly Language Support and an Wordpad like HTML Editor which allows you to chose basic design tem- plates and lets you upload some images. I want to build an extraordinary Usermanagement, where you can write parts of an Text while somebody else is writing on another Part of the same text maybe in different language at the same Time. When you wrote a text you can chose between your mates for let them make the translation based on userprofiles every web- content admin has to fill out. And a lota more things, but right now i dont have very much time, I have to build a small shop inbetween. But the Multilanguage sup- port ist basically finished. But I may say some more, have you ever read about the execCommand in IE (Internet Explorer)? You can build an fully working wysiwyg HTML Editor with these commands. I'm going to send you a nice example after- wards Hardik. Maybe somebody wants to help me with the CMS System. I dont really like the Design of PHPNuke and I want to build an even more professional Article Management than it is developed in phpnuke. See Ya Sascha - Original Message - From: Hardik Doshi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 05, 2003 3:32 PM Subject: Re: [PHP] WYSIWYG Content Management system? Hey Jason, I am looking for the same. Do you have or any one in this list has any idea? Please let me know. thanks Hardik Jason Wong [EMAIL PROTECTED] wrote:On Wednesday 05 February 2003 09:43, J J wrote: I've seen CMS systems like phpnuke but it's kind of overkill for what I need and almost more news like. I'm looking for something that would allow the user to change content, change/upload images, all in a wysiwyg style so it's easy to see and use. It'd be cool to be able to login to the admin area, select a page to edit, and it would allow you to preview the page just like it looks. Then you click on a text area or image you want to update. Is there a CMS that allows for WYSIWYG like editing but will work within specified headers/footers, style sheets, etc? Then the site content would all be generated on the fly from php/mysql. All the major/popular ones would/should have been registered at freshmeat and soureforge so check them out. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* You're already carrying the sphere! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Client Side PHP
Has any one ever considered creating browser / client-side php to replace Javascript and vb?? One language across the whole web ;-) Posted this question in the evangelism so I'd be interested in more reaction: Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Scripting language in PHP?
Out of pure boredom, I'm considering writing a simple scripting language in PHP. Has anything like this been done before? Any open-source projects I should look at? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] PHP Database Abstraction Layer
Luke Woollard [EMAIL PROTECTED] wrote... : I once read a great article in the first or second issue of http://www.phparch.com/ on database abstraction layers. At which point I used the tutorial as a starting point for creating a very similar structure I named dbWave. There are only minor differences and a postgresql driver is now included for the most common pg_* functions. I was just wondering if anyone has developed a database abstraction layer that allows you to separate your SQL queries from your application logic like dbWave does? I'm looking for a more advanced way of doing this? Attached is dbWave for anyone to look at/use. To run it you need to use the following tags in your file: // DBWave include files include( [attached_filename].php ); To instantiate the dbWave object you use the following code in a file name connect.php ?php /* This file instantiates dbWave using our chosen API */ /* It is automatically generated by the database setup program */ // Instantiate dbWave using the MySQL API $dbWave = new Mysql(); // Connect to the database $dbWave-connect( 'yourhost', 'yourport', 'yourdbname', 'yourdbuser', 'yourdbpass' ); ? ZoomStats uses it: http://sf.net/projects/zoomstats P.S: I wrote that phparch article, and I based it on my ZoomStats experoence which I also founded. -- Maxim Maletsky [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: counter freezes whole site!
Pag wrote: Hi, I am having a serious problem on my site. It was working fine until a day ago, when it simply freezes. After i made a few checks i realized it loops on this code. I tried everything but i cant understand why and i am going crazy trying to figure it out! This code is supposed to write a 24h cookie at first visit, and then checks for it at every refresh, if the cookie doesnt exist, it increases a counter on the DB. Simple, right? Then why did it stop working out of the blue? It loops on the refresh, keeps thinking the cookie is not active, so it keeps adding +1 to the counter. What am i doing wrong? How can i fix it? oh, this code is right at the top of my main page. Thanks! ### ? if ($_COOKIE['pvisita'] == '1') { break; } else { include ('databaseinfo.txt'); $ligacao=mysql_connect($h, $u, $p) or die(Erro ao aceder a MySQL); @mysql_select_db($DBname) or die(Unable to select database . $DBname); $resultado = mysql_query (select * from counttable where id='0'); if ($resultado) { $registo = mysql_fetch_array($resultado); $id = $registo[ID]; $contador = $registo[contador]; $contador = $contador + 1; $resultado2 = mysql_query (update counttable set contador='$contador' where id='0'); setcookie(pvisita, 1, time() + 86400); header(Location: .$_COOKIE['pvisita']); die; // or exit; = same thing }else{ print (não há registos); break; } } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Client Side PHP
I am doing now ;) How would you guys like the idea, though? -- Maxim Maletsky [EMAIL PROTECTED] Pete [EMAIL PROTECTED] wrote... : Has any one ever considered creating browser / client-side php to replace Javascript and vb?? One language across the whole web ;-) Posted this question in the evangelism so I'd be interested in more reaction: Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] POP3 ... syntax error
I'm aware it's not a PHP problem, I was trying to be nice by helping figure out what the problem was in his raw communication. On Wed, 2003-02-05 at 15:24, Jason Wong wrote: On Wednesday 05 February 2003 23:32, Adam Voigt wrote: How about some code? On Wed, 2003-02-05 at 10:21, Christian Ista wrote: Hello, I'm trying to access pop3 server via PHP code. I can establish the connection, send the USER command (I receive the +OK answer). After that I sent the PASS command but I receive the answer -ERR syntax error. I don't understand why syntax error. Do you have an idea ? No need for code, it's not a php problem. Google for pop3 commands to find out how to talk to pop3 servers. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The Beatles: Paul McCartney's old back-up band. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc signature.asc Description: This is a digitally signed message part
Re: [PHP] Client Side PHP
One language across the whole web In a word: JAVA Has the cross-platform flexability of PHP with a little more versitility and power under the hood. Of course PHP still has its niche, but I'm still waiting to go to an ecommerce page that fires up and interactive store applet on the client side and streams sales information via XML, so I can really shop from my desktop. I am doing now ;) How would you guys like the idea, though? -- Maxim Maletsky [EMAIL PROTECTED] Pete [EMAIL PROTECTED] wrote... : Has any one ever considered creating browser / client-side php to replace Javascript and vb?? One language across the whole web ;-) Posted this question in the evangelism so I'd be interested in more reaction: Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session id
Ok, I am sure this has been discussed but I have not been keeping up with the listserv. I am using sessions so to test, I blocked all cookies and of course the sessionid is then in the url. How can I hide it from the url?...or is this even possible? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating an Array from a Recordset
I'm trying to create an array from a rocordset that will do somethingt like this: $datay=array(12,8,19,3,10,5,55,88,3); the following is the code I have attempted to create, which is not working: do { $dat = ($row_rsCOUNTRY['CountryCount'] , $row_rsCOUNTRY['CountryCount']); } while ($row_rsCOUNTRY = mysql_fetch_assoc($rsCOUNTRY)); $datay=array($dat); Can anyone help? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] session id
-Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: 06 February 2003 13:56 To: Php-General@Lists. Php. Net Subject: [PHP] session id Ok, I am sure this has been discussed but I have not been keeping up with the listserv. I am using sessions so to test, I blocked all cookies and of course the sessionid is then in the url. How can I hide it from the url?...or is this even possible? Thanks, Eddie If you disable session.use_trans_sid in your php.ini then session id's will not get passed via the url if cookies are being refused. But then of course your session support is gone for that particular browser/user. Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Config problems
Been using PHP for some time but never have actually compiled my own, the version my provider compiled always sufficed, anyway, I I'm having some issues. config fails here: checking for GD support... yes checking for the location of libjpeg... yes checking for the location of libpng... yes checking for the location of libXpm... yes checking for FreeType 1.x support... yes checking for FreeType 2... yes checking for T1lib support... yes checking whether to enable truetype string function in GD... yes checking for jpeg_read_header in -ljpeg... yes checking for png_write_image in -lpng... yes If configure fails try --with-xpm-dir=DIR configure: error: freetype2 not found! %locate freetype /usr/local/include/freetype /usr/local/include/freetype/freetype.h /usr/local/include/freetype/fterrid.h /usr/local/include/freetype/ftnameid.h /usr/local/include/freetype/ftxcmap.h /usr/local/include/freetype/ftxerr18.h /usr/local/include/freetype/ftxgasp.h /usr/local/include/freetype/ftxgdef.h /usr/local/include/freetype/ftxgpos.h /usr/local/include/freetype/ftxgsub.h /usr/local/include/freetype/ftxkern.h /usr/local/include/freetype/ftxopen.h /usr/local/include/freetype/ftxpost.h /usr/local/include/freetype/ftxsbit.h /usr/local/include/freetype/ftxwidth.h /usr/local/include/freetype.h /var/db/pkg/freetype-1.3.1 /var/db/pkg/freetype-1.3.1/+COMMENT /var/db/pkg/freetype-1.3.1/+CONTENTS /var/db/pkg/freetype-1.3.1/+DESC /var/db/pkg/freetype-1.3.1/+REQUIRED_BY %locate xpm /usr/X11R6/bin/cxpm /usr/X11R6/bin/sxpm /usr/X11R6/include/X11/xpm.h /usr/X11R6/man/man1/cxpm.1.gz /usr/X11R6/man/man1/sxpm.1.gz /usr/share/man/man3/expm1.3.gz /usr/share/man/man3/expm1f.3.gz /var/db/pkg/xpm-3.4k /var/db/pkg/xpm-3.4k/+COMMENT /var/db/pkg/xpm-3.4k/+CONTENTS /var/db/pkg/xpm-3.4k/+DESC Currently installed module (4.0.6) was configures with: './configure' '--with-apxs=/usr/local/www/bin/apxs' '--with-config-file-path=/usr/local/www/etc' '--enable-versioning' '--with-system-regex' '--disable-debug' '--enable-track-vars' '--with-gd=/usr/local' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-imap=/usr/local' '--with-mysql=/usr/local' '--with-imap=/usr/local' '--prefix=/usr/local/www' 'i386--freebsd4.4' which is exactly what I'm trying to duplicate with the new install (4.3.0) Not sure what to do here... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Client Side PHP
That is a real nice thought - but Java is NOT platform independent - ever tried running your java applets on a Mac, or how about BSDI? Guess what - bad interpreter for Mac and expensive non-available one for BSDI. Java is no different than PHP except that it is a tough language to learn for the lay person, and requires a lot of time to build simple scripts. Java is NOT the answer, there is no such thing as platform independence. Every platform will require an interpreter of some sort for such a language, and because that interpreter is typically built by someone other that the language developer, the support will never be the same for the language cross platform (ever heard of a little language called Javascript and J-Script - how well supported is that? Can you do the same things in Netscape as in IE - which browser supports the true specification, for that matter, how about CSS, or HTML even?) Having a client side PHP will really do no more than allow other fighting browsers screw up the support as they have done every other technology, and if you require that it is a plug-in, well, then you are restricting the audience. A lot of developers prefer server side simply because it gives them control over what the client sees (except when you mix other technologies in like HTML and CSS, and others to format the results) Just my 2 cents worth and a long awaited shot at the 'wonderful' world of Java ;) Flame at will. On 2/6/03 3:44 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: One language across the whole web In a word: JAVA Has the cross-platform flexability of PHP with a little more versitility and power under the hood. Of course PHP still has its niche, but I'm still waiting to go to an ecommerce page that fires up and interactive store applet on the client side and streams sales information via XML, so I can really shop from my desktop. I am doing now ;) How would you guys like the idea, though? -- Maxim Maletsky [EMAIL PROTECTED] Pete [EMAIL PROTECTED] wrote... : Has any one ever considered creating browser / client-side php to replace Javascript and vb?? One language across the whole web ;-) Posted this question in the evangelism so I'd be interested in more reaction: Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Cheers Mike Morton * * E-Commerce for Small Business * http://www.dxstorm.com * * DXSTORM.COM * 824 Winston Churchill Blvd, * Oakville, ON, CA L6J 7X2 * Tel: 905-842-8262 * Fax: 905-842-3255 * Toll Free: 1-877-397-8676 * Indeed, it would not be an exaggeration to describe the history of the computer industry for the past decade as a massive effort to keep up with Apple. - Byte Magazine Given infinite time, 100 monkeys could type out the complete works of Shakespeare. Win 98 source code? Eight monkeys, five minutes. -- NullGrey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Question on PHP
Hi, I would like put this question directly to Rasmus creator of this wonderful server side scripting language. Is there a possibility with the future release of PHP to add extension in a easier manner. For every feature client wants there is a recompile involved. Wouldn't this be much easier if we just compile the appropriate library and just point the directory through php.ini. In that way most of the hosting provider would have update to date version. I also like features of gefionsoftware's LiteWebServer wherein they provide an admin screen and it allows us to update to the latest version without pain. Here I am talking about both upgrading to latest version as well as adding extensions. Have a great day. Karthikeyan B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Client Side PHP
PHP codes gets executed at the server (server side), so I wonder how you can make it to work at the client side? But good thinking :) huzz - Original Message - From: Pete [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 12:55 PM Subject: [PHP] Client Side PHP Has any one ever considered creating browser / client-side php to replace Javascript and vb?? One language across the whole web ;-) Posted this question in the evangelism so I'd be interested in more reaction: Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating an Array from a Recordset
On Thursday 06 February 2003 22:04, Vernon wrote: I'm trying to create an array from a rocordset that will do somethingt like this: $datay=array(12,8,19,3,10,5,55,88,3); the following is the code I have attempted to create, which is not working: do { $dat = ($row_rsCOUNTRY['CountryCount'] , $row_rsCOUNTRY['CountryCount']); } while ($row_rsCOUNTRY = mysql_fetch_assoc($rsCOUNTRY)); $datay=array($dat); unset($datay); // just in case it is already defined while ($row_rsCOUNTRY = mysql_fetch_assoc($rsCOUNTRY)) { $datay[] = $row_rsCOUNTRY['CountryCount']; } print_r($datay); -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Ma Bell is a mean mother! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Client Side PHP
Like a previous poster said, you would have to develop some type of plug-in to work with the browsers that would incorporate PHP on the client side. Or talk Microsoft into including it in Internet Exploder by default :-) This strategy depends on user experience studies..I know many people who are simply turned off and loose interest when they have to download/install another plug-in. -B PHP codes gets executed at the server (server side), so I wonder how you can make it to work at the client side? But good thinking :) huzz - Original Message - From: Pete [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 12:55 PM Subject: [PHP] Client Side PHP Has any one ever considered creating browser / client-side php to replace Javascript and vb?? One language across the whole web ;-) Posted this question in the evangelism so I'd be interested in more reaction: Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Question on PHP
Karthikeyan.Balasubramanian schrieb: Hi, I would like put this question directly to Rasmus creator of this wonderful server side scripting language. Is there a possibility with the future release of PHP to add extension in a easier manner. For every feature client wants there is a recompile involved. Wouldn't this be much easier if we just compile the appropriate library and just point the directory through php.ini. In that way most of the hosting provider would have update to date version. I also like features of gefionsoftware's LiteWebServer wherein they provide an admin screen and it allows us to update to the latest version without pain. Here I am talking about both upgrading to latest version as well as adding extensions. Have a great day. Karthikeyan B that's ain't such easy as it seem cause every little linux box is a bit different ... SUSE, Red Hat, FreeBSD ... but maybe you could use RPM package to update your system which also tell you which modul is used by another ... after all note never change a running system ! if there are no needs (security bug) to be always near the developement branch. -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating an Array from a Recordset
That gives me something that looks like this: Array ( [0] = 34 [1] = 31 [2] = 16 [3] = 16 [4] = 6 [5] = 4 [6] = 4 [7] = 3 [8] = 2 [9] = 2 [10] = 2 [11] = 2 [12] = 2 [13] = 2 [14] = 2 [15] = 2 [16] = 1 [17] = 1 [18] = 1 [19] = 1 [20] = 1 [21] = 1 [22] = 1 [23] = 1 [24] = 1 [25] = 1 [26] = 1 [27] = 1 [28] = 1 [29] = 1 [30] = 1 [31] = 1 [32] = 1 [33] = 1 [34] = 1 ) when what I need is set the variable $datay to be something like this $datay=array(12,8,19,3,10,5,55,88,3); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] read input in console mode
Hi there, I found a way to read input from a console mode in linux, very simple open php://stdin to read from the standard input system. THE PROBLEM is i can't just read one character it always waits for the user to press enter which is not what i intended to do. When i write Please press a key to continue if the user presses anything else than enter it appears on the screen. and the input ends only when he presses enter. If you are a C/C++ programmer you can compare that to the cin command. I need something to read only one char at a time if needed! thank you Mathieu Dumoulin Programmer analyste for web solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Client Side PHP
Php schrieb: PHP codes gets executed at the server (server side), so I wonder how you can make it to work at the client side? But good thinking :) huzz Client Side PHP ? ... maybe you could ;-) ... you only have to install PHP on your box. PHP is too mighty and huge to implement in the browser like JavaScript or VBscript nor will M$ ever wan't to replace VB with PHP. But you have to use a PHP system ruuning on your box to interpret the code. That way everybody who want to use Client-Side PHP have to get the hole PHP system ... that's not the point it will ever go so this is a dead end. And who realy needs it ? The browsers and HTML lacks on other problems than on possibilys to manage somethin with a good scripting tool. ;-) -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Scripting language in PHP?
Leif, i think Ariadne does this. IIRC they have a mini template language called PinP Leif K-Brooks [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Out of pure boredom, I'm considering writing a simple scripting language in PHP. Has anything like this been done before? Any open-source projects I should look at? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
Actually, I believe it's not a matter of the input being set, but the fact that isset() returns true on an empty variable. Jason Wong php-general@gremTo: [EMAIL PROTECTED] lins.bizcc: Subject: Re: [PHP] empty and isset 02/06/2003 12:31 AM Please respond to php-general On Thursday 06 February 2003 13:20, Bryan Lipscy wrote: Env: Slackware 8.1, Apache 1.3.27, PHP 4.3.0 Bugs: None found for these issues. I am running to this same problem. The isset() function appears to have problems with the empty text value. The empty() function sees the value of $_POST['q1'] as expected. So why is both isset() and empty() returning true on q1? input of type text are set regardless of whether you have entered anything. Thus isset() returns true. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Have you noticed that all you need to grow healthy, vigorous grass is a crack in your sidewalk? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating an Array from a Recordset
use implode(',',$datay) Vernon wrote: That gives me something that looks like this: Array ( [0] = 34 [1] = 31 [2] = 16 [3] = 16 [4] = 6 [5] = 4 [6] = 4 [7] = 3 [8] = 2 [9] = 2 [10] = 2 [11] = 2 [12] = 2 [13] = 2 [14] = 2 [15] = 2 [16] = 1 [17] = 1 [18] = 1 [19] = 1 [20] = 1 [21] = 1 [22] = 1 [23] = 1 [24] = 1 [25] = 1 [26] = 1 [27] = 1 [28] = 1 [29] = 1 [30] = 1 [31] = 1 [32] = 1 [33] = 1 [34] = 1 ) when what I need is set the variable $datay to be something like this $datay=array(12,8,19,3,10,5,55,88,3); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] read input in console mode
Nope, it returns 1 character from the input buffer after the user presses enter sadly, i did try that already! =P - Adam Voigt [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] $f = fopen(php://stdin,r); $command = fread($f,1); fclose($f); Would that not read a single character? On Thu, 2003-02-06 at 09:41, Mathieu Dumoulin wrote: Hi there, I found a way to read input from a console mode in linux, very simple open php://stdin to read from the standard input system. THE PROBLEM is i can't just read one character it always waits for the user to press enter which is not what i intended to do. When i write Please press a key to continue if the user presses anything else than enter it appears on the screen. and the input ends only when he presses enter. If you are a C/C++ programmer you can compare that to the cin command. I need something to read only one char at a time if needed! thank you Mathieu Dumoulin Programmer analyste for web solutions- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forward mail via PHP
Looking for a better solution to forward mail from an IMAP account via PHP to another account. Right now I am utilizing the built in imap functions (i.e. imap_fetchstructure, imap_fetchbody, imap_header among others) to get the individual parts and a MimeMessage class to rebuild the message. Once the message is rebuilt I change the To: and then send it on. The problem is that messages are rebuilt successfully about 95% of the time. Can anyone suggest a better way to do this? Can I not just login to the account get the entire message, change the To: and send it on it's way leaving the message structure in tact? If so does anyone know of any pre-existing classes to take a message as input, change the TO: and use the result of this to send it out? Thanks, -Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Searching MySQL 'text' field
I've setup a search page using PHP which when searching a MySQL 'varchar' field it works just fine, but I'm trying to extend the search to include a field that is a 'text' field and it keeps coming back with no results. Is searching text fields allowed? It would seem that it only be logical that it would be. Is there something special I have to do to have this field searched? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] read input in console mode
ncurses is the answer Mathieu Dumoulin wrote: Hi there, I found a way to read input from a console mode in linux, very simple open php://stdin to read from the standard input system. THE PROBLEM is i can't just read one character it always waits for the user to press enter which is not what i intended to do. When i write Please press a key to continue if the user presses anything else than enter it appears on the screen. and the input ends only when he presses enter. If you are a C/C++ programmer you can compare that to the cin command. I need something to read only one char at a time if needed! thank you Mathieu Dumoulin Programmer analyste for web solutions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Config problems
Brian V Bonini schrieb: Been using PHP for some time but never have actually compiled my own, the version my provider compiled always sufficed, anyway, I I'm having some issues. NOTE: once compiled, this PHP package runs without the include files, cause they are included to the package. So you provider had freetype version 2 and xpm installed, you might not have this. config fails here: checking for GD support... yes checking for the location of libjpeg... yes checking for the location of libpng... yes checking for the location of libXpm... yes checking for FreeType 1.x support... yes checking for FreeType 2... yes checking for T1lib support... yes checking whether to enable truetype string function in GD... yes checking for jpeg_read_header in -ljpeg... yes checking for png_write_image in -lpng... yes If configure fails try --with-xpm-dir=DIR configure: error: freetype2 not found! ... PHP is looking for freetype 2 (if realy needed ???) ^ note the version ! %locate freetype /usr/local/include/freetype /usr/local/include/freetype/freetype.h /usr/local/include/freetype/fterrid.h /usr/local/include/freetype/ftnameid.h /usr/local/include/freetype/ftxcmap.h /usr/local/include/freetype/ftxerr18.h /usr/local/include/freetype/ftxgasp.h /usr/local/include/freetype/ftxgdef.h /usr/local/include/freetype/ftxgpos.h /usr/local/include/freetype/ftxgsub.h /usr/local/include/freetype/ftxkern.h /usr/local/include/freetype/ftxopen.h /usr/local/include/freetype/ftxpost.h /usr/local/include/freetype/ftxsbit.h /usr/local/include/freetype/ftxwidth.h /usr/local/include/freetype.h /var/db/pkg/freetype-1.3.1 /var/db/pkg/freetype-1.3.1/+COMMENT /var/db/pkg/freetype-1.3.1/+CONTENTS /var/db/pkg/freetype-1.3.1/+DESC /var/db/pkg/freetype-1.3.1/+REQUIRED_BY this is freetype version 1.3.1 ! if you relay need it you might get it from http://www.rpmfind.net/linux/rpm2html/search.php?query=freetype2 %locate xpm /usr/X11R6/bin/cxpm /usr/X11R6/bin/sxpm /usr/X11R6/include/X11/xpm.h /usr/X11R6/man/man1/cxpm.1.gz /usr/X11R6/man/man1/sxpm.1.gz /usr/share/man/man3/expm1.3.gz /usr/share/man/man3/expm1f.3.gz /var/db/pkg/xpm-3.4k /var/db/pkg/xpm-3.4k/+COMMENT /var/db/pkg/xpm-3.4k/+CONTENTS /var/db/pkg/xpm-3.4k/+DESC that's not the xpm he is looking for ... try % locate Xpm ^ note the big X and it should find something like: /usr/X11R6/lib/libXpm.so /usr/X11R6/lib/libXpm.so.4 /usr/X11R6/lib/libXpm.so.4.10 /usr/i386-glibc20-linux/lib/libXpm.so /usr/i386-glibc20-linux/lib/libXpm.so.4 /usr/i386-glibc20-linux/lib/libXpm.so.4.10 if you haven't it but think you realy need it get it from: http://www.rpmfind.net/linux/rpm2html/search.php?query=xpm Currently installed module (4.0.6) was configures with: './configure' '--with-apxs=/usr/local/www/bin/apxs' '--with-config-file-path=/usr/local/www/etc' '--enable-versioning' '--with-system-regex' '--disable-debug' '--enable-track-vars' '--with-gd=/usr/local' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-imap=/usr/local' '--with-mysql=/usr/local' '--with-imap=/usr/local' '--prefix=/usr/local/www' 'i386--freebsd4.4' which is exactly what I'm trying to duplicate with the new install (4.3.0) Not sure what to do here... Note: to compile he needs the .h (example png.h for PNG suppport) from /usr/local/include (or whatever you told him) and the .so modul like libpng.so out of /usr/lib (or whatever you told him) ! regards -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upgrade issues
What's wrong with this snippet of code that would make it stop working after upgrading from 4.0.6 to 4.3.0 ?php if (!$id) { include pagetop.inc.php; } if ($id == 1) { $title = xxx; include pagetop.inc.php; ? pStuff/p ?php } ? './configure' '--with-apxs=/usr/local/www/bin/apxs' '--with-config-file-path=/usr/local/www/etc' '--enable-versioning' '--with-system-regex' '--disable-debug' '--enable-track-vars' '--with-gd=/usr/local' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-imap=/usr/local' '--with-mysql=/usr/local' '--with-imap=/usr/local' '--prefix=/usr/local/www' 'i386--freebsd4.4' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] AYUDA..Actualizar txt
Necesito saber como limpiar o actualizar txt . Resulta q he creado un chat en flash y php, pero almacena los user y los comentarios en txt, lo malo es que tengo q limpiarlos desde el server.q hago. _ Registra gratis tu cuenta email en http://www.exploraiquique.cl _ Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, POP more! http://www.everyone.net/selectmail?campaign=tag -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Date Difference Errors
I have a function that I use to return the number of days between two dates. It worked fine on my Mandrake 7.0 server running PHP 4. I am trying to run it on a RedHat 8.0 box with the same version of PHP. On Mandrake, strtotime() and mktime() returned a negative number for dates prior to 1970-01-01. On the RH 8 box, they both return -1. Is there any work around to calculating date differences for dates prior to 1970? Rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] AYUDA..Actualizar txt
Si estoy entendiendo correctamente, usted desea guardar el archivo cierta longitud quitando la entrada pasada cada vez que se agrega un nuevo. Si esto est+AOE correcto, usted debe hacer esto: (Esto est+AOE asumiendo sus comentarios es seperated por una rotura de la l+AO0-nea.) +ADw?php +ACQ-f +AD0 fopen(+ACI-filename+ACI,+ACI-r+ACI)+ADs +ACQ-data +AD0 fread(+ACQ-f,filesize(+ACI-filename+ACI))+ADs fclose(+ACQ-f)+ADs +ACQ-data +AD0 explode(+ACIAXA-n+ACI,+ACQ-data)+ADs unset(+ACQ-data+AFs(count(+ACQ-data)-1)+AF0)+ADs +ACQ-data +AD0 implode(+ACIAXA-n+ACI,+ACQ-data)+ADs +ACQ-f +AD0 fopen(+ACI-filename+ACI,+ACI-w+ACI)+ADs fwrite(+ACQ-f,+ACQ-data)+ADs fclose(+ACQ-f)+ADs ?+AD4 On Thu, 2003-02-06 at 10:10, Rot Alvarez wrote: Necesito saber como limpiar o actualizar txt . Resulta q he creado un chat en flash y php, pero almacena los user y los comentarios en txt, lo malo es que tengo q limpiarlos desde el server.q hago. +AF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8 Registra gratis tu cuenta email en http://www.exploraiquique.cl +AF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8AXwBfAF8 Select your own custom email address for FREE+ACE Get you+AEA-yourchoice.com w/No Ads, 6MB, POP +ACY more+ACE http://www.everyone.net/selectmail?campaign+AD0-tag -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt (adam+AEA-cryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam+AF8-at+AF8-cryptocomm.asc
Re: [PHP] Re: Config problems
On Thu, 2003-02-06 at 10:03, Goetz Lohmann wrote: Brian V Bonini schrieb: Been using PHP for some time but never have actually compiled my own, the version my provider compiled always sufficed, anyway, I I'm having some issues. NOTE: once compiled, this PHP package runs without the include files, cause they are included to the package. So you provider had freetype version 2 and xpm installed, you might not have this. I got it, thanks... I was just being lazy and did not want to have to install a newer freetype which also meant having to install GNU make because BSD make will not work to install freetype. Unfortunately after upgrading all my PHP sites stopped working, I suspect due to a change in syntax or perhaps just poor coding practices in the past -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Client Side PHP
Goetz Lohmann [EMAIL PROTECTED] wrote... : Php schrieb: PHP codes gets executed at the server (server side), so I wonder how you can make it to work at the client side? But good thinking :) huzz Client Side PHP ? ... maybe you could ;-) ... you only have to install PHP on your box. PHP is too mighty and huge to implement in the browser like JavaScript or VBscript nor will M$ ever wan't to replace VB with PHP. But you have to use a PHP system ruuning on your box to interpret the code. That way everybody who want to use Client-Side PHP have to get the hole PHP system ... that's not the point it will ever go so this is a dead end. And who realy needs it ? The browsers and HTML lacks on other problems than on possibilys to manage somethin with a good scripting tool. well, in lots of cases PHP will not have to be installed fully in order to support client side. It could be something like a tiny virtual machine, similar to Java's. I agree that writing client-side scripts in PHP could be easier than in Java or VB and thus I see it as a possibility. The downside is the limited user-base it would be - any way you wish it to work it will have to be a plugin -- Maxim Maletsky [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: upgrade issues
Brian V Bonini schrieb: What's wrong with this snippet of code that would make it stop working after upgrading from 4.0.6 to 4.3.0 ?php if (!$id) { include pagetop.inc.php; } if ($id == 1) { $title = xxx; include pagetop.inc.php; ? pStuff/p ?php } ? look at http://www.php.net/manual/en/tutorial.oldcode.php it is cause $id isn't set to the value of your uri anymore ! set register_globals on in your PHP.INI or use $_GET['id'] -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: AYUDA..Actualizar txt
Rot Alvarez schrieb: Necesito saber como limpiar o actualizar txt . Resulta q he creado un chat en flash y php, pero almacena los user y los comentarios en txt, lo malo es que tengo q limpiarlos desde el server.q hago. _ Registra gratis tu cuenta email en http://www.exploraiquique.cl _ Select your own custom email address for FREE! Get [EMAIL PROTECTED] w/No Ads, 6MB, POP more! http://www.everyone.net/selectmail?campaign=tag please post english and please wrap your lines at 80 characters !!! -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stupid question, sorry...
Why is it that \n gets translated to a _new line_ when in double quotes whereas it's displayed as the literal when in single quotes? I checked out the docs but couldn't come up with a definitive answer. If someone could point me to the right page in the docs that explains this, I'd be ever so appreciative! thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Config problems
Brian V Bonini schrieb: On Thu, 2003-02-06 at 10:03, Goetz Lohmann wrote: Brian V Bonini schrieb: Been using PHP for some time but never have actually compiled my own, the version my provider compiled always sufficed, anyway, I I'm having some issues. NOTE: once compiled, this PHP package runs without the include files, cause they are included to the package. So you provider had freetype version 2 and xpm installed, you might not have this. I got it, thanks... I was just being lazy and did not want to have to install a newer freetype which also meant having to install GNU make because BSD make will not work to install freetype. Unfortunately after upgrading all my PHP sites stopped working, I suspect due to a change in syntax or perhaps just poor coding practices in the past everytime nice to help someone ;-) the major change from 4.2.x to 4.3.x might be some security issues which normaly prevent http://my.domain.com/test.php?id=123 ?php echo $id; ? to work, which was most common in the past ! instead you have to use $_GET['id'] to go through but take a look at: http://www.php.net/manual/en/tutorial.oldcode.php -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Stupid question, sorry...
All single quotes around variables or escape characters are written out man! it's as simple as that. example you have a variable named $hey and you want to output $hey, you can't it's gonna replace the content of that string with the value of $hey. When you put stuff inside ' ' they are not escaped by the system Mathiue Dumoulin Chris Boget [EMAIL PROTECTED] a écrit dans le message de news: 021901c2cdf4$4a806d00$[EMAIL PROTECTED] Why is it that \n gets translated to a _new line_ when in double quotes whereas it's displayed as the literal when in single quotes? I checked out the docs but couldn't come up with a definitive answer. If someone could point me to the right page in the docs that explains this, I'd be ever so appreciative! thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Solutions need for resizing images (Thumbnail) on the fly..
Hi there I have this problem wondering how to define the size of my images. I have this page that has 9 images coming from the database. These images are uploaded into a folder and the names are referenced in the DB. I pull the image through these tags ?php print img alt='$title' border=0 width= '103' heigth = '70' src=\$folder/$image1\ ? and it's ok if the images are rectangular with size 104 x 70,but how will I reduce the size of the image having the opposite size 70 x 104 rectangular but shorter in length. Hard coding the size is not the solution for me as these images are coming straight from the DB with their actual size. Having decided the sizes to be either 104 x 70 or 70 x 104, now the trouble is how to assignee these values dynamically judging the format of the image. I've seen different script in resizing the images on the fly but couldn't adapt to my needs, as I've 9 image variables ($image1, $image2,..)already assigned and I am looking for scripts or solutions in resizing the images on the fly by assigning my 9image variables to the resize function. Thanks once again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Client Side PHP
Think thje user base will be quite big if we got it together. How many oho programmers are there who struggle with Javascript - me included ;-) Anyway the opensourcness of php would make the plugins more efficient for each browser. pete Maxim Maletsky wrote: Goetz Lohmann [EMAIL PROTECTED] wrote... : Php schrieb: PHP codes gets executed at the server (server side), so I wonder how you can make it to work at the client side? But good thinking :) huzz Client Side PHP ? ... maybe you could ;-) ... you only have to install PHP on your box. PHP is too mighty and huge to implement in the browser like JavaScript or VBscript nor will M$ ever wan't to replace VB with PHP. But you have to use a PHP system ruuning on your box to interpret the code. That way everybody who want to use Client-Side PHP have to get the hole PHP system ... that's not the point it will ever go so this is a dead end. And who realy needs it ? The browsers and HTML lacks on other problems than on possibilys to manage somethin with a good scripting tool. well, in lots of cases PHP will not have to be installed fully in order to support client side. It could be something like a tiny virtual machine, similar to Java's. I agree that writing client-side scripts in PHP could be easier than in Java or VB and thus I see it as a possibility. The downside is the limited user-base it would be - any way you wish it to work it will have to be a plugin -- Maxim Maletsky [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating an Array from a Recordset
On Thursday 06 February 2003 22:34, Vernon wrote: That gives me something that looks like this: Array ( [0] = 34 [1] = 31 [2] = 16 [3] = 16 [4] = 6 [5] = 4 [6] = 4 [7] = 3 [8] = 2 [9] = 2 [10] = 2 [11] = 2 [12] = 2 [13] = 2 [14] = 2 [15] = 2 [16] = 1 [17] = 1 [18] = 1 [19] = 1 [20] = 1 [21] = 1 [22] = 1 [23] = 1 [24] = 1 [25] = 1 [26] = 1 [27] = 1 [28] = 1 [29] = 1 [30] = 1 [31] = 1 [32] = 1 [33] = 1 [34] = 1 ) Exactly. That's what you asked for! when what I need is set the variable $datay to be something like this $datay=array(12,8,19,3,10,5,55,88,3); Try this: $datay=array(12,8,19,3,10,5,55,88,3); print_r($datay); -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* People who take cat naps don't usually sleep in a cat's cradle. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Stupid question, sorry...
Chris Boget schrieb: Why is it that \n gets translated to a _new line_ when in double quotes whereas it's displayed as the literal when in single quotes? I checked out the docs but couldn't come up with a definitive answer. If someone could point me to the right page in the docs that explains this, I'd be ever so appreciative! thnx, Chris all inside of will be interpreted instead of things between '' will be as is ... and as \n means New Line it will do this. If you wish to print out a \n then you have to write it like \\n. This is true for all special characters like: \n - new line \r - carriage return \t - tab \- escape sign for the special characters \\ - backslash itself -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php pages broken after moving to a newer version
Jason Wong [EMAIL PROTECTED] wrote on 02/05/2003 09:38:48 PM: On Thursday 06 February 2003 07:13, [EMAIL PROTECTED] wrote: 1) Read the changelog/history/release notes of all versions of php between the 4.0.3 and up to 4.2.3 2) Check the php log (turn on full error reporting). The log is 23 pages long and doesn't to all the way back to 4.0.3. Could you perhaps give me a hint as to something else to look for in the log? OK, first you need to see what PHP is choking on. Only way to do that is to do (2) above. So once you know what errors PHP is giving out you do (1) to see whether anything has changed to cause this behaviour. Okay, so I have turned on all the error handling options in /usr/local/etc/php.ini-dist. I have purposely put an error in my phpinfo.php page, it errors out in the browser, but no error log is created. My index.php page does not load and does not provide any errors. I set the error log to go into the /tmp directory, after trying /var/log and also my own home directory, it just will not be created in any of them. NB if PHP doesn't give any errors, then it would suggest to me that your code logic is broken. If the page works fine in php-4.0.3 then I don't see how it can be broken. This is frustrating. You can see the page at the link below. I have pasted my /usr/local/etc/php.ini-dist below. If it would help I can also add my index.php that is having problems... Regards, -- Chip W www.simradusa.com [PHP] ;;; ; WARNING ; ;;; ; This is the default settings file for new PHP installations. ; By default, PHP installs itself with a configuration suitable for ; development purposes, and *NOT* for production purposes. ; For several security-oriented considerations that should be taken ; before going online with your site, please consult php.ini-recommended ; and http://php.net/manual/en/security.php. ;;; ; About this file ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path designated by the environment variable ; PHPRC, and in the path that was defined in compile time (in that order). ; Under Windows, the compile-time path is the Windows directory. The ; path in which the php.ini file is looked for can be overridden using ; the -c argument in command line mode. ; ; The syntax of the file is extremely simple. Whitespace and Lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. ; ; Directives are specified using the following syntax: ; directive = value ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. ; ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression ; (e.g. E_ALL ~E_NOTICE), or a quoted string (foo). ; ; Expressions in the INI file are limited to bitwise operators and parentheses: ; |bitwise OR ; bitwise AND ; ~bitwise NOT ; !boolean NOT ; ; Boolean flags can be turned on using the values 1, On, True or Yes. ; They can be turned off using the values 0, Off, False or No. ; ; An empty string can be denoted by simply not writing anything after the equal ; sign, or by using the None keyword: ; ; foo = ; sets foo to an empty string ; foo = none; sets foo to an empty string ; foo = none ; sets foo to the string 'none' ; ; If you use constants in your value, and these constants belong to a ; dynamically loaded extension (either a PHP extension or a Zend extension), ; you may only use these constants *after* the line that loads the extension. ; ; All the values in the php.ini-dist file correspond to the builtin ; defaults (that is, if no php.ini is used, or if you delete these lines, ; the builtin defaults will be identical). ; Language Options ; ; Enable the PHP scripting language engine under Apache. engine = On ; Allow the ? tag. Otherwise, only ?php and script tags are recognized. short_open_tag = On ; Allow ASP-style % % tags. asp_tags = Off ; The number of significant digits displayed in floating point numbers. precision= 12 ; Enforce year 2000 compliance (will cause problems with non-compliant browsers) y2k_compliance = Off ; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at the price of slowing PHP's output layer a ; bit. You can enable output buffering during runtime by calling the output ; buffering functions. You can also enable output buffering for all files by ; setting this directive to On. If you wish to limit the size of the buffer ; to a certain size - you can use a maximum number of bytes instead of
[PHP] Re: Solutions need for resizing images (Thumbnail) on the fly..
Geckodeep schrieb: Hi there I have this problem wondering how to define the size of my images. I have this page that has 9 images coming from the database. These images are uploaded into a folder and the names are referenced in the DB. I pull the image through these tags ?php print img alt='$title' border=0 width= '103' heigth = '70' src=\$folder/$image1\ ? and it's ok if the images are rectangular with size 104 x 70,but how will I reduce the size of the image having the opposite size 70 x 104 rectangular but shorter in length. Hard coding the size is not the solution for me as these images are coming straight from the DB with their actual size. Having decided the sizes to be either 104 x 70 or 70 x 104, now the trouble is how to assignee these values dynamically judging the format of the image. I've seen different script in resizing the images on the fly but couldn't adapt to my needs, as I've 9 image variables ($image1, $image2,..)already assigned and I am looking for scripts or solutions in resizing the images on the fly by assigning my 9image variables to the resize function. Thanks once again. its just mathematic ;-) ?php // get size $imagehw = GetImageSize($img0); $w = $imagehw[0]; // width $h = $imagehw[1]; // height $maxsize = 150; // maximum size in one direction // prevent division by zero if ($height==0 || $width==0) exit; // get new size according to max size if ($height$width) { $new_h = $maxsize; // new height $new_w = (int) (($maxsize * $width) / $height); // casting to int ! } else { $new_w = $maxsize; // new width $new_h = (int) (($maxsize * $height) / $width); // casting to int ! } // resize image ImageCopyResized($thumb,$img,0,0,0,0,$new_w,$new_h,$w,$h); // new thumbnail is in $thumb ? -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Powerpoint presentations?!?
Do a search for other applications that write PPT files. I have used a number of others in the past. Perhaps they are scriptable and run in your environment. Perhaps openOffice? Example: Apple's new presentation product. I does write PPT. Their products are normally very scriptable. Also OFFICEx PowerPoint for OSX should be fairly scriptable. Apple's OSAX is very easy to understand and use. Also powerpoint plays quicktime and wm files. Might it be possible to build the file in that format and then have played back in PP? (or as alternative to PP)? Jerry Artman Budget and Reimbursement [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php pages broken after moving to a newer version
Chip Wiegand schrieb: Jason Wong [EMAIL PROTECTED] wrote on 02/05/2003 09:38:48 PM: On Thursday 06 February 2003 07:13, [EMAIL PROTECTED] wrote: 1) Read the changelog/history/release notes of all versions of php between the 4.0.3 and up to 4.2.3 2) Check the php log (turn on full error reporting). The log is 23 pages long and doesn't to all the way back to 4.0.3. Could you perhaps give me a hint as to something else to look for in the log? OK, first you need to see what PHP is choking on. Only way to do that is to do (2) above. So once you know what errors PHP is giving out you do (1) to see whether anything has changed to cause this behaviour. Okay, so I have turned on all the error handling options in /usr/local/etc/php.ini-dist. I have purposely put an error in my phpinfo.php page, it errors out in the browser, but no error log is created. My index.php page does not load and does not provide any errors. I set the error log to go into the /tmp directory, after trying /var/log and also my own home directory, it just will not be created in any of them. change php.ini NOT php.ini-dist which not will be loaded !!! and be sure you change the php.ini which is used (maybe there might be more than one php.ini in your system but only one is use ... find this out with phpinfo !) [phpinfo.php] ?php phpinfo(); ? -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Solutions need for resizing images (Thumbnail) on the fly..
Goetz Lohmann schrieb: Geckodeep schrieb: Hi there I have this problem wondering how to define the size of my images. I have this page that has 9 images coming from the database. These images are uploaded into a folder and the names are referenced in the DB. I pull the image through these tags ?php print img alt='$title' border=0 width= '103' heigth = '70' src=\$folder/$image1\ ? and it's ok if the images are rectangular with size 104 x 70,but how will I reduce the size of the image having the opposite size 70 x 104 rectangular but shorter in length. Hard coding the size is not the solution for me as these images are coming straight from the DB with their actual size. Having decided the sizes to be either 104 x 70 or 70 x 104, now the trouble is how to assignee these values dynamically judging the format of the image. I've seen different script in resizing the images on the fly but couldn't adapt to my needs, as I've 9 image variables ($image1, $image2,..)already assigned and I am looking for scripts or solutions in resizing the images on the fly by assigning my 9image variables to the resize function. Thanks once again. its just mathematic ;-) UPS ... sorry ... if using $height/$h and $width/$w I should it in the whole script ... ?php // get size // $w = 640; // width $h = 480; // height $maxsize = 150; // maximum size in one direction // prevent division by zero if (($h ==0) || ($w==0)) exit; // get new size according to max size if ($h$w) { $new_h = $maxsize; // new height $new_w = (int) (($maxsize * $w) / $h); // casting to int ! } else { $new_w = $maxsize; // new width $new_h = (int) (($maxsize * $h) / $w); // casting to int ! } // resize image echo newsize: $new_w x $new_h; // new thumbnail is in $thumb ? now that should do ! ;-) -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Adding mhash function without recompile?
I am currently using a php build by Marc Liyanage for Mac OS X and had a question. I need to use the mhash function, but it was not included in the build. Is there a way to add that extension to PHP without recompiling? I already have mhash installed and running, I just need php able to use it. TIA -- Mike Yrabedra President 323 Enterprises Home of The MacDock and The MacSurfshop [http://macdock.com] : [http://macsurfshop.com] VOICE: 770.382.1195 iChat/AIM: ichatmacdock ___ in all your ways acknowledge Him and He will direct your paths. Proverbs 3:6 NIV {{{ -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Solutions need for resizing images (Thumbnail) on the fly..
Thanks Goetz But how can I apply this having: Path to the folder is $folder='images/repor_images'; // path to the image. My 9image variables are $image1, $image2, $image3,. and the code to call the image ?php print img alt='$title' border=0 width= '103' heigth = '70' src=\$folder/$image1\ ? Thanks again. Goetz Lohmann [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Geckodeep schrieb: Hi there I have this problem wondering how to define the size of my images. I have this page that has 9 images coming from the database. These images are uploaded into a folder and the names are referenced in the DB. I pull the image through these tags ?php print img alt='$title' border=0 width= '103' heigth = '70' src=\$folder/$image1\ ? and it's ok if the images are rectangular with size 104 x 70,but how will I reduce the size of the image having the opposite size 70 x 104 rectangular but shorter in length. Hard coding the size is not the solution for me as these images are coming straight from the DB with their actual size. Having decided the sizes to be either 104 x 70 or 70 x 104, now the trouble is how to assignee these values dynamically judging the format of the image. I've seen different script in resizing the images on the fly but couldn't adapt to my needs, as I've 9 image variables ($image1, $image2,..)already assigned and I am looking for scripts or solutions in resizing the images on the fly by assigning my 9image variables to the resize function. Thanks once again. its just mathematic ;-) ?php // get size $imagehw = GetImageSize($img0); $w = $imagehw[0]; // width $h = $imagehw[1]; // height $maxsize = 150; // maximum size in one direction // prevent division by zero if ($height==0 || $width==0) exit; // get new size according to max size if ($height$width) { $new_h = $maxsize; // new height $new_w = (int) (($maxsize * $width) / $height); // casting to int ! } else { $new_w = $maxsize; // new width $new_h = (int) (($maxsize * $height) / $width); // casting to int ! } // resize image ImageCopyResized($thumb,$img,0,0,0,0,$new_w,$new_h,$w,$h); // new thumbnail is in $thumb ? -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
On Thursday 06 February 2003 22:50, [EMAIL PROTECTED] wrote: input of type text are set regardless of whether you have entered anything. Thus isset() returns true. Actually, I believe it's not a matter of the input being set, but the fact that isset() returns true on an empty variable. Try this: ?php if (isset($doo)) { print '$doo is set'; // does not get printed } if (empty($doo)) { print '$doo is empty'; // gets printed } ? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The solution to a problem changes the nature of the problem. -- Peer */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date Difference Errors
On Thursday 06 February 2003 23:13, Rob Quenzer wrote: I have a function that I use to return the number of days between two dates. It worked fine on my Mandrake 7.0 server running PHP 4. I am trying to run it on a RedHat 8.0 box with the same version of PHP. On Mandrake, strtotime() and mktime() returned a negative number for dates prior to 1970-01-01. On the RH 8 box, they both return -1. Is there any work around to calculating date differences for dates prior to 1970? Have a look at the functions in manual 'Calendar functions'. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Victory uber allies! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
It's fairly easy. isset returns true if the VARIABLE itself exists, like if it's been declared, or set by a form. isset isn't checking the VALUE of the VARIABLE, just if it exists. In Jason's example below, isset returns false because the VARIABLE was never declared in some way, shape or form. Technically, it doesn't exist. empty returns true because the VARIABLE $doo, declared or not, has no VALUE. VARIABLE and VALUE...two different things. Jason Wong wrote: On Thursday 06 February 2003 22:50, [EMAIL PROTECTED] wrote: input of type text are set regardless of whether you have entered anything. Thus isset() returns true. Actually, I believe it's not a matter of the input being set, but the fact that isset() returns true on an empty variable. Try this: ?php if (isset($doo)) { print '$doo is set'; // does not get printed } if (empty($doo)) { print '$doo is empty'; // gets printed } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php pages broken after moving to a newer version
Goetz Lohmann [EMAIL PROTECTED] wrote on 02/06/2003 08:09:19 AM: Chip Wiegand schrieb: Okay, so I have turned on all the error handling options in /usr/local/etc/php.ini-dist. I have purposely put an error in my phpinfo.php page, it errors out in the browser, but no error log is created. My index.php page does not load and does not provide any errors. I set the error log to go into the /tmp directory, after trying /var/log and also my own home directory, it just will not be created in any of them. change php.ini NOT php.ini-dist which not will be loaded !!! Thanks so much. I copied that file to php.ini and now all is well. -- Chip and be sure you change the php.ini which is used (maybe there might be more than one php.ini in your system but only one is use ... find this out with phpinfo !) [phpinfo.php] ?php phpinfo(); ? -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php pages broken after moving to a newer version
On Thursday 06 February 2003 23:56, [EMAIL PROTECTED] wrote: Okay, so I have turned on all the error handling options in /usr/local/etc/php.ini-dist. As someone has already pointed out, that file should be 'php.ini', not 'php.ini-dist'. I have purposely put an error in my phpinfo.php page, it errors out in the browser, but no error log is created. My index.php page does not load and does not provide any errors. I set the error log to go into the /tmp directory, after trying /var/log and also my own home directory, it just will not be created in any of them. The directory which the log file goes into needs to have 'wx' permissions for the user that the webserver runs as. NB if PHP doesn't give any errors, then it would suggest to me that your code logic is broken. If the page works fine in php-4.0.3 then I don't see how it can be broken. This is frustrating. You can see the page at the link below. I have pasted my /usr/local/etc/php.ini-dist below. If it would help I can also add my index.php that is having problems... Unfortunately, things do change between versions which can break some code. Without knowing what errors you're having it's going to be difficult to start debugging. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* life, n.: Learning about people the hard way -- by being one. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] instantiating objects
I'm just starting to use PEAR, and have seen several ways of instantiating the PEAR objects: $form = new HTML_QuickForm(); $form = new HTML_QuickForm(); $dbh = DB:connect(dsn); $dbh = new DB(); $mail_object = Mail::factory('sendmail', $params); Can anyone explain (or point to dome docs that explain) what the differences are, and when I should be using which method to work with PEAR objects? Thank you, Beau -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] subscribe swalker@caspercollege.edu
subscribe [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: instantiating objects
http://www.php.net/manual/en/language.references.php http://www.php.net/manual/en/language.oop.php Examples 1 and 4 are equivalent Example 2 assigns a reference of the new object to $form Example 3 assigns the value from the DB class method connect() to $dbh (could be an object or some other value) Example 5 is the same as 3 except that it assigns a reference of the value returned from the Mail class method factory() to $mail_object. Justin Garrett Beau Hartshorne [EMAIL PROTECTED] wrote in message 01c2ce00$d19797d0$6401a8c0@laptop">news:01c2ce00$d19797d0$6401a8c0@laptop... I'm just starting to use PEAR, and have seen several ways of instantiating the PEAR objects: $form = new HTML_QuickForm(); $form = new HTML_QuickForm(); $dbh = DB:connect(dsn); $dbh = new DB(); $mail_object = Mail::factory('sendmail', $params); Can anyone explain (or point to dome docs that explain) what the differences are, and when I should be using which method to work with PEAR objects? Thank you, Beau -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forking PHP
Anyone know a way to make PHP on windows fork itself into the background? Doesn't matter if it's a windows trick or whatever, aslong as it's possible so that it doens't appear in the start bar, thats fine. Preferably it would work under both Win98 and Win2000 but I'm not gonna be picky. Thanks very much. Adam Voigt [EMAIL PROTECTED]
[PHP] Re: Solutions need for resizing images (Thumbnail) on the fly..
Geckodeep schrieb: Thanks Goetz But how can I apply this having: Path to the folder is $folder='images/repor_images'; // path to the image. My 9image variables are $image1, $image2, $image3,. and the code to call the image ?php print img alt='$title' border=0 width= '103' heigth = '70' src=\$folder/$image1\ ? Thanks again. I should do coding the whole page I gues ;-) First of all some things to mention about: 1. Better store only filenames in the database and leave the images in the directory, cause you have to copy then to a location anyway to get it by an browser 2. Use an array of $image[] instead of numbering them like $image1, $image2, ... (you have to use eval to work with the numbers or have to write the code more than once !) Ok here it goes: ?php // guess you have JPEG images // -- $nr = 1;// start numbering your images $maxsize = 150; // maximum size in one direction // --- while($nr = 9) { $img = @imagecreatefromjpeg ($folder/$image[$nr]); // try to open if (!$im) { echo ERROR loading image $folder/$image[$nr] ; exit 1; } else { $imagehw = GetImageSize($img); $w = $imagehw; // width $h = $imagehw; // height // prevent division by zero if (($h ==0) || ($w==0)) exit; // get new size according to max size if ($h$w) { $new_h = $maxsize; // new height $new_w = (int) (($maxsize * $w) / $h); // casting to int ! } else { $new_w = $maxsize; // new width $new_h = (int) (($maxsize * $h) / $w); // casting to int ! } // build dummy image $thumb = imagecreate ($new_w, $new_h); // resize old image ImageCopyResized($thumb,$img,0,0,0,0,$new_w,$new_h,$w,$h); // maybe use tempname() to generate a temporary file name or // create name of thumbnail file like: *.jpg == *.png $tumbnail=substr($image[$nr],0,strrpos($image[$nr],.))..png; // save png image to same directory as jpg @imagepng ($thumb,$folder/$tumbnail); // hope we could write // leave the temporary data ... ImageDestroy($img); ImageDestroy($thumb); // finished work // --- // show image echo img alt=\$title\ border=\0\ width=\$new_w\ . heigth=\$new_h\ src=\$folder/$tumbnail\ ; } $nr++; // next image } ? maybe there might better ways but thats just a fast hack to work ... -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
Thanks for clearing that up. So input of type text does a set, which makes isset() true, but isset() does not return true if $var is merely empty. Jason Wong php-general@gremTo: [EMAIL PROTECTED] lins.bizcc: Subject: Re: [PHP] empty and isset 02/06/2003 11:28 AM Please respond to php-general On Thursday 06 February 2003 22:50, [EMAIL PROTECTED] wrote: input of type text are set regardless of whether you have entered anything. Thus isset() returns true. Actually, I believe it's not a matter of the input being set, but the fact that isset() returns true on an empty variable. Try this: ?php if (isset($doo)) { print '$doo is set'; // does not get printed } if (empty($doo)) { print '$doo is empty'; // gets printed } ? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The solution to a problem changes the nature of the problem. -- Peer */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Searching MySQL 'text' field
Hi there, You have to use full text search capabilities of MySQL. Please take a look mysql documentation for full text search. thanks Hardik --- Vernon [EMAIL PROTECTED] wrote: I've setup a search page using PHP which when searching a MySQL 'varchar' field it works just fine, but I'm trying to extend the search to include a field that is a 'text' field and it keeps coming back with no results. Is searching text fields allowed? It would seem that it only be logical that it would be. Is there something special I have to do to have this field searched? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Solutions need for resizing images (Thumbnail) on the fly..
Thanks goetz for your time, that's very kind of you to write the code. if i have any more questions i shall post it under new thread. Goetz Lohmann [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Geckodeep schrieb: Thanks Goetz But how can I apply this having: Path to the folder is $folder='images/repor_images'; // path to the image. My 9image variables are $image1, $image2, $image3,. and the code to call the image ?php print img alt='$title' border=0 width= '103' heigth = '70' src=\$folder/$image1\ ? Thanks again. I should do coding the whole page I gues ;-) First of all some things to mention about: 1. Better store only filenames in the database and leave the images in the directory, cause you have to copy then to a location anyway to get it by an browser 2. Use an array of $image[] instead of numbering them like $image1, $image2, ... (you have to use eval to work with the numbers or have to write the code more than once !) Ok here it goes: ?php // guess you have JPEG images // -- $nr = 1;// start numbering your images $maxsize = 150; // maximum size in one direction // --- while($nr = 9) { $img = @imagecreatefromjpeg ($folder/$image[$nr]); // try to open if (!$im) { echo ERROR loading image $folder/$image[$nr] ; exit 1; } else { $imagehw = GetImageSize($img); $w = $imagehw; // width $h = $imagehw; // height // prevent division by zero if (($h ==0) || ($w==0)) exit; // get new size according to max size if ($h$w) { $new_h = $maxsize; // new height $new_w = (int) (($maxsize * $w) / $h); // casting to int ! } else { $new_w = $maxsize; // new width $new_h = (int) (($maxsize * $h) / $w); // casting to int ! } // build dummy image $thumb = imagecreate ($new_w, $new_h); // resize old image ImageCopyResized($thumb,$img,0,0,0,0,$new_w,$new_h,$w,$h); // maybe use tempname() to generate a temporary file name or // create name of thumbnail file like: *.jpg == *.png $tumbnail=substr($image[$nr],0,strrpos($image[$nr],.))..png; // save png image to same directory as jpg @imagepng ($thumb,$folder/$tumbnail); // hope we could write // leave the temporary data ... ImageDestroy($img); ImageDestroy($thumb); // finished work // --- // show image echo img alt=\$title\ border=\0\ width=\$new_w\ . heigth=\$new_h\ src=\$folder/$tumbnail\ ; } $nr++; // next image } ? maybe there might better ways but thats just a fast hack to work ... -- @ Goetz Lohmann, Germany | Web-Developer Sys-Admin \/ -- () He's the fellow that people wonder what he does and || why the company needs him, until he goes on vacation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Including images with mail() or pear mail
I have a little app that sends email, All images I link back to the site Example: img src=http://www.site.com/images/pic1.gif; I know that with the normal mail() and pear mail function you can attach the image with the email. My question is what is better. Linking the image back to the site is very easy, but is there any disadvantage to this option, that attaching the image to the email would fix. In short I am looking for the pros and cons to both methods. Thanks, Mark. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] processing files
Is there a setting in the config file where I can tell php what extensions to process? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: best oop book
I got a lot out of Web Application Development with PHP4, by Tobias Ratshiller and Till Gerken, New Riders. Its not just about oop but covers this aspect well and is generally a very well written intermediate to advanced treatment of php. Also to keep ahead of the game this is an interesting article The Object-Oriented Evolution of PHP at http://www.devx.com/webdev/Article/10007/0/page/1 David Edward Peloke [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Ok, I have seen a suggestion or two for oop books but I would like to buy one so what is the best php object oriented book on the market...in everyone's opinion. The Professional PHP4 XML book looks good for xml, so I hope to get that one, I have a php/mysql book, just want a good oop book now. I have read a few reviews on the professional php book by wrox but it seems to need for oop stuff Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
On Friday 07 February 2003 01:35, [EMAIL PROTECTED] wrote: Thanks for clearing that up. Hmm, it seems like you still haven't grasped it yet :) So input of type text does a set, which makes isset() true, Correct. but isset() does not return true if $var is merely empty. Incorrect. Basically empty($var) returns TRUE if $var evaluates to FALSE, and in this context if $var is undefined it evaluates to FALSE. isset($var) returns TRUE if $var has been defined is a non-NULL value, and returns FALSE if $var is undefined or is set to NULL. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Conquering Russia should be done steppe by steppe. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Read file and get what i want
Hello gents, I made a script to open a file on a server and write his content to a temp file on my server. A part of the temp file is below: ***temp file** !GENERAL VERSION = 1 RELOAD = 1 UPDATE = 20030206181916 CONNECTED CLIENTS = 178 CONNECTED SERVERS = 12 !CLIENTS AHS5577:134723:RUBÉN FALCÓN LEBG:PILOT::42.226630:-1.795440:35248:423:T/B763/F:410:LEBL:35000:LEST:IVANB E:1:1:4001:0:40:0:I:1715:1715:1:30:4:30:NONE:NONE :LEBL - LOBAR 1C - UN725 - LOMDA 1G - LEST:::20030206181830 OBS::FRANCIS BALLION:ATC:199.999:44.791670:0.541670:0:0::IVANDE:9:1:0:0:100:: 20030206181821 I-JEST:127128:ROBERTO PIETRAFESA LIBG:PILOT::41.791590:12.244720:17:0:T/B737/T:300:LIRF:15000:LICD:IVANBE:1:1 :0:0:40:0:I:1930:1930:1:0:4:30:NONE:CHARTS ON BOARD :LIRF-ROTUN-CORAD-GIANO-PAL-PAL14-LONDI-MABOX-RATOK-MADIR-ASDAX-DEDUK-LPD-LI CD:::20030206181816 ELY0001:127632:OMRI ATAR LLBG:PILOT::31.996330:34.892110:153:0:T/B772/F:486:LLBG:FL380:KJFK:IVANGR2:1 :1:1200:0:40:0:I:1000:1100:1:30:4:30:NONE:NONE :DENA1E - SUVAS KAROL APLON MAROS DASNI TOMBI AYT KUMRU ELMAS EKSEN KFK HANKO GAYEM WRN BALIK ARGES BUKEL PELUR DEMUN REBLA KARIL PITOK SLC BABUS BNO BODAL VLM ILNEK DONAD VARIK PEROX SODRO TABAT TAMEB ROBEL KEMAD HMM RELBI RKN TENLI FLEVO:::20030206181756 DLH001:138912:MANUEL KAUFMANN EDDT:PILOT::52.556900:13.294230:133:28::IVANDE2:1:1:1200:0:40::: :::20030206181755 *End of temp file*** Now the tricky part... Each part is separated by a : Example AHS5577:134723:RUBÉN FALCÓN LEBG:PILOT:: first part is callsign, then is the id, then the name, type and so on and on (some parts has no data ::) Now, how do I get the first part (callsign) of each line so i can make something like: if ($first_part ==TAP){ echo TAP is online; } else { echo TAP isn't online; } Was I clear enough? Anyone has an ideia for this? Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty and isset
you need to test for empty strings such as which variables have when you submit an empty form .. if(!empty(varname) !empty(varname2) !empty(varname 3)..){ //do whatever if they have something usefull in them //this block of code will be ran if var_dumb() on all the //vars tested is than string(0) }else{ //do whatever if string().. is anything else } - Original Message - From: Bryan Lipscy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 12:20 AM Subject: RE: [PHP] empty and isset Env: Slackware 8.1, Apache 1.3.27, PHP 4.3.0 Bugs: None found for these issues. I am running to this same problem. The isset() function appears to have problems with the empty text value. The empty() function sees the value of $_POST['q1'] as expected. So why is both isset() and empty() returning true on q1? I included the is_null() to verify that the value is definitely not null. Submitting the empty form yields these results: Value of q1 == Value of q1 is NOT NULL Q1 is empty q2 is empty q3 is empty q4 is empty Values for q2, q3, and q4 all return as expected. Source follows: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEAD TITLE PHP Test /TITLE META NAME=Generator CONTENT=EditPlus META NAME=Author CONTENT= META NAME=Keywords CONTENT= META NAME=Description CONTENT= /HEAD BODY FORM action=test.php method=POST span id=q1Text: INPUT name=q1 type=text maxlength=128 value=/spanbr span id=q2Radio: input name=qa2 type=radio value=1 input name=qa2 type=radio value=2 input name=qa2 type=radio value=3 input name=qa2 type=radio value=4 /spanbr span id=q3Checkbox: input type=checkbox name=qa3 value=9/spanbr input type=submit value=Submit input type=Reset name=Resetbr /FORM /BODY /HTML PHP Source: ? if (isset($_POST['q1'])){ print Value of q1 == .$_POST['q1'].br; } if (is_null($_POST['q1'])){ print Value of q1 is nullbr; } else { print Value of q1 is NOT NULLbr; } if (empty($_POST['q1'])){ print Q1 is emptybr; } if (isset($_POST['q2'])){ print Value of q2 == .$_POST['q2'].br; } if (empty($_POST['q2'])){ print q2 is emptybr; } if (isset($_POST['q3'])){ print Value of q3 == .$_POST['q3'].br; } if (empty($_POST['q3'])){ print q3 is emptybr; } if (isset($_POST['q4'])){ print Value of q4 == .$_POST['q4'].br; } if (empty($_POST['q4'])){ print q4 is emptybr; } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: RE: [PHP] Variable Problem
no that doesnt work either what you get when you do that one in the edit box is: using: input type=text name=sent value=?php echo \$sent\;? or any different with echo in the value field gives me in the box: ?php \\;?} ...rest of the script outside the box - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 12:25 AM Subject: Re: Re: RE: [PHP] Variable Problem On Thursday 06 February 2003 07:48, Sunfire wrote: on any server i ever dealt with if i put: input type=sent value=?php\$sent\? in the edit box for the value i always always end up with ?php instead of what $sent stands for..the only way i found it to work is with echo but maybe im missing something With the above you should end up with a parse error. The correct syntax which should work regardless of your server settings is: input type=sent value=?php echo $sent; ? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Don't worry. Life's too long. -- Vincent Sardi, Jr. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Including images with mail() or pear mail
On Thursday 06 February 2003 19:12, Mark McCulligh wrote: I have a little app that sends email, All images I link back to the site Example: img src=http://www.site.com/images/pic1.gif; I know that with the normal mail() and pear mail function you can attach the image with the email. My question is what is better. Linking the image back to the site is very easy, but is there any disadvantage to this option, that attaching the image to the email would fix. In short I am looking for the pros and cons to both methods. What comesfirst to my mind is: pro linking to Website: - small mail con - user needs to be online to see it - this kind of linking could be disabled (you could create a link www.site.com?image?mail=32user=USERID and you know when and wether the user read the mail...) and some users could dislike this Best: Don't use images in a mail ;-) (just my opinion...) johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Read file and get what i want
You basically have two options. 1) You can use readfile() to open the file into an array then $line = explode(':', $file) in a for loop to split the values from each line. search for 'readfile' and 'explode' on php.net 2) You can fopen() the file and use $data = fgetcsv($fp, 1000, ':') then your desired information will be at $data[0]; search for 'fopen' and 'fgetcsv' on php.net Either way is equally valid. The only differences is the fopen method makes it alot easier to write data back to the delimited file if that's something you need to do. -Kevin - Original Message - From: Miguel Brás [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 06, 2003 11:40 AM Subject: [PHP] Read file and get what i want Hello gents, I made a script to open a file on a server and write his content to a temp file on my server. A part of the temp file is below: ***temp file** !GENERAL VERSION = 1 RELOAD = 1 UPDATE = 20030206181916 CONNECTED CLIENTS = 178 CONNECTED SERVERS = 12 !CLIENTS AHS5577:134723:RUBÉN FALCÓN LEBG:PILOT::42.226630:-1.795440:35248:423:T/B763/F:410:LEBL:35000:LEST:IVANB E:1:1:4001:0:40:0:I:1715:1715:1:30:4:30:NONE:NONE :LEBL - LOBAR 1C - UN725 - LOMDA 1G - LEST:::20030206181830 OBS::FRANCIS BALLION:ATC:199.999:44.791670:0.541670:0:0::IVANDE:9:1:0:0:100:: 20030206181821 I-JEST:127128:ROBERTO PIETRAFESA LIBG:PILOT::41.791590:12.244720:17:0:T/B737/T:300:LIRF:15000:LICD:IVANBE:1:1 :0:0:40:0:I:1930:1930:1:0:4:30:NONE:CHARTS ON BOARD :LIRF-ROTUN-CORAD-GIANO-PAL-PAL14-LONDI-MABOX-RATOK-MADIR-ASDAX-DEDUK-LPD-LI CD:::20030206181816 ELY0001:127632:OMRI ATAR LLBG:PILOT::31.996330:34.892110:153:0:T/B772/F:486:LLBG:FL380:KJFK:IVANGR2:1 :1:1200:0:40:0:I:1000:1100:1:30:4:30:NONE:NONE :DENA1E - SUVAS KAROL APLON MAROS DASNI TOMBI AYT KUMRU ELMAS EKSEN KFK HANKO GAYEM WRN BALIK ARGES BUKEL PELUR DEMUN REBLA KARIL PITOK SLC BABUS BNO BODAL VLM ILNEK DONAD VARIK PEROX SODRO TABAT TAMEB ROBEL KEMAD HMM RELBI RKN TENLI FLEVO:::20030206181756 DLH001:138912:MANUEL KAUFMANN EDDT:PILOT::52.556900:13.294230:133:28::IVANDE2:1:1:1200:0:40::: :::20030206181755 *End of temp file*** Now the tricky part... Each part is separated by a : Example AHS5577:134723:RUBÉN FALCÓN LEBG:PILOT:: first part is callsign, then is the id, then the name, type and so on and on (some parts has no data ::) Now, how do I get the first part (callsign) of each line so i can make something like: if ($first_part ==TAP){ echo TAP is online; } else { echo TAP isn't online; } Was I clear enough? Anyone has an ideia for this? Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] processing files
On Thursday 06 February 2003 19:18, Edward Peloke wrote: Is there a setting in the config file where I can tell php what extensions to process? Not in the PHP configuration but in the Server configuration. For Apache add something like AddType application/x-httpd-php .xyz to your httpd.conf, .htacces file to tell apache to parse all files ending .xyz using PHP johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Including images with mail() or pear mail
I don't like using images in emails too, but what the customer wants they get. Mark. Johannes Schlueter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thursday 06 February 2003 19:12, Mark McCulligh wrote: I have a little app that sends email, All images I link back to the site Example: img src=http://www.site.com/images/pic1.gif; I know that with the normal mail() and pear mail function you can attach the image with the email. My question is what is better. Linking the image back to the site is very easy, but is there any disadvantage to this option, that attaching the image to the email would fix. In short I am looking for the pros and cons to both methods. What comesfirst to my mind is: pro linking to Website: - small mail con - user needs to be online to see it - this kind of linking could be disabled (you could create a link www.site.com?image?mail=32user=USERID and you know when and wether the user read the mail...) and some users could dislike this Best: Don't use images in a mail ;-) (just my opinion...) johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php