Need help on lighttpd + php + fastcgi

I am having one terrible time trying to get the above configured.  Every time I access a .php script I get a "No input file specified" error.  Pulling up .html pages works fine... just not .php.
The following are installed:
php 5.2.4-1, lighttpd 1.4.18-1, fcgi 2.4.0-2
And here is the relevent section of the /etc/lighttpd/lighttpd.conf file:
server.modules              = (
                                "mod_rewrite",
                                "mod_redirect",
                                "mod_access",
                                "mod_fastcgi",
                                "mod_proxy",
                                "mod_simple_vhost",
                                "mod_compress",
                                "mod_accesslog" )
server.document-root        = "/data/srv/www/"
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
simple-vhost.server-root   = "/data/srv/www/vhosts/"
simple-vhost.default-host  = "ncc1701a.test.adtran.com"
simple-vhost.document-root = "/"
$HTTP["host"] == "ncc1701a.test.xxxxx.com" {
  server.document-root = "/data/srv/www/vhosts/ncc1701a.test.xxxxx.com/"
server.username             = "lighttpd"
server.groupname           = "lighttpd"
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                   "socket" => "/tmp/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php-cgi",
fastcgi.debug = 1
All the logs look good (I think)... just cannot get this to work.  If have spent the past six hours reading Google and cannot find anything.  Anyone have any answers?

Well after about three days of tinkering I finally fixed the problem...
My original /etc/php.ini did not have the "open_basedir" set... so it was not used.  But when I upgraded the php the new php.ini had a value in it.  Of course that value did not included the path to my scripts... so I added the path to my scripts as follows:
open_basedir = /data/srv/www/:/tmp/:/usr/share/pear/
And now everything works fine.

Similar Messages

  • Need help publishing a php script

    I am reading the book Dreamweaver CS5 with PHP training from the source and I have reached page 247. I want to publish a registration field to my site, but I have encountered a problem I cannot solve. The file path in library works fine on the local testing server since it has access to my user folder. When I am uploading the site to my remote server, i can't seem to find the right file path at the beginning of library.php
    The code looks like this now
    <?php
    $library = '/home/1/r/rentsch/Scripts/php_library/ZendFramework/library';
    When I press the register button on the page I get this message:
    Warning: include_once(Zend/Validate/Stringlength.php) [function.include-once]: failed to open stream:
    No such file or directory in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
    on line 146
    Warning: include_once() [function.include]: Failed opening
    'Zend/Validate/Stringlength.php' for inclusion
    (include_path='.:/usr/local/php5-suphp/lib/php:/home/1/r/rentsch/Scripts/php_library/ZendFramework/library')
    in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
    on line 146
    Fatal error: Class 'Zend_Validate_Stringlength' not found in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/user_registration.php
    on line 16
    Before I had that file path I got this message:
    Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream:
    No such file or directory in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
    on line 4
    Fatal error: require_once() [function.require]: Failed opening required
    'Zend/Loader/Autoloader.php'
    (include_path='.:/usr/local/php5-suphp/lib/php:rentsch/Scripts/php_library/ZendFramework/library')
    in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
    on line 4
    I am renting a server from domainnameshop.com (in norway)
    And the page I am trying to upload to is www.rentsch.no/fredrik/Seterpaintball/registrer.php
    It is on norwegian, but it is the button that sais registrer that triggers the errors.
    I really need help on this, I can't find any solution on my own!

    I am reading the book Dreamweaver CS5 with PHP training from the source and I have reached page 247. I want to publish a registration field to my site, but I have encountered a problem I cannot solve. The file path in library works fine on the local testing server since it has access to my user folder. When I am uploading the site to my remote server, i can't seem to find the right file path at the beginning of library.php
    The code looks like this now
    <?php
    $library = '/home/1/r/rentsch/Scripts/php_library/ZendFramework/library';
    When I press the register button on the page I get this message:
    Warning: include_once(Zend/Validate/Stringlength.php) [function.include-once]: failed to open stream:
    No such file or directory in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
    on line 146
    Warning: include_once() [function.include]: Failed opening
    'Zend/Validate/Stringlength.php' for inclusion
    (include_path='.:/usr/local/php5-suphp/lib/php:/home/1/r/rentsch/Scripts/php_library/ZendFramework/library')
    in /home/1/r/rentsch/Scripts/php_library/ZendFramework/library/Zend/Loader.php
    on line 146
    Fatal error: Class 'Zend_Validate_Stringlength' not found in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/user_registration.php
    on line 16
    Before I had that file path I got this message:
    Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream:
    No such file or directory in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
    on line 4
    Fatal error: require_once() [function.require]: Failed opening required
    'Zend/Loader/Autoloader.php'
    (include_path='.:/usr/local/php5-suphp/lib/php:rentsch/Scripts/php_library/ZendFramework/library')
    in /home/1/r/rentsch/www/fredrik/Seterpaintball/zend_filer/library.php
    on line 4
    I am renting a server from domainnameshop.com (in norway)
    And the page I am trying to upload to is www.rentsch.no/fredrik/Seterpaintball/registrer.php
    It is on norwegian, but it is the button that sais registrer that triggers the errors.
    I really need help on this, I can't find any solution on my own!

  • I need help with DW, PHP & MySQL please.

    Hello, I am new to website development and am trying to set up a form for collecting data on my website and have a question that I can’t find an answer to anywhere else. I was wandering if someone there would be kind enough to help?  I am using Dreamweaver in CS4 and my host already has PHP & MySQL installed on the server that I can use.  My question is: Do I need to download XAMP or WAMP on my computer before trying to connect my form to the server?  Also, do I need to change the page I am putting the form on to .PHP extension or can I just embed the PHP form into an existing HTML page?
    Most of the training tutorials I’ve read don’t start at the most basic beginning but rather expect people to already have a basic knowledge of the topics they are trying to learn.  If anyone knows the best place to get answers to the most basic questions like this one or a beginners guide to working with DW, PHP & MySQL I will gladly go there rather than waste your time on questions you’ve probably already answered a bezillion times.
    Thank you for the help.

    Strictly speaking, you don't need XAMPP or WAMP on your local computer. But if you're serious about getting involved with PHP/MySQL, you should definitely set up a local testing environment with one or the other. It's safer and more efficient. Don't expose all your errors on a live server. You can find instructions on  how to set up a testing environment here: http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html.
    To develop with PHP, you should always use a .php file name extension. Any other choice is very rare.
    There's a tutorial on building your first dynamic website with DW here: http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html.
    For more in-depth help, you might want to consider grabbing hold of a copy of "The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP". (Yes, I wrote it, so it's a bit of shameless self-promotion, but you'll find it answers many of your questions - and probably a lot you hadn't even thought of.)

  • Need help with Muse PHP (JavaScript error...email)

    Hey all....
    I searched and did not see an answer for this:
    I am exporting my Muse file to HTML and keep getting this error for my Contact Us page (email issue):
    "JavaScript Error:Form PHP Script is missing from web server, or PHP is not configured correctly or your web host provider.  Check if the form PHP script as been uploaded correctly, then contact your hosting provider about PHP configuration."
    What PHP version does MUSE support....5.1?  I contacted HostGator and they just updated my PHP to 5.5 and asked me what PHP MUSE needs. HostGator says 5.1 is old and they do not support 5.1. Can anyone help me?
    Also, when I try to check PHP with: http://my-site.com/scripts/form_check.php I just get an "oops" screen, but does not verify my PHP.????
    Thanks

    Difficult to debug without the URL for the form page on your site...
    Are you using the built-in File > Upload to FTP Host in Muse? Or did you use File > Export as HTML and uploaded with some other tool?
    Does http://<insert your domain name here>/scripts/museutils.js load anything? Or does it also give an "oops" screen? If it gives an "oops" screen, that would imply not all the exported files were uploaded to your server, they weren't uploaded to the correct location, or the permissions aren't set correctly.
    For forms Muse only requires PHP 4.1 or later. PHP version is not the issue.

  • Need Help with IMG+PHP Database+Selective Display

    The problem is really a lot simpler than I made it sounds to
    be, though I fear the answer might be vice versa.
    I need to have pictures appear when they exist. That's all.
    Here is where I am at:
    I have created a php database for a news announcement page.
    In that database, I have a column named "img" whose default value
    is "null"
    Whenever I actually have a picture corrosponding to a
    particular news, the "img" column will change to the file name of
    that image, which I will then extract.
    So basically... if news A, img = null... no picture. news B
    img = b... then yes picture. very simple concept for database.
    Here's what I can't do.
    When I read the database from DW, how can I make it so that
    when it reads a "null" it won't insert a picture and vice versa? I
    figure it definitely has to do with the "if" statement (duh...)
    I know how to make text do that effect...
    <? if $row_data['text'] != null
    echo("i have data");
    ?>
    but how do i do it with an image? I tried putting the image
    tag to replace the entire "echo" line, but that's apparently not
    how you do it. I tried putting it inside "echo", but that doesn't
    seem to be it either.
    also, as a premise, all pictures are associated with only 1
    particular news.
    which i wrote something similar to this:
    <img src="<?php echo $row_data['img']; ?>.jpg"
    width="200" height="200" />
    Um, basically... I need THAT to fit into the IF statement. So
    thanks in advance.

    if (!is_null($row_data['img']))
    echo '<img src="',$row_data['img'],'.jpg" width="200"
    height="200" />';
    Let's break that down into the following:
    echo '<img src="' ;
    echo $row_data['img'] ;
    echo '.jpg" width="200" height="200" />' ;
    When you string multiple echoes together use a comma between
    them,. so now
    we have:
    echo '<img src="',$row_data['img'],'.jpg" width="200"
    height="200" />';
    (You may also use a period, but my understanding is the
    period is less
    efficient.)
    I only have single quotes in my PHP statements. The double
    quotes you see
    are part of what will be the rendered HTML.
    You may generally use the single quote or double quote
    interchangeably with
    few exceptions such as having double quotes as part of the
    text or vice
    versa among others. You can probably escape the characters
    too, but lets
    keep this simple for now.
    If I misspoke I am sure Micha will be sure to correct me.
    IMO The best thing to do is learn by trial and error, and
    your best resource
    on the net for PHP is probably the php website. www.php.net
    "Bih Wang" <[email protected]> wrote in
    message
    news:gr3p0m$293$[email protected]..
    > thanks so much!
    >
    > is how i interpret the code correct?
    >
    > if (!is_null($row_data['img'])) ---> if img is false
    > echo <--- maybe i been using this without
    understanding it correctly...
    > echo
    > means to display on screen but not limited to text
    right?
    >
    > and the rest is where you lost me... i don't get the
    punctuations
    >
    > bracket double quote (" is for text right?
    > so single quote ' means to accept a php function or html
    code?
    >
    > so can i do this?
    > '<div bob>blah'
    > and have div bob appear only when the conditions are
    met?
    >
    > and external data is define by comma?
    > such as... if i pre-define value "x"
    > so i can do img src=',x,'.jpg?
    >
    > thanks again! is there a tutorial i can read for these?
    >
    >

  • Need help with Flash/PHP online form, please help, URGENT!

    ive made my online form with the scripts shown below, when i
    submit i dont get any errors... but i also dont receive any emails
    from the form, if you can see anything that ive done wrong please
    help me out..
    -------------------------------------------------------PHP
    mailer.php------------------------------------------------------------------
    <?php
    $fname = $_REQUEST["fname"];
    $mail = $_REQUEST["mail"];
    $add1 = $_REQUEST["add1"];
    $add2 = $_REQUEST["add2"];
    $add3 = $_REQUEST["add3"];
    $town = $_REQUEST["town"];
    $county = $_REQUEST["county"];
    $postcode = $_REQUEST["postcode"];
    $telephone = $_REQUEST["telephone"];
    $subject = $_REQUEST["subject"];
    $message = $_REQUEST["message"];
    $full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
    $message= $full_message;
    $fname = stripslashes($fname);
    $mail = stripslashes($mail);
    $add1 = stripslashes($add1);
    $add2 = stripslashes($add2);
    $add3 = stripslashes($add3);
    $town = stripslashes($town);
    $county = stripslashes($county);
    $postcode = stripslashes($postcode);
    $telephone = stripslashes($telephone);
    $subject = stripslashes($subject);
    $message = stripslashes($message);
    $subject = "Vision Ten Online Form ". $subject;
    if(isset($fname) and isset($mail) and isset($add1) and
    isset($add2) and isset($add3) and isset($town) and isset($county)
    and isset($postcode) and isset($telephone) and isset($subject) and
    isset($message)){
    mail("[email protected]", $fname, $mail, $add1,
    $add2, $add3, $town, $county, $postcode, $telephone, $subject,
    $message "From: $mail");
    ?>
    -------------------------------------------------------PHP-------------------------------- ----------------------------------
    -----------------------------------------------ACTIONSCRIPT
    for the
    form----------------------------------------------------------
    stop();
    System.useCodepage = true
    this.sent.onRelease = function () {
    my_vars = new LoadVars ();
    my_vars.fname = fname_box.text;
    my_vars.mail = mail_box.text;
    my_vars.add1 = add1_box.text;
    my_vars.add2 = add2_box.text;
    my_vars.add3 = add3_box.text;
    my_vars.town = town_box.text;
    my_vars.county = county_box.text;
    my_vars.postcode = postcode_box.text;
    my_vars.telephone = telephone_box.text;
    my_vars.subject = subject_box.text;
    my_vars.message = message_box.text;
    if (my_vars.fname !="" and my_vars.mail !="" and
    my_vars.add1 !="" and my_vars.town !="" and my_vars.county !="" and
    my_vars.postcode !="" and my_vars.telephone !="" and
    my_vars.subject !="" and my_vars.message !="") {
    my_vars.sendAndLoad("script/mailer.php", my_vars, "POST");
    gotoAndStop(2);
    } else {
    error_clip.gotoAndPlay(2);
    my_vars.onLoad = function (){
    gotoAndPlay(3);
    fname_box.onSetFocus = mail_box.onSetFocus =
    add1_box.onSetFocus = add2_box.onSetFocus = add3_box.onSetFocus =
    town_box.onSetFocus = county_box.onSetFocus =
    postcode_box.onSetFocus = telephone_box.onSetFocus =
    subject_box.onSetFocus = message_box.onSetFocus = function () {
    if (error_clip._currentframe !=1) {
    error_clip.gotoAndPlay(6);
    -----------------------------------------------ACTIONSCRIPT------------------------------- ---------------------------

    that php mail function looks suspect. that should be
    mail(to,subject,message,headers,parameters)

  • Need help with simple php files

    I have simple php files that are setup with includes for a header, sidebar and footer... all other data is within the file. There is no dynamic info on the pages, yet I cannot get the files to load up in InContext. Is there a way to make this work?
    I can get an html file to work flawless, but something seems to stop the php file from working.
    Thanks,
    Ken Henderson

    What I mean is, whenever I try to edit any file with a php extension, I get a 404 error... even a simple file with no includes. I created a php file with one line of text within an editable region and I still could not edit it with InContext.
    The site I'm trying to work with is http://www.thunderbirdchemical.com
    The homepage is index.php
    The simple test file I made is test.php
    Thanks for your help.
    Ken

  • Need help making basic php gallery.

    Hi guys,
    Thanks for checking out my post...
    I want to create a gallery, using php, for a client site
    similar to the one at
    http://www.danwheldon.com/gallery.cfm
    where you click on a thumbnail and it refreshes the page with the
    larger image within the websites' layout and above the rest of the
    thumbnails.
    At the moment, my site has a template layout called main.php
    and I'm using a basic php query to bring up gallery.php
    (main.php?pagename=gallery) so the thumbnails are displayed in the
    template.
    How can I add another query to the links so that when you
    click on one of the thumbnails, it refreshes
    main.php?pagename=gallery with the enlarged image above the rest of
    the thumbnails?
    Thank you very much and I hope to hear from you.
    All the best,
    Mark

    Spindrift wrote:
    > How can I add another query to the links so that when
    you click on one of the
    > thumbnails, it refreshes main.php?pagename=gallery with
    the enlarged image
    > above the rest of the thumbnails?
    Seb posted this the other day. I think it fits in with what
    you want and
    can be adapted.
    Someone asked. How are pages created like this:
    http://www.foo.com/fooing.php?id=10
    http://www.foo.com/fooing.php?id=20
    ANSWER:
    whatever is after the "?" is a variable ("id") and its value
    ("20").
    The variable value is retreived by PHP via the $_GET array:
    <?php
    $var = $_GET['id'];
    echo $var;
    ?>
    This will output the variable value (10 or 20).
    Then you can use these values to outuput different things:
    <?php
    $var = $_GET['id'];
    if ($var == 10){
    do_something();
    if ($var == 20){
    do_someting_else();
    ?>
    A typical example would be with an image gallery, each
    thumbnail would
    have a link to the same page, but with a different variable:
    <a href="big_image.php?id=10"><img
    src="thumb10.jpg"></a>
    so each thumbnail would open the same page, but in this page,
    the
    approperiate bigger image would be outputted buy PHP
    according to the
    variable:
    <?php
    $big_image = $_GET['id'].'.jpg';
    echo '<img src="'.$big_image.'">';
    ?>
    this will output:
    <img src="10.jpg">

  • [Help]Need help with variables php,Sql

    I have a table users contain fiedls "old,new & total"
    when submit , update users SET total = $total
    where $total = $old+$new
    I did this , I used echo to make sure it is ok , but it is not :
    /* Variable to Count Total  */
    $old=$row_rs_users['old'];
    $new=$row_rs_users['new'];
    $total=$old+ $new;
    echo $total;
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "doit_form")) {
      $updateSQL = sprintf("UPDATE users SET total=%s WHERE id=%s",
                           $total,
                           GetSQLValueString($_POST['id'], "int"));
    Thanks,

    Seeing only part of your code, it's impossible to debug.
    However, your approach is wrong anyway. All you need to do is to add the new value to the old one in the SQL query.
    $updateSQL = sprintf("UPDATE users SET total=(total+%s) WHERE id=%s",
                           GetSQLValueString($_POST['fieldName'], "double"),
                           GetSQLValueString($_POST['id'], "int"));
    $_POST['fieldName'] is the new value being added. Use "double" if the value contains a decimal point. If it's an integer, change "double" to "int".

  • I need help for actionscript 3, sending php info to my email, website created in Flash cs5 pro

    Hi,  My name is David and I followed a course creating my own website from Lynda.com by Paul Trani. After that I created my first own webste. After I finished it, everything was working well in flash and firefox. I have only one problem and question concerning the feed back form for sending info from my website to my emailaddres. I created my website “LisbonDreamWalking”in Flash CS5 pro. I herein have a contact page, where people can send an email for a walk in Lisbon, date,the number of people etc. Now I want through my ISP / host funpic.org, that the input, info text fields to be sended to my emailaddress [email protected]. My mail URL adress  iss: http://lisbondreamwalk.li.funpic.org  This is a free host, so they don't work with forms like in the course, and I need some additional info for the php. Here is my HTML (Flash actionscript 3.0) for the sending I only have the red text to fill in (php), I was told by the adobe course.I really hope someone can help me?! Thanks in advance!
    Instructions: 1. Add your custom code on a new line after the line that says "// Start your custom code" below. The code will execute when the symbol instance is clicked. */  send_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_13);  function fl_MouseClickHandler_13(event:MouseEvent):void {          if (thename.text == "" || theemail.text == "" || thetime.text == "" || thepersons.text == "" || themessage.text == "")      {           thankyou.text = "please fill out all fields";      }      else      {           // create a variable container           var allVars : URLVariables = new URLVariables();           allVars.name = thename.text;           allVars.email = theemail.text;           allVars.time = thetime.text;           allVars.persons = thepersons.text;           allVars.message = themessage.text;           //Send info to a URL           var mailAddress:URLRequest = new URLRequest("http.www.namewebsite.com/gdform.php");           mailAddress.data = allVars;           mailAddress.method = URLRequestMethod.POST;           sendToURL(mailAddress);            thankyou.text = "Thank YOU!";           thename.text = "";           theemail.text = "";           thetime.text = "";           thepersons.text = "";           themessage.text = "";      } }
    H

    Thank you Kglad, I am going to see if I can make it work. I will let you know!
    Date: Thu, 13 Oct 2011 08:55:05 -0600
    From: [email protected]
    To: [email protected]
    Subject: I need help for actionscript 3, sending php info to my email, website created in Flash cs5 pro
        Re: I need help for actionscript 3, sending php info to my email, website created in Flash cs5 pro
        created by kglad in Action Script 3 - View the full discussion
    you missed part of the tutorial (or the tutorial is incomplete):  send_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_13); function fl_MouseClickHandler_13(event:MouseEvent):void{     if (thename.text == "" || theemail.text == "" || thetime.text == "" || thepersons.text == "" || themessage.text == "") { thankyou.text = "please fill out all fields"; } else { // create a variable container var allVars : URLVariables = new URLVariables(); allVars.name = thename.text; allVars.email = theemail.text; allVars.time = thetime.text; allVars.persons = thepersons.text; allVars.message = themessage.text; //Send info to a URLvar mailAddress:URLRequest = new URLRequest("http.www.namewebsite.com/gdform.php"); mailAddress.data = allVars; mailAddress.method = URLRequestMethod.POST; sendToURL(mailAddress);
    }}  var urlLoader:URLLoader=new URLLoader(); function sendToURL(mailAddress):void{urlLoader.addEventListener(Event.COMPLETE,completeF);urlLoade r.load(mailAddress);} function completeF(e:Event):void{ thankyou.text = "Thank YOU!"; thename.text = ""; theemail.text = ""; thetime.text = ""; thepersons.text = ""; themessage.text = "";}
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/3969414#3969414
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/3969414#3969414. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Action Script 3 by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Need help from someone who is good in php

    I really need some help with a php project i am doing and i am wondering if anyone is good in php that could help me.
    This is for a php admin panel which i have done most of but i am having trouble with 1 part of it
    If anyone could help please email me at [personal information removed by moderator] and i will tell you what i need help with to save writing it all in here

    Hello ian,
    we need some more info. See Ben's answer in a similar case here: http://forums.adobe.com/thread/1300650?tstart=0.
    Good luck!
    Hans-Günter

  • Need help with PHP contact form

    Hi guys,
    I've made a PHP contact form for my site and need help with a couple of things:
    The form action links an external PHP script (scripts/contact-form-script.php) but is there a way I can have it so the PHP script for the form is contained within the same PHP file as my contact form (contact.php)?
    I tried just putting the form code at the top of contact.php but the browser automatically reads the anti-spam re-direct, so maybe that needs revising too?
    The second thing is, how can I make the Name, Email and Message fields mandatory? So if a user tries to submit the form and hasn't filled in one of the required fields and clicks submit, contact.php reloads with a message at the top of the form saying something like 'Complete the required fields' and highlights the relevant field with a red border?
    Here's the code for contact.php:
    <form action="http://www.mydomain.com/scripts/contact-form-script.php" method="post" name="contact" id="contact">
    <p><strong>Name:*</strong><br />
    <input name="name" type="text" class="ctextField" /></p>
    <p><strong>E-mail:*</strong><br />
    <input name="email" type="text" class="ctextField" /></p>
    <p><strong>Telephone:</strong><br />
    <input name="telephone" type="text" class="ctextField" /></p>
    <p><strong>Company:</strong><br />
    <input name="company" type="text" class="ctextField" /></p>
    <p><strong>Address:</strong><br />
    <input name="address1" type="text" class="ctextField" /></p>
    <p><input name="address2" type="text" class="ctextField" /></p>
    <p><strong>Town:</strong><br />
    <input name="town" type="text" class="ctextField" /></p>
    <p><strong>County:</strong><br />
    <input name="county" type="text" class="ctextField" /></p>
    p><strong>Postcode:</strong><br />
    <input name="postcode" type="text" class="ctextField" /></p>
    <p><strong>Message:*</strong><br />
    <textarea name="message" cols="55" rows="8" class="ctextField"></textarea></p>
    <p><input name="submit" value="SEND MESSAGE" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    And this is the PHP I'm using to submit the form data for contact-form-script.php:
    <?php
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $to = "[email protected]";
    $subject = "Contact from website";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
            $message= '
                <table cellspacing="0" cellpadding="8" border="0" width="500">
                <tr>
                    <td colspan="2"></td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td width="154" style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Name</strong></td>
                  <td width="314" style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$name.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>E-mail address:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$email.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Telephone number:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$telephone.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Company:</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$company.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Address</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$address1.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$address2.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Town</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$town.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>County</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$county.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Postcode</strong></td>
                  <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$postcode.'</td>
                </tr>
                <tr bgcolor="#eeeeee">
                    <td colspan="2" style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Message</strong></td>
                </tr>              
                <tr bgcolor="#eeeeee">
                    <td colspan="2" style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'.$message.'</td>
                </tr>              
                <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr>
             </table>
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mydomain.com/sent.php' ) ;
    ?>
    Any help on this would be greatly appreciated.
    Thank you and I hope to hear from you!
    SM

    Revised code with form validation for Name Email and Message:
    <?php
    if (array_key_exists('submit', $_POST)) {
        $name = $_POST['name'];
        $email = $_POST['email'];
        $telephone = $_POST['telephone'];
        $company = $_POST['company'];
        $address1 = $_POST['address1'];
        $address2 = $_POST['address2'];
        $town = $_POST['town'];
        $county = $_POST['county'];
        $postcode = $_POST['postcode'];
        $formMessage = $_POST['message'];
    if (empty($name)) {
                                                $warning['name'] = "Please provide your name";
    if (empty($email)) {
                                                $warning['email'] = "Please provide your email";
    if (empty($formMessage)) {
                                                $warning['message'] = "Please provide your message";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $to = "[email protected]";
    $subject = "Contact from website";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
            $message= "
    <table cellspacing='0' cellpadding='8' border='0' width='500'>
                <tr>
                    <td colspan='2'></td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td width='154' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Name</strong></td>
                  <td width='314' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$name."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>E-mail address:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$email."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Telephone number:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$telephone."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Company:</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$company."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Address</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$address1."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$address2."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Town</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$town."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>County</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$county."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Postcode</strong></td>
                  <td style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$postcode."</td>
                </tr>
                <tr bgcolor='#eeeeee'>
                    <td colspan='2' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'><strong>Message</strong></td>
                </tr>              
                <tr bgcolor='#eeeeee'>
                    <td colspan='2' style='font-family:Verdana, Arial; font-size:11px; color:#333333;'>".$formMessage."</td>
                </tr>              
                <tr><td colspan='2' style='padding: 0px;'><img src='images/whitespace.gif' alt='' width='100%' height='1' /></td></tr>
             </table>
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    if (!isset($warning)) {
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mydomain.com/sent.php' ) ;
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    p {
        margin: 0;
        padding: 10px 0 0 0;
    .warning {
        color:#C00;
    </style>
    </head>
    <body>
    <form action="" method="post" name="contact" id="contact">
    <p><strong>Name:*</strong><br />
    <input name="name" <?php if (isset($warning['name'])) { echo "style='border: 1px solid #C00'"; } ?> type="text" class="ctextField" />
    <?php if (isset($warning['name'])) { echo "<p class='warning'>".$warning['name']."</p>"; }?>
    </p>
    <p><strong>E-mail:*</strong><br />
    <input name="email" <?php if (isset($warning['email'])) { echo "style='border: 1px solid #C00'"; } ?>type="text" class="ctextField" />
    <?php if (isset($warning['name'])) { echo "<p class='warning'>".$warning['email']."</p>"; }?>
    </p>
    <p><strong>Telephone:</strong><br />
    <input name="telephone" type="text" class="ctextField" /></p>
    <p><strong>Company:</strong><br />
    <input name="company" type="text" class="ctextField" /></p>
    <p><strong>Address:</strong><br />
    <input name="address1" type="text" class="ctextField" /></p>
    <p><input name="address2" type="text" class="ctextField" /></p>
    <p><strong>Town:</strong><br />
    <input name="town" type="text" class="ctextField" /></p>
    <p><strong>County:</strong><br />
    <input name="county" type="text" class="ctextField" /></p>
    <p><strong>Postcode:</strong><br />
    <input name="postcode" type="text" class="ctextField" /></p>
    <p><strong>Message:*</strong><br />
    <?php if (isset($warning['message'])) { echo "<p class='warning'>".$warning['message']."</p>"; }?>
    <textarea name="message" <?php if (isset($warning['message'])) { echo "style='border: 1px solid #C00'"; } ?> cols="55" rows="8" class="ctextField"></textarea></p>
    <p><input name="submit" value="SEND MESSAGE" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    </body>
    </html>

  • Need Help importing data using PHP to convert it into a single HTML line

    Hi, My names Chance
    I'm a 2nd year web design student and have been assigned a project by my teacher for a charity website
    i found a tutorial of exactly what i need to do but im stuck on creating a script to import  and convert php data
    to a single html line
    heres the link to the the script, if you scroll down to the bottom
    where it says
    RSS or XML Data Source
    "The scrolling text can be imported from any source: RSS, XML or any other format.
    For example, if you want to import data using PHP to convert it into a single HTML line to be displayed by the ticker, create a php script to import and convert the data, and include it directly in the DIV tag as follow"
    this is what i need help doing
    http://www.mioplanet.com/rsc/newsticker_javascript.htm
    i already have the php code that i want to import
    i just need to know how to import and convert my php script so im able
    to make the the javascript from the link i provided to work
    thank you so much for your time
    if you have any question or answer please email me
    [email protected]
    thanks again hope to here from you soon

    Hi
    The instructions are there on the page you provided a link to!
    What is it you do not understand?
    PZ
    www.pziecina.com

  • Lighttpd + php + mysql + phpmyadmin

    Hello to everyone...
    Continue from this old topic: http://bbs.archlinux.org/viewtopic.php?id=57539
    So i have lighttpd + php that run perfectly...
    now i also need mysql + phpmyadmin..
    1)  i Edited /etc/php/php.ini uncommenting the following line:
    ;extension=mysql.so
    2) i followed this wiki http://wiki.archlinux.org/index.php/MySQL
    3) i followed this wiki http://wiki.archlinux.org/index.php/Phpmyadmin
    when i open phpmyadmin it says:
    Connection for controluser as defined in your configuration failed.
    why??
    thanks..

    Hi, thanks for response
    SSL certificate is generated ... ok so it wont be so hard to help here are my configs
    main.cf
    # Paths
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/lib/postfix
    mail_owner = postfix
    # Domain settings
    myhostname = <mydomain>
    myorigin = <mydomain>
    mydestination = $myhostname, localhost.$mydomain, localhost
    # SMTP settings
    smtpd_tls_cert_file=/etc/ssl/certs/mail.crt
    smtpd_tls_key_file=/etc/ssl/private/mail.key
    smtpd_use_tls=yes
    smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
    smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache
    smtpd_tls_loglevel = 1
    smtpd_sasl_auth_enable = yes
    smtp_sasl_auth_enable = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,
    permit_mynetworks,
    reject_unauth_destination,
    check_policy_service inet:127.0.0.1:10030
    smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
    smtpd_sasl_security_options = noanonymous
    # SASL
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = /var/run/dovecot/auth-client
    # Email and mailbox settings
    alias_maps = hash:/etc/postfix/aliases
    alias_database = $alias_maps
    home_mailbox = Maildir/
    virtual_alias_domains = <mydomain>
    virtual_alias_maps = hash:/etc/postfix/virtual
    mailbox_size_limit = 0
    dovecot.conf
    protocols = imap imaps
    disable_plaintext_auth = yes
    log_timestamp = "%b %d %H:%M:%S "
    ssl = yes
    ssl_cert_file = /etc/ssl/certs/mail.crt
    ssl_key_file = /etc/ssl/private/mail.key
    mail_access_groups = mail
    mechanisms = plain login
    socket listen {
    client {
    path = /var/run/dovecot/auth-client
    mode = 0660
    user = postfix
    group = postfix
    here are some of my config uncommented part, if its nececery i can zip and upload bouth configs to be 100% clear wheres the problem..
    Karlis
    Last edited by karlis (2010-01-13 18:02:23)

  • I need help switching back to iPhoto

    In February of this year I switched from iPhoto to Aperture for very specific reasons. My laptop's hard drive was running out of space, as it was housing my photo library that was quickly approaching 25,000 photos and pushing about 30 Gigabytes, and I wanted to take advantage of Aperture's ability to store photo masters on an external drive.
    So why switch back? When I described why I had switched and my experiences doing so back in February I had said that I ran into many problems all of which I was able to solve save two:
    "The two things I have yet to solve, which are rather large things: 1) Spotlight can no longer find my photos since switching to [edit: from] iPhoto. I am really not sure where to start with fixing this so I think I’m just going to have to ask someone. 2) Reorganizing my keywords in Aperture (since I had them set up in iPhoto) is impossible. When I bring up the Keywords HUD, I’m greeted with all of my keywords residing subordinately to a master keyword of 'iPhoto'. When I try to access the keywords that are “below” iPhoto Aperture freezes. Perhaps I have too many keywords (I do have an awful lot). I’m not sure how to solve this one yet either. Maybe there is a raw .plist file that I can manually edit (and I am willing to do so)." -- Me.
    After using Aperture for the past 3+ months I've yet to resolve either of these issues. Recently there was an update to Aperture from Apple that, according to the documentation for the update, was supposed to help resolve my second issue with having too many keywords for Aperture to handle - but it hasn't helped much. So since switching to Aperture I've not tagged more than maybe fifty photos, which is discouraging because I know that once I switch back to iPhoto I'm going to be busy tagging photos again.
    So I suppose you could say I'm switching back for two main reasons. First, I want it to be much easier to tag my photos since that is probably the single most important thing to me and the experience with iPhoto and Keyword Manager ( http://www.bullstorm.se/KeywordManager.php ) is far superior to that of using keywords in Aperture. Second, I want my photos to start showing up in Spotlight searches again. I'm more than willing to deal with the caveat, albeit a rather large one, that I won't have my photos with me wherever I go anywhere but that they'll forever reside on my firewire drive.
    What I need help with...
    When I open iPhoto I see all of the previews for the photos that I had the day I switched to Aperture. However, the originals have been moved by Aperture onto my firewire drive - so when I click on each photo all I get is a ( ! ) symbol. The previews still reference a file that does not exist yet the iPhoto database still retains all of the relevant metadata (date/time, keywords, comments, etc) that I had worked so hard to put into iPhoto. I need to retain this information and somehow get the originals back into place so that iPhoto sees them again.
    What I thought about doing was this: 1) Somehow restore the originals for the almost 25,000 photos into the place where iPhoto thinks they should be. 2) Move the entire library to my external firewire drive. 3) Import the remaining images that I've taken since switching to Aperture into iPhoto.
    Since I have Aperture store my photos by date - importing only the images that I've imported into Aperture should be a piece of cake. I do not need to retain any metadata from Aperture since I've only tagged a few photos in Aperture and all of the other information I may need should be on the original file (like date taken, etc.). I know I'm going to lose a lot of edits that I've done like cropping, rotating, color balancing, red-eye reduction, etc. but I'm more than willing to lose all of that if it means that I can pick up where I left off and get back into the swing of things in iPhoto.
    I've Googled like crazy and haven't found someone doing exactly what I'm trying to accomplish so any help with my current situation is greatly appreciated. I've also posted this on my blog http://cdevroe.com/notes/back-to-iphoto/

    cvdevroe
    2) Reorganizing my keywords in Aperture (since I had them set up in iPhoto) is impossible. When I bring up the Keywords HUD, I’m greeted with all of my keywords residing subordinately to a master keyword of 'iPhoto'.
    Bear with me, my terminology may not be right. I'm heading in the opposite direction, and one of the advantages i see to Aperture is that I've got the same advantages in Keyword management as I have with KM in iPhoto.
    Have you tried re-organising them using the control bar: Below the thumbs there's a drop down menu, by default it shows Photo Descriptors. Click on it and Select 'Edit Buttons'. You can merrily re-organise your Keywords in this window, and even have your changes reflected in live in the HUD.
    As to the Spotlight searching, I'm afraid someone else will need to help on that one. Personally - and it's a regular on the iPhoto forums - I've never had much luck getting Spotlight to search within iPhoto for keywords, apart, of course, from using the search window in the iPhoto Window. I suspect a system-based search of iPhoto keywords is simply not possible.
    What I thought about doing was this: 1) Somehow restore the originals for the almost 25,000 photos into the place where iPhoto thinks they should be.
    That will work, but they'll need to be exactly as they were.
    2) Move the entire library to my external firewire drive.
    Easily done, after you've copied it over launch iPhoto holding down the option (or alt) key and choose 'Locate'. Navigate to the new location and that''ll be your default iPhoto Library Folder thereafter.
    3) Import the remaining images that I've taken since switching to Aperture into iPhoto.
    That should work too.
    But the key is, can you return the iPhoto Library Folder exactly as it was, otherwise you'll need to create and populate a new library - and that will inevitable mean losing your keywords in iPhoto too.
    FWIW, I need to keep iPhoto going for others in the household who are daunted by Aperture. My solution is a referenced library pointing towards the iPhoto Library Folder / Originals folder.
    Regards
    TD

Maybe you are looking for

  • Why is apple Tv showing multiple copies same library

    I use Apple TV a lot but recently multiple libraries of the same account are showing when I go to my computer's tab in Apple TV. There is only one account configured on Apple TV but multiple copies of the same library are shown on screen, Library of

  • Why does iTunes make a mess out of my TV Shows library?

    I'm not really sure where to post this, as it doesn't seem like Apple pays much attention to the official Apple Support Forums, but I'll give it a go nontheless. The thing is, as most Apple TV owners I have to rely on iTunes for handling my media lib

  • Oracle 10g express edition browser login problem

    Hi I installed oracle 10g express edition and after installing successfully logged in browser , unlocked hr login and also created one form then I shutdown the database and rebooted my pc and since then when I try to login to "go to Database Home pag

  • Changes and Logical Delete in View Maintenance

    Hi everybody. I've defined a table view maintenance V_TABLE for T_TABLE, with five fields. One of them is defined as 'R' (not editable field). I defined an event 05 and an event 02 (for create and save) where I move SY-DATUM to the CREATED_DATE or UP

  • Rotating an image in memory

    Hi I need to rotate an image kept in a DB as a byte array. I have an Object holding the byte array of the image, and I want to create a new byte array holding the rotated image. I use the following code: private byte[] rotateImage(byte[] originalImag