Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 8th, 2006, 04:25 PM
Scott Evans
Guest
 
Posts: n/a
Default Disabled mail function workaround?

Hi! I have been asked to add some functionality to an existing web
site. The user would like to have a form that would email them the
results of the form. Really easy stuff to do, usually. I tried to
run the enhancements, and did not get the results I wanted, either
with writing the results to a log file on the server, nor in sending
the email.

In doing further research, I see that the site is being hosted on a
windows server, and that the php appears to have a bunch of functions
disabled, when I run phpinfo. One of the many that are disabled is
mail, so I'm kind of stuck. Is there any sort of workaround to this,
where the mail function is disabled, but I'd still be able to send
email from a form?

For reference, here are the functions that are disabled:

getmyinode, getopt, getrusage, extension_loaded, dl, mysql_pconnect,
crack_check, crack_closedict, crack_getlastmessage, crack_opendict,
fsockopen, pfsockopen, mysql_list_dbs, mysql_stat, ini_get, ini_get_all,
ini_alter, ini_set, get_current_user, get_defined_constants,
get_include_path, php_ini_scanned_files, php_uname, phpcredits,
restore_include_path, set_include_path, set_time_limit, version_compare,
zend_version, getmypid, getmyuid, getmygid, assert_options, assert, fopen,
fwrite, fread, file, fpassthru, file, mail, opendir, readdir, closedir

Thanks!
Scott
  #2  
Old August 8th, 2006, 05:05 PM
Miguel Cruz
Guest
 
Posts: n/a
Default Re: Disabled mail function workaround?

sae@worf.netins.net (Scott Evans) wrote:
Quote:
In doing further research, I see that the site is being hosted on a
windows server, and that the php appears to have a bunch of functions
disabled, when I run phpinfo. One of the many that are disabled is
mail, so I'm kind of stuck. Is there any sort of workaround to this,
where the mail function is disabled, but I'd still be able to send
email from a form?
>
For reference, here are the functions that are disabled:
>
getmyinode, getopt, getrusage, extension_loaded, dl, mysql_pconnect,
crack_check, crack_closedict, crack_getlastmessage, crack_opendict,
fsockopen, pfsockopen, mysql_list_dbs, mysql_stat, ini_get, ini_get_all,
ini_alter, ini_set, get_current_user, get_defined_constants,
get_include_path, php_ini_scanned_files, php_uname, phpcredits,
restore_include_path, set_include_path, set_time_limit, version_compare,
zend_version, getmypid, getmyuid, getmygid, assert_options, assert, fopen,
fwrite, fread, file, fpassthru, file, mail, opendir, readdir, closedir
Can you use system() to run blat.exe (google for it)?

Also, odd (but irrelevant) that you can't fread() but you can
file_get_contents().

miguel
--
Photos from 40 countries on 5 continents: http://travel.u.nu
Latest photos: Malaysia; Thailand; Singapore; Spain; Morocco
Airports of the world: http://airport.u.nu
  #3  
Old August 8th, 2006, 08:05 PM
Carl Vondrick
Guest
 
Posts: n/a
Default Re: Disabled mail function workaround?

Quote:
getmyinode, getopt, getrusage, extension_loaded, dl, mysql_pconnect,
crack_check, crack_closedict, crack_getlastmessage, crack_opendict,
fsockopen, pfsockopen, mysql_list_dbs, mysql_stat, ini_get, ini_get_all,
ini_alter, ini_set, get_current_user, get_defined_constants,
get_include_path, php_ini_scanned_files, php_uname, phpcredits,
restore_include_path, set_include_path, set_time_limit, version_compare,
zend_version, getmypid, getmyuid, getmygid, assert_options, assert, fopen,
fwrite, fread, file, fpassthru, file, mail, opendir, readdir, closedir
I really can't see any reason why these are setup like this. ini_get is
disabled? That pretty much means that any advanced service will fail
when it checks system requirements. phpcredits? Surely that's harmless.
Assert? That's useful for debugging. My gut feeling says that
either: a) the host is trying to be secure, but is just limiting
functionality, or b) the host hasn't setup the server correctly, so they
are trying to avoid these problems. For example, fread could be
disabled to avoid reading files from other accounts. Any properly setup
host would have their permissions configured correctly.

Have you tried contacting them? fwrite and fread are critical for ANY
application and is going to indicate high loads -- caching becomes near
impossible.

Probably not what you want to hear: If they don't want to enable these,
get out. It probably indicates that they don't know what they're doing.

All the best,
Carl


  #4  
Old August 8th, 2006, 09:15 PM
Andy Hassall
Guest
 
Posts: n/a
Default Re: Disabled mail function workaround?

On Tue, 8 Aug 2006 15:27:30 +0000 (UTC), sae@worf.netins.net (Scott Evans)
wrote:
Quote:
>Hi! I have been asked to add some functionality to an existing web
>site. The user would like to have a form that would email them the
>results of the form. Really easy stuff to do, usually. I tried to
>run the enhancements, and did not get the results I wanted, either
>with writing the results to a log file on the server, nor in sending
>the email.
>
>In doing further research, I see that the site is being hosted on a
>windows server, and that the php appears to have a bunch of functions
>disabled, when I run phpinfo. One of the many that are disabled is
>mail, so I'm kind of stuck. Is there any sort of workaround to this,
>where the mail function is disabled, but I'd still be able to send
>email from a form?
Well, the proper answer is to ask the admin to re-enable mail, or switch
hosts. If they've disabled the mail functions, and you do some hacky workaround
to send mail anyway without asking the admins, it wouldn't be that surprising
if the admin of the server got somewhat annoyed...
Quote:
>getmyinode, getopt, getrusage, extension_loaded, dl, mysql_pconnect,
>crack_check, crack_closedict, crack_getlastmessage, crack_opendict,
>fsockopen, pfsockopen, mysql_list_dbs, mysql_stat, ini_get, ini_get_all,
>ini_alter, ini_set, get_current_user, get_defined_constants,
>get_include_path, php_ini_scanned_files, php_uname, phpcredits,
>restore_include_path, set_include_path, set_time_limit, version_compare,
>zend_version, getmypid, getmyuid, getmygid, assert_options, assert, fopen,
>fwrite, fread, file, fpassthru, file, mail, opendir, readdir, closedir
If they're locking down things as basic as fopen then you'll have difficulty
communicating with the outside world in any way; you're not likely to be able
to open any sockets to even do SMTP mailing yourself.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles