converting from php3 to php4

Started by roy cabanissabout 25 years ago5 messagesgeneral
Jump to latest
#1roy cabaniss
rcabaniss@austin.rr.com

I am in the process of converting from php3 to php4 and at the same time
going from mysql to postgres.

All the relevent files reside in

../foo/bar

And the vast majority are in the form *.php3 with internal references to
other webpages which (of course) are also in the form *.php3.

What I need is something that can go into that particular sub directory and
find every instance of php3 and make it php, both as a part of a file name
and internally in the file.

Thanks for the help.

Roy F. Cabaniss

#2Joel Burton
jburton@scw.org
In reply to: roy cabaniss (#1)
Re: converting from php3 to php4

On Wed, 4 Apr 2001, roy cabaniss wrote:

I am in the process of converting from php3 to php4 and at the same time
going from mysql to postgres.

All the relevent files reside in

../foo/bar

And the vast majority are in the form *.php3 with internal references to
other webpages which (of course) are also in the form *.php3.

What I need is something that can go into that particular sub directory and
find every instance of php3 and make it php, both as a part of a file name
and internally in the file.

Not really a PostgreSQL problem, but something quick in Perl could do
this:

<untested>

perl -pi.bak -e 's/php4/php/gi;' `find -name "*.php3"`

</untested>

will iterate over all files in the current directory and below named
*.php3. It iterates over every line in the file, subbing php for php3.

Followups to a Perl list, please.

--
Joel Burton <jburton@scw.org>
Director of Information Systems, Support Center of Washington

#3Bruce Momjian
bruce@momjian.us
In reply to: roy cabaniss (#1)
Re: converting from php3 to php4

No. The only idea I have is to have some external program send a kill
-2 to the backend. This will cause a cancel of the query.

I am in the process of converting from php3 to php4 and at the same time
going from mysql to postgres.

All the relevent files reside in

../foo/bar

And the vast majority are in the form *.php3 with internal references to
other webpages which (of course) are also in the form *.php3.

What I need is something that can go into that particular sub directory and
find every instance of php3 and make it php, both as a part of a file name
and internally in the file.

Thanks for the help.

Roy F. Cabaniss

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#4Mitch Vincent
mitch@venux.net
In reply to: roy cabaniss (#1)
Re: converting from php3 to php4

And the vast majority are in the form *.php3 with internal references to
other webpages which (of course) are also in the form *.php3.

That shouldn't be too hard.

What I need is something that can go into that particular sub directory

and

find every instance of php3 and make it php, both as a part of a file name
and internally in the file.

I don't have something that can do this (though I'm sure osmething
exists) -- you could just have Apache use .php3 in addition to .php as a PHP
file extension (that's what I did on the machines with PHP3 code when we
went to PHP4 and it worked just fine).

Good luck!

-Mitch

#5Martín Marqués
martin@bugs.unl.edu.ar
In reply to: roy cabaniss (#1)
Re: converting from php3 to php4

On Mi� 04 Abr 2001 15:31, roy cabaniss wrote:

I am in the process of converting from php3 to php4 and at the same time
going from mysql to postgres.

All the relevent files reside in

../foo/bar

And the vast majority are in the form *.php3 with internal references to
other webpages which (of course) are also in the form *.php3.

What I need is something that can go into that particular sub directory and
find every instance of php3 and make it php, both as a part of a file name
and internally in the file.

Why don't you just add in the add-type of php a .php3. Like this:

AddType application/x-httpd-php .php .php3

Saludos... :-)

--
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-----------------------------------------------------------------
Martin Marques | mmarques@unl.edu.ar
Programador, Administrador | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------