Fatal error: Call to undefined function httppost() - php

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.

Related

Quickest way to get Expression Engine v 2.5.5 working with PHP7

A client’s host has recently updated their server to run PHP 7, which has broken their EE 2.5.5. site (“Call to undefined function mysql_connect()”).
I tried upgrading EE to version 2.11.9 but get errors:
Frontend: can’t find safecracker_lib
Control Panel: PATH_MOD not defined in mod_structure.php, fixing this leads down a rabbit hole starting with an error related to not being able to instantiate the pagination class somewhere.
I just need to get the site running until I build a new site, what is the quickest way I can get the site running with PHP 7?
In your config folder there is a file named database.php
change the line:
$db['expressionengine']['dbdriver'] = 'mysql';
to
$db['expressionengine']['dbdriver'] = 'mysqli';
mysql_connect() has been deprecated since PHP 5 and removed in PHP 7 so you cannot use this function or any of the old mysql functions.
You need to upgrade your codebase, or downgrade your PHP version (highly discouraged).
In regards to your missing pagination class, you may not have implemented core classes that were required when upgrading.
Try running on your command line:
php system/ee/eecms upgrade
You can also read the documentation on how to upgrade the codebase for Expression Engine here.

TYPO3 9.5.11: No class named EXT: ap_docchecklogin (but class exists)

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?

Mediawiki Cite Extension does not work

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";

Configuring MongoDB + doctrine in Symfony

I was trying to install MongoDB doctrine bundle as written in here
But when I ran the command
$ php bin/vendors install
It throws up the following error:
Fatal error: Call to undefined method
Doctrine\ODM\MongoDB\Configuration::setLoggerCallable()in
C:\wamp\www\Symfony\app\cache\dev\appDevDebugProjectContainer.php on line 245
I have followed the installation instructions to the word (which has not been much anyways...) and i have also double checked my installation... Is there something I am missing here?
Update : A similar problem is mentioned here, but even after following the answer there, i could not successfully configure DoctrineMongoDBBundle.
The latest changes in the Doctrine MongoDB repo have introduces this problem. To stick to a version before this happened, add this line to deps.lock:
doctrine-mongodb 5ccb18231218ce92c9d72295f69bebfe172ef5fb
Well, finally I managed to solve it by adding this to the deps file:
[DoctrineMongoDBBundle]
git=http://github.com/symfony/DoctrineMongoDBBundle.git
target=/bundles/Symfony/Bundle/DoctrineMongoDBBundle
version=origin/2.0
** note the
version=**origin**/2.0
which is different from the previously suggested simple
version=2.0.0 or something similar...
I have a hunch that this problem occurs only on Windows, I hope someone could kindly confirm this.

PHP parser errors in Zend Framework

I just updated my project library folder (with an external to ZF svn) to ZF version 1.11. I'm now getting al kinds of weird errors, related to whitespaces, empty lines, etc. I searched on the internet for quite a while, but can't find a proper answer. I think this is related to some settings in my php.ini file but can't figure it out.
Example of an error:
Parse error: syntax error, unexpected $end in /library/Zend/Application.php on line 415 Call Stack: 0.0042 657160 1. {main}() /mnt/hgfs/htdocs/service/public/index.php:0
PHP version: PHP 5.3.5-0.dotdeb.1
All help would appreciated, I can't wrap my head around it!
I see you're running the project on a hgfs mount, probably inside your VM. Try to run your project off the hgfs mount as I found it to be buggy when dealing with these things.
For one, the default mount options don't keep into account that your file and directory properties (uid and gid) probably aren't the same on your guest and host system. Unfortunately, setting these right didn't fix it for me.
The solution I eventually used was to ditch the hgfs driver and mount the files using sshfs. On Debian you can just install it by running apt-get install sshfs. I then added an entry to /etc/fstab, like this:
sshfs#user#host:/path/to/host/dir /mnt/share fuse comment=sshfs,user,rw,exec,uid=1000,gid=1000,allow_other 0 0
Mounting the share can then be done by running this:
mount /mnt/share
Hope this helps!

Categories