Re: [PHP] Maybe Newbie: PHP-scripts in sub-directories

2005-04-07 Thread Oliver Ekeis
Hi Richard, thanks for your reply. No, it was not a bug in PHP or something else. The misconfiguration was that the apache2 was configured by default to using .htaccess-files. That is why the htdocs- root-script could be run, but no script from any subdir. Thanks for your help anyway. Oliver.

RE: [PHP] language files

2005-04-07 Thread Kim Madsen
Hi there > -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 5:37 AM > have you ever double entered the same words? Well, if You do that, the later is the overwriting the previous ;) > eg: > $lang['login_username']='User

RE: [PHP] read from comport: windows vs. linux

2005-04-07 Thread Kim Madsen
> -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 6:18 AM > > [EMAIL PROTECTED] dev]# ls -al ttyS* > > crw-rw-rw- 1 apache apache 4, 64 Apr 5 16:01 ttyS0 This is not an acceptable solution anyway, the permissions are changed on a rebo

RE: [PHP] Anybody getting these also?

2005-04-07 Thread Kim Madsen
> -Original Message- > From: John Nichel [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 06, 2005 4:02 PM > > -- Forwarded Message -- > > > > Subject: > > Date: Wednesday 06 April 2005 07:30 > > From: [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > > > > Thank you for c

Re: [PHP] sprintf and arrays.

2005-04-07 Thread Duncan Hill
On Wednesday 06 April 2005 18:05, Brent Baisley typed: > You want to have sprintf look at the contents of the variable instead > of the variable itself. Anytime you want to do something like this you > use the eval() function to evaluate the contents of the variable. Woot! $begin_string = 'htmlen

Re: [PHP] secure document : solution wanted

2005-04-07 Thread Jochem Maas
Richard Lynch wrote: On Wed, April 6, 2005 9:14 am, Eric Gorr said: "Duncan Hill" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] IE dropped support (or severely neutered it) for username:password in URLs a while back. If anyone is interested, I found this document which appears to pro

Re: [PHP] Open source curiosity

2005-04-07 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi Just out of curiosity, if you write your PHP under an open source licence, how do you hide the codes to get into your database? the login details would be put in a config file, usually your OS package will supply an example version and anyone wanting to use your package

[PHP] PEAR templates vs Smarty?

2005-04-07 Thread Tim Beckham
I'm trying to assess PEAR templates relative to Smarty, and I would like information regarding the pros and cons of each. Any help will be greatly appreciated. Tim Beckham -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] zipfile problems

2005-04-07 Thread George Pitcher
Hi, My first posting for a long while. If anyone is using the 'class.zipfile.php' library, can they help me. I am trying to create some PDFs, then zip and email them back to me. I get the zipfile but it only contains the first pdf file, even though 4 are being created in my test site. I am gett

[PHP] chop string

2005-04-07 Thread William Stokes
What was the string chooping function? I need to chop a date value from DB like (07.04.2005) and time (22:00) to $day ='07' $month='04' etc. etc. Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] File_get_contents()

2005-04-07 Thread Jeff McKeon
Does anyone know if it's possible to have file_get_contents() accept a file handle? $handle=fopen("/tmp/file","r"); file_get_contents($handle); This doesn't seem to work for me, it generates an error about first parameter needing to be a string. I've tried: file_get_contents('{$handle}'); But

Re: [PHP] Re: Signal 11 - php-5.1.0-dev - cygwin

2005-04-07 Thread Jason Barnett
Zac Barton wrote: > Hi Jason > > I tried to compile php using cygwin last night and also got the same erorr. I > could work around it by adding --without-pear ("configure --without-pear") > I'll give that a shot, but I'd really like to fix the underlying error (i.e. why did PEAR fail to load and

[PHP] Re: zipfile problems

2005-04-07 Thread Jason Barnett
George Pitcher wrote: > Hi, > > My first posting for a long while. > > If anyone is using the 'class.zipfile.php' library, can they help me. I am > trying to create some PDFs, then zip and email them back to me. Not using the class, but... > > I get the zipfile but it only contains the first pdf

RE: [PHP] zipfile problems

2005-04-07 Thread George Pitcher
Ken, Thanks, but I did explain the problem. The zipfile contains only one of the pdf files instead of the four that the script creates: The actual script looks like this (just the zip bit): == $zipfile = new zipfile(); $zipfile -> add_dir("dir/"); $inputpath = "C:\\Pro

Re: [PHP] zipfile problems

2005-04-07 Thread Ken
On Apr 7, 2005 1:54 PM, George Pitcher <[EMAIL PROTECTED]> wrote: > Hi, > > My first posting for a long while. > > If anyone is using the 'class.zipfile.php' library, can they help me. I am > trying to create some PDFs, then zip and email them back to me. > > I get the zipfile but it only contai

[PHP] Re: chop string

2005-04-07 Thread Jason Barnett
William Stokes wrote: > What was the string chooping function? I need to chop a date value from DB > like (07.04.2005) and time (22:00) to $day ='07' $month='04' etc. etc. > > Thanks > -Will -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.t

[PHP] Re: File_get_contents()

2005-04-07 Thread Jason Barnett
Jeff McKeon wrote: > Does anyone know if it's possible to have file_get_contents() accept a > file handle? file_get_contents() does the file handle operations internally, so it only expects the name of the file. If you want to use file handles yourself, then you should just fopen(), fread(), and

RE: [PHP] File_get_contents()

2005-04-07 Thread Jeff McKeon
> > > -Original Message- > > From: Jeff McKeon [mailto:[EMAIL PROTECTED] > > Sent: 7 April 2005 1:03 pm > > To: php-general@lists.php.net > > Subject: [PHP] File_get_contents() > > > > > > Does anyone know if it's possible to have > file_get_contents() accept a > > file handle? > > > > $

Re: [PHP] File_get_contents()

2005-04-07 Thread Jason Wong
On Thursday 07 April 2005 20:21, Jeff McKeon wrote: > Now that I look at it, does anyone think this would work... > > file_get_contents("php//stdin/"); That should be: 'php://stdin' -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design

Re: [PHP] File_get_contents()

2005-04-07 Thread Franklin van de Meent
If you have set allow_url_fopen to On in your php.ini, file_get_contents('php://stdin'); should work On Apr 7, 2005 2:21 PM, Jeff McKeon <[EMAIL PROTECTED]> wrote: > > Sorry, > > What I'm actually doing is this. > > $handle=fopen("php//stdin/","r"); > file_get_contents($handle); > > I should

RE: [PHP] zipfile problems - SOLVED

2005-04-07 Thread George Pitcher
Hi all, I found the cause of the problem. 01 $zipfile = new zipfile(); 02 $zipfile -> add_dir("dir/"); 03 $inputpath = "C:\\Program Files\\Apache 04 Group\\Apache2\\htdocs\\egretgui\\includes\\invoices\\"; 05 $outputpath = "C:\\"; 06 $outfile = $outputpath."inv_".date("Y_m").".zip"; 07 if ($handl

RE: [PHP] File_get_contents()

2005-04-07 Thread Jeff McKeon
Thanks!!! > -Original Message- > From: Franklin van de Meent [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 7:34 AM > To: php-general@lists.php.net > Subject: Re: [PHP] File_get_contents() > > > If you have set allow_url_fopen to On in your php.ini, > file_get_contents('php

[PHP] switch question

2005-04-07 Thread William Stokes
Hello, Can I jump to html and back to php in the middle on switch example: do some html do some html etc etc. Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] switch question

2005-04-07 Thread Jay Blanchard
[snip] Can I jump to html and back to php in the middle on switch [/snip] Yes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] File_get_contents()

2005-04-07 Thread Jeff McKeon
Because I was unclear on how file_get_contents() worked... :o) The php manual is a little vague on the topic. Best Reguards, Jeff McKeon IT Manager Telaurus Communications LLC [EMAIL PROTECTED] +1 (973) 889-8990 > -Original Message- > From: Josip Dzolonga [mailto:[EMAIL PROTECTED] > S

Re: [PHP] switch question

2005-04-07 Thread John Nichel
William Stokes wrote: Hello, Can I jump to html and back to php in the middle on switch Test the question. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] secure document : solution wanted

2005-04-07 Thread Evert - Rooftop Solutions
If anyone is interested, I found this document which appears to provide more details... http://support.microsoft.com/kb/834489 Is it just me, or is this a case of MS breaking a protocol because their no its not you :-). stupid interface was hiding information it shouldn't have hidden in the firs

Re: [PHP] zipfile problems

2005-04-07 Thread Josip Dzolonga
Ken wrote: On Apr 7, 2005 1:54 PM, George Pitcher <[EMAIL PROTECTED]> wrote : That's not really an error... that's just a notice... I think everything should be fine with the script. You might want to try turning off error_reporting in php.ini... Or from .htaccess, or directly from the script, t

Re: [PHP] File_get_contents()

2005-04-07 Thread Josip Dzolonga
Jeff McKeon wrote: Does anyone know if it's possible to have file_get_contents() accept a file handle? Why would you need that ? -- Josip Dzolonga http://josip.dotgeek.org jdzolonga[at]gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] switch question

2005-04-07 Thread Ryan A
Hey, > Can I jump to html and back to php in the middle on switch yes, you can. Question: I know this might sound silly but why didnt you try it before writing to the list? you would have gotten your answer much quicker. Cheers, Ryan -- No virus found in this outgoing message. Checked by AV

RE: [PHP] language files

2005-04-07 Thread Ryan A
Hej Kim, > Hi there > > have you ever double entered the same words? > Well, if You do that, the later is the overwriting the previous ;) Exactly what I want to avoid. That was a pretty good example of using language files...and I really liked the text in that file...funny ;-) I understand the

Re: [PHP] language files

2005-04-07 Thread Ryan A
> > I was just wondering which is the best/most efficient way of having > > language > > files for a site? > > > > I can't really speak to this, as I've never gotten around to > > multi-language support, but this always looked like a winner to me: > > > > http://php.net/gettext > The thing that im

[PHP] insert mysql data with safe mode on problem

2005-04-07 Thread Chris
I've been using a php script which loads a large (approximately 40,000 records) data file into a mysql table. In the event that MySql's LOAD DATA INFILE capability is disabled, the script loads each record individually. The problem I'm facing is trying to run this script on a server which has safe

Re: [PHP] Anybody getting these also?

2005-04-07 Thread Leif Gregory
Hello Kim, Thursday, April 7, 2005, 3:22:19 AM, you wrote: K> Nevertheless the _f*ker_ who are using this should be thrown OFF K> the list! It must be possible to see, who was added to the list K> just before the first activewireinc mail came... I hate those challenge/response systems. We get the

[PHP] Web Site Security Hole

2005-04-07 Thread Don
Hi, I'm developing a small web site that does a bit of e-commerce (that is, it creates security keys and such). I've been very careful to keep all constants used in calculations in a local directory above docroot, but all of my main .php pages are in (or under) docroot (my host won't allow .ph

Re: [PHP] insert mysql data with safe mode on problem

2005-04-07 Thread Maerlyn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris wrote: > I've been using a php script which loads a large (approximately > 40,000 records) data file into a mysql table. In the event that > MySql's LOAD DATA INFILE capability is disabled, the script loads > each record individually. The probl

Re: [PHP] Web Site Security Hole

2005-04-07 Thread Duncan Hill
On Thursday 07 April 2005 14:55, Don typed: > I was feeling pretty secure until a friend reminded me you can download > complete sites by importing them with such tools as FrontPage and > Dreamweaver. That way, the "protection" provided by the PHP server is > non-existant. This is only possible in

Re: [PHP] Web Site Security Hole

2005-04-07 Thread Brent Baisley
If properly designed, it shouldn't really matter if someone sees your code. Everyone can see the source code for Linux and lots of other systems you may be using (MySQL, PHP, etc.), but they are considered fairly secure. Knowing your methodology will only help someone in finding security holes

Re: [PHP] exec command

2005-04-07 Thread Philip Hallstrom
You might find that get_current_user() is easier... http://www.php.net/manual/en/function.get-current-user.php On Wed, 6 Apr 2005, cragland wrote: when running a simple php script, below, with exec, I recieve: sh: /whoami: No such file or directory Thanks very much, cole mailto:[EMAIL PROTECTED] "

Re: [PHP] Critical Thinking, or Several "Why" Questions

2005-04-07 Thread GamblerZG
> You can ask about a question. You can even try to improve the > performance of a function. But at the end of the day unless you can > come up with something that will do what the PHP community at large > expects *and* it is faster it's not going to happen. How exactly "PHP community at large" sup

[PHP] Multiple denial of service vulnerabilities in PHP

2005-04-07 Thread Dustin Wish with INDCO Networks
- Multiple denial of service vulnerabilities in PHP - Oxygen3 24h-365d, by Panda Software (http://www.pandasoftware.com) MADRID, April 7, 2005 - iDefense has reported multiple denial of service vulnerabilities in the PHP scripting language, which could allow an attacker to crash the sys

[PHP] Performance optimization

2005-04-07 Thread GamblerZG
Are there any decent resources dedicated to PHP code optimization? By “decent” I mean ones that do not ask you to completely ruin readability for the sake of extra 0.003 seconds. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sql question

2005-04-07 Thread William Stokes
Hello, This is not a php but sql question. My apologies but I don't know any good sql forums and I know that someone here might be able to answer. OK so the question is. How to make a SELECT query with WHERE definition that requires 2 conditions to be satisfied so that the row gets selected? M

[PHP] Simple Alert Message then Redirect?

2005-04-07 Thread PartyPosters
Hello I want to display an alert message then after users click ok I want to automatically goto a URL if ($var_stock_count == 0){ alert("Message") redirect("http://www.google.co.uk";); } Can someone help me put this right. Thanks Kaan.

Re: [PHP] sql question

2005-04-07 Thread Joseph Connolly
if i understand you question... SELECT columns FROM table WHERE (condition #1) AND (condition #2); You can add many conditions. There are many ways to do this. This one is probably the most simple for only two conditions. Depending on your needs you also may need to create a subquery. SELECT col

Re: [PHP] sql question

2005-04-07 Thread Philip Hallstrom
On Thu, 7 Apr 2005, William Stokes wrote: Hello, This is not a php but sql question. My apologies but I don't know any good sql forums and I know that someone here might be able to answer. OK so the question is. How to make a SELECT query with WHERE definition that requires 2 conditions to be satis

Re: [PHP] Critical Thinking, or Several "Why" Questions

2005-04-07 Thread Jason Barnett
GamblerZG wrote: >> You can ask about a question. You can even try to improve the >> performance of a function. But at the end of the day unless you can >> come up with something that will do what the PHP community at large >> expects *and* it is faster it's not going to happen. > > How exactly "PH

Re: [PHP] Simple Alert Message then Redirect?

2005-04-07 Thread Josip Dzolonga
PartyPosters wrote: Hello I want to display an alert message then after users click ok I want to automatically goto a URL if ($var_stock_count == 0){ alert("Message") redirect("http://www.google.co.uk";); } This should be done with JavaScript, not PHP, so something like : alert("Mess

[PHP] Re: Performance optimization

2005-04-07 Thread Jason Barnett
GamblerZG wrote: > Are there any decent resources dedicated to PHP code optimization? By > “decent” I mean ones that do not ask you to completely ruin readability > for the sake of extra 0.003 seconds. The best way to go about it is to get a code profiler. apd / xdebug / Zend are popular choices.

Re: [PHP] sql question

2005-04-07 Thread John Nichel
William Stokes wrote: Hello, This is not a php but sql question. My apologies but I don't know any good sql forums and I know that someone here might be able to answer. OK so the question is. How to make a SELECT query with WHERE definition that requires 2 conditions to be satisfied so that the

[PHP] php rich text editors

2005-04-07 Thread DuSTiN KRySaK
Can anyone refer me to anything that will work with PHP? Just need it for a blog type application. Thanks! d -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] php rich text editors

2005-04-07 Thread Jay Blanchard
[snip] Can anyone refer me to anything that will work with PHP? Just need it for a blog type application. [/snip] Something like http://www.htmlarea.com/ ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: php rich text editors

2005-04-07 Thread Ben Ramsey
DuSTiN KRySaK wrote: Can anyone refer me to anything that will work with PHP? Just need it for a blog type application. FCKEditor works well, has a PHP version, and is cross-browser: http://www.fckeditor.net/ -- Ben Ramsey Zend Certified Engineer http://benramsey.com -- PHP General Mailing List (h

[PHP] slow session_start()

2005-04-07 Thread Arshavir Grigorian
Hi, I am getting 4-5 minute delays when I call the session_start() function in one of my scripts, I reduced it to a small script that just echoes some html, but still calling session_start() causes a major delay. My /tmp directory is almost empty and there is a lot of disk space. It's an AMD At

[PHP] another non php Q

2005-04-07 Thread William Stokes
Is there a way to limit a size with som sort of a maxlength value I know it's not php but thanks anyway -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: php rich text editors

2005-04-07 Thread DuSTiN KRySaK
Problem with that one - does not work in safari (on the mac). d On 7-Apr-05, at 11:22 AM, Ben Ramsey wrote: DuSTiN KRySaK wrote: Can anyone refer me to anything that will work with PHP? Just need it for a blog type application. FCKEditor works well, has a PHP version, and is cross-browser: http://

Re: [PHP] another non php Q

2005-04-07 Thread John Nichel
William Stokes wrote: Is there a way to limit a size with som sort of a maxlength value I know it's not php but thanks anyway -Will STFW -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

RE: [PHP] another non php Q

2005-04-07 Thread Jay Blanchard
[snip] Is there a way to limit a size with som sort of a maxlength value [/snip] No, http://www.w3.org/TR/html4/interact/forms.html#h-17.7 but you can do it with JavaScript. STFW -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: php rich text editors

2005-04-07 Thread Joseph Connolly
1- i like php designer. It is free cross platform and does everything i need. They also make a html editor calle 'html gate' mpsoftware.dk 2- you could use google 3-go to http://www.php-editors.com/ which has many tools and forums DuSTiN KRySaK wrote: Problem with that one - does not work in safa

Re: [PHP] another non php Q

2005-04-07 Thread Joseph Connolly
www.w3.org http://www.w3.org/MarkUp/html3/textarea.html wrong list though William Stokes wrote: Is there a way to limit a size with som sort of a maxlength value I know it's not php but thanks anyway -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

Re: [PHP] php rich text editors

2005-04-07 Thread DuSTiN KRySaK
All of these could work in some form or another - but I am looking for a real scaled down one with less options for the users (or somethign with the option to limit available buttons) Pretty much just bold, italic, bullets, links and images. Since it is for a blog, I want to keep the look a

Re: [PHP] Simple Alert Message then Redirect?

2005-04-07 Thread Ryan A
On 4/7/2005 7:55:29 PM, Josip Dzolonga ([EMAIL PROTECTED]) wrote: > PartyPosters wrote: > > > > >Hello I want to display an alert message then after users click ok I want > to automatically goto a URL > > > > > >if ($var_stock_count == 0){ > > >alert("Message") > > > redirect("http://www.google.c

Re: [PHP] Simple Alert Message then Redirect?

2005-04-07 Thread PartyPosters
Thanks for you reply. I need to be able to test the php variable though, is the anyway I can call the java funtion from my if statement? - Original Message - From: "Josip Dzolonga" <[EMAIL PROTECTED]> To: "PartyPosters" <[EMAIL PROTECTED]> Cc: Sent: Thursday, April 07, 2005 6:55 PM Subj

[PHP] Re: CURL running form PHP exec() problem!

2005-04-07 Thread cragland
I've encountered the same problem with exec(curl, system(curl, etc. PHP exits with sh: \curl: No file or directory. I'm wondering if there is some php shell option that has to be set. My other problem: Upfront, I can post and recieve data just fine with asp.net, perl, and java client scripts.

Re: [PHP] Simple Alert Message then Redirect?

2005-04-07 Thread Josip Dzolonga
Ryan A wrote: Meta refresh too would do the job quite nicely Cheers, Ryan Yes it will, but he will still have to use JavaScript in order to show that message box ( the alert function ) ;-) -- Josip Dzolonga http://josip.dotgeek.org jdzolonga[at]gmail.com -- PHP General Mailing List (http://ww

RE: [PHP] Re: php rich text editors

2005-04-07 Thread Chris W. Parker
DuSTiN KRySaK on Thursday, April 07, 2005 11:35 AM said: > Problem with that one - does not work in safari (on the mac). And it made FF 1.0.2/Win crash. :( Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

[PHP] Str_replace?

2005-04-07 Thread Ryan A
Hey, I am making a site primary for the Swedish audiance, Swedish alphabets are pretty much the same as our English ones except for three extras, which are: (lowercase) åäö (and uppercase) ÅÄÖ While using dreamweaver to format some of the pages I noticed that DW converts those letters to: å=å ö=

[PHP] sessions not being stored

2005-04-07 Thread Yuri Huitrón Alvarado
Hi ! I'm using RedHat Linux 9.0 and have troubles storing sessions in /tmp , it just displays : Warning: session_start(): open(/tmp/sess/sess_1135822d82c1bae67f9022de91702b80, O_RDWR) failed: Permission denied (13) in /usr/local/apache2/htdocs/calendario/calendarix/cal_header.inc.php on li

Re: [PHP] Simple Alert Message then Redirect?

2005-04-07 Thread Ryan A
On 4/7/2005 9:24:31 PM, Josip Dzolonga ([EMAIL PROTECTED]) wrote: > Ryan A wrote: > > > > >Meta refresh too would do the job quite nicely > > > > > >Cheers, > > >Ryan > > > > > Yes it will, but he will still have to use JavaScript in order to show > > that message box ( the alert function ) ;-

[PHP] How do I get the first element's key of an array of objects?

2005-04-07 Thread Daevid Vincent
I have an array of objects in PHP5. Each element's key is the database row ID. I don't see a graceful way of finding the first element's key ID. So I have this... Array ( [3] => fooObject Object ( [id:protected] => 3 [model:protected] => ABC [read:

RE: [PHP] How do I get the first element's key of an array of objects?

2005-04-07 Thread Jared Williams
> There has to be a better way. Something more elegant? key() http://php.net/key Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sessions not being stored

2005-04-07 Thread Yuri Huitrón Alvarado
Hi ! I'm using RedHat Linux 9.0 and have troubles storing sessions in /tmp/sess , it just displays : Warning: session_start(): open(/tmp/sess/sess_1135822d82c1bae67f9022de91702b80, O_RDWR) failed: Permission denied (13) in /usr/local/apache2/htdocs/calendario/calendarix/cal_header.inc.php on li

Re: [PHP] slow session_start()

2005-04-07 Thread Bostjan Skufca @ domenca.com
If you trace (strace on linux) the process which serves your request you should get some idea. On Thursday 07 April 2005 20:23, Arshavir Grigorian wrote: > Hi, > > I am getting 4-5 minute delays when I call the session_start() function > in one of my scripts, I reduced it to a small script that

Re: [PHP] How do I get the first element's key of an array of objects?

2005-04-07 Thread John Nichel
Daevid Vincent wrote: I have an array of objects in PHP5. Each element's key is the database row ID. I don't see a graceful way of finding the first element's key ID. So I have this... Array ( [3] => fooObject Object ( [id:protected] => 3 [model:protected] => ABC

Re: [PHP] How do I get the first element's key of an array of objects?

2005-04-07 Thread Chris Boget
>> I don't see a graceful way of finding the first element's key ID. >> Array >> ( >> [3] => fooObject Object >> ( >> [id:protected] => 3 >> [model:protected] => ABC >> [read:protected] => public >> [write:protected] => private >>

[PHP] Re: sessions not being stored

2005-04-07 Thread Jason Barnett
Change permissions for /tmp/sess. The PHP user needs read and write perms for this directory. PHP user might also need execute perms for /tmp. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http:/

RE: [PHP] How do I get the first element's key of an array of objects?

2005-04-07 Thread Chris W. Parker
Daevid Vincent on Thursday, April 07, 2005 1:13 PM said: > I have an array of objects in PHP5. Each element's key is the > database row ID. > > I don't see a graceful way of finding the first element's key ID. [snip/] > My hack is to do this: > > foreach($foo

[PHP] problems with outputing a new line

2005-04-07 Thread Bosko Vukojevic
just reading: http://ca3.php.net/echo Regardless, I am not able to output a new line on the screen. Windows XP Perl 5.04 IIS 6 Php pages are processed correctly, i.e., the hook between IIS and Perl is working. This is the snippet of the code that does not work Any help appreciated ...

Re: [PHP] sessions not being stored

2005-04-07 Thread Colin Ross
On Apr 7, 2005 1:37 PM, Yuri Huitrón Alvarado <[EMAIL PROTECTED]> wrote: > > > > the directory is owend by root, but in fact, the directory where the > sessions must be stored is : /tmp/sess as specified in php.ini > > and /tmp/sess is owned by nobody which is the user under which runs Apache

Re: [PHP] noob need help for sessions

2005-04-07 Thread Jeff Weinberger
I'm having a similar problem with managing sessions without Cookies. I am also somewhat new to PHP, so I may be missing something here (if so, please point it out!). I am well warned about the dangers of passing session IDs in URLs, but for my purposes, there is no sensitive data in the session

Re: [PHP] problems with outputing a new line

2005-04-07 Thread Brent Baisley
Uhm, well, if you are outputting it to a web browser, you would need to use HTML. Either or . On Apr 7, 2005, at 3:41 PM, Bosko Vukojevic wrote: just reading: http://ca3.php.net/echo Regardless, I am not able to output a new line on the screen. Windows XP Perl 5.04 IIS 6 Php pages are processe

[PHP] Displaying Time Intervals

2005-04-07 Thread Pablo Gosse
Hi, folks. I've added some code to our CMS that tracks the exact amount of time that a user is logged into the system. I'm going to use these stats to track how much time someone has spent practicing in the training environment before I give them access to our production system. Can anyone give

[PHP] Re: Str_replace?

2005-04-07 Thread Satyam
Try htmlentities(), its purpose is to escape those special characters, and it should work with any language. Satyam "Ryan A" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey, > > I am making a site primary for the Swedish audiance, Swedish alphabets are > pretty much the same a

Re: [PHP] noob need help for sessions

2005-04-07 Thread Josip Dzolonga
Jeff Weinberger wrote: I am well warned about the dangers of passing session IDs in URLs, but for my purposes, there is no sensitive data in the session, and I want to be able to do it only in the case where the visitor does not accept cookies. Better for you to be warned :-)session_start(); ses

Re: [PHP] sessions not being stored

2005-04-07 Thread Richard Lynch
Can the PHP User (Apache User in httpd.conf) write /tmp/sess? On Thu, April 7, 2005 1:15 pm, Yuri Huitrón Alvarado said: > > Hi ! > I'm using RedHat Linux 9.0 and have troubles storing sessions in /tmp/sess > , it just displays : > Warning: session_start(): > open(/tmp/sess/sess_1135822d82c1bae

[PHP] Re: Performance optimization

2005-04-07 Thread GamblerZG
The best way to go about it is to get a code profiler. apd / xdebug / Zend are popular choices. Can't seem to install apd 0.9something or xdebug 1.0.something. pear calls phpize, which in turn outputs some cryptic message and exits. (In case of APD it's something like "error on line 59". I'm not

RE: [PHP] Displaying Time Intervals

2005-04-07 Thread Chris W. Parker
Pablo Gosse on Thursday, April 07, 2005 2:49 PM said: > Can anyone give me some advice on the best way to display intervals of > time? [snip/] > Then, cumulatively for each day, I want to display the total time, > also in the format of H:i:s. > > Can anyone give me

[PHP] Session Info Storage: Session File or MySQL DB?

2005-04-07 Thread michael
I am currently developing a few security functions for my website and have finally decided to use the session functions that I have been avoiding for years since I did not want to change from what I am used to developing. So now that I have refreshed my brain on how to use sessions I have to m

Re: [PHP] Simple Alert Message then Redirect?

2005-04-07 Thread Richard Lynch
On Thu, April 7, 2005 11:59 am, PartyPosters said: > Thanks for you reply. > I need to be able to test the php variable though, is the anyway I can > call > the > java funtion from my if statement? First, it's JavaScript not Java. Secondly, PHP lives on the SERVER. JavaScript lives in the BROWS

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an array of objects?

2005-04-07 Thread Mattias Thorslund
Chris W. Parker wrote: While looking through the array functions I saw www.php.net/array_keys and thought of: $keys = array_keys($object_array); $first_key = $keys[0]; ?> I wonder if that will work, when the first element has the key 3... ? This might work better: $keys = array_keys($obj

Re: [PHP] insert mysql data with safe mode on problem

2005-04-07 Thread Richard Lynch
On Thu, April 7, 2005 6:28 am, Chris said: > I've been using a php script which loads a large (approximately 40,000 > records) data file into a mysql table. In the event that MySql's LOAD DATA > INFILE capability is disabled, the script loads each record individually. > The problem I'm facing is tr

[PHP] mysql regexp select questions

2005-04-07 Thread Andras Kende
I would like to do the following: mysql db: andrew anthony joe janice john simon sql_query ( select names . I would need only the distinct first character from the query result would be: a,j,s I think maybe its REGEXP but never did it before... Tha

[PHP] pasring complex string question

2005-04-07 Thread Webmaster
Hello, i have a string looking like this. ## /T (KEY1)/V (VALUE1)|| ## /T (KEY2)/V (VALUE2)|| ## /V (VALUE3)/T (KEY3)|| I know want to separete it in to keys and values and insert them into an array. Note that /T always shows that teh upcoming value in() is a Key and that /V always i

Re: [PHP] another non php Q

2005-04-07 Thread Richard Lynch
On Thu, April 7, 2005 11:32 am, William Stokes said: > Is there a way to limit a size with som sort of a maxlength > value > > I know it's not php but thanks anyway There is no widely-supported HTML attribute for that for TEXTAREA (just for INPUT). Silly HTML. You can write JavaScript to help n

[PHP] Re: php user groups - searching for php developers for a project...

2005-04-07 Thread michael
Try this Forum: http://www.phpfreaks.com/forums/index.php?showforum=8 Hope this Helps! Bruce wrote: hi... we're trying to find php developers/partners for a project, and we're wondering if there are php user groups in the cali/bay area (san fran/san jose) area that we can talk with, attend meetings

Re: [PHP] slow session_start()

2005-04-07 Thread Richard Lynch
On Thu, April 7, 2005 11:23 am, Arshavir Grigorian said: > I am getting 4-5 minute delays when I call the session_start() function > in one of my scripts, I reduced it to a small script that just echoes > some html, but still calling session_start() causes a major delay. My > /tmp directory is almo

Re: [PHP] Re: CURL running form PHP exec() problem!

2005-04-07 Thread Richard Lynch
On Thu, April 7, 2005 11:54 am, cragland said: > I've encountered the same problem with exec(curl, system(curl, etc. PHP > exits with sh: \curl: No file or directory. I'm wondering if there is > some php shell option that has to be set. Use full path names for EVERYTHING in exec. If curl, as I

[PHP] using rand()

2005-04-07 Thread Ryan A
Hey, need some advise on what would be the best way to do this: I have a table with these fields: cno (just a auto_increment field), username, sex (2 values: man, woman), has_pic (0=no,1=yes), pic_name I need to randomly get 3 womens pictures and one guys picture from the above table... I know I

[PHP] Question about clients

2005-04-07 Thread karl james
Team, How do most of you get your clients, are their any other tricks besides word of mouth. I really want to become a freelance web designer, or work for a provider of clients. Also/or for a major coporation that. Does anybody have any suggestions on how I can start getting paid for what I know.

Re: [PHP] using rand()

2005-04-07 Thread Ryan A
> why not do two select statements using the ORDER BY RAND() then append: > > LIMIT 3 for your women, > > and then > > LIMIT 1 for your men > > > > so the first one is: > > $result1 = > mysql_query("select * from {table} where sex='female' order > by rand() limit 3;"); > > the second: > > $result

  1   2   >