[SOLVED] PHP inside OTRS-directory - Software Error

Moderator: crythias

Post Reply
brensly
Znuny newbie
Posts: 10
Joined: 15 Feb 2012, 09:56
Znuny Version: 5.0.3
Real Name: Alexander Eriksson

[SOLVED] PHP inside OTRS-directory - Software Error

Post by brensly »

Hello!

I run OTRS on a Linux server and I feel kind of stupid because I can't find what is wrong here.
Whenever I create a PHP file inside the OTRS directory (and in subfolders) and try to reach it through the browser, this comes up:

Code: Select all

Software error:

slurp_filename('/opt/otrs/bin/cgi-bin/filename.php') / opening: (2) No such file or directory at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 541
I have Googled this all day but it doesn't make much sense. Somewhere I read something that pointed in the direction that perl actually tries to execute the .php file, thus printing out this error.

PHP is enabled in Apache, however I can't get it to execute these scripts inside the OTRS directory if I understand this correctly.

Where do I go from here?
Last edited by brensly on 17 Feb 2012, 10:30, edited 1 time in total.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: PHP inside OTRS-directory - Software Error

Post by jojo »

cgi-bin is a CGI directory. So always PERL will be used.

Have the PHP file on a different location
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
brensly
Znuny newbie
Posts: 10
Joined: 15 Feb 2012, 09:56
Znuny Version: 5.0.3
Real Name: Alexander Eriksson

Re: PHP inside OTRS-directory - Software Error

Post by brensly »

jojo wrote:cgi-bin is a CGI directory. So always PERL will be used.

Have the PHP file on a different location
Thanks for your reply!

The thing is, the file i'm trying to reach is not located in the cgi-bin directory. It doesn't matter where I put is as long as it's in the OTRS folder or any of its subdirectories, this error comes up looking for the file in cgi-bin. I would like to know the reason it behaves this way.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: PHP inside OTRS-directory - Software Error

Post by jojo »

OTRS runs as CGI Script (or via mod perl). So you can not put PHP code in the directories.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
brensly
Znuny newbie
Posts: 10
Joined: 15 Feb 2012, 09:56
Znuny Version: 5.0.3
Real Name: Alexander Eriksson

Re: PHP inside OTRS-directory - Software Error

Post by brensly »

jojo wrote:OTRS runs as CGI Script (or via mod perl). So you can not put PHP code in the directories.
Thank you for clarifying this. At least I know what is wrong now :)
Post Reply