Solved

Apache2, Yii, and Ubuntu permissions and function issues

Posted on 2012-04-09
6
565 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
datetime in sql 6 24
How can I echo a PHP variable in AJAX function? 7 30
Method for submitting dynamically created rows 20 16
Linux VM 6 36
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

911 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

20 Experts available now in Live!

Get 1:1 Help Now