Re: [PHP] Path question

2011-03-28 Thread Paul M Foster
On Mon, Mar 28, 2011 at 09:18:39PM -0400, Jack wrote: > Hello All, > > > > Is there a smarter way to do includes by setting up a path or something > where I don't have to include /home/domain.com/includes/include_file.php > > Apparently my path is as shown above, but I would prefer to just p

Re: [PHP] Permission Denied - Help Requested

2011-03-28 Thread Ethan Rosenberg
At 11:14 PM 3/28/2011, Adam Richardson wrote: On Mon, Mar 28, 2011 at 11:03 PM, Ethan Rosenberg <eth...@earthlink.net> wrote: At 01:32 AM 3/28/2011, Hans Åhlin wrote: Do you have SELinux installed? 2011/3/28 Ethan Rosenberg <eth...@eart

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 5:14 PM, Curtis Maurand wrote: > > > Nathan Nobbe wrote: > > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > > > >> If you need high performance you probably already know that it will be > >> very > >> expensive CPU wise if workers are spawned on each request. If

Re: [PHP] Permission Denied - Help Requested

2011-03-28 Thread Adam Richardson
On Mon, Mar 28, 2011 at 11:03 PM, Ethan Rosenberg wrote: > At 01:32 AM 3/28/2011, Hans Ã…hlin wrote: > >> Do you have SELinux installed? >> >> 2011/3/28 Ethan Rosenberg : >> > Dear List - >> > >> > Thanks for all your help in the past. Â Here is another one... >> > >> > I am getting a Permission D

Re: [PHP] Permission Denied - Help Requested

2011-03-28 Thread Ethan Rosenberg
At 01:32 AM 3/28/2011, Hans Åhlin wrote: Do you have SELinux installed? 2011/3/28 Ethan Rosenberg : > Dear List - > > Thanks for all your help in the past.  Here is another one... > > I am getting a Permission Denied" message when I try to run a PHP script.  I > just changed the mode on the

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Curtis Maurand
I have a machine with several websites one of which is quite busy this time of year.  I have another that had its joomla comments on and open and the spammers found it.  They managed to get 700,000 comments into the system before we caught it, but the traffic and strain on the MySQL server and t

Re: [PHP] Resizing an image

2011-03-28 Thread Donovan Brooke
Andre Polykanine wrote: Hi everyone, Image processing is a part of Php language completely unknown to me :-(. So there is my task: I need to process an uploaded image. We allow uploading of gif, jpeg, and png images. If an image is wider than 600px, it should be proportionally resized

[PHP] Path question

2011-03-28 Thread Jack
Hello All, Is there a smarter way to do includes by setting up a path or something where I don't have to include /home/domain.com/includes/include_file.php Apparently my path is as shown above, but I would prefer to just put in /includes/include_file.php Thanks! Jack

[PHP] Resizing an image

2011-03-28 Thread Andre Polykanine
Hi everyone, Image processing is a part of Php language completely unknown to me :-(. So there is my task: I need to process an uploaded image. We allow uploading of gif, jpeg, and png images. If an image is wider than 600px, it should be proportionally resized to the width of 600px. Ye

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
"It works pretty well until its under attack by the spammers." Can you elaborate/explain further? b. On 29 March 2011 01:14, Curtis Maurand wrote: > > > Nathan Nobbe wrote: > > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > > > >> If you need high performance you probably already k

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Bostjan Skufca
Seems like session file locking did not work before :) b. On 29 March 2011 01:00, Rob Adams wrote: > From: "Bostjan Skufca" > >When you say you "installed php 5.3.x and then reverted to 5.2", did you > reinstall/upgrade OS and/or >kernel too? > > Yes. The old servers were running some versio

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Curtis Maurand
Nathan Nobbe wrote: > On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > >> If you need high performance you probably already know that it will be >> very >> expensive CPU wise if workers are spawned on each request. If you don't, >> I >> would not bother with daemon and just use xinetd

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Rob Adams
From: "Bostjan Skufca" >When you say you "installed php 5.3.x and then reverted to 5.2", did you >reinstall/upgrade OS and/or >kernel too? Yes. The old servers were running some version of FreeBSD. The new server is running CentOS 5.5. -- Rob -- PHP General Mailing List (http://www.ph

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 3:34 PM, Bostjan Skufca wrote: > If you need high performance you probably already know that it will be very > expensive CPU wise if workers are spawned on each request. If you don't, I > would not bother with daemon and just use xinetd. You can always add > daemon-handlin

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Bostjan Skufca
When you say you "installed php 5.3.x and then reverted to 5.2", did you reinstall/upgrade OS and/or kernel too? b. On 28 March 2011 23:40, Bostjan Skufca wrote: > Great, please report back if/when you discover the cause. > > Meanwhile doing "man 2 flock" yields info about ENOLCK: "The kernel

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Bostjan Skufca
Great, please report back if/when you discover the cause. Meanwhile doing "man 2 flock" yields info about ENOLCK: "The kernel ran out of memory for allocating lock records." This concerns your new server. The old one does not support locking, or so it seems (EOPNOTSUPP). b. On 28 March 2011 23:

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
If you need high performance you probably already know that it will be very expensive CPU wise if workers are spawned on each request. If you don't, I would not bother with daemon and just use xinetd. You can always add daemon-handling stuff later on. Well I do hope you find a good working solutio

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Rob Adams
Bostjan, Thanks again for the tip. At this point, it looks like there is an issue with my main file server. It's weird that the older servers were working with it fine though (by instantly failing on lock), so I originally thought it might be a php issue. I think I'm making progress on it

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
On Mon, Mar 28, 2011 at 12:38 PM, Bostjan Skufca wrote: > Xinetd will definitely be faster way than coding your daemon in PHP. > In this case: > You have to consider many other things as well: > - do your worker processes run under various UIDs (do they do > setuid/setgid)? > no > - do your w

Re: [PHP] xinetd vs php socket server

2011-03-28 Thread Bostjan Skufca
Xinetd will definitely be faster way than coding your daemon in PHP. You have to consider many other things as well: - do your worker processes run under various UIDs (do they do setuid/setgid)? - do your workers die after processing each request/client or do they process multiple connections? - d

Re: [PHP] Re: Slow sessions.

2011-03-28 Thread Rob Adams
On 3/26/2011 11:07 AM, Bostjan Skufca wrote: Can you strace it's execution and see where your delay is comming from? If you are using apache, make it create just one child and strace that one when you generate a request. Thanks for the advice. I installed strace on the new server, and it has

Re: [PHP] Permission Denied

2011-03-28 Thread Ethan Rosenberg
At 01:32 AM 3/28/2011, Hans Åhlin wrote: Do you have SELinux installed? 2011/3/28 Ethan Rosenberg : > Dear List - > > Thanks for all your help in the past.  Here is another one... > > I am getting a Permission Denied" message when I try to run a PHP script.  I > just changed the mode on the

[PHP] xinetd vs php socket server

2011-03-28 Thread Nathan Nobbe
Hi, I'd like to bat around some pros / cons of selecting xinetd to implement a socket server. From my perspective the list is something like this: xinetd pros . no need to rewrite forking functionality, 'server' can be written as simple php script . forking potentially faster than php-based im

Re: [PHP] opening a new window from php script

2011-03-28 Thread Ashley Sheridan
On Mon, 2011-03-28 at 17:44 +0200, Grega Leskovšek wrote: > I would still like to offer in my CMS to be able to choose in which > browser I want to display the current page. Is this possible or I in > program can open only default browser? Can I at least choose wheter to > open a new tab or a new

RE: [PHP] Opensuse 11.4 - PHP returned as text?

2011-03-28 Thread HallMarc Websites
> Thanks for your interest. > Here is my complete test php file: > > echo "crash test"; > $cont = " type='submit' name='button' value='submit' /> "; echo $cont; echo > "ended"; ?> > > Running this file produces the form correctly at first. Then click submit and > the response of the server is t

Re: [PHP] opening a new window from php script

2011-03-28 Thread Grega Leskovšek
I would still like to offer in my CMS to be able to choose in which browser I want to display the current page. Is this possible or I in program can open only default browser? Can I at least choose wheter to open a new tab or a new window? Thanks in advance, -- When the sun rises I receive and whe

[PHP] Re: [PHP-WIN] Re: [PHP] Which versions of Apache will PHP 5.3.6 work with??

2011-03-28 Thread Curtis Tammany
I had allways used PHP as an Apache module up intil now. They seem incompatible. I reinstalled PHP as a CGI binary. PHP inserts the following: #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL ScriptAlias /php/ "C:/Program Files/PHP536/" Action application/x-httpd-php "C:/Program Files/PHP536

RE: [PHP] Opensuse 11.4 - PHP returned as text?

2011-03-28 Thread Colin Beckingham
HallMarc Websites wrote: >> I'm trying to debug an issue which I think is more to do with Apache than >> PHP, but perhaps someone else has experience with this. Using opensuse >> 11.4, custom compile of kernel 2.6.38, custom compile of Apache httpd >> 2.2.17, and PHP 3.3.6. phpinfo() page works

Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Ashley Sheridan
On Mon, 2011-03-28 at 18:18 +0430, Negin Nickparsa wrote: > storing what in db? > my codes was abt to store the file when uploading what is the difference > can i give me in an example? When you copy the file use code like: move_uploaded_file($_FILES['image']['tmp_name'], $_FILES['image']['tmp_

RE: [PHP] Opensuse 11.4 - PHP returned as text?

2011-03-28 Thread HallMarc Websites
> I'm trying to debug an issue which I think is more to do with Apache than > PHP, but perhaps someone else has experience with this. Using opensuse > 11.4, custom compile of kernel 2.6.38, custom compile of Apache httpd > 2.2.17, and PHP 3.3.6. phpinfo() page works correctly so my httpd.conf is >

Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Negin Nickparsa
storing what in db? my codes was abt to store the file when uploading what is the difference can i give me in an example?

Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Negin Nickparsa
i got it but i didn't understand what to do exactly uploading a file in a folder is easy for me than what i must do in db?

Re: [PHP] session variable problem

2011-03-28 Thread Negin Nickparsa
call session_destroy(); then start the session again

Re: [PHP] session variable problem

2011-03-28 Thread markb
On 3/25/2011 3:55 PM, Peter Lind wrote: More info (including some code) would be needed to get to the bottom of this, I'd say. Hard to diagnose what's happening otherwise. Regards Peter So I guess there is no list of things to check for sessions? I'll try to pair down the code to something

[PHP] Opensuse 11.4 - PHP returned as text?

2011-03-28 Thread Colin Beckingham
I'm trying to debug an issue which I think is more to do with Apache than PHP, but perhaps someone else has experience with this. Using opensuse 11.4, custom compile of kernel 2.6.38, custom compile of Apache httpd 2.2.17, and PHP 3.3.6. phpinfo() page works correctly so my httpd.conf is config

Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Bastien
On 2011-03-28, at 3:37 AM, Negin Nickparsa wrote: > i want each user having more than one file like us in the inbox of our mails > i want to store files n then they can access each one. It's certainly possible, but as others have said, use the db to store the list of files and use the filesys

Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Ashley Sheridan
"Negin Nickparsa" wrote: >i want each user having more than one file like us in the inbox of our >mails >i want to store files n then they can access each one. Then do what I suggested and store the file under the temporary name its given when it gets uploaded to the temp directory. Use the db

Re: [PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Negin Nickparsa
i want each user having more than one file like us in the inbox of our mails i want to store files n then they can access each one.

[PHP] Re: is there any syntax to save a file in mysql?

2011-03-28 Thread Geoff Lane
On Monday, March 28, 2011, Negin Nickparsa wrote: > ... i want every user to have his/her own files in their account. (i > used session for them) n now i want them to have their specific > files then i think i must have db that store the files n user can > retrieve his/hers not just details if i j