Php and localhost disabbled

Since installing Mavericks 'localhost' and php are disabled and web sharing is off. All I see is an ad for Virtual Host. I'm not interested in buying something when the installed apache and php has always worked flawlwssly. How come these settings got changed?

Subsequent to the above problem I discovered PHP 5.4.17 provided in Mavericks does not have mcrypt installed. This is required by Wordpress  and other tools that authenticate users by a. Cryptographic login process.
To remedy this problem see http://www.coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-9-maverick s-development-server/ for a full recipe.

Similar Messages

  • 'unable to connect' and 'localhost' and index.php and dreamweaverCC

    Hi. 
    I am developing a Web Site and index.php is my point of entry.
    Document Root Library/WebServer/Documents
    so my path is: Library/WebServer/Documents/dwwdSite
    httpd.conf file is modified to add index.php  and have it listed first.
    <IfModule dir_module>
    DirectoryIndex   index.php   index.html
    <IfModule>
    Troubleshooting:
    I was using Netbeans IDE and when I ran index.php it opened in the browser.
    When I launched 'any' of my index.php files from Netbeans IDE, they opened correctly in the brower
    I am now using DreamweaverCC and when I run the index.php Error Message ' Unable to Connect'.
    For the last 2 days I have been working on this and I am completely stuck.
    This morning I thought of another way to test the 'unable to connect' error.
    I decided to copy this same file into Netbeans IDE and I NOW get the same Error Message ' Unable to Connect'
    when running index.php from Netbeans.
    Somehow, my settings are not correctly configured anymore.
    Here are my screenshots from Dreamweaver > manage sites.
    I believe that this is a rather simple fix that I am somehow not seeing.
    Maybe some can spot some mistake.
    I appreciate your help and explanation.

    Site window settings.
    Site Name: dwwdSite
    Local site folder: /Library/WebServer/Documents/dwwdSite
    Server window settings.
    Server Name: testing Server
    Address: Macintosh HD/Library/WebServer/Documents/dwwdSite
    Connect using: Local/network
    Testing: yes (checked)
    Server folder: /Library/WebServer/Documents/dwwdSite
    (I also tried this: Server folder: /Library/WebServer/Documents)
    Web URL: http://www.localhost/dwwdSite
    Server Advanced tab: (within server window settings)
    Testing server: PHP MySQL
    Advanced Settings window.
    Local info: Web URL: http://www.localhost/dwwdSite
    Enable cache: yes (checked)

  • PHP and Apache

    I have installed XAMPP for Mac OSX so that I can work on PHP and mySQL projects at home. It has installed correctly and http://localhost connects me to the server and the XAMPP pages. I am using Eclipse for my web pages and these files are in Users/Me/Sites/workspace2/homework/ .
    The DocumentRoot in the httpd.conf file is "/Applications/xampp/xamppfiles/htdocs"
    What is the correct path to see my files? I was trying http://localhost/Users/etc but it says not found on the server. I don't know if I have a setup problem or I am just using the wrong file path to see my files.

    bronisaurus wrote:
    I have installed XAMPP for Mac OSX so that I can work on PHP and mySQL projects at home. It has installed correctly and http://localhost connects me to the server and the XAMPP pages. I am using Eclipse for my web pages and these files are in Users/Me/Sites/workspace2/homework/ .
    The DocumentRoot in the httpd.conf file is "/Applications/xampp/xamppfiles/htdocs"
    What is the correct path to see my files? I was trying http://localhost/Users/etc but it says not found on the server. I don't know if I have a setup problem or I am just using the wrong file path to see my files.
    Are you asking where to put the PHP files you create? Or if you should change the path in the http.conf file? Either one should get you what you desire. You can either start putting your PHP and HTML files in /Applications/xampp/xamppfiles/htdocs or change the DocumentRoot in the XAMPP httpd.conf file to Users/Me/Sites/workspace2/homework.
    If you do the latter, don't forget to stop and restart XAMPP, or at least the Apache server part of it. The Apache config file is only read when it starts up...
    Post back if any of that's not clear.
    charlie

  • PHP and Instantclient

    Hi,
    I want to use PHP and Oracle in my project. But i couldnt connect to oracle database using Instantclient.
    I did the following steps:
    -Create a subdirectory (C:\instantclient_10_2) and copy all files(libraries) from the zip file to C:\instantclient_10_2 directory
    -Edit php.ini and uncomment the OCI8 extension (enabled with "extension=php_oci8.dll" in php.ini), copy oci.dll to windows/system32
    -Edit the environment and add C:\instantclient_10_2 to PATH before any other Oracle directories
    -Copy tnsnames.ora to C:\instantclient_10_2 and set the user environment variable TNS_ADMIN to C:\instantclient_10_2
    -Restart IIS
    -To check the extension is configured, create a simple PHP script phpinfo.php
    <?php
    phpinfo();
    ?>
    -Load the script into a browser using a URL http://localhost/phpinfo.php
    I can see that OCI8 Support is enabled.
    My database name is TEST. when i run the following script, i just see "error". There is no detailed information about the error.
    <?php
    $connection = OCINLogon("system","manager","TEST");
    if($connection == false) {
         echo OCIError($connection);
         echo "error";
    $cursor = OCIParse($connection,"select sysdate from dual");
    OCIExecute($cursor);
    echo "<pre>";
    while(OCIFetchInto($cursor,$values)){
    echo $values[0];
    echo "";
    echo "</pre>";
    ?>
    I don't know what the problem is. How can i fix it?
    Thanks
    Note: I use php-5.2.3 and Oracle 9i. Oracle database is not in my local.

    I want to use PHP and Oracle in my project. But i
    couldnt connect to oracle database using
    Instantclient.Two things come to mind:
    I did the following steps:
    Edit php.ini and uncomment the OCI8 extension
    (enabled with "extension=php_oci8.dll" in php.ini),Can you make sure that this php_oci8.dll is compiled and linked against Oracle 10g and not Oracle 8i?
    My database name is TEST. when i run the following
    script, i just see "error". There is no detailed
    information about the error.
    <?php
    $connection = OCINLogon("system","manager","TEST");
    if($connection == false) {
         echo OCIError($connection);
         echo "error";Hmmm.
    A quick look at the PHP documentation on http://at2.php.net/manual/en/function.oci-error.php tells me that you should call oci_error() without an argument to get the error message for an oci_new_connect().
    Yours,
    Laurenz Albe

  • PHP and multiple DB doesn`t work

    Hi
    I've been all day trying to find some clues on how to get data from two SSID on the same server (under Oracle 10g and PHP5 w/oci)
    I'll explain:
    The Oracle server has two schemas: datos and global.
    datos: localhost:1521
    SID: datos
    global: localhost:1521
    SID: global
    in PHP this is the connection I'm trying now, after a whola day i tried to simplify to the fullest:
    Line:-----
    <?php
    //STATEMENT 1
    @     $link = oci_connect("user","password" ,"localhost"/"global");
    echo "oci_fetch_array <br>";
    $stmt = ociparse($link, "select rut from USUARIO");
    ociexecute($stmt);
         while ($r2 = oci_fetch_array($stmt, OCI_BOTH)) {
              echo $r2['id_usuario'];
    OCIFreeStatement($stmt);          
    //STATEMENT 2
    @     $conn1 = oci_new_connect("user", "password", "localhost"/"datos");
    $SQL = "select id_usuario from USUARIO where id_empresa = '2'";
              $stmt = ociparse($conn1,$SQL);
              ociexecute($stmt);
                        while(OCIFetch($stmt)){ 
              $valor = OCIResult($stmt,1);
              echo $valor;
              OCIFreeStatement($stmt);
    ?>
    Both sentences are tested and working so there is no problem in the PHP code.
    * I've noticed that no matter what type of code I try, it always seems to only access the bolddatos*bold* schema and never even touches the global schema.
    * The errors I get from this code:
    Warning: ociparse() expects parameter 1 to be resource, boolean given in D:\www\index.php on line 12
    Warning: ociexecute() expects parameter 1 to be resource, null given in D:\www\index.php on line 13
    Warning: oci_fetch_array() expects parameter 1 to be resource, null given in D:\www\index.php on line 14
    Warning: ocifreestatement() expects parameter 1 to be resource, null given in D:\www\index.php on line 18
    after that, I succesfully get the result from the second statement ... so confusing
    * In the begining I used the sabe user and password for both schemas, now I've changed them . In that time the error was related to tables that didn't exist so I got to the conclussion that PHP was only accesing the datos schema, as I menctioned before.
    I don't know that else to do, and I'm thinking seriously on passing to another language.
    I've made a Sw in Java that also access those two databases, it works perfectly, so I'm thinking that perhaps it's me who don't know how to write in PHP, or PHP's OCI that doesn't support this kind of acces to databases.
    If somebody could show me some clues I'll be gratefull.

    Well actually the @ signs are there so the "PHP Warning: Division by zero" is disabled, still the connection have always worked just fine for me, that's just a warning.
    I really don't get the mixture between php4 and php5 as all the functions I used are documented in here http://cl.php.net/oci8.
    I've always have this confussion about SID and schemas. As i understand it the schemas are database instances that are identified by an SID. Lets say, the database instance has a global name "no_godzilla", then the SID will be "nogodzilla" (oracle truncates "_" from SID). And that database will have a user and a password to grant the access.
    So, the connection string must have a : username, password, SID or global database name and a specified host.
    For now the second connection ($conn1) on my php file is working but the first doesn, that even when the sentences are made to be perfectly equals, for that I've created tables in both databases with tha same structure but different data. Still, the only database that seems to work is datos
    Yesterday I tried to make the connection from an ODBC but found some trouble on doing that, I've received the following error:
    [Oracle][ODBC][Ora]ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    so, I've created a new listener and i was able to start a ODBC from the datos database but still I recieve the message when I try to connect from the other database.
    After that I figured out (after reading some forums) that the error was on the listener configuration listener.ora and tnsnames.ora, I found it very troublesome to manually edit those files and after a while I just cracked and fell death on my desktop.
    Then I was told to use 3 databases instead of 2, wich made my soul leave my body for a while, and I took that fine oportunity to say "hi" to some people I haven't seen in a while.
    On my rebirth I decided to make tree brand new Oracle installations, so the ports on each database are different (this will solve my problem I thougth), but I only came to the same conclussion, PHP can only access one database (from 3 Oracle 10g on the same machine, Ive tested it under Oracle and mysql without problems of this kind).
    Now I have 3 listeners and 3 databases, each one on localhost:1521, localhost:1522 and localhost:1523. The listeners work fine but I cant make an ODBC or make my precious code to work.
    I must finish this work tomorrow, so I'm switching back to Java. Still in the future I surely will have to deal with this again so, I still ask for some clues, just so i know how to deal with this.
    Right now I'll resume reading the Underground oracle and PHP manual (I've read it before but only untill page 120).
    Thaks for your time.
    P.S. should I post my listener.ora and tnsnames.ora? (6 in total)

  • Http service component working php and sql data

    hello i'm using that componet. i have trouble. now i want in my home page
    i have 2 title from my localhost/phpmyadin. and i want when click title 1 it will link to a detail.mxml  and display content of title 1
    and when click title 2 it will display content of title 2 in detail.xml
    i don't know transmission parameters . Can u help me please. I'm need it

    These links are good for showing how to use Flex + PHP + HTTPService + MySQL:
    http://www.switchonthecode.com/tutorials/using-flex-php-and-json-to-modify-a-mysql-databas e
    If this post answers your question or helps, please mark it as such.
    http://www.switchonthecode.com/tutorials/flex-php-tutorial-transmitting-data-using-json
    http://www.switchonthecode.com/tutorials/flex-php-json-mysql-advanced-updating
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex Training and Support Services

  • Simple PHP and PLSQL Bind help needed

    HI,
    I am learning php and oracle I am trying to bind my plsql code with php but have little idea can anyone plese help?.
    my code is
    plsql prcoedure
    CREATE OR REPLACE PROCEDURE get_width (
    img_id IN arm_photos.id%TYPE
    AS
    image ORDSYS.ORDImage;
    width INTEGER;
    BEGIN
    SELECT p.image INTO image FROM arm_photos p
    WHERE p.id = img_id;
    -- Get the image width:
    width := image.getWidth();
    DBMS_OUTPUT.PUT_LINE('Width is ' || width);
    COMMIT;
    END;
    PHP code
    <?php
    $c =oci_connect('user', 'pass' , '//localhost/orcl');
    $s = oci_parse($c, " begin
    get_width(:id :width)");
    oci_bind_by_name($s, ':id', $id);
    oci_bind_by_name($s, ':width', $width);
    $id= 1235;
    oci_execute($s);
    ?>

    Variable width is a local variable. You can't get its value from outside SP. Either change your procedure to a function returning image width or add a second out parameter:
    CREATE OR REPLACE PROCEDURE get_width (
    img_id IN arm_photos.id%TYPE,width OUT INTEGER
    AS
    image ORDSYS.ORDImage;
    BEGIN
    SELECT p.image INTO image FROM arm_photos p
    WHERE p.id = img_id;
    -- Get the image width:
    width := image.getWidth();
    DBMS_OUTPUT.PUT_LINE('Width is ' || width);
    COMMIT;
    END;SY.

  • Weechat Highlight Monitor Script for IRC and Localhost (Bitlbee)

    Hey guys.. I've been struggling with this one for some time now, thought I might as well get some feedback
    So bacically, I have the weechat plugin 'highmon.pl' and I have the Channel, Nick, and Message (when highlited) output to conky on my desktop.
    Now the part I cant figure out is how can I get the same scripts that do that to also output the highlights i get from my bitlbee session (which is open in a separate terminal window connected to localhost)
    As long as I am in my home dir, I can get this to work for each individually, but as I like to use tmux, weechat in one tab, weechat --dir ~/.weechat/bitlbee in another so I can watch my facebook chat and irc chat without having to log in and out of servers.  But because my Bitlbee session is started in ~/.weechat/bitlbee my scripts no longer work...
    further to this, I've tried to modify them to work just in ~/.weechat/bitlbee but havent succeeded there either...
    ok, the scripts
    highmon_channel.sh
    echo -e $(cat ~/.weechat/logs/perl.highmon.weechatlog | awk 'END{split($2,a,"#"); print a[2]}')
    highmon_msg.sh
    echo -e $(cat ~/.weechat/logs/perl.highmon.weechatlog | awk 'END{print $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18}')...
    highmon_nick.sh
    echo -e $(cat ~/.weechat/logs/perl.highmon.weechatlog | awk 'END{print $3}' | cut -f1 -d'>' | cut -f2 -d'<' | cut -f3 -d '!' )
    these scripts get called by conky to output my highlighted message on the desktop..
    If anyone knows how I can ammend these scripts to also work with a weechat instance started in the directory of ~/.weechat/bitlbee that wold rock my world
    [i tried changing the directories in these scripts to ~/.weechat/bitlbee/logs/perl.highmon.weechatlog ... that didn't really work tho]
    If anyone can tell me its possible to connect to both freenode and localhost in the same weechat session id also be impressed!
    you know how there is always just one more thing you'ld like to do to your desktop... that one last thing that if you achieved it, it would make you relax and feel complete? this is that for me
    any help is much appreciated..
    (for the record, I didn't write these scripts, I came across them throughout my life)
    Last edited by CoolWhip (2011-11-03 01:20:04)

    Of the second and third scripts, the latter could perhaps be deemed the "most secure"; however, it might block more than you want. If you really want to use one of those, then I'd suggest using the second script. Otherwise, I'd recommend that you take a look here. (I only slightly examined the first script.... I do not understand the language of the comments, and I'm no iptables whiz. )
    Also, note that you don't have to use an actual script to set up the rules; rather, you can save the rules you want to a file that will be read by iptables automatically (/etc/iptables/iptables.rules). Here's a modified version of mine:
    # /etc/iptables/iptables.rules
    # These rules (and the commented instructions) derived from:
    # http://ubuntuforums.org/showthread.php?t=159661
    *nat
    :PREROUTING ACCEPT [163:50538]
    :POSTROUTING ACCEPT [40:2451]
    :OUTPUT ACCEPT [40:2451]
    COMMIT
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    :FIREWALL - [0:0]
    :TRUSTED - [0:0]
    -A INPUT -j FIREWALL
    -A FORWARD -j DROP
    -A FIREWALL -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A FIREWALL -i lo -j ACCEPT
    -A FIREWALL -j TRUSTED
    -A FIREWALL -j DROP
    # put your own exceptions here, like so (replacing <tcp/udp> with either "tcp" or
    # "udp" -- minus the quotes -- and <port number> with the port you'd like to open):
    # -A TRUSTED -p <tcp/udp> -m <tcp/udp> --dport <port number> -j ACCEPT
    COMMIT
    Of course, there are benefits to keeping the rules in a script. For instance, you could then easily set the default iptables rules, allow all traffic, etc. Plus, some firewall-related things (such as the various echo commands in the scripts you provided) cannot (to my knowledge) be done by iptables alone.
    If you already have a script that sets up the rules you would like to use, you can save yourself the hassle of creating a rules file by following the directions outlined here.
    Last edited by ssjlegendx (2008-08-06 20:17:00)

  • Include PHP and/or JAVA code in any BC site.

    I am thinking about including some PHP and/or JAVA code into my BC site and I was wondering if I am allowed to do this. Just Curious. Thanks.

    That's a shame, because I was thinking about implementing a business search api for my real estate website that was created using business catalyst that allows the collection of all real estate agents in Australia by searching and collecting their information from the Yellow Pages and White Pages directories, and include these information in a database that allows users to search for the real estate agent they want and comment on that agent. This can only be done by integrating some PHP or JAVA code into my BC website.
    So that means that the only way that I can do this is to create a web app that allows users to search for the real estate agent they want to see and comment on that agent, just by entering real estate agents' information into the web app's database and using various BC modules and plugins. Are there other easier ways to do this? Thanks.

  • PHP and MySQL Connection problem

    I am trying to make a PHP MySQL on a remote server connection in Dreamwesaver CS3.
    When I enter the information (host, user, password, etc.) and hit TEST, I get the following error message.
    "Access Denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured."
    I know the user, password, etc. work, as I can access the MySQL database with other software.
    I checked with my host and they say there are no permission problems on their end.
    I have checked the settings on the Test Server page in Site Setup and everything looks correct and works there.
    I have not seen this particular problem described in other forum postings (although there are a LOT of postings on this topic!).
    Any help would be appreciated.

    I thought my testing server was the remote server and is always on as far as I know. I don't know how to turn it on or off.
    Is there some other testing server that I should be aware of?
    Frank
    Date: Wed, 3 Jun 2009 15:43:02 -0600
    From: [email protected]
    To: [email protected]
    Subject: PHP and MySQL Connection problem
    I know you are using remote, but is your testing server on? if not turn that on and see if that does it. it just happened to me working on remote server and could not get mysql conn to work, until I turn on my testing (developer server), then I was able to connect to mysql and the tables that I created in phpmyadmin remotly was downloaded.
    >

  • How do I add an already built Shopping Cart  (PHP and MYSQL) application to a page in a Muse site?

    How do I add an already built Shopping Cart  (PHP and MYSQL) (Cartweaver 4) application to a page in a Muse site? Do I have to export the Muse site as Html to dreamweaver and them use the extension to bring the shooping cart in or can I do it directly in Muse?
    Message was edited by: mgv2048

    We have experimented with doing this with some good success. We have been working on adding Cartweaver to a Facebook page by essentially adding a Cartweaver store to Facebook in an iframe.  The "store" would be pages with just your basic product display, cart, and checkout functionality, with none of the "window dressing" - just use CSS to match the color and general look of the design it's being added to.
    The one problem with this for Facebook is when it comes time to check out toy have to leave Facebook and go to your server where an SSL is in place.  Fortunately in this situation this would not be the case, you can have an SSL installed to the root of your site and you'll be okay.
    This is an interesting project.  Give this a try and let me know how it goes and if you run into any snags, please make a post on the Cartweaver forums: http://forums.cartweaver.com - I'm really confident that this can work, and not only work, but work well.
    Looking forward to hearing how this goes, and being of what help we can.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    PHP & ColdFusion Shopping Cart for Adobe Dreamweaver
    Stay updated:
    http://www.facebook.com/cartweaver
    http://www.twitter.com/cartweaver
    http://blog.cartweaver.com

  • Getting stylesheets to work in header.php and files associated with it

    Let's say I created a header.php file in my includes folder.  And I include it in my index.php file in the site root directory.
    Then in the header.php file, I have a link to the style sheet. 
    The issue I've always found is that you can't get the header.php file to apply the stylesheet.
    I can get it to work using global links, however I don't want to do that as I'll have to undo them before I upload the site.  (And I forget....)
    So anyways, I came up with this code today in an attempt to overcome this.  Here is my header file so far:
    "; } else           echo ""; ?>  
    So here is what it is doing:
    1. It is creating a variable called $directory which is equal to the current directory.
    2. Then it is creating another variable called $currentFolder which is equal to whether or not the variable $directory contains the word "includes".
    3. Then it says if $currentFolder is NOT false then it has the location of the stylesheet in relation to the header.php file.
    4. Else - if it IS false then the stylesheet is located in a location in relation to files in my root directory.
    This works perfectly fine....in Live view.  Both the header.php and index.php will format the header in live view.  Neither though will format it in Design view.  Which sucks cause I was pretty happy that I came up with this code on my own.
    The reason it isn't working in Design View - I realize now - is because Dreamweaver won't process that script in Design View. 
    Does anyone know of a way to get this script to run in Design View?  Or maybe some suggestions on editing this code to get it to work in Design View?
    Thanks!

    >The issue I've always found is that you can't get the header.php file to apply the stylesheet.
    Right. That's because, and it seems you understand this already, the css file relative location is different from the point of view of the header file, and the parent file. Since the header file is included in the parent at the server, the client then sees the css file in the wrong location.
    The solution is to use Design time style sheets. This will apply the css to the page only in design time - it won't actually insert the css file into the code. So, insert the css reference into the header file from the point of view of the parent - index.html. Then add a design time style sheet. That should work.

  • Can you change Layout of php and filter?

    HI All,
    I have some code:
    function tc($v) {
    if (!$v) {
    return 'NULL';
    } else {
    return '\''.mysql_real_escape_string($v).'\'';
    $field = array(
    array("surname", "Surname"),
    array("forename", "Forename(s)"),
    array("address", "Address"),
    array("post_code", "Post Code"),
    array("telephone1", "Telephone Number"),
    array("telephone2",  "Alternative Number 1"),
    array("telephone3", "Alternative Number 2"),
    array("dob", "Date of Birth"),
    array("gender", "Gender"),
    array("religion", "Religion"),
    array("special", "Disabilities / Special Needs"),
    array("mother_name", "Mother Name"),
    array("mother_occ", "Mother Occupation"),
    array("mother_crb", "Mother CRB?"),
    array("father_name", "Father Name"),
    array("father_occ", "Father Occupation"),
    array("father_crb", "Father CRB?"),
    array("email", "Email Address"),
    array("subs", "Subs"),
    array("GA", "Gift Aid Signed?"),
    array("dpa", "DPA Signed?"),
    array("editby", "Record last edited by"),
    array("edittime", "Record last edited at"),
    array('datejoined', 'Date Joined'),
    array('year1', 'Year One Badge'),
    array('year2', 'Year Two Badge'),
    array('year3', 'Year Three Badge'),
    array('year4', 'Year Four Badge'),
    array('year5', 'Year Five Badge'),
    array('year6', 'Year Six Badge'),
    array('year7', 'Year Seven Badge'),
    array('year8', 'Year Eight Badge'),
    array('year9', 'Year Nine Badge'),
    array('EA1', 'Emergency Aid Stage 1'),
    array('EA2', 'Emergency Aid Stage 2'),
    array('EA3', 'Emergency Aid Stage 3'),
    array('EA4', 'Emergency Aid Stage 4'),
    array('EA5', 'Emergency Aid Stage 5'),
    array('HA1', 'Hikes Away Stage 1'),
    array('HA2', 'Hikes Away Stage 2'),
    array('HA3', 'Hikes Away Stage 3'),
    array('HA4', 'Hikes Away Stage 4'),
    array('HA5', 'Hikes Away Stage 5'),
    array('HA6', 'Hikes Away Stage 6'),
    array('IT1', 'IT Stage 1'),
    array('IT2', 'IT Stage 2'),
    array('IT3', 'IT Stage 3'),
    array('IT4', 'IT Stage 4'),
    array('IT5', 'IT Stage 5'),
    array('music1', 'Musician Stage 1'),
    array('music2', 'Musician Stage 2'),
    array('music3', 'Musician Stage 3'),
    array('music4', 'Musician Stage 4'),
    array('music5', 'Musician Stage 5'),
    array('NAtotal', 'Total Nights Away'),
    array('NA1', 'Nights Away Stage 1'),
    array('NA2', 'Nights Away Stage 2'),
    array('NA3', 'Nights Away Stage 3'),
    array('NA4', 'Nights Away Stage 4'),
    array('NA5', 'Nights Away Stage 5'),
    array('NA6', 'Nights Away Stage 6'),
    array('NA7', 'Nights Away Stage 7'),
    array('NA8', 'Nights Away Stage 8'),
    array('NA9', 'Nights Away Stage 9'),
    array('NA10', 'Nights Away Stage 10'),
    array('NA11', 'Nights Away Stage 11'),
    array('NA12', 'Nights Away Stage 12'),
    array('swim1', 'Swimming Stage 1'),
    array('swim2', 'Swimming Stage 2'),
    array('swim3', 'Swimming Stage 3'),
    array('swim4', 'Swimming Stage 4'),
    array('swim5', 'Swimming Stage 5'),
    array('OCDATE', 'SCOUTS: Outdoor Challenge'),
    array('OPCDATE', 'SCOUTS: Outdoor Plus Challenge'),
    array('ACDATE', 'SCOUTS: Adventure Challenge'),
    array('CCDATE', 'SCOUTS: Creative Challenge')
    if ($user = User()) {
    if ($_POST['section'])  {
    if (UserRead($_POST['section']) || UserAdmin()) {
    echo '<h1>1st Chalfont St Giles Scout Group - ';
    $lsec_query = mysql_query('SELECT * FROM csg_section WHERE section='.tc($_POST['section'])) or die("<b>MySql Error:</b>".mysql_error());
    if ($lsec = mysql_fetch_array($lsec_query)) {
    echo $lsec['name']."\n</h1>";
    } else {
    echo 'Section Not Found</h1>';
    die();
    echo '<table border="2"><tr>'."\n";
    foreach ($field as $item) {
    if ($_POST[$item[0]]==1) {
    $fielddo[] = $item;
    echo '<td>'.$item[1].'</td>'."\n";
    echo '</tr>';
    switch($_POST['sort']) {
    case 'a':
    $sort = 'surname ASC, forename ASC';
    break;
    default:
    $sort = 'dob ASC';
    $ypl_query = mysql_query("SELECT * FROM csg_yp WHERE section=".tc($_POST['section'])." ORDER BY $sort") or die('<b>MySql Error:</b>'.mysql_error());
    while ($ypl = mysql_fetch_array($ypl_query)) {
    echo '<tr>'."\n";
    foreach ($fielddo as $item)
    echo '<td>'.$ypl[$item[0]].'</td>'."\n";
    echo '</tr>'."\n";
    echo '</table>'."\n";
    } else {
    ?>
    <p><b>Access Denied.</b> You are not authorised to view this section.
    <?
    } else {
    ?>
    All this does is produce a list of all the fields in the database in a long list so we can choose which fields to print.
    As this list is now growing as we have added a lot more fields to the database ... is there anyway we could split it into say 3 columns?
    Ideally the first column would be all the personal details - i.e. down to DPA Signed - Second column would be the other badges and the third column different depending on the section.
    On the data input page we have different badges depending on section. Using the following code:
    if ($action=='add' || ($action=='edit' && (UserRead($yp['section']) || UserAdmin()))) {
    $yp_section_query = mysql_query("SELECT name FROM csg_section WHERE section=".tc($yp['section'])) or die("<b>MySql Error:</b>".mysql_error());
    $yp_name = mysql_fetch_assoc($yp_section_query);
    $yp_name = $yp_name['name'];
    $yp_section = (strstr($yp_name,"Scout")) ? 1 : (strstr($yp_name,"Cub") ? 2 : 3) //If has word 'scout' -> 1. Else If has word 'cub' -> 2 Else 3 (beaver)
    ?>
    <form action="yp2.php" method="post">
    <input type="hidden" name="yp" value="<?php echo $yp['yp_id']; ?>">
    <input type="hidden" name="section" value="<?php echo $yp['section']; ?>">
    could we use this on the print page to show different badge list depending on section in the third column??
    Many Thanks,
    Steve

    I am not sure how it looks familiar ... are you in Scouting too?
    So can i just create columns and put the different bits in each column?
    How can I sort by database - sorry I am a bit of a novice when it comes to php and coding, etc.
    Also was it able to filter depending on section?
    Many Thanks,
    Steve

  • PHP and SSIs not working in Lion

    So I had PHP and HTML SSIs working fine under SL, but now they don't seem to be working since upgrading to Lion.  I have checked the httpd.conf file and all the correct lines are still uncommented and 'Includes' is still listed as an Option Directive in both the httpd.conf file and <USER>.conf file.  Has anybody else had this problem since upgrading to Lion and how can I fix it?

    Mine is similar for something different. After uncommenting php in httpd.conf file the server refuses to boot. When I typed php -v at the command line I got this:
    dyld: Library not loaded: @loader_path/../lib/libssl.dylib
      Referenced from: /usr/lib/libpq.5.dylib
      Reason: Incompatible library version: libpq.5.dylib requires version 1.0.0 or later, but libssl.0.9.8.dylib provides version 0.9.8
    That's been frustratingly hard to fix so far (at least for me). I was just getting started helping a friend with his Joomla site and promised to duplicate the difficulty and debug it on my Mac Air. But, I installed Mountain Lion, and then more recently the latest upgrade, and everything went south as they say. I need to see what answer you get. It may apply to my problem as well.

  • Dreamweaver CS5.5 Mobile Apps with PHP and MYSQL?

    Hello,
    I don't have Dreamweaver CS5.5 yet and I've been trying to search for information on this but I couldn't find any. I've been learning PHP and been developing with MYSQL with Dreamweaver CS5 but I wanted to know if I can use the same tags and everything if I would to build a Mobile App using the new Dreamweaver CS5.5 (http://tv.adobe.com/watch/cs-55-web-premium-feature-tour-/dreamweaver-cs-55-jquery-mobile- pages/). I overlooked at the video and it seems pretty easy building an app. So is PHP and MYSQL easily integratable? Are there any examples that I might be able to check out?
    Thanks!

    No. PHP is a server-side scripting language that requires a server (or server-like environment) to run.
    An iPhone (or Android) application does not allow for a "built-in" server (which is resource intensive and has scary security implications). You just can't build an application with PHP/MySQL for a mobile device. Instead you can build a web service that your HTML/JavaScript mobile application can then communicate with. This is the only supported way you can use PHP/MySQL in a mobile app. Again: the PHP/MySQL should reside on a server and your HTML/JS mobile app can then communicate with that web service. That's what instapaper and other applications do.
    Frankly, just make a web application that's mobile device friendly and you'll:
    1) Avoid all the messiness of the app stores
    2) Have greater control over what your web app can do (don't have to tow the Apple/Google line)
    3) Have a web app that can work across mulitple mobile devices as well as standard web browsers (i.e. more audience = more $).
    4) Future proof your application (pushing updates to your server and everyone using your web app is updated)
    Otherwise, read-up on Adobe AIR and what it supports and remember, the best apps are written natively for the platform (i.e. want to write an app for an iPhone? Learn Objective-C and use xCode on a Mac. Want to write an app for Motorola Xoom? Learn the Android SDK and use inteliJ).

Maybe you are looking for

  • Problem with installing NVIDIA drivers.

    I don't know If I should ask this here or at NVIDIA. I'll just try here first since even HP provided drivers don't install. I'll just let these pictures tell the story. I also tried the driver that can be downloaded from HP download page and the resu

  • Actual cost showing doubled after settlement in PS reports

    Dear friends, I have created a project with actual cost 120,000, and then I settled the cost to the AUC using CJ88 , when I run the report S_ALR_87013558 it gives wrong amount and counted the cost double 240,000 (120,000 + 120,000 ) This actual cost

  • Print images created on the fly by a servlet

    Please, look at it... my tiff image doesn't print in my browser (IE6). Could somone tell me why !???? // Method of a "Page" class public void write (OutputStream out) {             // Reading of the tiff file (this.tempFile is a valid File)      Plan

  • Moved iTunes media to external drive but...

    Hello all, I followed the instructions for moving my iTunes media folder to an external drive (it had taken up most of my mac book's memory) and at first I was able to access the DVDs and CDs I had ripped but no longer. I can go into the external dri

  • Euro symbol is driving me crazy!!

    My architecture is: - Oracle 8i 8.1.7 DBMS under Linux on server "db" - Oracle 9i application server under Linux on server "web" I've got a jsp page which calls a java class to query the db, get the result as xml string and transform it into HTML by