[PHP] Re: no newline after ? in the resulting HTML

2006-03-18 Thread James Benson
Rostislav Krasny wrote: Hi, I've tried to ask the following question on internals@lists.php.net but has been pointed out that that mailing list isn't appropriate. So I'm resinding it here. I am a newbie to PHP. I've installed a php5-cgi-5.1.2_1 from FreeBSD ports collection and access it by

[PHP] Re: How can I stop PHP from resolving symlinks?

2006-02-25 Thread James Benson
is_link() perhaps ? http://php.net/is_link James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: how to build custom/private pear packages

2006-02-15 Thread James Benson
Jochem Maas wrote: hi people, I have been thinking about how I rollout some of my code (stuff that gets reused alot) and I thought it would be nice if I could have basic functionality available for my projects via a custom pear package server (referred to as a 'pear channel'??) - so what I

[PHP] Re: How to user curl_setopt?

2006-02-07 Thread James Benson
should it not be:- G:\\test\ssl\mes1.cer' notice how I changed the path to reflect a proper windows drive path! James lhb wrote: Hello, Now I need to use curl to connect to a secure website, I have three certificates files, two .cer files and one .pfx file. After I import the

[PHP] Re: PHP Newsletter

2006-02-03 Thread James Benson
Jedidiah wrote: I send out a daily email to an email list. I have only been doing this for about a week, and realized today that each one of them so far has had at least one mysterious exclamation point somewhere in the email. This is sometimes in the middle of the word or sentence, but

[PHP] Re: Preparing site content for RSS XML feed

2006-02-02 Thread James Benson
Murray @ PlanetThoughtful wrote: Hi All, I currently generate a simple rss.xml file for syndication from my site, containing nothing more than the subject of the post and a link to the article on my site. I'd like to syndicate the the actual content of each of the posts, but as I

[PHP] Re: Help retrieving an HTML array

2006-02-01 Thread James Benson
Mauricio Pellegrini wrote: Hi , I have a HTML page with a form in which there are some inputs like these: input type=text name=xname value=3303 input type=text name=xname value=9854 input type=text name=xname value=n... the name of the input is

[PHP] strange behaviour with strtotime()

2006-01-31 Thread James Benson
Im encountering some very weird behaviour when using the following:- echo date(M, strtotime(next month)); outputs: Mar while echo date(r,time()); outputs: Tue, 31 Jan 2006 11:21:47 + anyone know why? - Master CIW

Re: [PHP] strange behaviour with strtotime()

2006-01-31 Thread James Benson
Because 1 month from 31-Jan is 31-Feb -- which is taken to mean 02-Mar, hence the output of date(M ...). why though, one month from now is 31 Feb, why would it take it as something else? That does not make sense to me! James -

[PHP] Re: strange behaviour with strtotime()

2006-01-31 Thread James Benson
The case makes no difference, because... echo date('r', strtotime (next Month)).\n; echo date('r', strtotime (next month)).\n; gives... Fri, 03 Mar 2006 12:52:54 + Fri, 03 Mar 2006 12:52:54 + BTW, Im using Debian, PHP 4.4.2 and my machines time zone is Europe/London Few more tests

Re: [PHP] strange behaviour with strtotime()

2006-01-31 Thread James Benson
Barry wrote: Ford, Mike wrote: Because 1 month from 31-Jan is 31-Feb -- which is taken to mean 02-Mar, hence the output of date(M ...). 2 months from now is 31-Mar, which is ok; 3 months from now would be 31-Apr, which would likewise be taken to mean 01-May. This is all as expected --

[PHP] Re: strange behaviour with strtotime()

2006-01-31 Thread James Benson
try that: echo strtotime1:.strtotime (next Month).\n; echo strtotime2:.strtotime (next month).\n; echo time:.time().\n; echo time1:.strftime(%d %m %Y,strtotime(next Month)). | time2:.strftime(%d %m %Y,time()); (probably causing error because of month / Month; Post result please. i

Re: [PHP] strange behaviour with strtotime()

2006-01-31 Thread James Benson
cheers for the help :) Barry wrote: Ford, Mike wrote: Yes, but 1 apple is 1 apple is 1 apple. 1 month can be 28 days, or 31 days, or anything in between. 2 months can be anything from 59 to 62 days. A month is an imprecise measure, and adding them together will get you an even more

[PHP] Re: CR \ LFs being represented as ascii characters in output of mail()

2006-01-31 Thread James Benson
Murray @ PlanetThoughtful wrote: Hi All, I'm having an odd problem with formatting of line feeds in an email my site automatically sends to me when someone comments on one of my blog entries. For some reason \r\n characters are coming through exactly like that in the email, and yet

[PHP] Re: query regard forms in PHP

2006-01-29 Thread James Benson
suresh kumar wrote: hai, i am having 3 files,namely page1,page2 and page3,when i enter username and password in my first page i want 2 display my username and password in my third page through second page.

[PHP] Re: Support between MySQL and PHP

2006-01-29 Thread James Benson
Downgrading to MySQL 4.1 should fix the problem. Philip R. Thompson wrote: Hi all. I figured this question was suitable for both the MySQL list and the PHP-General list. Here's what I'm running into. I just installed MySQL5 and currently have PHP 4.3.11 installed. I am wanting to

[PHP] Re: Workaround ISP's redirect of 404 Not Found PHP pages?

2006-01-26 Thread James Benson
PHP is running as a CGI on the shared hosting servers, which is why your .htaccess isn't working for it. You will have to create the error rule within a php.ini file. That is so much bull, how then can it work for NON .php files? I know for a fact that CGI does not prevent you using

Re: [PHP] Re: $_SESSION saves all values but Class -- works on one server butnot another?! [second plead for help]

2006-01-25 Thread James Benson
Daevid Vincent wrote: Thank you, but again, not the problem. The same code is on both servers. I'm not transfering from one server to another. Only from page to page ON THE SAME SERVER. This has to be a configuration problem IMHO. -Original Message- From: James Benson [mailto

[PHP] Re: usr VAR value as a VAR Name

2006-01-25 Thread James Benson
if(isset($_POST['NAME_OF_FORM_VALUE'])) { // radio button was selected } Fernando Anchorena wrote: I'm stuck trying to get work this : This is an example page1.php === form action=/page2.php?form=yes method=post $sql_pro =SELECT Sid FROM table;

Re: [PHP] way to write mysqli result set to disk

2006-01-25 Thread James Benson
jonathan wrote: hmm is this a mysql 5 feature. could be interesting but haven't heard much about it. You cannot see the mysql 5 plastered all over the page? I can see at least 5 different sections that say MySQL 5 James -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: put method

2006-01-24 Thread James Benson
change the $_PUT to $_FILES, their is no global variable in PHP called $_PUT reading this page will give a working example you can modify: http://php.net/features.file-upload James - http://www.ciwcertified.com - Master CIW

[PHP] Re: $_SESSION saves all values but Class -- works on one server but not another?! [second plead for help]

2006-01-24 Thread James Benson
Take a look at the following functions:- http://php.net/serialize http://php.net/unserialize James - http://www.ciwcertified.com - Master CIW Designer http://www.zend.com - Zend Certified Engineer http://www.jamesbenson.co.uk

[PHP] Re: Variable variables

2006-01-24 Thread James Benson
Mark Steudel wrote: I was wondering if you could create variable variables for objects, please see examples below, Im having problems getting it to work. $data['fieldname'] = foo; // without variable variables $res = $db-query( SELECT foo FROM table ); while(

[PHP] Google using PHP @ http://www.google-store.com

2006-01-24 Thread James Benson
Looks like google are using PHP and oscommerce for their web store: http://www.google-store.com Nice to see :) James - http://www.ciwcertified.com - Master CIW Designer http://www.zend.com - Zend Certified Engineer

[PHP] Re: security of uploaded gif files

2006-01-23 Thread James Benson
Even if you can embed PHP in a GIF it would still need to be executed by PHP as PHP code, would PHP actually execute that file when it looks like an image, I would think PHP would output an error? More importantly though, you should be checking the file extension of uploaded files to make

[PHP] Re: using sessions instead of cookie

2006-01-21 Thread James Benson
http://php.net/manual/en/ref.session.php Ross wrote: I have never used sessions before. How do I change the follow from COOKIES to SESSIONS in php (I do not know how to set a session)... At present the script uses an iframe with cookies but I believe if I use sessions I can leave out

[PHP] fsockopen, openssl error

2006-01-20 Thread James Benson
Im running into the followng error when trying to use fsockopen with the openssl extension, Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: failed to create an SSL context Warning: fsockopen(): failed to activate SSL mode 1 Socket Error: Operation now in progress

[PHP] Re: fsockopen, openssl error

2006-01-20 Thread James Benson
Seems like he can't start TLS.´ Have you tried a newer version of PHP than 4.4.2? If so, i would like to know what happened. Barry Just compiled 5.1.2 and 4.4.1, it happended again with 4.4.1 but not with 5.1.2, I dont have time to try 4.4.0 but will do later. One thing i forgot to

[PHP] Re: odd behavior

2006-01-19 Thread James Benson
Could these help? http://www.php.net/manual/en/faq.installation.php#faq.installation.phprc http://php.net/configuration James Jay Blanchard wrote: When I expire you will find my hands wrapped tightly around the throat of a Windows network administrator. I had PHP installed on a web

[PHP] most reliable way to test if using https

2006-01-13 Thread James Benson
What is the most reliable way to test if a connection is already using the https protocol, is their a PHP constant or something builtin already? Thanks, James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Sending mail with php-

2006-01-11 Thread James Benson
You need a domain name pointing to your IP address for a start, then you either need to configure php.ini to use the correct email or you should pass the additional param to sendmail, as shown below. Taken from php.net: The additional_parameters parameter can be used to pass an additional

[PHP] Re: array of checkbox values

2006-01-11 Thread James Benson
Do something like: $checkboxes = array('food','drink','smoking'); // display the checkboxes foreach($checkboxes as $checkbox) { echo $checkbox: input type=checkbox name=\$checkbox\ /; } Then when processing the form input check if each of the $checkboxes array values are present, if

[PHP] Re: Sending mail with php-

2006-01-11 Thread James Benson
alter the sendmail configuration file: /etc/mail/local-host-names If that dont work you need to setup DNS for your machine. James Benson wrote: You need a domain name pointing to your IP address for a start, then you either need to configure php.ini to use the correct email or you should

[PHP] Re: test variable value?

2006-01-11 Thread James Benson
If your talking values in submitted form data I would use: if(isset($var) trim($var) == '') { echo Please give a value; } James William Stokes wrote: Hello What is the best way to determine if a variable has no value? if ($var= '') or if ($var= 'null') Can 'null' be used

[PHP] Re: problem with large arrays in php 4.3.2

2006-01-11 Thread James Benson
Their should be no problem with what your trying to do, try the following function, should act pretty much like array_diff(); if(!function_exists('array_diff')) { function array_diff($array1, $array2) { $difference = array(); foreach($array1 as $key = $value)

Re: [PHP] safe mode question

2006-01-09 Thread James Benson
Your php.ini should have root as its owner and be set to 600, if your using apache server then apache must start as root, the php.ini file is read only once by root when the server starts - so that setting should not cause problems, however if using the cli then you should also make

[PHP] Re: Performance question

2005-12-05 Thread James Benson
I dont think either will give a performance decrease any less than the other will do. Anders Norrbring wrote: I've been spending some time to find performance pros and cons, but so far haven't had any real luck. Can someone on this list say which is better than the other, and also

[PHP] Re: how to resolve this conflict?

2005-12-01 Thread James Benson
You obviously need to remove the old package or compile your own from source Bing Du wrote: Hello, I've already posted it on the MySQL General Discussion list. Thought I wanted to try this list as well in case somebody knows. 5.0.11-beta-standard is already running. Now I need to

[PHP] Re: Question about Request.php

2005-12-01 Thread James Benson
Try checking for the error after:- $Req-sendRequest(); Example:- $response = $Req-sendRequest(); if (PEAR::isError($response)) { die($response-getMessage()); } $Response = $Req-getResponseBody(); You may also want to include some options like so:- $options = array( 'method' = 'GET',

[PHP] Re: PHP server problem

2005-12-01 Thread James Benson
It probably modified your httpd.conf, if your being prompted to download the file it sounds like the following line is missing from it, AddType application/x-httpd-php .php .phtml Eric Lommatsch wrote: Hello, This is my first time posting to this particular list, so please be patient

Re: FW: [PHP] PHP server problem

2005-12-01 Thread James Benson
Have you tried removing the ifdefine HAVE_PHP4 James Eric Lommatsch wrote: I have looked at this page and and in the httpd.conf file that file had this information in it. But when I look at the httpd2.conf file this file is missing this information I have tried adding this information

Re: FW: [PHP] PHP server problem

2005-12-01 Thread James Benson
I cant see why you have two httpd.conf files, unless that app installed another, in which case I would remove the ifdefine HAVE_PHP4 block, im sure thats only their for when/if you need to disable PHP James Eric Lommatsch wrote: I have looked at this page and and in the httpd.conf file

[PHP] Re: Problems with PHP and Apache 2.x 404 ErrorDocument handlers

2005-12-01 Thread James Benson
Well if all other PHP scripts work then it must be a problem with your script or something changed in the latest PHP version that your script used, if you post the code someone may be able to say if something is wrong with it. James Jason Z wrote: I used to have a number of sites direct

[PHP] Re: Automatic log out

2005-12-01 Thread James Benson
Store the last time someone accessed their session into the $_SESSION array then when requesting a protected page just check x amount of time has not passed, if x amount has time has passed redirect to a login page or re-enter their user password small example you would use on the top of

[PHP] Re: Automatic log out

2005-12-01 Thread James Benson
it would also be nice to stop the pages displaying after a time out when a user presses the back button! For that you would need to destroy the session data, use session_destroy(); http://php.net/session_destroy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: problem in create new diretory..

2005-11-19 Thread James Benson
try 0777 instead of 777 http://php.net/chmod ganu ullu wrote: Hello all, I have created a new dir, with php code .. which is like that function mkDirE($dir,$dirmode=777) { if (!empty($dir)) { if (!file_exists(./microsite/.$dir)) { preg_match_all('/([^\/]*)\/?/i', $dir,$atmp); $base=;

[PHP] Re: SOAP and PHP

2005-11-17 Thread James Benson
Petr Smith wrote: Torgny Bjers wrote: Angelo Zanetti wrote: Hi guys. I've googled but found so many pages that I'm not sure what to use. I want to use PHP to make use of SOAP. I've found: -nuSoap -libxml(2) -php-soap -and others which seemed less important. Can you recommend which one

[PHP] Re: Server Client Architecture, best parctice

2005-11-17 Thread James Benson
Are both servers on the same machine? Yaswanth Narvaneni wrote: Hi! I would like to know what does the community think of the best architecture for server client communication and why? That is, if there is a server in C++ (say a game server) and the PHP has to 'read' data 'from' the server

[PHP] Re: unsubscribing

2005-11-17 Thread James Benson
Read the instructions on php.net, their are two different ways to unsuscribe, either email or use the web interface, http://php.net/mailing-lists.php wayne wrote: I tried to unsubscribe on several occasion without success. I followed the instruction at the bottom of the email. Can someone

[PHP] Re: Server Client Architecture, best parctice

2005-11-17 Thread James Benson
Each has its own benefits, if on a shared server then a database would be the most secure I think, if its a dedicated server then tmpfs or just plain old files will probably be the best, it also depends on various other factors like, server hardware and bandwith, only you can select the best

[PHP] Re: Wierd error

2005-11-17 Thread James Benson
There is nothing weird when this function takes a variable as the argument and your using an object, read the manual http://php.net/settype You could try:- $dbObject = (null) $dbObject; Ive not tested that but think it should work! James Chris Boget wrote: I'm seeing the

[PHP] Re: plese help

2005-11-17 Thread James Benson
Aftab Alam wrote: Hello, I want to create a trigger in PostgresSQL , In trigger, Before inserting the record i want to check that data is available or not, if data is not there then the insert script execute otherwise trigget check the next insert script. Please reply. What, and

[PHP] Re: How to build a XML DTD on the fly?

2005-11-17 Thread James Benson
Learn DTD and how it works first then you will know :-) A DTD is contained in an external file and not in XML, so you would create a DTD file then link it from the XML like so, !DOCTYPE document SYSTEM document.dtd Erik Franzén wrote: The code below lacks the part where the folling DTD

[PHP] Re: better way to mix html and php code?

2005-11-17 Thread James Benson
None, their all messy and terribly hard to read, I would use CSS instead of tables, that way their would be not much need to change any HTML code incase you wanted to re-design your webpage with another style or make slight alterations etc, HTML coders should be able to understand CSS so would

[PHP] Re: Can't use secure file wrappers - Windows

2005-11-14 Thread James Benson
Could use the xampp package or just the openssl php from it, http://www.apachefriends.org/en/xampp.html Chuck Anderson wrote: [I've had this posted in the php.windows group for a few days, but I got no replies there.] I have been plugging away at this for some time now and I can not

[PHP] Re: php session in ie

2005-11-12 Thread James Benson
sunaram patir wrote: Hi, i am having problem with internet explorer. i am working on a project on building a website where i need to keep track of the users i.e. i use a login system in there in short. with the following code i check whether the user is logged in or not. ?php session_start();

[PHP] Re: comment more than a question

2005-11-09 Thread James Benson
It takes some getting used to I admit but PHP errors turned up full is far than enough to fix any script, in my experience matt VanDeWalle wrote: I don't really have a question, I just have noticed in working with php for about a year off and on, so you could probably say i'm a bit new

[PHP] Re: Session's across Domains...

2005-11-08 Thread James Benson
Take a look at the PEAR sessionServer class http://pear.php.net/package/HTTP_SessionServer Tony Di Croce wrote: I have a server with a few virtual hosts. All of my scripts use session_start(), and $_SESSION[] to share data between invocations of different scripts. The problem I'm having

Re: [PHP] performance suggestions

2005-11-08 Thread James Benson
Thanks Richard Lynch wrote: On Thu, November 3, 2005 8:29 am, James Benson wrote: Dear group, can someone suggest the best way to do the following without writing some lengthy script that (possibly) could lead to performance issues, I have three DB fields in MySQL, each has a unique ID

[PHP] Re: FileExists?

2005-11-07 Thread James Benson
Read the manual, it clearly states the following:- Tip: As of PHP 5.0.0 this function can also be used with some URL wrappers. Refer to Appendix M for a listing of which wrappers support stat() family of functionality. Gustav Wiberg wrote: Hi there! File_exists doesn't seem to work

[PHP] Re: How can I track the value in php

2005-11-05 Thread James Benson
Try reading the PHP manual, people put in lots of effort for newcomers to learn the PHP language. http://php.net/array To access a single array value:- $myArray = array('email' = '[EMAIL PROTECTED]'); echo $myArray['email']; Above would display:- [EMAIL PROTECTED] James shining

[PHP] Re: to the freelancers!!

2005-11-05 Thread James Benson
Some companies charge for support and still make money from their open source projects! bruce wrote: Hi, Just a quick question. Had a conversation with a person who works for a non-profit, and she was describing some of her dealings with obtaining grants for the development of 'open

[PHP] Re: PHP 4.4.1 on Apache 2.0.x issue

2005-11-05 Thread James Benson
Try using require_once or include_once Max Belushkin wrote: Hi list, after upgrading to PHP 4.4.1, I'm having the following problem: Apache is running in prefork mode. index.php includes func.php, which defines some functions and connects to MySQL. For a while (1-2 requests)

[PHP] Re: No forums?

2005-11-05 Thread James Benson
Since when is a forum more efficent than this newsgroup, forums tend to be more images/content and require more maintainance, this newsgroup is perfect for me and many other people I imagine. GamblerZG wrote: AFAIK, there are no official forums for PHP. Considering the fact that PHP is

Re: [PHP] Re: PHP 4.4.1 on Apache 2.0.x issue

2005-11-05 Thread James Benson
Max Belushkin wrote: Try using require_once or include_once Well, here's all the fun starting. This is relatively long, but please bear with me. First of all, yes, I did include_once, require_once, even resorted to if (! $inc_done) include_once(func.php), and setting $inc_done in func.php.

Re: [PHP] Re: PHP 4.4.1 on Apache 2.0.x issue

2005-11-05 Thread James Benson
, James Benson wrote: I've had a different set of scripts employing a different func.php. However, in both of those, mquery() is defined. But they do *not* include anything else, and the So you defined mquery() in both files and one include's or require's the other file? I'm sorry, but what

Re: [PHP] Re: PHP 4.4.1 on Apache 2.0.x issue

2005-11-05 Thread James Benson
I cant see this being an issue with PHP because it would do that for every function, have you tried using a different function, something simple say, function echo_this($param) { echo $param; } Try that like your mquery function in both files and see what happens, could be your

[PHP] Re: Template style question

2005-11-05 Thread James Benson
Give smarty a try rather than re-inventing the wheel http://smarty.php.net James Leonard Burton wrote: Greetings, HI All, I hope all is well. I have set up a template parser. Basically, it parses the template and finds tags with tag_name.dat file and then includes the tag_name.dat

Re: [PHP] Re: Template style question

2005-11-05 Thread James Benson
Robert Cummings wrote: On Sat, 2005-11-05 at 14:55, James Benson wrote: Give smarty a try rather than re-inventing the wheel http://smarty.php.net What's wrong with re-inventing the wheel? I guess your car or bike has wooden wheels eh!? I mean if nobody had re-invented the wheel from

Re: [PHP] Re: Template style question

2005-11-05 Thread James Benson
Robert Cummings wrote: On Sat, 2005-11-05 at 15:25, James Benson wrote: Robert Cummings wrote: On Sat, 2005-11-05 at 14:55, James Benson wrote: Give smarty a try rather than re-inventing the wheel http://smarty.php.net What's wrong with re-inventing the wheel? I guess your car

[PHP] performance suggestions

2005-11-03 Thread James Benson
Dear group, can someone suggest the best way to do the following without writing some lengthy script that (possibly) could lead to performance issues, I have three DB fields in MySQL, each has a unique ID, I cannot think of any ways other than pulling each tables record then looping through

[PHP] Re: PHP MYSQL Dynamic Select Boxes: Please Help

2005-11-03 Thread James Benson
Try asking in a newsgroup or forum specific to javascript, that has nothing to do with PHP Adele Botes wrote: I have 2 tables: products table product_id (INT 11 AUTOINCRE PRI) product_name (VARCHAR 255) product_desc (VARCHAR 255) color table color_id (INT 11 AUTOINCRE PRI) color (VARCHAR

[PHP] Re: SSL normal sessions stored differently?

2005-11-03 Thread James Benson
Could it be you have two differnt domain names, PHP could be using a different cookie/session for each one. Jesse Guardiani wrote: Hello, I'm running php-4.3.2-19.ent under httpd-2.0.46-44.ent on Red Hat Enterprise Linux ES release 3 (Taroon Update 4). Here is my Session section of

[PHP] Re: Pictureupload

2005-11-03 Thread James Benson
twistednetadmin wrote: I have made this script to upload pictures into a picturegallery on a website. The script works just as I expected, but with one huge flaw. It doesn't work from every users computer. I can upload pictures with no problem, but another user get's an errormessage.

[PHP] Re: Pictureupload

2005-11-03 Thread James Benson
twistednetadmin wrote: I have made this script to upload pictures into a picturegallery on a website. The script works just as I expected, but with one huge flaw. It doesn't work from every users computer. I can upload pictures with no problem, but another user get's an errormessage. the other

[PHP] Re: small windows odd problem

2005-11-03 Thread James Benson
If you mean entering code directly onto the command line then you dont need the opening/closing PHP tags, use something like... php -r echo 'hello world'; matt VanDeWalle wrote: hello all, I have just installed php-4.4.0 on my windows xp system and added the directory to the path

Re: [PHP] Re: Managing files on the client

2005-11-02 Thread James Benson
javascript CANNOT write to a clients machine (apart from cookies) Nothing from the server can do what you want, you need to install some software on each machine to achieve this. Unknown Unknown wrote: you could also use javascript and forms, and maybe open up an iframe with query strings

[PHP] Re: PHP web based administrator... Pyrite

2005-11-02 Thread James Benson
It should be fine for windows but how are you gonna save the php.ini on any linux box that typically (when setup correctly) requires root access to save the file, your opening up a security hole with something like that unless you tackle this issue some other way! James Zac Barton wrote:

[PHP] Re: Richard Lynch's Email Address ...

2005-11-02 Thread James Benson
Would it not be better something like valid_email() Reason: The is_* family check for a variable type so dont think that it really fits into the same catagory. James Jochem Maas wrote: I totally agree with Richard. about the need for a php func for checking a correct email addr. given

[PHP] Re: Looking for a string function

2005-11-02 Thread James Benson
How about substr_replace() http://php.net/substr_replace Phillip S. Baker wrote: Greetigns Gents, I seem to remember a built in php function that will take a huge block of text. Then just spit out X number of characters from it and follow it with an additional string value. But I cannot

[PHP] Re: Managing files on the client

2005-11-01 Thread James Benson
No, its not possible without asking the client to install some software! dcook wrote: Hello all: Using opendir() references directories on the server. Is there a similar function for referencing directoies on the client (browser) side? -dc -- PHP General Mailing List

[PHP] Re: [DONE] Substr by words

2005-10-29 Thread James Benson
Did you actually test that? Even better version of your function, code $string = one two three four; echo substr($string, -4); echo '...'; /code James Danny wrote: Finally i found it (Google is god, you only have to ask the right question) function trim_text($text, $count){ $text

[PHP] Re: Type of form element

2005-10-28 Thread James Benson
If you have a checkbox you just test if the value is set with isset() if it's not set they never selected the checkbox. Or if thats not what you mean maybe this could help http://php.net/variables.external Shaun wrote: Hi, I have some checkboxes on my page which correspond with

[PHP] Re: How to account for misspellings and alternatives in searching?

2005-10-27 Thread James Benson
Not sure about the numbers but soundex could be useful http://php.net/soundex James Chris W. Parker wrote: Hello, On my site right now if someone searches for 511 (a misspelling of the manufacturer 5.11) they are not presented with the right products because 511 is not found anywhere in

[PHP] Re: Trouble using DOM component with PHP 4.4.0

2005-10-27 Thread James Benson
The best solution is not to change your host at all but to change your local version of PHP to 4, PHP4 DOM - http://php.net/manual/en/ref.domxml.php PHP5 DOM - http://php.net/manual/en/ref.dom.php The PHP5 and PHP4 extensions are not compatible with each other. ~James Andrew Kachalo

[PHP] Re: cleanly written shop-system (php5, object-oriented)?

2005-10-24 Thread James Benson
PHP5 has yet to see the maturity and stability PHP4 offers which is why most applications use it. Worst thing you can do is design a website in entirely flash :) Phillip Oertel wrote: hi, i want to create a shop server application. the shop client interface will be in flash

Re: [PHP] Re: cleanly written shop-system (php5, object-oriented)?

2005-10-24 Thread James Benson
silently exit through the back door then :) Jochem Maas wrote: James Benson wrote: PHP5 has yet to see the maturity and stability PHP4 offers which is why most applications use it. Worst thing you can do is design a website in entirely flash :) no the worst thing you can do is spread

[PHP] Re: Email Validation built-in? RFC

2005-10-22 Thread James Benson
It would be nice to have a php function valid_email or something but until then i suppose we just make do with what is available, for what I need I use the following:- eregi(^[a-z0-9]+([_\\.-][a-z0-9]+)* .@.([a-z0-9]+([\.-][a-z0-9]+)*)+.\\.[a-z]{2,}.$,$email) Ive never had problems with

[PHP] Re: Preference for User Permissions system

2005-10-21 Thread James Benson
What I do is have different classes that build upon each other, authentication permissions class, common database access extending PEAR DB. then i have a custom class for specific actions like editing pages, my database is just either either an email or username and password then another

[PHP] Re: Caching problems .. I think

2005-10-16 Thread James Benson
SOunds like your form is using POST which does what you desribe to avoid submitting the same info twice. only way I know is to use GET but that would put al data in the URL. Søren Schimkat wrote: Hi guys I have a rather simple setup: A few forms chained after each other (the first leds to

Re: [PHP] per user php.ini

2005-10-09 Thread James Benson
the php.ini setting for that directory so must be something concerning httpd. JB Rory Browne wrote: why not upload a phpinfo() file and see? I'm personally not quite sure how this would work, and I'm interested in finding out. On 10/8/05, James Benson [EMAIL PROTECTED] wrote: Hey everyone

Re: [PHP] per user php.ini

2005-10-09 Thread James Benson
Thanks for the replies. Rory Browne wrote: they probably use something along the lines of mapping PHP to php -c $HOME/php.ini In Linux this would generally be done using binfmt_misc. On 10/9/05, James Benson [EMAIL PROTECTED] wrote: Nothing special on my configure line and the setting

[PHP] per user php.ini

2005-10-08 Thread James Benson
-compile if im wrong, can anyone tell me? Using apache-1.3.33, php-4.4.0 Many thanks, James Benson. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: user can post items while outhers cannot?

2005-09-20 Thread James Benson
Probably your code, changes were made in the newer versions of PHP which make some older scripts unusable, register globals for instance, do you have the PHP.ini settings to show errors turned on, you should, if you post the code snippet someone will probably be able tell whether its the code

[PHP] phpdoc install trouble

2005-09-17 Thread James Benson
Im trying to setup the pear phpdocumentor class but running into many problems, i think ive nearly got all the include directories setup correct now, modified some paths etc, now when i get to the end of a compile via the command line it always says the followig with different files when

[PHP] Re: php guru!!!!!

2005-09-17 Thread James Benson
http://php.net/ob_start try something like... ?php // top of page ob_start(); /* whole script goes here */ // bottom of page ob_end_flush(); ? bruce wrote: hi... i'm playing with a script/class from phpclasses.org. the script/class is user_class. the script is straight enough, but

Re: [PHP] db insert question

2005-07-21 Thread James Benson
Thanks for all your help, ive got it working as i needed, my db query is built like this, works but probably not the best way of doing it:- $sqlStart = INSERT INTO `tester` (; $sqlMiddle = ) VALUES (; $sqlEnd = ); $keys = array(); $values = array(); foreach($formData as

Re: [PHP] Attaching a PDF in email (no body text displays)

2005-07-21 Thread James Benson
Personally I use the MimeMail class, that works a treat, http://www.phpguru.org/static/mime.mail.html Their are two versions, one php4 one php5, or install via pear. JB Ade Smith wrote: I am attaching a PDF document to an email, this part works great, however to get this to work it