Koozali.org: home of the SME Server

SITEX problems

Offline joebar

  • 5
  • +0/-0
SITEX problems
« on: January 15, 2010, 11:29:29 PM »
Hi,

I've installed SITEX on  my sme-server, is an excellent CMS, many thanks to David Harper! :-D
Now I'm trying to insert my original website HTLM (www.morinispecial.it) on SITEX (www.morinispecial.it/sitex), and I found some problems:

The first is that on my LINKS page the redirect function don't work, on click I can see a new pop-up page with the address  http://www.morinispecial.it/sitex/redirect.php?linkid=#  but the relative page linked don't appear, yet the number of access is incremented on data base.  :-o

Another problem that I have is with WYSIWYG (Editor) configured as FCK, when I try to insert an image uploading it from my pc, if I use the find on server function, i can select the picture, but when I click on upload button I receive the "Invalid file" message (I've tryed with different pictures on jpg format), else if I use the Upload Tab on the IMAGE PROPERTY pop-up, and try to upload the image from my pc, I receive the  Error creating Image folder "Image/" (Can't create Image/ Directory) message  :-?  I've already checked the content permissions, and are all www.www and 775. If I manually charge pictures on the /content/fck/image folder (with ftp on an I-bay and moving it on /Content/fck/Images folder from the shell), I found it on the folder and  I can insert it with the FCK editor...too complicated! :-(
The last problem is that I've to insert google adsense java scripts on my pages, but I don't know how to do it, I don't have any experience with php, can someone help me!

I've already re-installed SITEX on another Sme-server fresh installation (virtual installed on vmware), but I have the exact same problems!

any suggestion is welcome!

Many Thanks Gianni

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: SITEX problems
« Reply #1 on: January 16, 2010, 12:03:54 AM »
hi Gianni

sorry, I can't help you but did you try to search in sitex' site?

also, please come to italian forum, thank you  :)
« Last Edit: January 16, 2010, 12:05:45 AM by Stefano »

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: SITEX problems
« Reply #2 on: January 16, 2010, 05:59:54 AM »
joebar

Look in the server log files for clues eg messages log and the various http access logs
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline joebar

  • 5
  • +0/-0
Re: SITEX problems
« Reply #3 on: January 17, 2010, 02:34:35 PM »
Hi Stefano,

yes I've already try to serch in sitex forum and how-to, but I haven't found nothing, so I think that my problems are related with a sme installation.
Thank You for your invite to italian forum, I'm always very busy but I promise to come  :-)

Hi Mary,

thank you for your simple suggestion, it was very helpful for me, yesterday I've take a look on the messages log and I've found two warnings consequent to the links issue:

PHP Warning:  session_register(): Cannot send session cache limiter - headers already sent (output started at /opt/sitex/includes/globals.php.inc:26) in /opt/sitex/includes/functions.php on line 2558
PHP Warning:  Cannot modify header information - headers already sent by (output started at /opt/sitex/includes/globals.php.inc:26) in /opt/sitex/redirect.php on line 19


After an internet investigation  I've deduced that it could be for the presence of spaces on globals.php.ini file
I then found two blank lines at the end of the file and I tried to delete them, but the link does not work yet... :-(
A new look at messages log and a new warning:

PHP Warning:  Cannot modify header information - headers already sent by (output started at /opt/sitex/lang/Italiano.php:865) in /opt/sitex/redirect.php on line 19

I then checked the file Italiano.php and he had two blank lines at the end!
Removed them my links have started to work! :D

I then went to check the problem of image upload, and even here the log messages gave me clues about the problem origin:

PHP Warning:  fopen(): open_basedir restriction in effect. File(/tmp/phpwAqkR5) is not within the allowed path(s): (/opt/sitex) in /opt/sitex/includes/fck/editor/filemanager/connectors/php/util.php on line 89
PHP Warning:  fopen(/tmp/phpwAqkR5): failed to open stream: Operation not permitted in /opt/sitex/includes/fck/editor/filemanager/connectors/php/util.php on line 89
PHP Warning:  fread(): supplied argument is not a valid stream resource in /opt/sitex/includes/fck/editor/filemanager/connectors/php/util.php on line 90
PHP Warning:  fclose(): supplied argument is not a valid stream resource in /opt/sitex/includes/fck/editor/filemanager/connectors/php/util.php on line 91



I think FCK try to upload the image in the /tmp directory, but this is not allowed. I think this is always a result of a SME-SERVER installation, then I will open a report in bugzilla for the contrib, so that someone more experienced than me can find a solution.

Regarding the problem of integration of google adsense script I will try to ask at SITEX forum, but will be also welcome suggestions from this forum.  :smile:

Gianni

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: SITEX problems
« Reply #4 on: January 17, 2010, 03:05:45 PM »
Thank You for your invite to italian forum, I'm always very busy but I promise to come  :-)

ok, ti aspettiamo :-)

Quote
PHP Warning:  fopen(): open_basedir restriction in effect. File(/tmp/phpwAqkR5) is not within the allowed path(s): (/opt/sitex) in /opt/sitex/includes/fck/editor/filemanager/connectors/php/util.php on line 89

the key is open_basedir restriction in effect

search for open_basedir.. I suspect you have to change the template fragment coming with smeserver-sitex in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/ directory..

with
Code: [Select]
rpm -ql smeserver-sitex | grep httpd.conf

you can identify the fragment..

create the right folder in templates-custom tree, copy the fragment and edit, then expand the template and restart e-smith-httpd service

HTH
buon lavoro

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: SITEX problems
« Reply #5 on: January 17, 2010, 05:18:04 PM »
joebar

A simple suggestion it may be, but the FIRST place to look when troubleshooting IS in the log files.

I gather you have installed to /opt, but FYI for ibay installs there are db commands
http://wiki.contribs.org/DB_Variables_Configuration#Apache_server_ibay_specific_.28httpd-e-smith.29
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline sodjazero

  • *
  • 39
  • +0/-0
Re: SITEX problems
« Reply #6 on: January 19, 2010, 04:58:09 PM »
I beleive that i am having the same issue with sitex.  Any update on this?

Offline sodjazero

  • *
  • 39
  • +0/-0
Re: SITEX problems
« Reply #7 on: January 19, 2010, 05:17:24 PM »
JoeBear,

Your issues with uploading attachments in the file manager.

I was experiencing the same issue.

When uploading the file you have to put a name for the file in the area that says "upload file" ________

Then browse for the file and choose the file and hit upload.

So if you put the name of the file where it shows upload file then it will not work...

Hope that helps..

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: SITEX problems
« Reply #8 on: January 19, 2010, 05:29:30 PM »
I've installed SITEX on  my sme-server, is an excellent CMS, many thanks to David Harper! :-D

If you find any problems with David's smeserver-sitex contrib, you should report them via the bug tracker, and David will probably fix them.

Offline joebar

  • 5
  • +0/-0
Re: SITEX problems
« Reply #9 on: January 20, 2010, 12:13:58 AM »
JoeBear,

Your issues with uploading attachments in the file manager.

I was experiencing the same issue.

When uploading the file you have to put a name for the file in the area that says "upload file" ________

Then browse for the file and choose the file and hit upload.

So if you put the name of the file where it shows upload file then it will not work...

Hope that helps..
Thank you sodjazero,
but my issue isn't with file manager, but with the FCK editor used for make new pages, it has a function for insert images that permit you to upload them from your pc to the server, but it don't work.
There are the possibility to set other two editors (htmlarea and tinymce), but they haven't the function for picture upload, so requires to transfer images with FTP or with file manager and after insert the link on the page.

Offline davibou

  • ***
  • 79
  • +0/-0
Re: SITEX problems
« Reply #10 on: February 06, 2010, 05:06:09 PM »
Hello
Quote
    PHP Warning:  fopen(): open_basedir restriction in effect. File(/tmp/phpwAqkR5) is not within the allowed path(s): (/opt/sitex) in /opt/sitex/includes/fck/editor/filemanager/connectors/php/util.php on line 89

It's not a site x problem it's a php basedir rectriction so you can modify it this way : (source smefr)

Allow PHP to access certain directories

By default, for security reasons, PHP scripts located in the i-bays, including Primary, can only access files contained in this i-bay (when trying to access a non - authorized the tree, Apache would return the error "Warning: open_basedir restriction in effect."). However, for some scripts, it is necessary to get information elsewhere is the case for example phpSysInfo which fetches multiple items in the / proc /.

 To do this, we must modify the restriction PHPBaseDir i-bay in the server configuration.
If we return to our example of phpSysInfo, imagining that it lies within the i-bay foo (how original, eh ...), it should type the following in a terminal as root :

Code: [Select]
db accounts setprop PHPBaseDir foo /home/e-smith/files/ibays/foo/:/proc/
signal-event ibay-modify foo 


We see the first line different paths, separated by a colon ":", accessible by PHP i-bay (the i-bay itself and / proc /). Another example: if an i-bay just needed access to other i-bays, it would then indicate / home / e-smith / files / ibays / as PHPBaseDir.

Beware, if you allow access to the path / dir, it will provide access to directory / dir1 / and / dir2 / (assuming they exist, of course).
Therefore, if you want to restrict access to a specific directory, add the trailing slash (eg / dir1 /).

One could also consider giving access to the entire tree, but as I said above, this would constitute a risk in terms of server security: imagine a poorly conceived script that would modify or delete files essential for the proper functioning of the system!
 Hackers could exploit scripts including poorly secured system and modify the file as they wish ...



I think you can do like this
Code: [Select]
db accounts setprop PHPBaseDir sitex /opt/sitex/:/tmp/
signal-event ibay-modify sitex

But i'm not sure because sitex is not installed in an ibay but in opt so the command may not be good but it's surely something like that
Hope this help :))

regards David


« Last Edit: February 06, 2010, 05:39:56 PM by davibou »