How to make old code to 2.4 compatible?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How to make old code to 2.4 compatible?

Postby Milty » 09. February 2013 08:52

Hi,

I am trying to teach myself php and MySQL. I am following a book that suggests using XAMPP but the version of XAMPP they use is 1.64 and things have moved on.
My instructions are

"The default place used by Apache (in XAMPP setup) to serve client requests from is C:\xampp\htdocs.
This location is defined by the DocumentRoot directive in the Apache configuration file, which is located in
C:\xampp\apache\conf\httpd.conf.
Because we want to use our folder instead of the default folder mentioned by DocumentRoot, we need to
create an alias named tshirtshop that points to the tshirtshop physical folder you created in Step 1.
Open the Apache configuration file (httpd.conf), find the aliases section (which is defined by the
<IfModule alias_module> configuration tag), and add the following lines:
<IfModule alias_module>
# ...
# Configure the tshirtshop alias
Alias /tshirtshop/ "C:/tshirtshop/"
Alias /tshirtshop "C:/tshirtshop"
</IfModule>
<Directory "C:/tshirtshop">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

</Directory>
After adding these lines and restarting the Apache web server, a request for http://localhost/tshirtshop
or http://localhost/tshirtshop/ will load the application in the tshirtshop folder (once it exists)."

When I do this I get "access forbidden" error message in my browser (Firefox). Having researched a little it seems that the highlighted code has now changed under Apache 2.4. Can anyone have a look at the above and suggest what I need to do to get it working.

Thanks in anticipation
Milty
 
Posts: 2
Joined: 09. February 2013 08:40
Operating System: Windows 7 64bit

Re: How to make old code to 2.4 compatible?

Postby WilliL » 09. February 2013 11:52

Hi Milty,

this part is changed ind Apache 2.4. Have a Look to: http://httpd.apache.org/docs/2.4/upgrading.html
new wiriting "Require ..."

Regards
Willi
WilliL
 
Posts: 661
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: How to make old code to 2.4 compatible?

Postby Altrea » 09. February 2013 13:10

Hi Milty,

Milty wrote:I am trying to teach myself php and MySQL. I am following a book that suggests using XAMPP but the version of XAMPP they use is 1.64 and things have moved on.

Googleing some sentences of your quote results in the Book "Beginning PHP and MySQL E-Commerce: From Novice to Professional". This book is 5 years old and i don't think, that you will find many good things for PHP and even MySQL in it. The PHP world has changed so much, so maybe you should consider to use a different ressource for learning that language.

Just the two cents of an php developer :D

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8293
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: How to make old code to 2.4 compatible?

Postby Milty » 10. February 2013 21:07

cheers guys, impressive googling :-)

Will have a look at amending code with the first suggestion and anyone got any ideas of anything that teaches you PHP and MySQL through a similar project which is up to date?

Cheers peeps, help much appreciated
Milty
 
Posts: 2
Joined: 09. February 2013 08:40
Operating System: Windows 7 64bit

Re: How to make old code to 2.4 compatible?

Postby Altrea » 10. February 2013 21:42

Milty wrote:anyone got any ideas of anything that teaches you PHP and MySQL through a similar project which is up to date?

The only ressource i would recommend without any demur is http://tut.php-quake.net/en/
It covers all the basics but is also very up to date and the parts are based on each other so you got a comfortable learning curve.

Another good site which is partly recommend is http://www.techotopia.com/index.php/PHP_Essentials
but i don't like that they use the old mysql functions instead of mysqli or PDO and don't cover very important topics like covering SQL injections

If you prefer video tutorials take a look at my very favorite http://net.tutsplus.com/
They have many video tutorials but also written ones. For example one of the tutorial is The best way to learn php i can recommend for you.

If you prefer books, i can recommend this one: http://www.amazon.com/PHP-Solutions-Dyn ... s_295223_6
But i don't read much books in english, because english is not my native language.

You are still at the beginning, so if i were you i would take the chance not to waste time with the old mysql functions because they will get removed with PHP 5.6 or PHP 6.
Start learnung OOP right after knowing the fundamentals instead of use procedural programming all the way (maybe again with a tutsplus tutorial http://net.tutsplus.com/tutorials/php/object-oriented-php-for-beginners/). It will make learning OOP much easier. if you start with procedural programming and feel comfortable with it switching to OOP is much more difficult.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8293
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: hthnightwolf and 58 guests