[PHP] Parsing PHP

2003-07-26 Thread Nikhil G. Daddikar
I am using PHP to develop and web app. The app also has a scripting language for the *end user*. I was thinking if I could expose a very simple subset of PHP to them (foreach, if-then-else, variable assignments and comments) and then simply eval it. But I don't want them to use calls like

Re: [PHP] Parsing PHP

2003-07-26 Thread Peter James
There is the tokenizer extension... http://www.php.net/tokenizer This might give you a good start. -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: Nikhil G. Daddikar [EMAIL PROTECTED] To: [EMAIL

[PHP] unique id

2003-07-26 Thread jan
Hi there! What's the best way to create uids (unique ids) even when runnig at exactly same time (microseconds)? is this enough ??? $r = mt_rand(); $uid = uniqid(getmypid() . $r); thanks Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Parsing PHP

2003-07-26 Thread Greg Beaver
Hi Nikhil, There are a number of choices already out there. In phpDocumentor (http://www.phpdoc.org) is a parser that is based on the tokenizer. Also available in PEAR CVS is the PHP_Parser, which is a generated parser based on PHP's own zend_language_parser.y

php-general Digest 26 Jul 2003 08:52:02 -0000 Issue 2198

2003-07-26 Thread php-general-digest-help
php-general Digest 26 Jul 2003 08:52:02 - Issue 2198 Topics (messages 156938 through 156985): Re: Debugging a Session Problem 156938 by: Johnson, Kirk 156948 by: Lee Stewart 156952 by: Johnson, Kirk 156959 by: Curt Zirzow 156964 by: Lee Stewart

Re: [PHP] unique id

2003-07-26 Thread Tom Rogers
Hi, Saturday, July 26, 2003, 5:58:41 PM, you wrote: j Hi there! j What's the best way to create uids (unique ids) even when runnig at j exactly same time (microseconds)? j is this enough ??? j $r = mt_rand(); j $uid = uniqid(getmypid() . $r); j thanks j Jan I use: $id =

[PHP] Type safety

2003-07-26 Thread Nikhil G. Daddikar
We all know PHP is great and flexible but, I have this problem... I had a function that took an object as parameter, someone went ahead and changed that to accept object's id (integer), because there is no compilation, some of the code broke. Is there any way to alleviate these kinds of

[PHP] [security] NOT the path of the script in case of error

2003-07-26 Thread thierry lhomme
Hello ! I have a problem with security found no satisfying solution yet : at home, when an error occurs in my script I got something like this : Warning: unlink() failed (No such file or directory) in c:\program files\easyphp\www\page_perso_free\php_scripts\ultra_php.php on line 356 texte.txt

[PHP] Want to join PHP open source projects, but who wants me?

2003-07-26 Thread Pietuka Krusti
Hello I've been googling for last couple of hours looking for an open source project to join but whether i find inactive ones or some that are not welcoming new coders. I would like to join an OO project, that is not quite well developed so far, but looks promising. Could you suggest any? --

[PHP] Which templates to use??

2003-07-26 Thread Binay Agarwal
Hi all! As a php developer i need to know how can i separate my business logic tier with presentation. I mean wht all different kinds of php Templates are available and which one to go for better efficiency and speed? Where can i find the resources. Please help me out. Thanks in

Re: [PHP] funny output

2003-07-26 Thread Comex
Chris Shiflett wrote: --- Ryan A [EMAIL PROTECTED] wrote: So how do i get my scripts working again? the authentication part was working perfectly but now it just kicks me back to the login page... plus it looks like I am unable to set sessions properly, and i suspect thats why i am getting kicked

Re: [PHP] Re: php5 + php4 on same server

2003-07-26 Thread Comex
Volker wrote: hi, you also could run two static compiled versions of apache (if apache) with php4 and 5 compiled in, Possible... but you need another ip-address to bind to No, you can run them both on the same IP address... that's what he wanted. - also have to manage 2 apaches(not a problem

[PHP] mail problem

2003-07-26 Thread Paul Marinas
Hi, i have to send some e-mails with pictures, in html format, i was wondering if anyone knows where to find a php class that dose this. Thanks, Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: php5 + php4 on same server

2003-07-26 Thread Alexandru N. Barloiu
Two different types of apache php on the same mashine is possible. I used to do that when I used both apache-2 apache-1. The thing I did is that I used different ports, one ot them default 80 and the other 8000 for example. On Sat, 2003-07-26 at 09:24, Comex wrote: Volker wrote: hi, you

Re: [PHP] funny output

2003-07-26 Thread Ryan A
Hi, The first thing I checked was register_globals.they are on. (http://www.bestwebhosters.com/phpinfo.php) Any other ideas/suggestions? Please help as I am hitting a total blank trying to find out where the problem is. Thanks, -Ryan - Original Message - From: Comex [EMAIL

[PHP] Re: mail problem

2003-07-26 Thread J. Cox
Paul Marinas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, i have to send some e-mails with pictures, in html format, i was wondering if anyone knows where to find a php class that dose this. http://phpmailer.sourceforge.net/ should do the trick. J. Cox http://www.xaraya.com

Re: [PHP] Which templates to use??

2003-07-26 Thread John W. Holmes
Binay Agarwal wrote: Hi all! As a php developer i need to know how can i separate my business logic tier with presentation. I mean wht all different kinds of php Templates are available and which one to go for better efficiency and speed? Where can i find the resources. Please help me

Re: [PHP] funny output

2003-07-26 Thread Curt Zirzow
* Thus wrote Ryan A ([EMAIL PROTECTED]): Hi everyone, I am having some funny output and funny things happening to my scripts since I changed hosts... my login scripts were working fine before but now they dont seem to work...also there is a hidden text box appearing in the code that i didnt

Re: [PHP] unique id

2003-07-26 Thread Curt Zirzow
* Thus wrote jan ([EMAIL PROTECTED]): Hi there! What's the best way to create uids (unique ids) even when runnig at exactly same time (microseconds)? is this enough ??? $r = mt_rand(); $uid = uniqid(getmypid() . $r); If you're running a cluster of machines I would include information

Re: [PHP] Type safety

2003-07-26 Thread Curt Zirzow
* Thus wrote Nikhil G. Daddikar ([EMAIL PROTECTED]): We all know PHP is great and flexible but, I have this problem... I had a function that took an object as parameter, someone went ahead and changed that to accept object's id (integer), because there is no compilation, some of the code

Re: [PHP] funny output

2003-07-26 Thread Ryan A
Hi, thanks for replying. No, its looking for get, and globals is on. This is my code: *Start code* ? session_start(); header(Cache-control: private); //IE 6 Fix require_once(configbwh.php); $type=$_GET[type]; $_SESSION['type'] = $type; if(!isset($type)) {

[PHP] Configure vpopmail with php

2003-07-26 Thread Haseeb
how can i configure php with vpopmail on linux 7.3 please reply ASAP Haseeb. IncrediMail - Email has finally evolved - Click Here

Re: [PHP] Configure vpopmail with php

2003-07-26 Thread Curt Zirzow
* Thus wrote Haseeb ([EMAIL PROTECTED]): how can i configure php with vpopmail on linux 7.3 please reply ASAP RTFM 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] XML error: junk after document element

2003-07-26 Thread Robert Fitzpatrick
I am trying to parse and xml document: ?xml version=1.0? !DOCTYPE PrequalResponse PUBLIC -//New Edge Networks//DTD Pilot Prequalification Response 2.3//EN http://api.newedgenetworks.com/dtd/prequalresponse.dtd; PrequalResponse TransactionCodeCode1005/CodeMessageAuthentication failed: Invalid

[PHP] how do I get a remote db connection?

2003-07-26 Thread Irvin Amoraal
I have two independent websites, both with their own mySQL db's. I would like to run a query in site A against site B's database. I am trying to establish a connection using something like: $conn = mysql_connect(abc.com:3306, $user, $pass); A warning is returned to the browser : Access denied

Re: [PHP] how do I get a remote db connection?

2003-07-26 Thread John W. Holmes
Irvin Amoraal wrote: I have two independent websites, both with their own mySQL db's. I would like to run a query in site A against site B's database. I am trying to establish a connection using something like: $conn = mysql_connect(abc.com:3306, $user, $pass); A warning is returned to the

Re: [PHP] how do I get a remote db connection?

2003-07-26 Thread Curt Zirzow
* Thus wrote Irvin Amoraal ([EMAIL PROTECTED]): I have two independent websites, both with their own mySQL db's. I would like to run a query in site A against site B's database. I am trying to establish a connection using something like: $conn = mysql_connect(abc.com:3306, $user, $pass); A

[PHP] Thanks!

2003-07-26 Thread Irvin Amoraal
Thanks to both John and Curt who gave me the same answer ... and it actully makes sense. Don't know why I didn't think of it myslef g. Irvin. Irvin Amoraal [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have two independent websites, both with their own mySQL db's. I would like to

Re: [PHP] Want to join PHP open source projects, but who wants me?

2003-07-26 Thread Chris Shiflett
--- Pietuka Krustiòð [EMAIL PROTECTED] wrote: I would like to join an OO project, that is not quite well developed so far, but looks promising. Could you suggest any? Check out SourceForge (http://sf.net/). There are thousands of open source projects hosted there, and there is a help wanted

[PHP] Ping: list admins

2003-07-26 Thread Curt Zirzow
It seems every time I post to the list now I keep getting bounced message back from someone on the list: To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED]) Will he get unsubed automatically or do you have to initiate the change? If its the latter please do so ASAP.. Thanks

[PHP] Settings problem?

2003-07-26 Thread Ryan A
Hi, below is my script which was working fine before and i have looked at the code for the past 2 hours but still get this error: Parse error: parse error, unexpected $end in c:\phpdev\www\bwh\project\my.details.php on line 84 I am on localhost, win2k machine,PHP Version 4.3.1. As you can see

Re: [PHP] Reading a file from another server

2003-07-26 Thread Thomas
I know the url is good, cause I can go on to this domain and look at all my files. I guess I should explain a little further... This server is a game server for Counter-Strike. I'm trying to read a file on there called mapcycle.txt. This server is a secure server, so I would need to use a

Re: [PHP] Reading a file from another server

2003-07-26 Thread CDitty
Have you tried downloading the file to your server and then read it from there? I do this at least 15 times a day with several different sites and I rarely have any problems. CDitty At 11:28 AM 7/26/2003, Thomas wrote: I know the url is good, cause I can go on to this domain and look at all

Re: [PHP] Settings problem?

2003-07-26 Thread Curt Zirzow
* Thus wrote Ryan A ([EMAIL PROTECTED]): [...] if(isset($_SESSION['my_user']) isset($_SESSION['my_ccno'])) { ^~~~ this never gets closed. I love vi and '%', has prevented headaches like this so meny times... Curt -- I used to think I was indecisive, but now I'm not so sure. -- PHP

[PHP] /n not working

2003-07-26 Thread Thomas Hochstetter
Hi there. I got a question from someone why the following (from the manual) will not bring the desired output: ?php /* if I open the following txt file and in explorer*/ $text = The quick brown fox jumped over the lazy dog.; $newtext = wordwrap($text, 20); echo $newtext\n; /*my output is

Re: [PHP] /n not working

2003-07-26 Thread John W. Holmes
Thomas Hochstetter wrote: Hi there. I got a question from someone why the following (from the manual) will not bring the desired output: ?php /* if I open the following txt file and in explorer*/ $text = The quick brown fox jumped over the lazy dog.; $newtext = wordwrap($text, 20); echo

Re: [PHP] Configure vpopmail with php

2003-07-26 Thread Haseeb
the detail in not enough in the FM :) Haseeb ---Original Message--- From: Curt Zirzow Date: Saturday, July 26, 2003 09:48:19 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Configure vpopmail with php * Thus wrote Haseeb ([EMAIL PROTECTED]): how can i configure php with vpopmail

Re: [PHP] /n not working

2003-07-26 Thread Curt Zirzow
* Thus wrote John W. Holmes ([EMAIL PROTECTED]): Thomas Hochstetter wrote: $text = The quick brown fox jumped over the lazy dog.; $newtext = wordwrap($text, 20); echo $newtext\n; [...] HTML does not render newlines. You need to use br /. View the source of this code in your browser

Re: [PHP] Configure vpopmail with php

2003-07-26 Thread Curt Zirzow
* Thus wrote Haseeb ([EMAIL PROTECTED]): the detail in not enough in the FM :) Haseeb Just curious how this line isn't enough: In PHP 4, these functions are only available if PHP was configured with --with-vpopmail[=DIR]. HTH, Curt -- I used to think I was indecisive, but now I'm not so

Re: [PHP] PHP Email use alternate SMTP

2003-07-26 Thread Marek Kilimajer
www.phpclasses.org/mimemessage it contains a class that can send directly to SMTP server Tom Vogel wrote: Hi, i'm trying to set up an email form on my website. When I originally ran the server from windows I could simply set SMTP = mailhost.ucalgary.ca and it would work. After moving the server

Re: [PHP] Reading a file from another server

2003-07-26 Thread Curt Zirzow
* Thus wrote Thomas ([EMAIL PROTECTED]): I know the url is good, cause I can go on to this domain and look at all my files. I guess I should explain a little further... This server is a game server for Counter-Strike. I'm trying to read a file on there called mapcycle.txt. This server

Re: [PHP] Are left joins more efficient?

2003-07-26 Thread John Hicks
Dennis-- You might get a more authoritative answer from the mysql general discussion list at: http://lists.mysql.com --John On Monday 25 August 2003 12:59 pm, [EMAIL PROTECTED] wrote: Hello, I program for a website that gets massive loads of traffic. Optimisation has become an important

[PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Ryan A
Hi, Ok, have half solved why my scripts all of a sudden stopped working. This is how my scripts are setup: There is a form(login.php) where the user puts in his user/pass, then this is authenticated(auth.php) by the database and a few other sessions are created (email,cust_number) and also

[PHP] Re: mail problem

2003-07-26 Thread Manuel Lemos
Hello, On 07/26/2003 09:35 AM, Paul Marinas wrote: Hi, i have to send some e-mails with pictures, in html format, i was wondering if anyone knows where to find a php class that dose this. You may want to try using this class that does exactly what you need and more. It lets you compose HTML

Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Marek Kilimajer
You have cookies disabled and session.use_trans_sid is enabled in php.ini. So the session module parses your html output and adds PHPSESSID to all internal links, forms and everything else that is needed. However it does not add session id to Location header, it is your responsibility. Use

Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Ryan A
Hey, Thanks for replying. I know you can manipulate the php.ini file via htaccess or by putting some instructions in the include file...is there any way to turn on cookies again and turn off session.use_trans_sid so i can go back to the old way it was? because I have a lot of

Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread John W. Holmes
Ryan A wrote: I know you can manipulate the php.ini file via htaccess or by putting some instructions in the include file...is there any way to turn on cookies again and turn off session.use_trans_sid so i can go back to the old way it was? because I have a lot of header(location:) statements

[PHP] PHP - Flash problem

2003-07-26 Thread Thomas
Hello everyone, I'm trying to pass some info into Flash. this worked fine with another funciton call instead of Players(); But for some reason it will only pass the first name into flash..that's it. however, when I check it just in a browser, it works fine. I'm not sure why this one won't

Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Ryan A
Hey John, I dont think its the browser because I have tried this with opera 6,opera 7, IE and NN with the same results... But when i checked the phpinfo() it says that cookies are enabledDo you think its worth it to search and replace each Location header with .SID? Thanks, -Ryan -

Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread Jim Lucas
Personally, I would do a search-and-replace for header() and replace it with your own custom header() function. Then you would only have to change one location. Jim Lucas - Original Message - From: Ryan A [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, July

Re: [PHP] Best way to transfer session IDs

2003-07-26 Thread Matthew A. Blasinski
Chris Shiflett wrote: --- Matthew A. Blasinski [EMAIL PROTECTED] wrote: So, I'm thinking a plausible session id could be made by hashing their identification (to make it useful to the rightful owner only) with a private key (to make it hard to get and guess). I think the identification could be

php-general Digest 26 Jul 2003 20:56:44 -0000 Issue 2199

2003-07-26 Thread php-general-digest-help
php-general Digest 26 Jul 2003 20:56:44 - Issue 2199 Topics (messages 156986 through 157031): Re: unique id 156986 by: Tom Rogers 156999 by: Curt Zirzow Type safety 156987 by: Nikhil G. Daddikar 157000 by: Curt Zirzow [security] NOT the path of the script

[PHP] Is their a flash and php mailing list?

2003-07-26 Thread Dan J. Rychlik
Is their a flash and php mailing list? or PHP for Flash mailing list?

Re: [PHP] Half solved...............what the @#%# is PHPSESSID?

2003-07-26 Thread John W. Holmes
Ryan A wrote: Hey John, I dont think its the browser because I have tried this with opera 6,opera 7, IE and NN with the same results... But when i checked the phpinfo() it says that cookies are enabledDo you think its worth it to search and replace each Location header with .SID? Well, if SID

[PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Philip J. Newman
My goal is to input the amount of Bytes used by a user as $inputbox and calculate how many kbs,megs,gigs along with $cost for the price per meg. ? $inputbox = 414478244; // PROCESS DATA $kbs = $inputbox/1024; $megs = $kbs/1024; $gigs = $megs/1024; // CALC COST OF MEGS cost = $megs * 0.05;

Re: [PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Matthew A. Blasinski
Philip J. Newman wrote: My goal is to input the amount of Bytes used by a user as $inputbox and calculate how many kbs,megs,gigs along with $cost for the price per meg. snip Questions? 1. Should I be dividing by 1024 or 1000? This was passed to me by word of mouth ... 2. Any way of rounding to 2

Re: [PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Curt Zirzow
* Thus wrote Philip J. Newman ([EMAIL PROTECTED]): My goal is to input the amount of Bytes used by a user as $inputbox and calculate how many kbs,megs,gigs along with $cost for the price per meg. ? $inputbox = 414478244; // PROCESS DATA $kbs = $inputbox/1024; $megs = $kbs/1024;

Re: [PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Curt Zirzow
* Thus wrote Matthew A. Blasinski ([EMAIL PROTECTED]): Philip J. Newman wrote: My goal is to input the amount of Bytes used by a user as $inputbox and calculate how many kbs,megs,gigs along with $cost for the price per meg. [...] 3) Use a search and replace (regular expression) to replace

[PHP] FTP - Can't build data connection

2003-07-26 Thread Suhas Pharkute
Hi I am writing a FTP application. When I upload a file I am getting following error, Warning: ftp_put(): Can't build data connection: Connection refused. There is no error for connection/login to ftp site. can any one help? Thanks, Suhas _ Encrypt your PHP

[PHP] Re: Is their a flash and php mailing list?

2003-07-26 Thread zerof
forums.macromedia.com - zerof - Is their a flash and php mailing list? or PHP for Flash mailing list? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FTP - Can't build data connection

2003-07-26 Thread Andrew Brampton
This would happen when a incoming or a outgoing port 20 (FTP Data) connection can't be made. I don't know how PHP ftp functions work but normally the FTP client makes a outgoing connection on port 21, and then the FTP Server makes a incoming connection from port 20 when any kind of data is sent

[PHP] Help with Apache

2003-07-26 Thread Corey Edwards @ Dreamstar Computer Software
I finally set up an Apache Web Server. I didn't realize you needed that to run php until now. Now, I have another question. I have it installed, but when I run a PHP script, it says it can't be found. Even when I am running the apache server. And the apache server seems to be running fine.

Re: [PHP] Help with Apache

2003-07-26 Thread Curt Zirzow
* Thus wrote Corey Edwards @ Dreamstar Computer Software ([EMAIL PROTECTED]): I finally set up an Apache Web Server. I didn't realize you needed that to run php until now. Now, I have another question. I have it installed, but when I run a PHP script, it says it can't be found. Even when

Re: [PHP] Changing Bytes to KB, to megs, to gigs.

2003-07-26 Thread Josh Sneaker
Thanks, that seems to work very well (o; / Josh - Original Message - From: Curt Zirzow [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Sunday, July 27, 2003 10:17 AM Subject: Re: [PHP] Changing Bytes to KB, to megs, to gigs. * Thus wrote Matthew A. Blasinski ([EMAIL PROTECTED]):

RE: [PHP] Help with Apache

2003-07-26 Thread Mark Charette
-Original Message- From: Corey Edwards @ Dreamstar Computer Software I finally set up an Apache Web Server. I didn't realize you needed that to run php until now. That's only true if you need to serve Web pages; php runs fine from the command line ... -- PHP General Mailing List

Re: [PHP] /n not working

2003-07-26 Thread DvDmanDT
I must suggest to just add like header(Content-Type: text/plain); // Don't use HTML To the top of examples like that... -- // DvDmanDT MSN: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] Curt Zirzow [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] * Thus wrote John W. Holmes ([EMAIL

[PHP] OOP, PHP4 PHP5

2003-07-26 Thread Mike Brum
I've been using PHP for a few years now and I'm quite familiar and comfortable with it. I'd like to start to seriously do some OOP coding and take things to the next level. But as I understand it, PHP5 is going to make quite a few changes/improvements to PHP4's current handling of OOP. Given

[PHP] Re: OOP, PHP4 PHP5

2003-07-26 Thread Greg Beaver
Hi Mike, The short answer: Yes. The long answer: PHP 5 only adds functionality to PHP 4, it is backwards compatible, so start with PHP 4, and PHP 5 will be easy. Greg Mike Brum wrote: I've been using PHP for a few years now and I'm quite familiar and comfortable with it. I'd like to start

Re: [PHP] OOP, PHP4 PHP5

2003-07-26 Thread John W. Holmes
Mike Brum wrote: I'd like to start to seriously do some OOP coding and take things to the next level. But as I understand it, PHP5 is going to make quite a few changes/improvements to PHP4's current handling of OOP. Given that the PHP5 beta has been out for approx. 1 month, do you think it makes

Re: [PHP] how to make a global scope array

2003-07-26 Thread Jack Lee
Thank you very much! David Nicholson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, This is a reply to an e-mail that you wrote on Sat, 26 Jul 2003 at 00:50, lines prefixed by '' were originally written by you. Ouch! Sometimes I wish global didn't exist Yes, it can be better

[PHP] Read values from Text Area Box

2003-07-26 Thread KEN - 2mediaZone
Hi, there. (B (BI'm trying to find out how to get multiple values from text area box (Btextarea/textarea. (B (B (BValues are like this. (B (Baaa\n (Bbbb\n (Bccc\n (Bddd\n (Beee\n (B (BI need to take "\n" from each value and put all the values to array. (B (B (BPlease advise me if