I have a problem in osCommerce 2.3
PHP/5.6.31
I have tried to setup on my localhost but it will return an error message.
So how can I fix this problem
Is there any problem in the configuration?
Error!
Unable to determine the page link!
Function used:
tep_href_link('', '', 'NONSSL')
If you look in catalog/includes/functions/html_output.php, you'll see the function definition for tep_href_link. It's
function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
You have provided a blank first parameter. If you look at some examples in the catalog directory, you'll see they provide a first parameter, generally drawn from a define in includes/filenames.php.
i have faced same issue and on debug found this issue comes due to tep_href_link(basename($PHP_SELF) $PHP_SELF is not working properly return blank and got fixed just placing
$PHP_SELF=$_SERVER['PHP_SELF'];
define('CONFIGURE_STATUS_COMPLETED', 1);
at the bottom of includes/configure.php and it worked.
Related
I have a blank page when using Slim3 + Twig2 + PHP 7.2 when I run the application on production (OVH server).
I'have been looking for any answer to my problem, but none of what I have found corrected it...
Thanks for your answer.
Here is my code in one of my controller :
function getAccueil($request, $response, $args = array(NULL))
{
if (empty($args))
{
$args['lang'] = 'fr';
}
$lang = $args['lang'];
$fr_url = '/fr.html';
$en_url = '/en.html';
return $this->view->render($response, 'accueil.twig', array(
'lang' => $args['lang'],
'fr_url' => $fr_url,
'en_url' => $en_url,
));
}
I'm using php 7.2 (and already tried with previous versions)
and get a 200 return http code (using Chrome/Devlopment tools/Network)
Try doing killing the script with die(); before returning the twig renderer. If it still gives a blank page maybe check if something is wrong in the php file where you define your $app and $container. Hope that you can do something with this answer.
it's been a while since i've purchased freelancer office on codecanyon. i'm using it since 2015. I've never had an issue till last week. If I type in a wrong password it gives me an error (which is normal :D) however when i type the correct one it just reloads the page :/ i've set the ENVIRONMENT to production but no error messages.. except for deprecated each() call in mx/modules.php file.
Codeigniter version: v3.1.0
php version : 7.1
app url:
http://app.wolftech.eu
i've the same error with another 'app' that ive bought on codecanyon for a friend of mine. after 1 year of succesfull usage it just reloads the page when attempting to login.
Based on the error output that you've provided, I assume that the error comes from codeigniter modular extension hmvc, that show up because it uses each() function that is deprecated.
If you look at one of the official repository pull request, and from this codeigniter forum thread, you could change the third_party/MX/Modules.php files line 83 :
(is_array($module)) ? list($module, $params) = each($module) : $params = NULL;
and replace it to :
if(!is_array($module))
{
$params = NULL;
}
else
{
$keys = array_keys($module);
$params = $module[$keys[0]];
$module = $keys[0];
}
im trying to connect my local wordpress install to a db on a domain i own using the code provided here:
https://coderwall.com/p/ck8v4a/remote-database-with-local-wordpress-instance
define('WP_CACHE', true); $currenthost = $_SERVER['HTTP_HOST'];
$mypos = strpos($currenthost, 'localhost/wpdir');
if ($mypos === false) {
define('WP_HOME','http://example.org/wpDir/');
define('WP_SITEURL','http://example.org/wpDir/');
} else {
define('WP_HOME','http://localhost');
define('WP_SITEURL','http://localhost/wpDir/');
}
with the above config i can open the site locally, it loads the navigation and recent post names correctly, so the db-connection seems to work.
i cannot use links and pages are not found though.
if i add my /wpDir/ to the define('WP_HOME'... and/or strpos($currenthost,... it gets redirected to http://localhost/wpDir/home/ (as it should) but i get an URL not found error.
my localhost dir is standard /var/www/html this is where my local wordpress installations are.
any ideas how to fix this?
update: i am back to working on this and it would really help a lot if i could manage to use the remote database for my local testing
i think it may be some kind of url rewriting problem but all my efforts to find a solution did not work...
not sure why it was so hard to find but i managed to do it (another way) basically by following the wp-codex here:
https://codex.wordpress.org/Running_a_Development_Copy_of_WordPress
using the drop-in method:
the code in my db.php file looks like this:
<?php
// paste this in a (new) file, wp-content/db.php
add_filter ( 'pre_option_home', 'test_localhosts' );
add_filter ( 'pre_option_siteurl', 'test_localhosts' );
function test_localhosts( ) {
if (strcasecmp($_SERVER['REQUEST_URI'], '/localCopyOfSite') == 0
|| strcasecmp(substr($_SERVER['REQUEST_URI'], 0, 17), '/localCopyOfSite/') == 0) {
return "http://localhost/localCopyOfSite/";
}
else return false; // act as normal; will pull main site info from db
}
when i open my web site in homepage i see only header and this error :
Catchable fatal error: Object of class WP_Error could not be converted
to string in /home/mahooorc/public_html/wp-includes/formatting.php on
line 3275
this problem is just on my homepage and other links are ok. i disabled all plugins but it doesn't answer! line 3275 is
$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%#$\|*\'()\\x80-\\xff]|i', '', $url);
function esc_url( $url, $protocols = null, $_context = 'display' ) {
$original_url = $url;
if ( '' == $url )
return $url;
$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%#$\|*\'()\\x80-\\xff]|i', '', $url);
This is usually caused by missing taxonomies that are used in a menu, but do not exist anymore.
You have a couple of solutions to try, but do not forget to always create a backup of your files and database before you try any of them.
Method 1
Remove the taxonomy items from the menu
Delete all session data, cookies etc...
Method 2
Find the table wp_term_taxonomy in the database
Find a record called nav_menu
Delete that record
Method 3
Find the table wp_terms in the database
Look at the different terms and decide which ones you do not need
Delete the terms you do not need anymore
When none of these solutions, or a combination of the solutions work, please let me know. You have still a couple more options, but those are a lot more destructive.
Instead of receiving the expected $url as as string, the esc_url() function receive a WP_Error object.
Try to add this code before the faulty line to learn more about the error:
echo $url->get_error_message();
It will display the error message which can help you understand where it comes from.
Remember to remove this added line after that.
People having the same issue are often talking about encoding problems. Are you using special encoding ?
I have a problem concerning url-rewriting in wordpress. I am currently working on a language plugin (nearly finished also) and as a last thing, I would like to see every url altered so that it contains the current language that has been selected by the user (or a default language if the user hasn't changed the language).
I don't have a problem altering the links, the problem lies with the rewriting done by the server. Below you can find how I change the links.
public function register_filters()
{
add_filter('page_link', array(get_class(),'alter_permalink'));
add_filter('post_link', array(get_class(),'alter_permalink'));
}
public function alter_permalink($permalink)
{
$permalink = str_replace(get_option('home'), '', $permalink);
$permalink = trim($permalink, '/');
//The next line is actually a method that is being called,
//but it will return a string like this.
$lang = 'EN';
return get_option('home') . '/' . $lang . '/' . $permalink;
//This returns a link that looks something like this:
//http://somedomain.com/EN/permalink-structure
}
So as you can see, I have no problems creating the links, the problem lies with the url-rewriting on the server itself.
I have tried this method: http://shibashake.com/wordpress-theme/wordpress-permalink-add
but I didn't get that one to work either. The problem is that I just don't seem to understand how these rewriting-rules work and that I can't seem to find a decent tutorial on the subject either.
Any help would be greatly appreciated.
the filter to listen to for handling url is request.
function request_handler($vars) {
//modified $vars here
return $vars;
}
add_filter('request', 'request_handler', 11);
i have written a plugin for customize url in wp. check out the source and see how i handle it.
http://wordpress.org/extend/plugins/auto-url/