php-general Digest 21 Apr 2005 11:45:57 -0000 Issue 3410

2005-04-21 Thread php-general-digest-help
php-general Digest 21 Apr 2005 11:45:57 - Issue 3410 Topics (messages 213544 through 213556): Re: Abstract Legacy question 213544 by: Rob Agar Re: script 213545 by: tommy 213546 by: Philip Hallstrom Re: parse error, unexpected T_CLASS 213547 by: Kim Briggs

[Fwd: Re: [PHP] email through PHP]

2005-04-21 Thread Balwant Singh
thanks to all for the kind support. i resolved the problem, i would like to share the same with you:- 1. made the changes in php.ini (gave sendmail path) 2. gave my smtp server ip address and name in /etc/hosts file 3. gave my smtp server name in /etc/mail/sendmail.mc file 4. then made

Re: [PHP] delete session cookie?

2005-04-21 Thread William Stokes
Thanks. That's what I was looking for... Burhan Khalid [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: Hello, Is it possible to delete a session cookie from browser? If so how? http://www.php.net/manual/en/function.session-destroy.php See the example. --

Re: [PHP] Classe Variable

2005-04-21 Thread Petar Nedyalkov
On Wednesday 20 April 2005 21:04, Jochem Maas wrote: Petar Nedyalkov wrote: On Wednesday 20 April 2005 13:29, marc serra wrote: Hi, i got a problem to write automaticaly varibles in classes. i got a simple object name test like this classes Test{ public $id; public

Re: [PHP] Re: Session variables are not stored when set in implicitly calledconstructor!??

2005-04-21 Thread Jochem Maas
Jason Barnett wrote: Adam wrote: Hallo again, thank You for Your response. // singleton for request class Request { function __destructor() { $_SESSION[variable] = hallo; The __destructor() method is supposed to be about killing the class (Request). It's probably bad practice to be

[PHP] Is it possible to get the whole address (including http:// ) ?

2005-04-21 Thread Labunski
Hello, I know for example how to get http vars or basename, but this time I need to get the whole address, including http:// . Is it possible? Thanks in advance, Lab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Need urgent help on post php long code

2005-04-21 Thread Pieter du Toit
I have the following code: function display_setcom() { global $config; dsprint(display_setcom()); dprint($_SESSION[logged_in]); $user_id = $_SESSION[logged_in]; $result = mysql_query(SELECT users.user_first_name, users.user_last_name, users.user_cell, users.user_idnom, users.user_email,

[PHP] PHP4 to PHP5 upgrade help

2005-04-21 Thread Mike
I want to upgrade my server from PHP 4.3.10 to PHP 5.0.4, however, many of my clients run scripts that will break if I do. The main problem seems to be 'classes'. Is there a way to put a band-aid on these scripts that will allow them to function when I upgrade?

[PHP] PDO and Oracle...

2005-04-21 Thread Charles FENDT
I try to use PDO to access to Oracle database... I use PDO::prepare and bindParam to set var values... but it didn't work !!! PDO_PARAM_INT didn't work with columns of type NUMBER... What can i do ??? Regards, FENDT Charles -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] PDO Oracle

2005-04-21 Thread Charles FENDT
I try PDO with Oracle... I want to use a prepared query with a param... but bindParam freeze Apache, exec(arra(...)) send me an error : OCIBindByPos: ORA-01036: numro/nom de variable interdit (..\pecl\pdo_oci\oci_statement.c:259) Any idee ?? Regards, FENDT Charles -- PHP General Mailing List

Re: [PHP] PDO Oracle

2005-04-21 Thread Charles FENDT
Charles FENDT a crit : I try PDO with Oracle... I want to use a prepared query with a param... but bindParam freeze Apache, exec(arra(...)) send me an error : OCIBindByPos: ORA-01036: numro/nom de variable interdit (..\pecl\pdo_oci\oci_statement.c:259) Any idee ?? Regards, FENDT Charles more

[PHP] reverse MD5 ???

2005-04-21 Thread William Stokes
Hello, I have a system that uses certain id info. This info is stored in a session cookie in MD5 format. At certain parts of the code I need to update or insert to MySQL DB with that id info value in cleartext. Is this possible? If so, how to put this to a sql query? $sqlquery = insert into

Re: [PHP] reverse MD5 ???

2005-04-21 Thread Charles FENDT
William Stokes a écrit : Hello, I have a system that uses certain id info. This info is stored in a session cookie in MD5 format. At certain parts of the code I need to update or insert to MySQL DB with that id info value in cleartext. Is this possible? If so, how to put this to a sql query?

[PHP] Re: reverse MD5 ???

2005-04-21 Thread Jason Barnett
William Stokes wrote: Hello, I have a system that uses certain id info. This info is stored in a session cookie in MD5 format. At certain parts of the code I need to update or insert to MySQL DB with that id info value in cleartext. Is this possible? If so, how to put this to a sql query?

Re: [PHP] reverse MD5 ???

2005-04-21 Thread Richard Davey
Hello William, Thursday, April 21, 2005, 2:28:01 PM, you wrote: WS $team_id is the MD5 formatted cookie value and I need to put it to the WS x_table column team_id in cleartext. You need to re-think how those cookie values are stored then. You cannot un-MD5 something at all, it's a one-way

[PHP] Re: Is it possible to get the whole address (including http:// ) ?

2005-04-21 Thread Jason Barnett
Labunski wrote: Hello, I know for example how to get http vars or basename, but this time I need to get the whole address, including http:// . Is it possible? Thanks in advance, Lab. http://php.net/reserved.variables ?php var_dump($_SERVER['REQUEST_URI']); ? -- Teach a man to fish...

[PHP] Re: PHP4 to PHP5 upgrade help

2005-04-21 Thread Jason Barnett
Mike wrote: I want to upgrade my server from PHP 4.3.10 to PHP 5.0.4, however, many of my clients run scripts that will break if I do. The main problem seems to be 'classes'. Is there a way to put a band-aid on these scripts that will allow them to function when I upgrade? If the main

[PHP] Post shorter code

2005-04-21 Thread Jason Barnett
You're far more likely to get someone to look at your problem code if you can narrow it down to a block of code. Hell, you didn't even state a problem!!! Sorry, but if you come back with a well defined problem then maybe someone can help you. -- Teach a man to fish... NEW? |

Re: [PHP] Regular Expression to replace pseudo-HTML?

2005-04-21 Thread Philip Hallstrom
I'm hoping someone can help me figure out a regex that will replace pseudo-HTML codes in a string with desired HTML equivalents. In particular, I'm trying to implement a message quoting facility, such as when you click on the 'quote' button in phpBB.

Re: [PHP] Post shorter code

2005-04-21 Thread Ryan A
You're far more likely to get someone to look at your problem code if you can narrow it down to a block of code. Hell, you didn't even state a problem!!! Sorry, but if you come back with a well defined problem then maybe someone can help you. It also helps if you quote a bit from the

Re: [PHP] Post shorter code

2005-04-21 Thread Petar Nedyalkov
On Thursday 21 April 2005 17:20, Ryan A wrote: You're far more likely to get someone to look at your problem code if you can narrow it down to a block of code. Hell, you didn't even state a problem!!! Sorry, but if you come back with a well defined problem then maybe someone can help

[PHP] 1 web site, 3 servers, 3 countries - best practises?

2005-04-21 Thread Richard Davey
Hi all, Are there any recommended readings (books, blogs, site articles) that deal with setting up a single web site split across multiple servers and countries? Specifically looking for best practises regarding handling the content (syncing between the servers) to ensure users get

Re: [PHP] Post shorter code

2005-04-21 Thread tg-php
All of them. :) -TG = = = Original message = = = You're far more likely to get someone to look at your problem code if you can narrow it down to a block of code. Hell, you didn't even state a problem!!! Sorry, but if you come back with a well defined problem then maybe someone can help

[PHP] view zip file contents

2005-04-21 Thread Sebastian
does anyone know of a way to view the contents of a zip file and its directory structure? i know there are zip file functions in php but they require extra libs i would rather not load right now. i know its possible, at least by looking at this download manager that does this:

[PHP] PEAR Packages

2005-04-21 Thread Don
Hi, I have just started to explore PEAR. I am using PHP 4.3.11 and so PEAR automatically comes with PHP. I would like to install PEAR's DB classes. However, I cam right now browsing the PEAR web site and cannot find information on how to install a package. I have also downloaded and opened

Re: [PHP] view zip file contents

2005-04-21 Thread Philip Hallstrom
does anyone know of a way to view the contents of a zip file and its directory structure? i know there are zip file functions in php but they require extra libs i would rather not load right now. http://pear.php.net/package/Archive_Zip don't know if it requires extra libs... -- PHP General

Re: [PHP] PEAR Packages

2005-04-21 Thread Martín Marqués
El Jue 21 Abr 2005 11:36, Don escribió: Hi, I have just started to explore PEAR. I am using PHP 4.3.11 and so PEAR automatically comes with PHP. I would like to install PEAR's DB classes. However, I cam right now browsing the PEAR web site and cannot find information on how to install a

[PHP] Re: PEAR Packages

2005-04-21 Thread Jason Barnett
Don wrote: Hi, I have just started to explore PEAR. I am using PHP 4.3.11 and so PEAR automatically comes with PHP. I would like to install PEAR's DB classes. However, I cam right now browsing the PEAR web site and cannot find information on how to install a package. I have also

Re: [PHP] view zip file contents

2005-04-21 Thread Sebastian
No releases have been made yet. Philip Hallstrom wrote: does anyone know of a way to view the contents of a zip file and its directory structure? i know there are zip file functions in php but they require extra libs i would rather not load right now.

Re: [PHP] PEAR Packages

2005-04-21 Thread tg-php
I was a little confused at first, but it's actually REALLY simple. I was doing manual installations until I discovered that PEAR has made everything way too easy for us. From the PEAR manual: ## To update your PEAR installation from go-pear.org, request http://go-pear.org/ in

Re: [PHP] PEAR Packages

2005-04-21 Thread tg-php
For us, the unix instructions worked 100% on Windows as well. Guess since it's all PHP based it didn't make a difference. Probably some minor internal tweaks and checks due to filesystem differences, but the PEAR guys did a great job in making it all very easy. Now for us lazy Windows guys,

Re: [PHP] Post shorter code

2005-04-21 Thread Ryan A
It also helps if you quote a bit from the original post so new people to the thread will know what you are talking about... for example: I have no idea about which thread Jason(above) is talking about It's just up to Netiquette ;-) I dont think the above qualifies for

Re: [PHP] reverse MD5 ???

2005-04-21 Thread trlists
On 21 Apr 2005 Jason Barnett wrote: Any information that you wouldn't want in the script in plain text, you probably don't want in the database in clear text. Moreover MD5 is a one way hash and although it is broken, you probably don't want to spend the processing time needed to reverse it.

Re: [PHP] Post shorter code

2005-04-21 Thread Petar Nedyalkov
On Thursday 21 April 2005 18:21, Ryan A wrote: It also helps if you quote a bit from the original post so new people to the thread will know what you are talking about... for example: I have no idea about which thread Jason(above) is talking about It's just up to

Re: [PHP] reverse MD5 ???

2005-04-21 Thread M Saleh EG
It's simple. If your system supports it performance wise. Grab the id and compare it against the md5 version of the id saved in the cookie. if( $_COOKIE['id'])== md5($id)) { //.. then allow or let the user to do something } that's if you have the id already known. otherwise if you donno

RE: [PHP] Post shorter code

2005-04-21 Thread Chris W. Parker
Petar Nedyalkov mailto:[EMAIL PROTECTED] on Thursday, April 21, 2005 8:17 AM said: OFFTOPIC Forgetting is also an issue in Netiquette ;-) A lot of people forget the rules, it's not a problem. I just meant that we have to be careful. /OFFTOPIC Yeah and sometimes people forget to trim

Re: [PHP] Post shorter code

2005-04-21 Thread John Nichel
Chris W. Parker wrote: What? ;) -- John C. Nichel ÜberGeek 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] Post shorter code

2005-04-21 Thread Drewcore
dont fight guys, it makes me nervous... :) d On 4/21/05, Petar Nedyalkov [EMAIL PROTECTED] wrote: On Thursday 21 April 2005 18:21, Ryan A wrote: It also helps if you quote a bit from the original post so new people to the thread will know what you are talking about...

[PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-21 Thread Satyam
My domain, satyam.com.ar, though supposedly in Argentina resides in Spain, where I currently live hundreds of kilometers away from it, which I mention to point out that domain names do not correlate to physical locations. Unless there is a political issue regarding who owns the actual machine

[PHP] Re: reverse MD5 ???

2005-04-21 Thread Satyam
If I tell you that dividing a certain number by three gives you a remainder of 2, would you be able to guess the first number? Same thing with MD5, it is just one way, it can't be reversed. Satyam William Stokes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I have a

Re: [PHP] reverse MD5 ???

2005-04-21 Thread Ryan A
I am not really interested in reversing MD5 and I sure as hell hope its not easy to do for a LONG time to come as we use it in some of our licensing, for software we sell.BUT the below text was some good reading none the less. I'm gonna copy and save the below text for the next client who asks

Re: [PHP] Post shorter code

2005-04-21 Thread Ryan A
Chris W. Parker wrote: What? ;) HAHAHAHA -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 4/20/2005 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: post redirect

2005-04-21 Thread Mike Hummel
if you redirect the browser to a new page, once that new page loads up, any POST or GET variables from the previous page will be replaced with the new redirected to page. Jem777 wrote: If I submit a post and then, serverside, I redirect the request to another page, do the post variables still

Re: [PHP] Re: reverse MD5 ???

2005-04-21 Thread Greg Donald
On 4/21/05, Satyam [EMAIL PROTECTED] wrote: If I tell you that dividing a certain number by three gives you a remainder of 2, would you be able to guess the first number? Yes. 5, 8, 11, 14, etc. Same thing with MD5, it is just one way, it can't be reversed. MD5 collisions were found last

Re: [PHP] Re: reverse MD5 ???

2005-04-21 Thread Ryan A
Interesting reading, even though most of it went over my head :-) There ar'nt any tools freely available to the average joe to decypher a md5 hash though...right? Cheers, -Ryan On 4/21/2005 6:34:45 PM, Greg Donald ([EMAIL PROTECTED]) wrote: On 4/21/05, Satyam [EMAIL PROTECTED] wrote: If I

[PHP] DB::DataObject 1.7.13

2005-04-21 Thread Edward Grace
Dear All, It appears that the behaviour of the DataObject generator has changed so that it now uses schemas, the links file that it generates now doesnt' seem to have the correct key information so things like FormBuilder no longer work. Is there a way to 1) disable the schemas for legacy

[PHP] Need help in mail and instant messenger source

2005-04-21 Thread Srinadh Sannidhanam
Hi, Please send me if you know any open source sites for Instant Messenger and Mail Package applications in PHP. I found some, but not so good. Thnaks in advance. --srinadh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] I need do paging in php, I use ODBC Access

2005-04-21 Thread Tomás Rodriguez Orta
Dear Friends. Somebody did paging in php for data origin in ODBC Access? I need an algorithm for doing this, please Help me! Ok? TOMAS - Este correo fue escaneado en busca de virus con el MDaemon Antivirus 2.27 en el

[PHP] formatting logic

2005-04-21 Thread Ryan A
Hi, Am having a bit of logic problem figuring this outI just think the easy solution would cost me in having too many sql queries from my script so there has to be a easier way. I am allowing our members to upload pictures and they can choose which category the pictures go under, the first

Re: [PHP] Re: reverse MD5 ???

2005-04-21 Thread tg-php
Nope.. nothing that'll easily decrypt MD5 back to it's original value. As the line below says and the rest of the thread explained, MD5 is a one-way function. In ordre to take an MD5 hash and get back to the original value, you'd basically have to take every possible combination of

[PHP] Re: I need do paging in php, I use ODBC Access

2005-04-21 Thread Matthew Weier O'Phinney
* Tomás Rodriguez Orta [EMAIL PROTECTED]: Somebody did paging in php for data origin in ODBC Access? I need an algorithm for doing this, please Help me! Grab PEAR Pager, and let it do the work for you. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist |

Re: [PHP] formatting logic

2005-04-21 Thread Philip Hallstrom
I am allowing our members to upload pictures and they can choose which category the pictures go under, the first category public is made for them. When I sql the DB I call it like this: select picture_names,more fields from table where member_id=x order by category. which i display something

Re: [PHP] formatting logic

2005-04-21 Thread Andy Pieters
Hi First, execute your query unset($fail); $res=mysql_query($sql,$dbhandle) or $fail=true; if( (isset($fail)) || (!(is_resource($res)) ) echo There was a problem with the execution of the query; if(mysql_num_rows($res)==0) echo The query resulted in ZERO records; #now that's out of the way,

[PHP] htaccess file

2005-04-21 Thread Pieter du Toit
Is there any way that i can see if using htaccess file is enabled on server without contacting my isp. I created a htaccess file and ftp'd it to the server with the register_globals flag set to 0: this is the htaccess code # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README*

RE: [PHP] I need do paging in php, I use ODBC Access

2005-04-21 Thread Warren Vail
Somebody did paging in php for data origin in ODBC Access? I need an algorithm for doing this, please Help me! I assume by paging you are referring to a scrolling algorithm that allows you to view only a small portion of your query result set. The algorithm that comes to mind is

[PHP] Can I use $_REQUEST for file uploads?

2005-04-21 Thread Srinadh Sannidhanam
Hi When I use $_REQUEST for accessing files uploaded, it is working fine in PHP PHP 4.3.10. But it is not working in PHP 4.3.4. $_FILES working in both the versions. Can I use $_REQUEST in PHP 4.3.10 also? Do I need to change any configuration in php.ini? server is Apache/2.0.49 Please help

Re: [PHP] htaccess file

2005-04-21 Thread Chris
Well, if the htaccess file caused an internal server error (500) then yes, it's reading it. This isn't an apache list, you probably want to ask this question somewhere else... That being said... Are you missing an 'e' in the AllowOverride line near the bottom? Pieter du Toit wrote: Is there

Re: [PHP] htaccess file

2005-04-21 Thread Greg Donald
On 4/21/05, Pieter du Toit [EMAIL PROTECTED] wrote: Is there any way that i can see if using htaccess file is enabled on server without contacting my isp. I created a htaccess file and ftp'd it to the server with the register_globals flag set to 0: php_admin_flag register_globals 0

Re: [PHP] PEAR Packages

2005-04-21 Thread Andy Pieters
On Thursday 21 April 2005 17:04, [EMAIL PROTECTED] wrote: Hmm... another project to add to my list of projects that I'll never finish. haha Glad to know I'm not the only one. ;-) Andy -- Registered Linux User Number 379093 -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/E$ d-(---)+

Re: [PHP] I need do paging in php, I use ODBC Access

2005-04-21 Thread chris
You are right about MSSQL not having a limit, but here is an article that shows a work around http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=850lngWId=5 Warren Vail [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Somebody did paging in php for data origin in

Re: [PHP] PEAR Packages

2005-04-21 Thread Jason Barnett
[EMAIL PROTECTED] wrote: For us, the unix instructions worked 100% on Windows as well. Guess since it's all PHP based it didn't make a difference. Probably some minor internal tweaks and checks due to filesystem differences, but the PEAR guys did a great job in making it all very easy.

[PHP] Count totals (might be 0T)

2005-04-21 Thread Ryan A
Hi again, Am faced with a new problem (either that or working straight 10 hours is catching up!) Heres my table (easy to figure out so i wont waste your time explaining the fields): cno, date_added, pic_name, pic_size_kb, pic_desc_text, pic_category the way i am displaying the data is like this

Re: [PHP] Count totals (might be 0T)

2005-04-21 Thread Ryan A
Hey, Thanks for replying. That means I will have to run a query per categorywhich I would like to avoid if possible as they could be a high amount of categories as they are user created and not defined by us. Thanks, Ryan On 4/22/2005 12:08:31 AM, Drewcore ([EMAIL PROTECTED]) wrote: run

Re: [PHP] Count totals (might be 0T)

2005-04-21 Thread Tom Rogers
Hi, Friday, April 22, 2005, 8:03:06 AM, you wrote: RA Hi again, RA Am faced with a new problem (either that or working straight 10 hours is RA catching up!) RA Heres my table (easy to figure out so i wont waste your time explaining the RA fields): RA cno, RA date_added, RA pic_name, RA

[PHP] How to save a file with UTF-8 encoding and no BOM using PHP?

2005-04-21 Thread Jon M.
I am trying to have a file that I generated with PHP saved as UTF-8 without the BOM (Byte Order Mark). Does PHP do anything like this? I am a beginner with PHP, but very technically experienced otherwise. I'm talking about the FILE encoding here -just to be clear. e.g. fopen(what_ever_file,

[PHP] How to save a file with UTF-8 encoding and no BOM using PHP?

2005-04-21 Thread Jon M.
I am trying to have a file that I generated with PHP saved as UTF-8 without the BOM (Byte Order Mark). Does PHP do anything like this? I am a beginner with PHP, but very technically experienced otherwise. I'm talking about the FILE encoding here -just to be clear. e.g. fopen(what_ever_file,

RE: [PHP] Count totals(might be 0T)

2005-04-21 Thread Chris W. Parker
Ryan A mailto:[EMAIL PROTECTED] on Thursday, April 21, 2005 3:03 PM said: When I sql the DB I call it like this: select picture_name,more fields from table where cno=x order by category. Any ideas as to how i get how many pics per category and size per category? I'm not sure if its a

Re: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-21 Thread Richard Davey
Hello Satyam, Thursday, April 21, 2005, 5:07:52 PM, you wrote: S My domain, satyam.com.ar, though supposedly in Argentina resides in Spain, S where I currently live hundreds of kilometers away from it, which I mention S to point out that domain names do not correlate to physical locations. S

[PHP] Is it possible to save a file with UTF-8 encoding and no BOM using PHP?

2005-04-21 Thread Jon M.
I am trying to have a file that I generated with PHP saved as UTF-8 without the BOM (Byte Order Mark). Does PHP do anything like this? I am a beginner with PHP, but very technically experienced otherwise. I'm talking about the FILE encoding here -just to be clear. e.g. fopen(what_ever_file,

Re: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-21 Thread Drewcore
well, i guess it all depends... are you talking about having one server in south america that acts as your database server, one server in asia that's your web server, and then another server in north america that servers some other task? or are you talking about having a localized database,

Re: [PHP] Can I use $_REQUEST for file uploads?

2005-04-21 Thread Prathaban Mookiah
$_REQUEST should work fine with 4.3.10 IF $_FILES does not have any problems since both depend more or less on the same php.ini directives. Take a look at http://www.php.net/manual/en/reserved.variables.php#reserved.variables.files Cheers, Prathap -- Original Message ---