In the browser console window I see requests going to http://<IPADDRESS:PORT>/api/v1/session. There is no v1 directory under api.
I am able to login to mysql with home_user/homer_password combination. My test php script (mentioned below) is able to connect to MySQL. In other words, user/php/apache has access to MySQL.
# Cloning homer master, i did not understand the purpose of this
cd /usr/local/srcgit clone https://github.com/sipcapture/homer.gitcd homergit submodule initgit submodule update --init --recursivegit submodule foreach git pull origin master
#Cloning homer-api
#Cloning homer-ui
#Setting up apache webserver
mkdir /usr/local/apache2/sipcapture
#Copying homer-ui files under apache
cp -R homer-ui/ /usr/local/apache2/sipcapture
#Renaming directory
mv /usr/local/apache2/sipcapture/homer-ui/ /usr/local/apache2/sipcapture/htdocs
#Copying api directory to root web( homer-ui) directory under apache
cp -R homer-api/api/ /usr/local/apache2/sipcapture/htdocs/
#Copying the configuration and preferences files under api directory
cp /usr/local/apache2/htdocs_homer/api/configuration_example.php /usr/local/apache2/htdocs_homer/api/configuration.phpcp /usr/local/apache2/htdocs_homer/api/preferences_example.php /usr/local/apache2/htdocs_homer/api/preferences.php
#***************SIP CAPTURE HOMER WEB/GUI/API INTERFACE************
<IfModule !mod_rewrite.c>LoadModule rewrite_module modules/mod_rewrite.so</IfModule>Listen 192.168.11.57:8088<virtualhost 192.168.11.57:8088>
ServerAdmin te...@test.com
ServerName 192.168.11.57:8088
ServerAlias 192.168.11.57:8088
DocumentRoot /usr/local/apache2/sipcapture/htdocs
DirectoryIndex index.html index.htm index.php
<Directory "/usr/local/apache2/sipcapture/htdocs" >
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ScriptAlias /cgi-bin /usr/local/apache2/sipcapture/cgi-bin/
<Location "/usr/local/apache2/sipcapture/cgi-bin" >
Options +ExecCGI -MultiViews
AllowOverride All
Require all granted
</Location>
ErrorLog logs/sipcapture_error.log
CustomLog logs/sipcapture_access.log combined
</VirtualHost>
<?php
$servername = "localhost";$username = "homer_user";$password = "homer_password";try {
$conn = new PDO("mysql:host=$servername;dbname=homer_configuration", $username, $password);$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);echo "Connected successfully";}catch(PDOException $e){echo "Connection failed: " . $e->getMessage();}?>
Following is the browser console output:
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead
HOMER INIT: 5.0.4 Releasecontroller.js:6:9Error: JSON.parse: unexpected character at line 1 column 1 of the JSON dataangular.min.js:107:210Unknown Username / Password combinationmodule.auth.run.js:43:11
bad resultmodule.auth.run.js:44:25Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More]192.168.11.57:8088Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.[Learn More]192.168.11.57:8088Use of getPreventDefault() is deprecated. Use defaultPrevented instead.jquery.min.js:5:12584Submiting user info.loginCtrl.js:27:22Error: JSON.parse: unexpected character at line 1 column 1 of the JSON dataangular.min.js:107:210SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Stack trace:
Hi,
please check if you have enabled mod_rewrite.
also you can check if your api works by calling:
http://you.host.org/api/v1/test
you should get back:
if not, please check mod_rewrite again.
Wbr,
Alexandr
--
You received this message because you are subscribed to the Google Groups "Homer Capture Server. sipcapture.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to homer-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
angular.min.js:107:210Unknown Username / Password combinationmodule.auth.run.js:43:11
bad resultmodule.auth.run.js:44:25Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More]192.168.11.57:8088Password fields present in a form with an insecure (http://) form action. This is a security risk that allows user login credentials to be stolen.[Learn More]192.168.11.57:8088Use of getPreventDefault() is deprecated. Use defaultPrevented instead.jquery.min.js:5:12584Submiting user info.loginCtrl.js:27:22Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data
angular.min.js:107:210SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Stack trace:
What do you see in the web console the reply on /api/v1/session
(POST/GET) ?
To unsubscribe from this group and stop receiving emails from it, send an email to homer-discuss+unsubscribe@googlegroups.com.
<?php
try {
To unsubscribe from this group and stop receiving emails from it, send an email to homer-discuss+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to homer-discuss+unsubscribe@googlegroups.com.