Solved

Apache2, Yii, and Ubuntu permissions and function issues

Posted on 2012-04-09
6
562 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
  • 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Link SQL table to Webpage 9 39
Determine Who is Runnig my Bash Shell Script 4 22
Linux  Script File Attributes 5 24
nagios 1 12
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
The viewer will learn how to count occurrences of each item in an array.

746 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now