php-general Digest 12 Oct 2003 06:26:51 -0000 Issue 2350

Topics (messages 165858 through 165879):

PNG to GIF conversion
        165858 by: John Ryan
        165859 by: Evan Nemerson
        165860 by: John Ryan
        165861 by: John Ryan
        165863 by: Evan Nemerson
        165864 by: Evan Nemerson
        165873 by: John Ryan

php5.0.0beta1
        165862 by: Dennis Heuer

Re: Sessions
        165865 by: James Johnson
        165876 by: Lowell Allen

Re: Detecting devices i.e. PDA, Mobile
        165866 by: PHP Webmaster
        165872 by: Manuel Vázquez Acosta
        165877 by: Tom Rogers

Age from date field?
        165867 by: DvDmanDT

Search for an exact string inside of another string
        165868 by: PHP Webmaster
        165871 by: Manuel Vázquez Acosta
        165874 by: PHP Webmaster

Re: Sessions - more testing
        165869 by: James Johnson

Re: Howto ? Local/Master Value
        165870 by: Jason Wong

Re: PHP source display
        165875 by: Ryan Thompson
        165879 by: Evan Nemerson

Re: Echo $PHP_SELF not working
        165878 by: Justin French

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 ---
How do I do this?? I have the latest version of GD with PNG, but no GIF. But
I *have to* be able to convert images to gif. Is there any standalone php
script that'll do it, or a cgi???

--- End Message ---
--- Begin Message ---
Well there's a stand alone program called ImageMagick

Michael Still wrote an article on it which may be useful. There should still 
be a link for it on the main page @ stillhq.com



On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> How do I do this?? I have the latest version of GD with PNG, but no GIF.
> But I *have to* be able to convert images to gif. Is there any standalone
> php script that'll do it, or a cgi???

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If you would be a real seeker after truth, you must at least once in your 
life doubt, as far as possible, all things."

-Rene Descartes

--- End Message ---
--- Begin Message ---
no, i mean a on-the-fly conversion in php. unless its a unix program... is
it?

"Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Well there's a stand alone program called ImageMagick
>
> Michael Still wrote an article on it which may be useful. There should
still
> be a link for it on the main page @ stillhq.com
>
>
>
> On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> > How do I do this?? I have the latest version of GD with PNG, but no GIF.
> > But I *have to* be able to convert images to gif. Is there any
standalone
> > php script that'll do it, or a cgi???
>
> --
> Evan Nemerson
> [EMAIL PROTECTED]
>
> --
> "If you would be a real seeker after truth, you must at least once in your
> life doubt, as far as possible, all things."
>
> -Rene Descartes

--- End Message ---
--- Begin Message ---
and i cant see the article your talking about on stillgq.com

"Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Well there's a stand alone program called ImageMagick
>
> Michael Still wrote an article on it which may be useful. There should
still
> be a link for it on the main page @ stillhq.com
>
>
>
> On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> > How do I do this?? I have the latest version of GD with PNG, but no GIF.
> > But I *have to* be able to convert images to gif. Is there any
standalone
> > php script that'll do it, or a cgi???
>
> --
> Evan Nemerson
> [EMAIL PROTECTED]
>
> --
> "If you would be a real seeker after truth, you must at least once in your
> life doubt, as far as possible, all things."
>
> -Rene Descartes

--- End Message ---
--- Begin Message ---
Yes.


On Saturday 11 October 2003 02:13 pm, John Ryan wrote:
> no, i mean a on-the-fly conversion in php. unless its a unix program... is
> it?
>
> "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Well there's a stand alone program called ImageMagick
> >
> > Michael Still wrote an article on it which may be useful. There should
>
> still
>
> > be a link for it on the main page @ stillhq.com
> >
> > On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> > > How do I do this?? I have the latest version of GD with PNG, but no
> > > GIF. But I *have to* be able to convert images to gif. Is there any
>
> standalone
>
> > > php script that'll do it, or a cgi???
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> >
> > --
> > "If you would be a real seeker after truth, you must at least once in
> > your life doubt, as far as possible, all things."
> >
> > -Rene Descartes

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A leader is the wave pushed ahead by the ship."

-Leo Nikolaevich Tolstoy

--- End Message ---
--- Begin Message ---
Then try stillhq.com, as stillgq.com won't get you too far. Fourth article 
down, "Command line image procesing[sic]...".

If you would have actually read a bit of the page I sent you to, perhaps you 
would have found that out without having to ask. Your last question could have 
been answered by a quick trip to Google. Even your original question could 
have been answered by Google, or probably even the archives.

And it's "you're", not "your".  "You're" means "you are". "Your" is "The 
pronoun of the second person, in the nominative, dative, and objective case, 
indicating the person or persons addressed." (Webster's Revised Unabridged 
Dictionary 1913). And believe it or not, the shift key is there for a reason.

Have a nice day.



On Saturday 11 October 2003 02:14 pm, John Ryan wrote:
> and i cant see the article your talking about on stillgq.com
>
> "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Well there's a stand alone program called ImageMagick
> >
> > Michael Still wrote an article on it which may be useful. There should
>
> still
>
> > be a link for it on the main page @ stillhq.com
> >
> > On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> > > How do I do this?? I have the latest version of GD with PNG, but no
> > > GIF. But I *have to* be able to convert images to gif. Is there any
>
> standalone
>
> > > php script that'll do it, or a cgi???
> >
> > --
> > Evan Nemerson
> > [EMAIL PROTECTED]
> >
> > --
> > "If you would be a real seeker after truth, you must at least once in
> > your life doubt, as far as possible, all things."
> >
> > -Rene Descartes

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"A people who mean to be their own governors, must arm themselves with the 
power knowledge gives."

-James Madison

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

"Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Then try stillhq.com, as stillgq.com won't get you too far. Fourth article
> down, "Command line image procesing[sic]...".
>
> If you would have actually read a bit of the page I sent you to, perhaps
you
> would have found that out without having to ask. Your last question could
have
> been answered by a quick trip to Google. Even your original question could
> have been answered by Google, or probably even the archives.
>
> And it's "you're", not "your".  "You're" means "you are". "Your" is "The
> pronoun of the second person, in the nominative, dative, and objective
case,
> indicating the person or persons addressed." (Webster's Revised Unabridged
> Dictionary 1913). And believe it or not, the shift key is there for a
reason.
>
> Have a nice day.
>
>
>
> On Saturday 11 October 2003 02:14 pm, John Ryan wrote:
> > and i cant see the article your talking about on stillgq.com
> >
> > "Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > > Well there's a stand alone program called ImageMagick
> > >
> > > Michael Still wrote an article on it which may be useful. There should
> >
> > still
> >
> > > be a link for it on the main page @ stillhq.com
> > >
> > > On Saturday 11 October 2003 01:50 pm, John Ryan wrote:
> > > > How do I do this?? I have the latest version of GD with PNG, but no
> > > > GIF. But I *have to* be able to convert images to gif. Is there any
> >
> > standalone
> >
> > > > php script that'll do it, or a cgi???
> > >
> > > --
> > > Evan Nemerson
> > > [EMAIL PROTECTED]
> > >
> > > --
> > > "If you would be a real seeker after truth, you must at least once in
> > > your life doubt, as far as possible, all things."
> > >
> > > -Rene Descartes
>
> --
> Evan Nemerson
> [EMAIL PROTECTED]
>
> --
> "A people who mean to be their own governors, must arm themselves with the
> power knowledge gives."
>
> -James Madison

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

Is there some documentation of the new xml-api available somewhere?

Regards

Dennis

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

I checked the session settings with phpinfo(); I get the following values:
session_save_path = /tmp
session.use_cookies = On
session.use_trans_sid = 1

I've created a folder on the same level as all the pages called
"ccb_sessions" and have CHMOD it to 777.
I have added the following snippet above session_start: <?php
session_save_path("/ccb_sessions");?>
When navigating to my test page I get the following error:

Warning: open(/ccb_sessions/sess_bbbfa69631155d4097e0b0012c857c4a, O_RDWR)
failed: No such file or directory (2) in
/home/.paco/campuscb/campuscorkboard.com/MemberAccountDetails.php on line 2

Checking with my FTP client that file is there and has CHMOD values of 777.
I've done a Google search for "No such file or directory", found a bunch of
stuff for Python, nothing for PHP.

I then closed the browser, FTP'd to the ccb_sessions folder, deleted the
sess_bbbfa69631155d4097e0b0012c857c4a file and changed the session_save_path
to session_save_page("ccb_session");. When going to the test page, it
appears to loop several times, then gives me a "The page cannot be
displayed" message.

The server is (from phpinfo())Linux gaia 2.2.20, Server API is Apache.

Other ideas?
Thanks,
James

-----Original Message-----
From: Lowell Allen [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 6:23 PM
To: PHP
Subject: Re: [PHP] Sessions


> I'm trying to track down some issues with my site, and am trying to 
> decide if it's a session variable issue. On a random basis, it appears 
> that session vars are being dumped, deleted, or unset, as the site 
> will break. Queries based on session vars don't work, session vars not 
> being displayed, etc. This seems to happen most often after a page has 
> been idle for a couple of minutes and a refresh is done on the page.
> 
> This is on a hosted site. I have checked the configuration settings 
> with phpinfo(); and session support is enabled.
> 
> On all pages where I use $_SESSION[<varname>], I have <?php 
> session_start();?>. This has been double checked.
> 
> 1) Do session vars timeout, or can they be set to timeout after a 
> certain length of time?
> 2) Is there anything other than session_start(); that needs to be done 
> when using session vars?
> 3) What other things can I check for?

Most things are explained well by the online manual, and you should read and
re-read the session documentation. That said, I'll also say that the
documentation on sessions is not as informative as I'd like it to be, and I
still get reports of sessions expiring before they should.

Look at the output from echo phpinfo() and check these session configuration
options:

session.cookie_lifetime -- should be 0, lasts until quitting the browser
session.use_cookies -- should be on session.use_trans_sid -- should be on

Some things aren't explained very well, like what does
"session.gc_maxlifetime" mean? The maximum time before garbage collection to
remove session data that hasn't been used? But to minimize the chance of
garbage collection on a shared server wrecking your sessions, you can
specify a directory for saving session data. Create a directory (on the same
level as your directory of publicly-viewable files if you can) and before
the 'session_start();' line, do 'session_save_path("../my_sessions_dir");'.

Also be aware that circumstances on the client side can mess with session
cookies and cause the session to be lost, like using Internet Explorer with
Entourage in Mac OS X.

--
Lowell Allen

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

--- End Message ---
--- Begin Message ---
> I checked the session settings with phpinfo(); I get the following values:
> session_save_path = /tmp
> session.use_cookies = On
> session.use_trans_sid = 1
> 
> I've created a folder on the same level as all the pages called
> "ccb_sessions" and have CHMOD it to 777.
> I have added the following snippet above session_start: <?php
> session_save_path("/ccb_sessions");?>
> When navigating to my test page I get the following error:
> 
> Warning: open(/ccb_sessions/sess_bbbfa69631155d4097e0b0012c857c4a, O_RDWR)
> failed: No such file or directory (2) in
> /home/.paco/campuscb/campuscorkboard.com/MemberAccountDetails.php on line 2
> 
> Checking with my FTP client that file is there and has CHMOD values of 777.
> I've done a Google search for "No such file or directory", found a bunch of
> stuff for Python, nothing for PHP.

[snip]

> Other ideas?

I think you need to provide a full directory path. I looked at my code and
here's exactly what I do. First, I include some functions with a
require_once() statement. One of the functions is prepath():

function prepath($url) {
    $prepath = "";
    if (substr_count($url, "/")) {
        for ($i = 1; $i < substr_count($url, "/"); $i++) {
            $prepath .= "../";
        }
    }
    return $prepath;
}

That lets me use the same statement in different directories. Then the page
actually starts like this:

require_once($req_fns);
session_save_path(prepath($PHP_SELF) . "../ccb_sessions");
session_start();

Note that when I said my session data directory is on the same level as my
publicly viewable files (public_html), I mean that the session directory is
not contained within public_html, but is outside it at the same directory
level on the server.

HTH

--
Lowell Allen

--- End Message ---
--- Begin Message ---
"Shaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I have created an online system, and have created a WAP version, and am
> currently crreating a PDA version. What I wuold like to to do is give out
> the same URL instead of domain.com for normal use, domain.com/wap/ or
> domain.com/pda/. Is there a way of detecting what device is loading the
site
> and redirect them accordingly?
>
> Thanks for your help

As far as I am aware, PHP or infact even JavaScript isn't capable of doing
this. Your best bet is to default redirect to a default version of the site
(not the WAP or PDA version) and provide a link to the WAP and PDA versions
of the site.

--- End Message ---
--- Begin Message ---
Take a look at what is printed by:

var_dump($_SERVER);

Maybe the HTTP_USER_AGENT can lead you to somewhere out of this problem.

Manu.

"Shaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I have created an online system, and have created a WAP version, and am
> currently crreating a PDA version. What I wuold like to to do is give out
> the same URL instead of domain.com for normal use, domain.com/wap/ or
> domain.com/pda/. Is there a way of detecting what device is loading the
site
> and redirect them accordingly?
>
> Thanks for your help

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

Saturday, October 11, 2003, 10:02:31 PM, you wrote:
S> Hi,

S> I have created an online system, and have created a WAP version, and am
S> currently crreating a PDA version. What I wuold like to to do is give out
S> the same URL instead of domain.com for normal use, domain.com/wap/ or
S> domain.com/pda/. Is there a way of detecting what device is loading the site
S> and redirect them accordingly?

S> Thanks for your help


I have done this before, messy but it was the only way I could find at the time

$mode = "HTML";
if(eregi("UP.Browser",$_SERVER['HTTP_USER_AGENT'])
  || eregi("Nokia",$_SERVER['HTTP_USER_AGENT'])
  || eregi("Wapalizer",$_SERVER['HTTP_USER_AGENT']))$mode = "XML";

This was from a while ago but you get the idea
-- 
regards,
Tom

--- End Message ---
--- Begin Message ---
Does anyone have a good solution on how to get the age of someone from a
date column in mysql... This is what I have, but it's not really the
truth... What's the right way to do it?

floor((time()-$a["born"])/(3600*24*365.25))

where $a["born"] is the timestamp of the birthdate... Current query:

SELECT UNIX_TIMESTAMP(birthdate) as born FROM members WHERE id='1'

So... how would I do it... Doesn't matter if it's MySQL or PHP that
calculates it, as long as I can expect it to work on paid hosts...

Any suggestions? Notice that I'm only looking for the age in years... Thanks
in advance
-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]



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

I have a little problem that I hope you can help me with.

I have the following strings:

$str1 = "Bob";
$str2 = "My Name Is Bob";

How can I get PHP to look for $str1 inside of $str2?

Also, what about if "Bob" inside of $str2 is in different places?

I would like something like:

if ($str1 IS INSIDE OF $str2) {
echo "str1 is inside of str2";
}
else {
echo "could not find str1 inside of str2";
}

Any ideas appreciated.

--- End Message ---
--- Begin Message ---
Try:

if (strpos($str2, $str1) !== false)
    echo "$str1 is inside $str2";
else
    echo "could not find $str1 inside $str2";

"Php Webmaster" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I have a little problem that I hope you can help me with.
>
> I have the following strings:
>
> $str1 = "Bob";
> $str2 = "My Name Is Bob";
>
> How can I get PHP to look for $str1 inside of $str2?
>
> Also, what about if "Bob" inside of $str2 is in different places?
>
> I would like something like:
>
> if ($str1 IS INSIDE OF $str2) {
> echo "str1 is inside of str2";
> }
> else {
> echo "could not find str1 inside of str2";
> }
>
> Any ideas appreciated.

--- End Message ---
--- Begin Message ---
"Manuel VáZquez Acosta" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Try:
>
> if (strpos($str2, $str1) !== false)
>     echo "$str1 is inside $str2";
> else
>     echo "could not find $str1 inside $str2";
>
> "Php Webmaster" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hi all,
> >
> > I have a little problem that I hope you can help me with.
> >
> > I have the following strings:
> >
> > $str1 = "Bob";
> > $str2 = "My Name Is Bob";
> >
> > How can I get PHP to look for $str1 inside of $str2?
> >
> > Also, what about if "Bob" inside of $str2 is in different places?
> >
> > I would like something like:
> >
> > if ($str1 IS INSIDE OF $str2) {
> > echo "str1 is inside of str2";
> > }
> > else {
> > echo "could not find str1 inside of str2";
> > }
> >
> > Any ideas appreciated.

Thanks! Just what I needed.

--- End Message ---
--- Begin Message ---
I've read Nelson's message and have added the following lines:

        ini_set('session.save_path','ccb_sessions');
        ini_set('session.use_trans_sid','off');
        ini_set('session.gc_maxlifetime', '3600');

And still get the same page not found error. 

James



-----Original Message-----
From: James Johnson [mailto:[EMAIL PROTECTED] 
Sent: Saturday, October 11, 2003 3:46 PM
To: 'Lowell Allen'; 'PHP'
Subject: RE: [PHP] Sessions


Hi,

I checked the session settings with phpinfo(); I get the following values:
session_save_path = /tmp session.use_cookies = On session.use_trans_sid = 1

I've created a folder on the same level as all the pages called
"ccb_sessions" and have CHMOD it to 777. I have added the following snippet
above session_start: <?php session_save_path("/ccb_sessions");?>
When navigating to my test page I get the following error:

Warning: open(/ccb_sessions/sess_bbbfa69631155d4097e0b0012c857c4a, O_RDWR)
failed: No such file or directory (2) in
/home/.paco/campuscb/campuscorkboard.com/MemberAccountDetails.php on line 2

Checking with my FTP client that file is there and has CHMOD values of 777.
I've done a Google search for "No such file or directory", found a bunch of
stuff for Python, nothing for PHP.

I then closed the browser, FTP'd to the ccb_sessions folder, deleted the
sess_bbbfa69631155d4097e0b0012c857c4a file and changed the session_save_path
to session_save_page("ccb_session");. When going to the test page, it
appears to loop several times, then gives me a "The page cannot be
displayed" message.

The server is (from phpinfo())Linux gaia 2.2.20, Server API is Apache.

Other ideas?
Thanks,
James

-----Original Message-----
From: Lowell Allen [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 10, 2003 6:23 PM
To: PHP
Subject: Re: [PHP] Sessions


> I'm trying to track down some issues with my site, and am trying to
> decide if it's a session variable issue. On a random basis, it appears 
> that session vars are being dumped, deleted, or unset, as the site 
> will break. Queries based on session vars don't work, session vars not 
> being displayed, etc. This seems to happen most often after a page has 
> been idle for a couple of minutes and a refresh is done on the page.
> 
> This is on a hosted site. I have checked the configuration settings
> with phpinfo(); and session support is enabled.
> 
> On all pages where I use $_SESSION[<varname>], I have <?php
> session_start();?>. This has been double checked.
> 
> 1) Do session vars timeout, or can they be set to timeout after a
> certain length of time?
> 2) Is there anything other than session_start(); that needs to be done 
> when using session vars?
> 3) What other things can I check for?

Most things are explained well by the online manual, and you should read and
re-read the session documentation. That said, I'll also say that the
documentation on sessions is not as informative as I'd like it to be, and I
still get reports of sessions expiring before they should.

Look at the output from echo phpinfo() and check these session configuration
options:

session.cookie_lifetime -- should be 0, lasts until quitting the browser
session.use_cookies -- should be on session.use_trans_sid -- should be on

Some things aren't explained very well, like what does
"session.gc_maxlifetime" mean? The maximum time before garbage collection to
remove session data that hasn't been used? But to minimize the chance of
garbage collection on a shared server wrecking your sessions, you can
specify a directory for saving session data. Create a directory (on the same
level as your directory of publicly-viewable files if you can) and before
the 'session_start();' line, do 'session_save_path("../my_sessions_dir");'.

Also be aware that circumstances on the client side can mess with session
cookies and cause the session to be lost, like using Internet Explorer with
Entourage in Mac OS X.

--
Lowell Allen

-- 
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 ---
On Sunday 12 October 2003 02:26, ada wrote:

> So you can make several config judging from the current account ?
> I dont found anything about that ...

Kind of.

> How several configs are maintained in a mutual web server ?
> Surely one php.ini for all and some little hacks on vhosts config ?

They're not hacks. They *are* one of the mechanisms for having different 
configs of php for different purposes.

> like here :
> http://www.php.net/features.safe-mode
> You can a vhost.conf file.
>
> <Directory /vhosts/domain.com/httpdocs/>
> php_admin_value safe_mode 0
> php_admin_value open_basedir "/"
> </Directory>
>
> Explain me ?

Have a look at the manual entry for ini_set(). There's a useful table which 
tells you *what* php config item can be changed and *where* it can be 
changed.

The master value shown by phpinfo() is setting in php,ini, and the local value 
is whatever it has been set to at the time phpinfo() is executed.

-- 
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
------------------------------------------
/*
Drawing on my fine command of language, I said nothing.
*/

--- End Message ---
--- Begin Message ---
Try using the function view_source(string filename)
That's off the top of my head. Might be wrong. It's in the documentation

On Friday 10 October 2003 15:41, Lists wrote:
> When I used apache 1.3 I could call a file with an extension of .phps and
> it would display formatted source.
>
> In apache 2.0 it does not do this
>
> Here is my config from apache 2.0
>
>
> LoadModule php4_module modules/libphp4.so
>
> #
> # Cause the PHP interpreter handle files with a .php extension.
> #
> <Files *.php>
>     SetOutputFilter PHP
>     SetInputFilter PHP
>     LimitRequestBody 524288
> </Files>
>
> I have tried doing:
>
> <Files *.phps>
>     SetOutputFilter PHPS
>     SetInputFilter PHPS
>     LimitRequestBody 524288
> </Files>
>
>
> However, that does not work!
>
> Any ideas?
>
> Michael

-- 
Ryan Thompson
[EMAIL PROTECTED]
http://osgw.sourceforge.net
==============================
"A computer scientist is someone who fixes
 things that aren't broken" --Unknown

--- End Message ---
--- Begin Message ---
The functions Ryan is talkink about are show_source, highlight_file, and 
highlight_string, but they're a bit more work than getting *.phps files to 
work. I'm no apache wizard, and I don't know what's going on with the 
SetOutputFilter type stuff, but it's not what's in the manual at all. Take a 
look at http://www.php.net/manual/en/install.apache2.php

If you really want the stuff you've got below, perhaps php-source? That's just 
a guess, though...

Remember, Apache 2 w/ PHP is not recommended for productions boxes (IIRC, 
although PHP itself is thread safe, code the extensions bring in may not be. 
You probably won't have any problems, but no guarantees). Good luck!


On Friday 10 October 2003 12:56 pm, Ryan Thompson wrote:
> Try using the function view_source(string filename)
> That's off the top of my head. Might be wrong. It's in the documentation
>
> On Friday 10 October 2003 15:41, Lists wrote:
> > When I used apache 1.3 I could call a file with an extension of .phps and
> > it would display formatted source.
> >
> > In apache 2.0 it does not do this
> >
> > Here is my config from apache 2.0
> >
> >
> > LoadModule php4_module modules/libphp4.so
> >
> > #
> > # Cause the PHP interpreter handle files with a .php extension.
> > #
> > <Files *.php>
> >     SetOutputFilter PHP
> >     SetInputFilter PHP
> >     LimitRequestBody 524288
> > </Files>
> >
> > I have tried doing:
> >
> > <Files *.phps>
> >     SetOutputFilter PHPS
> >     SetInputFilter PHPS
> >     LimitRequestBody 524288
> > </Files>
> >
> >
> > However, that does not work!
> >
> > Any ideas?
> >
> > Michael

-- 
Evan Nemerson
[EMAIL PROTECTED]

--
"If there is no higher reason--and there is none--then my own reason must be 
the supreme judge of my life."

-Leo Nikolaevich Tolstoy

--- End Message ---
--- Begin Message --- Actually, that should make no difference... you don't need a ; if it's the last instruction before the close of PHP.

Try <?php echo $_SEVER['PHP_SELF']?> or <?=$_SEVER['PHP_SELF']?>

Justin


On Saturday, October 11, 2003, at 09:29 AM, Al wrote:


Put a ";" [no quotes] after  such as:   echo $PHP_SELF;
Jeff McKeon wrote:

I've just published a new website and something is wrong. I suspect the
PHP.ini on the server but I can't seem to find anything.


The line:

<form method='post' action='<?PHP ECHO $PHP_SELF ?>'>

--- End Message ---

Reply via email to