PDA

View Full Version : Update to php 5.2.6 problem with the aliases


Stown
16th September 2009, 21:50
Hi,

I have upgraded my php installation from 5.1 from the centos repo to 5.2.6 from a third party repo witch works good but only the aliases like phpmyadmin and webmail doesn't work, i get a 404 "can't find the page".

It looks like the php compiler has no rights to come into /usr/share/phpmyadmin

I changed the Alias from /usr/share/phpmyadmin to something within the /var/www and that worked.

But does anybody know how to fix this? Or has someone the same problem?

Thanks

primal23
16th September 2009, 21:51
What is the ls -l of /usr/share/phpmyadmin?

Stown
16th September 2009, 23:08
-rwxrwxrwx 1 root root 10873 Mar 24 17:05 browse_foreigners.php
-rwxrwxrwx 1 root root 758 Mar 24 17:05 calendar.php
-rwxrwxrwx 1 root root 3459 Mar 24 17:05 changelog.php
-rwxrwxrwx 1 root root 460 Mar 24 17:05 chk_rel.php
-rwxrwxrwx 1 root apache 1753 Mar 24 17:05 config.inc.php
-rwxrwxrwx 1 root root 1753 Mar 24 17:05 config.sample.inc.php
drwxrwxrwx 3 root root 4096 Sep 16 14:40 contrib
-rwxrwxrwx 1 root root 1470 Mar 24 17:05 db_create.php
-rwxrwxrwx 1 root root 10681 Mar 24 17:05 db_datadict.php
-rwxrwxrwx 1 root root 2475 Mar 24 17:05 db_export.php
-rwxrwxrwx 1 root root 471 Mar 24 17:05 db_import.php
-rwxrwxrwx 1 root root 19871 Mar 24 17:05 db_operations.php
-rwxrwxrwx 1 root root 7422 Mar 24 17:05 db_printview.php
-rwxrwxrwx 1 root root 34751 Mar 24 17:05 db_qbe.php
-rwxrwxrwx 1 root root 13999 Mar 24 17:05 db_search.php
-rwxrwxrwx 1 root root 999 Mar 24 17:05 db_sql.php
-rwxrwxrwx 1 root root 22432 Mar 24 17:05 db_structure.php
-rwxrwxrwx 1 root root 4583 Mar 24 17:05 docs.css
-rwxrwxrwx 1 root root 222267 Mar 24 17:05 Documentation.html
-rwxrwxrwx 1 root root 2167 Mar 24 17:05 error.php
-rwxrwxrwx 1 root root 24843 Mar 24 17:05 export.php
-rwxrwxrwx 1 root root 18902 Mar 24 17:05 favicon.ico
-rwxrwxrwx 1 root root 13934 Mar 24 17:05 import.php
-rwxrwxrwx 1 root root 6586 Mar 24 17:05 index.php
drwxrwxrwx 2 root root 4096 Sep 16 14:40 js
drwxrwxrwx 2 root root 12288 Sep 16 14:40 lang
drwxrwxrwx 10 root root 4096 Sep 16 14:40 libraries
-rwxrwxrwx 1 root root 411 Mar 24 17:05 license.php
-rwxrwxrwx 1 root root 15895 Mar 24 17:05 main.php
-rwxrwxrwx 1 root root 26259 Mar 24 17:05 navigation.php
-rwxrwxrwx 1 root root 27182 Mar 24 17:05 pdf_pages.php
-rwxrwxrwx 1 root root 52735 Mar 24 17:05 pdf_schema.php
-rwxrwxrwx 1 root root 360 Mar 24 17:05 phpinfo.php
-rwxrwxrwx 1 root root 16613 Mar 24 17:05 phpmyadmin.css.php
drwxrwxrwx 5 root root 4096 Sep 16 14:40 pmd
-rwxrwxrwx 1 root root 11227 Mar 24 17:05 pmd_common.php
-rwxrwxrwx 1 root root 1917 Mar 24 17:05 pmd_display_field.php
-rwxrwxrwx 1 root root 18486 Mar 24 17:05 pmd_general.php
-rwxrwxrwx 1 root root 880 Mar 24 17:05 pmd_help.php
-rwxrwxrwx 1 root root 3372 Mar 24 17:05 pmd_pdf.php
-rwxrwxrwx 1 root root 3942 Mar 24 17:05 pmd_relation_new.php
-rwxrwxrwx 1 root root 1901 Mar 24 17:05 pmd_relation_upd.php
-rwxrwxrwx 1 root root 2248 Mar 24 17:05 pmd_save_pos.php
-rwxrwxrwx 1 root root 1063 Mar 24 17:05 print.css
-rwxrwxrwx 1 root root 9722 Mar 24 17:05 querywindow.php
-rwxrwxrwx 1 root root 403 Mar 24 17:05 readme.php
drwxrwxrwx 2 root root 4096 Sep 16 14:40 scripts
-rwxrwxrwx 1 root root 7653 Mar 24 17:05 server_binlog.php
-rwxrwxrwx 1 root root 2784 Mar 24 17:05 server_collations.php
-rwxrwxrwx 1 root root 13284 Mar 24 17:05 server_databases.php
-rwxrwxrwx 1 root root 4917 Mar 24 17:05 server_engines.php
-rwxrwxrwx 1 root root 1639 Mar 24 17:05 server_export.php
-rwxrwxrwx 1 root root 486 Mar 24 17:05 server_import.php
-rwxrwxrwx 1 root root 110708 Mar 24 17:05 server_privileges.php
-rwxrwxrwx 1 root root 2869 Mar 24 17:05 server_processlist.php
-rwxrwxrwx 1 root root 581 Mar 24 17:05 server_sql.php
-rwxrwxrwx 1 root root 20731 Mar 24 17:05 server_status.php
-rwxrwxrwx 1 root root 2462 Mar 24 17:05 server_variables.php
-rwxrwxrwx 1 root root 317 Mar 24 17:05 show_config_errors.php
-rwxrwxrwx 1 root root 29485 Mar 24 17:05 sql.php
-rwxrwxrwx 1 root root 9097 Mar 24 17:05 tbl_addfield.php
-rwxrwxrwx 1 root root 9463 Mar 24 17:05 tbl_alter.php
-rwxrwxrwx 1 root root 46319 Mar 24 17:05 tbl_change.php
-rwxrwxrwx 1 root root 9322 Mar 24 17:05 tbl_create.php
-rwxrwxrwx 1 root root 2594 Mar 24 17:05 tbl_export.php
-rwxrwxrwx 1 root root 635 Mar 24 17:05 tbl_import.php
-rwxrwxrwx 1 root root 15997 Mar 24 17:05 tbl_indexes.php
-rwxrwxrwx 1 root root 2186 Mar 24 17:05 tbl_move_copy.php
-rwxrwxrwx 1 root root 19804 Mar 24 17:05 tbl_operations.php
-rwxrwxrwx 1 root root 18270 Mar 24 17:05 tbl_printview.php
-rwxrwxrwx 1 root root 24311 Mar 24 17:05 tbl_relation.php
-rwxrwxrwx 1 root root 12626 Mar 24 17:05 tbl_replace.php
-rwxrwxrwx 1 root root 4423 Mar 24 17:05 tbl_row_action.php
-rwxrwxrwx 1 root root 17905 Mar 24 17:05 tbl_select.php
-rwxrwxrwx 1 root root 939 Mar 24 17:05 tbl_sql.php
-rwxrwxrwx 1 root root 34710 Mar 24 17:05 tbl_structure.php
drwxrwxrwx 2 root root 4096 Sep 16 14:40 test
drwxrwxrwx 4 root root 4096 Sep 16 14:40 themes
-rwxrwxrwx 1 root root 1096 Mar 24 17:05 themes.php
-rwxrwxrwx 1 root root 1752 Mar 24 17:05 transformation_overview.php
-rwxrwxrwx 1 root root 4068 Mar 24 17:05 transformation_wrapper.php
-rwxrwxrwx 1 root root 8209 Mar 24 17:05 translators.html
-rwxrwxrwx 1 root root 3573 Mar 24 17:05 user_password.php
-rwxrwxrwx 1 root root 4215 Mar 24 17:05 view_create.php

till
16th September 2009, 23:17
Please post the vhost file for the website that you used to access phpmyadmin trough.

Stown
17th September 2009, 01:04
/etc/httpd/conf/sites-available/s-projects.nl.vhost
<Directory /var/www/s-projects.nl>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost 213.163.64.99:80>
DocumentRoot /var/www/clients/client1/web14/web

ServerName s-projects.nl
ServerAlias *.s-projects.nl
ServerAlias bugtracker.s-projects.nl
ServerAdmin webmaster@s-projects.nl

ErrorLog /var/log/ispconfig/httpd/s-projects.nl/error.log

ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 503 /error/503.html

<Directory /var/www/s-projects.nl/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web14/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>

# cgi enabled
<Directory /var/www/clients/client1/web14/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client1/web14/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# php as cgi enabled
ScriptAlias /php5-cgi /var/www/php-cgi-scripts/web14/php-cgi-starter
Action php5-cgi /php5-cgi
AddHandler php5-cgi .php .php3 .php4 .php5
<Directory /var/www/php-cgi-scripts/web14/>
Order allow,deny
Allow from all
</Directory>


</VirtualHost>
/etc/httpd/conf/sites-enabled/s-projects.nl.vhost
<Directory /var/www/s-projects.nl>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost 213.163.64.99:80>
DocumentRoot /var/www/clients/client1/web14/web

ServerName s-projects.nl
ServerAlias *.s-projects.nl
ServerAlias bugtracker.s-projects.nl
ServerAdmin webmaster@s-projects.nl

ErrorLog /var/log/ispconfig/httpd/s-projects.nl/error.log

ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 503 /error/503.html

<Directory /var/www/s-projects.nl/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client1/web14/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>

# cgi enabled
<Directory /var/www/clients/client1/web14/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client1/web14/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# php as cgi enabled
ScriptAlias /php5-cgi /var/www/php-cgi-scripts/web14/php-cgi-starter
Action php5-cgi /php5-cgi
AddHandler php5-cgi .php .php3 .php4 .php5
<Directory /var/www/php-cgi-scripts/web14/>
Order allow,deny
Allow from all
</Directory>


</VirtualHost>

till
17th September 2009, 12:32
Maybe you run into the open basedir restriction. Please try to remove the complete line that starts with:

-d open_basedir=

from the file:

/var/www/php-cgi-scripts/web14/php-cgi-starter

Stown
17th September 2009, 20:13
It works! Thank you verry much :-)

till
17th September 2009, 23:24
Ok. Then you should really consider to make a dedicated vhost for the webmail and phpmyadmin instead of these aliases. The open-basedir restrictions is a very valuable security feature and without it, your server security is much lower.

Stown
17th September 2009, 23:30
Oke, and how will i do that? So that it works for all (domains.nl/[vb:webmail] )

till
18th September 2009, 12:44
This does not work for all domains. You will have to use one domain and create a website like webmail.yourdomain.com and then install the webmail client inside.