Toon posts:

Elementaire PHP vraag: Waar begin je nou als je P

Pagina: 1
Acties:
  • 168 views sinds 30-01-2008

Verwijderd

Topicstarter
OK, deze vraag is een beetje van het niveau: hoe bouw ik een website, maar HTML & Javascript ken ik al (zelfs een beetje JAVA)
Hier wordt de laatste tijd veel over gevraagd, maar ik snap er ff geen kont van.
Ik weet dat ik hier, hier en hier 'hele duidelijke' tutorialen kan vinden over de combi PHP/MySQL, maar deze slaan naar mijn mening een stap over. Zij gaan ervan uit dat je een server wilt draaien voor i-net.
Ik wil gewoon thuis een beetje kunnen oefenen met het MySQL/PHP gebeuren.

MySQL heb ik aan de praat (select*from table01 werkt :) )
PHP lukt ook
Hoe zorg ik ervoor dat ik onderstaande in mijn browser kan bekijken: (het gebruikt alleen php/html, zover ben ik. Het is al opgeslagen als *.php3)

<html><body>
<?php echo "Als hier iets staat ben ik blij!"; ?>
</body></html>

welke proggies moet ik draaien om ECHT een DB te gaan draaien om te oefenen, naast PHP & MySQL?
Apache?
Verder geloof ik wel dat het feitelijke doen van queries uit een MySQL DB met PHP niet zo moeilijk is.

Oh ja, ik gebruik Win98

Verwijderd

Je zal toch echt een webserver moeten draaien (zoals idd bv. Apache) om je pagina's met een browser te bekijken....desnoods kan je die server instellen dat'ie alleen connecties vanaf localhost aanneemt...

De HTML moet namelijk geparsed worden (verwerkt worden zeg maar), en voor zover ik weet kan dat alleen met een webserver...

  • Config
  • Registratie: Januari 2000
  • Laatst online: 06-01-2025
Apache ja, de beste webserver. En dan ben je klaar :)

Verwijderd

Topicstarter
Apache is up and running! (ik zie bij [url="http://localhost"]http://localhost[/url] het Apache verhaal)

dat ging vrij vlot.
het volgende heb ik aan mijn httpd.conf veranderd:

ServerName [url="http://mijnserver"]http://mijnserver[/url]

ScriptAlias /php3/ "c:/"
AddType application/x-httpd-php3 .php3
Action application/x-httpd-php3 "/php3/php.exe"


maar waar gooi ik nou die *.php3 bestanden in? Als ik ze in htdocs zet werkt het niet. (het parsen lukt niet)

moet ik nog meer veranderen aan mijn httpd.conf?

Verwijderd

Waar staat je php.exe precies?
in c:\ (dus c:\php.exe, want zo staat het er nu) of in c:\php3\php.exe?

In het geval van dat laatste moet je even deze regel toevoegen:

Alias /php3/ "C:\php3\"

ipv dat ScriptAlias regeltje.
ScriptAlias wordt gebruikt om je cgi-bin directory aan te wijzen. Maar dat heb je hier niet nodig...

Suc6

Verwijderd

Topicstarter
The Daan mucios gracas
nu ben ik een stuk verder, maar ik krijg een 403 Forbidden
Forbidden
You don't have permission to access /php3/php.exe/phptest.php3 on this server.
phptest.php3 bevat exact het stukje script uit mijn eerste posting. Het staat in D:\APACHE\HTDOCS
Wat nu?

Verwijderd

Je moet even je 'DocumentRoot' op c:\apache\htdocs zetten, en dan je php files in/onder htdocs zetten.

Wat ik wel vreemd vind is dat die php3 file in htdocs staat, maar dat apache zegt dat'ie in c:\php3\php.exe\... staat.

pleur je httpd.conf eens hier neer..kan ik er wat beter over oordelen.

Verwijderd

Topicstarter
ik heb voor de duidelijkheid Apache ff opnieuw geinstalleerd en dit keer op c:\apache
in die dir staat nu het testbestandje test.php3

Het wordt wel een lange post zo, maar hier komt'ie, mijn httpd.conf:


#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://www.apache.org/docs/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# After this file is processed, the server will look for and process
# C:/Apache/conf/srm.conf and then C:/Apache/conf/access.conf
# unless you have overridden these with ResourceConfig and/or
# AccessConfig directives here.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/usr/local/apache" will be interpreted by the
# server as "/usr/local/apache/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default. It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerType is either inetd, or standalone. Inetd mode is only supported on
# Unix platforms.
#
ServerType standalone

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "C:/Apache"

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile logs/httpd.pid

#
# ScoreBoardFile: File used to store internal process information.
# Not all architectures require this. But if yours does (you'll know because
# this file will be created when you run Apache) then you *must* ensure that
# no two invocations of Apache share the same scoreboard file.
#
ScoreBoardFile logs/apache_status

#
# In the standard configuration, the server will process httpd.conf,
# srm.conf, and access.conf in that order. The latter two files are
# now distributed empty, as it is recommended that all directives
# be kept in a single file for simplicity. The commented-out values
# below are the built-in defaults. You can have the server ignore
# these files altogether by using "/dev/null" (for Unix) or
# "nul" (for Win32) for the arguments to the directives.
#
#ResourceConfig conf/srm.conf
#AccessConfig conf/access.conf

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We reccomend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

#
# Apache on Win32 always creates one child process to handle requests. If it
# dies, another child process is created automatically. Within the child
# process multiple threads handle incoming requests. The next two
# directives control the behaviour of the threads and processes.
#

#
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies. The child will exit so
# as to avoid problems after prolonged use when Apache (and maybe the
# libraries it uses) leak memory or other resources. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries. For Win32, set this value to zero (unlimited)
# unless advised otherwise.
#
MaxRequestsPerChild 0

#
# Number of concurrent threads (i.e., requests) the server will allow.
# Set this value according to the responsiveness of the server (more
# requests active at once means they're all handled more slowly) and
# the amount of system resources you'll allow the server to consume.
#
ThreadsPerChild 50

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
#Listen 3000
#Listen 12.34.56.78:80

#
# BindAddress: You can support virtual hosts with this option. This directive
# is used to tell the server which IP address to listen to. It can either
# contain "*", an IP address, or a fully qualified Internet domain name.
# See also the <VirtualHost> and Listen directives.
#
#BindAddress *

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Please read the file README.DSO in the Apache 1.3 distribution for more
# details about the DSO mechanism and run `apache -l' for the list of already
# built-in (statically linked and thus always available) modules in your Apache
# binary.
#
# Note: The order in which modules are loaded is important. Don't change
# the order below without expert advice.
#
#LoadModule anon_auth_module modules/ApacheModuleAuthAnon.dll
#LoadModule cern_meta_module modules/ApacheModuleCERNMeta.dll
#LoadModule digest_module modules/ApacheModuleDigest.dll
#LoadModule expires_module modules/ApacheModuleExpires.dll
#LoadModule headers_module modules/ApacheModuleHeaders.dll
#LoadModule proxy_module modules/ApacheModuleProxy.dll
#LoadModule rewrite_module modules/ApacheModuleRewrite.dll
#LoadModule speling_module modules/ApacheModuleSpeling.dll
#LoadModule status_module modules/ApacheModuleStatus.dll
#LoadModule usertrack_module modules/ApacheModuleUserTrack.dll

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any r

Verwijderd

kunnen wij geen txt bestand maken -> uploaden --> linkje leggen :)

Verwijderd

Topicstarter
Bart de Webdesigner->
ja dat kan ik wel, maar dit is toch ook wel goed te lezen? Ik vind zwart (Arial) op paars (hier) fijner lezen dan die lompe weergave in Notepad (waar zelfs CTRL-F niet werkt, als je wat zoekt)
zo'n plain stukkie tekst neemt net zo veel (net zo weinig) kilobytes in als tig van die UBB smileys die mensen hier weleens posten.

Maar het is errug veel om te scrollen, geef ik toe.

Anywayz....
heb jij als webdiesainer misschien raad voor mijn Apache probleem?

Verwijderd

ik heb ook ff apache geprobeerd maar ben dan maar overgeschakeld op de IIS die in win2k zit, daar had ik geen (= weinig) problemen mee en heb mysql,php4 en IIS (= www, ftp en smtp) op 2 dagen geinstalleerd met 0 ervaring in ook maar 1 van de drie

Verwijderd

sorry voor mijn kutnaam :)

maar bart was bezet en van bart-n was ik wachtwoord kwijt duszzz... :)

maar is niet zo er ghoor

Verwijderd

over dat ctrl -f

gebruik windows 2000

notepad met ctrl-f, s, o

:)

dat is toch waarom iedereen naar windows 2000 gaat.......niet ? ;)

  • TheKHing
  • Registratie: November 2001
  • Laatst online: 04-01 11:00
Op woensdag 15 maart 2000 21:37 schreef bartwebdesign het volgende:
over dat ctrl -f<P>gebruik windows 2000<P>notepad met ctrl-f, s, o<P> [url="http://i/s/smile.gif"][afbeelding][/url]<P>dat is toch waarom iedereen naar windows 2000 gaat.......niet ? [url="http://i/s/wink.gif"][afbeelding][/url]
Bij notepad in win 98 moet je toch gewoon F3 drukken of op Zoeken klikken :?

http://www.thekhing.cjb.net - zet iets in het gastenboek, is leuk!


Verwijderd

Je moet een DOEL hebben.

Als ik iets wil leren lukt me dat alleen als ik een concreet doel heb. Ga bijvoorbeeld een nieuws-script maken of een forum of een Online-Winkeltje of weet ik veel wat, maar zorg ervoor dat er iets is dat je wil maken. Dan vind je altijd informatie/tutorials/voorbeeldjes waarme je je doel kan bereiken :9 Is zo met een heleboel dingen... (Bij mij ook met 3D Studio MAX) Toen ik een Wiel wilde maken voor mijn auto, had ik daar kennis voor nodig, en die heb ik nu aan het einde van het Wiel :9

Groetjes en Suc6 :D

  • Pelle
  • Registratie: Januari 2001
  • Laatst online: 14:56

Pelle

🚴‍♂️

Op woensdag 09 januari 2002 00:24 schreef TheKHing het volgende:
Bij notepad in win 98 moet je toch gewoon F3 drukken of op Zoeken klikken :?
Doed, dit topic is bijna 2 jaar oud. En ik geloof niet dat het zin heeft om met deze opmerking de discussie weer nieuw leven in te blazen.

  • ACM
  • Registratie: Januari 2000
  • Niet online

ACM

Software Architect

Werkt hier

pelle sais it all
Pagina: 1

Dit topic is gesloten.