Jump to content

cyjetsu

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cyjetsu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have setup a basic php and html form on my local virtualhost(apache). When I click submit button I get 2 errors: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\operator1\on-infosol\primary\contact\form.php on line 6 Warning: Cannot modify header information - headers already sent by (output started at C:\operator1\on-infosol\primary\contact\form.php:6) in C:\operator1\on-infosol\primary\contact\form.php on line 7 This is the html code. <form action="form.php" method="POST"> <table> <tr> <td>Name:</td> <td><input type="text" name="name"></td> </tr> <tr> <td>Email:</td> <td><input type="text" name="email"></td> </tr> <tr> <td>Message:</td> <td><textarea name="mesg"></textarea></td> </tr> <tr> <td><input type="submit" name="SubmitForm" value="Send"></td> </tr> </table> </form> and this is php code inside form.php: <?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail( "myaccount@hotmail.com", "Feedback Form Results", $message, "From: $email" ); header( "Location: http://www.example.com/thankyou.html" ); ?> Do I need to install some kind of program to send mail from on my local apache server? Or is a standard apache installation capable of doing so.... how?
  2. I fixed it simply by removing doc_root = "c:\test" from my php.ini file. I was told to add that during php setup, not sure why becuase php seems to work a whole lot better without it.
  3. This is what I find weird. it does. this is what is i my vhosts file: NameVirtualHost 127.0.0.1:80 <VirtualHost 127.0.0.1:80> ServerName lc.test.com DocumentRoot "C:\test" CustomLog logs\lc.test.com.access.log combined ErrorLog logs\lc.test.com.error.log </VirtualHost> <VirtualHost 127.0.0.1:80> ServerName lc.informativesolutions.com DocumentRoot "C:\operator1\on-infosol\primary" CustomLog logs\lc.informativesolutions.com.access.log combined ErrorLog logs\lc.informativesolutions.com.error.log </VirtualHost> NameVirtualHost 127.0.0.1:80 <VirtualHost 127.0.0.1:80> ServerName lc.aivdesign.com DocumentRoot "C:\operator1\on-aivdesign\primary" CustomLog logs\lc.aivdesign.com.access.log combined ErrorLog logs\lc.aivdesign.com.error.log </VirtualHost> <VirtualHost 127.0.0.1:80> ServerName lc.onmedias.com DocumentRoot "C:\operator1\on-onmedias\primary" CustomLog logs\lc.onmedias.com.access.log combined ErrorLog logs\lc.onmedias.com.error.log </VirtualHost> <Directory C:\operator1> Order Deny,Allow Allow from all </Directory> I have html files in all my site directories except test, so when I go to lc.onmedias.com, or lc.aivdesign.com, it shows those website files..... but if I rename index.html to index.php and go to that site(lc.onmedias.com), the browser shows the php test output from the file in C:\test which is also index.php when it should be taking index.php from C:\operator1\on-onmedias\primary, as it does correctly take index.html from that virtual host directory. Am I making more sense now? I have succesfully setup multiple virtualhosts which display correct files in the corresponding vhost directory, until I try and call a .php file it goes back to c:\test. For instance. http://lc.informativesolutions.com/ displays the html website(index.html in C:\operator1\on-infosol\primary) but when I rename it to index.php or type in http://lc.informativesolutions.com/index.php, it displays the php script c:\test\index.php.
  4. I am running php on apache. I have setup multiple virtual-hosts on apache and managed to get php scripts working on a test website, but I am having trouble getting apache files to run on all my virtual hosts. In my php.ini file at the bottom I have added doc_root = "c:\test" extension_dir = "C:\php\ext" extension=php_mysqli.dll. So when I go to http://lc.test.com/, it successfully runs my php test script in the browser. However... when I go to my other virtualhost site http://lc.informativesolutions.com/, it actually runs the same script from c:\test, when my index.php file in the informativesolutions directory is a completley different file. Is that normal? Anyway I want to set up php for all my sites so do I add doc_root and extension dir per virtual host like this: doc_root = "c:\test" extension_dir = "C:\php\ext" extension=php_mysqli.dll. doc_root = "c:\apple" extension_dir = "C:\php\ext" extension=php_mysqli.dll. doc_root = "c:\tango" extension_dir = "C:\php\ext" extension=php_mysqli.dll. Or do I need to specifiy the name of the virtualhost along with it? Or put php access to virtual hosts somewhere else? Also in my apache's httpd.conf file I have: DocumentRoot "C:/test" <Directory "C:/test"> and Include conf\virtual-hosts.conf where I have setup my virtual hosts. I am not sure if the docroot and dir entries in the httpd conf is why it isnt working, same as in the php file I am not sure if I should add more entries for each host or if there should only be one. when viewing normal html files, each virtualhost site displays the correct files for that individual website so I am positive that my virtualhosts directory setup is correct and different for each virtualhost. It is only when viewing php file that it seems to leap from my virtualhost to the test directory.
  5. I will start learning my own but it will take me some time before I learn it enough to build one security proof enough not to be full of holes that give access to customers credit info to unwanted persons which will result in me getting sued. So I shall look at the open source ones. I have heard zencart and oscommerce are almost identical. But they seem most popular so I will look at them. But I have noticed many companies use x-cart. Would I be able to modify and use xcart with clients without buying xcart software?
  6. I am new to php, in fact just about to start studying it. Mainly right now I am interested in developing shopping carts and forums and using and modifying existing ones. I have come across some shopping carts you can buy such as: http://www.x-cart.com/ and http://www.viart.com/ Are these worth buying? Or are they just WYSIWYG editors that are the equivalent of dreamweaver and frontpage for html. And you can hand-code php just as well or even better without these software packages. I have heard lots of demand for x-cart, so would I have to buy xcart software to use xcart on client sites, or can I just use open-source scripts that are x-cart?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.