Re: [PHP] 404 ErrorDocument in safe mode

2005-10-14 Thread darren kirby
quoth the Petr Kodytek: Hallo, I've problem with 404 ErrorDocument in safe mode on version 5.1.0RC1. I'm using error script to redirect nonexisting URLs to pages with content from database (something like mod_rewrite). After when my webhosting provider upgrades to 5.1.0RC1 my pages returns

[PHP] How to know?

2005-10-14 Thread gustav
Hi there! I have a string like this... (envorinment string)

Re: [PHP] Login is not working. Please help....

2005-10-14 Thread Jochem Maas
try some code indentation to make it more readable. someone else pointed you to the 'user' 'name' mismatch already I see. twistednetadmin wrote: ... session_start(); switch (@$_GET['action']) // Gets set by the form action { case login: $sql = SELECT name FROM DB WHERE name='$_POST[user]';

[PHP] test

2005-10-14 Thread Alan Lord
please ignore. Sorry for the noise. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] test

2005-10-14 Thread Alan Lord
please ignore -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-14 Thread Marcus Bointon
On 14 Oct 2005, at 04:48, David Robley wrote: That is incorrect. mysql_real_escape_string is a php function, not mysql. Mostly true: mysql_real_escape_string is a php function, but it's provided by the mysql extension as part of the mysql client libraries (which explains the name). It

Re: [PHP] 404 ErrorDocument in safe mode

2005-10-14 Thread Petr Kodytek
darren kirby wrote: quoth the Petr Kodytek: Hallo, I've problem with 404 ErrorDocument in safe mode on version 5.1.0RC1. I'm using error script to redirect nonexisting URLs to pages with content from database (something like mod_rewrite). After when my webhosting provider upgrades to

[PHP] Problem with special chars.

2005-10-14 Thread Erfan Shirazi
Hi all I have some problems when I make a string containing the following Malmö, Asunción to capital letters and then save it to a file. I use the following to make it to capital letters: $msg = mb_strtoupper($msg, HTML-ENTITIES); And this works just fine, everything looks as it should, but

Re: [PHP] Problem with special chars.

2005-10-14 Thread Jochem Maas
Erfan Shirazi wrote: Hi all I have some problems when I make a string containing the following Malmö, Asunción to capital letters and then save it to a file. I use the following to make it to capital letters: $msg = mb_strtoupper($msg, HTML-ENTITIES); ^- you

Re: [PHP] Problem with special chars.

2005-10-14 Thread Erfan Shirazi
The problem is if I don't specify and encoding even an echo() on the string shows strange chars when I have made a mb_strtoupper() on the string. With HTML-ENTITIES at least it looked ok when you made an echo() but when saved in file it looks bad. Does anybody now what I can do in order to

Re: [PHP] Problem with special chars.

2005-10-14 Thread Jochem Maas
Erfan Shirazi wrote: The problem is if I don't specify and encoding even an echo() on the specify a different encoding if you don't want html entities. string shows strange chars when I have made a mb_strtoupper() on the string. With HTML-ENTITIES at least it looked ok when you made an

[PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Ruben Rubio Rey
Hi, I m creating a cache system, and i have a problem: PHP takes a lot of time opening the file. (Im using 2.6.9-1.667smp and XFS) * For files less or equal 6 Kb, takes arround 0.02-0.03 miliseconds - its ok * For files arround 35 Kb takes arround 0.2-0.4 miliseconds - too much. What can I

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Richard Davey
Hi Ruben, Friday, October 14, 2005, 12:29:09 PM, you wrote: What can I do to make faster opening files? ** Source code: if(file_exists($filename)){ $modified_date=filemtime($filename);

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Jochem Maas
Ruben Rubio Rey wrote: Hi, I m creating a cache system, and i have a problem: PHP takes a lot of time opening the file. (Im using 2.6.9-1.667smp and XFS) * For files less or equal 6 Kb, takes arround 0.02-0.03 miliseconds - its ok * For files arround 35 Kb takes arround 0.2-0.4

Re: [PHP] Problem with special chars.

2005-10-14 Thread Erfan Shirazi
I have tried every encoding which could be found in: http://www.php.net/manual/en/ref.mbstring.php But nothing seems to work, I don't have any problems displaying the funny chars in the browsers, there are some encodings which works fine for that, the problem is when I save it to a file using

Re: [PHP] test

2005-10-14 Thread Dan McCullough
did it work ;) On 10/14/05, Alan Lord [EMAIL PROTECTED] wrote: please ignore -- 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] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Marcus Bointon
On 14 Oct 2005, at 12:29, Ruben Rubio Rey wrote: * For files less or equal 6 Kb, takes arround 0.02-0.03 miliseconds - its ok * For files arround 35 Kb takes arround 0.2-0.4 miliseconds - too much. Bearing in mind that average access time on a 7200rpm HD is around 8ms, those numbers

Re: [PHP] Setting up Linux and SendMail for SMTP

2005-10-14 Thread Brent Baisley
Just about any mail server will accept mail from anywhere for local delivery. But if you are not sending email to a user account local to that mail server, the mail server is going to want you to authenticate. Without authentication, the mail server would be an open relay (no security),

Re: [PHP] Trouble moving directory

2005-10-14 Thread Brent Baisley
In your example, the problem is that the name has spaces, which the shell uses as a delimiter. So That Won't Move/ is kind of being considered parameters instead of part of the dir. Using the command line (i.e. shell/terminal) will give you more feedback as to what is happening

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-14 Thread John Nichel
David Robley wrote: Ben wrote: snip My understanding is that mysql_real_escape_string will only work while you are connected to mysql. Not sure if that is the case in your situation. That is incorrect. mysql_real_escape_string is a php function, not mysql. Actually, it's both. And yes,

[PHP] Question about including files and server load

2005-10-14 Thread Jay Paulson
I just started working with a new company and they handed me some of their php code for me to look over. I noticed that they have a TON of include files being called into their scripts. For example, instead of having one file called functions.php and then having all their functions in that one

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-14 Thread John Nichel
Marcus Bointon wrote: On 14 Oct 2005, at 04:48, David Robley wrote: That is incorrect. mysql_real_escape_string is a php function, not mysql. Mostly true: mysql_real_escape_string is a php function, but it's provided by the mysql extension as part of the mysql client libraries (which

Re: [PHP] Trouble moving directory

2005-10-14 Thread Miles Thompson
One of the nice things MSFT did was to allow spaces in directory and file names. It created more work for programmers. One of the LOUSIEST things MSFT did was allowing spaces in directory and file names, because of the needless, tedious parsing and checking it requires. So much simpler to

Re: [PHP] Question about including files and server load

2005-10-14 Thread Richard Davey
Hi Jay, Friday, October 14, 2005, 2:21:57 PM, you wrote: I was wondering isn't this putting a bigger load on a server by including so many files for each function? Also, I was wondering what everyone's opinion was on this approach in terms of maintenance. Do you think it's better practice to

Re: [PHP] test

2005-10-14 Thread Alan Lord
Amazingly Yes! Dan McCullough wrote: did it work ;) On 10/14/05, Alan Lord [EMAIL PROTECTED] wrote: please ignore -- 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,

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-14 Thread David Robley
John Nichel wrote: David Robley wrote: Ben wrote: snip My understanding is that mysql_real_escape_string will only work while you are connected to mysql. Not sure if that is the case in your situation. That is incorrect. mysql_real_escape_string is a php function, not mysql. Actually,

Re: [PHP] Question about including files and server load

2005-10-14 Thread Edward Vermillion
Richard Davey wrote: Hi Jay, Friday, October 14, 2005, 2:21:57 PM, you wrote: I was wondering isn't this putting a bigger load on a server by including so many files for each function? Also, I was wondering what everyone's opinion was on this approach in terms of maintenance. Do you think

Re: [PHP] Trouble moving directory

2005-10-14 Thread Brent Baisley
MSFT allowed spaces? They were behind in allowing spaces (and long file names) Apple allowed them far before MS, and Unix allowed spaces far before Apple. Unix just assumes a space is a command/parameter delimiter first and part of the name second. Just like multiplication takes precedence

Re: [PHP] Setting up Linux and SendMail for SMTP

2005-10-14 Thread ac
On 10/14/05, Todd Cary [EMAIL PROTECTED] wrote: Can I configure SendMail to send mail to my ISP's SMTP server using the built in mail() function of PHP? i think you can, may be you would like to read the manual of your sendmail program, about how to configure it as a smart host. and if

[PHP] Re: Question about including files and server load

2005-10-14 Thread Oliver Grätz
Jay Paulson schrieb: function xyz($abc) { return include(xyz_func.php); } function abc($xyz) { return include(abc_func.php); } Oh. My. God. Is this ugly. OK, it works, but that's not the way how one should abuse include(). I was wondering isn't this putting a bigger load on a server by

[PHP] Re: test

2005-10-14 Thread Oliver Grätz
Ignored. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Trouble moving directory

2005-10-14 Thread ac
escapeshellarg() works quite well, why you say its still failed? did u try? do a ?php echo escapeshellarg('Dir That (Won't Move)/'); ? will produce 'Dir That (Won'\''t Move)' and this does fit into shell, even `(' and `)' is not escaped, for in bash, all thing quoted in single quote will be

[PHP] Re: include file to global scope

2005-10-14 Thread Oliver Grätz
Claudio schrieb: I'm using PHP 5. I have a class operation that includes php files. Is there a way to include this files to global scope? So that difined vars and functions are global accesseble? I know this problem from my early PHP days. If your problem is that you want to include some

[PHP] Re: OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread ac
where did these time measured? on a heavily loaded server or on your own almost idle desktop machine ? On 10/14/05, Ruben Rubio Rey [EMAIL PROTECTED] wrote: Hi, I m creating a cache system, and i have a problem: PHP takes a lot of time opening the file. (Im using 2.6.9-1.667smp and XFS) *

[PHP] Re: Question about including files and server load

2005-10-14 Thread Dan Baker
Jay Paulson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I just started working with a new company and they handed me some of their php code for me to look over. I noticed that they have a TON of include files being called into their scripts. For example, instead of having one

Re: [PHP] Help with logic :(

2005-10-14 Thread aaronjw
Hi all, Just wondering how one would do multiple rows? Instead of me me copying and pasting the same row of code 15 times (multiple data entry form), I just loop until it counts 15? Loops are not a strong point for me at all :( Thanks in advance!!! Aaron -- PHP General Mailing List

Re: [PHP] Help with logic :(

2005-10-14 Thread aaronjw
NEVERMIND. Solved it. Thanks!!! A Hi all, Just wondering how one would do multiple rows? Instead of me me copying and pasting the same row of code 15 times (multiple data entry form), I just loop until it counts 15? Loops are not a strong point for me at all :( Thanks in advance!!!

[PHP] automatic login..

2005-10-14 Thread ganu
hi, I created one site , and i implemented the concept of mypage same like as google or yahoo or excite.com, now my problem is i just want to put a line{href} in my mypge as set as home page so when the user will click on that , so it will set this page as default page.. And next time

Re: [PHP] Help with logic :(

2005-10-14 Thread Dan McCullough
Not a problem, good to see. On 10/14/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: NEVERMIND. Solved it. Thanks!!! A Hi all, Just wondering how one would do multiple rows? Instead of me me copying and pasting the same row of code 15 times (multiple data entry form), I just

Re: [PHP] Re: Question about including files and server load

2005-10-14 Thread Greg Donald
On 10/14/05, Dan Baker [EMAIL PROTECTED] wrote: The concept is that only the code that actually gets executed is ever loaded/compiled. Pretty sneaky! I think that's the general idea behind PHP's autoload(): http://php.net/autoload Using a caching tool like APC or Zend Optimizer would be

Re: [PHP] automatic login..

2005-10-14 Thread Dan McCullough
some logic and information. set the cookie to expire after 120 days or so, or never. you will have to set a cookie with the username and password, preferably a md5 encrypted password. also remember to have the logout function to remember those cookies. On 10/14/05, ganu [EMAIL PROTECTED] wrote:

Re: [PHP] automatic login..

2005-10-14 Thread Greg Donald
On 10/14/05, Dan McCullough [EMAIL PROTECTED] wrote: some logic and information. set the cookie to expire after 120 days or so, or never. you will have to set a cookie with the username and password, preferably a md5 encrypted password. also remember to have the logout function to remember

Re: [PHP] prevent user from getting scripts outside the web folder[this better?]

2005-10-14 Thread Norbert Wenzel
Ben wrote: My understanding is that mysql_real_escape_string will only work while you are connected to mysql. Not sure if that is the case in your situation. At least it requires a connection to mysql. I had an error, when using it without any connection opened before, that

Re: [PHP] Obsession with BC, take 2

2005-10-14 Thread Richard Lynch
On Thu, October 13, 2005 7:07 pm, GamblerZG wrote: Richard Lynch wrote: PHP developers assume that PHP5 will be frequently used to parse PHP4 scripts. Why? Because that's how the real world works. The real world works that way because, as you just said, installing 2 php modules side

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-14 Thread Richard Lynch
On Thu, October 13, 2005 4:05 pm, Graham Anderson wrote: How does a hacker get access to your scripts located outside the web folder? Several obvious options: 1. Get an account on the machine, and write another PHP script to read it. 2. Find some other script on the machine that will

[PHP] Still struggeling with my first script...

2005-10-14 Thread twistednetadmin
Here are all the scripts original. It still won't work. I can't see what's wrong with it??? It's from the tutorial PHP5 and Mysql for dummies. I have shorted it down though, since I am the only one who will register the User with a password. What I did was removing the Switch at the beginning

Re: [PHP] OPTIMIZING - The fastest way to open and show a file

2005-10-14 Thread Richard Lynch
On Fri, October 14, 2005 6:29 am, Ruben Rubio Rey wrote: if(file_exists($filename)){ $modified_date=filemtime($filename); if(time()($modified_date+1 * 24 * 60 * 60)){ $handle = fopen($filename, r); $contents = fread($handle, filesize($filename));

[PHP] editor

2005-10-14 Thread Hodicska Gergely
Hi! In advance, this is not a yet another editor question. :) I read somewhere about an editor, which has built in support for phpdocumentator and creating unit test. Now I could not find it, I tried a lot using Google without success. Can anybody find out from this little descrition which

[PHP] network speed

2005-10-14 Thread Richard Lynch
I've been spinning my wheels for weeks now on this, so am turning to the geniuses... My code has/had various combinations of: file_get_contents() fopen/fread fsockopen/fread to suck down some XML from a search engine feed The feed runs on Windows in .NET and I think it's written in C#. None of

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-14 Thread Richard Lynch
On Fri, October 14, 2005 8:20 am, John Nichel wrote: David Robley wrote: Ben wrote: snip My understanding is that mysql_real_escape_string will only work while you are connected to mysql. Not sure if that is the case in your situation. That is incorrect. mysql_real_escape_string is a php

Re: [PHP] editor

2005-10-14 Thread Edward Vermillion
Hodicska Gergely wrote: Hi! In advance, this is not a yet another editor question. :) I read somewhere about an editor, which has built in support for phpdocumentator and creating unit test. Now I could not find it, I tried a lot using Google without success. Can anybody find out from

Re: [PHP] network speed

2005-10-14 Thread John Nichel
Richard Lynch wrote: I've been spinning my wheels for weeks now on this, so am turning to the geniuses... My code has/had various combinations of: file_get_contents() fopen/fread fsockopen/fread to suck down some XML from a search engine feed The feed runs on Windows in .NET and I think it's

Re: [PHP] editor

2005-10-14 Thread Hodicska Gergely
Hi! http://www.zend.com/store/products/zend-studio/ Thx, I know this one, but I'm really curious about this unit test support. Regards, Felhő -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Trouble moving directory

2005-10-14 Thread Richard Lynch
On Fri, October 14, 2005 8:28 am, Miles Thompson wrote: One of the nice things MSFT did was to allow spaces in directory and file names. It created more work for programmers. I'm not familiar with MSFT... It must be a new acronym for Apple MacOS :-), circa 1984, which (AFAIK) was the first

Re: [PHP] network speed

2005-10-14 Thread Greg Donald
On 10/14/05, Richard Lynch [EMAIL PROTECTED] wrote: I can understand that file_get_contents is going to add SOME overhead, but 3 seconds sounds a bit too much Yeah, it's like half a second or so of overhead when I test it against wget: for x in 1 2 3 4 5; do php -r 'system( time `wget

[PHP] fckeditor and PDF and pesky users

2005-10-14 Thread Richard Lynch
This is more of a user education problem than anything, I suspect, but... Okay, so I'm kind of like a closing pitcher on this project where the original developer is, errr, surfing in California or something... Anyway, he's got a bunch of custom back-end CMS pages using fckEditor (sp?) and I'm

Re: [PHP] chown function

2005-10-14 Thread Daniele Palumbo
Alle 17:25, giovedì 13 ottobre 2005, John Nichel ha scritto: nobody:nobody. nobody:nonexistant (random number abs() really high), at least for apache2. my personal suggestion is: - chown all files (avoid suid) and dir root - chgrp apache all files and dir - chmod 750 all dir, 640 all files -

Re: [PHP] network speed

2005-10-14 Thread Brent Baisley
Once you involve the network, there are all sorts of delays that can crop up. Each network hop is going to add a bit of overhead unless every single step along the way has high end routers that can route at line speed. Otherwise the routers are doing a store and forward, which means they

RE: [PHP] Still struggeling with my first script...

2005-10-14 Thread Chris W. Parker
twistednetadmin mailto:[EMAIL PROTECTED] on Friday, October 14, 2005 12:39 PM said: Here are all the scripts original. It still won't work. I can't see what's wrong with it??? It's from the tutorial PHP5 and Mysql for dummies. What exactly is the problem? It still won't work is not

[PHP] Re: fckeditor and PDF and pesky users

2005-10-14 Thread Ben
Richard Lynch said the following on 10/14/05 13:39: So... Do I: A) Attempt to hack fckEditor to allow a PDF to get uploaded, and then display a link to the PDF instead of alink to the fckEditor output. Good luck! B) Give them a separate, possibly confusing, input to upload files to tie

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-14 Thread Graham Anderson
Many thanks for everyone's advice :) It is appreciated Is this a bit better ? In my 'cleaner' function, I amended the script to: function cleanser( $value ) { return mysql_real_escape_string( trim( escapeshellcmd($value ) )) ; } Instead of mysql_real_escape_string, I could use

Re: [PHP] Obsession with BC, take 2

2005-10-14 Thread GamblerZG
The second one is by using two different apache modules. It *does not break anything*, but it's a pain to setup. Judging sheerly by functionality and compatibility the second ways is better. However, judging from what I know about PHP, nobody tries to make that way easier, because everybody

Re: [PHP] Re: ampersand in dom with utf-8

2005-10-14 Thread jonathan
are there php functions to change from these different formats as #e8; doesn't seem to render correctly in a browser. ugghhh. -jonathan On Oct 13, 2005, at 4:53 AM, cc wrote: è -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: ampersand in dom with utf-8

2005-10-14 Thread jonathan
the real characters (presumably è) won't render correctly. it seems like there should be a set of functions for encoding this to a different but understandable format and then another function for decoding and display within a browser. it makes me not want to use DOM for creating xml

Re: [PHP] fckeditor and PDF and pesky users

2005-10-14 Thread Jason Kovacs
Richard Lynch said the following on Friday, October 14, 2005 3:39 PM: So... Do I: A) Attempt to hack fckEditor to allow a PDF to get uploaded, and then display a link to the PDF instead of alink to the fckEditor output. B) Give them a separate, possibly confusing, input to upload files to

[PHP] running mode

2005-10-14 Thread Florent Monnier
Hello, How to test if the current script is running in CLI, CGI or Apache mode? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: ampersand in dom with utf-8

2005-10-14 Thread Jasper Bryant-Greene
jonathan wrote: the real characters (presumably è) won't render correctly. Are you outputting the correct character set information (UTF-8), and are you sure that UTF-8 is being used throughout the entire process? -- Jasper Bryant-Greene General Manager Album Limited a: Freepost Album, PO

Re: [PHP] Still struggeling with my first script...

2005-10-14 Thread twistednetadmin
All: Sorry. I forgot to write what's wrongstupid me... Mike:1) I'm not sure how to indent the code... 2) I'm using Dreamweaver, but not to write the code for me. I'm not that lazy :). And that's not the way for me to learn. It's just rather annoying that all the tutorials I have tried

Re: [PHP] Still struggeling with my first script...

2005-10-14 Thread twistednetadmin
Did one change in the script guildregister.php: Changed the md5 part in the INSERT query to: $sql_reg = sprintf(INSERT INTO guildlogin (guilduser_name, guilduser_pass) VALUES ('%s', password('%s')), $_POST['guilduser_name'], $_POST['guilduser_pass']); $reg = mysql_query($sql_reg) or

RE: [PHP] Still struggeling with my first script...

2005-10-14 Thread Chris W. Parker
twistednetadmin mailto:[EMAIL PROTECTED] on Friday, October 14, 2005 5:15 PM said: All: Sorry. I forgot to write what's wrongstupid me... No problem. You'll get used to it. (I don't mean you'll get used to being stupid! I mean you'll get used to including all the relevant info!)

[PHP] Offseting Binary File Data with php

2005-10-14 Thread Graham Anderson
I need to figure out a way to iterate through a binary file and offset values between two address by a fixed number //--- Why ? I am attempting to add file data to a pre-existing Quicktime file In the Quicktime file format, the 'stco' atom stores the location of all the track

Re: [PHP] Still struggeling with my first script...

2005-10-14 Thread Ben
twistednetadmin said the following on 10/14/05 17:15: All: Sorry. I forgot to write what's wrongstupid me... Mike:1) I'm not sure how to indent the code... By putting spaces in front of some of the lines, it will make your code much easier to read and your life much, much easier. At

Re: [PHP] Still struggeling with my first script...

2005-10-14 Thread twistednetadmin
Well. I have figured out that the login is working as it should. The query brings back both the username and the userpass and stores them in $_SESSION as: auth|yes|logname|Test When I echoed the query with both user and pass, I got both back as they should be. In this case I ran user:Test