Code relocation

Problems with the Solaris version of XAMPP, questions, comments, and anything related.

Code relocation

Postby itsupplies » 08. November 2004 11:55

Hello,

After having a good play with the install, I wanted to relocate it to another dir. the install allowed this but I started getting alot of issues .

Having looked at some of the code I noticed alot still had references to /opt/xampp.

Below is a quick script I knocked up to go through all files and change any refs. from 'old' to 'new'

Code: Select all
#!/bin/ksh
#
# Quick script to scan all XAMPP files and change any
# files with /opt/xampp in to your new directory.
# Bascially clearing up the change of default dir.
#
# 09/11/04 - JGF - john@itsupplies.net
#

OLD_DIR="/opt/xampp"            # Current default install dir
NEW_DIR="/usr/local/web"        # The dir you've choosen
TMP_FILE=/tmp/xampp.tmp

for FILE in `find ${NEW_DIR} -exec grep -l "${OLD_DIR}" {} \;`
do
        echo "Checking $FILE.....\c"
        sed -e 's%'${OLD_DIR}'%'${NEW_DIR}'%g' ${FILE} > ${TMP_FILE}
        cp ${TMP_FILE} ${FILE}
        echo "done"
done


Just run it from any dir (make sure you change your dir in script)

Cheers
John
itsupplies
 
Posts: 5
Joined: 06. November 2004 13:34

Postby Oswald » 08. November 2004 14:53

Dear John!

Thanks a lot for the script. I think many users will like it.

But can you please tell me which file were missed by the build-in relocate function of XAMPP? If you move XAMPP to another place the build-in method should notice it and should start it's own relocation process.

Greetings
Oswald
User avatar
Oswald
Apache Friends
 
Posts: 2718
Joined: 26. December 2002 19:51
Location: Berlin, Germany
Operating System: Linux

Postby itsupplies » 08. November 2004 15:16

Oswald,

I noticed I was missing a big point, ie actually running the 'xampp' after the install which changed alot of the issues, but for completeness I ran another test install to /files/xampp-test

After install
.
.
.
x ./phpsqliteadmin/SPSQLite.class.diff, 3372 bytes, 7 tape blocks
x ./phpsqliteadmin/phpsla.css, 1645 bytes, 4 tape blocks
x ./cgi-bin, 0 bytes, 0 tape blocks
x ./cgi-bin/test-cgi, 757 bytes, 2 tape blocks
x ./cgi-bin/printenv, 274 bytes, 1 tape blocks
XAMPP installation complete. You may now start XAMPP by calling:
/files/xampp-test/xampp start
Good luck and have fun!

Then ran the startup script 'xampp' which changed alot of files I had issues with, then after pulling out all the 'bak' files, this is whats left:

/files/xampp-test/bin/rcprngd
/files/xampp-test/bin/xml2-config
/files/xampp-test/bin/libpng12-config
/files/xampp-test/bin/libpng-config
/files/xampp-test/etc/highperformance.conf
/files/xampp-test/etc/httpd-std.conf
/files/xampp-test/etc/ssl-std.conf
/files/xampp-test/etc/highperformance-std.conf
/files/xampp-test/lib/php/.registry/console_getopt.reg
/files/xampp-test/lib/php/.registry/net_socket.reg
/files/xampp-test/lib/php/.registry/http.reg
/files/xampp-test/lib/php/.registry/mail.reg
/files/xampp-test/lib/php/.registry/db.reg
/files/xampp-test/lib/php/.registry/xml_rpc.reg
/files/xampp-test/lib/php/.registry/xml_parser.reg
/files/xampp-test/lib/php/.registry/net_smtp.reg
/files/xampp-test/lib/php/.registry/archive_tar.reg
/files/xampp-test/lib/php/.registry/pear.reg
/files/xampp-test/lib/php/pearcmd.php
/files/xampp-test/lib/pkgconfig/openssl.pc
/files/xampp-test/lib/pkgconfig/freetype2.pc
/files/xampp-test/lib/pkgconfig/libpng.pc
/files/xampp-test/lib/pkgconfig/libxml-2.0.pc
/files/xampp-test/lib/pkgconfig/libpng12.pc
/files/xampp-test/lib/xml2Conf.sh
/files/xampp-test/RELEASENOTES
/files/xampp-test/share/mysql/my-small.cnf
/files/xampp-test/share/mysql/my-medium.cnf
/files/xampp-test/share/mysql/my-huge.cnf
/files/xampp-test/share/mysql/my-large.cnf
/files/xampp-test/share/mysql/my-innodb-heavy-4G.cnf
/files/xampp-test/share/mysql/mysql-test/mysql-test-run
/files/xampp-test/share/mysql/mysql-log-rotate
/files/xampp-test/share/mysql/postinstall
/files/xampp-test/share/mysql/preinstall
/files/xampp-test/share/mysql/mysql.server
/files/xampp-test/htdocs/xampp/lang/fr.php
/files/xampp-test/htdocs/xampp/lang/nl.php
/files/xampp-test/htdocs/xampp/cds.php

Cheers

John

PS, any chance of getting a PHP build with '--with-imap' in :)

And well done on a nice slick pkg, which to be honest is rare these days, obv. a lot of time and effort has gone into this, let alone you cool site!
itsupplies
 
Posts: 5
Joined: 06. November 2004 13:34

Postby Oswald » 08. November 2004 16:24

Dear John!

Thanks for the list!

itsupplies wrote:PS, any chance of getting a PHP build with '--with-imap' in :)

And well done on a nice slick pkg, which to be honest is rare these days, obv. a lot of time and effort has gone into this, let alone you cool site!


Thanks again! ;)

And "--with-imap" will be part of the next release.

Greetings
Oswald
User avatar
Oswald
Apache Friends
 
Posts: 2718
Joined: 26. December 2002 19:51
Location: Berlin, Germany
Operating System: Linux


Return to XAMPP for Solaris

Who is online

Users browsing this forum: No registered users and 5 guests