php-general Digest 28 Feb 2004 21:58:44 -0000 Issue 2617

Topics (messages 179059 through 179093):

Re: Text cleaning?
        179059 by: Karl Timmermann
        179063 by: Brian V Bonini
        179066 by: Jason Wong

PHP to UML ?
        179060 by: Rick \[Kitty5\]

- Receive mail with PHP.
        179061 by: francesco.automationsoft.biz
        179065 by: Raditha Dissanayake

UML from PHP?
        179062 by: Rick \[Kitty5\]

Re: What's your favorite PHP weather code?
        179064 by: Lowell Allen

Re: PHP5 only configures mysql 4.1 source with mysqli
        179067 by: Raditha Dissanayake
        179072 by: electroteque

php crash and memory_limit
        179068 by: kringla
        179084 by: Rasmus Lerdorf
        179089 by: kringla

Compare timestamps?
        179069 by: Brian Dunning
        179083 by: Rasmus Lerdorf

Problem With Session Handling
        179070 by: Kyndig
        179080 by: Rasmus Lerdorf
        179081 by: Rasmus Lerdorf
        179082 by: Rasmus Lerdorf
        179085 by: Kyndig
        179086 by: Rasmus Lerdorf

Allow service to interact with desktop and have network access
        179071 by: Vincent Bouret

mkdir and  rmdir possible but not readdir and opendir???
        179073 by: raisinlove
        179074 by: raisinlove
        179075 by: Jason Wong
        179077 by: Rasmus Lerdorf

flock problem
        179076 by: Armand Turpel
        179078 by: Rasmus Lerdorf
        179079 by: Armand Turpel

between timestamps
        179087 by: Ryan A
        179090 by: Robert Cummings

Set Library Path
        179088 by: Mike Mapsnac

creating file links on linux (ln) with php
        179091 by: Merlin

Re: [PHP-DEV] PHP5: Class behavior: method overloading
        179092 by: Cristiano Duarte

2 OOP or Not 2 OOP
        179093 by: Monty

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- Like if the sentence is split.

Thanks


On Feb 28, 2004, at 1:34 AM, Jason Wong wrote:

On Saturday 28 February 2004 16:15, Karl Timmermann wrote:
Opps, I failed to mention there can be more paragraphs with legit new
lines, like:

Hello, my name is Karl.
Hello, my name
is Dave.
This is some more example text.

Yes, this is yet some more.

So what is your criteria for "incorrect carriage returns" ?

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
The PILLSBURY DOUGHBOY is CRYING for an END to BURT REYNOLDS movies!!
*/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
On Sat, 2004-02-28 at 00:09, Karl Timmermann wrote:
> Does anyone have some PHP code to remove incorrect carriage returns?
> 

Depends on your definition of "incorrect".

-- 
Brian        GnuPG -> KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
                                          Key Server: pgp.mit.edu
======================================================================
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---
--- Begin Message ---
On Saturday 28 February 2004 18:49, Karl Timmermann wrote:

Please do not top post.

> Like if the sentence is split.

1) define your idea of a sentence
2) construct a suitable regex for use with preg_replace()

If you don't know how to do (2) then at least do (1) and then someone might be 
able to help you do (2).

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
I cannot draw a cart, nor eat dried oats; If it be man's work I will do it.
*/

--- End Message ---
--- Begin Message ---
Is there a linux utility to parse a PHP project and spit out some UML
diagrams?
-- 
Rick

Kitty5 NewMedia http://Kitty5.com
POV-Ray News & Resources http://Povray.co.uk
TEL : (+44) 0845 1083740 - ICQ : 15776037

PGP Public Key : http://pgp.kitty5.com

--- End Message ---
--- Begin Message ---
Hi all,
i've two questions today: 
1- it's possible to receive mail with PHP?
    There's in PHP a function (like mail()) for receive mail?
2- These's a tool for convet code in ASP in code in PHP?

Thanks in advance for help.
Frank
[EMAIL PROTECTED]
A&S Automation & Software - only solution 

--- End Message ---
--- Begin Message ---
1) you need a mail server to recieve mail.
2) asp2php


[EMAIL PROTECTED] wrote:

Hi all,
i've two questions today: 1- it's possible to receive mail with PHP?
There's in PHP a function (like mail()) for receive mail?
2- These's a tool for convet code in ASP in code in PHP?

Thanks in advance for help.
Frank
[EMAIL PROTECTED]
A&S Automation & Software - only solution



--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.

--- End Message ---
--- Begin Message ---
Is there a utility I can point at a PHP project and have it draw lots of
nice UML doodles for me?

-- 
Rick

Kitty5 NewMedia http://Kitty5.com
POV-Ray News & Resources http://Povray.co.uk
TEL : (+44) 0845 1083740 - ICQ : 15776037

PGP Public Key : http://pgp.kitty5.com

--- End Message ---
--- Begin Message ---
> I'm looking for some code to get the latest weather and put it on my
> webpage, and have it very customizable. What are your favorites?
> 

I've only tried this one -- found it easy to work with:
<http://www.cruelacid.com/?page=weather>

--
Lowell Allen

--- End Message ---
--- Begin Message --- Hi,
Mysqli installation certainly isn't improved :-) i had a lot of trouble too, and shared my experience online at
http://www.raditha.com/mysql/mysqli.php

hope someone finds it usefull.

electroteque wrote:

Hi i dont know who to tell, please forward it on, I'm running Solaris 9,
PHP5 only seems to configure mysql 4.1 using the mysqli, i tried the binary
distribution and it complained about the wrong library version so i compiled
the source and it was fine. Just letting people know, i also had to do
a --disable-mysql so the full configure was

./configure --with-apxs2=/usr/local/httpd/bin/apxs --without-mysql --with-my
sqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/local/libxml/s
parcv9 --with-zlib-dir=/opt/csw





--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.

--- End Message ---
--- Begin Message ---
Heh i just read the bit about having to change the functions from mysql to
mysqli, now what is someone doesnt use a db wrapper, they'd have a field
day, lucky i use a wrapper heh.


-----Original Message-----
From: Raditha Dissanayake [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 29, 2004 1:21 AM
To: electroteque
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP5 only configures mysql 4.1 source with mysqli


Hi,
Mysqli installation certainly isn't improved :-) i had a lot of trouble
too, and shared my experience online at
http://www.raditha.com/mysql/mysqli.php

hope someone finds it usefull.

electroteque wrote:

>Hi i dont know who to tell, please forward it on, I'm running Solaris 9,
>PHP5 only seems to configure mysql 4.1 using the mysqli, i tried the binary
>distribution and it complained about the wrong library version so i
compiled
>the source and it was fine. Just letting people know, i also had to do
>a --disable-mysql so the full configure was
>
>./configure --with-apxs2=/usr/local/httpd/bin/apxs --without-mysql --with-m
y
>sqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr/local/libxml/
s
>parcv9 --with-zlib-dir=/opt/csw
>
>
>


--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message --- Hi
I'm having a problem with file uploads and freezings of the php-module in apache. Yes I have googled and RTFM:ed but I don't get any good results out from what I have tested so far.

I have set MAX_FILE_SIZE as a hidden value in the form, the value is set to "400000"
I increased 'memory_limit' from 8M to 200M in my home server and it all worked, when I then tested the same thing on the web-hotel I got 'Internal server error 500' and I was unable to access files in the same directory as the problematic page was in. I did it with "ini_set(" in the page.

Since my web-hotel won't change any settings I have to either configure with ini_set or the .htaccess file.
I set LimitRequestBody to 16M in a .htaccess file since many have suggested that this would solve the problem. But not.

I think these variables can be set in .htaccess but I don't get the correct syntax in the file, i'm just getting 'internal server error' all the time.

php_value memory_limit 34M
php_value post_max_size 33M
php_value upload_max_filesize 32M
php_value max_execution_time 600

--- End Message ---
--- Begin Message ---
Which web server and version?

On Sat, 28 Feb 2004, kringla wrote:

> Hi
> I'm having a problem with file uploads and freezings of the php-module
> in apache. Yes I have googled and RTFM:ed but I don't get any good
> results out from what I have tested so far.
>
> I have set MAX_FILE_SIZE as a hidden value in the form, the value is set
> to "400000"
> I increased 'memory_limit' from 8M to 200M in my home server and it all
> worked, when I then tested the same thing on the web-hotel I got
> 'Internal server error 500' and I was unable to access files in the same
> directory as the problematic page was in.  I did it with "ini_set(" in
> the page.
>
> Since my web-hotel won't change any settings I have to either configure
> with ini_set or the .htaccess file.
> I set LimitRequestBody to 16M in a .htaccess file since many have
> suggested that this would solve the problem. But not.
>
> I think these variables can be set in .htaccess but I don't get the
> correct syntax in the file, i'm just getting 'internal server error' all
> the time.
>
> php_value memory_limit 34M
> php_value post_max_size 33M
> php_value upload_max_filesize 32M
> php_value max_execution_time 600
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message --- Rasmus Lerdorf wrote:

Which web server and version?




php: 4.3.4 apache 1.3.27 Linux x 2.4.20aa1 #2 SMP Fri Mar 7 15:07:36 CET 2003 i686 Server API CGI/FastCGI max_execution_time 120 max_input_time -1


'./configure' '--enable-force-cgi-redirect' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-gd' '--with-png' '--enable-bcmath' '--enable-safe-mode' '--enable-track-vars' '--with-pear=/usr/share/pear' '--with-mysql=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-dbx' '--with-zlib' '--enable-fastcgi' '--with-jpeg-dir' '--with-png-dir' '--enable-gd-native-ttf' '--with-gettext' '--enable-discard-path' '--with-freetype-dir'
--- End Message ---
--- Begin Message --- How would I make an if() comparison to check whether the current date/time is later than a timestamp for the database formatted as 20040226085607?

Thanks,

- Brian
--- End Message ---
--- Begin Message ---
if($stamp1 > $stamp2) ...

On Sat, 28 Feb 2004, Brian Dunning wrote:

> How would I make an if() comparison to check whether the current
> date/time is later than a timestamp for the database formatted as
> 20040226085607?
>
> Thanks,
>
> - Brian
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message --- Hi folks,

I've been working on my website for a few years now. It uses SESSION management. I am using: php4.3 version. A problem I have had for awhile now is that all session information is lost if a page does not fully load. This wouldn't be an issue, except on every page load I create a MySQL link id for that page load, and store the object in a SESSION varriable:
$db = new db("mydatabase");
$_SESSION["db"] = $db;


Then throughout the website code, I'll simply call: $q = $_SESSION["db"];
This is causing my pages to fail ( I have the queries wrapped to send users to an error page if there is a DB issue ).

The reason I attempt to store the database object in a SESSION is because there are quite a number of databases in a single page load that can be called. I don't want to spend time opening a new DB connection for every query to the database. A single page load could have up to 15 queries to output the data and use up to 10 different databases (not tables) to produce the output.

Recomendations on how to fix my problem are much appreciated. If more data is needed to assist in debugging, just let me know.

Thank you,
Calvin Ellis
webmaster: http://www.mudmagic.com/

--- End Message ---
--- Begin Message ---
ignore_user_abort = Off

in your php.ini file

And read the Connection Handling chapter in the manual.

-Rasmus

On Sat, 28 Feb 2004, Kyndig wrote:

> Hi folks,
>
>    I've been working on my website for a few years now. It uses SESSION
> management. I am using: php4.3 version. A problem I have had for awhile
> now is that all session information is lost if a page does not fully
> load. This wouldn't be an issue, except on every page load I create a
> MySQL link id for that page load, and store the object in a SESSION
> varriable:
>       $db = new db("mydatabase");
>       $_SESSION["db"] = $db;
>
>
>    Then throughout the website code, I'll simply call:   $q =
> $_SESSION["db"];
> This is causing my pages to fail ( I have the queries wrapped to send
> users to an error page if there is a DB issue ).
>
>    The reason I attempt to store the database object in a SESSION is
> because there are quite a number of databases in a single page load that
> can be called. I don't want to spend time opening a new DB connection
> for every query to the database. A single page load could have up to 15
> queries to output the data and use up to 10 different databases (not
> tables) to produce the output.
>
> Recomendations on how to fix my problem are much appreciated. If more
> data is needed to assist in debugging, just let me know.
>
> Thank you,
> Calvin Ellis
> webmaster: http://www.mudmagic.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Uh, sorry, I meant "ignore_user_abort = On"
These negated ini options suck.

-Rasmus

On Sat, 28 Feb 2004, Rasmus Lerdorf wrote:

> ignore_user_abort = Off
>
> in your php.ini file
>
> And read the Connection Handling chapter in the manual.
>
> -Rasmus
>
> On Sat, 28 Feb 2004, Kyndig wrote:
>
> > Hi folks,
> >
> >    I've been working on my website for a few years now. It uses SESSION
> > management. I am using: php4.3 version. A problem I have had for awhile
> > now is that all session information is lost if a page does not fully
> > load. This wouldn't be an issue, except on every page load I create a
> > MySQL link id for that page load, and store the object in a SESSION
> > varriable:
> >       $db = new db("mydatabase");
> >       $_SESSION["db"] = $db;
> >
> >
> >    Then throughout the website code, I'll simply call:   $q =
> > $_SESSION["db"];
> > This is causing my pages to fail ( I have the queries wrapped to send
> > users to an error page if there is a DB issue ).
> >
> >    The reason I attempt to store the database object in a SESSION is
> > because there are quite a number of databases in a single page load that
> > can be called. I don't want to spend time opening a new DB connection
> > for every query to the database. A single page load could have up to 15
> > queries to output the data and use up to 10 different databases (not
> > tables) to produce the output.
> >
> > Recomendations on how to fix my problem are much appreciated. If more
> > data is needed to assist in debugging, just let me know.
> >
> > Thank you,
> > Calvin Ellis
> > webmaster: http://www.mudmagic.com/
> >
> > --
> > 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
>

--- End Message ---
--- Begin Message ---
Uh, sorry, I meant "ignore_user_abort = On"
These negated ini options suck.

-Rasmus

On Sat, 28 Feb 2004, Rasmus Lerdorf wrote:

> ignore_user_abort = Off
>
> in your php.ini file
>
> And read the Connection Handling chapter in the manual.
>
> -Rasmus
>
> On Sat, 28 Feb 2004, Kyndig wrote:
>
> > Hi folks,
> >
> >    I've been working on my website for a few years now. It uses SESSION
> > management. I am using: php4.3 version. A problem I have had for awhile
> > now is that all session information is lost if a page does not fully
> > load. This wouldn't be an issue, except on every page load I create a
> > MySQL link id for that page load, and store the object in a SESSION
> > varriable:
> >       $db = new db("mydatabase");
> >       $_SESSION["db"] = $db;
> >
> >
> >    Then throughout the website code, I'll simply call:   $q =
> > $_SESSION["db"];
> > This is causing my pages to fail ( I have the queries wrapped to send
> > users to an error page if there is a DB issue ).
> >
> >    The reason I attempt to store the database object in a SESSION is
> > because there are quite a number of databases in a single page load that
> > can be called. I don't want to spend time opening a new DB connection
> > for every query to the database. A single page load could have up to 15
> > queries to output the data and use up to 10 different databases (not
> > tables) to produce the output.
> >
> > Recomendations on how to fix my problem are much appreciated. If more
> > data is needed to assist in debugging, just let me know.
> >
> > Thank you,
> > Calvin Ellis
> > webmaster: http://www.mudmagic.com/
> >
> > --
> > 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
>

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

Rasmus Lerdorf wrote:
Uh, sorry, I meant "ignore_user_abort = On"
These negated ini options suck.

-Rasmus


That fixed it! =) I'll make sure to read the Connection Handling chapter. I havn't looked into the php.ini docs, in quite a few php versions. I'm sure my knowledge about them is now outdated.

Thank you. This was a problem I've had for a little over a year now.

Kyndig

On Sat, 28 Feb 2004, Rasmus Lerdorf wrote:


ignore_user_abort = Off

in your php.ini file

And read the Connection Handling chapter in the manual.

-Rasmus

On Sat, 28 Feb 2004, Kyndig wrote:


Hi folks,

  I've been working on my website for a few years now. It uses SESSION
management. I am using: php4.3 version. A problem I have had for awhile
now is that all session information is lost if a page does not fully
load. This wouldn't be an issue, except on every page load I create a
MySQL link id for that page load, and store the object in a SESSION
varriable:
     $db = new db("mydatabase");
     $_SESSION["db"] = $db;


Then throughout the website code, I'll simply call: $q = $_SESSION["db"]; This is causing my pages to fail ( I have the queries wrapped to send users to an error page if there is a DB issue ).

  The reason I attempt to store the database object in a SESSION is
because there are quite a number of databases in a single page load that
can be called. I don't want to spend time opening a new DB connection
for every query to the database. A single page load could have up to 15
queries to output the data and use up to 10 different databases (not
tables) to produce the output.

Recomendations on how to fix my problem are much appreciated. If more
data is needed to assist in debugging, just let me know.

Thank you,
Calvin Ellis
webmaster: http://www.mudmagic.com/

--
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




--- End Message ---
--- Begin Message ---
This stuff hasn't changed in about 5 years though.  ignore_user_abort was
introduced in 3.0.7 released March 1, 1999 and I remember writing that
connection handling chapter in the manual sometime before that.

-Rasmus

On Sat, 28 Feb 2004, Kyndig wrote:

>
>
> Rasmus Lerdorf wrote:
> > Uh, sorry, I meant "ignore_user_abort = On"
> > These negated ini options suck.
> >
> > -Rasmus
> >
>
> That fixed it! =) I'll make sure to read the Connection Handling
> chapter. I havn't looked into the php.ini docs, in quite a few php
> versions. I'm sure my knowledge about them is now outdated.
>
> Thank you. This was a problem I've had for a little over a year now.
>
> Kyndig
>
> > On Sat, 28 Feb 2004, Rasmus Lerdorf wrote:
> >
> >
> >>ignore_user_abort = Off
> >>
> >>in your php.ini file
> >>
> >>And read the Connection Handling chapter in the manual.
> >>
> >>-Rasmus
> >>
> >>On Sat, 28 Feb 2004, Kyndig wrote:
> >>
> >>
> >>>Hi folks,
> >>>
> >>>   I've been working on my website for a few years now. It uses SESSION
> >>>management. I am using: php4.3 version. A problem I have had for awhile
> >>>now is that all session information is lost if a page does not fully
> >>>load. This wouldn't be an issue, except on every page load I create a
> >>>MySQL link id for that page load, and store the object in a SESSION
> >>>varriable:
> >>>      $db = new db("mydatabase");
> >>>      $_SESSION["db"] = $db;
> >>>
> >>>
> >>>   Then throughout the website code, I'll simply call:   $q =
> >>>$_SESSION["db"];
> >>>This is causing my pages to fail ( I have the queries wrapped to send
> >>>users to an error page if there is a DB issue ).
> >>>
> >>>   The reason I attempt to store the database object in a SESSION is
> >>>because there are quite a number of databases in a single page load that
> >>>can be called. I don't want to spend time opening a new DB connection
> >>>for every query to the database. A single page load could have up to 15
> >>>queries to output the data and use up to 10 different databases (not
> >>>tables) to produce the output.
> >>>
> >>>Recomendations on how to fix my problem are much appreciated. If more
> >>>data is needed to assist in debugging, just let me know.
> >>>
> >>>Thank you,
> >>>Calvin Ellis
> >>>webmaster: http://www.mudmagic.com/
> >>>
> >>>--
> >>>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
> >>
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Hi,

I was trying to figure out if there was any way I could run Apache in
Windows 2000 as a service which is allowed to interact with desktop and
which has network priviledges? I try to exec a an .exe from PHP which needs
network priviledges and which needs to interact with desktop.

Thanks

Vincent

--- End Message ---
--- Begin Message --- Hi, I'm having trouble understanding why I can create and delete directories with my script via mkdir and rmdir, but not simply being able to read them with opendir or readdir?

For example, when I attempt to access these directories with opendir, I get this error message:

Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 789 is not allowed to access...

Safe Mode is on as I am hosted on a shared server and cannot change this. Surely there's a work-around for this?

Any helpfull input would appreciated
Thanks,
-s

--- End Message ---
--- Begin Message --- Hi, I'm having trouble understanding why I can create and delete directories with my script via mkdir and rmdir, but not simply being able to read them with opendir or readdir?

For example, when I attempt to access these directories with opendir, I get this error message:

Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 789 is not allowed to access...

Safe Mode is on as I am hosted on a shared server and cannot change this. Surely there's a work-around for this?

Any helpfull input would appreciated
Thanks,
-s

--- End Message ---
--- Begin Message ---
On Saturday 28 February 2004 22:47, raisinlove wrote:
> Hi, I'm having trouble understanding why I can create and delete
> directories with my script via mkdir and rmdir, but not simply being
> able to read them with opendir or readdir?

Are you saying that you can create a directory using mkdir() and then 
subsequently cannot read that directory using opendir()?

> For example, when I attempt to access these directories with opendir, I
> get this error message:
>
> Warning: opendir(): SAFE MODE Restriction in effect. The script whose
> uid is 789 is not allowed to access...

What directory are you trying to read?

> Safe Mode is on as I am hosted on a shared server and cannot change
> this. Surely there's a work-around for this?

Surely if there is a work-around then safe mode would not be doing its job 
properly?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
War is an equal opportunity destroyer.
*/

--- End Message ---
--- Begin Message ---
This is normal.  You are allowed to create the directory because the
directory you are creating it in is owned by the same user id that owns
the script calling mkdir().  However, since your web server runs as some
other user the owner of the newly created dir will be that user and not
your own so you subsequently cannot manipulate that directory.  Same
problem with safe mode and file uploads.  ISP's are generally better off
using open_basedir instead of safe-mode for this very reason.

-Rasmus

On Sat, 28 Feb 2004, raisinlove wrote:

> Hi, I'm having trouble understanding why I can create and delete
> directories with my script via mkdir and rmdir, but not simply being
> able to read them with opendir or readdir?
>
> For example, when I attempt to access these directories with opendir, I
> get this error message:
>
> Warning: opendir(): SAFE MODE Restriction in effect. The script whose
> uid is 789 is not allowed to access...
>
> Safe Mode is on as I am hosted on a shared server and cannot change
> this. Surely there's a work-around for this?
>
> Any helpfull input would appreciated
> Thanks,
> -s
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Hi,

flock($_fp, LOCK_EX );

return always false. I'm relativily shure that the file to flock is not flocked 
elsewhere. php 4.3.3 is running as cgi on linux. 
What is going wrong?

thanks for an answer.

--- End Message ---
--- Begin Message ---
Is the file on an NFS-mounted filesystem?  flock() in 4.3.3 works fine.

-Rasmus

On Sat, 28 Feb 2004, Armand Turpel wrote:

> Hi,
>
> flock($_fp, LOCK_EX );
>
> return always false. I'm relativily shure that the file to flock is not flocked 
> elsewhere. php 4.3.3 is running as cgi on linux.
> What is going wrong?
>
> thanks for an answer.

--- End Message ---
--- Begin Message ---
The problem was that the file was opened for reading and it was locked exclusiv.

$_fp = @fopen($file, "r");

flock($_fp, LOCK_EX);

After change to LOCK_SH it works. What is strange is that not all systems have this 
behavior. On linux with php 4.3.4 as module this was not a problem. !?!

Why??


----- Original Message ----- 
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Armand Turpel" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, February 28, 2004 8:04 PM
Subject: Re: [PHP] flock problem


> Is the file on an NFS-mounted filesystem?  flock() in 4.3.3 works fine.
> 
> -Rasmus
> 
> On Sat, 28 Feb 2004, Armand Turpel wrote:
> 
> > Hi,
> >
> > flock($_fp, LOCK_EX );
> >
> > return always false. I'm relativily shure that the file to flock is not flocked 
> > elsewhere. php 4.3.3 is running as cgi on linux.
> > What is going wrong?
> >
> > thanks for an answer.
> 
> 

--- End Message ---
--- Begin Message ---
Hey everyone...
In the last 24 hours there have been questions on how to get the all the
records of a day
based on the timestamp and to check whether the current date/time is later
than a timestamp,
I have  a new one... how do you fetch all records between date1 and date2?

eg:
you have some entries in a join_date (timestamp(4)) field for every day of
Feb and need to
get all records between sayyy... 7th Feb and 15th Feb..


ideas?

Thanks,
-Ryan

--- End Message ---
--- Begin Message ---
On Sat, 2004-02-28 at 14:59, Ryan A wrote:
> Hey everyone...
> In the last 24 hours there have been questions on how to get the all the
> records of a day
> based on the timestamp and to check whether the current date/time is later
> than a timestamp,
> I have  a new one... how do you fetch all records between date1 and date2?
> 
> eg:
> you have some entries in a join_date (timestamp(4)) field for every day of
> Feb and need to
> get all records between sayyy... 7th Feb and 15th Feb..

There are many ways to go about this, here is one...

$qString =
    "SELECT * from your_table "
   ."WHERE TO_DAYS( db_date ) >= TO_DAYS( '$sDate' ) "
   ."AND TO_DAYS( db_date ) <= TO_DAYS( '$eDate' ) ";

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message --- How to set up the path for PHP Library?
I want to create a directory that will contain all libraries files. And than I want to include the directory in each file. How to specify the path in php setting?

Thanks

_________________________________________________________________
Take off on a romantic weekend or a family adventure to these great U.S. locations. http://special.msn.com/local/hotdestinations.armx
--- End Message ---
--- Begin Message --- Hi there,

I do have a couple of hundred file links to create. I am wondering if this could be automated with php.

On a linux shell it would look like this:
ln united-states-map.jpg vereinigte-staaten-karte.jpg

Are there php commands to execute this ln command?

Thanx for any help on that,

Merlin
--- End Message ---
--- Begin Message ---
Hi Walter,

On Thu, 26 Feb 2004 11:44:47 -0800, Walter A. Boring IV wrote:
> ----well, if you are implementing something completely new in php5,
> there there are no compatibility issues.  I have many classes in my
> projects in php4.  I'm not sure of how many child constructors have
> different parameters (my guess is not many), but enforcing strict
> parameter count for childs classes would break compatibility.  Which is
> why I think that one should just use an interface to enforce this rule. 
> It seems like the right place for it.
In the object oriented point of view, there are no differences between an
interface and a class when you use something like this: ...
} catch (MyException $e) {
...

So, MyException is a "class" or an "interface" ? You can't tell. That's
why this enforcement is applied over classes too. A class definition is
still a commitment of "interfacing". When you extend the base class you
are not supposed to break this commitment. If you allow this commitment
break, it may lead to "buggy" code when you take a class by its superclass
"interface".

Best Regards,

Cristiano Duarte

--- End Message ---
--- Begin Message ---
I've decided it's time to learn how to program using PHP's OOP. But, I just
found this article which is giving me second thoughts...

    http://www.zend.com/zend/art/mistake1.php#Heading13

The article was written in 2000, so, it may not apply now. Is OOP in PHP 4.3
slow and incomplete as the article states? Or is it much better now? I
probably won't be moving to PHP 5 in then near future, which apparently has
much better OOP support.

So, I can't decide if I should just go ahead and start using OOP in PHP 4.3
(as long as it's not slow and klugey) or if I should just wait until I get
PHP 5? Anyone have any insight??

- Monty

--- End Message ---

Reply via email to