Re: [PHP] *** glibc detected *** double free or corruption: error

2005-01-09 Thread Raditha Dissanayake
Alex Greg wrote:
(apologies if this reaches the list twice - the first time I sent it,
it didn't arrive within 12 hours)
Hi,
Recently I migrated the front-end of our bulletin board (running
phpBB, patched against the recently highlight vulnerability) to a pair
of servers running Fedora Core 3. I compiled Apache 1.3.33 and PHP
4.3.10 from source. The MySQL database is running on a separate machine.
This morning, the servers slowed down to the point that they were
almost completely unresponsive. After a while I managed to SSH into
the machines and saw that the httpd processes had grown to 35MB each
and were using up all the swap and RAM on the machines (they have 1GB
RAM, 1GB swap). I then set MaxClients to 30 and restarted Apache, but
the slowdown happened again:
I then checked the error log and found this:
*** glibc detected *** double free or corruption: 0x097ec7e8 ***
 

Quite curiously I had this same problem just yesterday and spent quite a 
bit of time scratching around trying to get it to work again. I upgraded 
all of apache, glibc and php to know avail. Though this error had been 
seen many times before by others i found nothing relevent in google. In 
my case however it turned out to be a really trivial and stupid mistake: 
I had AddModule lines for the both the PHP4 and PHP5 SO in my httpd.conf 
file.  Please check your own httpd.conf file. If not that it could also 
be conflicting extensions.

 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] handling large files w/readfile

2004-12-26 Thread Raditha Dissanayake
Sebastian wrote:
i'm working on a app which output files with readfile() and some headers..
i read a comment in the manual that says if your outputting a file php will
use the same amount of memory as the size of the file. so, if the file is
100MB php will use 100MB of memory.. is this true?
 

I did a comparision study of readfile() and related functions you will 
see that results at http://www.raditha.com/wiki/Readfile_vs_include
What I discovered was that require,include() and file_get_contents() 
would consume more memory than the file size. Not so with readfile or 
fpasstru


if it is, how can i work around this?
 

go ahead and use readfile.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Compiling PHP Source guides

2004-12-23 Thread Raditha Dissanayake
Greg Donald wrote:
On Wed, 22 Dec 2004 13:56:39 -0800, Donald Tyler [EMAIL PROTECTED] wrote:
 

I do have a rudimentary knowledge of *nix stuff
   

I don't mean to offend, but it doesn't really seem so.  Basic *nix
skills usually include knowing how to configure, compile, and install
software from source.  The PHP docs explain in very explicit detail
how to do it, and I have to say you won't find any more hand holding
than you get with PHP documentation.  The 'F' in RTFM really means
'Fine' when used in a PHP context.
 

poor Greg, the political correctness monitors are going to fall on him 
like a ton of bricks.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Firefox/IE (sometimes) wants to download .php files from my Apache2 server

2004-12-23 Thread Raditha Dissanayake
Rinke Hoekstra wrote:
Addendum: it's php 4.3.3 I'm running...
It's a pretty ancient version upgrade to a new version and try compiling 
from source. It's very likely that your webserver error log will contain 
a message that tells you why exactly this is happening.

I have a rather odd problem. Since a few days, my otherwise perfect 
SuSe
9.0 Apache2 server started to do some funny stuff.
In general, php works fine, and I can do anything I want... after a
little while Firefox/IE starts asking me whether I want to download/run
the php file instead of rendering it in the browser.
Sometimes even this doesn't happen, and I just get a regular Apache2
page stating 'Object not found' (with accompanying lines in my server's
error_log). A few minutes later, everything works fine again.
(restarting apache also tends to help)


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] can I compile php source

2004-12-21 Thread Raditha Dissanayake
Bruce Douglas wrote:
and this response was helpful to the guy who asked the original question, how 

i mean, aside from showing that you know how to do a link, what did you show
peace...
 

You have shown that you are a newby to mailing lists.
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] can I compile php source

2004-12-21 Thread Raditha Dissanayake
Paul Aviles wrote:
Bruce, that is the typical answer when someone has a God complex and 
feels is his duty to teach everyone to be like him... Don't worry just 
feel sorry for him.
Your sympathy is misplaced.
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] This list is dying: was:can I compile php source OT

2004-12-21 Thread Raditha Dissanayake
It's sad to see how the quality of the help you can get in this list has 
dropped of late. It's not because of the people who post off topic 
messages or don't bother to read the FAQ or RTFM before posting. It's 
because of the people who immidiately spring to the defence of the off 
topic posters.

I see that many people who used to make valuable contributions in this 
list an year ago no longer make any posting. No doubt they are fed up. 
Others make fewer contributions than they used to. The way things are 
going pretty soon it will be a case of blind leading the blind.

To mis-quote John Nichel Flame away responses will be deleted
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] can I compile php source OT

2004-12-21 Thread Raditha Dissanayake
Danny Brow wrote:
Wow I just wasted 10 minutes of my day reading half these post.  This is
one long thread. And man is it hard to follow.
 

exactly why we don't want people posting off topic stuff here.
Dan.
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mysql sessions vs flat file?

2004-12-17 Thread Raditha Dissanayake
Jason Morehouse wrote:
Hello all,
Has anyone had an experience with storing sessions in mysql (or 
sqlite)?  If so, what if any are the performance benefits?  Obviously, 
there would have to be an extra db query per page... but would that be 
faster then opening a text file?
Speed depends on several factors and I would not comment on it. One of 
the main advantages of placing session information in the database is 
that your web application can then be clustered more easily.  The other 
advantage is that if you are on a shared hosting enviorenment there some 
measure of additional protection for your session data when it's stored 
in the database.
The main disadvantage is that you are complicating your application a 
bit and session management errors may become harder to track.

Also, I was trying to post to the php news server, but my messages 
weren't showing up.  Is it read only?  Or just slow?

Cheers,
-J

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Apache Upload file Permission denied

2004-12-16 Thread Raditha Dissanayake
Michael Leung wrote:
Hi All,
  My problem is finally solved by totally off SELinux Security
Policies.
I told you so :-))
Thank you very verry much the helps from yours! I know this
is not very safe solution, but at the leasy my script can work
 


yours,
Michael
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] fsockopen to own server

2004-12-16 Thread Raditha Dissanayake
Doc wrote:
Hello.
I'm having a problem with fsockopen and was wondering has anyone ever
noticed a case where it will work from machine1 (dev machine) to machine2.
 

happens all the time :-)
But when the was placed onto machine2 it wouldn't work connecting to it's
own ip address; 

when connecting via telnet it returns:
Escape character is '^]'.
* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS AUTH=LOGIN]
serverip IMAP4rev1 2003.339-cpanel at Wed, 15 Dec 2004
19:33:27 + (GMT)
so I don't think it's the firewall. 

usually a good idea to disable firewalls when having trouble with socket 
code.

the error it returns is No such file
or directory. So it seems that when it connects (which it does without
failing), the file seems to be deleted, as the file the variable refers to
doesn't exist on the fs either.
if(($s = fsockopen($id[sockname], 0, $errno, $errstr)) === FALSE)
$id[sockname] is in the format /tmp/filename with the filename changing
based on a random value and there are no files with that format in /tmp 

it always returns false for some reason on this server.
 

not sure what you are trying to do but it sounds like you are using unix 
domain sockets where you should be using tcp. That's why it might work 
on one machine (where web and imap are both installed) and not on the 
other where you only have the web server but the imap server is remote.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Oversized file behaviour

2004-12-16 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:
Hello people.
   I am working on a file upload script, which has an upload limit of 
2MB (set by directive in php.ini). when I try to upload a file that is 
larger than that it loads the page it is meant to but something 
strange happens to the $_POST data, it all seems to dissappear. can 
someone clarify quite what happens when an upload is larger than the 
legal limit.
it's probably not the upload_max_filesize but the post_max_size. File 
uploads are effected by settings other than the upload_max_filesize. If 
you happen to exceed the maximum allowed size for POST the $_POST may 
disappear.

Cheers,
Tom

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Good and free encoder for PHP5

2004-12-15 Thread Raditha Dissanayake
Mário Gamito wrote:
Hi Manuel,
Yes, Turck works with PHP5.
My question is: if the last version was released a year ago, how much 
can i trust it ?

BTW, how good is Truck's algorithm and how hard it is to reverse 
engineer the code ?
Encoding generally does not protect you from reverse engineering. Laws do.
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Apache Upload file Permission denied

2004-12-12 Thread Raditha Dissanayake

Yes, this kind of script is working in my pervious old server. But
after I have upgraded the OS to Fedora 3 with PHP 5.0.2 and Apache 2.
 

Then as I mentioned in my previous mail SELinux is to blame. Uninstall 
it or disable it. (pass selinux=0 when you boot).

 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Apache Upload file Permission denied

2004-12-12 Thread Raditha Dissanayake
Michael Leung wrote:
Hi all,
  I have faced the upload file permission denied for weeks. I can't
write a new file/create a directory. I did a test in PHP standalone
(Linux shell).  The operation is very normal.
But in web environment, I got this error message:
 

Something that just occurred to me?
do you have SELinux installed?
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
move '/tmp/phpjsLZfC' to '/var/www/htm/test/icons.zip' in
/var/www/html/simple_upload.php on line 76.
I think this is a problem bewteen Apache and PHP. The safe mode of PHP
is off and test directory is changed to 777.
yours,
Michael
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP vs JSP?

2004-12-11 Thread Raditha Dissanayake
Peter Lauri wrote:
Best groupmember,
Why should I choose PHP instead of JSP/Servlets when it comes to develop a
high-traffic site. Assume that the infrastructure for both are set up. It
only comes to efficiency (both coding and running)? What are your
experience?
 

As a sun certified java programmer, let me assure you that PHP is easier 
to work with.

--
- Best Of Times
/Peter Lauri
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP vs JSP?

2004-12-11 Thread Raditha Dissanayake
Travis Conway wrote:
Did he really ask that question on a PHP board?
I have met factory managers (though not at the comanies you mention ) 
who have admitted that their competitors may have the edge :-)
But seriously whether PHP is better or JSP is better is a religious 
question. However on the point of ease of use PHP is a clear winner. 
There are other areas in which J2EE wins but let's not go into it here.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] recompiling php

2004-12-10 Thread Raditha Dissanayake
John Nichel wrote:
blackwater dev wrote:
Thanks John,
I tried the rpm and it throws errors that it can't find the php
package required by:
php-mysql
php-imap
php-idap
php-mbstring.
Thanks!

RPM and other binary informations suck. Remove them and install from 
source code.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] full http request

2004-12-10 Thread Raditha Dissanayake
Mirek Novak wrote:
Hello people,
is it possible to see full http request as it has arrived on server? I 
mean including all headers and etc.
There is an extension for firefox that gives you the headers that are 
sent by the browser. At the other end the $_SERVER variable contains 
this information as well.

thanx

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Removing a return character

2004-12-10 Thread Raditha Dissanayake
Shaun wrote:
Hi,
I have a system that scans through a CSV File and inserts each row into a 
database. I have just noticed that some rows have a return character in 
them - a small square - and this is causing errors in the mysql query.

Does anyone know how I can remove such chracters?
 

Options range from lowly trim() through str_replace() to regular 
expression. depends on your data.


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] File upload problems using Apache 1.3 on Debian stable

2004-12-10 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:
Hi,
   I have been having problems trying to get file uploads working with 
PHP in a Debian Linux enviroment. I have ensured that both the 
temporary directory PHP uploads use has the appropriate permissions 
set, as well as the folder I am attempting to copy the images into.

When I called phpinfo() from the page that the upload script is on it 
shows the contents of the _FILE array as containing the appropriate 
details, however when I try and access them from within my actual 
code, the variables appear to be unset, and no files appear in either 
the temporary folder or the folder I am trying to copy the file to.
that appears a bit strage indeed. COuld oyu share the relevent lines of 
code with us.

Anyone have any suggestions?
Tom Williams
Anyone

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MYSQL Query question

2004-12-09 Thread Raditha Dissanayake
Reinhart Viane wrote:
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manual site or a good mysql book?
 

That does not mean mysql questions should be posted on php mailing lists.

STRICTLY PERSONAL AND CONFIDENTIAL 
This message may contain confidential and proprietary material for the
sole use of the intended 
recipient.  Any review or distribution by others is strictly prohibited.
If you are not the intended 
recipient please contact the sender and delete all copies.
 

Do you know that mailing lists are automatically archived at thousands 
of websites?


 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MYSQL Query question

2004-12-09 Thread Raditha Dissanayake
John Nichel wrote:
Raditha Dissanayake wrote:
Reinhart Viane wrote:
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manual site or a good mysql book?
 

That does not mean mysql questions should be posted on php mailing 
lists.
snip
There you go again, trying to keep this list on topic. ;)
Alright I am going to change. as they say if you can't beat them join them.
obligatory off topic post:
Do you think it's better to use innodb type tables or myisam type tables 
when using mysql even without  foreign keys?

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] (Quanta) php editor or php IDE for linux with autocompletion

2004-12-08 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:
Jason Wong wrote:
 

I think I may have misunderstood what you mean by auto-completion. What
Quanta does is auto-complete words that you *already* have in the
document. 
   

Not really. With HTML / XHTML Quanta does auto complete words, tags,
properties, attributes which are in the DTD. Or am I wrong?
 

Ask in the quanta mailing list and someone will tell you.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Sessions problem

2004-12-08 Thread Raditha Dissanayake
Dre wrote:
Hi,
I need to make sessions work in my local machine .. I'm using Apache 2.0.49
on WINDOWS XP PRO.
my php.ini sessions section is
session.save_handler = files
session.save_path = C:\php4\tmp
 

A common problem is that this path is not writable by the webserver 
please check for that.

I tried everything and sessions still not working, and I don't know what is
worng .. help will be appreciated.
 

Any error messages? or is it just that your data is not being saved? 
have you tried to print_r() or var_dump() to confirm this?

Thanks in advance
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Close all open tags in HTML text

2004-12-08 Thread Raditha Dissanayake
Matt Palermo wrote:
I am allowing users to imput HTML code into a textarea.  After they input 
this, I wany to output their HTML to the browser.  In order for the document 
to be safe, I need to close all open HTML tags that have been left open by 
the user, along with any open comments.  Is there a way to take an HTML 
string and add closing tags and comments to it if needed?
 

Certainly not impossible but by no means an easy task. You would be 
doing the job of an html validator and it's probably better for you to 
use a third party library for that than to code it yourself.

Thanks,
Matt 

 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Random data loss.

2004-12-06 Thread Raditha Dissanayake
2wsxdr5 wrote:
With out posting any code I was wondering if anyone here has been 
experiencing this kind of problem.  I have a standard web from that 
PHP code then reads and saves the data into a MySQL DB.  The problem 
is some of my users have had data lost somewhere in this process.  The 
web site is www.thewishzone.com.  It is a wish list site and the data 
that seems to be getting lost is the price of an item a user adds to 
their wish list.  I can't seem to duplicate it here.  However one user 
did have it happen twice in a short time period.  They enter a valid 
price and after the record posts the price goes to zero.  Any ideas?
pretty hard to tell with this information. What you might want to do, is 
to call the error_log() function with the insert query that is being 
executed. That way you will have a record of each query that has been 
executed. (if you have a software that can analyse your mysql binary 
log, it could serve the same purpose). You could then look at these 
queries to see if there is anything suspicious.

You could also have a bit of code that tests the value of the price 
variable in each page and mail you all the env settings if price happens 
to be zero that way you would have a chance of reproducing the problem.

Chris W
Gift Giving Made Easy
Get the gifts you want  give the
gifts they want this holiday season
http://thewishzone.com

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mysql error

2004-12-05 Thread Raditha Dissanayake
Richard Kurth wrote:
Could somebody tell me way these query gets a error 1064 and does not
work.
 

no. wrong list.
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mysql error

2004-12-05 Thread Raditha Dissanayake
Travis Conway wrote:
Try:
SELECT * FROM listing WHERE listing.state = 'WA' AND listing.type = 
'RES' AND listing.county = 'clark' AND (listing.price  15 OR 
listing.price =20)
Once again you have posted to the wrong list. Please send this message 
to the mysql list. This is the php list.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Sessions in Frames...confused

2004-12-05 Thread Raditha Dissanayake
Ryan A wrote:
Hi,
Reading the different articles on phpbuilder/devshed/phpfreaks etc has left
me a bit confused..
will start from the beginning so you guys(and girls) can give me some advise
and show me the right path again ;-)
I have a normal user/pass login screen, after which I start a session for
the client and the client should be presented with the control panel for
his software.
The control panel is in frames and is split in 2 (sideFrame, mainFrame)
sideFrame  is for the navigation.
Do I have to start a session in index.php which is calling the sideFrame and
mainFrame or just in mainFrame or just in sideFrame or in all?? AGH!
going nuts!
 

As far as I know there is no harm in calling session_start() in all your 
Iframes and Frames. According to theory a new session will only be 
started if one has not been started already. However there have been 
several discussions on this list in the past where this behaviour was 
not observed, and you may want to look these up in the archives.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] while inside a function

2004-12-05 Thread Raditha Dissanayake
Louie Miranda wrote:
i have a while statement inside a function, but it seems like it dont
work. is this possible?
 

Add the following lines:
global $apo;
global $row;
This will make it work for you but it's not the best solution. It's 
better to pass in parameters to the function rather than to rely on globals.


function hello() {
while ($apo-fetchInto($row)) {
print hello 2;
}
}; /eof

 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] [ANN]Webyog releases FREE edition of SQLyog

2004-12-05 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:
On Mon, 2004-12-06 at 00:38, Ritesh Nadhani wrote:
   

Hello,
Webyog, the creator of SQLyog - the most popular GUI for MySQL has
released  SQLyog v4.0.
 

1. Your product isn't PHP related so bugger off.
2. The most popular GUI for MySQL?? WTF are you smoking?
   

Maybe you could have taken that offlist Rob ? I have tried the others, and
I can speak highly of thisapp. It has some features not even navicat has.
 

no. Rob is right. This OP send a junk email, a spam and something that 
is off topic. In case you don't know, sending off topic message is 
considered very rude.
Now let's all of us (my self included) shut up before this thread goes 
out of hand.


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] executeing another files code

2004-12-04 Thread Raditha Dissanayake
Ryan A wrote:
Hi again,
One last question as am a bit confused, using this method:
$s = str_replace(
array('$firstname', '$lastname', '$sitename', '$message'),
array($firstname, $lastname, $sitename, $message),$s);
do I *have to* pass 4 arguements?
 

you can set default values (eg an empty string) to cover that scenario. 
I can aslo offer you a third alternative to the very good suggestions 
already offereed by Marek and Sokolewicz; printf();

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Stupid question

2004-12-04 Thread Raditha Dissanayake
Phpu wrote:
Hi,
If i have a php and mysql website...how many connections support mysql at one time ?
 

Sorry people in this list do not know how to configure mysql
Thanks
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] SQL sums

2004-12-03 Thread Raditha Dissanayake
Marek Kilimajer wrote:
This is an SQL question.
Marek, don't you know that this the mysql list? you are supposed to 
answer questions like these. If you don't there will be self appointed 
list moderators who will jump on you like what happened to me last week. 
I was accused of being not helpfull.

James Nunnerley wrote:
I'm trying to create a table, and ultimately a graph, out of some syslog
data.
 

I have a mysql table with the following info in it:


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] SQL sums

2004-12-03 Thread Raditha Dissanayake
Marek Kilimajer wrote:
Jason Wong wrote:
On Saturday 04 December 2004 00:40, Marek Kilimajer wrote:
Raditha Dissanayake wrote:
Marek Kilimajer wrote:
This is an SQL question.

Marek, don't you know that this the mysql list? you are supposed to
answer questions like these. If you don't there will be self appointed
list moderators who will jump on you like what happened to me last 
week.
I was accused of being not helpfull.

Ok, I appologize :)))

I think Raditha had his tongue firmly in his cheek when he wrote that.
Does anyone know of a good remedy for cheek pain? (or is that an off 
topic question?)

So did I ;-)

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to Pass Parameters to a CGI

2004-12-03 Thread Raditha Dissanayake
Yao, Minghua wrote:
Hi, everyone,
I want to pass several parameters to a CGI program run on another server. The 
following source of that program shows the parameters that need to be set 
manually.
 

This is not really a PHP question, you can pass values in the query 
string eg http://yoursite.com/cgi-bin/what.pl?param1=value1param2=value2


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] picture upload

2004-12-02 Thread Raditha Dissanayake
William Stokes wrote:
Hello,
I'm building a web site for a sports team. I wan't them to be able to update
their own site so I need to build a file upload system for their pictures.
Pictures also need to resized to fit their spot in the web page. Any ideas
or quidelines how to do this. I've never done this kind of stuff before.
Thanks IA
 

William how to handle file uploads with PHP is described very well in 
the manual. Once you get past that stage just search google for php 
image upload.


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HTTP Authenticate via PHP

2004-11-30 Thread Raditha Dissanayake
Jeffery Fernandez wrote:
Hi,
I am trying to find out if its possible to authenticate a page against 
an HTTP authentication. Basically what I am trying to do is make 
available the stats page of the Cpanel to the admin interface of a 
site. When accessing the stats via the cpanel the user needs to login 
via http authentication.

Is it possible for me to store the username password credentials 
within the php page and pass that across via headers to authenticate 
the page for viewing the stats. The main purpose is to make the 
webstats transparent to the admin user so they don't have to enter any 
username/password. I tried putting the username:[EMAIL PROTECTED] into 
the url of an iframe page(session controlled) but stupid IE spits the 
authentication as a pop-up (login window). Hope I have explained well 
enough.

One option is to send an authorization header.  (exaple: Authorization: 
Basic   . credentials) more details are available in the RFC 2616 but 
the disadvantage is that you would not be able to make use of the 
fopen() method. My understanding however is that the url of the type 
that you described about should work. CPanel and other virtual hosting 
schemes have an '@' sign in the username that probably caused the 
hiccups you should try urlencoding the username and password.

cheers,
Jeffery

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Messengers libraries?

2004-11-30 Thread Raditha Dissanayake
Octavian Rasnita wrote:
Hi all,
Does anyone know if there are free php libraries for creating MSN or Yahoo
or Skype or AOL Messenger clients?
 

You might want to look at the php interface to jabber available at 
jabberstudio

Thanks.
Teddy
Teddy
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem with self join

2004-11-29 Thread Raditha Dissanayake
suneel wrote:
Hi...
   Please take a look at the following...
   I'm using MySQL 4.0.15
 

And what makes you think this is a mysql list?
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem with self join

2004-11-29 Thread Raditha Dissanayake
Robin Vickery wrote:
On Mon, 29 Nov 2004 14:12:23 +0530, suneel
[EMAIL PROTECTED] wrote:
 

Hi...
   Please take a look at the following...
   I'm using MySQL 4.0.15
   I have the database like this
   

This should really go to a MySQL list, but...
 

please keep the discussion on topic.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is this a bug in PHP 4.3.4?

2004-11-29 Thread Raditha Dissanayake
Octavian Rasnita wrote:
Hi all,
I use the  following program:
 


function print_quotes () {
output_reset_rewrite_vars();
echo EOF
table
...
/table
EOF;
}
I have tried this program under Fedora Core 2 in command line mode and on an
Apache web server with the same results.
Do you have suggestions for making this program work and why does this
happen?
 

I think the problem is with your 'here document' this is the traditional 
way of doing things in perl but in php you could  'go back into HTML. by 
using the '?' sequence. Thus your program might become

function print_quotes () {
output_reset_rewrite_vars();
?
table
...
/table
?
}
There are pros and cons of both approach but the bit of code i have 
given will produce the expected result.

 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is this a bug in PHP 4.3.4?

2004-11-29 Thread Raditha Dissanayake
Octavian Rasnita wrote:
Thank you. I will try that solution if it works, but the question still
remains...
Is PHP so buggy? The 'here document' should work without a problem in PHP
also.
 

It probably wasn't a bug in php 4.3.4 but as greg has pointed out you 
probably should upgrade anyway. Here documents are pretty hard to work 
with at the best of times and it's quite easy to make a teeny weeny hard 
to detect typo.,

My code works fine with PHP 5 (fortunately) under Windows, but it doesn't
work with PHP 4.3.4 under Linux.
I think I need to upgrade php under Linux also...
 

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Comment Speed

2004-11-28 Thread Raditha Dissanayake
Marek Kilimajer wrote:
Raditha Dissanayake wrote:
Bruno B B Magalhães wrote:
Does anyone has a solid benchmark about comments speed.. I mean, too 
many comments will decrease speed of the PHP scripts...

Surely there are more important things for you to worry about.

the meaning of life, for example
I wasn't thinking of such big worries and I was thinking more of PHP 
related worries :-))

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Comment Speed

2004-11-27 Thread Raditha Dissanayake
Bruno B B Magalhães wrote:
Does anyone has a solid benchmark about comments speed.. I mean, too 
many comments will decrease speed of the PHP scripts...

I've tried without success using a class, and also a simple micro-time 
operation... Well, cause the file is evaluated before it is executed, 
I didn't had success.

Any idea?
Surely there are more important things for you to worry about.
Regards,
Bruno B B Magalhaes

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem with recursion and FTP transfer

2004-11-26 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:
Hi all
I have create a script for FTP function.
When i have testing the script with little file and directory it's ok
The script read data in all folder with recursive function and the 
same path of data
like C:\backup\folder1\file.txt is the same on remolte folder 
/httpdcos/folder1/file.txt
The problem is that when i testing the script with MB of files
the recursion is much more speed of  transfer of a single file and a
file is copied to a path that is not the same of local folder.
How to fix the problem ?
Sorry for my bad language
Though i don't generally bother with long code samples i decided to make 
an excemption:
i believe calling @ftp_chdir($conn, $remote_folder) in your recursive 
function is wrong instead you should do a CDUP (call the corresponding 
function for that).

btw: get rid of the @ symbols and configure your php.ini so that all 
errors are written to the log file, you will then find it a lot easier 
to debug.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-25 Thread Raditha Dissanayake
John Nichel wrote:
Greg Donald wrote:
On Thu, 25 Nov 2004 09:33:41 +0600, Raditha Dissanayake
[EMAIL PROTECTED] wrote:
many people in this list believe that people who do not RTFM are lazy
and do not deserve help.

That's because people who expect free help without RTFM are lazy and
do not deserve help.  How else do you plan to learn the language
without RTFM?  The knowledge isn't going to just jump into your head.

Great, there goes my theory about sleeping with the PHP manual under 
my pillow.  ;)
I was thinking of doing the same but gave up because i couldn't figure 
out a way of clicking on the links in my printed version of the manual.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] NH05 to 5, NH07 to 7

2004-11-25 Thread Raditha Dissanayake
Wiberg wrote:
hi there!
i guess you know a simple solution to convert the string
NH01 into 1
NH02 into 2
..
...
NH13 into 13
and so on
 

yes
/Gustav Wiberg
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 2004-11-19
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem with PHP Curl support and Apache

2004-11-24 Thread Raditha Dissanayake
Luis Lebron wrote:
I have a server running RH 8, Apache 1.3.27, PHP 4.3.9. I tried to
recompile PHP with Curl support.
 

that's a very old version of red hat that is no longer supported you 
might want to upgrade at least to RH 9 if not to fedora

Everything seemed to compile correctly. However, when I restarted apache
I got the following error:
Cannot load /etc/httpd/modules/libssl.so into server:
/etc/httpd/modules/libssl.so: undefined symbol: dbm_firstkey
 

could be a problem with your openssl installation.
I tried googling but haven't found any relevant info yet.
Luis R. Lebron
Project Manager
Sigmatech, Inc
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] determining caller of function

2004-11-24 Thread Raditha Dissanayake
Thomas Peri wrote:
Is there a way, *other than using debug_backtrace(), which has a bug*, 
to determine from inside what class and method the current function 
was called?  For example:

you could try xdebug.


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-24 Thread Raditha Dissanayake
Johan van Zyl wrote:
Hi
Thx Helen for another non-hostile, and as usual, very informative response!
We newbie's are having a though time, well at least in THIS forum! At least
I am!
You (me) apparently have to RTFM or FOg
 

many people in this list believe that people who do not RTFM are lazy 
and do not deserve help.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Secure Password (MySQL) Storage

2004-11-24 Thread Raditha Dissanayake
Olaf van der Spek wrote:
Hi,
Is there a way to store MySQL (or other sensitive data) that will be 
passed to a library in such a way that scripts itself can't access this?
A per-vhost store would be ideal.

If not, would this be a good idea to implement?
Your question is not very clear but if you want to protect your data 
from prying eyes surely the best way would be to encrypt it? as for 
security on shared hosting enviorenments we have discussed that topic in 
the past a few times and the voices of authority strongly believe that 
it's not possible to completely prevent other users from taking a peek 
at your code.  But then again you could use the turck or zend encoder on it.


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] RE: [firebird-php] auto increment last insert

2004-11-24 Thread Raditha Dissanayake
Greg Donald wrote:
On Thu, 25 Nov 2004 09:33:41 +0600, Raditha Dissanayake
[EMAIL PROTECTED] wrote:
 

many people in this list believe that people who do not RTFM are lazy
and do not deserve help.
   

That's because people who expect free help without RTFM are lazy and
do not deserve help.  How else do you plan to learn the language
without RTFM?  The knowledge isn't going to just jump into your head.
 

hey greg, don't jump on me, i was trying to say the same thing you are 
saying perhaps i should have worded it better :-))


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] IE title bug

2004-11-22 Thread Raditha Dissanayake
Giles wrote:

Anyone seen anything like this before or have any suggestions?
 

I thought it was mysql that had taken over this list and not microsoft.

Thanks


Giles Roadnight
http://giles.roadnight.name

 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] perl to php translation tool?

2004-11-22 Thread Raditha Dissanayake
Markus Mayer wrote:
Hello everyone!
I've searched for a tool that would translate, or at least mostly translate, 
perl scripts into php, unfortunately with no success.  I didn't even find a 
reference in the archives of this list to this subject, which surprises me.  
Does anyone know of any tool that can handle this type of thing?
 

I am not suprised that you didn't find anything. This would be something 
exceedily complex to write such a convertor because you can solve the 
same problem in so many different ways using perl.

regards
Markus
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] yet another autoresponder

2004-11-22 Thread Raditha Dissanayake
Can someone remove this idiot? (this idiot = idiot who uses an 
autoresponder , not the idiot who is complaining about it :-))
Autoresponder wrote:

Hi,
To protect us from spamming, please contact with us at 
http://www.dvdidle.com/contact.htm, thanks.
Sincerely,
DVDIdle Support Team
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] perl to php translation tool?

2004-11-22 Thread Raditha Dissanayake
Greg Donald wrote:
On Mon, 22 Nov 2004 13:37:42 +0100, Markus Mayer [EMAIL PROTECTED] wrote:
 

I've searched for a tool that would translate, or at least mostly translate,
perl scripts into php, unfortunately with no success.  I didn't even find a
reference in the archives of this list to this subject, which surprises me.
Does anyone know of any tool that can handle this type of thing?
   

You may find this reference page useful:
http://www.cs.wcupa.edu/~rkline/perl2php/
 

you almost made a fool out of quite a few of us. thank god it's only a 
tutorial and not an automated tool :-)


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] help with html through php

2004-11-21 Thread Raditha Dissanayake
Todd Alexander wrote:
Hello all,
I am a complete newbie to php so apologies for what I'm sure is a
simple/dumb question.  I want to use php to include another html doc in
an existing set of documents.  In other words 123.html will use php to
call on abc.html so I can make changes to abc.html and have it update
on all my pages.   
 

You have struck upon a pretty standard technique you will need to look 
at the include() or require() functions to persue this further. There is 
a subtle difference between the two but when you are getting started the 
difference does not really matter all that much. On most webservers you 
will need to name your 123 file not as 123.html but as 123.php or 
123.phtml abc.html can continue to be abc.html

Again I realize this is a complete newbie question but I appreciate any
help you have.
Todd
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] images process

2004-11-21 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:

Sorry,

I need a sample of php program...
  

They are dime a dozen on google.
please trim your posts.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Upload is still not working ( More tesitngs)

2004-11-21 Thread Raditha Dissanayake
Michael Leung wrote:
My Error Msg:
 I can read /tmp/phphRiKeP
Warning: fopen(upload_files/doodah) [function.fopen]: failed to open
stream: Permission denied in /var/www/html/simple_upload.php on line
18
Warning: fopen(upload_files/Water lilies.jpg) [function.fopen]: failed
to open stream: Permission denied in /var/www/html/simple_upload.php
on line 22
upload_files is valid a directoryI am able to write to upload_files
This is very strange. upload_files is writeable, but can't write by
fopen('upload_files/doodah', 'w')
 

Nothing strange about that it may be writable by the owner but not by 
others. Besides that as jason as already pointed out you may be running 
in safe mode. Other than that, the file upload page on php.net has a 
wealth of information posted by others like you who had trouble with 
their uploads, you are sure to find a usefull comment there.

--
Raditha Dissanayake
http://www.radinks.com/upload/ - Drag and Drop File Upload
yours,
Michael Leung
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Warning: Unknown list entry type in request shutdown (0) in Unknown on line 0

2004-11-20 Thread Raditha Dissanayake
Manoj Kumar wrote:
Hi folks , 

What is the case of following warning ...
Warning: Unknown list entry type in request shutdown (0) in Unknown on
line 0   

 

unknown

-- Manoj Kr. Sheoran 
 www.daffodildb.com BLOCKED::http://www.daffodildb.com 


 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] images process

2004-11-20 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:

Dear You,

How to load images ( eg: gif, jpg) with base64 function from
Database on IE directly ?
  

as far as I know you cannot do this with IE directly.

Is there any samples to me for reference ?

Many thank for your help !

Ed.

  


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] images process

2004-11-20 Thread Raditha Dissanayake
[EMAIL PROTECTED] wrote:

So, how can we fix this kind of problem ?
  

is it a problem?

Raditha Dissanayake wrote:

  

[EMAIL PROTECTED] wrote:



Dear You,

How to load images ( eg: gif, jpg) with base64 function from
Database on IE directly ?


  

as far as I know you cannot do this with IE directly.



Is there any samples to me for reference ?

Many thank for your help !

Ed.



  

--
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] Re: $_FILES and move_uploaded_file showed no directories name???

2004-11-19 Thread Raditha Dissanayake
Scott Fletcher wrote:
Yep, that Java applet, Raditha's Rad Upload...  Just found the documentation
there that the file path worked before PHP 4.3.6 but not with 4.3.6 and up.
I don't know what the PHP developer did with the $_FILE codes before
releasing PHP 4.3.6
 

Older versions of PHP used to give the full pathname but recent versions 
do not. Rad UPload works around this by encoding the pathnames, which 
tricks the engine into thinking the path information is not there at all.


Scott
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 

Jason Wong wrote:
   

On Friday 19 November 2004 03:28, Scott Fletcher wrote:
 

Well, I had successfully uploaded the files/folders.  PHP just stripped
   

out
 

the folders for no reasons.  A file can be a folder too.
   

Could you explain how you did that (upload a folder)?
 

I guess using Raditha's Rad Upload.
   

 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PhP e COBOL

2004-11-19 Thread Raditha Dissanayake
Andre wrote:
Hello 

I need some help in this subject php + COBOL.
I need to load data of a program in COBOL for a site written in php. 
The data must be loaded for a DB in mysql. 
Any one knows as I make this.
Thank for the help
 

Not sure if you will find a lot of cobol programmers in this list. 
Perhaps we could tackle it differently - ie could it be that all we need 
to know is the format of the data and not how it is generated?

André Caridade
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: unable to upload a directory using the web brower (HTTP).

2004-11-16 Thread raditha dissanayake
Scott Fletcher wrote:
Um, can't be done.  So, I'll have to use JAVA instead.  Have anyone ever
done this, does anyone know of a good freeware JAVA applet that I can use?
 

Shameless Plug: Rad Upload (http://www.radinks.com/upload) does upload 
folders over HTTP unfortunatley it's not free (but still cheap).


Thanks,
Scott
Scott Fletcher [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 

I found that on most web browsers, I can not upload the folder via HTTP
using hte web browser upload dialog box.  So, I can't use the php's
function, is_uploaded_file and move_uploaded_file.  Because the web
   

browser
 

see the folder as something to open with, like going down one directory.
So, any advice or suggestion??
Thanks,
Scott
   

 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Authentication Class

2004-11-16 Thread raditha dissanayake
Bruno B B Magalhães wrote:
Hi guys,
well, I wrote a class for a big project (a framework), and here it 
is,  I was wondering if someone have any suggestions regarding 
flexibility  and security.
Wow it's the most artistic piece of php i have ever seen.
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is Perl faster than PHP?

2004-11-16 Thread raditha dissanayake
Merlin wrote:
Hi there,
it came to my attention that most of the high traffic portals are 
using perl in the backend. Those sites do also apear to me to be very 
fast in comparison to most php sites. Are there any known performance 
comperissons between the two available? Or can one say that PHP or 
Perl is faster about x percent in general compared to the other one?
PHP is faster when running uphill and perl is faster when running 
download. On Sri Lankan roads they are both equally slow.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Can't get results from MySQL via PHP

2004-11-15 Thread raditha dissanayake
Alp wrote:
Hi there,
I've been fighting with PHP/MySQL to get proper results but without success.
For example:
 $sql = SELECT * FROM prod WHERE shortname='Myprog;
 $result = mysql_query($sql);  returns Resource #7
 $list = mysql_fetch_row($result);   returns Array
and actually the data in the table is a four digit number! The query returns
what is expected in MySQL but refuses to do so under php. What is it (or
could be) that I am doing wrong/missing?
 

PHP is behaving exactly as it should. The fact that your table has one 
column only is of no relevence you still have to retrieve the first 
element of the array that is returned  mysql_fetch_row($result);

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Column Totals

2004-11-15 Thread raditha dissanayake
Ben Miller wrote:
I am trying to get the total sales revenue for each day of the month, and
having no luck at all.
 

snipped/
In case it helps, sample table data might look like this:
OrderNoOrderDateRevenue
   1  79.95
1112   1  39.95
1113   3  89.95
 

I would guess that you have a char type for your Revenue Column which 
would lead to this situation. If you are unsure about which data type to 
use you will have to ask in a mysql mailing list. 
you might also want to echo out your query and run it directly in the 
mysql client to see what happens. Liberal user of 
error_log(mysql_error()) in your code would probably help too.


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Hacking attempt

2004-11-14 Thread raditha dissanayake
and what exactly is a hacking attempt?
The Doctor wrote:
One of our customers how has
Hacking attempt on their index.php instead of their regualr page.
What caused this and how do we get the regualr page back?
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHPINIPATH/PHPINIDIR/PHPININAME?

2004-11-14 Thread raditha dissanayake
David Garamond wrote:
Um, am I missing something here? ITTRFMTR (is that the right fine 
manual to read?)

I originally asked why the php cli binary cannot be told to look for 
php.ini in a custom location specified via an environment variable (it 
only accepts the -c command line argument). All other interpreters I 
know can. So if there _is_ an env var to do that, what is it? I didn't 
see it and certainly strace doesn't show my /usr/bin/php doing any 
getenv() during startup.

Regards,
dave
perhaps people had trouble reading your post properly because of all the 
CAPS.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Array from database table

2004-11-14 Thread raditha dissanayake
Richard wrote:
How do I get the data from a mysql database into and array that looks
like this
Array ( [0] = 1 [1] = 2 [2] = 3 [3] = 4 [4] = 5 [5] = 6 ) 
 

by using mysql_fetch_row() or mysql_fetch_array()
The table has three fields but I only need the data from one field.
$query=SELECT amenityID FROM property_amenity where listingId =
'$listingId';
 


--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] newbie: string to char array

2004-11-10 Thread raditha dissanayake
Ford, Mike wrote:
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm
 

are you in a position to  impose any terms (not that i have visited your 
link) on an email that get's distributed to thousands of readers, get's 
archived on hundreds of sites and possibly ends up in the inbox of bots 
designed to harvest email addresses?

 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Accelerator

2004-11-09 Thread raditha dissanayake
Klaus Reimer wrote:
Adrian Madrid wrote:
I've been running Turck for some time now on PHP5 and haven't had
segfault problems yet. I must say I'm running the latest CVS and using
file sessions (Turck's would give you segfaults). 

I also tried latest CVS and I don't use Turcks cache. Maybe Turck has 
problems with Objects in PHP5 (because there were the great changes) 
while normal Non-OO-Scripts are running flawlessly.
I am also running turck with php5 without too many problems and that's 
why i recommended it to the OP. However none of the scripts that run on 
it make use of any of the new features of php5.


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] upload via FTP

2004-11-09 Thread raditha dissanayake
Alessandro Rosa wrote:
Your question is not very clear. Do you mean to say you only want your 
FTP server to be accessible by your php scripts? If so the trick is to 
listen only on localhost and not on the public ip.

   

No, only some of the scripts shall be
accessible by other scripts in the FTP server.
 

That's even more confusing. You run php scripts off a web server and not 
an FTP server.

Alessandro Rosa
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] upload via FTP

2004-11-09 Thread raditha dissanayake
Alessandro Rosa wrote:
That's even more confusing. You run php scripts off a
web server and not an FTP server.
   

Ok ... the server I'm dealing with works for both services.
But let me re-explain the question in new terms.
I have a bunch of php scripts on a web server.
I just wanted to know if it is possible to deny access
permissions for some of such scripts to a public user
but not to other scripts staying on the same server.
 

I see. In that case though this is not a php problem. This is a problem 
about setting the right permissions on your file system - for which you 
will need to refer to the documentation for chown and chmod. Your FTP 
server may also have what is known as a 'chroot'  mode where users will 
be prevented from browsing outside their home folder.

Having said all that we had a big discussion about a month ago on 
protecting scripts on a shared server and the generall consensus was 
that there is always a loop hole.

Alessandro Rosa
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] using mysql in php problem

2004-11-09 Thread raditha dissanayake
Garth Hapgood - Strickland wrote:
I have created a registration page
http://www26a.your-server.co.za/matchm/registration4.php
On this page I have many fields, some of them pulling data out from my
database. I have a javascript validation scipt thats checks on submission of
the form to see if all required fields are filled in correctly.
IF thats the case it should submit the form. Which it isnt doing! It should
start with submission after the validation check is passed.
 

This part of the questions should be posted on a js list.
Then I check to see whether the BusinessName  BusinessOwner already exist,
if not then I am trying to to an insert (which it doesnt do either). Here is
the php code:
$errmsg = ;
$business_query = SELECT BusinessName, BusinessOwner from business WHERE
BusinessName = '$BusinessName' AND BusinessOwner = '$BusinessOwner' ;
$result = mysql_query($business_query);
if (mysql_num_rows($result)  0) {$errmsg .= You are already registered at
Match Makers;}
 

You will do yourself a great service by punctuating indenting your code 
properly. If you read the code of some open source php scripts you will 
find that they are so much easier to read.

else {
if (isset($submit) == Register Now){mysql_query(INSERT INTO business
(BusinessName, BusinessOwner, StreetAdress, Suburb, CityTown, ProvinceID,
StreetCode, PostalAddress, PostalCode, WebsiteAddress, IndustryID,
IndustryOther, ProductService, BusinessAge, AnnualTurnoverID,
EmpowermentProfileID, BEEScoreCardID, PreferredLocationID,
PreferredProductService, PreferredMatchPartner, PreferredIndustryID,
PreferredIndustryOther, PreferredAgeID, PreferredTurnoverID,
PreferredEmpowermentProfileID, DateRegistered, MarketSourceID)
VALUES
(' . $HTTP_POST_VARS['business_name'] . ', ' .
$HTTP_POST_VARS['street_address'] . ', ' . $HTTP_POST_VARS['suburb'] . ',
$city_town, $province_desc, $street_code, $postal_address, $postal_code,
$website_address, $industry_desc, $industry_other, $product_service,
$business_age, '', '', '', '', '', '', '', '', '', '',));
 

See what i mean :-)
$id = mysql_insert_id();
 

..snipped ..
I am not sure where exactly I am going so wrong, and it really is starting
to drive me crazy!
 

The best thing to do is to liberally douse your code with 
error_log(mysql_error()) statement you will then start seeing error 
messages in your log (or your browser depending on your config) about 
what's going wrong.

As has often been pointed out echoing out the queries produced by your 
php script and running them through the mysql client usually helps too.

Regards
Garth
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] undefined index: $_FILES || $HTTP_POST_FILES

2004-11-08 Thread raditha dissanayake
Tobias Neumann wrote:
Hello!
I have the same script on two webservers with php 4.3.9 and apache 2, both
with the same php configurations. On one server I can not access
$_FILES or $HTTP_POST_FILES, although a form with a file has been
correctly submitted.
 

Quick question: is file uploads enabled on this server and is the 
temporary directory writable?

apache_request_headers() contains:
[Content-Type] = multipart/form-data;
boundary=---207315575716727585901748724465
[Content-Length] = 5779
So php should have received the form data. I can access $_GET and $_POST
without any problem.
$_FILES and $HTTP_POST_FILES do simply not exist, and when I try
to access them I just get an undefined index error, or with print_r() an
empty array.
Regards,
 Tobias Neumann
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Sub selects vs nested loop was:Re: [PHP] You know you're a geek when...

2004-11-08 Thread raditha dissanayake
Greg Donald wrote:
On Mon, 08 Nov 2004 10:40:30 +0600, raditha dissanayake
[EMAIL PROTECTED] wrote:
 

You know you're a geek when you know which list deals with which top
and when you know that subselects in mysql is not much faster than the
nested loop you have been using.
   

Can you point me to some benchmarks that support this claim?  Thanks.
 

Sorry no benchmarks, i am talking from personal experience where I 
converted some code from a php nested loop to mysql. I was rather 
surprised by the results. I will concede that I may not have optimized 
the query properly or that I may not have had the correct indexes, but 
since I have been doing this for quite a few years i like to think i got 
the query right. (feel free to deflate my ego :-) )

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] upload via FTP

2004-11-08 Thread raditha dissanayake
Alessandro Rosa wrote:
Dear all subscribers,
I'm coding a send-mail form, also including
edit boxes keeping the path of files to be uploaded
from the remote host onto an FTP server.
Is there the possibility (and if so, which ones) to
manage FTP permissions to have a file including
the variable with ID and PSW (for FTP access)
and which is usable
by the code running on the server exclusively but
cannot be accessed by any other user?
Alessandro
 

Your question is not very clear. Do you mean to say you only want your 
FTP server to be accessible by your php scripts? If so the trick is to 
listen only on localhost and not on the public ip.


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] You know you're a geek when...

2004-11-07 Thread raditha dissanayake
Murray @ PlanetThoughtful wrote:
.You upgrade MySQL from 4.0.x to 4.1.x and you get excited because now you
can include subselects in your pages.
 

You know you're a geek when you know which list deals with which top  
and when you know that subselects in mysql is not much faster than the 
nested loop you have been using.

Much warmth,
Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
One quirky comment at a time.
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] You know you're a geek when...

2004-11-07 Thread raditha dissanayake
Ryan King wrote:
On Sunday, November 07, 2004, at 10:38PM, raditha dissanayake [EMAIL 
PROTECTED] wrote:
 

Murray @ PlanetThoughtful wrote:
   

.You upgrade MySQL from 4.0.x to 4.1.x and you get excited because now you
can include subselects in your pages.
 

You know you're a geek when you know which list deals with which top  
and when you know that subselects in mysql is not much faster than the 
nested loop you have been using.
   

You know you're a geek when you know there's more to software development than speed.
 

and compatibility.
-ryan
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] best way to store images

2004-11-06 Thread raditha dissanayake
[EMAIL PROTECTED] wrote:
I'm trying to plan out the best way to develop an image hosting script for
my client.

 

You will find the answer in last week's archive.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Accelerator

2004-11-06 Thread raditha dissanayake
David wrote:
I need a PHP accelerator but am not sure which one to use. I would 
highly prefer to not use a commercial accelerator and need one that 
works with PHP 5. Does anyone recommend one out of the ones that exist?

this one:
- Turck MMCache for PHP
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Search a word in multiple tables

2004-11-05 Thread raditha dissanayake
Phpu wrote:
Hi,
How can i search a specific word in 2 tables
I use this but it is not working
sql = SELECT a.product_id, a..select_language('product_name_en', 'product_name_fr')., b.brand_name FROM products_accessories as a, brands as b 
WHERE (a..select_language('product_name_en', 'product_name_fr'). LIKE '%.$word.%'  OR b.brand_name LIKE '%.$word.%');
$result= mysql_query($sql);

Thanks
 

does this become a PHP question just because of
$result= mysql_query($sql); ??

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How to display a 'please wait' message whilst processing?

2004-11-04 Thread raditha dissanayake
Graham Cossey wrote:
On a number of sites a message and/or graphic is displayed asking you to
wait or be patient whilst some processing is being performed to compose the
next page.
 

Usually you need to do this when the data is collected from a POST 
and/or you don't want the user to reload the page. The best solution 
(IMHO) is to use meta refresh.


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mysql_connect

2004-11-03 Thread raditha dissanayake
Ben Miller wrote:
Guess that would have been helpful.
Warning: mysql_connect(): Access denied for user:
'[EMAIL PROTECTED]' (Using password: YES) in
/home/virtual/site2/fst/var/www/html/test/global.php on line 74
Couldn't connect to server.
 

That does not mean that the $host is being replaced by localhost as 
indicated in your first message. Your grant statement should have been 
for '[EMAIL PROTECTED]' not just for 'username' as it probably 
was.  If you need more help beyond that you will need to ask in the 
mysql mailing list.


I am having trouble connecting to a database on another server.  I have
   

the
 

following for the connection, but it seems to be overriding the value for
the $host variable, and replacing it with localhost.  Anyone got any
   

ideas?
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] postgres-embedded images via php. two issues...

2004-11-02 Thread raditha dissanayake
P. George wrote:
i am storing images in a postgres database and i have set up a little 
php file to retrieve them in such a way that i can do:
This topic came up a few days ago and the pros and cons of saving images 
in a data base was argued with very few pros been given. However the 
defining moment is when some one mailed a link to a zend article where a 
benchmark had been done comparing the two methods. Embedding in a 
database came up second.

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] image files - upload and managment

2004-10-30 Thread raditha dissanayake
Robby Russell wrote:
On Sat, 2004-10-30 at 02:43 -0700, Jaskirat Singh wrote:
 

Hi People,
I am writing a web app on LAMP.
The app is sort of yellow pages where people can login and post
advertisments with pictures.
App needs to allow users to upload pictures. (jpg and gif),
needs to create thumbnails of those pictures
and to store thumbnails and full pictures.
App needs to manage all those files - can be as much as 20K plus
images.
I think image file size, file type and image dimensions restrictions
should be easy to handle by using $_FILES array and  getimagesize
function.
The issues that I am thinking of and need suggestions about are
1) Storage and retrieval -  File system sounds like a better choice
over database. We are talking about 20 thousand plus pictures.
   

I would do it in the database (PostgreSQL in my case). The speed isn't
going to be much slower if you keep things optimized. You can even cache
your images if necessary on the filesystem (for high traffic images).
 

Robby's post is full of usefull information however though I am a 
postgresql fan i beg to differ on this point. Speed is definitely going 
to be slower when you insert and retrieve from blob (bytea) fields in 
any database. That's probly why you  you think caching is needed for 
high traffic images  :-)

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] bless function: a better aproach

2004-10-28 Thread raditha dissanayake
Curt Zirzow wrote:
* Thus wrote Francisco M. Marzoa Alonso:
 

Giving it a round, this seems to be a better aproach than the previous 
one. It has the advantage of provide direct access to the original array 
obtained from casting without boring about ___FAKE_KEYS_.

?
...
$Obj = new TestClass ();
//$Clone = (array) $Obj;
$Clone = obj2array ( $Obj );
   

I still dont see why a simple:
 $obj = new TestClass();
 $data = serialize($obj);
 $Clone = unserialize($data);
Cant doesn't work for you.
 

ah so that what the OP is trying to do!

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] file upload

2004-10-27 Thread raditha dissanayake
Akshay wrote:
I've been trying to come up with an algorithm that will allow me to 
upload  all the files in a folder.

The scheme I have in mind is to use a feedback form that will let me 
pick  out a target folder on my local machine. Upon submitting the 
form, I'd  like the script to upload all the files in that folder into 
a  predetermined folder on the host machine. Its easy with a single 
file, but  I've run into a conundrum of sorts for a complete folder. 
Is there any way  to pass the source path as a parameter in PHP, and 
have PHP upload all the  files in that path?
The answer is no you cannot because. PHP does not have access to the 
remote machine, because PHP runs on the server. The only way to do this 
is with an activex or with a java applet (SHAMLESS PLUG: such as rad 
upload).


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] uploading large files

2004-10-26 Thread raditha dissanayake
Double Shameless Plus follows:
marc serra wrote:
Hi,
I'm designing a web site and i need to let users upload large files 
like 10M or more.
You need to tweak your php installation to be able to handle such large 
files http://www.radinks.com/upload/config.php will help you do that.

I got some solution that are using common file transfert in PHP or 
using FTP transfert in PHP.
The problem is that if someone upload a big file he will not have any 
indication about the upload status. Is there an easy way to give them 
a status indication like file size/percentage uploaded or showing them 
a graphical bar.

Can u indicate me if there is any classes or scripts that can help me...
http://www.raditha.com/megaupload/

Thanks,
Marc

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] best php script that counts current online users, question.

2004-10-26 Thread raditha dissanayake
Louie Miranda wrote:
Hi,
i got tired testing free php scripts that does count current online
users and i could not find the best one yet.
 

what is the yard stick
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Configuration with upload maximum issue...

2004-10-26 Thread raditha dissanayake
Joey wrote:
Hi everyone,
I changed the setting in my php.ini to allow an upload file size bigger then
the defaul 2MB chaning the setting shown below:
; Maximum allowed size for uploaded files.
;upload_max_filesize = 2M
upload_max_filesize = 5M
 

http://www.radinks.com/upload/config.php shows all the settings that you 
have to change.

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] transfer file

2004-10-25 Thread raditha dissanayake
Akshay wrote:
How to transfer text file from one
machine to another using php
Please give the code if possible
It depends on what protocol you want to use. Please pick from FTP, HTTP, 
NFS etc and let us know.

akshay

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Substr

2004-10-25 Thread raditha dissanayake
Shaun wrote:
However, to get the Project ID I need to extract everything after 'pid_' and 
everything before 'date_'. Can someone help me with this please as PHP 
doesn't seem to provide a function for extracting information from a string 
that occurs before the 'needle'?

yes it doe. look under regular expressions.

 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] A problem about urlencode

2004-10-25 Thread raditha dissanayake
Teng Wang wrote:
I have a url containing some multi-byte characters. So I
need urlencode() to change these characters into the %xx
form. However, when I encode the whole url string, / is
also be encoded as %2F. How to solve this problem? I don't
want to analyze the url string before/after urlencode().
 

According to my understanding this is the correct behaviour for url 
encode. The fact that your string is multibyte or not has little 
relevence in convertin '/' to %2f. You are unly supposed to use the 
urlencode() function on the query string or to be more precise on each 
value that you pass via the query string and NOT on the whole URL.


 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] File system management

2004-10-24 Thread raditha dissanayake
Jose wrote:
Hi,
Some of the filesystem function can't be executed in a linux httpd server.
I tried,
mkdir();
chmod();
fwrite(); and some other filesystem functions. Those worked in widows enviornment but in linux i got a message Permission denied
My PHP version is 4.2.3 in linux.
What are the configurations should i make to creating directories and file uploading and to execute those filesystem functions in linux?
 

As the error message says it's all to do with permissions.  `man chmod` 
might be usefull reading.


Yahoo! India Matrimony: Find your life partneronline.
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


  1   2   3   4   5   6   7   8   >