Page 1 of 1

[SOLVED] Path issue with subdir

Posted: Sun Jun 16, 2013 11:11 am
by nervino
Hello, I've uploaded my site in a sub directory (/test/) on my server, but when I try to load the frontend or the admin panel I have the following error:

Code: Select all

Warning: require_once(__DIR__/function.module_action.php) [function.require-once]: failed to open stream: No such file or directory in /home/mhd/www.mydomain.com/htdocs/test/modules/CGSimpleSmarty/CGSimpleSmarty.module.php on line 39

Fatal error: require_once() [function.require]: Failed opening required '__DIR__/function.module_action.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/mhd/www.mydomain.com/htdocs/test/modules/CGSimpleSmarty/CGSimpleSmarty.module.php on line 39
The site is working well locally.
I changed the root paths in config.php.
I also called mydomain.com/install/ on my server hoping this would have fixed the issue

Any idea how to solve the problem?


Thank you


----------------------------------------------

Cms Version: 1.11.7

Installed Modules:

CMSMailer: 5.2.1
CMSPrinting: 1.0.4
FileManager: 1.4.3
MenuManager: 1.8.5
MicroTiny: 1.2.5
ModuleManager: 1.5.5
News: 2.12.12
Search: 1.7.8
ThemeManager: 1.1.8
CGExtensions: 1.34
JQueryTools: 1.2.5
CGContentUtils: 1.3.4
CGSimpleSmarty: 1.6.2
MleCMS: 1.11.4
Gallery: 1.6.1
FormBuilder: 0.7.3
CGSmartImage: 1.10.9


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.3.10-1ubuntu3.6
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/lib/php5 (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysqli)
Server Db Version: 5.0.24a
Server Db Grants: Ho trovato una dichiarazione "GRANT ALL" che sembra essere adatta


----------------------------------------------

Re: Path issue with subdir

Posted: Sun Jun 16, 2013 11:35 am
by Rolf
Cleared cache?

Re: Path issue with subdir

Posted: Sun Jun 16, 2013 1:23 pm
by nervino
Yes, I cleared the cache before upload the site.

Re: Path issue with subdir

Posted: Sun Jun 16, 2013 2:45 pm
by nervino
Sorry, I've posted the system infos of my local server. The online server has php 5.2.6, so I think the issue is caused by the PHP version.
The php magic constant "__DIR__" was added in PHP 5.3.0...

Now I'm installing the online site from scratch.

Thank you Rolf.