Author Topic: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden  (Read 2087 times)

Offline diamond_gr

  • Jr. Member
  • **
  • Posts: 44
    • Efstathios Iosifidis Official Web Site
Hello,

I installed openEMR and it's fully functional.
I made a livecd. When I boot, it seems to be OK (all software etc is OK).
I run firefox on openEMR page to login but I get a white page says forbidden.

I run apachectl start on terminal and it's OK.

To run this program, I installed
Code: [Select]
mysql-administrator
mysql-gui-tools

from synaptic.
What's the problem that my live cd cannot run openEMR on live ISO?
Do I have to do something else?
Thanks for your help
PCLOS in Greek

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6209
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #1 on: October 30, 2011, 11:32:05 AM »

check the file permission of the page you want to access and the folder permission the page reside in. It could be a permission problem.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #2 on: October 30, 2011, 01:55:31 PM »
Have you even considered looking at the Apache error log?  /var/log/httpd/error_log This should be the first place one should look when getting errors running the web server. (Apache).




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline diamond_gr

  • Jr. Member
  • **
  • Posts: 44
    • Efstathios Iosifidis Official Web Site
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #3 on: October 30, 2011, 03:03:29 PM »
Well, my major is medical so I don't know much things about setting up and solving problems.
That's why I asked the forum. And please keep it simple...thanks
I'll check it on the live cd and I'll inform you.
********EDIT from LIVECD*********************

The log file has the following information

Code: [Select]
[Thu Oct 27 21:56:21 2011] [notice] core dump file size limit raised to 4294967295 bytes
[Thu Oct 27 21:56:22 2011] [notice] Digest: generating secret for digest authentication ...
[Thu Oct 27 21:56:22 2011] [notice] Digest: done
[Thu Oct 27 21:56:23 2011] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Thu Oct 27 21:56:23 2011] [notice] mod_python: using mutex_directory /var/cache/httpd/mod_python
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/translit.so' - /usr/lib/php/extensions/translit.so: undefined symbol: php_iconv_string in Unknown on line 0
[Thu Oct 27 21:56:24 2011] [notice] Apache/2.2.17 (PCLinuxOS 2011/PREFORK-1pclos2011) mod_python/3.3.1 Python/2.6.6 PHP/5.3.3 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Thu Oct 27 22:04:14 2011] [error] [client 127.0.0.1] Session site ID has been set to 'pclos', referer: http://localhost/openemr/?site=pclos
[Thu Oct 27 22:05:12 2011] [error] [client 127.0.0.1] Session site ID has been set to 'pclos', referer: http://localhost/openemr/?site=pclos
[Thu Oct 27 22:05:44 2011] [error] [client 127.0.0.1] Session site ID has been set to 'pclos', referer: http://localhost/openemr/interface/login/login.php
[Thu Oct 27 22:08:57 2011] [error] [client 127.0.0.1] Session site ID has been set to 'pclos', referer: http://localhost/openemr/?site=pclos
[Thu Oct 27 22:17:57 2011] [error] [client 127.0.0.1] Session site ID has been set to 'pclos', referer: http://localhost/openemr/?site=pclos
[Thu Oct 27 22:24:06 2011] [error] [client 127.0.0.1] Session site ID has been set to 'pclos', referer: http://localhost/openemr/?site=pclos
[Sun Oct 30 23:12:20 2011] [notice] core dump file size limit raised to 4294967295 bytes
[Sun Oct 30 23:12:21 2011] [notice] Digest: generating secret for digest authentication ...
[Sun Oct 30 23:12:21 2011] [notice] Digest: done
[Sun Oct 30 23:12:22 2011] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Sun Oct 30 23:12:22 2011] [notice] mod_python: using mutex_directory /var/cache/httpd/mod_python
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/translit.so' - /usr/lib/php/extensions/translit.so: undefined symbol: php_iconv_string in Unknown on line 0
[Sun Oct 30 23:12:26 2011] [notice] Apache/2.2.17 (PCLinuxOS 2011/PREFORK-1pclos2011) mod_python/3.3.1 Python/2.6.6 PHP/5.3.3 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun Oct 30 23:13:20 2011] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var
[Sun Oct 30 23:13:20 2011] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var
[Sun Oct 30 23:13:21 2011] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var
[Sun Oct 30 23:13:21 2011] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var

Can you find something?
Thanks for your help.
« Last Edit: October 30, 2011, 03:17:39 PM by diamond_gr »
PCLOS in Greek

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6209
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #4 on: October 30, 2011, 06:14:06 PM »

Those 4 last lines could be the reason why its not working.

You also have a missing extension.It could also contribute to the problem.

Why are you running it on a live cd? Not testing it on an installed system could also contribute to the problem.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #5 on: October 30, 2011, 07:19:27 PM »

Those 4 last lines could be the reason why its not working.


+1,
in fact when running from a LiveCD /var is really a symbolic link  (to /initrd/var if I remember correctly...  /union/var )

@diamond_gr,

do you have plan to run the system from LiveCD ?
because if not, once installed it will work as expected.
« Last Edit: November 03, 2011, 04:18:10 PM by as »

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6209
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #6 on: October 30, 2011, 07:33:58 PM »

why symbolic links are not allowed? If its a policy setting somewhere and it can be changed, then changing it should solve the problem.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #7 on: October 30, 2011, 07:48:27 PM »
As for the php warning I don't have a clue. I did download the openemr program and installed it on my server and it is running just fine. I did look at the php error and there is no file called translit.so in that path

[root@laptop extensions]# pwd
/usr/lib/php/extensions
[root@laptop extensions]# ls
ctype.so*   ftp.so*      json.so*      mysql.so*    session.so*  sysvshm.so*     xmlreader.so*  zlib.so*
dom.so*     gettext.so*  mbstring.so*  openssl.so*  suhosin.so*  timezonedb.so*  xml.so*
filter.so*  hash.so*     mcrypt.so*    posix.so*    sysvsem.so*  tokenizer.so*   xmlwriter.so*
[root@laptop extensions]#

I wonder if he has the package php-translit installed.  I checked synaptic on my machine and found it was not installed, but again I do not have that error. I am going to assume that it is not a error caused from the openemr package.  I am inclined to believe that the problem is being caused from trying to run openemr from the live cd. I have yet to test my idea though.

FWIW I have not found any soft link pointing to the /var/ in the openemr program
« Last Edit: October 30, 2011, 07:54:02 PM by YouCanToo »




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline diamond_gr

  • Jr. Member
  • **
  • Posts: 44
    • Efstathios Iosifidis Official Web Site
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #8 on: October 31, 2011, 08:29:43 AM »
Well, I run it on virtual (it's where I got the live in the first place) and it seems to run perfect. I mean when I open firefox the page it show up.
I wanted to have a live cd so I'll be able to give it to friend and test it. Most probably might be the permissions of files of cd.

I'll tell you how I installed it and you can tell me if I made a mistake during installation.

1. I downloaded ZEN and installed it (I wanted to have only this installed). I updated it.
2. I installed via synaptic the programs

Code: [Select]
task-lamp
mysql-administrator
mysql-gui-tools

3. Go to ZEN>more applications>Databases>MySQL Administrator    Put in 'localhost' in the address, root in 'user' then hit Enter and I should have the MySQL database admin panel, I can see if the database is running, I checked Apache if running by putting 'http://localhost' in firefox's address bar.

4. I downloaded openEMR and the next commands were

Code: [Select]
tar -pxvzf openemr-4.1.0.tar.gz
mv openemr-4.1.0 /var/www/html/openemr
cd /var/www/html

5. Then I changed some permissions

Code: [Select]
chmod 666 openemr/library/sqlconf.php
chmod 666 openemr/interface/globals.php

6. I installed the program using http://localhost/openemr/setup.php
I gave a password for the admin user and also for the database.

7. I opened firefox and everything was OK. I created a user.

I didn't do any other changes (this must be the problem I guess).

If someone can tell me what to do, I would be happy.
« Last Edit: October 31, 2011, 01:21:46 PM by diamond_gr »
PCLOS in Greek

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #9 on: October 31, 2011, 09:33:54 PM »
Did you apply the patch that was suggested at the very end of the setup program?




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline diamond_gr

  • Jr. Member
  • **
  • Posts: 44
    • Efstathios Iosifidis Official Web Site
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #10 on: November 03, 2011, 03:39:06 PM »
Well, I didn't apply the patch of this page.

I only made some changes to php.ini file
Code: [Select]
"short_open_tag = On",
"display_errors = Off",
"register_globals = Off",
"magic_quotes_gpc = On"

I didn't add the following on the apache file (I don't know where's that):
Code: [Select]
The "/var/www/html/openemr/sites/pclos/documents", "/var/www/html/openemr/sites/pclos/edi" and "/var/www/html/openemr/sites/pclos/era" directories contain patient information, and it is important to secure these directories. This can be done by placing pertinent .htaccess files in these directories or by pasting the below to end of your apache configuration file:
  <Directory /var/www/html/openemr/sites/pclos/documents>
      order deny,allow
      Deny from all
  </Directory>
  <Directory /var/www/html/openemr/sites/pclos/edi>
      order deny,allow
      Deny from all
  </Directory>
  <Directory /var/www/html/openemr/sites/pclos/era>
      order deny,allow
      Deny from all
  </Directory>

Anyway, I still ge the following picture when I run it from the livecd.



As you can see, I tried it also with Chromium, just in case it's a firefox problem.

The virtual machine installation works fine.
Thanks for helping...
PCLOS in Greek

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5324
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #11 on: November 03, 2011, 04:12:48 PM »
Well, I didn't apply the patch of this page.

I only made some changes to php.ini file
Code: [Select]
"short_open_tag = On",
"display_errors = Off",
"register_globals = Off",
"magic_quotes_gpc = On"

I didn't add the following on the apache file (I don't know where's that):
Code: [Select]
The "/var/www/html/openemr/sites/pclos/documents", "/var/www/html/openemr/sites/pclos/edi" and "/var/www/html/openemr/sites/pclos/era" directories contain patient information, and it is important to secure these directories. This can be done by placing pertinent .htaccess files in these directories or by pasting the below to end of your apache configuration file:
  <Directory /var/www/html/openemr/sites/pclos/documents>
      order deny,allow
      Deny from all
  </Directory>
  <Directory /var/www/html/openemr/sites/pclos/edi>
      order deny,allow
      Deny from all
  </Directory>
  <Directory /var/www/html/openemr/sites/pclos/era>
      order deny,allow
      Deny from all
  </Directory>

Anyway, I still ge the following picture when I run it from the livecd.



As you can see, I tried it also with Chromium, just in case it's a firefox problem.


This is not a web browser issue. Changing web browsers will NOT correct the problem. This is a configuration problem, or a problem cause by the livecd. The only thing I have done different than you has been

1. I applied all the changes and patches during and after the install.
2. I have not tried making and running it from a live cd.

Quote
The virtual machine installation works fine.
Thanks for helping...


If as you say it works from your virtual machine just fine, than the problem has to be an issue with the livecd.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #12 on: November 03, 2011, 04:19:06 PM »
If as you say it works from your virtual machine just fine, than the problem has to be an issue with the livecd.


+1,
http://www.pclinuxos.com/forum/index.php/topic,98862.msg838271.html#msg838271

Offline diamond_gr

  • Jr. Member
  • **
  • Posts: 44
    • Efstathios Iosifidis Official Web Site
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #13 on: November 04, 2011, 02:25:40 AM »
@as

My goal is to give this livecd to show to my doctor friends that there's a program etc.
I guess I have to make another virtual machine and install this livecd so I'll check if it works.
PCLOS in Greek

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Not sure what's wrong...Mysql or apache? Webpage says it's Forbiden
« Reply #14 on: November 04, 2011, 04:51:47 AM »
@as

My goal is to give this livecd to show to my doctor friends that there's a program etc.
I guess I have to make another virtual machine and install this livecd so I'll check if it works.

This error is specific and happen only when you run the system from LiveCD
Quote
[Sun Oct 30 23:13:21 2011] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var

LiveCD, although it look like an installed system , is really different from an installed system, because need to merge together two layer: one read-only layer (which really is all software available on the CD) and oneread-write layer which is temporarily built in RAM memory.

Without going into technical details, for security reason the web server setup doesn't allow to use "symbolic links" pointing to the web page tree. Unfortunately "symbolic links" actually are the only way to have a working LiveCD.

So, if you distribute the LiveCD and your friends are going to install it, they will have no problem.

Otherwise may be it is possible to change the webserver setup, to point to /union/var instead of /var and may be it could be possible to run the system from a LiveCD, but I'm not an expert about web servers.

Also, I believe that if you, or your friends, want to perform a serious test, you might need to save some application data...
Therefore I would suggest a PCLinuxOS installation directly on a USB stick, say 8 Gb, which will work exactly like an hard disk installation. (may be a little slower, but not that much).

AS