Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [php]

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Joomla is based on PHP.

2
votes
3answers
115 views

Is there a file that defines error messages?

I would like to catch some exceptions to inspect the error code and determine if I should re-throw it with a more user friendly message. This would probably be most beneficial with MySQL errors. Is ...
1
vote
3answers
234 views

How to iterate over the “params” of an item ZOO Joomla?

The item of my interest is in the __zoo_item table. My query: $query ->select($db->quoteName(array('params'))) ->from($db->quoteName('#__zoo_item')); $db->setQuery($query); $...
0
votes
2answers
53 views

PHP7.2 Undefined variable: option in … index.php with Dj-Business004 template

When I update PHP from PHP7 to PHP7.2 the website gives this error: 500 Internal Server Error This is in the Log file: [Thu Jan 24 04:44:56.061781 2019] [proxy_fcgi:error] [pid 30185:tid ...
0
votes
2answers
168 views

Use one pdo connection across multiple modules?

I have multiple modules on the same page that are individually connecting to the same external database through pdo connections. The website is getting slower since I added more modules. My guess is ...
0
votes
2answers
2k views

MySQLi PHP Warning

I am getting the following errors (in this order) thousands of times in my error log: [08-Jun-2016 13:11:05 America/Detroit] PHP Warning: mysqli::stat(): Couldn't fetch mysqli in {...}/libraries/...
-1
votes
2answers
37 views

Individual user fine grained ACL is it possible in Joomla! 3.x

I was wondering if it was possible in Joomla! 3.x to have permissions down to individual user level. Eg: user A can see item X but not user B even if user B is in the same group or have the same ...
-2
votes
2answers
355 views

How to access the email of the user who created a submission?

I have the following working javascript code: var user_email = document.getElementById("jform_user_email"); user_email.value = "<?php echo JFactory::getUser()->email; ?>"; The next lines ...
1
vote
1answer
73 views

Joomla.submitbutton is not a function at HTMLButtonElement.onclick

I have been facing a problem when I try to update the article from the frontend then it shows this error Joomla.submitbutton is not a function at HTMLButtonElement.onclick Here is my code &...
1
vote
1answer
190 views

Search in custom component

How can I improve the Search component in joomla 2.5 to set search by my custom component? Can't find, where I can modify the search request to database. UPDATE: With help of Rene Korss I solve the ...
0
votes
1answer
32 views

Using a custom field with different names

I want to use a flexible field name for a field across different forms thru my extension. My custom example field looks like this: defined('_JEXEC') or die; use Joomla\CMS\Factory; use Joomla\CMS\...
0
votes
1answer
55 views

Virtuemart 3.4 - products on manufacturer page

Virtuemart 3.4.2, joomla 3.8 i try copy code from category template, but cant fix this errors: at /my_template/html/com_virtuemart/manufacturer/details.php NOW I HAVE Two ERRORS: Call to a member ...
0
votes
1answer
24 views

CheckToken() error when TinyMCE init

I have a form, which add some data to DataBase. <form> <input type="text" name="mydata" /> <textarea name="mytext"></textarea> <?php echo JHtml::_( 'form.token' );?> ...
0
votes
1answer
50 views

Hikashop, extract text after read more

I want to have the introtext and then the rest of the text in Hikashop product details page. So in the product description I insert the <hr id="system-readmore" /> to separate the introtext and ...
0
votes
1answer
35 views

How can I prevent Joomla from removing octothorpe/pound from URL post login?

For example, I would like to send the following links in an email to users: https://www.example.com/#foo https://www.example.com/deep-link/#foo When clicked on, I get the following results: https://...
0
votes
1answer
112 views

Parsing Error Javascript in php include page on the test server

We're getting this error in our test environment: Parse error: syntax error, unexpected 'var' (T_VAR) in /home/usaspo5/public_html/dev/usgnew/components/com_usg_programs/tmpls/default.php We have ...
0
votes
1answer
260 views

Implement Joomla 3 registration field with jquery autocomplete

I want to implement a field with jquery autocomplete the code: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <link rel="...
0
votes
1answer
441 views

Display Image via Imagick

I would like to display an image which is not accessible for users (.htaccess denies all). This is my source: header('Content-Type: image/png'); $filePath = ...
0
votes
1answer
50 views

Custom module: JSession brokes the site

I am making custom shop module for my website and my script breakes all pages where it is. The command what breaks it is: $session =& JFactory::getSession(); (Code putted in default.php). I cant ...
-1
votes
1answer
415 views

Problems When I change my PHP version to 7.2(Error 0 Using $this when not in object context )

I have my website in production now, The site works very good with PHP 5.6 and 7.0 but When I try to change the PHP version to 7.2 the website doesn't work. It shows me an error message like this: I'...
-1
votes
1answer
36 views

Joomla / PHPMyAdmin bug when “select” is in the value

This question was originally asked on StackExchange, and it was recommended by @mickmackusa that I ask it here. Background We recently changed over from one server to a brand new one. Old server: ...
-2
votes
1answer
275 views

How can I link my PHP file to the HTML of a module?

I have this newsletter module in joomla with this code <form method="POST" name="contactform" action="prova.php"> <div class="tm-block-bottom-b tm-block-padding tm-block-primary-dark tm-...
1
vote
0answers
17 views

Add multiple recipient email addresses Joomla Page Builder

I am using Joomla and SP Page Builder. I have back-end side and front-end side. I would like to add multiple recipients for sent emails from my contact form. I have found related codes for sending ...
1
vote
0answers
16 views

mklink and JFolder: :folder: Path is not a folder [due to is_dir()]

Joomla is on Win2012 R2, XAMPP, Fabrik. I created a symlink like so: C:\Users\Administrator>mklink /D "C:\xampp\htdocs\pdf" "Z:\" symbolic link created for C:\xampp\htdocs\pdf <<===>> ...
1
vote
0answers
27 views

How to configure PHP basedir for Joomla running on IIS shared hosting

I have the following setup: IIS 10 with Plesk Onyx 17.8.11. Joomla 3.8.13/PHP 7.2.10. The website is hosted in shared hosting provider. After installing Gantry 5 I get the following warning on the ...
1
vote
0answers
206 views

joomla make a ajax request for another php file

Excuse me for my English. I'm a newbie in joomla. I make a phone book component and i wanna add a Ajax pagination. I've got Jquery function load_data where i put a url to my php page. And this is ...
1
vote
0answers
149 views

How to upload an image using Ajax?

I need to upload an image to the server via AJAX, but the server comes back to the page with request, although server doesn't send anything. ajax: function uploadServer($el) { var fileUpload = $...
1
vote
0answers
352 views

Saving custom field parameter value from module settings

I know well how to create custom form field in joomla module settings as written in the accepted answer of this question which is basically extending JFormField class. Now what i want to do is ...
1
vote
0answers
220 views

RSForms - Change the items of a radio group based on a selection of a drop down

I need to change the items of a radio group based on a drop-down selection in RSForm pro. Right now I'm using the Conditional Fields feature to show different radio group field and that caused too ...
1
vote
0answers
384 views

Retrieving data from Joomla! Subform form field type

I'm trying to retrieving data from Joomla! Subform form field type, Here what I have: <fieldset name="item_lists" label="Item List"> <field name="ilist" type="subform" ...
1
vote
0answers
164 views

Joomla 3.5.1 - Ajax with PHP not send email

I'm having some problems with the action of an Ajax form. Here is the Javascript: <script type="text/javascript"> var $j = jQuery.noConflict(); $j(document).ready(function() { $j(...
1
vote
0answers
184 views

Why use ob_start and eval instead of using a simple include in this Joomla Plugin?

I was looking at the code of a Plugin for Joomla! CMS for a functionality I need: the possibility to run custom PHP scripts when a Joomla! Plugin/Events is fired. I wanted to learn the mechanism used ...
1
vote
0answers
79 views

Joomla Checking out items does not work correctly

I would like to check out items, that are edited by user XYZ. Well, it works so far: If somebody opens an item, the default-view shows the "lock" icon. But: If I click the link to the checked out ...
1
vote
0answers
749 views

Send data from custom field to database - Joomla 2.5

I've created a custom field for a module which gets some information from the database. I need to add the functionality to update the information in database if I make some changes. Here is the code ...
0
votes
0answers
403 views

Some joomla versions not running in latest xampp environment

Hi I backed up a joomla 3.0 site from production server with database backup too. I was using xampp 1.8 version which is old and everything was fine when i set up that joomla site under xampp(...
0
votes
0answers
664 views

“PHP Fatal error: Call to a member function get() on a non-object” in K2 Template

On December 8, I first received this error on a site I manage: [08-Dec-2016 13:38:28 America/Detroit] PHP Fatal error: Call to a member function get() on a non-object in /path/to/site/templates/...
0
votes
0answers
573 views

PHP Warning: file_get_contents() in error_log

I used OSTraining's instructions to Create a Custom Joomla 404 Page with 404 Status Code in one of my J! 3.5.1 sites. However, the error_log is flooded with the following errors: [09-Jun-2016 04:05:...
0
votes
0answers
108 views

In “Date Format” section, what code makes the date relative?

This code will show the date of publishing like: 4:30 10/7/2015 I want the date be like: 2 hours and 15 minutes ago this setting is on showcase modules ("news show pro GK4" in this case) for ...
0
votes
0answers
77 views

Access k2 extra field from Flexi Code module

I am using the Flexi Code module to display some php in a k2 page. This k2 page has a RoomID as extra field. How can I access it as a variable inside Flexi Code?
0
votes
0answers
93 views

Joomla 1.5 creating or editing back end user

I have a website in joomla , the problem is that when i am creating new back end user (administrator/super user) from joomla user manager it makes an entry in the users table after that it deleted it ...
0
votes
0answers
140 views

T3 Framework extrafields error retrieving Values

i am using the T3 Framework for my template and did everything as described in the forum. Everything is working in the backend but i am not able to retrieve the values in the frontend. I am getting a ...
0
votes
0answers
179 views

User Extended Fields Problem

I'm new with PHP and I'm developing a website with joomla 3. I have a module which is k2 users where I show all k2 users, well, I want to add to this module some fields from the User Extended Fields ...