TechnoSpain Posted February 11, 2014 Share Posted February 11, 2014 Hi english prestashop community I need your help Yesterday my server upgrades php from 5.2 to 5.4.25 and now received this error: "Fatal error: Class 'Db' not found in /home/xxxx/public_html/config/alias.php on line 64" I don't understand, before upgrade, I searched information in prestashop forums, all post said same, prestashop are compatible with php 5.4 or superior My prestashop are 1.5.6.2 I have 24 hours with problem, server people says "this problem are your app problem" info.php works (I check) SQL it's ok (I check) I'm desperate. I need your help Thanks in advance from Spain Carlos Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 My guess is that when they upgraded your php, they dropped a module(s) required by PrestaShop. you did not state if you had back office access but I suspect you have no access front or back. ? I would look to see if pdo_mysql or similar module (depends on fastcgi or apache module php)...is loaded... tip: create a subdomain and try an installation of prestashop, prestashop then see if any issues installing prestashoop also just because you 'checked' the phpinfo(), you may also want to post a temporary link here for community review Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 (edited) My guess is that when they upgraded your php, they dropped a module(s) required by PrestaShop. you did not state if you had back office access but I suspect you have no access front or back. ? I would look to see if pdo_mysql or similar module (depends on fastcgi or apache module php)...is loaded... tip: create a subdomain and try an installation of prestashop, prestashop then see if any issues installing prestashoop also just because you 'checked' the phpinfo(), you may also want to post a temporary link here for community review Hi..! MySQL works I check with mysqltest.php And php check with info.php and works Mi url: http://www.technospain.es Edited February 12, 2014 by TechnoSpain (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 do you see this file? http://screencast.com/t/NiJANcukwcVZ Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 do you see this file? http://screencast.com/t/NiJANcukwcVZ Yes, are in same folder: Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 Dear Patron (this is a spanish name, jejeje) Any advice about this problem? Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 Lets try a little test. find this code in classes/db/Db.php (line 217) public static function getClass() { $class = 'MySQL'; if (PHP_VERSION_ID >= 50200 && extension_loaded('pdo_mysql')) $class = 'DbPDO'; else if (extension_loaded('mysqli')) $class = 'DbMySQLi'; return $class; } add the following line just before return $class; $class = 'MySQL'; in other words force class as MySQL... public static function getClass() { $class = 'MySQL'; if (PHP_VERSION_ID >= 50200 && extension_loaded('pdo_mysql')) $class = 'DbPDO'; else if (extension_loaded('mysqli')) $class = 'DbMySQLi'; $class = 'MySQL'; return $class; } Dear Patron (this is a spanish name, jejeje) Any advice about this problem? I live part time in Spain. Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 Lets try a little test. find this code in classes/db/Db.php (line 217) public static function getClass() { $class = 'MySQL'; if (PHP_VERSION_ID >= 50200 && extension_loaded('pdo_mysql')) $class = 'DbPDO'; else if (extension_loaded('mysqli')) $class = 'DbMySQLi'; return $class; } add the following line just before return $class; $class = 'MySQL'; in other words force class as MySQL... public static function getClass() { $class = 'MySQL'; if (PHP_VERSION_ID >= 50200 && extension_loaded('pdo_mysql')) $class = 'DbPDO'; else if (extension_loaded('mysqli')) $class = 'DbMySQLi'; $class = 'MySQL'; return $class; } I live part time in Spain. Go to work in server Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 I do not understand last response. Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 I do not understand last response. Sorry for my bad english...only tried to say...work in process about changes the code .. Changed files in db.php and the error remains same Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 leave the changes and delete this file http://screencast.com/t/dtHx9W680Us Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 Deleted, now are a new error message Fatal error: Class '' not found in /home/xxxxx/public_html/classes/cache/Cache.php on line 131 Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 I think I am out of ideas on how to help with this. Please make sure to restore the Db.php code. you may need someone to do private work, if you want to go that way I'd contact selectshop.at or bellini13 I will follow to see status and will add more if I can think of anything. Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 thanks for your time Are normal this problem after upgrade php ? I don't understand Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 thanks for your time Are normal this problem after upgrade php ? I don't understand no this would be considered 'abnormal' it is not fair for hosting to upgrade php and break application...and then tell the application it's their fault..in my world they would get fired... Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 can you create a subdomain and do an install of ps? use your ps version from here: http://code.google.com/p/prestashop/downloads/list I would like to see what if any issues the installer has with your php environment. If it finds issues then it may be the same issue that is affecting your production shop. Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 Yes, think same..but.... In same VPS have one wordpress working and haven´t problems... http://www.elblogdetechnospain.com/ Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 can you create a subdomain and do an install of ps? use your ps version from here: http://code.google.com/p/prestashop/downloads/list I would like to see what if any issues the installer has with your php environment. If it finds issues then it may be the same issue that is affecting your production shop. Yes, I can, files are uploading while talking with you Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 Dear Patron.. only a little off topic... In which province of Spain you live when you visit us? Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 Dear Patron.. only a little off topic... In which province of Spain you live when you visit us? http://en.wikipedia.org/wiki/Bembibre but we have been all over (renfe) Spain. I am happiest when only Spaniards in my town. We are going to buy a piso S. City of Valencia. But we love all of Spain (well except where there are many drinking tourists). I have pension visa in Spain and Colombia (Medellin). Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 (edited) WOW beatiful little city I live in cartagena in Murcia province....about tourist..in summer are a lot.... Edited February 12, 2014 by TechnoSpain (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 how far along were you with your main shop? I don't like to tell people to start over from scratch..but if not a lot of lost work...then maybe it a good idea when you added subdomain was it as fastcgi or apache module? check the broken domain to see if same (fast cti or apache module) actually I think broken domaiin is running fastcgi...but if subomain is different that will be useful info Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 (edited) how far along were you with your main shop? I don't like to tell people to start over from scratch..but if not a lot of lost work...then maybe it a good idea when you added subdomain was it as fastcgi or apache module? check the broken domain to see if same (fast cti or apache module) actually I think broken domaiin is running fastcgi...but if subomain is different that will be useful info Store are all new, this monday finished, new prestashop (old are in 1.4.9.0) new theme, etc... I have replaced all files in classes New error... Notice: Undefined index: ToolsCore in /home/xxxx/public_html/classes/Autoload.php on line 115 Warning: require(/home/xxxx/public_html): failed to open stream: File exists in /home/xxxx/public_html/classes/Autoload.php on line 115 Fatal error: require(): Failed opening required '/home/xxxx/public_html/' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxx/public_html/classes/Autoload.php on line 115 Edited February 11, 2014 by TechnoSpain (see edit history) Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 how far along were you with your main shop? I don't like to tell people to start over from scratch..but if not a lot of lost work...then maybe it a good idea when you added subdomain was it as fastcgi or apache module? check the broken domain to see if same (fast cti or apache module) actually I think broken domaiin is running fastcgi...but if subomain is different that will be useful info Hi again Domain broken : Server API CGI/FastCGI Subdomain: Server API CGI/FastCGI Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 Something new server people repair this store (are in same VPS) they change php.ini http://www.tabletpipo.es In the other they can´t Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 do you have this running on a localhost? thinking delete the domain name and then readd domain name and then re-ftp up the files from localhost... what a mess eh? Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 Sorry, I don´t understand Would you like install in local copy and later up the files to server? Are this? Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 Something new server people repair this store (are in same VPS) they change php.ini In the other they can´t I hope this is good news!... now can they fix your techospain.es? I hope so. Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 I hope this is good news!... now can they fix your techospain.es? I hope so. No, they said "can not repair this app" they only can write new php.ini or downgrade php version Link to comment Share on other sites More sharing options...
El Patron Posted February 11, 2014 Share Posted February 11, 2014 tell them thanks for nothing..jajajaja I'd go for downgrade...get shop running.... back it all up let them upgrade php again delete the domain space add the domain space and load your back up... I really don't know what else to advise. suerte! Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 11, 2014 Author Share Posted February 11, 2014 Gracias..... Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 12, 2014 Author Share Posted February 12, 2014 Are news... Now can acces to home, but not works any link (account,produts, etc) http://www.technospain.es Back office not wroks Link to comment Share on other sites More sharing options...
El Patron Posted February 12, 2014 Share Posted February 12, 2014 Are news... Now can acces to home, but not works any link (account,produts, etc) Back office not wroks in what way does the back office not work? Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 12, 2014 Author Share Posted February 12, 2014 in what way does the back office not work? Hi Patron I´m tried to connect to admin folder but not works Always return one 404 mistake Lo sentimos! Página no disponible Lo sentimos, la página no se encuentra disponible. PARA BUSCAR UN ARTÍCULO, POR FAVOR, INDIQUE SU NOMBRE EN EL SIGUIENTE CAMPO: Link to comment Share on other sites More sharing options...
El Patron Posted February 12, 2014 Share Posted February 12, 2014 what was done to get the front office displaying again? Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 12, 2014 Author Share Posted February 12, 2014 Hi and thanks for your interest Yesterday went up files from the copy and it seems to fix some problems, return to clean cache, and write new .htcaccess It's a mistery but now works... Link to comment Share on other sites More sharing options...
El Patron Posted February 12, 2014 Share Posted February 12, 2014 I answered your message, I can see the login screen in the back office... you must be very tired Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 12, 2014 Author Share Posted February 12, 2014 Amazing! Return to clean cache, and now works! I'm a very happy man now! Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 12, 2014 Author Share Posted February 12, 2014 I answered your message, I can see the login screen in the back office... you must be very tired Tired.....this not correct....I'm dead...but happy... Link to comment Share on other sites More sharing options...
El Patron Posted February 12, 2014 Share Posted February 12, 2014 what a problem...I have never seen this...glad I could at least offer moral support... tip: clean out your shop urls from post so it won't affect seo. Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 12, 2014 Author Share Posted February 12, 2014 what a problem...I have never seen this...glad I could at least offer moral support... tip: clean out your shop urls from post so it won't affect seo. Yes, I think that all are cache problems, I clean again after up files from the copy and now I have operative shop with php 5.4.25 About clean URL? How do I do? Link to comment Share on other sites More sharing options...
El Patron Posted February 12, 2014 Share Posted February 12, 2014 edit your posts that contain your url and remove it...I have already done so for quoted posts... Happy Day!!!!!! now back up back up back up Link to comment Share on other sites More sharing options...
TechnoSpain Posted February 12, 2014 Author Share Posted February 12, 2014 edit your posts that contain your url and remove it...I have already done so for quoted posts... Happy Day!!!!!! now back up back up back up Thanks!!! Link to comment Share on other sites More sharing options...
jisas7 Posted August 8, 2022 Share Posted August 8, 2022 Hello from Barcelona! I have had the same error. It's true, it's a cache problem. I have deleted the file that El Patron said cache/class_index.php and everything is working again. Thanks for this post, otherwise I wouldn't have been able to fix it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now