I'm trying to install the couponic on my localhost (xampp), but I'm getting an error message:
Strict Standards: Non-static method UFactory::getModuleAlias() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\couponic\framework\uniprogy\framework\worklets\UWorkletConstructor.php on line 254
This is one of the errors, but all of them are from the same type on the same function (getModuleAlias).
I already rename the protected/config/inital folder to protected/config/public and when I access using the url right url (localhost/couponic/install) I get these errors.
Can you help me?
The problem here is that you have install probably in localhost php 5.4 and couponic doesn't support php 5.4, to bypass this problem you will have to replace
public function getModuleAlias($module)
with
static public function getModuleAlias($module)
but more problem will come up, until uniprogy make the script working on php 5.4
Disable strict errors in your php.ini:
error_reporting = E_ALL
Right now you probably have:
E_ALL & E_STRICT
So you need to lose the E_STRICT part.
I had "E_ALL" already and it wasn't working. I switched to "E_ERROR" and that did the trick.
error_reporting = E_ERROR
E_ALL "includes E_STRICT as of PHP 6.0.0" but we're not quite there yet.
Related
I'm trying to override the csp module of magento but I get an error i don't understand : Unknown module
here is my module.xml registration.php the error i get
First try Running, your module will be enabled auto if everything good.
php bin/magento s:up
Also Check your directory is correct, i see in screenshots app/Code , c needs to be small.
Hope it helps!!
I am completely new to Seleniu, and am trying to set up PHPUnit with Selenium 2, following this tutorial https://www.youtube.com/watch?v=zva_GETXimI
So far this is what I've done:
Installed PHPUnit using PHAR as instructed here https://phpunit.de/manual/current/en/installation.html
Installed Selenium Server
Upgraded to PHP5.6 (but my Apache is still 2.22 instead of 2.4)
Installed PHPUnit_selenium package using Composer
Created a testLogin.php file:
<?php
class testLogin extends PHPUnit_Extensions_Selenium2TestCase{
public function setUp()
{
$this->setHost('localhost');
$this->setPort(4444);
$this->setBrowser('firefox');
$this->setBrowserUrl('http://localhost/Achievers');
}
}
When I run testLogin.php using 'phpunit testLogin.php' I get an error:
Class 'PHPUnit_Extensions_Selenium2TestCase' not found in /home/osadmin/projects/Sel/testLogin.php on line 5
Since I am just starting out, I have no idea how to fix this. On googling the error, it shows to add this line to my php file:
require_once('PHPUnit/Extensions/Selenium2TestCase.php');
But I'm not sure how I can use this since there is no PHPUnit folder, just a file linked to the PHAR.
Could someone please shed some light on how to fix this issue?
Thanks.
EDIT:
As per Ushakov's suggestion, I tried /path/to/phpunit.phar testLogin.php
But it gives the same error.
If I add this line to the testLogin.php: require_once('/usr/local/bin/phpunit');
and run /path/to/phpunit.phar testLogin.php
I get this:
#!/usr/bin/env php
PHP Notice: Constant __PHPUNIT_PHAR__ already defined in /usr/local/bin/phpunit on line 18
PHP Notice: Constant __PHPUNIT_PHAR_ROOT__ already defined in /usr/local/bin/phpunit on line 19
PHP Fatal error: Cannot redeclare class DeepCopy\DeepCopy in phar:///usr/local/bin/phpunit/myclabs-deep-copy/DeepCopy/DeepCopy.php on line 15
Solved it by adding this line to the PHP file:
require_once 'vendor/autoload.php';
No tutorial I have seen mentions this, but it can be found in github projects
For anyone else coming late to the party - this worked for me:
class testLogin extends \PHPUnit\Extensions\Selenium2TestCase
(Using PHP 7.0.3 and installing Selenium package with Composer ).
I am new to yii 2.0. I installed my first Yii2.o application on my server and configred URL to use user friendly urls. However, I am getting
Warning: Module 'mysql' already loaded in Unknown on line 0
message when I go to the web/about/ URL. I tried to remove the base rout using "defaultRoute" in web.php but that is also not possible.
Please help me to figure out this issue.
That has nothing to do with Yii 2.0. It's a PHP misconfiguration.
Probably, you've enabled mysql extension twice. Search in your php.ini and extensions ini files:
extension=mysql.so
or
extension=mysql.dll
I had the same problem and i fix it by deleting this line in my php.ini:
extension=mysql.so
located in: /etc/php5/apache2/ and restarting apache2 service:
sudo service apache2 restart
Whenever I try to load the libmod_sm22.so or libmodsm_20.so module into apache-2.4.6, I am getting error as shown below :
httpd: Syntax error on line 65 of httpd.conf: Cannot load /opt/software/siteminder/waR12cr009/webagent/bin/libmod_sm22.so into server: /opt/software/siteminder/waR12cr009/webagent/bin/libmod_sm22.so: undefined symbol: unixd_config
From the apache documentation I found that apache-2.4.6 API has changed ‘unixd_config’ to ‘ap_unixd_config’!
But the libmod_sm20.so / libmod_sm22.so is still looking for ‘unixd_config’
In the apache’s include folder I have found references for the unixd_config symbol as shown below
============================================================================
[apache#VDCLL1828 include]$ cat ap_mmn.h |grep 'unixd_config'
* 20071108.9 (2.3.0-dev) Add chroot support to unixd_config
* 20101106.2 (2.3.9-dev) Add suexec_disabled_reason field to ap_unixd_config
* add ap_unixd_config.group_name
[apache#VDCLL1828 include]$ cat unixd.h |grep 'unixd_config'
} unixd_config_rec;
AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;
===========================================================
I didn’t try to change these references as these are not completely related to what I am looking for & in turn this may break other working things if I mess up.
At this point I have two options to make siteminder working in apache-2.4.6
1) Prepare the libmod_sm22.so that it looks for ap_unixd_config instead of unixd_config (If possible)
2) Look out for a patch to apache 2.4.6 api .
Any thoughts around this are highly appreciated.
Thanks,
Kiran
i created a simple project with zf and it works fine, but when i copy it to other pc
it just show a blank page without any page or errors ?
my zf version is 1.9 and in other pc zf version 1.9 too
what do you do about this problem?
Do you have error reporting enabled on your machine?
Make sure, that you have these lines in your php.ini file:
error_reporting = E_ALL
display_errors = on
It will help you to find the problem by showing the error.
If it doesn't help, try to put this code in your index.php in public directory
ini_set('display_errors', 1);
Also make sure, that DocumentRoot points to your Zend project public folder.
Are the memory limits the same on both servers? I have seen similar results using php (with zend, albeit). When I run out of memory, just a blank white screen is the result.
This error is caused because your server is running version 4 of PHP, change to version 5 and it will work.