[PHP] Installing Imagemagick on Windows
Hi, I need help with installing Imagemagick on Windows. I tried googling but there is no solution provided. I discovered that a lot of people are having the same problem as me. After placing the dll in the extension folder and adding in extension=php_imagick.dll into php.ini, Apache will hit error Unknow(): Unable to load dynamic library F:\php\extensions\php_imagick.dll. I believe that my php.ini is configured correctly. I am able to load other extensions with out any error. This is what is in my php.ini file extension_dir = F:\php\extensions\ extension=php_imagick.dll What should I do with the ImageMagick library? Is there a step by step guide on installing imagemagick? With versions of library and links to download them? Thanks in advance, Ai Leen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Willing to Pay For Upgrade Help
I am willing to do it. what is your distribution? troby Da St 2. Jn 2004 06:08 Ryan Schefke napsal: Is any Linux techie out there willing to accept a small payment to upgrade my Linux dedicated root server from PHP 4.2.2 to PHP 4.3.3 (or 4.3.6, whichever is recommended)? I need to leverage the latest version of GD Library for better quality picture uploads. I'm a windows guy and don't have much experience with shell commands and Linux machines. Thanks, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can session.save_path data be saved to a database instead of a file system?
I have 2 servers fail-over/load-balanced behind an F5 bigIP. I want session data to be maintained in the event one server takes a dive. In this scenario, if a user is in the middle of doing something while logged in, they will not have to lose all work and log back into the server to continue working. Can that be done without rewriting an application? I saw a link here: http://www.phpfreaks.com/quickcode/DB_eSession_class_securely_stores_PHP_sessions_in_a_MySQL_DB/286.php but this seems to be something that would have to be written into the application and I didn't write it and do not want to take on the responsibility to do so from here. Any thoughts would be much appreciated. Thank You, Caleb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: GD Library Upgrade
On Wednesday 02 June 2004 07:47, Ryan Schefke wrote: I have root access to my server. It's a dedicated server with 1and1.com. OK. I have zero experience with shell commands and will be working off of any directions I can find online. There're plenty of those to be found. The list archives should have plenty of posts from myself (and others!) regarding the recompiling/reconfiguring of PHP and the installation of GD lib. I'm researching whether to upgrade PHP from 4.2.2 to 4.3.6 or just upgrade the GD Library from 1.8.4 to the latest. But I'm still not sure if it's best to upgrade the entire thing or just the library. Well one way to base your decision on salient facts is to find out what has changed between the 4.2.2 4.3.6 (and the intervening versions) by reading the changelogs. Then decide whether the bug fixes and improvements are worth your while to upgrade to. I'm totally new at installing apps via shell...if anyone is interested in doing it for a small fee please let me know! If you're using a pre-installed dedicated server then it's more than likely it has a version of RedHat on it. You may be lucky and be able to upgrade PHP via RPM. But AFAIK RedHat has never (or hardly ever) provided PHP upgrades. -- 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 -- /* Windows 99 has been released! (PC Magazine, April 2013) */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] text search in database
Hi, I need to do a text search on some fileds in a database. I would like the users to be able to use some syntax like 'AND' 'OR' 'NOT' parentheses () and quotes to make their search queries more powefull. I face 2 problems : 1. parse the query 2. execute the search (create the appropriate SQL query) Do you known of any existing package that could parse such a syntax and /or generate some kind of sql query? tank you, vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using Paradox and Delphi with PHP
Is there any way to use a Paradox database with PHP? I have an aplication made in Delphi using Paradox and I need to attack the Paradox database using PHP. Do you know if there is anyway? Thanks in advance!! ;)
Re: [PHP] RewriteUrl + open_basedir
Markus Post a écrit : DocumentRoot /srv/www RewriteRule ^/(.*)/(.*)$/$1/$2 This redirects the request http://domain.de/dir1/dir2 to the local files /srv/www/dir1/dir2/ and works fine. No RewriteRule necessary to do this: '/dir1/dir2' becomes '/dir1/dir2' btw RewriteRule ^/([^/]+)/(.*)$ /$1/$2 is little better coz '.' can match '/' and /d1/d2/d3 is then no more ambiguous See http://httpd.apache.org/docs/mod/mod_rewrite.html and http://httpd.apache.org/docs/misc/rewriteguide.html php_admin_value open_basedir /srv/www/$1, but it doesn´t work. open_basedir can use multiple (: or ; separated) dirs if you want See http://www.php.net/features.safe-mode Perhaps you meant something like this: NameVirtualHost 1.2.3.4 NameVirtualHost 5.6.7.8 VirtualHost 1.2.3.4 ServerName site1.com DocumentRoot /var/www/site1 php_admin_value open_basedir /var/www/site1 /VirtualHost VirtualHost 5.6.7.8 ServerName site2.com DocumentRoot /var/www/site2 php_admin_value open_basedir /var/www/site1 /VirtualHost Or perhaps you want something more sophisticated, like Dynamically configured mass virtual hosting http://httpd.apache.org/docs/vhosts/mass.html Hope it helps Christophe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newbie Guide] For the benefit of new members
=== Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try http://www.php.net/manual/faq.php for answers to frequently answered questions about PHP (added by Christophe Chisogne). 2. Try http://www.google.com next. Searching for php YOUR QUERY may fetch you relevant information within the first 10 results. 3. There is a searchable archive of the mailing list discussion at http://phparch.com/mailinglists. Many of the common topics are discussed repeatedly, and you may get answer to your query from the earlier discussions. For example: One of the repeatedly discussed question in the list is Best PHP editor. Everyone has his/her favourite editor. You can get all the opinions by going through the list archives. If you want a chosen list try this link : http://www.thelinuxconsultancy.co.uk/phpeditors/ (contributed by Christophe Chisogne). 4. Not sure if PHP is working or you want find out what extensions are available to you? Just put the following code into a file with a .php extension and access it through your webserver: ?php phpinfo(); ? If PHP is installed you will see a page with a lot of information on it. If PHP is not installed (or not working correctly) your browser will try to download the file. (contributed by Teren and reworded by Chris W Parker) 5. If you are stuck with a script and do not understand what is wrong, instead of posting the whole script, try doing some research yourself. One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. After diagnosing the problem, send the details of your efforts (following steps 1, 2 3) and ask for help. 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side settings. You need to go for JavaScript and ask the question in a JavaScript list. On the other hand, you can access the information that is SENT by the user's browser when a client requests a page from your server. You can find details about browser, OS etc as reported by this request. - contributed by Wouter van Vliet and reworded by Chris W Parker. 7. Provide a clear descriptive subject line. Avoid general subjects like Help!!, A Question etc. Especially avoid blank subjects. 8. When you want to start a new topic, open a new mail composer and enter the mailing list address [EMAIL PROTECTED] instead of replying to an existing thread and replacing the subject and body with your message. 9. It's always a good idea to post back to the list once you've solved your problem. People usually add [SOLVED] to the subject line of their email when posting solutions. By posting your solution you're helping the next person with the same question. [contribued by Chris W Parker] 10. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html [contributed by Jay Blanchard) 11. Do not send your email to the list with attachments. If you don't have a place to upload your code, try the many pastebin websites (such as www.pastebin.com). [contributed by Burhan Khalid] -- Integrated Management Tools for leather industry -- http://www.leatherlink.net Ma Siva Kumar, BSG LeatherLink (P) Ltd, No 21, First Main Road, Jai Nagar, Arumbakkam, Chennai - 600106 Tel : +91 44 55191757 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: text search in database
Vincent DUPONT wrote: Hi, I need to do a text search on some fileds in a database. I would like the users to be able to use some syntax like 'AND' 'OR' 'NOT' parentheses () and quotes to make their search queries more powefull. I face 2 problems : 1. parse the query 2. execute the search (create the appropriate SQL query) Do you known of any existing package that could parse such a syntax and /or generate some kind of sql query? tank you, vincent MySQL has a FULLTEXT index type which might provide what you need. I'm also using a program called SWISH-E (http://www.swish-e.org/) to index my website but it also allows you to index data from any source by using a custom spider. You could set this to extract data from your database in the correct format for indexing. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can session.save_path data be saved to a database instead of a file system?
Caleb Walker wrote: I have 2 servers fail-over/load-balanced behind an F5 bigIP. I want session data to be maintained in the event one server takes a dive. In this scenario, if a user is in the middle of doing something while logged in, they will not have to lose all work and log back into the server to continue working. Can that be done without rewriting an application? I saw a link here: http://www.phpfreaks.com/quickcode/DB_eSession_class_securely_stores_PHP_sessions_in_a_MySQL_DB/286.php but this seems to be something that would have to be written into the application and I didn't write it and do not want to take on the responsibility to do so from here. Any thoughts would be much appreciated. Thank You, Caleb Yes, you can use a database to store session data and retain existing session manipulation methods. Surprisingly, the PHP manual tells you how: http://uk.php.net/manual/en/function.session-set-save-handler.php And lists a couple of examples, including this one at Zend: http://www.zend.com/zend/spotlight/code-gallery-wade8.php Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SELECT
Hi, Is there any way to select all entries in the database except one entry or tho entries? Thanks
[PHP] Re: SELECT
SELECT * FROM foo_table WHERE field_foo some_value The above will select all from foo_table except where field_foo is equal to some value. HTH Craig Phpu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Is there any way to select all entries in the database except one entry or tho entries? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] text search in database
Vincent DUPONT wrote: I need to do a text search on some fileds in a database. It'd help if you said what database you're using and posted this on [EMAIL PROTECTED] -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SELECT
Phpu wrote: Is there any way to select all entries in the database except one entry or tho entries? Yes. http://www.bigredspark.com/answers.html -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to insert form data
I am trying to learn how to take the value of $name and $quote from a form and put it in the database -whosaid but obviuosly i have it all wrong. Can anyone point out what im doing wrong. thx in advance ?php include(connect.php); $name = $_POST['name']; $quote = $_POST['quote']; $sql = INSERT INTO whosaid values (name='$name',quote='$quote'); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to insert form data
INSERT into whosaid (name, quote) values ('$name', '$quote'); -Original Message- From: BigMark [mailto:[EMAIL PROTECTED] Sent: Thursday, June 03, 2004 5:13 AM To: [EMAIL PROTECTED] Subject: [PHP] how to insert form data I am trying to learn how to take the value of $name and $quote from a form and put it in the database -whosaid but obviuosly i have it all wrong. Can anyone point out what im doing wrong. thx in advance ?php include(connect.php); $name = $_POST['name']; $quote = $_POST['quote']; $sql = INSERT INTO whosaid values (name='$name',quote='$quote'); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Technikon or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how to insert form data
?php include(connect.php); $name = $_POST['name']; $quote = $_POST['quote']; $sql = mysql_query(INSERT INTO whosaid (name,quote) VALUES (' . $name . ',' . $quote . ')); ? HTH Craig Bigmark [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am trying to learn how to take the value of $name and $quote from a form and put it in the database -whosaid but obviuosly i have it all wrong. Can anyone point out what im doing wrong. thx in advance ?php include(connect.php); $name = $_POST['name']; $quote = $_POST['quote']; $sql = INSERT INTO whosaid values (name='$name',quote='$quote'); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how to insert form data
OK no errors now but no data inserted, my form must be wrong as well. form method=post action=input.php NAME input name=textfield type=text id=name QUOTE input name=textarea type=text id=quote input type=submit name=Submit value=Submit /form -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: how to insert form data
Should be: form name=form meth0d=post action=input/php NAME: input type=text name=name id=name / QUOTE: textarea name=quote id=quote/textarea input type=submit name=submit value=Submit / /form HTH Matt On 3 Jun 2004, at 04:33, BigMark wrote: OK no errors now but no data inserted, my form must be wrong as well. form method=post action=input.php NAME input name=textfield type=text id=name QUOTE input name=textarea type=text id=quote input type=submit name=Submit value=Submit /form -- 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: how to insert form data
Well getting closer now, its inserting into the tables but they are blank (no text) Any ideas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: how to insert form data
[snip] Well getting closer now, its inserting into the tables but they are blank (no text) [/snip] Have you echo'd out the values to the screen? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: how to insert form data
[snip] Well getting closer now, its inserting into the tables but they are blank (no text) [/snip] let's go short...(and watch for/avoid keywords like 'name') form.php form action=input.php method=POST input type=text name=username input type=submit name=submit value=Submit /form input.php ?php $username = $_POST['username']; echo $username . br\n; $sql = INSERT INTO whosaid (username) VALUES (' . $username . '); if(!($insert = mysql_query($sql, $yourConnectionString))){ echo mysql_error . \n; exit(); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: how to insert form data
[snip] thanks works fine [/snip] No problem...a couple of notes a. Avoid using words that may be key words (such as 'name'). There are lists available for you database and PHP at their websites. 2. Always respond to the list as a private response may get inadvertently dumped to the spam folder. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP OpenSSL on the fly EAP/TLS certificates generation
Hi all ! I would like PHP to generate on the fly EAP/TLS certificates. Firt I wanted to use a shell script, but PHP can not answer yes (key y) through proc_open when I wanted, so that now, I would like to now if PHP is able to do the same things as when you call openssl with a shell script. I'm not sure it is clear ? If anybody wants I can send or show the shell scripts. -- ciAo, Florian [EMAIL PROTECTED] http://alphacore.net This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Spammers
agreed!!! -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 01, 2004 7:44 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Spammers John Nichel wrote: Steve Douville wrote: So, as I hit the send button, I know I'll have 3 messages to delete in a few seconds. No big deal... Set up a filter. Everyone says use a filter, but you need to think of the resource issue as well. There are at least 2 (probably more) servers which have to process this mail. In addition, extra bandwidth is used. This may not seem like much, but it's still a complete waste of resources. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Disclaimer This e-mail transmission contains confidential information, which is the property of the sender. The information in this e-mail or attachments thereto is intended for the attention and use only of the addressee. Should you have received this e-mail in error, please delete and destroy it and any attachments thereto immediately. Under no circumstances will the Cape Technikon or the sender of this e-mail be liable to any party for any direct, indirect, special or other consequential damages for any use of this e-mail. For the detailed e-mail disclaimer please refer to http://www.ctech.ac.za/polic or call +27 (0)21 460 3911 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sessions handling
Hi folks, We have two instances of apache/mod_php running on 80 and 443 ports accordingly. For both mod_php we have the same dir (/tmp) to store session information. Is it possible to mix sessions data up if user switches between 80 and 443 ports? I mean what if when user surfs over 80 port and has already sessionID in this mod_php context(PHPSESSID stores in cookie), then he jumps to 443 instance, would that mod_php correctly find proper session file? Is it possible that PHPSESSID in 443 context hasn't been initialized and mod_php won't get proper file? Regards, Dima Ruban -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sessions handling
Hi, I beleive that if both servers run the same hostname (www.foo.com) (cookie domain) and both session files are stored in the same place (/tmp), then the session is unique for 80 and 443 ports. you could simply test this be adding a $_SESSION['foo']='port80'; on the HTTP server instance and trying to print($_SESSION['foo'] when the user enters the HTTPS (443) pages However, i believe this could be a security issue if both secure and non secure sites use the same cookie. keep us informed. Vincent -Original Message- From: Dmitry Ruban [mailto:[EMAIL PROTECTED] Sent: mercredi 2 juin 2004 15:02 To: [EMAIL PROTECTED] Subject: [PHP] sessions handling Hi folks, We have two instances of apache/mod_php running on 80 and 443 ports accordingly. For both mod_php we have the same dir (/tmp) to store session information. Is it possible to mix sessions data up if user switches between 80 and 443 ports? I mean what if when user surfs over 80 port and has already sessionID in this mod_php context(PHPSESSID stores in cookie), then he jumps to 443 instance, would that mod_php correctly find proper session file? Is it possible that PHPSESSID in 443 context hasn't been initialized and mod_php won't get proper file? Regards, Dima Ruban -- 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] spam filter
Hi there, I am working on a spam filter for email forms. To improve it it would be great to compare 2 text and to find out how equal they are. Is there a function in php wich compares 2 text and returns a percentage of equality? The system allready checks for spam keywords, but there are some spam text which are verry difficult to identify. So if a person submits the same text to more people this would be another factor to check. Thank you for any help, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Refresh and retry when using back button on IE
Hi I need to know if there is any code that can be used to get rid of the refresh and retry when using the back button in internet explorer. Every time i get info from the database and display the result, and i use the back button it says Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button. and the when you refresh it says: The page cannot be refreshed without resending the information. Click retry to send the information again, or click cancel to return to the page that you were trying to view. This is very irritating. Can someone tell me how to resend the info automatically, please Thanks Pieter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strtotime() weirdness
Alex Hogan wrote: Does anybody know of any peculiarities in the strtotime() function? If I enter any date before 1 Jan 1970 I get a -1 returned. Note: The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.) Additionally, not all platforms support negative timestamps, therefore your date range may be limited to no earlier than the Unix epoch. This means that e.g. dates prior to Jan 1, 1970 will not work on Windows, some Linux distributions, and a few other operating systems. http://www.php.net/strtotime -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Refresh and retry when using back button on IE
Pieter from SA wrote: Hi I need to know if there is any code that can be used to get rid of the refresh and retry when using the back button in internet explorer. Every time i get info from the database and display the result, and i use the back button it says Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button. and the when you refresh it says: The page cannot be refreshed without resending the information. Click retry to send the information again, or click cancel to return to the page that you were trying to view. This is very irritating. Can someone tell me how to resend the info automatically, please Use GET method instead of POST, but only in forms that don't change state on the server (i.e. search). Use POST method only for forms that for example insert new entry in the db. And you should redirect right after making the action, so the posted page does not stay in the browser's history. HTH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] need advice on an i18n english to arabic function
I have a website in English, it is translated in many languages already (Spanish, french, German...), and i wanna translate it in Arabic, everytime i have a word in English i use a function like this i18n(MyEnglishWord) and the i18n function look up in an arabic.inc that contains a list of English words translated in Arabic such as: $this = ; $house =; etc... that works Ok but the problem is that Arabic reads from right to left so i need to redo my php and html code. is there a way to do this easily or is there any method I should know of to ease my task? thanx in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Refresh and retry when using back button on IE
Pieter from SA wrote: I need to know if there is any code that can be used to get rid of the refresh and retry when using the back button in internet explorer. Every time i get info from the database and display the result, and i use the back button it says Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button. and the when you refresh it says: The page cannot be refreshed without resending the information. Click retry to send the information again, or click cancel to return to the page that you were trying to view. This is very irritating. Can someone tell me how to resend the info automatically, please You can't resend it automatically otherwise you could post any arbitrary data for the users. The common solution for this is a middle-man technique. The middle-man is a PHP page that hanldes the form submission, sends the email, submits in the database, etc, and then forwards to another page using header(). Now, when Back is used, they're taken back to the form they filled out and not the page that processes the form; so there is no re-post request. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can session.save_path data be saved to a database instead of a file system?
On Wed, 02 Jun 2004 10:29:31 +0100, Michael Nolan wrote: Caleb Walker wrote: I have 2 servers fail-over/load-balanced behind an F5 bigIP. I want session data to be maintained in the event one server takes a dive. In this scenario, if a user is in the middle of doing something while logged in, they will not have to lose all work and log back into the server to continue working. Can that be done without rewriting an application? I saw a link here: http://www.phpfreaks.com/quickcode/DB_eSession_class_securely_stores_PHP_sessions_in_a_MySQL_DB/286.php but this seems to be something that would have to be written into the application and I didn't write it and do not want to take on the responsibility to do so from here. Any thoughts would be much appreciated. Thank You, Caleb Yes, you can use a database to store session data and retain existing session manipulation methods. Surprisingly, the PHP manual tells you how: http://uk.php.net/manual/en/function.session-set-save-handler.php And lists a couple of examples, including this one at Zend: http://www.zend.com/zend/spotlight/code-gallery-wade8.php Mike This looks like modifications that need to be made to the application. I dont really want to touch the application. Instead I just want PHP, through the php.ini file or whatever to take the session data and put it in a database instead of the file system. In doing it this way, I assume that I will not have to touch somebody else's code. Thanks for the response. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] email formatting
Is it possible to have this code changed easily to make the output run horizontally instead of vertically. example of current output to email below code // //email selections to all users $sql = SELECT email_address FROM Users; $result = mysql_query($sql); while ($myrow = mysql_fetch_array($result)) { $email = $myrow['email_address']; $subject = Mark's Footy Tipping Competition; $message = Hi, Round $Round is now closed. Selections were: $selections Thanks! Mark This is an automated response, please do not reply!; mail($email, $subject, $message, From: Mark$fromemailaddress\nX-Mailer: PHP/ . phpversion()); } /// outputs like this Hi, Round 10 is now closed. Selections were: Glen Gosnay - Game 1 Essendon Glen Gosnay - Game 2 Hawthorn Glen Gosnay - Game 3 West Coast Glen Gosnay - Game 4 Kangaroos Glen Gosnay - Game 5 Sydney Glen Gosnay - Game 6 Geelong Glen Gosnay - Game 7 St Kilda Glen Gosnay - Game 8 Brisbane Wayne Gosnay - Game 1 Essendon Wayne Gosnay - Game 2 Hawthorn Wayne Gosnay - Game 3 West Coast Wayne Gosnay - Game 4 Collingwood Wayne Gosnay - Game 5 Sydney Wayne Gosnay - Game 6 Port Adelaide Wayne Gosnay - Game 7 St Kilda Wayne Gosnay - Game 8 Brisbane Sean Dsouza - Game 1 Essendon Sean Dsouza - Game 2 Adelaide Sean Dsouza - Game 3 West Coast Sean Dsouza - Game 4 Collingwood Sean Dsouza - Game 5 Sydney Sean Dsouza - Game 6 Port Adelaide Sean Dsouza - Game 7 St Kilda Sean Dsouza - Game 8 Brisbane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] email formatting
When you create $selections Make sure you add a '\n' to the end of each line... EG: $selection .= $myrow[result1]\n; BigMark [EMAIL PROTECTED] 03/06/2004 08:28 To [EMAIL PROTECTED] cc Subject [PHP] email formatting Is it possible to have this code changed easily to make the output run horizontally instead of vertically. example of current output to email below code // //email selections to all users $sql = SELECT email_address FROM Users; $result = mysql_query($sql); while ($myrow = mysql_fetch_array($result)) { $email = $myrow['email_address']; $subject = Mark's Footy Tipping Competition; $message = Hi, Round $Round is now closed. Selections were: $selections Thanks! Mark This is an automated response, please do not reply!; mail($email, $subject, $message, From: Mark$fromemailaddress\nX-Mailer: PHP/ . phpversion()); } /// outputs like this Hi, Round 10 is now closed. Selections were: Glen Gosnay - Game 1 Essendon Glen Gosnay - Game 2 Hawthorn Glen Gosnay - Game 3 West Coast Glen Gosnay - Game 4 Kangaroos Glen Gosnay - Game 5 Sydney Glen Gosnay - Game 6 Geelong Glen Gosnay - Game 7 St Kilda Glen Gosnay - Game 8 Brisbane Wayne Gosnay - Game 1 Essendon Wayne Gosnay - Game 2 Hawthorn Wayne Gosnay - Game 3 West Coast Wayne Gosnay - Game 4 Collingwood Wayne Gosnay - Game 5 Sydney Wayne Gosnay - Game 6 Port Adelaide Wayne Gosnay - Game 7 St Kilda Wayne Gosnay - Game 8 Brisbane Sean Dsouza - Game 1 Essendon Sean Dsouza - Game 2 Adelaide Sean Dsouza - Game 3 West Coast Sean Dsouza - Game 4 Collingwood Sean Dsouza - Game 5 Sydney Sean Dsouza - Game 6 Port Adelaide Sean Dsouza - Game 7 St Kilda Sean Dsouza - Game 8 Brisbane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php * The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image resize problems
I have looked at several of the functions and tried a few tutorials online but am not having much luck for some reason resizing images. I have this code which works fine but everytime I try to add some resizing code, I get the error that the image is not a valid image resource. I have even hardcoded the values to an image I know exists and get the same error. I would like to resize the images on upload to 250 wide but nothing seems to work. $upload_dir = ../images/property_$id; //When REGISTERED_GLOBALS are off in php.ini $_POST= $HTTP_POST_VARS; $_GET = $HTTP_GET_VARS; //Upload the file if($_GET['method'] == upload) { $file_array = $HTTP_POST_FILES['file']; $_SESSION['message'] = ; $uploads = false; for($i = 0 ; $i $files_to_upload; $i++) { if($_FILES['file']['name'][$i]) { $uploads = true; if($_FILES['file']['name'][$i]) { $file_to_upload = $upload_dir./.$_FILES['file']['name'][$i]; $thisName=$_FILES['file']['name'][$i]; $sql-query(update properties set main_thumb='$thisName' where id=$id and main_thumb is null); move_uploaded_file($_FILES['file']['tmp_name'][$i],$file_to_upload); chmod($file_to_upload,0777); // add image resize $_SESSION['message'] .= $_FILES['file']['name'][$i]. uploaded.br; } } } if(!$uploads) $_SESSION['message'] = No files selected!; } Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Newbie needs a little help 1-on-1
Mike wrote: Ok, I'm a pretty fast learn but syntax and basic lack of serious programming background hinder my efforts. I can make Javascript do what I want it to and usually perl also but I'm in over my head with my PHP project and I'm on a deadline. Objective: To create a set of forms that 1) input data to a MySQL database (done) 2) login to that database with a username and password and set thos values with a cookie while redirecting the user to a form for updating data (mostly done) 3) use the values of the set cookie to call the users record into that form for modification (begun) 4) Modify the data on submit Additional Objectives: 1) create a calculator that takes length x width x depth in inches and results a cubic foot calculation. I've been doing some of the work with Dreamweaver MX, but I'm getting some unfound XML error on one of the extension forms so that the code is not generated. Know anything about this? I would like to have an email and phone exchange to finish up this thing. It's mostly done but I may need syntax and query help. If you are comfortable with mid level PHP please email ASAP. I'm on Long Island and work late into the evening so calls are no problem. I have flat rate phone and can call you back. Mike [EMAIL PROTECTED] PS - if you are hip to Burning Man, this project relates to that and I'm doing it as a labor of love. Well If you're doing record editing...or any form-based DB data editing, the PEAR package DB_DataObject_FormBuilder can do it for you. You (basically) give it a record and it builds the form and lets users update it. It will automatically insert / update based on what kind of data you give it. It has some very cool and powerful features. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Stats] PHP Net List: May 2004
-- Searchable archives for this list are available at http://www.listsearch.com/phplist.lasso -- == PHP Net List Stats May, 2004 == Note: Up/Down % as compared with April, 2004 Posts: 2237 (Down 28%) Authors: 469 (Down 10%) Threads: 602 (Down 17%) Top 20 Contributors by Number of Posts -- Curt Zirzow112 Torsten Roehr 101 John W. Holmes 83 John Nichel 65 Daniel Clark65 Jay Blanchard 51 msa 34 raditha dissanayake 32 Richard Davey 30 René Fournier 28 Aidan Lister27 Travis Low 27 Dave Carrera26 Marek Kilimajer 24 Justin Patrin 24 Brent Clark 23 Burhan Khalid 23 Jason Barnett 22 Chris W. Parker 22 Matt Matijevich 20 Top 20 Threads by Number of Posts -- [PHP] repeating data from one column until data from another co... 28 [PHP] what is wrong with my php code? 26 [PHP] assignment of data into a 2 dimensional array 23 [PHP] strip comments from HTML? 22 [PHP] HTTP_RAW_POST_DATA21 [PHP] IF statement question... 19 [PHP] sessions failing to persist 16 [PHP] paging methodology15 [PHP] php and java applets 15 [PHP] sessions 15 [PHP] protecting web page 14 [PHP] Plz help quick - mysql/php/web server undefined function... 13 [PHP] HTTP_REFERER ... ?13 [PHP] Variables Help13 [PHP] Why would a socket be unavailable?13 [PHP] Date Function - Empty Value 13 [PHP] Select from 24 tables 12 [PHP] form submission logic 12 [PHP] system command? 12 [PHP] Simple MySQL/PHP Query12 Top 20 Search Terms by Number of Requests -- undefined3 _session 3 coppermine 2 server 2 through 2 variable:2 Can't2 socket 2 connect 2 session 2 to 2 gallery 2 local2 MySQL2 (2) 1 repeating1 MySQL-Link 1 remote_addr 1 supplied
[PHP] Sorting an array
Okay, I know someone is going to shoot me for asking such a dumb question, but I just can't seem to find the answer anywhere. I have a multidimensional array which I would like to sort on the value of one of the keys... Array ( [0] = Array ( [foo] = blah [bar] = blah [sort] = 5 ) [1] = Array ( [foo] = blah [bar] = blah [sort] = 2 ) [2] = Array ( [foo] = blah [bar] = blah [sort] = 4 ) [3] = Array ( [foo] = blah [bar] = blah [sort] = 3 ) [4] = Array ( [foo] = blah [bar] = blah [sort] = 1 ) ) What I would like to do is sort this on the value of 'sort' in each sub-array. What am I missing TIA -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: image resize problems
Edward Peloke wrote: I have looked at several of the functions and tried a few tutorials online but am not having much luck for some reason resizing images. I have this code which works fine but everytime I try to add some resizing code, I get the error that the image is not a valid image resource. I have even hardcoded the values to an image I know exists and get the same error. I would like to resize the images on upload to 250 wide but nothing seems to work. $upload_dir = ../images/property_$id; //When REGISTERED_GLOBALS are off in php.ini $_POST= $HTTP_POST_VARS; $_GET = $HTTP_GET_VARS; //Upload the file if($_GET['method'] == upload) { $file_array = $HTTP_POST_FILES['file']; $_SESSION['message'] = ; $uploads = false; for($i = 0 ; $i $files_to_upload; $i++) { if($_FILES['file']['name'][$i]) { $uploads = true; if($_FILES['file']['name'][$i]) { $file_to_upload = $upload_dir./.$_FILES['file']['name'][$i]; $thisName=$_FILES['file']['name'][$i]; $sql-query(update properties set main_thumb='$thisName' where id=$id and main_thumb is null); move_uploaded_file($_FILES['file']['tmp_name'][$i],$file_to_upload); chmod($file_to_upload,0777); // add image resize $_SESSION['message'] .= $_FILES['file']['name'][$i]. uploaded.br; } } } if(!$uploads) $_SESSION['message'] = No files selected!; } Thanks, Eddie WARNING: The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed. This message may contain information that is privileged, confidential and exempt from disclosure under applicable law. It may also contain trade secrets and other proprietary information for which you and your employer may be held liable for disclosing. You are hereby notified that any unauthorized dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify [EMAIL PROTECTED] by E-Mail and then destroy this communication in a manner appropriate for privileged information. Here's some code I use: $fileinfo = pathinfo($file); switch(strtolower($fileinfo['extension'])) { case 'png': $ifh = imagecreatefrompng($dir.$file); break; case 'jpg': case 'jpeg': case 'jpe': $ifh = imagecreatefromjpeg($dir.$file); break; case 'gif': $ifh = imagecreatefromgif($dir.$file); break; default: echo ' I don\'t know what to do with the extension '.$fileinfo['extension'].\n; exit; break; } $swidth = imagesx($ifh); $sheight = imagesy($ifh); $ih = imagecreatetruecolor($width + $edge * 2, $height + $edge * 2); imagealphablending($ih, true); if($swidth $sheight) { $nwidth = $width; $nheight = (int)($sheight / $swidth * $nwidth); $x = 0; $y = ($height - $nheight) / 2; } else if($sheight $swidth) { $nheight = $height; $nwidth = (int)($swidth / $sheight * $nheight); $y = 0; $x = ($width - $nwidth) / 2; } else { $nwidth = $width; $nheight = $height; $x = $y = 0; } imagecopyresampled($ih, $ifh, $x + $edge, $y + $edge, 0, 0, $nwidth, $nheight, $swidth, $sheight); header('Content-Type: image/jpeg'); imagejpeg($ih); -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sorting an array
On Wed, 2004-06-02 at 12:59, John Nichel wrote: Okay, I know someone is going to shoot me for asking such a dumb question, but I just can't seem to find the answer anywhere. I have a multidimensional array which I would like to sort on the value of one of the keys... Array ( [0] = Array ( [foo] = blah [bar] = blah [sort] = 5 ) [1] = Array ( [foo] = blah [bar] = blah [sort] = 2 ) [2] = Array ( [foo] = blah [bar] = blah [sort] = 4 ) [3] = Array ( [foo] = blah [bar] = blah [sort] = 3 ) [4] = Array ( [foo] = blah [bar] = blah [sort] = 1 ) ) What I would like to do is sort this on the value of 'sort' in each sub-array. What am I missing TIA usort( $theAboveArray, 'mySortHandler' ); function mySortHandler( $v1, $v2 ) { if( $v1['sort'] $v2['sort'] ) { return 1; } else if( $v1['sort'] $v2['sort'] ) { return -1; } return 0; } Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sorting an array
[snip] What I would like to do is sort this on the value of 'sort' in each sub-array. What am I missing TIA [/snip] http://us4.php.net/manual/en/function.array-multisort.php HTH! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sorting an array
Robert Cummings wrote: On Wed, 2004-06-02 at 12:59, John Nichel wrote: What I would like to do is sort this on the value of 'sort' in each sub-array. What am I missing TIA usort( $theAboveArray, 'mySortHandler' ); function mySortHandler( $v1, $v2 ) { if( $v1['sort'] $v2['sort'] ) { return 1; } else if( $v1['sort'] $v2['sort'] ) { return -1; } return 0; } Cheers, Rob. That did the trick. Thanks. -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can session.save_path data be saved to a database instead of a file system?
Caleb Walker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wed, 02 Jun 2004 10:29:31 +0100, Michael Nolan wrote: Caleb Walker wrote: I have 2 servers fail-over/load-balanced behind an F5 bigIP. I want session data to be maintained in the event one server takes a dive. In this scenario, if a user is in the middle of doing something while logged in, they will not have to lose all work and log back into the server to continue working. Can that be done without rewriting an application? I saw a link here: http://www.phpfreaks.com/quickcode/DB_eSession_class_securely_stores_PHP_ses sions_in_a_MySQL_DB/286.php but this seems to be something that would have to be written into the application and I didn't write it and do not want to take on the responsibility to do so from here. Any thoughts would be much appreciated. Thank You, Caleb Yes, you can use a database to store session data and retain existing session manipulation methods. Surprisingly, the PHP manual tells you how: http://uk.php.net/manual/en/function.session-set-save-handler.php And lists a couple of examples, including this one at Zend: http://www.zend.com/zend/spotlight/code-gallery-wade8.php Mike This looks like modifications that need to be made to the application. I dont really want to touch the application. Instead I just want PHP, through the php.ini file or whatever to take the session data and put it in a database instead of the file system. In doing it this way, I assume that I will not have to touch somebody else's code. Thanks for the response. It's pretty simple. I'm using PEAR's HTTP_Session in combination with PEAR::DB: http://pear.php.net/package/DB http://pear.php.net/package/HTTP_Session Just set those two packages up, create a session table (see HTTP_Session/Container/DB.php for the schema) and set this HTTP_Session option: HTTP_Session::setContainer('DB', array('dsn' = $dsn, 'table' = 'sessions', 'autooptimize' = true)); ...and off you go. Ideally you should change the lines where the session variables are set and get to use HTTP_Sessions static methods instead. But this shouldn't be much of a problem. It could even work without these changes by directly accessing $_SESSION. Bets regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] email formatting
BigMark wrote: Is it possible to have this code changed easily to make the output run horizontally instead of vertically. example of current output to email below code I'm not sure what you mean by horizontaly. Do you mean one long line? Provide an example of what you want to get. And we don't know where and how $selections variable is set. // //email selections to all users $sql = SELECT email_address FROM Users; $result = mysql_query($sql); while ($myrow = mysql_fetch_array($result)) { $email = $myrow['email_address']; $subject = Mark's Footy Tipping Competition; $message = Hi, Round $Round is now closed. Selections were: $selections Thanks! Mark This is an automated response, please do not reply!; mail($email, $subject, $message, From: Mark$fromemailaddress\nX-Mailer: PHP/ . phpversion()); } /// outputs like this Hi, Round 10 is now closed. Selections were: Glen Gosnay - Game 1 Essendon Glen Gosnay - Game 2 Hawthorn Glen Gosnay - Game 3 West Coast Glen Gosnay - Game 4 Kangaroos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Can session.save_path data be saved to a database instead of a file system?
From: Caleb Walker [EMAIL PROTECTED] This looks like modifications that need to be made to the application. I dont really want to touch the application. Instead I just want PHP, through the php.ini file or whatever to take the session data and put it in a database instead of the file system. In doing it this way, I assume that I will not have to touch somebody else's code. Can't do it that way. You need to load some PHP code that tells PHP what to do upon session starts, saves, reads, etc. Closest you could come is to set an auto prepend file that loads your session handler. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] need advice on an i18n english to arabic function
p80 wrote: I have a website in English, it is translated in many languages already (Spanish, french, German...), and i wanna translate it in Arabic, everytime i have a word in English i use a function like this i18n(MyEnglishWord) and the i18n function look up in an arabic.inc that contains a list of English words translated in Arabic such as: $this = ; $house =; etc... that works Ok but the problem is that Arabic reads from right to left so i need to redo my php and html code. is there a way to do this easily or is there any method I should know of to ease my task? thanx in advance http://www.w3.org/TR/REC-html40/struct/dirlang.html HTH :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Call to undefined function: mail() with SUSE 9.1
I just moved my site to a new install of SUSE 9.1 and get the error.. Call to undefined function: mail() when ever I try to send a message. What is the easiest way to fix this since suse used postfix instead of sendmail. -- Chris W Bring Back the HP 15C http://hp15c.org Not getting the gifts you want? The Wish Zone can help. http://thewishzone.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: mail() with SUSE 9.1
Chris W wrote: I just moved my site to a new install of SUSE 9.1 and get the error.. Call to undefined function: mail() when ever I try to send a message. What is the easiest way to fix this since suse used postfix instead of sendmail. Hmm, weird. The function should always be available, it's part of the core, even missing sendmail binary does not give this error. Isn't mail in disable_functions in php's configuration? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Finding the sizeof a variable....
Hi, I'm wondering if there's something similar to the C sizeof operator in PHP? I would like to find out how much space in memory a variable is actually using (and possibly adjust the max memory per script accordingly). No, sizeof() http://us3.php.net/sizeof is not what I want :-( Thanks! Matt -- Matt Blasinski (mbv) Software Engineer Internet Infrastructure Applications Technology Division of Information Technology 3121 Computer Science and Statistics 1210 West Dayton Street Madison WI 53706 Work (608) 262-2286 Personal Cell (608) 347-6940 ?php echo You can have it fast, cheap, or working. Choose two.; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: mail() with SUSE 9.1
Chris W wrote: I just moved my site to a new install of SUSE 9.1 and get the error.. Call to undefined function: mail() when ever I try to send a message. What is the easiest way to fix this since suse used postfix instead of sendmail. You'll have to set the path to postfix's sendmail wrapper. I think it's in /usr/sbin, which is probably not in your path. So you either need to add /usr/sbin to your path, or set 'sendmail_path' in your php.ini file, then restart your webserver. -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Finding the sizeof a variable....
There is memory_get_usage() but it returns the amount of memory allocated to PHP. http://us3.php.net/manual/en/function.memory-get-usage.php I'm wondering if there's something similar to the C sizeof operator in PHP? I would like to find out how much space in memory a variable is actually using (and possibly adjust the max memory per script accordingly). No, sizeof() http://us3.php.net/sizeof is not what I want :-( Thanks! Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Finding the sizeof a variable....
Matthew A. Blasinski wrote: Hi, I'm wondering if there's something similar to the C sizeof operator in PHP? I would like to find out how much space in memory a variable is actually using (and possibly adjust the max memory per script accordingly). No, sizeof() http://us3.php.net/sizeof is not what I want :-( Thanks! Matt Not exactly what you want, but it's the closest you can get: memory_get_usage() I guess with a little experimanting you will be able to guess exact alocated memory. For example strings seem to take strlen() + 110 (or 120?) bytes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php installation verification
I am new to php and was tasked with installing php v.4.3.6. I installed it on redhat with apache v2.0.48. I read in the doc that you can create a test file called test.php with some php tags such as ?phpinfo()?. Could someone post a test.php file as an example? Thanks for the help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php installation verification
Open a file. Put this code in there: ? phpinfo(); ? Save as test.php and point your browser to it. - Original Message - From: Nguyen, Long P (Mission Systems) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 4:33 PM Subject: [PHP] php installation verification I am new to php and was tasked with installing php v.4.3.6. I installed it on redhat with apache v2.0.48. I read in the doc that you can create a test file called test.php with some php tags such as ?phpinfo()?. Could someone post a test.php file as an example? Thanks for the help. -- 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 installation verification
Save to your root directory as test.php (or something ending in php). ?php phpinfo(); ? I am new to php and was tasked with installing php v.4.3.6. I installed it on redhat with apache v2.0.48. I read in the doc that you can create a test file called test.php with some php tags such as ?phpinfo()?. Could someone post a test.php file as an example? Thanks for the help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -Original Message- From: Steve Douville [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 4:39 PM To: Nguyen, Long P (Mission Systems); [EMAIL PROTECTED] Subject: Re: [PHP] php installation verification Open a file. Put this code in there: ? phpinfo(); ? Save as test.php and point your browser to it. - Original Message - From: Nguyen, Long P (Mission Systems) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 4:33 PM Subject: [PHP] php installation verification I am new to php and was tasked with installing php v.4.3.6. I installed it on redhat with apache v2.0.48. I read in the doc that you can create a test file called test.php with some php tags such as ?phpinfo()?. Could someone post a test.php file as an example? Thanks for the help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
Have you stopped and restarted the web server? OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
On Wed, 2004-06-02 at 16:47, Nguyen, Long P (Mission Systems) wrote: OK - I tried that and what came up on the browser was the content of the test.php file. Open a file. Put this code in there: ? phpinfo(); ? Try: ?php phpinfo(); ? -- Scot L. Harris [EMAIL PROTECTED] IF I HAD A MINE SHAFT, I don't think I would just abandon it. There's got to be a better way. -- Jack Handley, The New Mexican, 1988. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
Yes. -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 4:51 PM To: Nguyen, Long P (Mission Systems) Cc: Steve Douville; [EMAIL PROTECTED] Subject: RE: [PHP] php installation verification Have you stopped and restarted the web server? OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
I get the source display on the browser as: ?php phpinfo(); ? -Original Message- From: Scot L. Harris [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 4:53 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] php installation verification On Wed, 2004-06-02 at 16:47, Nguyen, Long P (Mission Systems) wrote: OK - I tried that and what came up on the browser was the content of the test.php file. Open a file. Put this code in there: ? phpinfo(); ? Try: ?php phpinfo(); ? -- Scot L. Harris [EMAIL PROTECTED] IF I HAD A MINE SHAFT, I don't think I would just abandon it. There's got to be a better way. -- Jack Handley, The New Mexican, 1988. -- 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 installation verification
And you test.php file has? (note starting with ?php ?php ? Yes. Have you stopped and restarted the web server? OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
Running Apache? Windows? I get the source display on the browser as: ?php phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
The content of my test.php file has: ?php phpinfo(); ? -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 4:59 PM To: Nguyen, Long P (Mission Systems) Cc: [EMAIL PROTECTED]; Steve Douville; [EMAIL PROTECTED] Subject: RE: [PHP] php installation verification And you test.php file has? (note starting with ?php ?php ? Yes. Have you stopped and restarted the web server? OK - I tried that and what came up on the browser was the content of the test.php file. I checked in my httpd.conf file I do have the following: AddType application/x-httpd-php .php AddType application/x-http-php-source .phps LoadModule php4_module libexec/libphp4.so Any thoughts? thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
Seems to me there was a problem with Apache 2 and PHP (some version). The content of my test.php file has: ?php phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
redhat and apache -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 5:02 PM To: Nguyen, Long P (Mission Systems) Cc: Scot L. Harris; [EMAIL PROTECTED] Subject: RE: [PHP] php installation verification Running Apache? Windows? I get the source display on the browser as: ?php phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
could it be something in my httpd.conf file? below are the results of the installation: [EMAIL PROTECTED] php-4.3.6]# make install Installing PHP SAPI module: apache2handler /usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' libphp4.la /usr/local/apache/modules /usr/local/apache/build/libtool --mode=install cp libphp4.la /usr/local/apache/modules/ cp .libs/libphp4.so /usr/local/apache/modules/libphp4.so cp .libs/libphp4.lai /usr/local/apache/modules/libphp4.la libtool: install: warning: remember to run `libtool --finish /tmp/php/php-4.3.6/libs' chmod 755 /usr/local/apache/modules/libphp4.so [activating module `php4' in /usr/local/apache/conf/httpd.conf] Installing PHP CLI binary:/usr/local/bin/ Installing PHP CLI man page: /usr/local/man/man1/ Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar- installed: 1.1 [PEAR] Console_Getopt - installed: 1.2 [PEAR] PEAR - installed: 1.3.1 Wrote PEAR system config file at: /usr/local/etc/pear.conf You may want to add: /usr/local/lib/php to your php.ini include_path [PEAR] DB - installed: 1.6.2 [PEAR] HTTP - installed: 1.2.2 [PEAR] Mail - installed: 1.1.3 [PEAR] Net_SMTP - installed: 1.2.3 [PEAR] Net_Socket - installed: 1.0.1 [PEAR] XML_Parser - installed: 1.0.1 [PEAR] XML_RPC- installed: 1.1.0 Installing build environment: /usr/local/lib/php/build/ Installing header files: /usr/local/include/php/ Installing helper programs: /usr/local/bin/ program: phpize program: php-config program: phpextdist [EMAIL PROTECTED] php-4.3.6]# -Original Message- From: Daniel Clark [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 5:02 PM To: Nguyen, Long P (Mission Systems) Cc: Scot L. Harris; [EMAIL PROTECTED] Subject: RE: [PHP] php installation verification Running Apache? Windows? I get the source display on the browser as: ?php phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] spam filter
Merlin wrote: Hi there, I am working on a spam filter for email forms. To improve it it would be great to compare 2 text and to find out how equal they are. Is there a function in php wich compares 2 text and returns a percentage of equality? The system allready checks for spam keywords, but there are some spam text which are verry difficult to identify. So if a person submits the same text to more people this would be another factor to check. Thank you for any help, Merlin levenshtein() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php installation verification
Quoting Nguyen, Long P (Mission Systems) [EMAIL PROTECTED]: could it be something in my httpd.conf file? Remove the line AddType application/x-httpd-php .php and add Files *.php SetOutputFilter PHP SetInputFilter PHP /Files HTH R'twick -- This is a signature This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ob_start callback preg_replace
Can someone help me with preg_replace? I want to convert all numbers either 8 or 9 digits in length, into a link. Such that when it sees: John Doe, 456890123, is a new employee. It converts it to: John Doe, a href='employee.html?id=456890123'456890123/a, is a new employee. function callback($buffer) { // create id links return ???; } ob_start(callback); Thanks much, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Please help, problem with set_ini
Hi, I'm having a problem with a set_ini command... I need to be able to set the -f parameter (to set the originating address on my server). I am getting a false response code when I run the following command: $Result=ini_get(sendmail_path), /usr/sbin/sendmail -t -f.$DataUserInfo['OriginatingEmail']); How can I set this parameter at runtime, or are there any other alternatives Warren -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ob_start callback preg_replace
John Kaspar wrote: Can someone help me with preg_replace? I want to convert all numbers either 8 or 9 digits in length, into a link. Such that when it sees: John Doe, 456890123, is a new employee. It converts it to: John Doe, a href='employee.html?id=456890123'456890123/a, is a new employee. function callback($buffer) { // create id links return ???; } ob_start(callback); Thanks much, John return preg_replace('/([0-9]{8,9})/', 'a href=employee.html?id=$1$1/a', $buffer); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can session.save_path data be saved to a database instead of a file system?
John W. Holmes wrote: From: Caleb Walker [EMAIL PROTECTED] This looks like modifications that need to be made to the application. I dont really want to touch the application. Instead I just want PHP, through the php.ini file or whatever to take the session data and put it in a database instead of the file system. In doing it this way, I assume that I will not have to touch somebody else's code. Can't do it that way. You need to load some PHP code that tells PHP what to do upon session starts, saves, reads, etc. Closest you could come is to set an auto prepend file that loads your session handler. ---John Holmes... This is how I would do it and would require no additional changes to the code - just set your auto prepend in a .htaccess file if you're using Apache. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help, problem with set_ini
[snip] I'm having a problem with a set_ini command... I need to be able to set the -f parameter (to set the originating address on my server). I am getting a false response code when I run the following command: [/snip] looks like sendmail_path has to be set in http.conf or php.ini http://www.php.net/ini_set -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help, problem with set_ini
Warren Gardner wrote: Hi, I'm having a problem with a set_ini command... I need to be able to set the -f parameter (to set the originating address on my server). I am getting a false response code when I run the following command: $Result=ini_get(sendmail_path), /usr/sbin/sendmail -t -f.$DataUserInfo['OriginatingEmail']); How can I set this parameter at runtime, or are there any other alternatives Warren False response error? You mean parse error. It should be ini_set(sendmail_path, /usr/sbin/sendmail -t -f.$DataUserInfo['OriginatingEmail']); But that will not work, as sendmail_path is PHP_INI_SYSTEM - can be set only in php.ini or httpd.conf You can use mail()'s fifth parameter if you are not under safe mode. Or connect directly to port 25 using any of the smtp classes. HTH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: mail() with SUSE 9.1
* Thus wrote Chris W ([EMAIL PROTECTED]): I just moved my site to a new install of SUSE 9.1 and get the error.. Call to undefined function: mail() when ever I try to send a message. What is the easiest way to fix this since suse used postfix instead of sendmail. This happens when php is compiled and it can't find the sendmail program. Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem
Hi All, Does anyone know a good format for sending email using the mail() function that doesnt get stopped by antispam software? I need to send and email from my sever when a new member creates an account, this ive done but my email gets binned straight away? must be the headers? Regards Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() problem
Sounds like a problem for the maintainers of the spam blocking software? You can't correct the problem with the headers if you don't know what the spam software is objecting to. It may be objecting to the fact that the source is 127.0.0.1? -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 8:35 PM To: [EMAIL PROTECTED] Subject: [PHP] mail() problem Hi All, Does anyone know a good format for sending email using the mail() function that doesnt get stopped by antispam software? I need to send and email from my sever when a new member creates an account, this ive done but my email gets binned straight away? must be the headers? Regards Rick -- 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: Can session.save_path data be saved to a database instead of a file system?
This is how I would do it and would require no additional changes to the code - just set your auto prepend in a .htaccess file if you're using Apache. This sounds interesting. Could you elaborate a little more? I mean what is the auto prepend and what is the syntax for the .htaccess? Thanks very much. Caleb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Coding Standards
On 02/06/2004, at 3:00 AM, Justin Patrin wrote: And I'm one of them. :-) I like the KR version because it saves verticaly space and most editors can't really handle correct tabbing when you put it after. IMHO it's just not necessary as ALL blocks should have braces, even those that are one-line. If you always use the braces, you can looks for indenting as the open of the block and the end-brace (and un-indenting) as the close of the block. I used to be a big fan of both versions, but honestly, I didn't care, as long as an app was consistent, so that one could become comfortable with it over time. The reality is that good editors like BBEdit can help match braces, highlight code blocks, etc. But recently, I've changed my tactic to whatever helps the code be as readable and clear as possible... $file = 'a'; if(file_exists($file)) { include($file); } $file = 'b'; if(file_exists($file)) { include($file); } $file = 'c'; if(file_exists($file)) { include($file); } else { include('x'); } $file = 'd'; if(file_exists($file)) { include($file); } else { include('x'); } $file = 'e'; if(file_exists($file)) { include($file); } is a lot clearer,line-efficient and faster to comprehend than... $file = 'a'; if (file_exists($file)) { include($file); } $file = 'b'; if (file_exists($file)) { include($file); } $file = 'c'; if (file_exists($file)) { include($file); } else { include('x'); } $file = 'd'; if (file_exists($file)) { include($file); } else { include('x'); } $file = 'e'; if (file_exists($file)) { include($file); } Of course, looping through an array of file names would be even clearer, but you get my point :) --- Justin French http://indent.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: how to insert form data
shouln't be QUOTE: input type = textarea name=quote... Respectfully, Ligaya Turmelle Matt Macleod [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Should be: form name=form meth0d=post action=input/php NAME: input type=text name=name id=name / QUOTE: textarea name=quote id=quote/textarea input type=submit name=submit value=Submit / /form HTH Matt On 3 Jun 2004, at 04:33, BigMark wrote: OK no errors now but no data inserted, my form must be wrong as well. form method=post action=input.php NAME input name=textfield type=text id=name QUOTE input name=textarea type=text id=quote input type=submit name=Submit value=Submit /form -- 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: mail() problem
minor suggestion: make sure you have a from address. Respectfully, Ligaya Turmelle Rick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All, Does anyone know a good format for sending email using the mail() function that doesnt get stopped by antispam software? I need to send and email from my sever when a new member creates an account, this ive done but my email gets binned straight away? must be the headers? Regards Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail() problem
Another suggestion is if its an HTML format mail, make sure you use properie making sure all tags are closed that kind of stuffsome software will block if the HTML is not well formed Rick [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All, Does anyone know a good format for sending email using the mail() function that doesnt get stopped by antispam software? I need to send and email from my sever when a new member creates an account, this ive done but my email gets binned straight away? must be the headers? Regards Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php