Unable to install Opencart 3.0.2.0 in Linux Server - php

When I try to install Opencart V3.0.2.0 in Linux server, getting following error message.
Fatal error: Internal Zend error - Missing class information for in
/system/storage/vendor/twig/twig/lib/Twig/ParserInterface.php on line
31
I am not able to start my installation process. Any idea, Please help.

While this is not guaranteed to work, but since few people reported that they have been able to solve it disabling APC I would give it a try.
If you want to disable Alternative PHP Cache (APC), you can do so by modifying your PHP initialization file file.
Using your hosting account's editor (Web & Classic / cPanel / Plesk), open your website's PHP initialization file.
Note: I recommend backing up your PHP initialization file file before modifying it. You can do this by copying and renaming it in your file manager.
On a new line, type apc.enabled=0
Save your changes.

Related

I am getting an error [Unable to find the wrapper "chrome-extension"] with TCPDF

I have an OpenCart e-commerce system setup. I tried to use TCPDF module for generating PDF Invoices of my existing orders.
Module Name: TCPDF
URL: https://sourceforge.net/projects/tcpdf/
Version: 5.9.202
Release date: 2012-12-16
Author: Nicola Asuni
This Modules seems to work fine on my Local (Dev Environment) but it does not function on my Production environment (which is similar in configs).
Error:
Warning: file_exists(): Unable to find the wrapper "chrome-extension" - did you forget to enable it when you configured PHP? in /var/www/html/2store/catalog/tcpdf/tcpdf.php on line 2Warning: file_exists(): Unable to find the wrapper "chrome-extension" - did you forget to enable it when you configured PHP? in /var/www/html/2store/catalog/tcpdf/tcpdf.php on line 2
TCPDF ERROR: [Image] Unable to get image: chrome-extension://lifbcibllhkdhoafpjfnlhfpfgnpldfl/call_skype_logo.png
I tried troubleshooting but I am not able to find what is causing it. Can anyone please advice?
Firstly, you're using a really old version of TCPDF. You should use the latest version from https://github.com/tecnickcom/TCPDF.
Secondly, it looks like you're asking TCPDF to include an image using a URL but you are providing a URL that would probably only work locally on a browser. The wrapper that the error is talking about is related to streams. See http://php.net/manual/en/intro.stream.php Basically, "chrome-extension" is not a valid stream. Examples of valid types of streams can be found here: http://php.net/manual/en/wrappers.php I'm surprised this URL worked locally, but I guess it's because you have Chrome installed locally so your operating system is being nice and allowing PHP to access the file referred to by that URL.
To resolve your issue on the server you will need to grab a copy of the file that you want to include in the PDF file, put it somewhere on the server in a directory that the web server user can access and provide that file name to TCPDF.

Intermittent Magento Errors

We are having issues with our staging machine, which is running Magento EE 1.13.1
The problem started happening Tuesday afternoon.
At that time we updated an installed php / mysql application.
On the main magento site, the browser is redirected to the magento install page.
The problem occurs only within the Magento application and is related to sessions – when the error occurs, magento throws a fatal similar to this:
(I created a small test application to try to isolate the problem).
Fatal error: Call to a member function getCode() on a non-object in /var/www/html/app/code/core/Mage/Customer/Model/Session.php on line 71
Call Stack: 0.0002 653728
1. {main}() /var/www/html/t.php:0 0.3013 8153600
2. Mage::getSingleton() /var/www/html/t.php:20 0.3013 8153912
3. Mage::getModel() /var/www/html/app/Mage.php:477 0.3013 8153912
4. Mage_Core_Model_Config->getModelInstance() /var/www/html/app/Mage.php:463 0.3016 8302032
5. Mage_Customer_Model_Session->__construct() /var/www/html/app/code/core/Mage/Core/Model/Config.php:1348
The issue only occurs intermittently, and we can temporarily fix it by stopping and starting the httpd service.
We are running magento ee 1.13.1, php 5.3.3, and httpd 2.2.15
This is happening on a staging machine. Our production machine which has the same system and code on it, it working correctly.
We have tried to turn on/off magento compiling, caching, php apc, changed the php sessions to use the disk rather than /tmp/fs, and changed magento to use the DB for its sessions.
The site fails after several minutes.
There are no errors in the system logs.
Can someone suggest how to debug this?
This turned out to be an issue related to the libxml_disable_entity_loader() function.
The zend framework calls this function libxml_disable_entity_loader(true) and then calls it again with (false).
There is a path through our code that was leaving this set to true.
This setting's scope is not limited to the current php script, but to the current httpd process. I.e. it's sticky, and this prevents php's simplexml_load_file function from loading external files.
I came across this article:
Intermittent simplexml_load_file(): I/O warning on local Joomla site
Which led me discover that libxml_disable_entity_loader is not thread safe, and indeed 'sticky' within httpd processes.
Disable Magento compilation:
$ php -f shell/compiler.php -- disable
Compiler include path disabled
There are three ways in which this can be done:
From Magento admin
Navigate to System → Tools → Compilation page and click on Disable button. Navigate to System → Cache Management screen and use Flush Cache button.
Using SFTP, by editing at includes/config.php file
To disable compilation in Magento, edit includes/config.php. Uncomment the first line and comment out the second:
define('COMPILER_INCLUDE_PATH', dirname(FILE).DIRECTORY_SEPARATOR.'src');
define('COMPILER_COLLECT_PATH', dirname(FILE).DIRECTORY_SEPARATOR.'stat');
Using SSH shell program:
php -f shell/compiler.php -- disable
php -f shell/compiler.php -- clear

PHP log full of suhosin errors

Hello I have simple php script well it is more a html file with few php lines.
Yet it produces tons of errors in log that look like this on every line:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
I can not locate in nowhere in code where suhosin might been called...
This error is present on 2 different servers.
EDIT:
In phpinfo there is no suhosin present...
Thanks.
We will likely need more information in order to provide an accurate resolution, such as What version of PHP is installed on your system? however I will give you a general resolution.
Generally this issue is caused by PHP Upgrade, most recent PHP versions does not support suhosin as this only applied to older versions of php that needed additional security.
If you are on a shared hosting server you need to contact to your hosting provider and notify them about this issue, they are likely able to resolve it quickly.
If you are on a Dedicated server, VPS server or a localhost environment you can solve this issue by following the steps below:
Find your php.ini location [You can use phpinfo() to locate php.ini file]
Open the php.ini file and search suhosin.so
When you find suhosin comment this line extension = "suhosin.so" by adding semicolon at the beginning of the line, For example: ;extension = "suhosin.so"
Save this file
Restart Apache service httpd restart
Note: If ClouldLinux installed on your server, you need to force update CageFS by issuing the following command at the command line cagefsctl --force-update

"The specified procedure could not be found" IIS 6.0 and PHP5

I am trying to make PHP5 work over IIS 6.0 on Windows server 2003 and i am following this steps:
http://www.iisadmin.co.uk/?p=4
The thing is, there's no file named "php5isapi.dll" inside the php folder, so I am using php5isapi.dll instead. Is it correct? Or should I try to download the php5isapi.dll from somewhere.
Well, then, I keep following the steps and when I try to execute my php file, I get this message:
The specified procedure could not be found.
What am I doing wrong?
Thanks.
UPDATE
I downloaded php5isapi.dll and tried to make it work with it but i am getting this error:
The specified module could not be found.
Also, after any change, i restart the Default Web Site clicking on stop and play.
UPDATE 2
Now, after rebooting, when trying to access the PHP file, the browser shows a 500 error:
The page cannot be displayed
I noticed that "php5isapi.ll" is no longer available for the last versions of PHP as pointed in here:
Why is php5isapi.dll missing after installing PHP for Windows?
Therefor, what i did was following this tutorial in order to do it with FastCGI
http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/using-fastcgi-to-host-php-applications-on-iis-60
I found it on this comment:
Why is php5isapi.dll missing after installing PHP for Windows?
After restarting the server, it finally worked.

Unable to use PHP curl on amazon ec2 free tier

I am currently moving my web app to amazon ec2. Since it's only for testing, I use the free version called ec2 free tier with windows server 2008 instance. However, Although I have done all I know and read this thread ( How to enable cURL in PHP / XAMPP ). I just couldn't use curl on my php script. it always creates the error
Call to undefined function curl_init() in C:\xampp\htdocs\index.php on line 2
Here are all thing I have tried
Install Wamp ( I tried it on XAMPP to)
Uncomment out php_curl in php.ini file ( and restart apache)
Copy two dll files to both system32 and syswow64
Could it have to do with the fact that I am using free vps?
Update:
Also, when I started the apache server in XAMPP , this error appeared
'PHP Startup: unable to load dynamic library curl.dll'
However, I have double checked the ext directory and the php_curl.dll was in there.
i think curl need to access remote sever from our web server. so i opened all traffic in my server outbound rule and it works. i think this is not good solution. still look for better way.
nope.
be sure, that you have the files in the right place, usually its in the plugins folder for php! maybe you cann add a absolute path to your php.ini!
be sure, you edit the correct ini file!
php completly independent to your operatingsystem!
just be sure to doublecheck everything. because its not saying, it has trouble loading your extention, its just saying, the function your trying to call, is not there. so i assume your extention ist not loading at all! :)
One reason I did notice for this cURL plugin to malfunction was the availability of copies of libeay32.dll and ssleay32.dll files. Please check whether your system32 folder has such copies and if so, please rename them to some other names and copy the ones found with the php installation. Sometimes you may need to restart your machine. This was documented here some time ago.
I had a similar problem, but it occours just with requests under https. I tried to create a curl request directly from the ec2 machine and got a error: "curl: (77) error setting certificate verify locations".
It looks like some kind of ssl validation fail because of a certificate not found. So I used a parameter -k (or --insicure) in my curl command, to ignore this validation and after that my curls request did directly from ec2 machine worked.
So I tried to apply a similar ideia in my curl command in php, (I suppoused that the curl php extension forward this requests to the operation system) and I found this curl opt:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
After that it works to me.
Probably this isn't the best way to solve the problem, but solved my problem temporarelly.

Categories