2010年10月11日星期一

Re: [fw-server] Access to project from the Internet

Open 10089 for Incoming connections.

On 10/10/2010 04:05 PM, Kuzma wrote:
>
> Hello!
> I'm developing my project locally. Running Zend Server on Windows 7.
> Currently I'm interested in possibility to make an access to my project from
> the Internet.
> My project runs from this URL: http://localhost:10089/
> The router's external address is: http://78.xxx.xx.xxx
> We have network, the router's port forwarding is turned on: outgoing: 10089,
> incoming: 10090.
> If I enter address as http://78.xxx.xx.xxx:10089 I can see my project, bot
> no one else can see it over network.
> If I enter address http://78.xxx.xx.xxx:10090 - I'm getting error that
> specified page Cannot be found.
> All firewalls are turned off. My mate is running Linux with Apache and his
> project is accessible from the Internet from the same network.
>
> Can't figure out what I should change...
> The httpd.conf is:
> [b]
> [code]
> ...
> Listen 80
> ...
> ServerName localhost
>
> Listen 10089
> NameVirtualHost *:10089
> <VirtualHost *:10089>
> DocumentRoot "C:/Program Files/Zend/Apache2/htdocs/cms/public"
> DirectoryIndex index.php
> <Directory "C:/Program Files/Zend/Apache2/htdocs/cms/public">
> Order allow,deny
> Allow from all
> AllowOverride all
> </Directory>
> </VirtualHost>
> [/code]
> [/b]
> Any help would be appreciated!

2010年10月10日星期日

[fw-server] Access to project from the Internet

Hello!
I'm developing my project locally. Running Zend Server on Windows 7.
Currently I'm interested in possibility to make an access to my project from
the Internet.
My project runs from this URL: http://localhost:10089/
The router's external address is: http://78.xxx.xx.xxx
We have network, the router's port forwarding is turned on: outgoing: 10089,
incoming: 10090.
If I enter address as http://78.xxx.xx.xxx:10089 I can see my project, bot
no one else can see it over network.
If I enter address http://78.xxx.xx.xxx:10090 - I'm getting error that
specified page Cannot be found.
All firewalls are turned off. My mate is running Linux with Apache and his
project is accessible from the Internet from the same network.

Can't figure out what I should change...
The httpd.conf is:
[b]
[code]
...
Listen 80
...
ServerName localhost

Listen 10089
NameVirtualHost *:10089
<VirtualHost *:10089>
DocumentRoot "C:/Program Files/Zend/Apache2/htdocs/cms/public"
DirectoryIndex index.php
<Directory "C:/Program Files/Zend/Apache2/htdocs/cms/public">
Order allow,deny
Allow from all
AllowOverride all
</Directory>
</VirtualHost>
[/code]
[/b]
Any help would be appreciated!
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Access-to-project-from-the-Internet-tp2970234p2970234.html
Sent from the Zend Server mailing list archive at Nabble.com.

2010年10月9日星期六

[fw-mvc] Re: Need some explanation on Router_Rewrite

Hi,

Me again, I don't get it, I tried to extend the addDefaults() method :


public function addDefaultRoutes()
{
if (!$this->hasRoute('default')) {
$dispatcher = $this->getFrontController()->getDispatcher();
$request = $this->getFrontController()->getRequest();

require_once 'Zend/Controller/Router/Route/Module.php';
$compat = new Zend_Controller_Router_Route_Module(array(),
$dispatcher, $request);

$this->_localeRoute = new Zend_Controller_Router_Route(
':locale',
array(),
array('locale' => '^([a-z]{2}-[a-z]{2})$')
);

$compat = $this->_localeRoute->chain($compat);

$this->_routes = array_merge(array('default' => $compat),
$this->_routes);
$this->addRoute('locale', $this->_localeRoute);
}

return $this;
}


I'm definitly missing something, i don't understand how the Router_Module
works. What i want to do, is it even possible ? :)


br,
Benjamin.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Need-some-explanation-on-Router-Rewrite-tp2966450p2969494.html
Sent from the Zend MVC mailing list archive at Nabble.com.

2010年10月7日星期四

[fw-mvc] Need some explanation on Router_Rewrite

Hi,

I try to automate the routes chaining when adding a locale into the URL.

Rather than iterate over all the routes for chaining locale route with each
route, i try to extend the Router_Rewrite to do it dynamically when a new
route is added.

My Rewrite class :

http://pastie.org/1204905

Into bootstrap:
protected function _initRoutes()
{
$this->bootstrap('FrontController');
$frontController = $this->getResource('FrontController');
$frontController->setRouter('Tight_Controller_Router_Rewrite');
}

All routes works well except for default routes.

e.g. if i try to reach "http://www.my-website.com/en-us/", i've got an error
with no direct relation with routes :

0: Plugin by name 'Excerpt' was not found in the registry; used paths:
App_View_Helper_: App/View/Helper/ Tight_View_Helper_: Tight/View/Helper/
Zend_View_Helper_:
Zend/View/Helper/;\helpers/;F:/PHPServer/Zend/Apache2/htdocs/my-website/app/web/front/views\helpers/


But if i try to reach "http://www.my-website.com/en-us/index/index", it
works well :)


I think the problem comes from the default route definition, i don't know
why exactly, and that's why i need you, but i feel i'm wrong here maybe
because of the initialisation order, or because the request is empty at this
time :p

Any thoughts ?


Thanks.

br,
Benjamin.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Need-some-explanation-on-Router-Rewrite-tp2966450p2966450.html
Sent from the Zend MVC mailing list archive at Nabble.com.

2010年10月3日星期日

Re: [fw-mvc] safe mod and zend_cache

On 29 Sep 2010, at 21:08, Matthew Weier O'Phinney wrote:

> -- sina miandashti <miandashti@gmail.com> wrote
> (on Wednesday, 29 September 2010, 11:28 PM +0330):
>> safe mod in my server is preventing zend_cache from caching it shows this
>> exception :
>>
>> *Could not determine temp directory, please specify a cache_dir manually*
>> *
>> *
>> i talked to my webhost manager and he said they cant turn the safe mod off
>>
>>
>> what can i do?
>>
>> zend_cache not works with safemod?
>
> It can work with safe_mode fine -- but you need to tell Zend_Cache to
> use a directory within your application tree. Use the "cache_dir"
> backend option for the File backend to specify the directory.

Also, be aware that you get the same message if the application can't read or write to the specified cache_dir. Took me ages to work that out on Friday :)

Regards,

Rob...

[fw-mvc] New resource types and modules based application

Hello,

When adding new resource types, we have to add them into all modules
bootstrap.

It would be nice to add them only once and that ZF automatically resolves
for modules namespaces. Just like the default resource types.

e.g:
Application's bootstrap :
[code]
protected function _initAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => dirname(__FILE__),
));

$autoloader->addResourceType('repository', 'repositories',
'Repository');

return $autoloader;
}
[/code]

Then:

application/
modules/
backend/
repositories/
Test.php

repositories/
Test.php


[code]
new Repository_Test(); // OK
new Backend_Repository_Test(); // Fatal error
[/code]

I also have to add the resource type into "Backend" module's bootstrap :
[code]
protected function _initAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Backend_',
'basePath' => dirname(__FILE__)
));

$autoloader->addResourceType('repository', 'repositories',
'Repository');

return $autoloader;
}
[/code]

That's not very convenient :)

Thanks.

BR,
Benjamin.
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/New-resource-types-and-modules-based-application-tp2953049p2953049.html
Sent from the Zend MVC mailing list archive at Nabble.com.

2010年10月2日星期六

[fw-mvc] zend_recaptcha not showing in firefox

hi

my zend_recaptcha not showing in firefox
but shows in Chromiom or IE

http://www.invisionpower.ir/account/register

--
________________
Sincerely
Sina Miandashti
MuSicBasE.ir & InvisionPower.ir Admin