Post by Calcite » Sat Nov 14, 2015 6:07 pm

My host upgraded their PHP version this week with no warning and I now cannot log in.

The error I get is:

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/mysite/public_html/vqmod/vqmod.php on line 329

I'm not good at coding so if anyone can help that would be great.

From memory I'm on Ver 1.54

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am


Post by madimar » Sat Nov 14, 2015 7:10 pm

Have you tried to upgrade your vqmod to last version?

Inviato dal mio Find 5 utilizzando Tapatalk

-----------------------------------------------------------------------
My last mods: Partita IVA e CF | Pro EU VAT Number | Sales Agents | Pricelist Pro
-----------------------------------------------------------------------


User avatar
Active Member

Posts

Joined
Thu Sep 24, 2009 6:27 pm


Post by Calcite » Sat Nov 14, 2015 7:13 pm

I think I have the latest version installed - 2.5.1 ?

My host replied to my email with this...

I can confirm that the PHP module mysqli and PDO are already enabled in the server.

+++
root@harpoon [~]# php -m | grep -i mysql
mysql
mysqli
mysqlnd
pdo_mysql
+++

Could you make the necessary changes in the script to make it compatible to work with these modules?


I changed the mysql to mysqliz.php after finding a fix for OC versions without the new sql driver. I edited the config files which allowed me to get into the Admin yesterday but now I just get the error message above when I go to /admin page.

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by uksitebuilder » Sun Nov 15, 2015 1:40 am

Definitely refers to an older version of vqmod

Either upgrade to 2.5.1 or in vqmod/vqmod.php

Find

Code: Select all

$modFilePath = preg_replace('/([^*]+)/e', 'preg_quote("$1", "~")', $modFilePath);
Replace with

Code: Select all

$modFilePath = preg_replace_callback('/([^*]+)/', function ($m) { return preg_quote($m[1], "~"); }, $modFilePath);

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Calcite » Sun Nov 15, 2015 1:43 am

I am running VQMOD 2.51 now but the only line vaguely close to yours is

$part = preg_replace_callback('~([^*]+)~', array('self', '_quotePath'), $part);

Wondering if I have the correct VQmod file as it does say 2.51 at the top.

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by Calcite » Sun Nov 15, 2015 6:09 am

I've gone another route now but without success.

Obtained a copy of my home Dir and Db before PHP upgrade.

Installed a fresh copy of 1.5.4.1 on a different server.

Tested it.

Deleted all but both config files

Uploaded the copy of the Public_html Dir

Emptied DB and imported the copy of original site.

Get the following error on login

Warning: require_once(../vqmod/vqmod.php): failed to open stream: No such file or directory in /home/mysite/public_html/index.php on line 15

Fatal error: require_once(): Failed opening required '../vqmod/vqmod.php' (include_path='.:/usr/local/php54/pear') in /home/mysite/public_html/index.php on line 15

Any ideas what can be done to fix it?
Last edited by Calcite on Sun Nov 15, 2015 5:44 pm, edited 1 time in total.

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by uksitebuilder » Sun Nov 15, 2015 4:07 pm

is the vqmod folder on the same level as your index.php file ?

does the vqmod folder contain the vqmod.php file ?

what is on line 15 of your index.php file ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Calcite » Sun Nov 15, 2015 6:18 pm

Thanks for the reply.

Vqmod.php is in the Vqmod folder.

Here is the section of the index.php with line 15 in bold

//VirtualQMOD
require_once('../vqmod/vqmod.php');
$vqmod = new VQMod();

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by uksitebuilder » Sun Nov 15, 2015 8:20 pm

Well, if vqmod folder and index.php are on the same level, the require_once is traversing backwards too deep.

require_once('./vqmod/vqmod.php');

rather than

require_once('../vqmod/vqmod.php');

will most likely fix it

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Calcite » Sun Nov 15, 2015 8:33 pm

Just checked that and it is correct as per your posting :(

// VirtualQMOD
require_once('./vqmod/vqmod.php');
$vqmod = new VQMod();

// VQMODDED Startup
require_once($vqmod->modCheck(DIR_SYSTEM . 'startup.php'));

// Application Classes
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/customer.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/affiliate.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/currency.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/tax.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/weight.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/length.php'));
require_once($vqmod->modCheck(DIR_SYSTEM . 'library/cart.php'));

UPDATE

May have been caching on test site as I now have site working but as per the actual live server I cannot see login in page :(

WHen I goto mysite.com/admin I get a 404 error page :(
Last edited by Calcite on Sun Nov 15, 2015 8:39 pm, edited 1 time in total.

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by uksitebuilder » Sun Nov 15, 2015 8:34 pm

The admin/index.php should have ../
The front-end index.php should have ./

Have you perchance uploaded the admin/index.php to the front-end by mistake (or vice versa)

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Calcite » Sun Nov 15, 2015 8:52 pm

Checked them and both are correct on test site.

Also uploaded a file to admin and tried to see it www.mysite/admin/test.pdf

it also shows 404

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by Calcite » Sun Nov 15, 2015 10:36 pm

UPDATE

Success but another question :)

I had an ideaa that the .htaccess fiel in /Admin might be stopping the admin page appearing (call it divine guidance or luck!)

Anyway its obviously there for a reason so I need to add am amended version but what to change?

original file is

AuthName "admin"
AuthUserFile "/home/mysite/.htpasswds/public_html/admin/passwd"
AuthType Basic
require valid-user

Can you see anything wrong with it?

UPDATE - could this be for a protected Dir? I have the live site set so that you have to provide a user and pwd for the Dir before getting to the OC login?

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by Calcite » Mon Nov 16, 2015 1:20 am

Have disabled protected Dir but added another secure solution and all is well, except for an error on saving products, which I have posted in a new topic.

Thanks for help.

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am

Post by uksitebuilder » Mon Nov 16, 2015 3:43 am

There is no .htaccess file in admin directory by default, so most likely you have password protected that directory via your hosting control panel.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Calcite » Mon Nov 16, 2015 3:46 am

Yes I was protecting the Dir as a double login
measure. I have now added another protection extension and a Captcha instead.

Active Member

Posts

Joined
Fri Dec 30, 2011 3:21 am
Who is online

Users browsing this forum: No registered users and 225 guests