apps directory for symfony missing - php

I got this error when following this tutorial.
Warning: require_once(...\sf_sandbox\apps\frontend\config\config.php) [function.require-once]: failed to open stream: No such file or directory in ...\sf_sandbox\web\index.php on line 8
Why ?

not sure quite why you get the error, but from my (slightly limited) knowledge of french, I think thats quite an old guide. Would suggest you try the jobeet tutorial instead:
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/
Chapter one will leave you with a working symfony install thats good for any project (i generally follow this approach whenever i start a project) - not just the jobeet one. If you are new to symfony, the tutorial is a really good way to get a solid overview of the framework and leaves you ready to do your first project without falling down at every hurdle.

check that the config.php file is actually there ...

Related

valid_children setting for Symfony Sonata / CMF

Continuing on the journey to install the Symfony2 CMF, I am getting the error:
[InvalidArgumentException]
The following document types provided in valid_children are invalid:
Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page
The class names provided could not be loaded.
The following lines causing this error are here in the config.yml file:
sonata_doctrine_phpcr_admin:
document_tree:
/...
Symfony\Cmf\Bundle\SimpleCmsBundle\Doctrine\Phpcr\Page:
valid_children:
- all
/...
I am following the instructions from the docs here:
http://symfony.com/doc/current/cmf/cookbook/creating_cms_using_cmf_and_sonata.html
below Configuration. Is this an error in the docs, or a setting that need to adjust? The docs do not explain what the valid_children parameter is controlling or the possible settings.
What are the possible options for this setting? Any further explanation of what this code is actually doing would be beneficial.
Thanks for trying the CMF tutorials! This documentation was not tested recently (as the warning at the head of the page says). Thanks for pointing out this issue. I updated the tutorial and added some explanation:
The tree is used to know what is allowed in the left side of the admin dashboard, and also for sonata tree widgets. Classes in the tree where not validated at the time this tutorial was written, but are validated now to detect typos explicitly rather than having no clue why things do not show up in the tree. The simple cms is another bundle that can be used with the cmf, but which is not installed in the prerequisite tutorial...
http://symfony.com/doc/current/cmf/cookbook/creating_cms_using_cmf_and_sonata.html will be updated in the next few minutes.
Please open github issues on symfony-cmf-docs if you find further issues with this tutorial or elsehwere in the documentation.

Kohana: server can't find core.php because of naming convention change

I have a project written in Kohana 3. The /system subdirectory is pulled in via a git submodule:
[submodule "system"]
path = system
url = git://github.com/kohana/core.git
After version 3.3 it seems all classes were changed to the first letter being upper-cased. ie core.php is now Core.php. This didn't seem to have any effect locally on my mac but now that I've uploaded my app to hosting provider Fort Rabbit I'm getting an error that it failed to open system/classes/kohana/core.php. I suspect this is because that is now system/classes/kohana/Core.php
Can anyone advise the best way to proceed? Do I need to change every instance of require SYSPATH.'classes/kohana/classname'.EXT; to the uppercase equivalent?
Basically yes. In 3.3 when you call a class, you have to be case sensitive. The same applies to the file names. Migration guide explains this quite well.
You can also check this post to automate the upgrade.

Zend - cannot find loader.php, following tutorial in book but using ZF2 not ZF1

I am following a tutorial in a book, but I've just realised that the book uses ZF1 and I am using ZF2. I don't want to start using ZF1, but I'm struggling to get the tutorial started.
The code:
require_once('Zend/Autoload.php');
Zend_Loader::registerAutoload();
produces the following error:
Warning: require_once(Zend/Autoload.php): failed to open stream: No such file or directory in /Users/me/Sites/phpweb20/htdocs/index.php on line 2
Fatal error: require_once(): Failed opening required 'Zend/Autoload.php' (include_path='.:/Users/me/Sites/phpweb20/include:/Users/me/pear') in /Users/me/Sites/phpweb20/htdocs/index.php on line 2
I've had a trawl around the net but can't find what I should be replacing this with. Can anybody help?
Also, if I continue to follow this tutorial, am I going to be repeatedly getting stuck due to changes in syntax and classes?
Although the frameworks share the same name, ZF2 is vastly different from ZF1. You will undoubtedly run into more problems following resources focusing on ZF1.
ZF2 has now out of beta for many months and the documentation (and a very good tutorial) can be found at: http://framework.zend.com/manual/2.0/en/index.html

Doctrine/ZF z2d2 tutorial issue

I'm sure that I'm missing something, but I've spent all day and I still can't get this skeleton doctrine integration project by Jason Gilmour to work:
github link
It's quite a simple project, but (after configuring in application.ini) I run into difficulty trying to generate the schema:
./scripts/doctrine orm:schema-tool:create
GIVES
PHP Fatal error: Cannot redeclare class Entities\Account in /var/www/z2d2/application/models/Entities/Account.php on line 12
I think it has something to do with namespaces.
I am using php 5.3.6.
Thanks,
Demian.
I downloaded the source from github here and it seems that the author has made a mistake in the file /application/model/entities/Rank.php. This file is just a duplicate of Account.php - hence the error...
Just delete Rank.php and create your own (or even don't)
Apart from this issue, it looks like a great skeleton to implement zend framework with doctrine.
Thanks for the comments those who responded.
D.

Address of yii applications

I a new in Ubuntu and PHP frameworks. I had read the book about Yii name "Agile web application development with yii and php 5".
And this is the part of text:
Yii comes with a simple requirement checking tool. To invoke
the tool and have it verify the requirements for your installation, simply point
your browser to:
http://yourhostname/path/to/yii/requirements/index.php
I installed yii in /var/www/html/yii directory.
When I trying to open http://localhost/var/www/html/yii/requirements/index.php I get error message: Oops! This link appears to be broken.
Thanks for any help!
It depends on what your Apache server's "webroot" (localhost) is.
If your webroot is /var/www/html then el chief's answer would work:
http://localhost/yii/requirements/index.php
But your webroot is /var/www then you need to include the html part too:
http://localhost/html/yii/requirements/index.php
Basically "localhost" = /some/path (your Apache webroot), and when you are writing your URL you can just substitute the two.
So if "localhost" = /var/www instead of writing http://var/www/index.php you just write http://localhost/index.php
I hope this helps you with a higher-level understanding of what is going on.
This might help somebody, even though the question is already answered, since I had come searching here, even though the underlying issue was different.
I made the dumb mistake of extracting the downloaded yii archive into the www directory and accessing it via the http://localhost/yii/ URL, but took a while to realise that the extracted directory has the build#-release#, and once renamed to just "yii", things worked. Like I said, the problem you faced was different, but symptom was somewhat similar.
it should be http://localhost/yii/requirements/index.php
Also be aware that this book, while helpful, seems to have been rushed to publication. There's many fixes to be found on the Yii forums. I suggest you keep a tab open whenever you come across something that doesn't work or doesn't seem "right" in the book.

Categories