php-install Digest 9 Jan 2003 11:03:32 -0000 Issue 1193
Topics (messages 9631 through 9639):
PHP as a CGI with RH8
9631 by: Martin
Re: Need help putting a small pice of code on an html page
9632 by: Joerg Aldinger
file.php?variable=value
9633 by: Brian Ross
9634 by: janet.valade.com
Re: Redhat 8 > PHP
9635 by: Pete Mackie
9636 by: Rasmus Lerdorf
RetHat8 and Postgres 7.3
9637 by: Mitch Pirtle
Re: New phpMyadmin
9638 by: Stephan Sachse
Re: [PHP] Configuring 4.3.0 on Solaris 2.8
9639 by: Ewan McDowall
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 ---
Hi.
Have anyone succeeded with setting up PHP as a CGI with RedHat8.0?
Best regards / Martin
--- End Message ---
--- Begin Message ---
Mike,
there are several solutions to your problem. Here are a few:
******** 1) Redirect visitors to the new page
To do this, create/modify a .htaccess file in the directory where your old
page is and include the following line:
Redirect permanent oldpage.html http://yourserver.com/newpage.php
This will tell Apache that oldpage.html is no longer valid and
automatically redirect visitors to the new page. Note: This only
works if your webserver is Apache, other webservers probably have this
option elsewhere. See also:
http://httpd.apache.org/docs/mod/mod_alias.html#redirect
******** 2) Force PHP parsing of your old file
To do this, create/modify a .htaccess file in the directory where your old
page is and include the following lines:
<Location oldpage.htm>
ForceType application/x-httpd-php
</Location>
This will force apache to process oldpage.htm as a PHP file. See also:
http://httpd.apache.org/docs/mod/mod_mime.html#forcetype
******** 3) Force PHP parsing of all .htm files
This is similar to method 2, but you will need access to your httpd.conf
file. Open it, and look for the line that says:
AddType application/x-httpd-php .php
and then simply add .htm at the end of it:
AddType application/x-httpd-php .php .htm
This will tell Apache to send all .htm files on your server through the
PHP parser. It works, but performance-wise it is not recommended to send
all files through the PHP parser. See also:
http://httpd.apache.org/docs/mod/mod_mime.html#addtype
IMHO, I believe you should try these options in the order given, but
depending on your needs you might go with another option.
Good luck with that...
Joerg.
PS: And yes, [? should be <?php and ?] should be ?>
-----Original Message-----
From: Mike Young [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 6:13 PM
To: [EMAIL PROTECTED]
Subject: [PHP-INST] Need help putting a small pice of code on an html page
On Fri, Jan 03, 2003 at 11:33:45AM -0800, Mike Young
wrote:
>
> Hi,
>
> I'm new to the list and pretty new to php so please
> forgive my ignorance.
>
> I came across a piece of php code to redirect
foreign
> countries to a page translated into their language
and
> I wish to put it on an html page. The page has a
> ..htm extension and I don't want to change it to a
.php
> extension because it's in search engines, traffic
> trades etc. But when I put it on my htm page the
code
> shows. I've pasted the code below, just as I found
it.
>
> My question: How can I make this work, after
editing,
> on a page with an htm extension without having to
> change it to a php extension?
> Also , i notice it begins [? and ends ?]. Should
that
> be <? and ?> instead. I assume it should go in the
> body of the page?
>
> As I said I'm pretty new to php so forgive the
> ignorance. Any help would be very much appreciated.
> Thanks,
> Mike
>
>
> here it is:
>
> PHP FILTERING CODE
[?
$user_lan = $HTTP_ACCEPT_LANGUAGE;
if($user_lan=='de') {
## German
$redir_url = "http://www.germanlanguagepageurl.com";
} elseif($user_lan=='fr') {
## French
$redir_url = "http://www.frenchlanguagepageurl.com";
} elseif($user_lan=='it') {
## Italian
$redir_url = "http://www.italianlanguagepageurl.com";
} elseif($user_lan=='es') {
## Spain
$redir_url = "http://www.spanishlanguagepageurl.com";
## US traffic or Rest of world not defined above
} else {
$redir_url = "http://www.yourmainpageurl.com";
}
header("Location: $redir_url");
exit;
?]
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I installed Apache and PHP and when I try and run PHP files, they won't
accept variable values that apache tries to post to it. I've tried using
both forms and the format that you see above in the subject. Anyone got a
guess at what may be wrong?
-Brian Ross
--- End Message ---
--- Begin Message ---
In a message dated 1/8/03 4:53:09 PM Pacific Standard Time,
[EMAIL PROTECTED] writes:
> I installed Apache and PHP and when I try and run PHP files, they won't
> accept variable values that apache tries to post to it. I've tried using
> both forms and the format that you see above in the subject. Anyone got a
> guess at what may be wrong?
>
I suspect the problem is that your register_globals is turned off. If you
are accessing the variable as
$variable
and it doesn't seem to show anything, try accessing it as:
$_GET['variable'];
Janet
-------------------
Janet Valade
Author, PHP & MySQL for Dummies
--- End Message ---
--- Begin Message ---
At http://www.php.net/manual/en/install.apache2.php
in the "PHP and Apache 2 on Linux," it states:
10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs
With RH Linix 8.0 install, there does not appear to be an Apache apxs file
available for the configure run (realizing the RH Apache install paths are
different).
What does one do to get going here?
It looks like everyone is struggling with Red Hat PHP upgrades when tied to
Apache 2. There has to be a better way.
"Dan Anderson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> RedHat 8 comes with PHP. The package name is php.
> If you want a newer version, you have to compile it yourself.
> See
> http://dan.drydog.com/apache2php.html
>
> Matt Babineau <[EMAIL PROTECTED]> wrote:
> > I'm trying to get PHP running on RH8- the Apache server is running and
> > it is the newest version available from up2date, does anyone have a url
> > of a good install helper on this?
>
> --
> Dan Anderson <[EMAIL PROTECTED]>, San Diego, CA, US
>
--- End Message ---
--- Begin Message ---
> At http://www.php.net/manual/en/install.apache2.php
>
> in the "PHP and Apache 2 on Linux," it states:
>
> 10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs
>
> With RH Linix 8.0 install, there does not appear to be an Apache apxs file
> available for the configure run (realizing the RH Apache install paths are
> different).
>
> What does one do to get going here?
Install the apache-devel package as always?
> It looks like everyone is struggling with Red Hat PHP upgrades when tied to
> Apache 2. There has to be a better way.
Yup, RedHat chose to bundle a barely working web server, at least when it
comes to dynamic content. Luckily Apache-1.3 rpms are all over, just use
that instead.
-Rasmus
--- End Message ---
--- Begin Message ---
Ok, sending from the home machine this time.
The problem: Installed RedHat8 with stock RPMs, and everything was fine.
Then I decided to upgrade Postgres to 7.3 (some things that I just
couldn't wait for). Then decided to upgrade to php 4.3.0.
Bzzzzt! Wrong answer!
So, the existing, previously-working php no longer works with Postgres
(looking for the 7.2.x libraries). But I cannot build from source, as the
newer gcc/glibc combo refuses to build...
So even with the older php, I cannot get to Postgres. I was told the
compile problem was fixed in cvs, but I tried with
php4-STABLE-200301080830 with no luck.
So is someone looking at this? Without reverting to the originally
supplied php and Postgres, how can I get this thing to work?
--- End Message ---
--- Begin Message ---
Marcus wrote:
Hi there
I just Downloaded the new phpMyAdmin .zip< /FONT>
Unpacked and installed it on 2 differentP C
* Mandrake 8 and it works like a Dream with no problem.
* RedHat 8 and every time I want to create a new table it Duplicates
is this a proplem with phpMyAdmin or RedHat....? )
http://bugs.php.net/bug.php?id=21441
i think its a apxs2 problem.
with apxs works fine
cya later
Stepahn
--- End Message ---
--- Begin Message ---
Incase anyone is interested, I fixed my problem.
For some reason, the version of shtool that came with php-4.3.0 was not working for
me, so I used
the one that came with php-4.2.3 - problem solved
Ewan
> Hi,
>
> I already tried the php-install list, but nobody has been able to solve my wee
>problem, I was
> hoping someone could help me with this. I am trying to install php version 4.3.0 on
>a sun sparc
> running solaris 2.8, and I'm getting stuck at the configure step. When running the
>configure
> command, this is what I get:
>
> root@dalwhinnie> ./configure
> loading cache ./config.cache
> checking for Cygwin environment... no
> checking for mingw32 environment... no
> checking for working sed... sed
> checking host system type... sparc-sun-solaris2.8
>
> And it gets no further. I have no problems configuring php in the past.
>
> Has anyone else seen this?
>
> Thanks in advance,
>
> Ewan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---