Koozali.org: home of the SME Server

Can't seem to get any perl or php sites to work properly.

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Can't seem to get any perl or php sites to work properly.
« on: April 28, 2007, 05:16:44 AM »
Hi all

I've been trying to install an auction site for about a year now on SME and still really never got it working properly

It's always some error at the site, (can't write to closed auction folder etc.) or the logs appear to be telling me it can't write, or has a permission problem of some sort. But even when I try to change the permissions of the auction site and all folders to 777 it still appears to have write problems of some kind ?

The site is currently running in an ibay and most of it comes up.
www.foolishlys.com

I don't know why but I've toyed with many different scripts and even purchased some others and simply cannot get any of them working.

I'm sure it's something simple but I cannot figure this out and I don't really know where to start.

Where should someone start troubleshooting ? Aren't these scripts just suppose to work on just about any webserver, or is there some trick I need to know about with SME or perhaps the script itself needs to be edited in order to work with SME ???

Please advise thanks all.

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Re: Can't seem to get any perl or php sites to work properly
« Reply #1 on: April 28, 2007, 05:21:24 AM »
oop mis quoted here so I just deleted the text please see initial post above,

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Can't seem to get any perl or php sites to work properly.
« Reply #2 on: April 28, 2007, 10:53:12 PM »
You should start with the people that sold (developed the script) and see if they require any special settings, permissions,...

You should have a readme file somwhere that should contain the requirements and how to install the script on your server.
"It should just work" if it doesn't report it. Thanks!

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Yep did taht
« Reply #3 on: April 29, 2007, 06:20:49 PM »
Quote from: "bpivk"
You should start with the people that sold (developed the script) and see if they require any special settings, permissions,...

You should have a readme file somwhere that should contain the requirements and how to install the script on your server.


Yup, thanks

I did do that initially and after much investigation determining the SME server packages etc it's determined that SME has what it needs.

Also another programmer looked at my logs and things, and says comes up with permissions etc. But not the permissions of the script something to do with the way SME writes to the temp folders then back to the Ibays or something.

Once the programmer helped me with this I found that this created security issues with SME so I basically did not know what changes the programmer made so I re-installed fresh SME and then my contribs, then put the www.foolishlys.com site back up.

The designer says it should work

But thats not the only script I've tried. Believe me I've read the readme files and installed and followed instructions and tried and searched and worked on just about all the script I can find and I have yet to get one script of anykind working on my own.

Well actually there is one that I did get working which was the Brim Project for contact/tast/project management etc. that seemed to work and installed fine.

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Perl info
« Reply #4 on: April 30, 2007, 03:09:41 PM »
Updated from the designer of the script, however keep in mind I have not been able to get any script working. It just seems strange.

A Response from the designer:
------------------------------------------
Hello,

We have looked on to the issue of the different Linux version compability and we found out that it does not work on every flavor of Linux because they are developed on a different way. We did find out that it has to do with the control panel the server has as on our testing it only works with CPanel and with ensim control panels. After diggin further into the issue we found out that it is because they force all perl scripts to run with and only with permissions of 755.

Our hosting servers are all CentOS 4.x and cpanel for the control panel, these scripts were developed on those servers and these scripts run 100% the way they are supposed to on our servers. About Solaris, we have not tested that OS yet but we might in the near future.

Best regards,
Elitewebpros
----------------------------------------------------
Can anyone tell by this response if this script could be made to run on SME ??? or is there just too much work that needs to be done ???

Please advise
Thanks

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Can't seem to get any perl or php sites to work properly
« Reply #5 on: May 02, 2007, 09:42:55 PM »
Quote from: "Agent86"
But even when I try to change the permissions of the auction site and all folders to 777 it still appears to have write problems of some kind ?


As a security note to all 777 is _highly not recommend_ see google.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Re: Can't seem to get any perl or php sites to work properly
« Reply #6 on: May 05, 2007, 03:21:34 AM »
Quote from: "byte"
Quote from: "Agent86"
But even when I try to change the permissions of the auction site and all folders to 777 it still appears to have write problems of some kind ?


As a security note to all 777 is _highly not recommend_ see google.


Agreed, but just making the point that even with 777 no effect and still none working fyi

Also I've sense found some notes that I was going to use on this because I thought the (no write to tmp) might have something to do with it. But I believe I need more instructions on this subject. Because I don't want to change all the ibays just the one so that the script can work. If thats even what the problem is ?

Please advise on this subject below to determine if making changes is selected to any ibay or will it change the no write tmp and allow write to all ibays etc. ??? please advise thanks

Here are some notes I've dug up that was listed someplace in the forums but I can no longer find them.

>>>>>
Unlock the no write to tmp feature for SME
From the trouble shooting how to's
PHP Warning: (...) open_basedir restriction if installing anything PHP related in ibay
Related to open_basedir setting in php.ini file. SME does not allow PHP in /tmp or /usr/share. This is a security measure. PHP values are set per ibay in the template:
/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays
There you can set the basedir (or the includedir) for all ibays by changing the template.
These commands solves it, tmp could be another location where PHP wants to write.

/sbin/e-smith/db accounts setprop <ibayname>
PHPBaseDir /home/e-smith/files/ibays/<ibayname>/:/tmp
/sbin/e-smith/signal-event ibay-modify <ibayname>
>>>>>

I'm not sure I understand these commands? where does the command start and end, and will this even solve the problem. I do seem to have a write problem,the logs say cannot write to folder and the script itself also says this on the main page and the script is also sending me emails that it could not write to the closed auction item folder.

Thanks for any advise On this.

Offline Agent86

  • ****
  • 592
  • +0/-0
    • http://www.iclbiz.com
PHP and Perl
« Reply #7 on: May 14, 2007, 03:42:40 AM »
Hi all

I know this is sort of beating a dead horse type thing but here is where I'm at:

I've tried the fix for write to temp on SME and PHP see subject here:
http://forums.contribs.org/index.php?topic=21553.0

This did not seem to effect the ability for the auction script to work properly at least so I thought.

But I tried setting the files and folders to chmod 777 a few folders at a time, and noticed more functions of the script began to work.

Now the site is totally insecure, but it is working.

Now what should I do to secure things up again. if I changed the folders of the script to Chmod 755 like they are suppose to be then the scipt won't function properly.

What could be wrong, script or the way SME processes php and perl ???

Any ideas ?

Thanks

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Can't seem to get any perl or php sites to work properly.
« Reply #8 on: May 14, 2007, 12:20:35 PM »
Quote
What could be wrong, script or the way SME processes php and perl ???

Your chmod settings.
I usualy use 554 for folders and 444 for files. You can still change the settings if the script doesn't work. Just try to limit the write permissions.
"It should just work" if it doesn't report it. Thanks!