Jump to content

Unable to Autogenerate .htaccess file v1.6.1.24


tanmalik786

Recommended Posts

Under the 'SEO & URL' section, trying to setup "Friently URL" for the domain - I see a message 

URL rewriting (mod_rewrite) is not active on your server, or it is not possible to check your server configuration. If you want to use Friendly URLs, you must activate this mod.

I am using other domains [most of them using WordPress], so am sure that the mod_rewrite is enabled BUT somehow Prestashop [the only Prestashop install on this server]is not able to check it from the server.

image.thumb.png.eaad0f9177e52fb3e54ac97733853ff9.png

Expected behavior

The settings on that page are used to recreate the .htaccess in the root folder, which is not being generated due to the problem as stated above.

 

Note: I just checked my cPanel log and found this 

[15-Oct-2020 03:10:44 US/Eastern] PHP Warning:  Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /home/nikpaul/public_html/nikshop/classes/Rijndael.php on line 124

in there, sharing it here as it may be pointing to something meaningful.

Edited by Tanver (see edit history)
Link to comment
Share on other sites

Running PS 1.6 with PHP 7 gives problems. Unfortunately Prestashop doesn't want to update that version. So you have two option if you want to run PHP 7: either you upgrade to PS 1.7 or you switch to Thirty Bees, a Prestashop clone that continues the 1.6 line and runs ok under PHP 7.

Link to comment
Share on other sites

Regarding the first error i.e.

Quote

URL rewriting (mod_rewrite) is not active on your server, or it is not possible to check your server configuration. If you want to use Friendly URLs, you must activate this mod.

As error clearly says, mod_rewrite (Its a apache module) is not enabled to your server, You need to enable the same on the apache & then need to restart the apache (OR need contact hosting service provider).

Quote

[15-Oct-2020 03:10:44 US/Eastern] PHP Warning: Use of undefined constant MCRYPT_RIJNDAEL_128 - assumed 'MCRYPT_RIJNDAEL_128' (this will throw an Error in a future version of PHP) in /home/nikpaul/public_html/nikshop/classes/Rijndael.php on line 124

Its due to PHP version compatibility issue as mentioned by musicmaster. 

Link to comment
Share on other sites

Thanks you very much for your response @musicmaster, I have gone with the first option and have in fact upgraded it to the PS v1.7.6.8.

Everything apparently seems to be working in the BO BUT I am unable to access the front-end, I see an error in the cPanel log folder though

PHP Fatal error:  Uncaught  --> Smarty Compiler: Syntax error in template "file:/home/nikpaul/public_html/nikshop/modules/blockcart/blockcart.tpl"  on line 63 "{convertPrice price=$cart->getOrderTotal(false)}" unknown tag 'convertPrice' <-- 
  thrown in /home/nikpaul/public_html/nikshop/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 63

I have tried to fix it by myself but no luck, can someone please give me an indicator as to what I can do to get it resolved?

TIA

Link to comment
Share on other sites

2 minutes ago, Tanver said:

Thanks you very much for your response @musicmaster, I have gone with the first option and have in fact upgraded it to the PS v1.7.6.8.

Everything apparently seems to be working in the BO BUT I am unable to access the front-end, I see an error in the cPanel log folder though


PHP Fatal error:  Uncaught  --> Smarty Compiler: Syntax error in template "file:/home/nikpaul/public_html/nikshop/modules/blockcart/blockcart.tpl"  on line 63 "{convertPrice price=$cart->getOrderTotal(false)}" unknown tag 'convertPrice' <-- 
  thrown in /home/nikpaul/public_html/nikshop/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 63

I have tried to fix it by myself but no luck, can someone please give me an indicator as to what I can do to get it resolved?

TIA

What PHP version are you running? You shouldn't run anything newer than 7.2.

Link to comment
Share on other sites

@musicmasterI just noticed another thing which is strange for me, Server information reveals that there are 

Missing files (92)
vendor/composer/installers/LICENSE
vendor/composer/installers/src/bootstrap.php
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
.
.

all of them are being reported under the 'vendor/composer/installers/src' folder except for the LICENSE files which is in "vendor/composer/installers/" folder. Can this be the issue? if yes, how can I get it fixed?

Link to comment
Share on other sites

3 hours ago, Tanver said:

@musicmasterI just noticed another thing which is strange for me, Server information reveals that there are 


Missing files (92)
vendor/composer/installers/LICENSE
vendor/composer/installers/src/bootstrap.php
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
.
.

all of them are being reported under the 'vendor/composer/installers/src' folder except for the LICENSE files which is in "vendor/composer/installers/" folder. Can this be the issue? if yes, how can I get it fixed?

I don't know whether this is the problem. But it won't hurt replacing them.

You can just copy the files from a fresh Prestashop installation of the same version.

Link to comment
Share on other sites

I see the following folders /files in /var/cache folders .. can I delete all of them?

[root@wolf cache]# pwd
/var/cache
[root@wolf cache]# ls -l
total 4
drwxrwxr-x.  2 abrt   abrt      6 Apr  2  2020 abrt-di
drwx------.  3 nobody nobody   19 Sep 29 14:19 apache2
drwx------.  3 apache apache   19 May 22  2019 httpd
drwx------.  2 root   root     23 Oct 13 12:20 ldconfig
drwxr-xr-x. 38 root   root   4096 Oct 16 03:31 man
drwxr-xr-x.  2 root   root      6 Jun  9  2014 php-pear
drwxr-xr-x.  3 root   root     20 Apr  2  2020 yum

 

Edited by Tanver (see edit history)
Link to comment
Share on other sites

@musicmasterfor your help, I am almost giving up on it and may have to start with a fresh install of v1.7 and then do the customizations for this client to give him something [aesthetically] similar to what he currently have in v1.6.

@muscicmaster, you may not be seeing 'prod' or 'dev', cause I have disabled cache on this as of now.

 

Edited by Tanver (see edit history)
Link to comment
Share on other sites

:P 

 

Quote

PHP Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/home/nikpaul/public_html/nikshop/modules/blockcart/blockcart.tpl" on line 63 "{convertPrice price=$cart->getOrderTotal(false)}" unknown tag 'convertPrice' <--

If you are referring to above error, then simply delete the modules/blockcart folder. Blockcart module for the PS1.6 only. Ideally it should be deleted during upgrade but might be possible it got skipped. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...