Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on sync users #8

Closed
gabrielemontano opened this issue Nov 22, 2017 · 20 comments
Closed

Error on sync users #8

gabrielemontano opened this issue Nov 22, 2017 · 20 comments

Comments

@gabrielemontano
Copy link

On osticket 1.10.1 i've found an error on config.php line 324

url: "' . OST_ROOT . '/scp/sync_mldap.php?ajax=true",

fixed in

url: "/scp/sync_mldap.php?ajax=true",

but now i've got another error on sync_mldap.php when i click the button "sync users" on config page:

Fatal error: Class 'LDAPMultiAuthentication' not found in /data/upload/scp/sync_mldap.php on line 2

any suggestions?

@jesusaristigueta
Copy link

Having the same issue, can't figure out why it can't find it, it's a class in another file. Is it something related to PHP version? OS?.. Tested with Debian 9 (PHP 5.6), Windows 10 (Wamp3 w/ PHP 5.6 and PHP 7.0). Did clean installs always, and having issues with the table creation as well, I created them manually anyways.

Any help is very appretiated! Thanks.

@philbertphotos
Copy link
Owner

/data/upload/scp/sync_mldap.php This is a permission error...
Let me check... its been a while since I used the sync button ... usually just let it do it automatically ... does it work when its done on its own?

@jesusaristigueta
Copy link

It doesn't work for me on its own either, I have the same errors in the PHP error log:

Fatal error: Class 'LDAPMultiAuthentication' not found in /data/upload/scp/sync_mldap.php on line 2

By the way I checked permissions. Did recursive 777 for the whole osTicket folder.

Help very appretiated! 👍 And Thank you so much for your answer!

@philbertphotos
Copy link
Owner

philbertphotos commented Jan 10, 2018 via email

@jesusaristigueta
Copy link

The folder /data/ does not exist in my osTicket main folder, both Windows or Linux installs. The file sync_mldap.php is in OSTICKET_ROOT/scp/sync_mldap.php and of course in OSTICKET_ROOT/include/plugins/multi-ldap/sync_mldap.php

@jesusaristigueta
Copy link

Just checked, my previos comment. I copy&pasted the URI from @gabrielemontano my actual error is (installed in Windows):

PHP Fatal error: Class 'LDAPMultiAuthentication' not found in C:\wamp\www\scp\sync_mldap.php on line 2

@jesusaristigueta
Copy link

jesusaristigueta commented Jan 10, 2018

I also did a modification mentioned by @gabrielemontano about the line 324 in config.php

url: "' . OST_ROOT . '/scp/sync_mldap.php?ajax=true",

I removed the definition OST_ROOT so the sync button could work and actually request the syncronization. I had no response from the error mentioned before or any action or log at all of the plugin trying to work. After this modification, when the plugin is now capable of trying to do the sync, i get the error.

@philbertphotos
Copy link
Owner

philbertphotos commented Jan 10, 2018 via email

@jesusaristigueta
Copy link

I get the same issue with OST_ROOT both in Windows and Linux. The error is always the same:

PHP Fatal error: Class 'LDAPMultiAuthentication'

@philbertphotos
Copy link
Owner

philbertphotos commented Jan 10, 2018 via email

@jesusaristigueta
Copy link

In Windows, this is my Apache Environment

`

Variable Value
HTTP_HOST localhost
HTTP_CONNECTION keep-alive
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
HTTP_ACCEPT_ENCODING gzip, deflate, br
HTTP_ACCEPT_LANGUAGE es-ES,es;q=0.9
PATH C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared;C:\Program Files (x86)\Common Files\Roxio Shared\12.0\DLLShared;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files\PuTTY;C:\Program Files (x86)\SecureCRT;
SystemRoot C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\Windows
SERVER_SIGNATURE Apache/2.4.27 (Win32) PHP/5.6.31 Server at localhost Port 80
SERVER_SOFTWARE Apache/2.4.27 (Win32) PHP/5.6.31
SERVER_NAME localhost
SERVER_ADDR ::1
SERVER_PORT 80
REMOTE_ADDR ::1
DOCUMENT_ROOT C:/wamp/www
REQUEST_SCHEME http
CONTEXT_PREFIX no value
CONTEXT_DOCUMENT_ROOT C:/wamp/www
SERVER_ADMIN wampserver@wampserver.invalid
SCRIPT_FILENAME C:/wamp/www/info.php
REMOTE_PORT 2538
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /info.php
SCRIPT_NAME /info.php

Linux:

Variable Value
HTTP_HOST 192.168.0.245
HTTP_CONNECTION keep-alive
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE es-ES,es;q=0.9
HTTP_COOKIE OSTSESSID=oulot8h5itna9j6gqek0jnms81
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE Apache/2.4.25 (Debian) Server at 192.168.0.245 Port 80
SERVER_SOFTWARE Apache/2.4.25 (Debian)
SERVER_NAME 192.168.0.245
SERVER_ADDR 192.168.0.245
SERVER_PORT 80
REMOTE_ADDR 192.168.101.15
DOCUMENT_ROOT /var/www/html
REQUEST_SCHEME http
CONTEXT_PREFIX no value
CONTEXT_DOCUMENT_ROOT /var/www/html
SERVER_ADMIN webmaster@localhost
SCRIPT_FILENAME /var/www/html/info.php
REMOTE_PORT 2574
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /info.php
SCRIPT_NAME /info.php

`

@jesusaristigueta
Copy link

Help :'( lol

@philbertphotos
Copy link
Owner

Lets try hard coding the ROOT.. hold.

@philbertphotos
Copy link
Owner

This very confusing to me.
C:/wamp/www
/var/www/html

@jesusaristigueta
Copy link

Okay, yes, I'm available to do any test :)
The error is because the file sync_mldap.php can't find the class right? (LDAPMultiAuthentication) which is located in another file. But sync_mldap.php never makes any reference to it, so how it can see it? does it need an import, require or something?
And those are just the directories for each system, in Windows I'm using Wamp, and thats the location for the files. Same stuff with Linux, the uri it's just different, but that's the root for Apache htmls

@jesusaristigueta
Copy link

Help again :'( lol

@philbertphotos
Copy link
Owner

philbertphotos commented Jan 29, 2018 via email

@dundee-81
Copy link

The issue is still occur. It seems that sync_mldap.php doesn't have refer to LDAPMultiAuthentication class defined in auth.php.
Could someone help to resolve this problem?

@shanept
Copy link

shanept commented May 29, 2018

The issue (at least in my configuration) is that it simply doesn't include the auth file.
I've just started playing around with osTicket, but as far as I can tell there is no autoloading capabilities built in. The first two lines of sync_mldap.php are as follows:

<?php
class SyncLDAPMultiClass extends LDAPMultiAuthentication {

So how's it supposed to know where to find LDAPMultiAuthentication?

EDIT
I have been playing around with this, starting to get it to work. I've looked over the history of the sync_mldap.php file and I'm actually confused as to how it actually did execute anything, as it seemed to only contain function and class declarations, however no code to call it. If anyone else understands otherwise, please let me know.

For now, I've forked the repo and you will be able to see my changes here

@philbertphotos
Copy link
Owner

This should be fixed in the most recent update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants