Solved

Apache2, Yii, and Ubuntu permissions and function issues

Posted on 2012-04-09
6
576 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 500 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

738 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