Topic: "PHP & MySQL" (page 1 of 1)

1
Author Post
velo
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Hi all,
I am here for months, and I learned so much at this site, thanks tbs! Because I think this is the right place where I can ask sth, expecting the best of you, I'll do it.
I am interested in building PHP based applications with MySQL database. In fact, my friend ask me "Can you make website for my CD-Shop?". My questions are:
1. What I need to configure in cPanel? ;
2. How to start work with PHP, mean is there some useful tool which can generate the code itself;
3. How to build the db and enter the articles in it? ;
4. Can I test it locally on my comp?

As you can see, I am totally n00b about these stuffs, and I need help of you. A few months ago, I was totally n00b with exploiting, but I learned so much. :-)
Now, the time is for some constructive work :D
private message
rayden5
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Hi Velo,

well its not hard at all to get sarted. You simple need some websapcewith PHP enabled and MYSQL Support. PHP Itself comes with handy functions to handle all your request for the Database. But I advice you use some 3rd party tool to create your initial databse tables and structures, like phpmyadmin etc...The MySQL Functions for PHP can be found in the onlne manual (www.php.net)

I can NOT advice to use some 3rd party product as php enviroment, like nukephp etc. These kind of preuild enviroments are most likely exploitable, as you should yourself and if you dont update regulary when a new 0day has been found you risk your site being harmed. I vbiult myself soem php+mysql sites and i ALWAYS start the PHP stuff from scratch, or at least I only used my own templates and includes etc...:)

To enter articles you usually create some PHP Page with some html form which then puts the data into the databse, with php's mysql function i mentioned above.

Yes you can test ths on your local Computer, you only need a webserver with php extensions (IIS + PHP 5 e.g.) and the Mysql server (mysql-nt für w2k/winXP machines)...it runs at system service and can be enabled and disabled like any other service.

Good luck
Ray
Edited by rayden5 on 03.03.2005 14:59:42
private message
theblacksheep
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
I guess the best thing you can do is to run on your pc this combination:

Apache+PHP+MySQL

There are a lot of tutorials out there that explain how to get this combination to work.
Then you can do everything locally first.
private message EMail Website
unknown user
You can try this link: http://www.apachefriends.org/en/xampp.html
EMail
Nedren899
groupmastergroupmaster
http://apache2triad.sourceforge.net/

I would recommend useing that, its a "package" that includes php, mysql, apache, phpmyadmin, perl, python, and like 10 others. I've been useing it for almost a year now on my home computer, and it works pretty nicley. It configures everything for you, and has a "Control Panel" that lets you view all of the logs for everthing, lets you edit the configuration files, and do pretty much anything else that you could possibly do.


NedreN
private message EMail Website
velo
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Thanks guys for a lot of informations, I knew this is the right place for my problems :-)
I was playing a little with cPanel (which isn't so exploitable, I think there is the only one high-risk bug - SQL injection string in url of admin page, but it works only on versions <9.0), and built a db, after that, test it with some forms to write some records and display them in php page, and I am quite surprised how it is simple. The only thing which irritates me is often uploading changed scripts, so I decide to install all of it locally, on my comp. PHP extensions works fine (I am using Maguma php editor), downloaded phpMyAdmin 2.6.1-pl2, and now downloading MySQL 4.0.23. We'll see will all of it works. :-)

Again me :-)
I have downloaded:
- php 4.3.10 (zip ~7 Mb)
- Apache 1.3.33 for Windows environment
- MySQL 4.0.23
---------------------------------------------------------
I think Apache server is properly installed ('localhost' in URL works fine), but the problem persists coz it doesn't process php files. I tried so much, mean change some lines in php.ini and httpd.conf, but it still doesn't parse php files to php interpreter. Also, I copied php.ini in win directory, but there is no difference. I have read a lot of tuts explaining how to configure php & Apache, but it still doesn't work!
PHP is installed in C:\php (default)
Apache is installed in C:\Program Files\Apache Group\Apache (default)
:wall:
Edited by velo on 04.03.2005 10:46:55
private message
relee
[none yet]
Hi velo,

the bit your missing atm, is teaching Apache to understand PHP. Check the documentation from PHP / Apache for this.

On my installation I had to modify the Apache folder/conf/httpd.conf to be modified so that Apache knows, where his PHP is and how to handle it - for example:
QuoteQuote:
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "F:/Program Files/Apache Group/Apache2/cgi-bin/"
ScriptAlias /php/ "f:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
private message EMail
velo
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Hum...
I found the way for configuring Apache (httpd.conF) and PHP(php.ini), but it still doesn,t work. Here is what I am supposed to change:

APACHE:
- installed in c:\www\apache2\
- version of Apache: 2.0.53
- changes in httpd.conf:
LoadModule php4_module c:/www/php/php4apache2.dll
DirectoryIndex index.html index.html.var index.php
AddType application/x-httpd-php .php #maps file extension .php to PHP
AddType application/x-httpd-php-source .phps #activates PHP syntax coloring
---------------------------------------------
PHP:
- version: 4.3.10
- installed in c:\www\php\
- php.ini-recommended copied in %systemroot% and changed following lines:
doc_root = c:/www/webroot/
extension_dir = c:/www/php/extensions/
session.save_path = c:/www/tmp/
--------------------------------------------
OTHERS:
- copied file php4apache2.dll from c:\www\php\sapi to c:\www\php #php4apache2.dll has to reside under the same directory as php4ts.dll
PHP run-type: Apache 2.0 dynamically loaded SAPI module, php4apache2.dll
-------------------------------------------
CONTENT OF C:/WWW/:
- apache2
- php
- webroot
- tmp
--------------------------
It still doesnt work, and I am really with no idea now....
Edited by velo on 07.03.2005 06:33:01
private message
velo
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
It is solved now,
I downloaded package AppServ (Apache+PHP+phpMyAdmin+MySQL) from linkhttp://www.appservnetwork.com/ , installation is very simple and it works great! :D
private message
BuddyChrist
groupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmastergroupmaster
Good to hear you got it going. Just be sure to update as much/soon as possible (if the package doesn't update for you), like rayden5 said (re: packages).

Cheers,
~BC
private message EMail

Topic: "PHP & MySQL" (page 1 of 1)

1