Hi,
What's the chance of getting these add on scripts updated?
PHP Nuke is not up to 6.7 and oSc just released 2.2 M2, which deals with some security issues, and makes it easer to submit to search engines..
Thanks
cPanel.net Support Ticket Number:
Hi,
What's the chance of getting these add on scripts updated?
PHP Nuke is not up to 6.7 and oSc just released 2.2 M2, which deals with some security issues, and makes it easer to submit to search engines..
Thanks
cPanel.net Support Ticket Number:
It is ugly but it works:
Update the cPanel scripts to osCommerce 2.2 Milestone 2 (07/12/2003)
save the file, rename to oscocPanel.net Support Ticket Number:# Al Smith
# Update cPanel osCommerce software to later version
# Get the osCommerce download then create a install pkg for cPanel
# Start in the /tmp directory
cd /tmp
# Update this link to get the latest version. This example is the osCommerce 2.2 Milestone 2 (07/12/2003)
#
URL=http://heanet.dl.sourceforge.net/sourceforge/tep/oscommerce-2.2ms2.tar.gz
wget $URL
# Unpack it
tar zxvf oscommerce-2.2ms2.tar.gz
DIR=/tmp/oscommerce-2.2ms2
# this unpacks to a oscommerce-2.2ms2 directory with a catalog directory
# the catalog has the admin directory beneath it. we need to reverse the
# structure of the pkg.tar.gz. it has pkg/catalog and pkg/admin in it.
mkdir /tmp/os /tmp/os/catalog /tmp/os/admin
cd $DIR
cp -r catalog /tmp/os/catalog
cd catalog
cp -r admin /tmp/os/admin
rm -rf /tmp/os/catalog/catalog/admin
mv /tmp/os /tmp/pkg
# make sure we are in the /tmp directory
cd /tmp
tar cvfz pkg.tar.gz pkg
# Now put it in the /usr/local/cpanel/addons/osCommerce directory
osDir=/usr/local/cpanel/addons/osCommerce
cp $osDir/pkg.tar.gz $osDir/pkg.tar.gz.old
cp pkg.tar.gz $osDir
# Clean up old files
rm pkg.tar.gz
rm -rf pkg
rm -rf /tmp/os /tmp/os/catalog /tmp/os/admin
#
# End
#
cPanel.net Support Ticket Number:
-Albert
Firstly, good work on the script...
My only problem... I ran it exactly as you wrote, and oscommerce now installs without the user permission error I had previously... but it looks for all images in /images instead of ./images .. so on my server it looks for http://<myserver>/images instead of http://<myserver>/osc/images
Any idea how to fix this other than moving the images into /images ? I've been looking but can't find a option in the oscommerce admin site to change this.
Regards,
Michael
cPanel.net Support Ticket Number:
The install script needs to be updated.
The new version uses:
so you need to edit the install script:define('DIR_WS_HTTP_CATALOG', '');
define('DIR_WS_HTTPS_CATALOG', '');
Find
[QUOTE]regsrep("$installdir/includes/configure.php","\\(\'DIR_WS_CATALOG\'","define(
'DIR_WS_CATALOG', '$installpath/');");[\QUOTE]
replace withadd a line withregsrep("$installdir/includes/configure.php","\\(\'DIR_WS_HTTP_CATALOG\'","define(for the SSL.regsrep("$installdir/includes/configure.php","\\(\'DIR_WS_HTTPS_CATALOG\'","define(
That should do it.
Here is my install from /usr/local/cpanel/addon/osCommerce
I had to redo mine since the keep update is turned on on the WHM so keep a copy around or Turn it Off.Code:#!/usr/bin/perl BEGIN { push(@INC,"/usr/local/cpanel"); } use SafeFile; #VARIBLES my $domain = '%domain%'; my $installpath = '%installpath%'; my $modulename = '%modulename%'; my $modulepath = '%modulepath%'; my $homedir = '%homedir%'; my $user = '%user%'; my $installdir = '%installdir%'; my $publichtml = '%public_html%'; my $sqldb = '%sqldb%'; my $sqluser = '%sqluser%'; my $sqlpass = '%sqlpass%'; my $sqlserver = '%sqlhost%'; my $username = '%username%'; my $password = '%password%'; print "We are installing in $installdir...\n"; system("mysql -u${sqluser} -p${sqlpass} ${sqldb} < $installdir/pkg/catalog/catalog /install/oscommerce.sql"); system("mv $installdir/pkg/catalog/catalog/* $installdir/"); system("mv $installdir/pkg/admin/admin $installdir/"); system("mv $installdir/pkg/tep-docs $installdir/"); regsrep("$installdir/includes/configure.php","\\(\'HTTP_SERVER\'","define('HTTP_SE RVER', 'http://$domain');"); regsrep("$installdir/includes/configure.php","\\(\'HTTPS_SERVER\'","define('HTTPS_ SERVER', 'https://$domain');"); regsrep("$installdir/includes/configure.php","\\(\'DIR_WS_HTTP_CATALOG\'","define( 'DIR_WS_CATALOG', '$installpath/');"); regsrep("$installdir/includes/configure.php","\\(\'DIR_WS_HTTPS_CATALOG\'","define ('DIR_WS_CATALOG', '$installpath/');"); regsrep("$installdir/includes/configure.php","\\(\'DB_SERVER\'","define('DB_SERVER ', '$sqlserver');"); regsrep("$installdir/includes/configure.php","\\(\'DB_SERVER_USERNAME\'","define(' DB_SERVER_USERNAME', '$sqluser');"); regsrep("$installdir/includes/configure.php","\\(\'DB_SERVER_PASSWORD\'","define(' DB_SERVER_PASSWORD', '$sqlpass');"); regsrep("$installdir/includes/configure.php","\\(\'DB_DATABASE\'","define('DB_DATA BASE', '$sqldb');"); #do we need this? #regsrep("$installdir/includes/configure.php","\\(\'STORE_SESSIONS\'","define('STO RE_SESSIONS', 'mysql');"); unlink("$installdir/includes/configure.php.tmpeditlib"); regsrep("$installdir/admin/includes/configure.php","\\(\'HTTP_SERVER\'","define('H TTP_SERVER', 'http://$domain');"); regsrep("$installdir/admin/includes/configure.php","\\(\'HTTPS_SERVER\'","define(' HTTPS_SERVER', 'https://$domain');"); regsrep("$installdir/admin/includes/configure.php","\\(\'DIR_WS_ADMIN\'","define(' DIR_WS_ADMIN', '${installpath}/admin/');"); regsrep("$installdir/admin/includes/configure.php","\\(\'DIR_WS_CATALOG\'","define ('DIR_WS_CATALOG', '${installpath}/');"); regsrep("$installdir/admin/includes/configure.php","\\(\'DB_SERVER\'","define('DB_ SERVER', '$sqlserver');"); regsrep("$installdir/admin/includes/configure.php","\\(\'DB_SERVER_USERNAME\'","de fine('DB_SERVER_USERNAME', '$sqluser');"); regsrep("$installdir/admin/includes/configure.php","\\(\'DB_SERVER_PASSWORD\'","de fine('DB_SERVER_PASSWORD', '$sqlpass');"); regsrep("$installdir/admin/includes/configure.php","\\(\'DB_DATABASE\'","define('D B_DATABASE', '$sqldb');"); #do we need this? #regsrep("$installdir/admin/includes/configure.php","\(\'STORE_SESSIONS\'","define ('STORE_SESSIONS', 'mysql');"); unlink("$installdir/admin/includes/configure.php.tmpeditlib"); chmod(0777,"$installdir/images"); mkdir("$installdir/admin/backups",0777); chmod(0777,"$installdir/admin/backups"); system("rm","-rf","$installdir/install"); link("$installdir/default.php","$installdir/index.php"); print "<b>Complete!</b>\n"; print "<br>You can access your new cart at: <a href=\"http://$domain/$installpath/ \">http://${domain}${installpath}/</a><br>\n"; print "<br>You can access the admin interface at: <a href=\"http://$domain/$instal lpath/admin/\">http://${domain}${installpath}/admin/</a> with the username: ${user name}, and the password: ${password}.<br>\n"; print "<br><br>\n"; sub regsrep { my($file,$old,$new) = @_; $filelock = SafeFile::safeopen(\*FH,"$file"); $fileeditlock = SafeFile::safeopen(\*FHT,">$file.tmpeditlib"); while(<FH>) { if ($_ =~ /^$/ || $_ eq "\n" || $_ eq "\r\n") { print FHT "$_"; } elsif($_ =~ /$old/) { $result = $1; my $mnew = $new; $mnew =~ s/\$1/$result/g; print FHT "$mnew\n"; } else { print FHT $_; } } SafeFile::safeclose(\*FH,$filelock); SafeFile::safeclose(\*FHT,$fileeditlock); $fileeditlock = SafeFile::safeopen(\*FHT,"$file.tmpeditlib"); $filelock = SafeFile::safeopen(\*FH,">$file"); while(<FHT>) { print FH $_ }; SafeFile::safeclose(\*FH,$filelock); SafeFile::safeclose(\*FHT,$fileeditlock); }
cPanel.net Support Ticket Number:
-Albert
So .. how to update php-nuke script then?
Anyone knows step by step like oscommerce above would be appreciated if you share it with us
Ah .. yes i almost forget.
The install script for oscommerce like asmithjr wrote has a little error on product link. Here the correction :
And the correction :Originally posted by asmithjr
regsrep("$installdir/includes/configure.php","\\(\'DIR_WS_HTTP_CATALOG\'","define(
'DIR_WS_CATALOG', '$installpath/');");
regsrep("$installdir/includes/configure.php","\\(\'DIR_WS_HTTPS_CATALOG\'","define
('DIR_WS_CATALOG', '$installpath/');");
[/code]
cPanel.net Support Ticket Number:Code:regsrep("$installdir/includes/configure.php","\\('DIR_WS_HTTP_CATALOG'","define('DIR_WS_HTTP_CATALOG', '$installpath/');"); regsrep("$installdir/includes/configure.php","\\('DIR_WS_HTTPS_CATALOG'","define('DIR_WS_HTTPS_CATALOG', '$installpath/');");
Last edited by isputra; 09-12-2003 at 08:05 PM.
It's me ...... It's me ......
Other than his being on 4 lines instead of your 2, what's the difference?
cPanel.net Support Ticket Number:
Code from asmithjr :
And the correction :Code:regsrep("$installdir/includes/configure.php","\\('DIR_WS_HTTP_CATALOG'","define('DIR_WS_CATALOG', '$installpath/');"); regsrep("$installdir/includes/configure.php","\\('DIR_WS_HTTPS_CATALOG'","define('DIR_WS_CATALOG', '$installpath/');");
See the difference ?Code:regsrep("$installdir/includes/configure.php","\\('DIR_WS_HTTP_CATALOG'","define('DIR_WS_HTTP_CATALOG', '$installpath/');"); regsrep("$installdir/includes/configure.php","\\('DIR_WS_HTTPS_CATALOG'","define('DIR_WS_HTTPS_CATALOG', '$installpath/');");
cPanel.net Support Ticket Number:
It's me ...... It's me ......
I see i put the wrong script in. Thanks for catching it for this update.
cPanel.net Support Ticket Number:
-Albert
Ah yes, thankyou very much
cPanel.net Support Ticket Number:
No problem
cPanel.net Support Ticket Number:
It's me ...... It's me ......
Hi guys. I have a problem with the install script (i think).
I have a few customers trying to install this. It's giving 1044 mysql errors on the install output in cPanel. I tried the install on multiple accounts. Same result. I tried the script posted here for updating and sure enough it looks great and works like the other version.. well same result. I can't get the thing to install and yes I have versions running that were installed fine a week or so ago and yes plenty of mySQL: db's on user account.
any clues??
cPanel.net Support Ticket Number:
Just keeping my "eye" on things....
R. Paul Mathews
RPMWS - diehard cPanel Nutcase
actually I just verified this on 4 servers, 5 domains. I get this error when loading the index page on the osc dir.
1046 - No Database Selected
select configuration_key as cfgKey, configuration_value as cfgValue from configuration
cPanel.net Support Ticket Number:
Just keeping my "eye" on things....
R. Paul Mathews
RPMWS - diehard cPanel Nutcase
We're getting the exact same error on servers with the latest Edge release.Originally posted by rpmws
actually I just verified this on 4 servers, 5 domains. I get this error when loading the index page on the osc dir.
1046 - No Database Selected
select configuration_key as cfgKey, configuration_value as cfgValue from configuration
On servers with WHM 7.4.2 cPanel 7.4.2-R158, no problem installing and the cart works great.
Help!
cPanel.net Support Ticket Number: 23425
Here's the latest from Cpanel:
Yes, this seems to be a bug, I'll forward this to the developers.
Thank you.
cPanel.net Support Ticket Number: 23425