O
O
Oleg Karnaukhov2012-10-16 02:58:16
PHP
Oleg Karnaukhov, 2012-10-16 02:58:16

Snippet and authorization broken MODX Rev?

Today, getting started, I found that some of the snippets do not work.
During the analysis, I found that this code does not work:

$holder = $modx->getObject('modResource',array('alias' => $_GET['href']));
echo $holder->get('pagetitle').'|TIDmuS|'.$holder->get('content');

Fatal error: Call to a member function get() on a non-object in /home/lol/data/www/muscat62.ru/core/cache/includes/elements/modsnippet/2.include.cache.php on line 22
Previously, this code worked - it received page data from ModX.
When I try to login, it says: Account not found. Check the username and re-enter the password for a new attempt.
There is an entry in the database. I also changed the password following the instructions (erase the salt and reset to password). But unsuccessfully.
I tried to change the database user - no change.
Also, another admin on VDS tried to install owncloud. As a result, it doesn’t go further than the database settings - error 500. Maybe it's in the database.
At the same time, the rest of the scripts work fine with the database.
php -m output
# php -m
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20100525/spl.so' - Cannot open "/usr/local/lib/php/20100525/spl.so" in Unknown on line 0
[PHP Modules]
Core
ctype
curl
date
dom
ereg
filter
gd
hash
iconv
imagick
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]

The system runs on FreeBSD 8.
Modx needs to be restored.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2012-10-16
@BupycNet

Show var_dump($_GET) when requested.
I suspect that you have a CNC. Replace $_GET['href'] with $_SERVER['REQUEST_URI']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question