Page 1 of 1

PHP Website (Solved)

Posted: Sun Jan 22, 2017 9:24 pm
by nezos
My setup: Debian with Apache

Created a new PHP project, selected the project execution mode "Run project as website".
In the Debug of Project Settings I set the mapping: source: /myfolder/myproject target: /
In General of Project Settings I've set Project URL: mysite (tried also mysite/index.php)

When i run the project I see the default webpage of Apache and not the project's webpage (if i use mysite/index.php i get file not found from apache). Any idea what's wrong?

Additionally: should I run codelite as root? does codelite read apache's configuration files?

Thanks

Re: PHP Website

Posted: Mon Jan 23, 2017 1:56 am
by eranif
when running it from the browser, does it work?

Re: PHP Website

Posted: Mon Jan 23, 2017 4:47 pm
by nezos
I'm sorry I don't think I understand what you mean,

Open the PHP file with the browser? Place it on the var/www/html path of Apache? If you are asking about Apache, it works.

Re: PHP Website

Posted: Mon Jan 23, 2017 5:39 pm
by eranif
I mean, in the project execution dialog, you should write something like:
http://www.mydomain.com/index.php (a full URL)

My question was, when typing this URL in a browser, does it work? i.e. do you get your site or Apache's default page?

Re: PHP Website

Posted: Mon Jan 23, 2017 9:52 pm
by nezos
Outside Codelite, I have apache installed but I haven't changed the default webpage.

From Codelite, if I type the URL without index.php I get the default webpage I get outside of Codelite.

Hope this makes sense.

Re: PHP Website

Posted: Wed Jan 25, 2017 9:32 pm
by nezos
Answer is:

Create a symlink like:

If your project is located at /home/myuser/myproject

and your apache server root directory is /var/www/html

then as root run inside /var/www/html the following:

ln -s /home/myuser/myproject myproject

Then in Codelite use a URL like:

localhost/myproject