php-general Digest 11 Jun 2010 07:22:56 -0000 Issue 6792

2010-06-11 Thread php-general-digest-help

php-general Digest 11 Jun 2010 07:22:56 - Issue 6792

Topics (messages 306011 through 306034):

Re: Redirect to
306011 by: Daniel P. Brown
306012 by: Ashley Sheridan
306018 by: Ahmed Mohsen

bug in mkdir?
306013 by: Mike Wright
306014 by: Ashley Sheridan

Re: bug in mkdir? [SOLVED]
306015 by: Mike Wright

Re: Question - foreach.
306016 by: Paul M Foster
306017 by: Bob McConnell
306031 by: David McGlone

Brandon Rampersad wants to chat
306019 by: Brandon Rampersad
306020 by: Ashley Sheridan

is --- Begin Message ---
On Thu, Jun 10, 2010 at 14:06, Ahmed Mohsen  wrote:
[snip!]
>
> I don't want to enter (example.com/public) to view index.php file.  I just
> want to enter (example.com) and it redirects to the public folder and shows
> only (example.com/index.php) in the URL.  And for login.php should display
> (example.com/admin/login.php) not (example.com/public/admin/login.php)

That's an HTTP server configuration.  For example, with Apache,
you should look at the DocumentRoot setting.

-- 

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
We now offer SAME-DAY SETUP on a new line of servers!
--- End Message ---
--- Begin Message ---
On Thu, 2010-06-10 at 21:06 +0300, Ahmed Mohsen wrote:

> Hi folks,
> I know that this is not a php question, but I'm sure it some kind 
> related to it.  I need to put my public files under "public" folder, and 
> other includes files and database config in other folder not shown to 
> the public, but i don't know how to do that. I hope if some one show me 
> how to achieve this.
> 
> For example, this is the directory structure:
> 
> /root
> --/includes
> db.php
> config.php
> 
> --/public
> /index.php
> /images
> /admin
> --/login.php
> 
> 
> 
> I don't want to enter (example.com/public) to view index.php file.  I 
> just want to enter (example.com) and it redirects to the public folder 
> and shows only (example.com/index.php) in the URL.  And for login.php 
> should display (example.com/admin/login.php) not 
> (example.com/public/admin/login.php)
> 
> Kind regards,
> Ahmed.
> 


If /public is your web root, then alter your virtual hosts file to
reflect this, so that it is the one that is used as the web root.

If /public is not your web root, then you could consider using
mod_rewrite() to internally redirect the content the visitors see,
without them actually knowing about it.

Thanks,
Ash
http://www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---

Thanks for help.
--- End Message ---
--- Begin Message ---

Hi all,

Using 5.2.9

I'm trying to create a directory but it is being created with incorrect 
permissions.  I'm following the online manual.


This is the command being used:

mkdir('/srv/www/domain/data/R1276190214358/thumbs', 0770, true);

This is what is created:

drwxr-x--- 2 apache apache 4096 2010-06-10 10:33 R1276190214358

Isn't that supposed to be 0770 instead of 0750?  Either the manual is 
wrong, the command is broken, or I'm screwing it up (most likely).


Thanks for any help,
Mike Wright
--- End Message ---
--- Begin Message ---
On Thu, 2010-06-10 at 11:32 -0700, Mike Wright wrote:

> Hi all,
> 
> Using 5.2.9
> 
> I'm trying to create a directory but it is being created with incorrect 
> permissions.  I'm following the online manual.
> 
> This is the command being used:
> 
>  mkdir('/srv/www/domain/data/R1276190214358/thumbs', 0770, true);
> 
> This is what is created:
> 
>  drwxr-x--- 2 apache apache 4096 2010-06-10 10:33 R1276190214358
> 
> Isn't that supposed to be 0770 instead of 0750?  Either the manual is 
> wrong, the command is broken, or I'm screwing it up (most likely).
> 
> Thanks for any help,
> Mike Wright
> 

Did the R1276190214358 directory already exist? If so, it will retain
the permissions it had, and only the thumbs sub-directory within it will
have the new permissions.

Also, is this on a shared hosting server? It could be that a security
restriction in-place is not allowing the permissions to be configured as
the directory is written, and you may have to manually update them with
the chmod() function.

Thanks,
Ash
http://www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---

Ashley Sheridan wrote:

On Thu, 2010-06-10 at 11:32 -0700, Mike Wright wrote:


Hi all,

Using 5.2.9

I'm trying to create a directory but it is being created with incorrect 
permissions.  I'm following the online manual.


This is the command being used:

 mkdir('/srv/www/domain/data/R1276190214358/thumbs', 0770, true);

This is what is created:

 drwxr-x--- 2 apache apache 4096 2010-06-10 10:33 R1276190214358

Isn't that supposed to be 0770 instead of 0750?  Either the manual is 
wrong, the command is broken, or I'm screwing it up (most likely).


Thanks for any help,
Mike Wright





Hi, Ash.  Thanks for the help.


Did the R1276190214358 di

php-general Digest 11 Jun 2010 19:31:21 -0000 Issue 6793

2010-06-11 Thread php-general-digest-help

php-general Digest 11 Jun 2010 19:31:21 - Issue 6793

Topics (messages 306035 through 306054):

configure php 5.2.12 with-pdflib failes after upgrade from php 5.2.9
306035 by: Merlin Morgenstern
306045 by: Thijs Lensselink

Re: How does php server identify that the particular session belongs to 
particular user
306036 by: Boris SABATIER
306037 by: Ashley Sheridan
306038 by: Ashley Sheridan
306046 by: Shreyas
306047 by: Ashley Sheridan
306052 by: Shreyas

include and include_once inheritance
306039 by: David Mehler
306040 by: Ashley Sheridan
306043 by: Richard Quadling
306044 by: Richard Quadling

connect openLDAP server using LDAP (apache + windows)
306041 by: Jérémy ESCOLANO

Using LDAPS with PHP / certificates
306042 by: Jérémy ESCOLANO

Re: is --- Begin Message ---

Hi there,

I had a working version 5.2.9 running on my suse system. Then I upgraded 
to 5.2.12 with the same configure command. Unfortunatelly I lost pdf 
creation now.


Here is what the configure output says:


Notice: Following unknown configure options were used:
--with-pdflib=/usr/local/lib
Check './configure --help' for available options

The command seems correct and used to work on .9

Does somebody know how I could fix that?

Thank you for any help!

Merlin
--- End Message ---
--- Begin Message ---
On Fri, 11 Jun 2010 09:24:09 +0200, Merlin Morgenstern
 wrote:
> Hi there,
> 
> I had a working version 5.2.9 running on my suse system. Then I upgraded

> to 5.2.12 with the same configure command. Unfortunatelly I lost pdf 
> creation now.
> 
> Here is what the configure output says:
> 
> 
> Notice: Following unknown configure options were used:
> --with-pdflib=/usr/local/lib
> Check './configure --help' for available options

pdflib has been removed from the core and is now available on pecl.php.net

> 
> The command seems correct and used to work on .9
> 
> Does somebody know how I could fix that?
> 
> Thank you for any help!
> 
> Merlin
--- End Message ---
--- Begin Message ---
Hi

A cookie with the session_id are send to the client.

Bo.


2010/6/11 Peter 

> Hi All,
>
> My Question is "How does php server identify that the particular session
> belongs to particular user?"
>
> Please help me out
>
> Regards
> Peter.m
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Fri, 2010-06-11 at 13:01 +0530, Peter wrote:

> Hi All,
> 
> My Question is "How does php server identify that the particular session 
> belongs to particular user?"
> 
> Please help me out
> 
> Regards
> Peter.m
> 


All the session data is stored on the server either in a database, file
or memory against a unique ID value. The server handles how this is
done, and it's likely you won't ever need to get involved with changing
how it does things.

>From the client-side of things; the user agent (browser) sends this
unique ID either as part of the URL or with the headers as a post
variable, which is why you may see a PHP_SESSION_ID (or something
similar) index in the $_REQUEST array when you use session_start() in
your scripts.

Has this helped?

Thanks,
Ash
http://www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
On Fri, 2010-06-11 at 15:13 +0530, Peter wrote:

> Hi Ashley,
> 
> Thanks for your answer.
> 
> When too many users log in at the same time, the server gets loaded
> with multiple sessions  files that leads to complexity and crashes the
> server. In such cases how do we handle this ?
> 
> Thanks in advance
> 
> Peter
> 
> 
> Ashley Sheridan wrote: 
> 
> > On Fri, 2010-06-11 at 13:01 +0530, Peter wrote:
> > 
> >   
> > 
> > > Hi All,
> > > 
> > > My Question is "How does php server identify that the particular session 
> > > belongs to particular user?"
> > > 
> > > Please help me out
> > > 
> > > Regards
> > > Peter.m
> > > 
> > > 
> > 
> > 
> > 
> > All the session data is stored on the server either in a database, file
> > or memory against a unique ID value. The server handles how this is
> > done, and it's likely you won't ever need to get involved with changing
> > how it does things.
> > 
> > >From the client-side of things; the user agent (browser) sends this
> > unique ID either as part of the URL or with the headers as a post
> > variable, which is why you may see a PHP_SESSION_ID (or something
> > similar) index in the $_REQUEST array when you use session_start() in
> > your scripts.
> > 
> > Has this helped?
> > 
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> > 
> > 
> > 
> >   


I don't think it's the sessions that are crashing your server, it's more
than likely something else. What is the server load when you notice the
crashes? How many people are visiting your site simultaneously at that
point?

Thanks,
Ash
http://www.ashleysheridan.co.uk


--- End Message ---
--- Begin Message ---
I agree wi