Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
root@pcbsd# php -r mailtest.php
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'zlib' already loaded in Unknown on line 0
PHP Parse error: syntax error, unexpected $end in Command line code on line 1
You have new mail.
root@pcbsd#
so I looks like it sent mail. also try with just php mailtest.php and see if you get the same error. Looks like you may have a problem in your php.ini file. How did you install apache, mysql, and php?
i did my install using the pcbsd insrtall process -- i'm befuddled as to where something's not working as all other php functions work correctly- - I don't mind reinstalls... just need to have an inkling which way to go
but this is helping me learn more about the os- -- my experience has been limited to admin functions for php websites -- now it's moving towards sysadmin
I say something might be wrong in your php.ini becuase if you do the following
Code:
php mailtest.php
it should not load mysql as we did not use the function but it talks about loading the php mysql function and also throws and error in regards to an $end in your command line.
Is this even a php problem? You have a mail log for the mail being created and an attempt to send so I'd think we can look elsewhere. What happens if you login to the server and do a "telnet 207.247.2.212 25" ? That's the IP for the MX record for cookbooks.com
If that doesn't work do you need to have the server configured to relay out though your ISP's smtp relay or have them allow outbound port 25 in their firewall?
The reason that I say there COULD be a problem with his php is because the command line is throwing other errors when executing the script. IE problems with mysql. Now while the op looks like he got the mail, I am not satisfied with saying ok problem is fixed even though you are getting command line errors.
Is this even a php problem? You have a mail log for the mail being created and an attempt to send so I'd think we can look elsewhere. What happens if you login to the server and do a "telnet 207.247.2.212 25" ? That's the IP for the MX record for cookbooks.com
Can you send any mail from the server?
If that doesn't work do you need to have the server configured to relay out though your ISP's smtp relay or have them allow outbound port 25 in their firewall?
Can you telnet gmail-smtp-in.l.google.com 25 ?
-Raymond
the domain is cookbooksonline.com - wee also own cookbooks.com which this domain will replace - the mail server for cookbooks.com will remain windows - but our emails originate from cookbooks.com - all kinds of windows stuff on that mail server - they have no desire to migrate that part
i have a simple php mail script and am seeing this from command line:
php mailtest.php
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'zlib' already loaded in Unknown on line 0
1root@pcbsd# php -r mailtest.php
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'zlib' already loaded in Unknown on line 0
PHP Parse error: syntax error, unexpected $end in Command line code on line 1
odd odd am thoroughly confused now
You're getting this error because you're trying to load the modules twice (or more) in your php.ini file. Look in the php.ini for duplicates. The "unexpected $end" sounds like there is an extra semi-colon tossed in somewhere and/or something's not being parsed properly.
However, those (module) errors shouldn't hinder your ability to send mail. I'm not sure where you are on the IT food chain, but there is a good chance that the admin of that network is using a (good) firewall or PIX and has setup a smart host for out going mail.
For instance, if you're not in the DMZ, then you could be pinging a server outside, and *packets get there*, but rebound packets are dropped by the firewall. All you know is you can't ping the host or any host. These are the strange things that happen when you don't have the 30,000 foot view of the network.
If you can't do this, and get some form of response, you can't send mail:
Code:
telnet smtp.gmail.com 25
Your MX record has no bearing on your ability to send mail *out*; it's only there so people know where to send mail back.
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
ok, it has been estimated that the problem might be fixed by reistalling php/mysql ---
using ports/databases/php5-mysql
make reinstall I get the following:
Quote:
root@pcbsd# make all install clean FORCE_PKG_REGISTER
===> Installing for php5-mysql-5.2.6_2
===> php5-mysql-5.2.6_2 depends on file: /usr/local/include/php/main/php.h - found
===> php5-mysql-5.2.6_2 depends on shared library: mysqlclient.16 - found
===> Generating temporary packing list
===> Checking if databases/php5-mysql already installed
===> php5-mysql-5.2.6_2 is already installed
You may wish to ``make deinstall'' and install this port again
by ``make reinstall'' to upgrade it properly.
If you really wish to overwrite the old port of databases/php5-mysql
without deleting it first, set the variable "FORCE_PKG_REGISTER"
in your environment or the "make install" command line.
*** Error code 1
The question from here is how do I reinstall without losing my gig database in mysql
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = sendmail -t -i
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.