Author Topic: Starting PHP scripting - Setting up a PHP environment  (Read 22666 times)

0 Members and 12 Guests are viewing this topic.

ajmal.josh

  • Guest
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #15 on: August 31, 2012, 02:24:37 pm »
It is very easy to create php environment with WAMP server in windows OS. WAMP stands for Windows Apache MySQL PHP. Install wamp server and test your php applications. But some problem on wamp server are some antiviruses will not allow wamp server to start functioning(eg. ESET) and also if you installed IIS server you need to stop IIS.

Offline Simba

  • Serf
  • *
  • Posts: 47
  • Cookies: 1335
  • programisiai.lt
    • View Profile
    • Programisiai.lt
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #16 on: August 31, 2012, 04:41:19 pm »
I would suggest using EasyPHP . It's portable and easy to modify.

Offline Kondiii

  • /dev/null
  • *
  • Posts: 6
  • Cookies: 0
    • View Profile
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #17 on: September 11, 2012, 04:40:31 pm »
i was wondering what the picture was showing? Since it have been removed and im trying this execelt guide of PHP programming








Kondiii

Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #18 on: September 11, 2012, 05:56:07 pm »
i was wondering what the picture was showing? Since it have been removed and im trying this execelt guide of PHP programming



Kondiii

I am sorry, I dont know how that happend, its been on the EZ server all the time as far as I know :S
I found a new/same pic and updated the original post.
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline Kondiii

  • /dev/null
  • *
  • Posts: 6
  • Cookies: 0
    • View Profile
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #19 on: September 12, 2012, 07:49:46 pm »
sorry to bother again, i noticed the 5.2.0 version is outdated and no longer exist, so tried with 5.4 something, but in the installentions i got lost, since it dont show the same options as 5.2.0 :/

Offline Simba

  • Serf
  • *
  • Posts: 47
  • Cookies: 1335
  • programisiai.lt
    • View Profile
    • Programisiai.lt
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #20 on: September 12, 2012, 09:20:27 pm »
Kondiii, just download easyphp . If you get lost in the apache instalation you surely won't make trough installing mysql/phpmyadmin :)

Offline EmilKXZ

  • Peasant
  • *
  • Posts: 109
  • Cookies: 10
  • likes monies :p
    • View Profile
    • EmilKXZ
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #21 on: September 12, 2012, 11:24:38 pm »
And for when you're a little bit more advanced with PHP, you'll perhaps want to go beyond your own system to a "closer-to-production" environment, so if you want to start coding websites as a professional task, adapting scripts or creating your own CMS from scratch, you'll want for sure to get shared hosting for your needs. Anything cheap will do the job (just make sure is not cheap in quality either). When a client asks you to set up a website, you'll want to be already knowledgeable in cPanel/Plesk/Ferozo.

If you want to get closer to more "hand-made" or "purpose-specific" PHP programming, you'll want a VPS. Now if you want to avoid any incurring costs, since it could be to you just a time-killer, you'll probably want to setup a virtual machine. I personally do that with Ubuntu Server, but many others do recommend CentOS, ArchLinux if you want something really lightweight, etc. I bet you'll find your favorite distro this way.

Offline Kondiii

  • /dev/null
  • *
  • Posts: 6
  • Cookies: 0
    • View Profile
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #22 on: September 13, 2012, 12:52:02 am »
Kondiii, just download easyphp . If you get lost in the apache instalation you surely won't make trough installing mysql/phpmyadmin :)


only got lost because the new PHP 5.4 only have 3 options compared to 5.2.0 that was the problem :D  but there is only 1 way to learn it and thats keep trying to you get it right :P
« Last Edit: September 13, 2012, 01:00:03 am by Kondiii »

Offline Ev0lve

  • NULL
  • Posts: 1
  • Cookies: 0
    • View Profile
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #23 on: October 26, 2013, 08:57:28 am »
Hey I have been having a problem where I cannot find the installer and the re-download will not fix it.  Any advice at all?


Offline ande

  • Owner
  • Titan
  • *
  • Posts: 2664
  • Cookies: 256
    • View Profile
if($statement) { unless(!$statement) { // Very sure } }
https://evilzone.org/?hack=true

Offline Resistor

  • Peasant
  • *
  • Posts: 65
  • Cookies: -10
    • View Profile
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #25 on: February 12, 2014, 07:18:12 am »
Hi, I was wondering if anyone could recommend any good books for studying the LAMP stack and implementing mail servers?

Also, is it better to study each area with a separate book, ie get a book on Apache, a book on MySQL, one on PHP, one on Linux, or is it better to read books that focus on teaching two or more LAMP components simultaneously?

Offline Schalla

  • VIP
  • Peasant
  • *
  • Posts: 81
  • Cookies: 29
    • View Profile
Re: Starting PHP scripting - Setting up a PHP environment
« Reply #26 on: July 02, 2014, 07:39:05 pm »
Hello there,

just to add a few notes, which may be useful:

1. xDebug

xDebug allows you to debug PHP code. It is a PHP extension, which can be used within
CLI but also Apache. You can set breakpoints and watch variables, like used from normal
debuggers when programming e.g. C/C++/Java.

You can define how to connect and so on, I may recommend to use ssh port forwarding
if you want to debug on external server, since xDebug builds by default a listener on port 9000
and only accepts local host requests.

You can find tutorials for NetBeans/Eclipse in the net, if you want to get a little bit more serious
I can only recommend to get PHPStorm from JetBrains, which is still my favorite IDE.

2. Server Enviroment

If you are setting up a server, please remember to harden it.

Some fancy things you may want to consider:

2.1 Server Tokens

By default the ServerTokens are set to Full, when I remember correct.

However:
Quote
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.

I guess you don't want that.

Go to:

/etc/apache2/conf-avaiable/security.conf

And change it to:

ServerTokens Prod

2.2 ServerSignature

Quote
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).

Nope, thanks.

Same file as above:

From:
ServerSignature On

To:
ServerSignature Off

2.3 PHP Info

There is a "neat" feature in the php.ini:

Quote
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header).  It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
; http://php.net/expose-php
 expose_php = Off

Change it to off. It's located in /etc/php5/apache2/php.ini

2.4 Disable Functions

In most cases you don't want to allow exec(); and system(); on your service, disable it using:
Quote
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/disable-functions
disable_functions =

You can enable it using vHosts also.

2.5 Open Basedir

PLEASE enable Open Basedir per virtual host. This denies access from the webserver to the
system, it's such a simple tweak and still isn't done quite often. This just weakens LFI by quite a bit.

-----------------------------------------------------------------------------------------------------------

Resistor:
That guide was quite useful to set up a nice webserver.
https://www.exratione.com/2014/05/a-mailserver-on-ubuntu-1404-postfix-dovecot-mysql/

I hope I could add something useful here.

Best Regards,
Schalla

//EDIT

The WYSWYG Editor fucked up the syntax somehow.
« Last Edit: July 02, 2014, 07:43:20 pm by Schalla »