PHP scripts on WAMP generating errors - php

I'm getting below errors from my local WAMP environment
Unknown error: Non-static method SJB_System::shutdownFunction() should not be called statically in C:\wamp\www\engjobs\system\core\System.php on line 161
Unknown error: Declaration of GoogleSocialPlugin::ifUserIsRegistered() should be compatible with SJB_SocialPlugin::ifUserIsRegistered($network, $profileSocialID = NULL) in C:\wamp\www\engjobs\system\plugins\google_integration_plugin\google_integration_plugin.php on line 9
Unknown error: Non-static method GoogleSocialPlugin::getNetwork() should not be called statically in C:\wamp\www\engjobs\system\plugins\google_integration_plugin\index.php on line 7
Unknown error: Non-static method SJB_SocialPlugin::getNetwork() should not be called statically in C:\wamp\www\engjobs\system\plugins\google_integration_plugin\index.php on line 7
Unknown error: Declaration of SJB_TwitterDetails::getDetails() should be compatible with SJB_ObjectDetails::getDetails() in C:\wamp\www\engjobs\system\plugins\twitter_integration_plugin\Twitter\TwitterDetails.php on line 156
I wasn't getting this from production server but with WAMP I'm getting this.
It's PHP, custom framework called Smart Job Board which is built on top of Zend framework

Related

Application running on localhost and not in server

I have an application running in my localhost developed in codeigniter. I uploaded to server but the application doesn't run. All credentials have been changed to match the server settings. I have viewed this answers but seem irrelevant to my situation as it is running in localhost: Error message Strict standards: Non-static method should not be called statically in php and Codeigniter Model Fatal error: Using $this when not in object context
The error I'm getting is here:
A PHP Error was encountered
Severity: 8192
Message: Non-static method login::index() should not be called statically
Filename: MX/Controller.php
Line Number: 169
Fatal error: Uncaught Error: Using $this when not in object context in
/var/www/html/stallion/application/modules/admin/controllers/login.php:13
Stack trace: #0
/var/www/html/stallion/application/third_party/MX/Controller.php(169): login::index() #1
/var/www/html/stallion/system/core/CodeIgniter.php(326):
MX_Controller->_remap('index', Array)
#2 /var/www/html/stallion/index.php(203):
require_once('/var/www/html/s...') #3 {main} thrown in
/var/www/html/stallion/application/modules/admin/controllers/login.php on line 13
Thanks.
I'm running this on Ubuntu 14.0 php version 7.0 so I can't understand why it's working in my localhost and on the server I get this error!
I reckon it's a php issue because I just uploaded to a different server and it works fine. Same OS but different php versions

Cannot install OJS on freebsd php 7.2

I'm trying install to my vmware freebsd, i did install msqli, php, apache all lastest version and when i tried to install ojs im gettings this errors, please help thanks.
Function create_function() is deprecated in in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/classes/install/form/InstallForm.inc.php on line 92
Deprecated: Non-static method Application::getName() should not be called statically in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/classes/install/form/InstallForm.inc.php on line 146
Deprecated: Non-static method Application::getName() should not be called statically in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/classes/install/form/InstallForm.inc.php on line 148
Deprecated: Non-static method Application::getName() should not be called statically in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/classes/install/form/InstallForm.inc.php on line 150
Deprecated: Non-static method VersionCheck::getCurrentCodeVersion() should not be called statically in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/classes/install/form/MaintenanceForm.inc.php on line 37
Deprecated: Non-static method PKPRequest::getUserVar() should not be called statically in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/classes/form/Form.inc.php on line 369
Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/classes/core/PKPRequest.inc.php on line 592
Deprecated: Function create_function() is deprecated in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty_Compiler.class.php on line 269
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty_Compiler.class.php on line 559
Deprecated: Function create_function() is deprecated in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty_Compiler.class.php on line 269
Deprecated: Function create_function() is deprecated in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty_Compiler.class.php on line 269
Deprecated: Function create_function() is deprecated in /usr/local/www/apache24/data/ojs-3.1.0-1/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty_Compiler.class.php on line 269
OJS currently (as of OJS 3.1.0-1) relies on the create_function function, but that dependency is not major and will be removed before the function is no longer available in PHP.
I recommend disabling deprecation warnings and keeping your OJS up to date.
OK, i installed ojs but after the installation im getting the blank page when im opening the logs, im getting this error;
Recoverable fatal error: ini_set(): Cannot set 'user' save handler by ini_set() or session_module_name() in /usr/local/www/apache24/data/lib/pkp/classes/session/SessionManager.inc.php on line 36
Any recommend would be nice for me guys.

Getting error when trying to install POS on Localhost : Fatal error: Can't use method return value in write context

I am trying to install opensourcepos from https://github.com/jekkos/opensourcepos
But I am getting this error:
Fatal error: Can't use method return value in write context in D:\Xampp\htdocs\opensourcepos\application\helpers\locale_helper.php on line 67
A PHP Error was encountered
Severity: Compile Error
Message: Can't use method return value in write context
Filename: helpers/locale_helper.php
Line Number: 67
Backtrace:
I followed instructions, this is a brand new install, I'm at a loss...
I'm on WIndows 7, using Localhost with Xampp
The line 67 is question is this one:
if (empty($config->item('thousands_separator')))
When I comment it out, the site loads, but it doesn't work
check readme txt
You are getting following error Message: Can't use method return value in write context saying that you are probably using PHP7 which is not completely supported yet. Check your hosting configuration to verify whether you have a supported PHP version installed

Zend 2.3.1 cannot run on server

I developed a website at local by Zend Framework 2.3.1, but when I upload it on production (PHP 5.3.3) it displayed blank page.
An elder developer debugged and said that maybe error occurred because of ZF version. He has a website on that server which is developed by Zend Framework 2.2.5 and it runs OK.
I copied all ZF 2.2.5 library into my website, but I received these error:
Strict Standards: Declaration of Application\View\Helper\Custommenu::renderNormalMenu() should be compatible with Zend\View\Helper\Navigation\Menu::renderNormalMenu(Zend\Navigation\AbstractContainer $container, $ulClass, $indent, $minDepth, $maxDepth, $onlyActive, $escapeLabels, $addClassToListItem) in D:\WebTool\module\Application\src\Application\view\Helper\Custommenu.php on line 16
Warning: Missing argument 9 for Application\View\Helper\Custommenu::renderNormalMenu(), called in D:\WebTool\library\Zend\View\Helper\Navigation\Menu.php on line 219 and defined in D:\WebTool\module\Application\src\Application\view\Helper\Custommenu.php on line 85
Fatal error: Zend\Navigation\Exception\BadMethodCallException: Bad method call: Unknown method Zend\Navigation\Page\Mvc::getTextDomain in D:\WebTool\library\Zend\View\Helper\Navigation\AbstractHelper.php on line 169
Is there any solution to solved this problems?

Moving Wordpress site from Linux to Windows throws errors

I've been asked to move someone's blog from a Linux server to a Windows 2008 box. I used Xampp on the new box. When I try to access the blog I get the following errors:
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 472
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 487
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 494
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-settings.php on line 530
Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594
Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594
Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594
Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 594
Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 611
Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705
Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705
Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705
Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 705
Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\classes.php on line 728
Strict Standards: Redefining already defined constructor for class wpdb in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\wp-db.php on line 306
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\cache.php on line 103
Strict Standards: Redefining already defined constructor for class WP_Object_Cache in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\cache.php on line 425
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\query.php on line 21
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\theme.php on line 623
Strict Standards: Redefining already defined constructor for class WP_Dependencies in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\class.wp-dependencies.php on line 15
Warning: Creating default object from empty value in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\update.php on line 39
Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\class.wp-dependencies.php:15) in C:\xampp\htdocs\newblogBlog\httpdocs\wp-includes\pluggable.php on line 770
Any ideas?
I think your php.ini in your linux server was desactivating errors reporting.
For the strict standards you can hide them by removing E_STRICT from the option error_reporting in you php.ini file (but it may be better to fix them).
for the rest of the issues I do recommand you to fix them, especialy the warnings.
Also check that the PHP version in linux is the same as in windows, migrating from a version to another may result in issues like this.
check the used php-version on the server and on the xammp-box. You can do this with creating a single file that contains the single line
<?php phpinfo(); ?>
This gives you the used versions. If you can use the same versions on old and new system you can get less warnings, perhaps...
And if there are still the warnings, you can filter them out with the right entries in the php.ini.
it is recommended for a productive system to not display errors, someone could use the information to hack your system... you can change the detail level of displaying errors as mentioned by Yazmat, or turn off the displaying of errors in php.ini like this:
display_errors = 0

Categories