1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

PHP files under an Alias don't get parsed

Discussion in 'Plesk for Linux - 8.x and Older' started by rolo@, Dec 28, 2005.

  1. rolo@

    rolo@ Basic Pleskian

    23
    57%
    Joined:
    Dec 25, 2005
    Messages:
    35
    Likes Received:
    0
    Hi,

    I'm running a Plesk 7.5.4 server. Fedora Core 2 with PHP 4.3.11.

    I want to have libraries stored in one domain and have other domains access them. I was being able to do this just fine on my previous dedicated server (without plesk) but now I can't. PHP files that are read from aliased directories don't get parsed and the browser shows a "download file" popup.

    I added the following to this file /var/www/vhosts/otherdomain.com/conf/vhost.conf:

    Alias /scripts /var/www/vhosts/scriptsdomain.com/httpdocs/scripts

    When I go to http://otherdomain.com/scripts/phpinfo.php, I get prompted to download the phpinfo.php file instead of seing its output.

    How can I solve this? I'm in a pretty tight spot and need to solve this asap.

    Could this have anything to do with open_basedir? I tried a efw things but can't seem able to disable it either.

    Thanks!
     
  2. ArchStanton

    ArchStanton Guest

    0
     
    You probably will have to add this to your vhost.conf file as well:

    <Directory /var/www/vhosts/otherdomain.com/httpdocs>
    php_admin_value open_basedir "/var/www/vhosts/scriptsdomain.com/httpdocs/scripts:/tmp"
    </Directory>

    If that still doesn't work, you might want to try creating a symbolic link. That worked well for me.
     
  3. rolo@

    rolo@ Basic Pleskian

    23
    57%
    Joined:
    Dec 25, 2005
    Messages:
    35
    Likes Received:
    0
    Hi, thanks for your answer.

    Unfortunately neither <Directory> entries or symlinks are working. Well, technically yes they work; the basedir gets set correctly -I can see this in phpinfo()-, and the symlink works too -I can access the file allritght-, but they don't solve the problem.

    My problem isn't not being able to "reach" the file, but getting it parsed. You see Apache will dump the aliased files as if they were plain text. Note that if I access these same files from the domain where they were created, they get parsed by php just fine.
     
Loading...