PHP/MySQl/Apache

Dear All,
if I embed this within the body of my php page, <?php
getFileSize('cover.pdf') ?>, all is well and I get the
desired result.
However, if I embed the same text, <?php
getFileSize('cover.pdf') ?>, into
my MySQL database, I get absolutely nothing at all.
Have tried adding htmlentities, urlencode and other such
fabulous things,
but all to no avail.
Basically, my knowledge isn't good enough, but somehow MySQL
seems to be
disabling the function. I guess I need to 'escape' the code
in some manner?
Any clues?
Craig Sherwood

David and Joris,
your posts make fascinating reading - many thanks.
I guess the one thing to explain is why!
I have a database driven site. My users enter information
into the database
via an admin section.
In their text they need to be able to enter links to
PDF/doc/jpg files.
These links could be anywhere in the text, thus it can't be
limited to a
designated field.
However, when the site visitors look at a page, I wanted to
be able to show
them the file size, so that they don't download unnecessarily
large files by
accident.
Hence the need for my users to be able to enter the file name
in a bit of
code and have the relevant page show file size in amongst the
text.
Craig
"David Powers" <[email protected]> wrote in message
news:[email protected]...
> Craig wrote:
>> So then the obvious question surely is how do you
execute a piece of code
>> if the 'call' to the function is in a database
field?
>
> The answer is that you don't do it. There is a PHP
function eval(), which
> evaluates a string as code. To achieve the type of
result that you want,
> however, it involves storing your string in the database
as PHP code. Try
> this simple example using your human() function:
>
> $filesize = 12345;
> $string = '$size = human($filesize); echo "This is the
size: $size";';
> eval($string);
>
> This displays "This is the size: 12.1k".
>
> The question remains why on earth you would want to
store PHP code in a
> database simply for the purpose of running it in a PHP
script? It makes
> far more sense to embed the code in your main script.
More importantly,
> eval() is considered to be a serious security risk. A
common saying among
> PHP developers is "Eval() is evil".
>
>> After-all, html code can be put in a field, but
rendered as proper html
>> (such as links for example) without the html code
(<a href etc) being
>> displayed.
>
> HTML is just plain text, which is interpreted by the
browser by referring
> to the text/html MIME type in the header. PHP needs to
be executed on the
> server before the output is sent to the browser. The
opening and closing
> PHP tags in a text field retrieved from a database are
treated as text in
> the same way as a PHP variable is treated as text when
included in single
> quotes. The only way to execute code stored in a
database is to use
> eval(), which has serious drawbacks.
>
>> FYI: The 'human' function displays either 'kb' or
'm' depending on the
>> file size and executes perfectly.
>
> Yes, after studying it more carefully, I have finally
worked out how it
> functions. It uses a for loop in a rather unconventional
way, which is
> what confused me. It also converts bytes to Gigabytes.
>
> --
> David Powers, Adobe Community Expert
> Author, "The Essential Guide to Dreamweaver CS3"
(friends of ED)
> Author, "PHP Solutions" (friends of ED)
>
http://foundationphp.com/

Similar Messages

  • Snow Leopard, PHP, MySQL, Apache and Wordpress!

    Hi there,
    It's taken me most of the day to work this out, so I thought I should post about it somewhere and here, on the Apple forum, is the ideal location.
    I'm a web developer and love the fact that my MacBook works out of the box with a Unix webserver and with little effort, I was able to set up PHP and MySQL on it. I was delighted to hear that the new Snow Leopard was shipping with the latest and greatest of both. It wasn't quite that easy when it came down to running my test sites, one of which I'm working on is a Wordpress site. Far from being daunting, the solutions to the problems I had were quite simple. The issues arose from the OS not having much exposure yet and not many people having posted their experiences on the web. It was just time consuming.
    I should mention at this point that this does require some tinkering with Terminal, but not so much as to cause damage if you do something wrong.
    First off Apache. Thankfully this is as stable as it always has been. All this requires to activate it is to visit System Preferences > Sharing and switch on Web sharing. Bish-bosh, job done.
    Next off PHP. If you open a Safari window and run your phpinfo.php file (where ever you have it saved. If you don't, they're out there, it's a tiny piece of code which you can use to find out your current php setup). You'll find that everything is superb! PHP 5.3! Excellent! Hang on, scroll down to the date and time section. Whoa! What's this big fat warning here.
    That warning my friend, has been the bane of my misery all day. Wordpress hates it. HATES IT! It causes no end of grief. So what's the multi step, multi program solution?
    Open your php.ini file and add the line:
    date.timezone=Country/City
    (do a Google search for PHP Timezones and you will get the exact settings. It's not so good that it understands every city in the world. My setting was Europe/Dublin).
    That's all. This will solve your issue of the timezone error everywhere. Stop and start Apache (System Preferences > Sharing, tick off and tick back on Web Sharing) and hey presto, error is gone.
    Wait a minute, where the **** is my php.ini file. Unfortunately this is where you have to get your hands dirty. Your php.ini file is a system file which resides in the /etc/ folder. Open a terminal window and type exactly the following:
    cd /etc/
    cp php.ini.default php.ini
    This makes the php.ini file from the default. This protects the original so if you ever need to create a new copy or if you make a mistake in the next steps, you can start again.
    Next I'm going to tell you how to edit this file. This uses a program called vi (there are GUI editors out there that will save you this heartache, so if anyone knows any, please post in response. I think TextWrangler is one).
    First you need to set the php.ini file so you can edit it. Type in exactly as follows:
    sudo chmod 777 php.ini
    Sudo is the superuser commmand. It may not be needed, but stick it in anyway. If you are asked for a password, put in your normal password (that you would be asked for say if you were installing something you downloaded).
    At the next prompt, type in:
    vi php.ini
    This will open the php.ini file. Using the up and down keys, find a blank line in the file. You will notice that alot of the lines start with ';'. These are commented lines. Once you find a blank line, press 'i' to insert text. Your screen will now say '-- INSERT --' at the bottom in red. Type the following in exactly (you will NOT be able to cut and paste):
    ; Set PHP Default Timezone
    date.timezone=Europe/Dublin
    Substitute "Europ/Dublin" with your own timezone. When you are done, press escape. Now type in the following:
    :wq!
    The colon is important (not a typo on my part) as this tells vi you are going to run a command. You should now be back at your prompt. Now you need to reset the permissions on the file. Type the following:
    sudo chmod 444 php.ini
    And that's it. That's your PHP setup and finished. If you run your phpinfo.php file now, you should see your timezone under the date and time where you were getting the error before.
    Now the MySQL. This is a bit of fun because, even though MySQL ships with the system, it's not exactly set up correctly! So once again into terminal.
    This time go to the local directory:
    cd /usr/local/
    If you type in:
    ls -al
    You'll get a directory listing. This has the MySQL folder listed as mysql-5.0.77-osx10.5-x86 (or something! I did that from memory!). This IS the MySQL folder but if you, like me, had previously set the MySQL Preference Pane in your System Preferences, then it won't be able to access this. Type the following command:
    sudo cp -R /usr/local/mysql* /usr/local/mysql
    This should copy everything into a folder called mysql. It takes a couple of seconds (first time on my machine it was a good 20 seconds) to run so be patient. Now you need to do the following:
    sudo chown mysql:mysql /usr/local/mysql
    This sets the owner and group of the mysql files to 'mysql'. If you go back to your MySQL preference pane in System Preferences, you should now be able to start it (something weird about it makes it require to close and reopen the System Preferences window before it can open the MySQL pref pane. This is normal, just click ok).
    The bit that got me here, is that I thought that my activation of the MySQL was actually a new install. I tried everything to change the root user and password for MySQL but in fact, if you had it installed on Leopard, prior to upgrading to Snow Leopard, all your users and passwords are the same. If you HAVEN'T installed it before, I recommend you read the Post Installation Customisation (section 2.3) on the manual for MySQL 5.1 on http://www.mysql.com
    So that's about it. All that remains is to test Wordpress. I have phpmyadmin installed (I've heard CocoaMySQL is very good, like iTunes for db's so I'm gonna check that out later) and was able to create the new wordpress database. I changed the settings in the wp-configure.php file to match my setup but nothing worked. I changed the host from '127.0.0.1' back to 'localhost' (a common complaint of the wordpress setup) but no joy. Then I changed the host back to '127.0.0.1' and added the port :3306 (so the full host is '127.0.0.1:3306') and bingo, the install worked, my database setup and my test site worked.
    So that's it! Many of you out there will say, why didn't you just use MAMP. I did use MAMP, but I also got the Timezone issues and it took far more tinkering and hacking to make it work. I decided that, as my lovely MacBook now running lovely Snow Leopard had the lovely newest versions of PHP and MySQL installed, I'd rather get them working than use a runaround with MAMP. I'm a happier camper for it.
    I hope this helps some of you out there. I don't personally have a blog yet, but when I do, I'll post this up there for all to access. I may even add screen shots!!! But seriously, I hope this helps you all out with your installs. It's so handy to have all this stuff straightaway with Snow Leopard, it's just a matter of getting it to work.
    All the best now,
    T

    Hmmmm... I did a clean drive install of Snow Leopard because I used to do it once a year with Windows and hadn't done it in 3 with my MBP.
    First, my httpd.conf file had the line enabling PHP commented out, so when I went to see my simple file with phpinfo(), I saw the source. Saw your post, thought it was the timezone, fixed that (which will probably make wordpress happy when I get it running), and it still didn't work. Looked at the httpd.conf file, found that PHP was disabled by default, fixed that line, restarted the server, and my phpinfo() worked like a charm.
    Also if you want to edit config files, I use TextWrangler's "open hidden files" option.
    But... I have no /usr/local directory at all. Doesn't exist on my machine. Checked the options in the base install and MySQL isn't offered as an option. Checked the optional installs and MySQL isn't there. Even letting spotlight search for hidden files, the only files with MySQL in their name were from php scripts in my web folders.
    There's some stuff about installing/compiling from source.
    http://hivelogic.com/articles/compiling-mysql-on-snow-leopard/
    Dunno if I want to go down that road quite yet.

  • How do i set up a PHP,MYSQL,Apachie server on my macbook

    I play a well known MMORPG (WoW) and my guild recently lost there site due to owner of the site leaving the guild, i had previously mentioned i had a little experience in designing but not developing so they asked me to develop a web site for the guild with DKP (Dragon Kill Points like currency) info, Forum and other features.
    basiclly most of the work is done on the site design wise and mockups i just now have to create a forum, so i found an online document showing step by step forum development (using Dreamweaver 8 and impAKT) but a pre-req is i have to have a server set up on my system to create it i have no idea about server set up or maintence and i have never had a site published please any help would be much apreciateded on setting up a server. Thank you for your time.

    Apache is already running on your Mac if you are running OS X.
    PHP for Mac OS X is free, and can be downloaded from http://www.entropy.ch/software/macosx/php/. There is some good instructions on installing and testing your installation. It also provides links to PHP add-ons, such as MySQL. Great page. I think it should get you started in the right direction.

  • Local net ssh failure Tiger (PHP MYSQL Apache Dreamweaver)

    I can't be sure, but I think this problem started with the latest security update. I'm 80% done with my first web application using PHP and Mysql in dreamweaver when I began getting an unknown error from dreamweaver when attempting to connect to my DB on my testing server. After 2 days of debugging and re-installing apps I finally wiped the testing server (G4 400 Cube memory topped out 120GB HD, down to the metal) reinstalled Tiger, fully patched, edited the httpd.conf file to enable php 4.4.1. Installed Mysql 4.1 (which was the last general distribution with a packaged install) and the server works fine, so I created myself as a user in mysql @localhost & @localmachinename to replicate root user. Navicat was up and running in no time, so I re-populated my server from my backup. Then I jumped over to my design workstation (G5 2Ghz Dual, 2GB Ram, 250GB HD) only to find navicat can't login to the mysql server because ssh wont connect to the G4. After much testing I discovered ALL of my macs will attach only to external addresses. My linux box, external linux boxes, even windows boxes emulating ssh will attach internally or extenally, the macs won't talk to anything in the local network 10.0.x What the ****! My project is now past due and I'm stuck because I can no longer ssh from any macs to internal machines mac or otherwise. PLEASE HELP!!! is there an SSH pakage so I can re-install? I couldn't find a mac ssh package on apple or ssh.org, Will that even make a difference? Can I uninstall the security update? Can anyone suggest a workaround?
    My network
    *10.0.1.2 Ganymede (Mandrivia 10 server and Gateway)
    *10.0.1.6 Artemis (G5 10.4.7) Web/Video
    *10.0.1.10 Miletus (G4 10.4.7) Web Testing
    *10.0.1.5 Venus (G4 10.4.7) Photo editing
    *10.0.1.4 Hero (G3 ibook 10.4.7) office work
    *10.0.1.7 Hermes (iMac 10.4.7) iLife
    *10.0.1.3 Apollo (Wintendo XP) Web Testing/The Sims
    Here are several ssh logs.
    mac to mac (FAIL)
    Artemis:~ phil$ ssh -vv 10.0.1.10
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 10.0.1.10 [10.0.1.10] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 1.99, remote software version OpenSSH_4.2
    debug1: match: OpenSSH_4.2 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    Write failed: Broken pipe
    Artemis:~ phil$
    Mac to linux internal (FAIL)
    Artemis:~ phil$ ssh -vv 10.0.1.2
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 10.0.1.2 [10.0.1.2] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
    debug1: match: OpenSSH_4.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: An invalid name was supplied
    Cannot determine realm for numeric host address
    debug1: An invalid name was supplied
    A parameter was malformed
    Validation error
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    Write failed: Broken pipe
    mac to linux external (Success)
    Artemis:~ phil$ ssh -vv 69.253.x.x
    OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
    debug1: Reading configuration data /etc/ssh_config
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to 69.253.x.x [69.253.x.x] port 22.
    debug1: Connection established.
    debug1: identity file /Users/phil/.ssh/identity type -1
    debug1: identity file /Users/phil/.ssh/id_rsa type -1
    debug1: identity file /Users/phil/.ssh/id_dsa type -1
    debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
    debug1: match: OpenSSH_4.3 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_4.2
    debug2: fd 3 setting O_NONBLOCK
    debug1: Miscellaneous failure
    No credentials cache found
    debug1: Miscellaneous failure
    No credentials cache found
    debug1: SSH2MSGKEXINIT sent
    debug1: SSH2MSGKEXINIT received
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit: none,[email protected],zlib
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
    debug2: kexparsekexinit: ssh-rsa,ssh-dss
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit: none,[email protected]
    debug2: kexparsekexinit:
    debug2: kexparsekexinit:
    debug2: kexparsekexinit: firstkexfollows 0
    debug2: kexparsekexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
    debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
    debug2: dhgenkey: priv key bits set: 130/256
    debug2: bits set: 514/1024
    debug1: SSH2MSG_KEX_DH_GEXINIT sent
    debug1: expecting SSH2MSG_KEX_DH_GEXREPLY
    debug1: Host '69.253.239.85' is known and matches the RSA host key.
    debug1: Found key in /Users/phil/.ssh/known_hosts:3
    debug2: bits set: 516/1024
    debug1: sshrsaverify: signature correct
    debug2: kexderivekeys
    debug2: set_newkeys: mode 1
    debug1: SSH2MSGNEWKEYS sent
    debug1: expecting SSH2MSGNEWKEYS
    debug2: set_newkeys: mode 0
    debug1: SSH2MSGNEWKEYS received
    debug1: SSH2MSG_SERVICEREQUEST sent
    debug2: service_accept: ssh-userauth
    debug1: SSH2MSG_SERVICEACCEPT received
    debug2: key: /Users/phil/.ssh/identity (0x0)
    debug2: key: /Users/phil/.ssh/id_rsa (0x0)
    debug2: key: /Users/phil/.ssh/id_dsa (0x0)
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: publickey
    debug1: Trying private key: /Users/phil/.ssh/identity
    debug1: Trying private key: /Users/phil/.ssh/id_rsa
    debug1: Trying private key: /Users/phil/.ssh/id_dsa
    debug2: we did not send a packet, disable method
    debug1: Next authentication method: keyboard-interactive
    debug2: userauth_kbdint
    debug2: we sent a keyboard-interactive packet, wait for reply
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug2: we did not send a packet, disable method
    debug1: Next authentication method: password
    [email protected]'s password:
    debug2: we sent a password packet, wait for reply
    debug1: Authentication succeeded (password).
    debug1: channel 0: new [client-session]
    debug2: channel 0: send open
    debug1: Entering interactive session.
    debug2: callback start
    debug2: clientsession2setup: id 0
    debug2: channel 0: request pty-req confirm 0
    debug2: channel 0: request shell confirm 0
    debug2: fd 3 setting TCP_NODELAY
    debug2: callback done
    debug2: channel 0: open confirm rwindow 0 rmax 32768
    debug2: channel 0: rcvd adjust 131072
    Last login: Tue Aug 15 12:56:42 2006 from artemis.ganymedia.net
    [phil@ganymede ~]$
    G5 Dual 2G   Mac OS X (10.4.7)  

    Mac comes with a fully functioning Apache web server with all the scripting languages (except VB). You need to enable them in the configuration file.
    You need some light weight UNIX administration skills to do this. Use the system restore disk to set the password for the root account.
    Open a terminal screen from the Utilities folder in Applications. Type "su", press return, then enter the root password you set using the system restore disk.
    Make a backup copy of the Apache configuration file with the following command (type this in with no mistakes and press the return key).
    cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.copy
    Enter the following to open the Apache configuration (type this in with no mistakes and hit the return key).
    /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/httpd/httpd.conf &
    Locate and remove the # comment symbol from the following lines and save the file in /etc/httpd/httpd.conf.
    #LoadModule php4_module libexec/httpd/libphp4.so
    #AddModule mod_php4.c
    Exit the TextEdit application and quit out of the terminal application.
    Put the following web page into a file named greetings.php inside the folder Library/WebServer/Documents.
    <html>
    <head>
    <title>Experiment</title>
    </head>
    <?php
    echo "Greetings";
    ?>
    </body>
    </html>
    Once you have made these changes, you can reboot to activate the changes.
    Put the following into your browser to test the configuration.
    http://localhost/greetings.php
    You should see "Greetings" on a web page titled "Experiment".
    MySQL is a separate server that you need to download and configure to complete your web server.
    I hope this helps.
    Best regards - Greg

  • How to install and configure latest xampp, php, Mysql, apache server, and configure it with dreamvie

    Working on my next project for the tech blog Techmozilla I am trying to make php to work with Apache. . i surfed for the procedures and finally i was asked to do the below mentioned operation .. but i am unable to understand it can anyone please help me .I am using Windows XP
    # Add the following 3 lines to your httpd.conf file. You can put them anywhere in the file but maybe it makes sense to put them after the other LoadModule section.
    LoadModule php5_module "d:/Program Files/php/php5apache2_2.dll"
    AddType application/x-httpd-php .php
    PHPIniDir "D:\Program Files\php"
    Is there any other link which helps to install PHP,Apache and MySql. Please help me. Thank you in advance

    This forum is for helping people who are trying to download and install Adobe software products.  You need to find an information resource suitable to the task you are undertaking, most probably provided by whomever provided the resource(s) you are trying to install.

  • Php, mySQL, apache servers and all that malarkey...

    Hello
    I want to learn how to build databases and use dreamweaver to
    build sites to for e-commerce shops or portfolio archives etc...
    But at first glance im a bit overwhelmed. I am willing to put the
    time and effort in but just need a little point in the right
    direction.
    What should i be looking at first? Working out mySQL or
    learning .php? Ive seen a lot of talk about installing apache
    servers and installing php5 but i know absolutely ZERO about this.
    If you had to learn it all again where would you start?
    Ive got a G5 ,DW8 and a web host that supports mySQL. I have
    a bit of experience building websites and am just getting to grips
    with CSS. Do i need anything else?

    gareth:
    You may want to change this -
    Whether your new to web design,
    to this -
    Whether you're new to web design,
    and this -
    The PHP Login Suite has a comprehensive 82 manual
    to this -
    The PHP Login Suite has a comprehensive 82 page manual
    Meanwhile, I am examining the details of this product
    carefully! 8)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "gareth" <[email protected]> wrote in message
    news:e2o095$kco$[email protected]..
    >I would learn the basics of PHP first, then start looking
    at working with
    > databases once you`ve got to grips with the basics.
    >
    > If you want to learn to create E Commerce sites, then
    its going to give
    > you
    > a huge advantage if you learn to hand code rather than
    relying solely on
    > Dreamweavers server behaviors to do everything for you.
    >
    > Installing Apache and PHP is a good idea, as it allows
    you to test your
    > code
    > locally. I have some guides at:
    >
    >
    http://www.dreamweavermxsupport.com/index.php?type=article&pid=39
    >
    > Getting a bit old now, but still relevant :-)
    >
    > There are a huge number of tutorials on the web to help
    with learning PHP,
    > the home of PHP www.php.net is an essential bookmark.
    There are also a
    > large
    > number of good books out there that will help you.
    >
    > Gareth
    >
    http://www.phploginsuite.co.uk/
    > PHP Login Suite V2 - 34 Server Behaviors to build a
    complete Login system.
    >
    >

  • Php, mysql, apache, windows xp

    I use the most recent versions of php, apache, mysql and
    windows xp. And I use Dreamweaver 2004MX.
    I create a very simple index.php and when I preview on a
    browser, the address becomes like this.
    http://localhost/artgallery/TMP2zjuplef9z.php
    instead of index.php at the end in the browser address.
    Each time when I preview it, it create random address at the
    end instead of index.php.
    Why does it create like this? Is there anything I can fix
    this?

    However, doing this will prevent your root relative links (if
    any), and
    server-side includes (I think) from rendering properly in
    preview.
    My suggestion would be to ignore it for you local previews.
    It's how DW
    works.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Nancy - Adobe Comm. Expert" <[email protected]> wrote
    in message
    news:f7mq70$esk$[email protected]..
    > Edit/Preferences/Preview in Browser. Uncheck the "create
    temporary files"
    > checkbox and restart Dreamweaver.
    >
    >
    > --
    > Nancy Gill
    > Adobe Community Expert
    > Author: Dreamweaver 8 e-book for the DMX Zone
    > Co-Author: Dreamweaver MX: Instant Troubleshooter
    (August, 2003)
    > Technical Editor: Dreamweaver CS3: The Missing Manual,
    > DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide
    > Mastering Macromedia Contribute
    > Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced
    PHP Web
    > Development
    >
    > "shinceciokada" <[email protected]>
    wrote in message
    > news:f7mm6c$ai7$[email protected]..
    >>I use the most recent versions of php, apache, mysql
    and windows xp. And I
    >>use
    >> Dreamweaver 2004MX.
    >> I create a very simple index.php and when I preview
    on a browser, the
    >> address
    >> becomes like this.
    >>
    http://localhost/artgallery/TMP2zjuplef9z.php
    instead of index.php at the
    >> end
    >> in the browser address.
    >> Each time when I preview it, it create random
    address at the end instead
    >> of
    >> index.php.
    >> Why does it create like this? Is there anything I
    can fix this?
    >>
    >>
    >
    >

  • PHP, MySQL, Apache and MAMP

    Could someone tell me if there will be any problem if I first downloaded PHP then MySQL and after I enabled all these things I installed MAMP? Is it possible to delete all those things that I have donloaded before MAMP? If so, then how to do it?

    Since these are basic server apps, you should post to the server products forums.

  • Php mysql html on your server application

    hello
    I can work with example websites
    php mysql html on your server application
    ouy have to install, php mysql apache and phpmyadmin on my bakbookpro
    if your server does not do what I Querro please tell me
    and I instalho manually
    if it does I'll use it qurro
    however pressisamos people who can use that build here
    I do not have a whole life to stay behind the computer
    and if your server can not work rebuild from scratch
    do the work with php and html
    because my client wants the **** form in php

    you mean its got <TEXT LEADING FORMATS blah blah >
    yea, turn html on on the text box that ur sending to php.
    or off, well whatever it is now, do the oposite, lol.

  • Problems with Apache PHP Mysql

    I tried doing an upgrade from Tiger to Leopard server but was having lots of issues while working with the virtual sites I have hosted. I tried a clean install and I was still unable to get Apache php and mysql to work together. Each service was starting fine but when I would try to run a php file it would only display a white page. Under the upgrade instead of displaying the page it was downloading any page I tried to load.
    In the new clean install I enabled phplib5 through server admin but even a simple info.php file with <?php phpinfo(); ?> was only giving me a white page. I dont know if mysql was interfacing with php and apache at this point cause I could not get any further. I mainly just want to be able to run wordpress which is a php blog that uses a mysql database.
    I have heard some people talking about mamp installs and not using the stock web services but I did not know if that would be a smart route to take.

    well the problem come in that you could end out with multiple releases of the same application when the idea is to make one package "stable"
    would you rather have a debain package data base that has seventeen apache's or one stable full featured apache?
    as for a server/stable tree for production machines this is coming. implimentation is not the trouble it is time that is a factor.

  • Apache php mysql installation on arch

    does anyone have a tutorial on how to install :
    - apache
    - php
    - mysql
    on Archlinux
    i have installed apache
    pacman -S apache
    pacman -S php
    pacman -S mysql
    but apache won't start : /etc/rc.d/httpd start - it gives me FAIL
    and when i try httpd it give a nasty error
    httpd: arp_sockaddr_info_get() failed for pufos (pufos - the linux box name)
    httpd: Could not reliably determine the server's fully qualified domain name , using 127.0.0.1 for ServerName
    is because i didnt configureg good httpd.conf or what
    anyway , a tutorial for installing apache php and mysql would be perfect.
    Thank guys

    pacman -S mysql
    /etc/rc.d/mysqld start
    :: Adding mysql group
    /etc/rc.d/mysqld: line 14: groupadd: command not found
    :: Adding mysql user
    /etc/rc.d/mysqld: line 19: useradd: command not found
    chown: 'mysql.mysql': invalid user
    :: Starting MySQL [FAIL]
    omg , if the mysql installed through pacman get stuck cause 'useradd' does not exist as a command .... huuuh
    ??? any sugestions ?

  • Apache php mysql mac 10.4.8 client

    does anyone know the version of php mysql and apache on 10.4.8 if it's shipped with osx and how to upgrade them
      Mac OS X (10.4.8)  

    mysql is not shipped... unless youre talking about osx server then it may be.
    php is 4.4.1 and the path is /usr/bin/php and /usr/lib/php
    apache is 1.3.33 and the relevant paths are /usr/libexec/httpd and /usr/sbin
    I wouldnt reommmend upgrading any of them because its possible they could be broken by future system updates, although i dont specifically know of this ever happening. but for development purpouses its better to isolate your environment. Instead of upgrading the system versions i would recommend installing the versions you wish into /usr/local and jsut setting things up to run from there. Marc Lyiange's php packages do this for you by default (www.entropy.ch). MySQL also comes as a mac binary and installs into /usr/local. As for Apache that will require some configuration What i would do is install it into usr/local. Then i would rename /usr/sbin/httpd to /usr/sbin/httpd-1.3.33 and /usr/sbin/apachectl to /usr/sbin/apachectl-1.3.33. then make symlinks to /usr/local/apachedir/bin/apachectl and /usr/local/bin/httpd to /usr/sbin/httpd and /usr/sbin/apachectl.
    Of course you could always change the appropriate plists to just run your version of apache but i dont know what those are off hand. For what its worth unless you need a particular module thats not supported on 1.3.33 i wouldnt even mees with apache 2.0. its jsut not worth the effort in my opinion.

  • How to update PHP, MySQL or Apache

    The Mac OS X 10.6.2 system does not include the latest versions of PHP, MySQL or Apache.
    What is the recommended update procedure for PHP, MySQL or Apache:
    a) automatically by Mac OS X system (is this possible?) or
    b) manually by the administrator (are there any documentations?)
    Many thanks.
    Actual system versions:
    Mac OS X 10.6.2
    MySQL 5.0.82
    Apache 2.2

    Hi, Thanks for your answer.
    That sounds Apple do not seriously release updates of third party packages shipped with the system (like Apache, mySQL ...) very often.
    To use month or year old packages in a web environment is a big risk, e.g. mySQL actual official version is V5.50 / mySQL Version shipped and updated by Mac OS X 10.6.2 Server is V5.0.82).
    The same with Apache and PHP, both are packages included in Mac OS X Snow Leopard Server product by Apple and are included in a old version.
    And when manually updates by the administrator of the server system do not work well or are not supported by the OS X Server system (as I understand your posting), the administrator can not act to improve and secure the system.
    That can only lead to one conclusion: Apple's Mac OS X Snow Leopard Server should not be used in a productive, internet faced web environment.
    Is this true? I do not want to believe this!?
    Is there really no official supported or documented procedure by Apple to keep the integrated third party components updated?
    I'd like to prefer Mac OS X Server odd Linux distribution because it seems more handy to administrate and to use, e.g. tools like Server Admin. These tools are an advantage of Mac OS X Server.

  • Ruby | Php | Mysql on iMac Apache

    Hello,
    I am a developer who is trying to get my iMac to run local versions of all the languages I use.
    I have been successful in the following:
    Establishing Ruby and mysql on the built in apache server
    Installing MAMP to serve as the php, mysql machine
    This has left me with a problem.
    I have two versions of mysql on my machine, and they are independent. What I would like is to consolidate, preferably by getting php to run on the built in apache. I have been unsuccessful in my attempts to compile and make php.
    A worst case scenario would be telling phpMyAdmin on MAMP to read from the mysql database on the built in server.
    The Goal: access my Ruby on Rails databases through phpMyAdmin.
    Any suggestions, links or points in the right direction would be greatly appreciated!
    Thanks.

    PHP isn't enabled. You have to go into /etc/httpd.conf and uncomment a couple of lines.
    10.4.11 has PHP 4 I think. It does not have GD. I see many posts here with people trying to build their own PHP with gd and failing miserably. I've tried to explain to people how to do it, but they want a 3 minute fix. A 30 minute fix just isn't good enough and they will spend weeks trying to get the 3 minute fix to work.
    Here is what you do:
    1) Enable PHP by uncommenting
    # LoadModule php4_module libexec/httpd/libphp4.so
    and
    # AddModule mod_php4.c
    2) Restart Apache via "sudo apachectl restart" or turning Web Sharing off and back on.
    3) Create the standard phptest.php file containing only "<? phpinfo() ?>" and open it in a browser.
    hopefully you'll see everything you need. If you need to add additional modules:
    4) Go to Apple's open source page, select the appropriate directory for your OS and processor.
    5) Download the "apachemodphp-18.8" project (note this is PHP4, if you want 5, download it from the 10.5 directory - it should work).
    6) Collect the additional, non-default packages you want to use. Build and install them via regular configure, make, make install.
    7) Inspect the Makefile that comes with the Apple PHP. I don't know if the Makefile will work or not. It may need other parts of the darwin open-source environment. It does have the configure options used to build PHP. Go into the PHP directory, and configure using Apple's options and any additional options of your own, make, and make install.
    There are many other threads dealing with PHP and GD but almost everyone is trying to hack up something they got from Fink. If you need to hack around with things, it would be better to start with Apple's default settings and the default settings of any 3rd party libraries.

  • PHP/Mysql issue

    I use Dreamweaver CS3 to create my sites on a Windows/Apache
    Server with PHP5 and Mysql 5. The site works perfectly on my
    testing server at home. On the Web server I'm getting the following
    error which causes the page to not load:
    PHP Warning: mysql_query(): supplied argument is not a valid
    MySQL-Link resource in
    /hermes/bosweb/web248/b2488/ipw.horsehelp/public_html/residents/residents.php
    on line 63
    PHP Warning: mysql_select_db(): supplied argument is not a
    valid MySQL-Link resource in
    /hermes/bosweb/web248/b2488/ipw.horsehelp/public_html/residents/residents.php
    on line 61
    The lines in question are:
    Line 61 - mysql_select_db($database_conn_phh, $conn_phh);
    $query_getSuccess = "SELECT * FROM horses WHERE status =
    'Success Story' ORDER BY horse_barn ASC";
    $getSuccess = mysql_query($query_getSuccess, $conn_phh) or
    die(mysql_error());
    $row_getSuccess = mysql_fetch_assoc($getSuccess);
    $totalRows_getSuccess = mysql_num_rows($getSuccess);
    All of the code is supplied by Dreamweaver. I did not tweak
    the code. I'm not a web developer and what I have found out there
    is still reading greek to me. My connection file is working and
    connecting the database that I have tested.
    Since the above code is throughout the site in one form or
    another it's causing me major headaches. Any help would be
    appreciated.

    This is the first time I've used Adobe products so if the
    following is in the wrong forum (It's the closest one I found so
    far) or the format is incorrect please forgive me.
    I'm new to Dreamweaver CS3 and as I was reading the "first
    steps" it mentions to set up a Dreamweaver site right away. I got
    as far as completing "Site Definition" page under the basic side of
    the setup screen.
    The next screen is "Do you want to work with server
    Technology?"
    There are 2 options - Yes or No. If you select yes a
    drop-down menu appears with several options (but you can only
    select one)...
    Asp Javascript
    Asp VbScript
    Asp.net#
    Asp.net Vb
    Cold Fusion
    JSP
    Php MySql.
    I know nothing about these format and brand new to web design
    so I thought it best to contact GoDaddy (my hosting account) to
    find out what their servers would support. I spoke to a tech rep
    but she wasn't sure.
    She did mention that I have a windows hosting account and Php
    MySql would not work unless I changed to their Linux platform at no
    additional charge.
    The site I have in mind will design with CSS, Liquid layout,
    have some flash, widgets, an inquiry form that clients complete and
    results e-mailed to me, auto-responder, Paypal link and whatever
    else I can discover from Dreamweaver.
    My question being:
    I haven't even begun designing my site because I do not know
    what weather I should select the Yes option and select one of the
    formats mentioned above (if so which one) - or select the No
    option. If I do select the No option at the very beginning, will I
    have problems with my site uploading and working correctly?
    Thank you
    Travis

Maybe you are looking for

  • Need to add a new View With ITS Link in it

    Hello All ,   I am Working on SAP CRM 7.0 in Marketing here in marketing We do have an Account Work Center here in account we have three views Search , Create and Report .I want to add a new view with name "XYZ" in this view i want have Logical links

  • How do I get my camera back on my IPhone 5?

    I synced my old iphone 4 with my new iphone 5 and now I dont have the camera icon anymore. I have tried going to settings and restoring home screen and that didnt work either. PLZ HELP!

  • Files (music/videos) sync between devices and Mac

    Hi all. Hope you would be able to help. I have iOS devices (iPhone and iPod touch) and a Macbook Pro. Basically, I would like to sync all my media files to my iPod touch (i.e. all my music and videos) but only a few albums to my iPhone (due to limite

  • Database, compatabiliy for TstStand 2.0

    I would like to connect to a different database other than Orcale, SQL Server and Access. How can I get TestStand to give me that option. I am willing to debug this new interface, but I need some direction. Help?

  • Can substitution strings be changed at runtime?

    I need to deploy my application such that it can run with different sets of tables, which are otherwise identical in design. My client has multiple versions of the tables. For instance, they may have CHICAGO.EMPLOYEES CHICAGO.DEPARTMENTS or LONDON.EM