• Shortcuts : 'n' next unread feed - 'p' previous unread feed • Styles : 1 2

» Publishers, Monetize your RSS feeds with FeedShow:  More infos  (Show/Hide Ads)


Date: Wednesday, 08 Feb 2012 13:07
Hello all!

I'm currently working my way through the above book, and I have come up against a problem when trying to use the example on page 82, introducing how URL query strings behave. I'm using the most up to date, non beta versions of PHP, Apache and MySQL and I have had no other issues with the examples so far, so with that said here we go;

welcome1.html contains the following;
Code:

<!DOCTYPE html PUBLIC "-W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <head>
                <title>PHP and MySQL Training Test</title>
                <meta http-equiv="content-type"
                        content="text/html; charset=utf-8"/>
        </head>
        <body>
                <a href="welcome1.php?name=Kevin">Hi, I&rsquo;m Kevin!</a>
        </body>
</html>

and welcome1.php contains the following;
Code:

<!DOCTYPE html PUBLIC "-W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
        <head>
                <title>PHP and MySQL Training Test</title>
                <meta http-equiv="content-type"
                        content="text/html; charset=utf-8"/>
        </head>
        <body>
                <?php
                        $name = $_GET['name'];
                        echo 'Welcome to our web site, '.name.'!';
                ?>
        </body>
</html>

and when accessing welcome1.html and clicking the link on the page (to go to welcome.php) I get the following;

Code:

Notice: Use of undefined constant name - assumed 'name' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\training\welcome1.php on line 12
Welcome to our web site, name!

I've been looking at this for about an hour now and I expect that it is a very simple mistake but just can't spot.
Any help that anyone could provide would be hugely appreciated.
Cheers
Author: "silentx3ro" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Saturday, 04 Feb 2012 00:41
Is it only mobile jQuery?

:D
Author: "jluce" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Wednesday, 01 Feb 2012 20:06
Author: "nickpeets" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Tuesday, 24 Jan 2012 23:03
The PHP Master book claims significant performance benefits for SplFixedArray over conventional arrays, ranging from 4.3x for large arrays up to 20x for very small ones (p.350).

I've been benchmarking the functions with the intention of using them, but I'm not seeing anywhere near this level of performance enhancement. Indeed for smaller arrays (up to 16 entires) the cycles needed to instantiate the class makes the approach less efficient. Even for larger arrays (32k+ entries) the benefit seems to level out at between 20-40% improvement, rather than the 300-400% claimed.

I'm wondering how the quoted benchmarked figures were compiled. And also whether anybody else has experience of using these functions and has managed to achieve the performance gains suggested.
Author: "kanjimaster" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Friday, 13 Jan 2012 10:45
Chapter 7: Forms, Controls, and Dialogs
page number: 277
Simple Modal Dialog


The Modal Dialog box perfectly works in Mozilla. however doesnot work in crome and safari.. I have played around a lot..but cant get it work.
I have modified the dialog box and used thought out my website... please help me get it done...
Author: "Rabbit6147" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Tuesday, 10 Jan 2012 07:47
I am looking to add this pattern to a db table. I looked at the code but i noticed an observer.php in the codebase, which is basically the same as the event.php but it has some differences. My question is which one is correct? which is will be better to implement. Personally i like the observer.php one more.

Regards
Author: "stephanfx" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Thursday, 05 Jan 2012 11:28
Chapter 2

I have a copy of build your own website the right way" 2nd edition.

I am currently going through chapter 2 and have come across a few issues.
Firstly , the divers pausing in a circle image does not seem to appear on the webapage.
Secondly i have tried to link the 3 web pages. The home page has all the links on which is , Home, about us and contact us. When I click on about us or contact us it takes me to the right page but the links are longer there.
Could someone please assist?

Regards


Sami
Author: "Sami Al-Rawi" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Tuesday, 03 Jan 2012 20:43
Can't get it to work even using the downloaded code.
Using console I can see that gallery object is created and contains the initial values.
Using console, I can see that gallery.init is being called but that is it.
Gallery.trigger is not being called - I know because I embedded a couple console benchmarks like in .mouseout.
One photo appears at the beginning and setting alt text, I can see it is the second photo (1st Darth Fader).
Just before the photo appears there is a flash.

If I remove overflow: hidden from $photos in the style.css then all the photos line up and if I mouse left then the gallery shifts one place to the right. When I mouse right then it shifts back.

(: perplexed
Author: "dbstamps" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Tuesday, 03 Jan 2012 14:59
In the book it refers to installation of WAMPSERVER 2.0, the latest version is 2.2. Generally the installation process is the same for both. Once installed the "homepage" is slightly different with a couple more extensions in the newer version. In the post installation set-up tasks it suggests to assign a root password using mysqladmin, however I do not see how to get to that. I can see mysqladmin.exe in a bin folder inside the mysql folder in wamp, but this does not open as per the instruction. I can see how to get into the mysql (not mysqladmin) command prompt, but this doesnt allow me to change a password or assign a password there either. It also tells me to use mysqladmin -u root status and hit enter but this does not work in the mysql comand window. the instructions do not seem to match the program. I can't see that there should be such a dramatic change, so can someone advise me as to how to get thru this issue?
Author: "KeithAus" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Tuesday, 03 Jan 2012 04:59
In the book, “Build Your Own Database Driven Web Site Using PHP & MySQL”, 4th edition, I've reached page 32 with MySQL, Apache and PHP installed and localhost is well. I'm having difficulty setting a new password to connect to the Mysql server. here is what I'm seeing from page 45-47:


Tony-iMac-Kicks-Ass:~ impetusmedia$ mysqladmin -u root -p password "sax$2u%nessabase"
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Tony-iMac-Kicks-Ass:~ impetusmedia$

What could be my problem? I've reinstalled and configured everything for the third time.

Note: My old installation was with Mamp, I've decide to uninstall that and do the individual installs.
Author: "ImpetusMedia" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Monday, 02 Jan 2012 16:03
I ordered a lot of books from Sitepoint in the past few years, but I only downloaded the PDF versions when I ordered them.

I now have an iPad and would like to know if it is possible to get the .mobi versions as well so that I can take them with me wherever I go.

Sorry if this is in the wrong place.
Author: "averagejoe77" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Sunday, 01 Jan 2012 18:57
Hello I am going through Build Your Own Database Driven Website 4th Edition, Chapter 4, the connection section
I have tried manually tweaking the code but nothing seems to work, I have even downloaded the code archive and moved the 'connection' folder within it to my apache2.2 htdocs folder and tried running it and all I get is the following error -
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 2

I have changed the password section so I do not think that is the error, I have tried using both mysql_connect and mysqli_connect as stated in a previous thread.
I have created a .php document using the code -
PHP Code:

<?php phpinfo(); ?>
and I have included the entire output via a notepad file attached with this thread.

My server is running PHP 5.2.17
I have checked my .ini file and made sure that the mysql extension is enabled

As far as I can see everything is configured corrected and working, but I still can't seem to get past this error message.
I have tried changing the 'localhost' section, again as directed in a previous thread.

I have no idea what to do next, an if I can't resolve this issue I will be unable to connect to my database.

Thank you in advance for any help or tips.
Attached Files
Author: "Valgris" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Saturday, 31 Dec 2011 16:20
Hi, I seem to remember some time ago that a community e-book was available on Sitepoint?

It had bits of information from lots of respectable members in lots of different fields related to web development. I thought it looked like a really good book!

I meant to download it but I was busy, so put it off and now I'm back, I can't find it!

Have I missed out? or is it still available?

Thanks, ro0bear :D
Author: "ro0bear" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Friday, 30 Dec 2011 05:05
Hi, thanks for your help.

I've struck early problems setting up PHP according to the book by Kevin Yank. Firstly I installed (separately as recommended) Apache, MySQL and PHP on my XP PC. Apache looks fine (localhost is OK), so does MySQL. When I run the example 'today.php' Windows has a pop up saying 'Do you want to open or save this file?' - even though I've told Windows to open *.php files with Internet Explorer.

In frustration, I installed WAMP on my other Windows 7 PC - more problems (related?). When I run the 'today.php' example it doesn't return a date from the PHP script (....<?php echo date('l, dS Y.'); ?>...), it's just blank where the date should be. Also, when I run Welcome1.html and click the link 'Hi, I'm Kevin' to open Welcome1.php I just get a blank page, even though the address bar says 'file:///C:/wamp/bin/apache/Apache2.2.21/htdocs/welcome1.php?name=Kevin'.

About 18 months ago I was able to follow the book (on my XP machine) past this early point without any issues (today.php worked OK then) - has Windows blocked something?

Thanks in advance.
Author: "Dom71" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Thursday, 29 Dec 2011 10:32
Hi,

I downloaded the script for the simple shopping cart example uploaded it to my host and it does not display the goods that are contained in the array.

Do the scripts need tweaking in some way so the goods are displayed? The table headers work but no showing of the goods! I do like sitepoint and have referenced the books a lot. I found this php book to be quiet frustrating at times.

Thanks,

Matt.
Author: "matt0161" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Thursday, 29 Dec 2011 03:39
Hi,

Is the $49 epack a copy of the main binder in PDF format?

If not, what's in it?

Further, If I buy the kit, do I have instant downloadable access to the epack?

Terry
Author: "terah" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Wednesday, 28 Dec 2011 21:37
Using Foxpro localhost/C:/program files/apache software foundation/apache2.2/code-archive/chapter4/connect/index.php get this error message:

Forbidden

You don't have permission to access /C:/program files/apache software foundation/apache2.2/code-archive/chapter4/connect/index.php on this server.

If I move the files from the above directory to htdocs, they execute.

What have I done wrong?

Thank you,

Ted
Author: "tedlharman" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Wednesday, 28 Dec 2011 18:07
Hi

I am currently working my way through the fourth edition of 'Build Your Own Database Driven Web Site Using PHP and MySQL' and I'm having a problem with the delete joke example in Chapter four.

The add/list jokes example worked fine. When it suggested attempting the delete joke bit I did so but got the following error:

"HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request."

I decided to give up and go with the exact example in the book, which wasn't a million miles away from my own attempt. Unfortunately I still get the same error.

I'm using a Mac with OS X 10.6.8, PHP 5.3.6, Apache 2.2.20 and mySQL 5.0.8.

Any help is appreciated.

Thanks

Keith
Author: "KeithCrooks" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Monday, 26 Dec 2011 21:19
Hello,

I am just getting started with PHP & MYSQL. I have had MAMP installed for quite a while and have used it to dabble in local development mostly with Wordpress.

Following along with the instructions in the book "Build Your Own Database Driven Web Site Using PHP & MySQL”; I installed MySQL Server. All the terminal commands were reacting as set out in the book.

But.... I am now trying to connect to the MySQL server using the command:

Code:

mysql -u root -p
I enter my password and I keep getting the following error:

Code:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I even went ahead and changed my password (via MAMP) but still no joy.

I am getting the feeling that there might be some kind of conflict between the MAMP program and the newly installed MySQL Server program but I have no idea how to sort this out.

As you can imagine, I am hyped to get started with the coding/programming (:

How do I solve this?

Thank you in advance for your help

KCO
Author: "KCOMela" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Date: Sunday, 25 Dec 2011 17:22
I just bought Build Your Own ASP.Net 4 Web Site Using C# and VB 4th ed.
I downloaded Visual Web Developer and SQL Server Management Studio.
I have a 64 bit machine.
I noticed that Visual Web Developer got put into my Programs (x86) folder and On the other hand I only got the choice to download the 64 bit version of SQL Server Management Studio.

When I tried to run SQL Server Management Studio at the Connect to Server Dialog box I got an error message saying that the server could not be found. Could the problem be caused by what I said in the above information?

Any ideas in any case about what to do?
Author: "jwg" Tags: "Questions About Books"
Send by mail Print  Save  Delicious 
Next page
» You can also retrieve older items : Read
» © All content and copyrights belong to their respective authors.«
» © FeedShow - Online RSS Feeds Reader