[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Apache2, Yii, and Ubuntu permissions and function issues

Posted on 2012-04-09
6
Medium Priority
?
602 Views
Last Modified: 2012-08-04
Hello,

I have setup a machine with Ubuntu 11.10 and installed Apache2, VSFTP,PHP5, MySQL Server, and things seems to work ok during testing with PhpInfo and a simple FTP install of OpenDocMan which connects to the MySQL quite nicely.

My problem comes from trying to use ANY Yii-based app where it tries to go to an Url through index.php.  I may not have permissions set correctly.  I am new at all this.  Also, I ran the enable mod rewrite for Apache2 (at least it says I did)

When I try to click on a link in any of the Yii demos I get something like this:

"Not Found

The requested URL /yii/demos/hangman/index.php/game/guess/J was not found on this server."

Any help with setting this right would be greatly appreciated.
0
Comment
Question by:hydrazi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 10

Assisted Solution

by:pfrancois
pfrancois earned 1000 total points
ID: 37823912
The requested URL doesn't make sense with index.php in the middle of it: in a URL, you have first an (optionnal) domain name, followed by an (optional) path composed by directories and finally a file name (php, html or whatever). After that, you can a add "?" followed by some variables and values, but no more directories.

What is the fragment of PHP code you are trying to execute?

Please give also the output of next statement:
echo "\$_SERVER ['DOCUMENT_ROOT'] = $_SERVER ['DOCUMENT_ROOT']";

Open in new window

and explain in which directory you have your apps.
0
 

Assisted Solution

by:hydrazi
hydrazi earned 0 total points
ID: 37828811
Actually, the index.php with directories after it is some kind of function of the Yii Framework.  I have been able to install and run the apps on external webservers with Urls in this same fashion with no issue.  

Here is one for instance:  http://demo.x2engine.com/index.php/site/login

I made your statement its own PHP file and ran it with this result:
$_SERVER ['DOCUMENT_ROOT'] = Array ['DOCUMENT_ROOT']
0
 
LVL 10

Expert Comment

by:pfrancois
ID: 37829833
I am puzzled with your both answers:

1. Probably the Yii Framework rewrites URL with some Apache module, but I have no knowledge of Yii for understanding what's happening on the backstage.

2. I was expecting another output of the above PHP statement, something like:
$_SERVER ['DOCUMENT_ROOT'] = /var/apache/www/

So, I have no clue on what's going on... Sorry.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:hydrazi
ID: 37865570
Have gotten no answer.... still working on it....
0
 

Accepted Solution

by:
hydrazi earned 0 total points
ID: 38237986
I uninstalled the entirety of the Apache services and then reinstalled them.  Fixed the issue, but still don't know the exact cause.
0
 

Author Closing Comment

by:hydrazi
ID: 38257538
Fixed it myself but appreciate the attempt to help.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question