[PHP] REALLY NEWB QUESTION - include issue

2008-07-01 Thread TS
Trying to include() a script from another domain on my server and it won't let me do it. I'm getting this error. open_basedir restriction in effect. Operation not permitted etc... Please help and stop laughing at me. Thanks ahead, T -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] REALLY NEWB QUESTION - include issue

2008-07-01 Thread TS
Code segment? Exact error message? (Is there more context?) Include (/file); Function.include/a]: open_basedir restriction in effect. File(/var/www/vhosts/domain/httpdocs/file.php) is not within the allowed path(s): (/var/www/vhosts/differentdomain/httpdocs:/tmp) in

RE: [PHP] REALLY NEWB QUESTION - include issue

2008-07-01 Thread Thijs Lensselink
Quoting TS [EMAIL PROTECTED]: Code segment? Exact error message? (Is there more context?) Include (/file); Function.include/a]: open_basedir restriction in effect. File(/var/www/vhosts/domain/httpdocs/file.php) is not within the allowed path(s):

Re: [PHP] Simple array problem

2008-07-01 Thread Thijs Lensselink
Quoting Brian Dunning [EMAIL PROTECTED]: I'm trying to add a number to a value in an array. Pretend I have this: $new_value = array('orange', 2); $arr = array( array('blue', 4), array('orange', 5), array('green', 6)); I want to add the new value to the existing

Re: [PHP] Simple array problem

2008-07-01 Thread Richard Heyes
Brian Dunning wrote: I'm trying to add a number to a value in an array. Pretend I have this: $new_value = array('orange', 2); $arr = array( array('blue', 4), array('orange', 5), array('green', 6)); I want to add the new value to the existing matching array element, so I end up

FW: [PHP] REALLY NEWB QUESTION - include issue

2008-07-01 Thread TS
To allow opening of remote url's you can enable 'allow_url_fopen' in php.ini. This isn't a remote url though. It's a local path. Looking for something similar to crossdomain.xml file for Flash if anyone is familiar with that. Thanks, T -Original Message- From: Thijs Lensselink

Re: FW: [PHP] REALLY NEWB QUESTION - include issue

2008-07-01 Thread Chris
-Original Message- From: Thijs Lensselink [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 1:58 AM To: php-general@lists.php.net Subject: RE: [PHP] REALLY NEWB QUESTION - include issue Quoting TS [EMAIL PROTECTED]: Code segment? Exact error message? (Is there more

Re: FW: [PHP] REALLY NEWB QUESTION - include issue

2008-07-01 Thread Thijs Lensselink
Quoting TS [EMAIL PROTECTED]: To allow opening of remote url's you can enable 'allow_url_fopen' in php.ini. This isn't a remote url though. It's a local path. Looking for something similar to crossdomain.xml file for Flash if anyone is familiar with that. Thanks, T -Original

Re: [PHP] Encription

2008-07-01 Thread Stefano Esposito
On Mon, 30 Jun 2008 14:39:04 -0500 Will Fitch [EMAIL PROTECTED] wrote: Have you considered mcrypt then base64? Thanks, i was completely forgetting mcrypt... that's what i need :) -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: VOGLIA DI VACANZA ? *

[PHP] Re: can you give me example of website using postgresql database?

2008-07-01 Thread paragasu
paragasu wrote: I develop a relatively large, in-house application using PostgreSQL that I can't wait to convert to MySQL. well, you should give me a reason why you want to do this. What exactly scares you about Sun/MySQL? personally, it is not about i am scared. i am still continue to use

Re: [PHP] Strategy to protect images

2008-07-01 Thread Stefano Esposito
On Sun, 15 Jun 2008 13:48:28 +0200 Stefano Esposito [EMAIL PROTECTED] wrote: Hi all, i have to forbid users of my site to view images directly (i.e. writing the image URL in the address bar) but they'd be able viewing them from the pages of the site. What's the best way of doing it, or

Re: [PHP] Strategy to protect images

2008-07-01 Thread Nitsan Bin-Nun
Umm have you ever thought about watermark-ing it? (In case its not a part of your website or something..) On 01/07/2008, Stefano Esposito [EMAIL PROTECTED] wrote: On Sun, 15 Jun 2008 13:48:28 +0200 Stefano Esposito [EMAIL PROTECTED] wrote: Hi all, i have to forbid users of my site to

Re: [PHP] Simple array problem

2008-07-01 Thread tedd
At 9:35 AM +0100 7/1/08, Richard Heyes wrote: Brian Dunning wrote: Seems like it should be really simple but all the ways I can figure out to do it are too kludgey. It's rather easy: for ($i=0; $icount($arr); $i++) { if ($arr[$i][0] == $new_array[0]) { $arr[$i][1] +=

Re: [PHP] Simple array problem

2008-07-01 Thread Richard Heyes
Small correction: Which is...? -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Simple array problem

2008-07-01 Thread Eric Butera
On Tue, Jul 1, 2008 at 8:50 AM, Richard Heyes [EMAIL PROTECTED] wrote: Small correction: Which is...? -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Look at the link he

Re: [PHP] Simple array problem

2008-07-01 Thread Wolf
Brian Dunning wrote: I'm trying to add a number to a value in an array. Pretend I have this: $new_value = array('orange', 2); $arr = array( array('blue', 4), array('orange', 5), array('green', 6)); I want to add the new value to the existing matching array element, so I end up

Re: [PHP] Simple array problem

2008-07-01 Thread Roberto Costumero Moreno
I think the problem is easier... and also the solutions doing a for instead of foreach are not good solutions because if the array is not index-consecutive the loop fails. So, if you has an array with the colors as indexes and the integer value X as the value for that position of the array,

Re: [PHP] unset in foreach breaks recrusion

2008-07-01 Thread Roberto Costumero Moreno
That's true. My fault. I forgot the recrusion call ;-) I think that is the better solution so far, and it is far far away (better) that the one you posted at first On 01/07/2008, David Sky [EMAIL PROTECTED] wrote: Hey, Can't use your example, as you check weather $sorted is empty, if it is

RE: [PHP] Re: can you give me example of website using postgresql database?

2008-07-01 Thread Will Fitch
Then in that case I agree. I develop an inherited, large-scale, in-house system that utilizes PostgreSQL. It does the job, but I can't wait until I get the time to convert it to MySQL. As with any RDMS, Postgres has its advantages: controlling sequences, aggregates, custom operators, custom

Re: [PHP] can you give me example of website using postgresql database?

2008-07-01 Thread Lester Caine
Will Fitch wrote: The purchase of MySQL by Sun should actually give you more comfort. They will be able to attach more money and developers to the project. Remember, the advantage of open-source is not just that it's free, but that you may freely modify it for your purpose (keeping in mind the

Re: [PHP] Simple array problem

2008-07-01 Thread tedd
At 1:50 PM +0100 7/1/08, Richard Heyes wrote: Small correction: Which is...? -- Richard Heyes You missed it a second time? :-) It's not, new_array[], but new_value[]. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing

RE: [PHP] can you give me example of website using postgresql database?

2008-07-01 Thread Will Fitch
Assuming that a system should switch RDBMSs is a waste of time without knowing the reason is asinine. Using NDB clustering is a primary reason for switching. PostgreSQL is only currently PLANNING built-in replication, much less clustering. Not to mention that the existing system is not taking

Re: [PHP] unset in foreach breaks recrusion

2008-07-01 Thread Jim Lucas
David Sky wrote: Hey, Can't use your example, as you check weather $sorted is empty, if it is - run the foreach and return, but on next recursion when it's not empty - do nothing :) Though I found how to cut a few seconds (on very big array), removing the first if, and adding a $return=true to

Re: [PHP] Simple array problem

2008-07-01 Thread Jim Lucas
Roberto Costumero Moreno wrote: I think the problem is easier... and also the solutions doing a for instead of foreach are not good solutions because if the array is not index-consecutive the loop fails. So, if you has an array with the colors as indexes and the integer value X as the value for

Re: [PHP] Simple array problem

2008-07-01 Thread Richard Heyes
You missed it a second time? :-) My sight is awful - if you don't point it out, chances are I won't see it. -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] unset in foreach breaks recrusion

2008-07-01 Thread David Sky
Jim, Read the first emails, your idea was my initial design, eg. $sorted= array(); recrusion($array, $sorted); var_dump( $sorted ); It's not a nice solution due to a need to create variable before the call. Using my final function it will return sorted array into new variable eg $sorted =

Re: [PHP] can you give me example of website using postgresql database?

2008-07-01 Thread Lester Caine
Will Fitch wrote: Assuming that a system should switch RDBMSs is a waste of time without knowing the reason is asinine. Using NDB clustering is a primary reason for switching. PostgreSQL is only currently PLANNING built-in replication, much less clustering. Not to mention that the existing

[PHP] V4 Vs V5 Issue

2008-07-01 Thread Neil
Hi First Post here, I hope this is the right place for this post. This is probably not a php problem, I think it may a configuration issue, but sorry I just dont know where to look I have a V4 site the calls an on line editor and part of the process is by window.onload. If I had to explain

RE: [PHP] can you give me example of website using postgresql database?

2008-07-01 Thread Will Fitch
Touché, salesman. -Original Message- From: Lester Caine [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 10:21 AM To: php-general@lists.php.net Subject: Re: [PHP] can you give me example of website using postgresql database? Will Fitch wrote: Assuming that a system should switch

Re: [PHP] V4 Vs V5 Issue

2008-07-01 Thread Wolf
Neil [EMAIL PROTECTED] wrote: Hi First Post here, I hope this is the right place for this post. This is probably not a php problem, I think it may a configuration issue, but sorry I just dont know where to look Configuration issue of what? I have a V4 site the calls an on

Re: [PHP] V4 Vs V5 Issue

2008-07-01 Thread Eric Butera
On Tue, Jul 1, 2008 at 11:27 AM, Neil [EMAIL PROTECTED] wrote: Hi First Post here, I hope this is the right place for this post. This is probably not a php problem, I think it may a configuration issue, but sorry I just dont know where to look I have a V4 site the calls an on line editor

Re: [PHP] V4 Vs V5 Issue

2008-07-01 Thread Neil
Thanks Wolf I have replied to all, I hope that is the correct way here. A configuration issue on the PHP V5 Server . thats my problem, I dont know where I should be looking. The source code, php and JS is absolutely identical on both machines. Cheers Neil At 01:36 AM 2/07/2008,

Re: [PHP] V4 Vs V5 Issue

2008-07-01 Thread Neil
Hi Thanks I have tested the path, that works fine. I set up a dummy file on the same path just to check that, it found that and printed out some echo'd text from that file. I can see the content of core_js.php file in the the IE view source view. At 01:43 AM 2/07/2008, Eric Butera wrote:

Re: [PHP] Simple array problem

2008-07-01 Thread tedd
At 3:44 PM +0100 7/1/08, Richard Heyes wrote: You missed it a second time? :-) My sight is awful - if you don't point it out, chances are I won't see it. -- Richard Heyes I'm just as bad, I only saw the error after I tried to get your code to run. I thought I had another way, but your's

[PHP] Execute command line as a different user

2008-07-01 Thread Matt palermo
My PHP is running as a user with limited rights. I'd like to execute a command line as a different user. I'm trying to delete a file and the PHP user doesn't have access to do this. I know the username and password for the admin user that has rights to delete a file. Is there a command I

Re: [PHP] Execute command line as a different user

2008-07-01 Thread Dan Joseph
On Tue, Jul 1, 2008 at 1:17 PM, Matt palermo [EMAIL PROTECTED] wrote: My PHP is running as a user with limited rights. I'd like to execute a command line as a different user. I'm trying to delete a file and the PHP user doesn't have access to do this. I know the username and password for

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Shawn McKenzie
Matt palermo wrote: My PHP is running as a user with limited rights. I'd like to execute a command line as a different user. I'm trying to delete a file and the PHP user doesn't have access to do this. I know the username and password for the admin user that has rights to delete a file. Is

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Matt Palermo
Okay, I'll have to look into that. I have very limited knowledge with shell scripts. You wouldn't have an example of one that can do what I need do you? Thanks, Matt Shawn McKenzie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Matt palermo wrote: My PHP is running as a user

Re: [PHP] Strategy to protect images

2008-07-01 Thread Børge Holen
On Tuesday 01 July 2008 13:34:28 Nitsan Bin-Nun wrote: Umm have you ever thought about watermark-ing it? (In case its not a part of your website or something..) heh, this dude got way to much time on his hands... ;D On 01/07/2008, Stefano Esposito [EMAIL PROTECTED] wrote: On Sun, 15 Jun

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Shawn McKenzie
Shawn McKenzie wrote: Matt palermo wrote: My PHP is running as a user with limited rights. I'd like to execute a command line as a different user. I'm trying to delete a file and the PHP user doesn't have access to do this. I know the username and password for the admin user that has

Re: [PHP] Strategy to protect images

2008-07-01 Thread Stefano Esposito
On Tue, 01 Jul 2008 19:59:20 +0200 Børge Holen [EMAIL PROTECTED] wrote: On Tuesday 01 July 2008 13:34:28 Nitsan Bin-Nun wrote: Umm have you ever thought about watermark-ing it? (In case its not a part of your website or something..) heh, this dude got way to much time on his hands... ;D

[PHP] Splitting up long URLs

2008-07-01 Thread Brian Dunning
I have a web page that lists most recent comments in a left margin. Sometimes people post long URLs, or even just really really long words, that force that margin to display way too wide, screwing up the page layout. Is there a way to make sure URLs or other text in a string gets split up

Re: [PHP] Splitting up long URLs

2008-07-01 Thread Robert Cummings
On Tue, 2008-07-01 at 13:26 -0700, Brian Dunning wrote: I have a web page that lists most recent comments in a left margin. Sometimes people post long URLs, or even just really really long words, that force that margin to display way too wide, screwing up the page layout. Is there a way

RE: [PHP] Splitting up long URLs

2008-07-01 Thread Boyd, Todd M.
-Original Message- From: Brian Dunning [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 3:27 PM To: php-general@lists.php.net Subject: [PHP] Splitting up long URLs I have a web page that lists most recent comments in a left margin. Sometimes people post long URLs, or even

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Matt Palermo
I'm using the following command and I'm not getting any feedback: exec(echo 'adminPass' | sudo -u adminAccount -S whoami, $f, $r); Both $f and $r don't contain any data. This leads me to believe that the command is not being run for whatever reason. Is there something wrong with this

[PHP] Re: Execute command line as a different user

2008-07-01 Thread Jon Drukman
Matt Palermo wrote: I'm using the following command and I'm not getting any feedback: exec(echo 'adminPass' | sudo -u adminAccount -S whoami, $f, $r); Both $f and $r don't contain any data. This leads me to believe that the command is not being run for whatever reason. Is there something

[PHP] Re: V4 Vs V5 Issue

2008-07-01 Thread Jon Drukman
Neil wrote: Hi Thanks I have tested the path, that works fine. I set up a dummy file on the same path just to check that, it found that and printed out some echo'd text from that file. I can see the content of core_js.php file in the the IE view source view. debugging javascript in IE

Re: [PHP] CURL de-bugging: So why am I not getting the results page on the target site?

2008-07-01 Thread ioannes
I didn't get any brave response on this, but given the other thread on 'encription' I was wondering could anyone decrypt the __VIEWSTATE string at the end of this message. It is part of the input page whose results page I am trying to retrieve back onto my server for further php work. I

Re: [PHP] Splitting up long URLs

2008-07-01 Thread Nate Tallman
If you want to do it on the php side, I would do something like this: a href=$fullURLsubstr($fullURL, 0, 9)/a It would provide a valid link using the full url, but chop off everything after the 10th character and replace with a Nate On Tue, Jul 1, 2008 at 3:45 PM, Boyd, Todd M. [EMAIL

[PHP] FIFO files on PHP?

2008-07-01 Thread Waynn Lue
I'm trying to build a queue out using FIFO files (someone on the MySQL list suggested checking them out instead of using the database), but I'm running into a problem because of the synchronous fwrite call. Here's the code: $fifoFile = '/tmp/fifo'; if (!file_exists($fifoFile)) {

Re: [PHP] Re: V4 Vs V5 Issue

2008-07-01 Thread Neil
Hi Unfortunately this editor does not run in any other browsers. however I do not believe that it is the java script that is the problem because it runs and works and has done so for years on the current and earlier V4 servers. Cheers Neil At 07:10 AM 2/07/2008, Jon Drukman wrote: Neil

Re: [PHP] V4 Vs V5 Issue

2008-07-01 Thread Jim Lucas
Neil wrote: Hi First Post here, I hope this is the right place for this post. This is probably not a php problem, I think it may a configuration issue, but sorry I just dont know where to look I have a V4 site the calls an on line editor and part of the process is by window.onload. If I

Re: [PHP] Re: V4 Vs V5 Issue

2008-07-01 Thread Chris
Neil wrote: Hi Unfortunately this editor does not run in any other browsers. however I do not believe that it is the java script that is the problem because it runs and works and has done so for years on the current and earlier V4 servers.

Re: [PHP] can you give me example of website using postgresql database?

2008-07-01 Thread paragasu
i agree, salesman can make a lot of difference influence costumer. sometimes they are really a headache because salesman not really a technical person and know nothing about technical info. always suggesting something complicated and irrelevant feature to costumer. wtf On 7/1/08, Will Fitch

[PHP] Re: FIFO files on PHP?

2008-07-01 Thread Al
Why not simply maintain an array as a file. $fifoArray= unserialize(file_get_contents($fifoFile)); $oldValue= array_pop($fifoArray);//To pop off old value array_unshift($fifoArray, $newValue);//To push in new value $fifoStr= serialize($fifoArray); file_put_contents($fifoArray, $fifoStr,

Re: [PHP] V4 Vs V5 Issue

2008-07-01 Thread Neil
Thanks Jim Two things come to mind. 1) Is their any PHP inside you javascript file that needs to be parsed? And if so, is the new V5 install configured in such a way that it parses/processes javascript files? where the old install was processing javascript files. This would be a

[PHP] PHP-CLI and the less command (kubuntu)

2008-07-01 Thread Mattias Thorslund
Hi everyone, I have a CLI application that produces lots of output to the terminal, so I like to send the output along to the less command. This has always worked very nicely. Moving to the top or bottom of the output used to require just hitting the home or end key, and the up and down

Re: [PHP] Strategy to protect images

2008-07-01 Thread Bastien Koert
On Tue, Jul 1, 2008 at 2:16 PM, Stefano Esposito [EMAIL PROTECTED] wrote: On Tue, 01 Jul 2008 19:59:20 +0200 Børge Holen [EMAIL PROTECTED] wrote: On Tuesday 01 July 2008 13:34:28 Nitsan Bin-Nun wrote: Umm have you ever thought about watermark-ing it? (In case its not a part of your

Re: [PHP] CURL de-bugging: So why am I not getting the results page on the target site?

2008-07-01 Thread Chris
ioannes wrote: I didn't get any brave response on this, but given the other thread on 'encription' I was wondering could anyone decrypt the __VIEWSTATE string at the end of this message. It is part of the input page whose results page I am trying to retrieve back onto my server for further

Re: [PHP] CURL de-bugging: So why am I not getting the results page on the target site?

2008-07-01 Thread Chris
Chris wrote: ioannes wrote: I didn't get any brave response on this, but given the other thread on 'encription' I was wondering could anyone decrypt the __VIEWSTATE string at the end of this message. It is part of the input page whose results page I am trying to retrieve back onto my server

Re: [PHP] CURL de-bugging: So why am I not getting the results page on the target site?

2008-07-01 Thread Andrew Ballard
On Tue, Jul 1, 2008 at 5:23 PM, ioannes [EMAIL PROTECTED] wrote: I didn't get any brave response on this, but given the other thread on 'encription' I was wondering could anyone decrypt the __VIEWSTATE string at the end of this message. It is part of the input page whose results page I am

Re: [PHP] V4 Vs V5 Issue

2008-07-01 Thread Neil
Thanks Jim Will add some more to this. The PHP that is parsed inside this file and the JS is I think working correctly because the values are populated in the JavaScript output that is being displayed in the IE source viewer. For instance there is a stack of variable that are defined up