Project

General

Profile

Bug #2512

mysql_vhosts Complex SQL

Added by tronox@hotmail.com about 6 years ago. Updated about 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
mod_mysql_vhost
Target version:
-
Start date:
2013-09-08
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
No

Description

Upon reading the documentation I came up with the below SQL:

SELECT * FROM (SELECT IF((SELECT rootdir FROM vhosts WHERE vhost='?'),(SELECT rootdir FROM vhosts WHERE vhost='?'),(SELECT rootdir FROM vhosts WHERE '?' like vhost)) as rootdir) as a WHERE rootdir IS NOT NULL

This will return a row with an exact match to the host or if not found a row matching '%.example.com'. If neither are found it returns nothing. However it breaks the vhost.
Example(s):
http://test.bfddesigns.net/
Which should return a path of: /var/www/vhosts/bfddesigns.net/subdomains/test/index.php but does not.
When I revert the SQL to the default SQL everything works fine.


Related issues

Is duplicate of Feature #2163: Multiple use of '?' in mysql-vhost.sqlFixed2010-02-07

Actions

History

#1

Updated by stbuehler about 6 years ago

  • Status changed from New to Duplicate
  • Target version deleted (1.4.x)

Also available in: Atom