The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

willy (8) [Avatar] Offline
#1
Hello,

I unzipped the example application to my local server.
I manage to login, but when the application loads, an empty dashboard is shown, and firebug gives the following error:

GET http://localhost:8480/example-ExtjsInAction/stats/getYearlyStats?_dc=127737
& response=
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h4>Not Found</h4>

The requested URL /example-ExtjsInAction/stats/getYearlyStats was not found on this server.




<address>Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7d Zend Core/2.6.1 PHP/5.2.6 Server at 127.0.0.1 Port 8000</address>
</body></html>

Do I have to change something in my configuration? (I do not know CI, and my PHP knowledge is limited).

Kind regards,
Willy.
jesus.garcia (463) [Avatar] Offline
#2
Re: Trying to install example application on local system
Was .htaccess in that package?
willy (8) [Avatar] Offline
#3
Re: Trying to install example application on local system
Oops, it wasn't copied over.
I added the .htaccess, but still have the same problem
jesus.garcia (463) [Avatar] Offline
#4
Re: Trying to install example application on local system
Can you enumerate and elaborate on the steps you used to configure this?

What does your Apache, PHP and MySQL stack look like?
willy (8) [Avatar] Offline
#5
Re: Trying to install example application on local system
Hello again,

I'm using zend for System i, which is developed by IBM and Zend. The installation created an apache server, PHP server en MySQL.
(Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7d Zend Core/2.6.1 PHP/5.2.6 Server at 127.0.0.1 Port 8000)

I can access the MySQL database from Extjs using a simple php script that connects to the database and returns a json string.

I do not know CI at all, but maybe there's something wrong in it's configuration?

My url to the example application is http://10.4.0.31:8480/example-ExtjsInAction/

I've tried to change the base_url in config.php of CI, but without success.

Regards, Willy.
jesus.garcia (463) [Avatar] Offline
#6
Re: Trying to install example application on local system
I'm familiar with Zend, though I use Apache + PHP and MySQL.

Something that puzzles me is that you wrote port8000, yet your link has port 8480.


Try this:

Download CI http://codeigniter.com/ and see if you can configure a vanilla instance of that framework's hellow-world page running.

It should be as simple as downloading, configuring the database credentials and visiting your local URL.
willy (8) [Avatar] Offline
#7
Re: Trying to install example application on local system
If I understand it correctly, I'm connecting to the apache server using port 8480 and the apache server connect to the PHP server using port 8000.



I downloaded CI 1.7.2 and installed it under directory "CI-test".

I changed the base_url in the config.php to:

$config['base_url'] = "http://10.4.0.31:8480/CI-test";

When I go to url "http://10.4.0.31:8480/CI-test/", I get the CI welcome page (no more helloworld in v.1.7.2).



Since I installed the example application under directory "example-ExtjsInAction", I changed the base_url in that directory to:

$config['base_url'] = "http://10.4.0.31:8480/example-ExtjsInAction/";

When I go to url "http://10.4.0.31:8480/example-ExtjsInAction/", I get the dashboard, but still the same error message in firebug:

The requested URL /example-ExtjsInAction/stats/getYearlyStats was not found on this server.



What puzzles me is that the base_url in the example application was set to "http://extjsinaction", but the application is called via "http://app.extjsinaction.com".



I have no idea how to proceed from here.
willy (8) [Avatar] Offline
#8
Re: Trying to install example application on local system
Did someone out there manage to install the example for chapters 16&17?
Jetbar (2) [Avatar] Offline
#9
Re: Trying to install example application on local system
i have same problem. i have installed using xampp, in win xp.
When i open: http://localhost/extjsinaction/ , i input any username and password, and can login. In the dashbourd, department and employee, empty value, and when click department, in firebug, show error: 404, page not found like this: http://localhost/extjsinaction/departments/getList?_dc=1318392385387


have any idea?
xiaoyu (1) [Avatar] Offline
#10
Re: Trying to install example application (app.zip) on local system
I got solution for the example ch16-17,
step1, get source from https://github.com/tdgi/ExtJS-in-action-application
step2. config ci config.php set base url
and set database.php to your mysql database.
step3 in the root folder, update .htaccess
======================================================
RewriteEngine on
# exclode these
RewriteCond $1 !^(index.php|userlogin.php|userlogout.php|user_guide|docs|resources|images|ext3|robots.txt)
RewriteRule ^(.*)$ http://Path/to/rootfolder/index.php/$1 [L]
======================================================

to test whether database connection is ok
http://mycloudnas/extjsinaction/index.php/stats/getYearlyStats?_dc=1328995856163

it should return json string...

grt

hope this info. can help you setup the example.
Chendm (1) [Avatar] Offline
#11
Re: Trying to install example application (app.zip) on local system
Just change the php files, replace the content "<?" with "<?php", and then all will be to function correctly.