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

Online API Doc not working anymore #1009

Closed
humboldtux opened this issue Sep 17, 2016 · 6 comments
Closed

Online API Doc not working anymore #1009

humboldtux opened this issue Sep 17, 2016 · 6 comments

Comments

@humboldtux
Copy link
Contributor

The online API doc is not showing anymore. When i go in "Configuration=>API" and i click on the link "Documentation en ligne de l'API", i get a blank page.

I'm using a simple apache conf on a test server, which was displaying this doc correctly up until recently:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        ServerName glpi.lan

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html/glpi.git

        <Directory /var/www/html/glpi.git>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                AuthType Basic
        </Directory>
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

System info:

Informations sur le système, l'installation et la configuration
[code]

GLPI 9.1-RC2-139-g1ed2035 ( => /var/www/html/glpi.git)

Server

Operating system: Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64
PHP 5.6.24-0+deb8u1 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, bcmath, bz2,
calendar, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, libxml, mbstring,
mhash, mysql, mysqli, openssl, pcre, pdo_mysql, posix, readline, session, shmop, soap, sockets, standard, sysvmsg, sysvsem,
sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, zlib)
Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
upload_max_filesize="2M"
Software: Apache/2.4.10 (Debian) (Apache/2.4.10 (Debian) Server at glpi.lan Port 8080)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36
Server Software: (Debian)
Server Version: 5.5.50-0+deb8u1
Server SQL Mode:
Parameters: root@localhost/glpi
Host info: Localhost via UNIX socket

OK/var/www/html/glpi.git/config : OK
OK/var/www/html/glpi.git/files : OK
OK/var/www/html/glpi.git/files/_dumps : OK
OK/var/www/html/glpi.git/files/_sessions : OK
OK/var/www/html/glpi.git/files/_cron : OK
OK/var/www/html/glpi.git/files/_graphs : OK
OK/var/www/html/glpi.git/files/_lock : OK
OK/var/www/html/glpi.git/files/_plugins : OK
OK/var/www/html/glpi.git/files/_tmp : OK
OK/var/www/html/glpi.git/files/_rss : OK
OK/var/www/html/glpi.git/files/_uploads : OK
OK/var/www/html/glpi.git/files/_pictures : OK
OK/var/www/html/glpi.git/files/_log : OK
Web access to files directory is protectedWeb access to files directory is protected : OK

Libraries

htmLawed version 1.1.21 in (/var/www/html/glpi.git/lib/htmlawed)
phpCas version 1.3.4 in (/var/www/html/glpi.git/vendor/jasig/phpcas/source)
PHPMailer version 5.2.16 in (/var/www/html/glpi.git/vendor/phpmailer/phpmailer)
ZetaComponent ezcGraph installed in (/var/www/html/glpi.git/vendor/zetacomponents/graph/src): OK
Zend Framework in (/var/www/html/glpi.git/vendor/zendframework/zend-loader/src)
SimplePie version 1.4.1 in (/var/www/html/glpi.git/vendor/simplepie/simplepie/library)
TCPDF version 6.2.12 in (/var/www/html/glpi.git/vendor/tecnickcom/tcpdf)
ircmaxell/password-compat in (/var/www/html/glpi.git/vendor/ircmaxell/password-compat/lib). Compatitility: Ok
iacaml/autolink in (/var/www/html/glpi.git/vendor/iamcal/lib_autolink)
sabre/vobject in (/var/www/html/glpi.git/vendor/sabre/vobject/lib)
guzzlehttp/guzzle in ()

SQL replicas

Not active

Notifications

Way of sending emails: PHP

Mails receivers

Plugins list

[/code]

@orthagh
Copy link
Contributor

orthagh commented Sep 19, 2016

in Administration > config > API, what's the value of the api url in your case.
The link for api inline documentation uses the above parameter.

@humboldtux
Copy link
Contributor Author

i have the default one: http://glpi.lan:8080/apirest.php/
I also tried to change it to http://glpi.lan:8080/api/, use the provided .htaccess, uncommented, and activate Apache mod rewrite without success.

@trasher
Copy link
Contributor

trasher commented Sep 19, 2016

Hi, if the standard php file does not work, I guess it would not work with a rewrite rule ;)

Most of the times, a blank page executing a PHP script means there is an important issue. You should check your PHP system logs (${APACHE_LOG_DIR}/error.log if you use mod_php) and glpi log files (I guess the issue would be on the system logs).

@humboldtux
Copy link
Contributor Author

@trasher you are right, and i didn't think watching the log files, this is what i get that seems relevant when accessing the api doc:

[Mon Sep 19 17:47:06.669771 2016] [:error] [pid 2428] [client 10.0.2.2:34228] PHP Fatal error:  Class 'Michelf\\MarkdownExtra' not found in /var/www/html/glpi.git/inc/api.class.php on line 1767

@trasher
Copy link
Contributor

trasher commented Sep 20, 2016

Looks like your vendor are not up to date :) Try to run a composer install and see if problem still persists.

@humboldtux
Copy link
Contributor Author

Vendor updated, and doc is back online. Sorry about that.

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

3 participants