Open_basedir restriction in effect

Hi, I have just installed MSM 3.10.0 to my shared hosting and get the following errors:

    Warning: main(): open_basedir restriction in effect. File(/home/core/include/version.inc) is not within the allowed path(s): (/home/dv:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/dv/mysource_matrix/core/include/init.inc on line 68
    
    Warning: main(/home/core/include/version.inc): failed to open stream: Operation not permitted in /home/dv/mysource_matrix/core/include/init.inc on line 68
    
    Fatal error: main(): Failed opening required '/home/core/include/version.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dv/mysource_matrix/core/include/init.inc on line 68


I have created symlinks using the CLI commands on the forum, such as:
    ln -s /home/dv/mysource_matrix/core/web/index.php index.php


It seems the error is that MSM isn't getting the correct path fed to it, but I can't figure out where I went wrong :(

Thanks.

MySource Matrix is not shared hosting friendly. Your shared host has Open Basedir restrictions in place, which restrict where you can run PHP scripts. You will need to work with your hosting provider to try and work out where you can put the MySource Matrix code.

[quote]MySource Matrix is not shared hosting friendly. Your shared host has Open Basedir restrictions in place, which restrict where you can run PHP scripts. You will need to work with your hosting provider to try and work out where you can put the MySource Matrix code.
[right][post=“11409”]<{POST_SNAPBACK}>[/post][/right][/quote]



It seems as though it is trying to access the wrong directory:



File(/home/core/include/version.inc)



shouldn’t that be /home/dv/mysource_matrix/core/include/version.inc

??

Yeah, as I said, Matrix is not shared hosting friendly. It doesn't seem to be reading the SYSTEM_ROOT properly from the filesystem.

[quote]Yeah, as I said, Matrix is not shared hosting friendly. It doesn’t seem to be reading the SYSTEM_ROOT properly from the filesystem.
[right][post=“11414”]<{POST_SNAPBACK}>[/post][/right][/quote]



Is there any way I can set SYSTEM_ROOT in a config file?

[quote]Is there any way I can set SYSTEM_ROOT in a config file?
[right][post=“11415”]<{POST_SNAPBACK}>[/post][/right][/quote]



No. The SYSTEM_ROOT is automatically determined by Matrix during operation. Its a combination of where the index.php file is and how you’ve configured your Apache aliases or symbolic links. You may have to get the open_basedir restrictions removed, or move your entire mysource_matrix folder into the allowed folder.

[quote]No. The SYSTEM_ROOT is automatically determined by Matrix during operation. Its a combination of where the index.php file is and how you’ve configured your Apache aliases or symbolic links. You may have to get the open_basedir restrictions removed, or move your entire mysource_matrix folder into the allowed folder.
[right][post=“11416”]<{POST_SNAPBACK}>[/post][/right][/quote]



Ah okay. Thanks anyway.



I’ll have to setup a machine here to test it on instead :wink:



(I emailed the host about open_basedir restrictions and they are not willing to remove them. They did help a lot to get me this far in the installation, though.)

[quote](I emailed the host about open_basedir restrictions and they are not willing to remove them. They did help a lot to get me this far in the installation, though.)
[right][post=“11417”]<{POST_SNAPBACK}>[/post][/right][/quote]



Yes, shared hosts like it a lot. However, it means that you can only run PHP scripts that exist inside the directory specified by the open_basedir setting. However, we actually put Matrix’s scripts outside the web root for security (so that the PHP scripts are not web accessible). This usually breaks under shared hosts.

[quote]Yes, shared hosts like it a lot. However, it means that you can only run PHP scripts that exist inside the directory specified by the open_basedir setting. However, we actually put Matrix’s scripts outside the web root for security (so that the PHP scripts are not web accessible). This usually breaks under shared hosts.
[right][post=“11418”]<{POST_SNAPBACK}>[/post][/right][/quote]



The allowed directory is usually wwwroot/ or public_html/, right? So installing it there, while bad for security, would probably work?

[quote]The allowed directory is usually wwwroot/ or public_html/, right? So installing it there, while bad for security, would probably work?
[right][post=“11419”]<{POST_SNAPBACK}>[/post][/right][/quote]



Yup, it may work. You might run into other issues though. We usually don’t recommend installing Matrix on shared hosts for this very reason. :slight_smile: Good luck with it though.

[quote]Yup, it may work. You might run into other issues though. We usually don’t recommend installing Matrix on shared hosts for this very reason. :slight_smile: Good luck with it though.
[right][post=“11420”]<{POST_SNAPBACK}>[/post][/right][/quote]



I’ll let you know how it goes :wink:

[quote]I’ll let you know how it goes :wink:
[right][post=“11421”]<{POST_SNAPBACK}>[/post][/right][/quote]



No good :frowning: similar errors.



What prices does squiz.net have on shared hosting? :wink:

[quote]What prices does squiz.net have on shared hosting? :wink:
[right][post=“11422”]<{POST_SNAPBACK}>[/post][/right][/quote]



Actually, fairly reasonable I’m lead to believe. :smiley: Give our Sales guys a call on Monday. Their contact details can be found in the Squiz website.