Forums / Customization from the Admin / Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

Views: 4,910

Results 1 to 12 of 12
19 Aug 2012, 8:59 AM
#1
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

referring to the post title can this be done - I have an issue with not being able to access admin-tools-install sql patches (get a 403 errormsg) so wondering if I can import an SQL patch for a Plug-in installation directly via phpMyAdmin simply by using the import function ?? Will this work the same as the install SQL patch in admin/tools??

cheers,
Mike

oooops!! Title should read 'Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Admin-Tools-Install SQL patch ????' ...I must learn to type slower or at least lift my eyes to the screen before hitting send :)

19 Aug 2012, 12:10 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

You can *usually *run (not import) a SQL patch directly via your phpmyadmin. The one caveat is that, while the Install SQL Patch tool will replace any table names with your DB_PREFIX, that won't happen under phpmyadmin. If your DB_PREFIX is null (''), then you're good-to-go; if not, you'll need to edit the provided .sql file to add the prefix (e.g. customers becomes *zen_*customers) before running the SQL script.

19 Aug 2012, 3:01 PM
#3
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

lat9:

You can *usually *run (not import) a SQL patch directly via your phpmyadmin. The one caveat is that, while the Install SQL Patch tool will replace any table names with your DB_PREFIX, that won't happen under phpmyadmin. If your DB_PREFIX is null (''), then you're good-to-go; if not, you'll need to edit the provided .sql file to add the prefix (e.g. customers becomes *zen_*customers) before running the SQL script.

Thanks for that - I appreciate it. I am having my hosting provider look at sorting out the issue as per their response below.

One thing I wondered if you might also assist me with - as collateral damage in trying to get a plug-in loaded I lost the site altogether including admin - I now have admin back and from admin I can pull up the site but I cannot get it to load unless I add to the url ... /index.php . I figured it was something to do with configure.php but that is ok as is index.php. As far as I can tell I have deleted all files I uploaded for the plug-in and re-loaded the backed up files. I am scratching my head trying to figure why when typed into the browser the site won't load (blank page) but it does from admin when clicking Online Catalogue ?

Any ideas ??

cheers,
Mike

response from Host
"So we can resolve the mod_security trigger, please let us know the exact steps to replicate the error along with any login details required to do so. Once we have replicated the issue we can then whitelist the rules causing the grief."

19 Aug 2012, 3:04 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

Any chance there's a file named index.html in the root directory of your store ? If so, delete it.

19 Aug 2012, 3:16 PM
#5
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

stevesh:

Any chance there's a file named index.html in the root directory of your store ? If so, delete it.

Thanks Steve - there was a file index.php in the root (not index.html) and I deleted it but alas it hasn't solved the problem in fact it brought up a 404 error when I then tried to access the site from admin.

That index file was there in the root previously without causing any issues so I reinstated it and now can get to the site again via admin :frusty:

I am not a developer but wondered could it be to do with auto-loaders? Anyway I will leave it to your expertise to come up with some suggestions.

I again thank you for your assistance.

cheers,
Mike

19 Aug 2012, 3:31 PM
#6
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

What's in /YOUR_ADMIN/.htaccess? The unmodified file's size for v1.5.0 is 1841 bytes.

19 Aug 2012, 6:42 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

did you say you deleted index.php?
You shouldn't be deleting index.php files anywhere unless you know exactly why you're doing that.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Aug 2012, 1:02 AM
#8
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

lat9:

What's in /YOUR_ADMIN/.htaccess? The unmodified file's size for v1.5.0 is 1841 bytes.

Thanks for your response lat9. MY-ADMIN/.htaccess file size is 1.94kb (note that I am still using v1.3.9h) - I have posted the contents below. I have never 'directly' modified a .htaccess file so any content I assume must be original plus any mods if any done by plug-ins. The .htaccess file content below is an exact match for the same file in another site of mine. I have also included the INCLUDES/.htaccess file in case there is an issue with it. This file is totally different to the same file in my other site - no comparison at all?

I really do appreciate all the help I can get.

ADMIN/.htaccess

@copyright Copyright 2003-2010 Zen Cart Development Team

@license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

@version $Id: .htaccess 16111 2010-04-29 22:39:02Z drbyte $

This is used with Apache WebServers

The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions

It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.

Will also prevent people from seeing what is in the dir. and any sub-directories

For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.

Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.

Example:

#<Directory "/usr/local/apache/htdocs">

AllowOverride Limit Options Indexes

#</Directory>
###############################
DirectoryIndex index.php

deny everything

<FilesMatch "...">
Order Allow,Deny
Deny from all
</FilesMatch>

but now allow just certain necessary files:

<FilesMatch "(^$|^favicon.ico$|.*.(php|js|css|jpg|gif|png)$)">
Order Allow,Deny
Allow from all
</FilesMatch>

IndexIgnore /

The following makes adjustments to the SSL protocol for Internet Explorer browsers

<IfModule mod_setenvif.c> <IfDefine SSL> SetEnvIf User-Agent ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 </IfDefine> </IfModule>

Fix certain PHP values

#<IfModule mod_php4.c>

php_value session.use_trans_sid 0

php_value register_globals 1

#</IfModule>

to turn off register_globals

php_value register_globals 0

#turn off X-PHP-Originating-Script header when sending emails from admin
#uncomment to activate:

php_flag mail.add_x_header Off

INCLUDES/.htaccess

@copyright Copyright 2003-2010 Zen Cart Development Team

@license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

@version $Id: .htaccess 17394 2010-08-28 03:16:06Z drbyte $

This is used with Apache WebServers

The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions

It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.

Will also prevent people from seeing what is in the dir. and any sub-directories

For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.

Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.

Example:

#<Directory "/usr/local/apache/htdocs">

AllowOverride Limit Options Indexes

#</Directory>
###############################

deny everything

<FilesMatch ".*">
Order Allow,Deny
Deny from all
</FilesMatch>

but now allow just certain necessary files:

<FilesMatch ".*.(js|JS|css|CSS|jpg|JPG|gif|GIF|png|PNG|swf|SWF|xsl|XSL)$">
Order Allow,Deny
Allow from all
</FilesMatch>

IndexIgnore /

NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):

OPTIONS -Indexes -ExecCGI

20 Aug 2012, 1:14 AM
#9
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

DrByte:

did you say you deleted index.php?
You shouldn't be deleting index.php files anywhere unless you know exactly why you're doing that.

I figure that to be good advice - I had backed up just before attempting to install the mod so when Steve suggested deleting index.html if it was in the root (which it wasn't but its cousin was) I figured it would be OK to do as I had the file backed up.

Having said that all is back to where it was but index page won't load if typed in to browser directly whereas it loads from admin or in browser with any page extenstion = jewelleryonlinestore.com.au/ANY EXTENSTION.

In my very amateur status I figure logically it must be somewhere in the string that says 'load this page' ... so whatever files are required to implement that command come under the microscope (index.php, main_page.php, 'auto-loader' files .... and possibly a dozen others ??).

I am trying to do file comparisons to my other site (harmonyballpendants.com) which was 'originally' a copy of jewelleryonlinestore.com.au but then with certain products deleted so it is ostensibly a mirror image of part of the JOS site - any installation of plug-ins mods done to one site is done on the other so maybe I can find some clues during this file comparison process ..... if not then I at least feel good that I am trying something :)

Looking forward to your continued help Doc.

cheers,
Mike

p.s. Host has sorted out the security_mod issue so now I have access to admin/tools/install sql patches (the catalyst to this resultant problem)

20 Aug 2012, 2:23 AM
#10
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,848
Plugin Contributions:
17

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

I figure that to be good advice - I had backed up just before attempting to install the mod so when Steve suggested deleting index.html if it was in the root (which it wasn't but its cousin was) I figured it would be OK to do as I had the file backed up.:huh:
Steve was pretty specific> Any chance there's a file named index.html in the root directory of your store ? If so, delete it.Sometimes we all miss the small things but there's a big difference between html and php.
Not trying to knock you down. Just want lurkers to know it is important to RTFI (Read the FULL Instructions).

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Aug 2012, 2:56 AM
#11
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

dbltoe:

:huh:
Steve was pretty specificSometimes we all miss the small things but there's a big difference between html and php.
Not trying to knock you down. Just want lurkers to know it is important to RTFI (Read the FULL Instructions).

Thanks dbltoe - yes he was specific and yes there is a big difference between the files and you are right I didn't look with my eyes (I really have to stop using my ears for sight purposes).

NOW I know what the difference is in appearance - one is s blue file and the other is a round FireFox coloured logo that stands up and says "here I am". I took DrByte's advice and asked my Host to have a look at the index.php issue in case it was an Apache thing. They have since come back and said "index.html takes priority over index.php
You have a blank index.html file in your /public_html directory." .... made sense so I have spent 20 minutes or so looking for the blank index.html file - found about 15 or so files in different folders and none of them are blank so I have asked the Host to specify exactly where the offender is situated so I can add the content to it that appears in every other example, i.e.

<html> <head> <title></title> <meta content=""> <style></style> </head> <body></body> </html>

I have by the way deleted the index.html file from the root and it made no difference so I reinstated it. That file was in the root when I made a FULL site back up prior to installing 'Dual Pricing - Wholesale Pricing' plug-in which stalled with the forbidden access issue with Install SQL patches in admin/tools, which is now all sorted after the host whitelisted the appropriate files in mod_security.

So now I am awaiting a response from the Host - for the life of me I cannot figure in which folder the offending file is - every obvious folder in admin and includes has been thoroughly searched as have other folders like Auto Loaders.

Hopefully this gets sorted soon and I can get back to business development rather than putting out spot fires :)

cheers and Many Thanks for your assistance to date.

cheers,
Mike

20 Aug 2012, 3:19 AM
#12
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Upload SQL Patch via phpMyAdmin in MySQL INSTEAD OF Amin-Tools-Install AQL patch ????

SUCCESS !!

Steve was spot on right from word go :smartalec: I just didn't recognize the file because I was looking for the wrong thing :blush:

Deleting index.html from the root worked (second time - deletion didn't actually work first time - FileZilla issue).

Thank you ALL for your help - it wasn't wasted effort believe me. I have learned a few substantial lessons during this 'situation' and learned them from experienced people who bother to take the time to help others like me. (hopefully one day I can be of help to others as I gain knowledge).

cheers,
Mike