Koozali.org: home of the SME Server

problems with typo3 + perl

Offline haihai

  • *
  • 5
  • +0/-0
problems with typo3 + perl
« on: September 11, 2006, 10:58:58 PM »
Hi,

I have a sme 7.0 with a typo3 4.0 webserver.

I'm interested to put a awstats, and i installed the mod_perl necesary as a faq suggested.

But i can't execute the file .pl to view the stats. I have two files, in two locations, and the first only show the file as a text, and the second, that is called by php file, says that no locate "\usr\bin\perl"

Can anyone know how helps?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: problems with typo3 + perl
« Reply #1 on: September 12, 2006, 12:48:07 PM »
Quote from: "haihai"
Hi,

I have a sme 7.0 with a typo3 4.0 webserver.

I'm interested to put a awstats, and i installed the mod_perl necesary as a faq suggested.

But i can't execute the file .pl to view the stats. I have two files, in two locations, and the first only show the file as a text, and the second, that is called by php file, says that no locate "\usr\bin\perl"

Can anyone know how helps?
First the perl shebang should read: /usr/bin/perl as the directory seperator on linux/unix systems is a forward slash in comparison to the backslash at windows based systems.

Second you probably have not configured files ending on .pl to be CGI scripts. You should have a
Code: [Select]
AddHandler cgi-script .pl line somewhere in your httpd.conf file, there probably already is one for cgi files.

You can modify this in your template files, expand the httpd.conf file again and restart the httpd. The default line for cgi files is in the /etc/e-smith/templates/etc/httpd/conf/httpd.conf/80AddHandler00 file.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline haihai

  • *
  • 5
  • +0/-0
problems with typo3 + perl
« Reply #2 on: September 12, 2006, 08:24:37 PM »
Ok!

I modify in the 80AddHandler00 :
Code: [Select]
AddHandler cgi-script .pl .cgi
and i expanded the template and restart the service.

But, now, when i try to access to file, the server show:

Quote
Forbidden

You don't have permission to access /typo3conf/ext/galileo_awstats/awstats/cgi-bin/awstats.pl on this server.


The dir and the files into  are chmoded with 0777.

What's made wrong?

Thanks for all...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
problems with typo3 + perl
« Reply #3 on: September 13, 2006, 11:34:18 AM »
Quote from: "haihai"
Ok!

I modify in the 80AddHandler00 :
Code: [Select]
AddHandler cgi-script .pl .cgi
and i expanded the template and restart the service.

But, now, when i try to access to file, the server show:

Quote
Forbidden

You don't have permission to access /typo3conf/ext/galileo_awstats/awstats/cgi-bin/awstats.pl on this server.

The dir and the files into  are chmoded with 0777.

What's made wrong?

Thanks for all...
The problem is proabably not in the permissions but in the user rights. Who is the owner of the file and directory? You can display that using the 'ls -l' or 'll' command. It should be accessible by the www user or a group which includes the www user, as this is the user which apache is using to run. To set ownership to be www for user and group execute the following command:
Code: [Select]
chown www:www /path/to/file(the first www is the user, the second is the group)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline haihai

  • *
  • 5
  • +0/-0
problems with typo3 + perl
« Reply #4 on: September 13, 2006, 03:28:05 PM »
Ok, but no solve the problem

I verify if the user and the group is www.

Code: [Select]
[root@web cgi-bin]# ls -ll
total 1152
-rwxrwxrwx  1 www www   5407 Sep  7 10:45 awredir.pl
-rwxrwxrwx  1 www www 515656 Sep 11 22:32 awstats.cgi
-rwxrwxrwx  1 www www  51918 Sep  7 10:45 awstats.model.conf
-rwxrwxrwx  1 www www 515656 Sep  7 10:45 awstats.pl
-rwxrwxrwx  1 www www  52004 Sep  7 10:56 awstats.typo3.conf
drwxrwxrwx  2 www www   4096 Sep  7 10:45 lang
drwxrwxrwx  2 www www   4096 Sep  7 10:45 lib
drwxrwxrwx  2 www www   4096 Sep  7 10:49 logs
drwxrwxrwx  3 www www   4096 Sep  7 10:45 plugins
[root@web cgi-bin]#


well, the server don't run the file awstats.pl, as i say before.

Any idea more?
Cactus, thanks for all your support!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
problems with typo3 + perl
« Reply #5 on: September 13, 2006, 05:40:41 PM »
Quote from: "haihai"
Ok, but no solve the problem

I verify if the user and the group is www.

Any idea more?
Cactus, thanks for all your support!
In what folder are the scripts (the whole path from root all the way down)?
Is this path accessible by Apache (configured somewhere in httpd.conf)? Can you access the containing folder and the file from a browser?
Did you check the httpd error log in /var/log/httpd?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline haihai

  • *
  • 5
  • +0/-0
problems with typo3 + perl
« Reply #6 on: September 13, 2006, 09:49:04 PM »
After to read the log file, I see that in the directory the option execcgi is off.

Then, I modify in the template 90e-smithAccess40ibays: where i find
Code: [Select]
Options +Includes i put a new line after:
Code: [Select]
Options +ExecCGI
This modify gives the execcgi on i the directory and subdirectories. then a expand the template and restart the server, AND WORKS!!!!!


Thanks, cactus, in the end i see the light!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
problems with typo3 + perl
« Reply #7 on: September 13, 2006, 11:07:10 PM »
Quote from: "haihai"
After to read the log file, I see that in the directory the option execcgi is off.

Then, I modify in the template 90e-smithAccess40ibays: where i find
Code: [Select]
Options +Includes i put a new line after:
Code: [Select]
Options +ExecCGI
This modify gives the execcgi on i the directory and subdirectories. then a expand the template and restart the server, AND WORKS!!!!!


Thanks, cactus, in the end i see the light!
If you have installed everything in an ibay, you do not need to modify the template IMHO, you can easily allow executable content in the server-manager for this ibay, the cgi-bin directory is then configured to allow for executable content (and reviewing your previous posts I get the idea that you already put the scripts there).
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Tillebeck

  • ****
  • 76
  • +0/-0
not a SME server problem
« Reply #8 on: December 06, 2006, 03:45:22 PM »
This is not really a SME Server issue. But more a problem with the extension you are trying to use in your CMS.

I guess you are using the cc_awstats? I had the same problem with that extension. It solved it doing:
1) an uninstall of the cc_awstat
2) installed the ics_awstats
3) addon: install the ics_web_awstats to make it available in the web-section so restricted backend users can have access to it.

If you have any notes on Typo3 installations in SME 7.0 please share them. I am funbling aroung my self. I did get the symlink to work, but not accross ibays so all ibays can share the same source. I have the source in every typo3 ibay. And I am not sure how to set ownership of files so typo3 can edit files but samba users also can edit files by just mapping the webfolder as a drive.

[EDIT] Sorry, I just see that you got it to work. So pay no attention to my post.

BR. Anders