When I install new Joomla and my component are in Joomla 2.5x and I am updating Joomla 3x version but in front-side I get an error:
Ex:syntax error, unexpected end of file
As i have investigated with that above error you have posted, they might be a two reason for that, either the component not install correct or In the code you have missed the curly prases at the end of the php file.
So there is two steps which overcome this problem,
1) Reinstall the component which solve this issue.
2) Find the exact file and found that might be syntactically not correct (i.e, <?php} {?> and <? ).
Please avoid <? and use <?php and keep spaces at curly braces (i.e, <? } ?> instead of <?php } ?>
go to php.ini then find short_open_tag= Off set to short_open_tag= On
If you want further more, please check this links ComponentReinstall
Link2
Thanks & Regards,
Kaif
Related
I'm getting a "blade not found shop.cart.favorites" error when running in Docker on Ubuntu. (Therefore: "case-sensitive file system.")
I suspect that the culprit is case-sensitivity. The path to the blade file is:
resources/views/Shop/Cart/favorites.blade.php
^ ^
Did I guess correctly?
You have made a little mistake bro...
Change in your Controller/Function where you defined the View .Like this.....
return View('Shop.Cart.favorites');
It will work.. Check it out..
Thank you.
In the process of rendering a View, the view() method in Laravel checks to see if a Blade template file exists at the path provided using the PHP built-in method file_exists().
Although the docs don't mention it at all, it has long been observed that this function can be case sensitive (typically on *nix-based filesystems, though not on Windows). But since you don't necessarily know where your code will be run (e.g. if you are creating a package), best practice for cross-platform compatibility is to use only lowercase filenames for Blade template files.
Okay, thanks folks. Indeed, that's the [ANSWER] I was expecting: the underlying filesystem is case-sensitive, and therefore so is PHP (file_exists() et al ...), and therefore so is Laravel. Blade file and folder names are case-sensitive.
Now ... here's a follow-on question: is there a handy-dandy plugin for Laravel that might enable me to "skate around" this issue? (Yeah, I think I know what that answer will be, too. But it doesn't hurt to ask ...)
I am using the n98-magerun version 1.101.1 for my Magento 1.9x version. When I execute this command php n98-magerun.phar rewrites:analysis:top then it shows
[Exception]
Table 'my_database.core_url_rewrite' doesn't exist query
I have found that the issue is because its not considering the table prefix. Why?
My actual name of table with prefix is mg_core_url_rewrite. But when I execute any kind of n98-magerun command then it always considers without prefix like core_url_rewrite.
How to fix this issue?
mesk,
There is one issue like you get it, You will get solution here, Please check it https://github.com/netz98/n98-magerun/issues/994
If you have any trouble then let me know.
Today I was just coding some Jspx page using Spring framework and an error appared that I didn't understand because I had just copy past the same several time and it was working perfectly with just the original line. It seems that the following lines were unusable :
<spring:url var="goto" value="/resources/images/goto16.png" />
<img alt="goto" src="${goto}"/>
But if I change the name "goto" to anything else, "got" for instance, then it woks fine !
I guess that this word is protected because used for another purpose, but I didn't find a clue about this problem on the net.
Does anyone know something about this matter ? I don't really need "goto" but I would like to know why I can't use it.
Thanks
goto is a reserved word in Java, and as JSP's are translated into Java source code the variable name will appear somewhere in that code, causing the compilation issue.
I need to write a php preg_match to identify a price between some tags in a bit of html I have stored in a variable:
<span class="price-ld">250</span>
I tried writing it like this, but it keeps giving me errors:
preg_match('/<span class="price-ld">(.*)/i', $candidate[0], $price);
I am very new to php and all these delimeters is very heavy to me. I would really appreciate some help from you pros - probably very easy to you!
First of all - http://php.net/manual/en/function.preg-match.php - read it, please.
Then you see that /(.*)/i matches a whole string.
Please, give here your piece of html (it's needed to know the price wrapping tags).
I've created a php file called pagebase.php that I'm quite proud of. It contains a class that created the whole html file for me from input such as css links and js links.
In any case, this file is several hundred lines long, as it includes several helper functions such as cleanHTML() that removes all whitespace from the html code then, in layman's terms, makes the source look pritty.
I have decided to use this pagebase in all my projects, particularly in all my internal projects. I also plan to add and expand to the pagebase file quite a lot. So what I'm wondering is if it's possible to set the allow_url_include option to on, but just on this one single file.
If I got my theory right, that would allow me to include() that file from any server and get the pagebase class.
So what I'm wondering is if it's possible to set the allow_url_include option to on, but just on this one single file.
No, as far as I'm aware this is not possible.
What you are planning to do sounds like a bad idea anyway, though. An include that gets loaded over the web on every request is awful for performance.
You should keep local copies of your library, and use a update script (or version control system) to keep versions up to date.
That is a bad practice.
You should put this file along with the project that needs it and locally include() it.
10 years and still no good solutions? Use this first one with allow_url_fopen for any convenient solution for your PHP file to allow the use of the php.ini brackets.
Replace allow_url_fopen in my example with allow_url_include to address the question.
This will surely be stated as a minor problem in future PHP. Especially if things aren't set up right with at least options are enabled globally. And this only works if there are no global php.ini rules.
Number 1 and 0 in code is either on and off.
<?php
echo ini_get('allow_url_fopen');
if (!ini_get('allow_url_fopen')) {
ini_set('allow_url_fopen', '1');
}
echo ini_get('allow_url_fopen');
Your code of use of either fopen() or copy() in between the code. Even some curl_init() might work.
echo ini_get('allow_url_fopen');
if (!ini_get('allow_url_fopen')) {
ini_set('allow_url_fopen', '0');
}
echo ini_get('allow_url_fopen');
}
?>
This also works for several other php.ini rules. I believe that this proof would be a security issue in many PHP codes further into the future. Surely a good thing to monitor in plugins in the further future or now for anti-malware signature. At least use the right global settings from now.