Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] HelpDesk For osCommerce


Recommended Posts

  • Replies 130
  • Created
  • Last Reply

Top Posters In This Topic

This is what my Web Host has said:

We use qmail, so this is closest to what we would need to use.  As I  

stated before, PHP was not designed as a shell scripting language, so  

is not installed as a binary on our servers.  It may therefore take  

some work to get this part functioning correctly, or it may not be  

possible.

 

I dont see why PHP being installed as a module instead of binary would effect the path.

surely there must still be a path to it.

 

Can anyone enlighten me on this if they know their stuff on Web Hosting?

 

And strangely enough they use Qmail not sendmail, which I thought they did.

So if anyone has had success getting this working with Qmail, please let me know.

 

Thnx

 

CC.

Link to comment
Share on other sites

And here's what my host had to say... Although they are still working with me on a solution.

The web server (Apache) has no problem running php since it's embedded as a module. When mail arrives, the web server isn't involved.

 

From the chrooted environment /usr/bin/php isn't in scope, in other words isn't there. It's available at the server root /usr/bin/php but the whole idea behind chroot is to jail the end users into a filesystem they can't get out of.

 

Sure, there are many hosts that allow the scope of the user access to the root of the server. But also on those hosts you can wander around the file system viewing anybody else's sites with a little ingenuity.

 

We had to trade security for access. We have people on one side of the fence screaming that anybody can wander into their site, then on the other side we have people upset that some of the functionality is lost. It's a balancing act. Plus we're somewhat limited by what the control panel developers give us and allow us to modify.

 

We have been able to get most of the modules and binary packages in there but php isn't one of them. When we have a sizable number of requests to try to chroot something else we weigh the effort with the amount of requests. This is the first time we've had a request for cli php.

 

Perl and Python are available in the chroot, just not cli php. So any other piping mail processors that use Perl or Python *should* work. PHP just isn't one of the more popular command-line interface tools since it's primary development purpose is serving dynamic web pages

Link to comment
Share on other sites

Perl and Python are available in the chroot, just not cli php. So any other piping mail processors that use Perl or Python *should* work. PHP just isn't one of the more popular command-line interface tools since it's primary development purpose is serving dynamic web pages

 

Easy :D

 

cd ~/

mkdir bin

cp /usr/bin/php ~/bin/

 

(ofcourse they would have to do this due to the chroot)

 

There is nothing you can do with php binary that you can't with the php module (in apache, as a http request).

:heart:, osCommerce

Link to comment
Share on other sites

Perl and Python are available in the chroot, just not cli php. So any other piping mail processors that use Perl or Python *should* work. PHP just isn't one of the more popular command-line interface tools since it's primary development purpose is serving dynamic web pages

 

Easy :D

 

cd ~/

mkdir bin

cp /usr/bin/php ~/bin/

 

(ofcourse they would have to do this due to the chroot)

 

There is nothing you can do with php binary that you can't with the php module (in apache, as a http request).

 

Forgive my lack of knowledge...but what will this do for me ??

Link to comment
Share on other sites

Well I have no idea what it will do for me, but I have sent it to my host to find out! See if he knows.

 

Cheers Harald, you is, as ever, Da Man! :bigups:

 

CC.

 

P.S. Da Man you maybe, but I aint, so expect me back very shortly! hehe.

Link to comment
Share on other sites

Forgive my lack of knowledge...but what will this do for me ??

 

Since you do not have access to the php binary (due to chroot), get the server administrator to copy the binary to your home directory - then you have access to it.

 

You could also try to compile the php binary on your server, but I doubt it would work due to the chroot environment.

 

You can also try to FTP upload a php binary to your server, if you have a matching OS to what the server is using. It may or may not work (probably won't, but its up to you to try).

 

Your server administrator will probably kill me now for saying that :D :lookround:

:heart:, osCommerce

Link to comment
Share on other sites

Well email problems galore, huh :? So I have been following the thread and contacted my system admins and this is what I got - I am running on an Ensim box fyi

 

It doesnt appear that this can be done with the ensim configuration by default - one possible issue is that PHP may have to be recompiled as a second copy in standalone mode too be able to work from the sheel enviroment. and even that I am not sure will work, I have symlinked the actual mailer script into the smrsh and set it to call to that and it still returns service unavailable.. Ensim does cause some issues with programs like this as it is using a heavily chrooted environment..

 

comments anyone????

Link to comment
Share on other sites

Well email problems galore, huh :?   So I have been following the thread and contacted my system admins and this is what I got - I am running on an Ensim box fyi

 

It doesnt appear that this can be done with the ensim configuration by default - one possible issue is that PHP may have to be recompiled as a second copy in standalone mode too be able to work from the sheel enviroment. and even that I am not sure will work, I have symlinked the actual mailer script into the smrsh and set it to call to that and it still returns service unavailable..  Ensim does cause some issues with programs like this as it is using a heavily chrooted environment..  

 

comments anyone????

 

I'm in the same boat - i'm using an ensim cp as well - my hosting provider is still working with me on a solution - once i know, i'll post it here for other ensim users such as yourself.

Link to comment
Share on other sites

I am the SysAdmin RubyGirl Mentioned..

 

so far ive had no luck..

Ive run it straight path to the files and ran newaliases afterwards and it fails..

I have also tried a method needed for Perldesk to work whcih is to symlink the mailer script that merges the emails to the MySQL DB in /etc/smrsh and then setting the email | to use the symlinked file in the smrsh which seems to work perfect for PerlDesk..

one issue I am thinking is that for php to run via the shell it requires it to be compiled in standalone mode.. open though to any suggestions.. Mouse

Link to comment
Share on other sites

I am the SysAdmin RubyGirl Mentioned..

 

so far ive had no luck..

Ive run it straight path to the files and ran newaliases afterwards and it fails..

I have also tried a method needed for Perldesk to work whcih is to symlink the mailer script that merges the emails to the MySQL DB in /etc/smrsh and then setting the email | to use the symlinked file in the smrsh which seems to work perfect for PerlDesk..

one issue I am thinking is that for php to run via the shell it requires it to be compiled in standalone mode.. open though to any suggestions.. Mouse

Link to comment
Share on other sites

This was the final result from my host.

 

He says it is a no go.

His reason is as follows:

This is as I stated before. We do not offer the command line (cli)

version of PHP, usually available as /usr/bin/php. As your friend

also states, Perl and Python piping mail processors are fine.

 

We do not offer the PHP binary, so this is not possible. We will not

be able to pipe mail to PHP scripts.

 

So it looks like this is a no go for me! :cry:

 

CC.

Link to comment
Share on other sites

This was the final result from my host.

 

He says it is a no go.

His reason is as follows:

This is as I stated before. We do not offer the command line (cli)

version of PHP, usually available as /usr/bin/php. As your friend

also states, Perl and Python piping mail processors are fine.

 

We do not offer the PHP binary, so this is not possible. We will not

be able to pipe mail to PHP scripts.

 

So it looks like this is a no go for me! :cry:

 

CC.

 

Looks like my guess of needing php in standalone was right.. will look into compiling it.. thanks for the update CC.. Plenty of other Hosts out there using Ensim servers who likely will or do have PHP in standalone mode.. couple of my servers are about to in fact.. Mouse

Link to comment
Share on other sites

This was the final result from my host.

 

He says it is a no go.

His reason is as follows:

This is as I stated before. We do not offer the command line (cli)

version of PHP, usually available as /usr/bin/php. As your friend

also states, Perl and Python piping mail processors are fine.

 

We do not offer the PHP binary, so this is not possible. We will not

be able to pipe mail to PHP scripts.

 

So it looks like this is a no go for me! :cry:

 

CC.

 

Not quite a no go...If we can figure out how to get perl or python to do this, we're good to go!

Link to comment
Share on other sites

If it were a PERL based file you just have to symlink the perl file from its actual location to the sites /etc/smrsh

 

then pipe email as

 

user: "|/etc/smrsh/email.pl"

 

then you must Mount the server PERL and MySQL to the site via /etc/fstab

mind you, be careful doing this as if you mistakenly delete the site you delete the PERL as well..

 

mkdir /home/virtual/domain.com/usr/lib/perl5

mkdir /home/virtual/domain.com/var/lib/mysql

 

then pico -w /etc/fstab

#Add the following lines

/usr/lib/perl5 /home/virtual/domain.com/usr/lib/perl5 none rw,bind

/var/lib/mysql /home/virtual/domain.com/var/lib/mysql none rw,bind

 

#Save the file then

mount -a

 

#obviously replace domain.com with the domain name.. be sure to umount /home/virtual/domain.com/usr/lib/perl5

umount /home/virtual/domain.com/var/lib/mysql

 

before deleting/suspending the site..

 

mind you there are several PERL modules that need to be installed for a perl method to work.. I take the above from making email.pl work for Perldesk on Ensim 3.0/3.1.3 and it works perfectly..

 

for more info on making the PERL work you could extract all of the PERL requirements from the same how to..

 

http://forum.rackshack.net/showthread.php?...&threadid=11941

 

Hope this helps you some.. Mouse

Link to comment
Share on other sites

hai, i have trouble with install the helpdesk, please i need help

 

 if ($config_file == false) {

   echo "n" .

        'osCommerce 2.2 Mail2Database Script' . "n" .

        'Copyright (c) 2002 osCommerce' . "nn" .

        'Release under the GNU General Public License' . "nn" .

        'Usage: osc_mail2db.php config=<path to config file>' . "nn" .

        'The config file parameter is used to retrieve the database' . "n" .

        'connection parameters.' . "nn" .

        'Example /etc/mail/aliases entry:' . "nn" .

       'helpdesk: "| /path/to/php -q /path/to/osc_mail2db.php config=/path/to/admin/includes/configure.php"' . "nn";

 

  • my paths is /home/www/netsh45/html/shop/

my path to php is /usr/local/lib/php -q

my server is a sharedserver

my file osc_mail2db.php is in archiv: /html

What can i doo -- please

 

Thx

:oops: sorry for my english

Link to comment
Share on other sites

hai, i have trouble with install the helpdesk, please i need help

 

 if ($config_file == false) {

   echo "n" .

        'osCommerce 2.2 Mail2Database Script' . "n" .

        'Copyright (c) 2002 osCommerce' . "nn" .

        'Release under the GNU General Public License' . "nn" .

        'Usage: osc_mail2db.php config=<path to config file>' . "nn" .

        'The config file parameter is used to retrieve the database' . "n" .

        'connection parameters.' . "nn" .

        'Example /etc/mail/aliases entry:' . "nn" .

       'helpdesk: "| /path/to/php -q /path/to/osc_mail2db.php config=/path/to/admin/includes/configure.php"' . "nn";

 

  • my paths is /home/www/netsh45/html/shop/

my path to php is /usr/local/lib/php -q

my server is a sharedserver

my file osc_mail2db.php is in archiv: /html

What can i doo -- please

 

Thx

:oops: sorry for my english

 

sorry, continue

hava on error in mime_decode.php

up line 744 phpscript is in textformat

 

line 744    $output  = '<?xml version='1.0'?>' . $crlf .

                  '<!DOCTYPE email SYSTEM "http://www.phpguru.org/xmail/xmail.dtd">' . $crlf .

                  '<email>' . $crlf .

                  Mail_mimeDecode::_getXML($input) .

                  '</email>';

Link to comment
Share on other sites

This is what Google gave me in two shakes of a lambs tail:

 

http://www.gnu.org/software/gnats/mimedecode.html

 

You have the perl script, now you need a php/perl guru to integrate it into the helpdesk :D

 

:lookround: ...runs away!

:heart:, osCommerce

Link to comment
Share on other sites

This is what Google gave me in two shakes of a lambs tail:

 

http://www.gnu.org/software/gnats/mimedecode.html

 

You have the perl script, now you need a php/perl guru to integrate it into the helpdesk :D

 

:lookround: ...runs away!

 

Actually the modules mentioned in that page are some of what has to be installed for PerlDesk and its .pl based script, so looking at its email.pl may provide osme clues, could be that a .pl file may need to handle this one process or someone good at php needs to come along and play Knight in Shining Armor.. lol.. Mouse

Link to comment
Share on other sites

After reading through all 10 pages of this thread I am still not having any luck setting up the helpdesk.

 

I am on a shared server using

WHM 5.3.0

Cpanel 5.3.0-S116

RedHat 7.3

 

I have tried setting up the asc_mail2db.php link using mail forwarding as discussed but still nothing... the mail just goes to my email address and not into my db.

 

Any ideas?

 

Wouldnt it be easier if the data was just stored directly into the database rather than emailing it to a script and then taking pieces of it and putting them in the db?

Link to comment
Share on other sites

After reading through all 10 pages of this thread I am still not having any luck setting up the helpdesk.

 

I am on a shared server using

WHM 5.3.0

Cpanel 5.3.0-S116

RedHat 7.3

 

I have tried setting up the asc_mail2db.php link using mail forwarding as discussed but still nothing... the mail just goes to my email address and not into my db.

 

Any ideas?

 

Wouldnt it be easier if the data was just stored directly into the database rather than emailing it to a script and then taking pieces of it and putting them in the db?

 

The issue, and believe me, it is an issue, is that people no matter how fancy and glorified your helpdesk interface may be.. will still email it instead once they have thier helpdesk account. many will also reply to the email sent when you reply to thier tickets.. it is seriously annoying IMHO but thats people for ya.. lol

I am going to try compiling php in standalone mode and see if that works.. Mouse

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...