Basically what the question says. I've installed Mediawiki v1.24.4 onto my site and am trying to create a references list for an article. The default Cite extension is installed in .../[domain]/extensions/Cite - this version of Cite was installed by the Mediawiki software automatically, so it should be working.
The manual installation instructions say to add wfLoadExtension( 'Cite' ); to the Localsettings.php file. I tried that, but got the following error:
Fatal error: Call to undefined function wfLoadExtension() in /home/[web_host_username]/ on line 136
When I add the <ref>[text goes here]</ref> and <references /> markup to the article currently, the tags stay as plain text.
I did read the [question][2] asked about putting the Cite extension into the editing toolbar, but this is a different issue where I can't even get it to work by manually adding the markup.
Any help is appreciated.
The instructions you're following apply to MediaWiki 1.25 and newer. From the Cite extension page:
To users running MediaWiki 1.24 or earlier: The instructions above
describe the new way of installing extensions using wfLoadExtension(),
since MediaWiki 1.25.
If you need to install this extension in earlier
versions, instead of wfLoadExtension( 'Cite' );, you need to use:
require_once "$IP/extensions/Cite/Cite.php";
Related
Hello i have installed Parse server and parse sdk for php on my Linux Centos Server.
Parse Dashboard: 1.3.3,
Server version: 4.3.0
I'm managing those db's using php code. This parser was installed by someone else. The thing is I'm not sure how to install LiveQuery for my server. I don't know if my version of server is good for this kind of operations. I found some solutions how to enable this feature, but there was something like "index.js" - in my file system it's app.js. Screen of file system
In app.js i added lines:
liveQuery: {
classNames: ["Test"] //List of classes to support for query subscritions
}
I've created class in my db named "Test", then i found solution i need to add
this line
liveQueryUrl: keyLiveQueryUrl, // Required if using LiveQuery
I don't really know how to get this key.
How can i check if LiveQuery works? It will be used by flutter code, but i'd like to check it first in PHP.
My problem has been solved in my other extended topic here.
I use the extension "ap_docchecklogin" (https://extensions.typo3.org/extension/ap_docchecklogin/), which works under Typo3 8.7.29. Only under a fresh TYPO3 version 9.5.11 I get the following message:
No class named EXT:ap_docchecklogin/Classes/DocCheckAuthenticationService.php:&Antwerpes\ApDocchecklogin\DocCheckAuthenticationService
This is the code where the error happends:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['initFEuser'][] = 'EXT:ap_docchecklogin/Classes/DocCheckAuthenticationService.php:&Antwerpes\ApDocchecklogin\DocCheckAuthenticationService->bypassLoginForCrawling';
Of course, I cleared the cache and renewed PHP Autoload. I also looked at the extension and the class definitely exists.
Both Typo3 versions run on the same server under the same settings.
Where is the difference between the Typo3 versions? Why it works in version 8? Has anyone ever had similar problems?
According to the changelog here: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/Deprecation-86279-VariousHooksAndPSR-15Middlewares.html, Hooks which is used in the extension has deprecated in the TYPO3 9 LTS version.
You can see the issue here: https://forge.typo3.org/issues/87357
you can use a custom PSR-15 middleware instead.
I made small changes in the code and it's no longer showing an error. Don't know this works for you or not (Functionality I am talking about)
But try this way...
$GLOBALS['TYPO3_CONF_VARS']
['SC_OPTIONS']
['tslib/class.tslib_fe.php']
['initFEuser'][] = 'Antwerpes\\ApDocchecklogin\\DocCheckAuthenticationService->bypassLoginForCrawling';
Does this help?
I installed the MongoDB PHP driver on Windows 10 (I'm using WAMP equipped with PHP 5.6.25. following the istructions I found at http://php.net/manual/en/mongodb.installation.windows.php and I installed also the libbson and libmongoc libraries (requested as requirements) as written at http://php.net/manual/en/mongodb.requirements.php.
Then, I added the bin folders of MongoDB, libbson and libmongoc to system path.
However, even if I can see the php_mongodb extension in the extensions list of WAMP, launching phpinfo() the mongo extension doesn't appear with the others.
Furthermore, tryng to connect to my database with
<?php
$mongo=new MongoClient("");
$db=$mongo->galileo;
$collection= $db->items;
print_r("Number of documens: "); ?>
I got the error
Fatal error: Class 'MongoClient' not found in C:\wamp64\www\galileo\index.php >on line 21
At a first look, reading this error, it might seem like that PHP is looking for php_mongodb extension in the uncorrect folder i.e. C:\wamp64\www\galileo\index.php (where the index page of my project is placed) instead of the correct one C:\wamp64\bin\php\php5.6.25\ext where all the extensions are.
But, looking at php log file php_error.log I find also a warning that says:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp64/bin/php/php5.6.25/ext/php_mongodb.dll' - Il sistema operativo non pu� eseguire %1.
in Unknown on line 0.
(for not Italian speaking, the phrase after - means the operating system can't execute %1, even if I can't imagine what %1 stands for).
Even using the new class MongoDB\Driver\Manager I get the error
Fatal error: Class 'MongoDB\Driver\Manager' not found in C:\wamp64\www\galileo\index.php on line 21
and the same warning.
Do you notice some error or forgetfulness in the installation process as I described and, if not, do you know how to fix the problem?
The problem is certainly related to WAMP and I think is related to the multiple php.ini in his folders. In fact, in the apache folder you can find a php.ini file that cannot be modified, otherwise nothing works at all; at the same time any changes made to the php.ini file in the php folder seems have no effect except making appear the mongodb extension in the extensions list.
So, I try using XAMPP, as suggested in this video tutorial and it works. Using Composer I was able to install also the PHP library and not only the driver.
you should not use 'MongoClient class' anymore, this extension that defines this class is deprecated. look at here.
instead, you should use MongoDB\Driver\Manager class. please read http://php.net/manual/en/class.mongodb-driver-manager.php.
and the setup must be like this in php:
$mongo = new MongoDB\Driver\Manager("mongodb://localhost:27017");
And if you still use the old class; you either need to install the old legacy extension (pecl install mongo) and use PHP 5.x, or update your code to use this new driver's classes as the old driver is not available for PHP 7. There is an upgrade guide at here.
the last part is from derickr's answer in this issue on github: https://github.com/mongodb/mongo-php-driver/issues/300
This is a bit of a weird one, so please bear with me.
I'm trying to get Bugsnag up and running on our custom platform.
The boilerplate code looks like:
if ( !include_once($NP->settings->paths->external .'/Bugsnag/guzzle.phar') )
exit('Failed to load ERROR: guzzle');
if ( !include_once($NP->settings->paths->external .'/Bugsnag/bugsnag.phar') )
exit('Failed to load ERROR SYSTEM: bugsnag');
This unfortunately throws an exception:
Fatal error: require(): Failed opening required 'phar://guzzle.phar/autoloader.php'
However, if I attempt to load this outside of our platform, it seems to spin up just fine.
As I am not thoroughly familiar with the ins and outs of working with phar's, what could we be setting which would interfere with a phar's ability to reference inside it's own container?
Information:
Ubuntu 16.04.2 LTS
PHP 7.0.18-0ubuntu0.16.04.1 (Phar is native)
Phar EXT version: 2.0.2
Phar API version: 1.1.1
Phar-based phar archives: enabled
Tar-based phar archives: enabled
ZIP-based phar archives: enabled
gzip compression: enabled
bzip2 compression: disabled
Native OpenSSL support: enabled
phar.readonly: On
phar.require_hash: Off
Any assistance will be appreciated.
Thanks!
UPDATE: After doing some testing with a colleague, I noticed that even putting the boilerplate code at the very top of our primary platform boot script, still threw the error. The only thing we could think of which changes in that case is a directory change (as the boot script is in the include_path). After adding the external directory to php's include_path, it seemed to work. I am confused by this however, because it is my understanding that Phar files are self-contained to specifically not have issues like this. Why would a Phar file suddenly be unable to reference itself, after it has already be successfully included?
UPDATE: So, the above update is not an actual fix. The results are very strange. It will spin up fine one time, then fail the next few times. Again, this is when there is no other code loading before it. Something interesting: If we restart Apache, it loads on the first page load. Everything after that it fails.
Is guzzle.phar a symlink to a file with a different name?
Otherwise you can break internal linking in .phar files by setting a different alias when loading them through the Phar class:
new Phar('guzzle.phar, 0, 'differentalias.phar');
Not sure, but I think you cannot reference a PHAR from inside another PHAR.
Why not use a usual setup with Composer (to install all the deps) and then create a PHAR using Box project?
I am trying to make a project work. But I am getting an error like this:
Class 'App' not found in /var/www/html/project/test.php on line 4
line 4 of this file says:
app::$activepage = $_GET['_page'] ? httpget('_page') : $_POST['_page'] ? httppost('_page') : 0);
I am using cakePhp Version: 1.3.15-1.
The weird thing is that when I do apt show cakephp it says State: not installed
However, I have followed all the instructions of https://www.digitalocean.com/community/tutorials/how-to-install-cakephp-on-an-ubuntu-12-04-vps and when I open the index.php file of cakephp, it doesn't indicate any errors.
As I said in my Comment:
Your snippet / folder structure doesn't look like CakePHP.
Part of the problem may be a version mismatch. You say you're using version 1.3.15, but the tutorial on installing it that you link was created over a year later and references version 2.3.9. It looks like the general steps are the same, based on comparing your tutorial to the steps in the 2.X blog tutorial. You might have more luck with an older tutorial on using CakePHP on Ubuntu. Most of the steps look similar, but there are some differences with the .htaccess portion that could be causing the problem. Neither the 1.3 or 2.3 versions look like they require any "installing."
If you're not looking at the older version for any particular reason, of course it's best to use the most recent version of CakePHP, but I assume you have a particular reason for using that version. But if you're stuck, you might try a newer version to see if it gives the same errors.