Undefined index: HTTP_X_URL_BEFORE_REWRITE - zend-framework

I have the application which was written in Zend Framework. When I try to open the index file it give me an error:
PHP Notice: Undefined index: HTTP_X_URL_BEFORE_REWRITE in
C:\Inetpub\wwwroot\test\library\Zend\Controller\Request\Http.php on
line 326 PHP Notice: Undefined index: HTTP_X_URL_BEFORE_REWRITE in
C:\Inetpub\wwwroot\test\library\Zend\Controller\Request\Http.php on
line 326
it`s depends of this line in index.php
echo $ctrl->dispatch();
because when I coment it, application give me white site.
$ctrl is:
$ctrl = Zend_Controller_Front::getInstance();
$ctrl->setBaseUrl('/test');
$ctrl->throwExceptions(true);
$ctrl->registerPlugin(new DPCPluginAuth($auth, $acl));
$ctrl->setControllerDirectory($config->controllers->toArray());
echo $ctrl->dispatch();
and the function of liblary Zend is localized on Zend/Controller/Request/Http.php and name public function setRequestUri
Please help me ... I don't know what's incorrect in that code and what means that message.
My mod_rewrite module is ISAPI_Rewrite3_Lite

Related

TYPO3 - Ext cal - PHP Catchable Fatal Error

I use the Ext "cal", when I add an Image to an Event, i got this Error:
PHP Catchable Fatal Error: Object of class
TYPO3\CMS\Core\Resource\FileReference could not be converted to string
in typo3/sysext/core/Classes/Resource/ResourceFactory.php line 430 .
When I disable the Image everything is fine. Any Solutions for that?
TYPO3-Version: 6.2.27
Show your code or the error didn't happen. ;-)
Educated guess: you use a file reference in your view helper instead of using treatIdAsReference = "1"

Call to a member function get_cart_subtotal() on a non-object in config-woocommerce/config.php on line 790

I'm trying to login into my WordPress Admin panel, and am getting the following error:
Call to a member function get_cart_subtotal() on a non-object in /home/spicom/public_html/adwinang.com/wp-content/themes/enfold/config-woocommerce/config.php on line 790
This is my code at line 790:
$cart_subtotal = $woocommerce->cart->get_cart_subtotal();
It sounds like you haven't called global $woocommerce;, before trying to access the $woocommerce object.
A better way would be to use WC():
$cart_subtotal = WC()->cart->get_cart_subtotal();
Alternatively, it's possible the WooCommerce hasn't even been installed and activated...make sure to do that, if it's a theme dependency.
I had a very similar message.
[25-Sep-2018 10:24:08 UTC] PHP Fatal error: Uncaught Error:
Call to a member function get_cart_subtotal() on null in
themes\storefront\inc\woocommerce\storefront-woocommerce-template-functions.php:80
It was due to me having the following in my wp-config.php file.
define( 'DOING_CRON', false );
I'd added this line while attempting to run something from the command line with W3 Total Cache activated. I didn't realise that it would completely ruin WooCommerce and didn't notice the side effect until attempting to view the site in my browser.

How to open a new tab in a firefox browser using selenium remote driver in perl scripting?

I am trying to open new tab in firefox using selenium::Remote::Driver in perl language, i am using below code, i am getting error as"Can't call method "send_keys" on an undefined value at D:/workspace/SamplePerl_project/sample.pl line 9."can you please suggest me how to open a new tab or new window in firefox in perl language...please help me...thanks in advance..
**sample.pl**
use Selenium::Remote::Driver;
use Selenium::Remote::WDKeys;
my $driver = new Selenium::Remote::Driver;
if(defined $driver)
{
print "driver is defined";
$driver->get("https://www.google.co.in/");
$driver->set_implicit_wait_timeout(40000);
#$driver->send_modifier('Ctrl','t');
$driver->find_elements("body")->send_keys(KEYS->{'Ctrl','t'});
}
I am using send_keys method for that i got error as"Can't call method "send_keys" on an undefined value ",i am using send_modifier for that also i got error as"Error while executing command: Server returned error code 404 and no data at",please help me.
find_elements returns elements. Plural. You are unable to send_keys on an array of objects.
What you want is:
$driver->find_element("body")->send_keys(KEYS->{'Ctrl','t'}); # without the 's'

How to customize the login page of vBulletin 4

I am using vBulletin version 4.1.4. I want to re-design the login page (it is separated with current vBulletin skin), I have tried using these instructions http://www.vbgeeko.com/archives/217 but it shows an error:
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: navbar in [path]\includes\functions.php on line 4114
( ! ) Parse error: syntax error, unexpected T_STRING in D:\wamp\www\vBulletin Forum v4.1.4\upload\clogin.php(42) : eval()'d code on line 1
Call Stack
# Time Memory Function Location
1 0.0007 374496 {main}( ) ..\clogin.php:0
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: clogin in [path]\includes\functions.php on line 4114
So how can I make a custom login page of vBulletin 4?

Ember.js asset pipeline “Unable to find template”

I am having trouble getting my handlebars templates accessible in rails 3.1. I have the following controller:
Lead.Controllers.UrlSearch = Ember.Object.extend
init: ->
view = Ember.View.create
controller: #
urlSearchBinding: 'controller.url_search'
templateName: 'app/templates/url_search/show'
On the rails side of things, I have a the following initialisation script in config/initializers/sprockets.rb
require 'sprockets/ember_handlebars'
Rails.application.assets.register_engine 'hjs', EmberHandlebars
My EmberHandleBars looks like this:
require 'tilt'
require 'json'
class EmberHandlebars < Tilt::Template
def self.default_mime_type
"application/javascript"
end
def prepare
end
def evaluate(scope, locals, &block)
"Ember.TEMPLATES['#{scope.logical_path}'] = Ember.Handlebars.compile(#{data.to_json})"
end
end
Finally, the template is located in:
app/assets/javascripts/app/templates/url_search/show.jst.hjs
In there error console, I get this 404 resource error:
GET
http://localhost:3000/assets/app/templates/url_search/show.hjs.js?body=1
404 (Not Found)
and also
Error: - Unable to find template
"app/templates/url_search/show".
I am confused why it is looking for an hjs.js file when I have specified otherwise and why it cannot find the template.
Can anyone see what I am doing wrong?
Changing the file extensions form .jst.hjs to just .hjs fixed the problem.