|
I am trying to install LAMP in ubuntu
For that
I completed the following steps successfully in the order shown below
1. sudo apt-get install apache2
2. sudo /etc/init.d/apache2 start
3. sudo apt-get install php5 libapache2-mod-php5
4. sudo /etc/init.d/apache2 restart
After the above steps I created a PHP page named test.php in /var/www
The contents of test.php is
<?php
echo "Hello World";
?>
I am 100% sure that there is no syntactical errors in the php code.
But when I access the page using "http://localhost/test.php", the following error showed
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /var/www/test.php on line 2
I don't know what to do at this situation. Please suggest me a solution.
|
|
|
|
|
I just read it was out yesterday and i got it today, at least that's what it looks like. The link is sitting in firefox waiting for me to activate it.I was hit by the 2008 version and it cost me my hard drive, so i know what this one looks like. I'm running kubuntu now and am toying with activating it just to see if linux is as immuned as it claims. Too bad no attachments i got a screen shot. From exp i know any click on that box will activate it. If you get one shut it off with sys monitor. I'm wondering if i'm too late. When i open firefox it's still there, just the one small window opens. I tried chkrootkit and it didn't find it, if you know of a good linux scan tell me. Don't know what a reboot will do yet, i'm waiting, if i can find it i might be able to send it back.
modified on Sunday, November 15, 2009 8:25 AM
|
|
|
|
|
I know the first reaction is no, but I was musing over this and wanted to bounce the idea off of you good people.
First, why would anyone do this?
Well from my work environment, I work for a business that has multiple websites under different domains. For example I will use www.site1.com and www.site2.com. The sites are hosted on seperate servers. Both of these sites have their own product lines that they sell and a third party is hired to do data entry into both sites. All back-office web apps are designed in-house and the third party company can log into each sites product entry page to enter new items and update prices. But doing so requires a seperate login at each site.
Now reading up on moving php session data into a mysql database got me thinking a little additional work may permit multi-site logins. As I understand it a session is tied to a domain, which must be sent in each request for a given browser. In the datbase-based session storage this is stored, along with some other data. If a custom write and read is designed, one could also create a record for each additional domain that would want to share a login using the same session info with the domain info changed for each site.
Doing this of course means the various sites would need access to the same database, but it sounds like it would work to me. I am posting this so maybe those of you that have more experience with custom session solutions in PHP can poke holes in this idea before I start to work on it.
Chris J.
|
|
|
|
|
Hi...
I am building a website with php platform, suppose name is MyPhp.
We have another website which is developed with joomla.
Now I want to use a plugin which is developed in joomla in MyPhp website for search data from joomla database.
Thanks.
PUJA FALDU
|
|
|
|
|
Congratulations! I agree with your assessment that you want to do something. Now, what's the question?
|
|
|
|
|
pujafaldu wrote: Now I want to use a plugin which is developed in joomla
And the joomla forums are where?
|
|
|
|
|
Hi,I am new in PHP.I have installed PHP5.3.0 under IIS 5 and Windows XP.It runs properly.
But whenever I tried to install PHP 5.3.0 under IIS6 and Windows Server 2003,it always throws an error which says "<b>CGI Error:The specified CGI application misbehaved by not returning a complete set of HTTP headers</b>".I have followd the same steps which i did while installing PHP 5.3.0 under IIS 5 and Windows XP.
I searched the web.....did everything they said....but invain.
Can anyone help me?
CC26
|
|
|
|
|
|
I installed php following the steps decribed in this link only.
CC26
|
|
|
|
|
|
Good PHP starter tutorials:
http://www.tizag.com/phpT/[^]
The PHP manual (your top resource):
http://php.net/manual/en/index.php[^]
PHP and MySQL tutorial:
http://www.w3schools.com/PHP/php_mysql_intro.asp[^]
Keep it simple (don't waste time making it look nice if you aren't getting graded on it).
As for the actual building it, your going to have to do your own research. As a general rule, the posters here will only point you in the right direction (especially true of students) and not spell the answer out for you. And I do advise trying to build your own cart rather than following a tutorial - it will give you a good mindset for php development in future.
Best of luck
|
|
|
|
|
thanx mark for the websites
I searched them before, but i have a problem
i don't know how to store the option in the select menu , and how to retrieve them from the database
:S :S 
|
|
|
|
|
How to turn the command as follow into a makefile?
g++ ex1.cc ex3.cc -I /usr/local/include -L /usr/local/lib -lrcs -o ex3
Thanks in advance!
|
|
|
|
|
GNU's an introduction to makefile should get you started. A simple makefile (not tested) for this will look like:
#makedepend flags
DFLAGS =
#Libraries to link
LIBRARYPATH = /usr/local/lib
INCLUDEPATH = /usr/local/include
LIBRARIES = rcs
#Compiler flags
CFLAGS = -Wall
CC = g++
PROG = ex3
#each module will append the source files to here
SRC := ex1.cc ex3.cc
OBJ := $(patsubst %.cc, %.o, $(filter %.cc,$(SRC)))
#linking the program
ex3: $(OBJ)
$(CC) -I$(INCLUDEPATH) -L$(LIBRARYPATH) -o $(PROG) $(OBJ) -l$(LIBRARIES)
%.o:%.cc
$(CC) $(CFLAGS) -c $< -o $@
depend:
makedepend -- $(DFLAGS) -- $(SRC)
.PHONY:clean
clean:
find . -name "*.o" | xargs rm -vf
rm -vf ex3 In reality, you don't have to specify /usr/local/include and /usr/local/lib in the paths. These paths are there in the GCC's search path and it does a search in these paths to find the include files and libraries.
Best wishes,
Navaneeth
|
|
|
|
|
Any Python Gurus online?
If so please help me with the following error. I am the middle of writing a program and every time it runs the Python core crashes. After debugging and stepping through code the following block of code precedes the crash:
x = 16
while x > 0
x = x * x
Whats the error?
lol.......
|
|
|
|
|
Mike Stratton wrote: x = 16
while x > 0
x = x * x
Have you looked carefully at these statements?
|
|
|
|
|
The answer is simple really, I actually purposely created this code while learning python via MIT OpenCourseWare.
This code creates an infinte loop with the number calculations increasing beyond Pythons capabilities very quickly.
I thought it was kind of funny as the code says:
x is equal to 16
If you find that x is greater then 0 then do the following:
redefine x as is equal to 16*16
Second loop:
x is equal to 256
if you find that x is greater then 0 then do the following
redefine x as equalt to 256*256
Third loop:
x is equal to 65536
if you find that x is greater then 0 then do the following
redefine x as equal to 65536 * 65536
A few loops and python cannot compute.
|
|
|
|
|
x = 16
while x > 0:
x = x * x
You were just missing a :
and statements under a while, or for, or if, etc
must be indented
try it now
Mike
|
|
|
|
|
<br />
x = 16<br />
while x > 0 :<br />
x = x * x<br />
Pavan Pareta
|
|
|
|
|
Is this supposed to add some value here?
|
|
|
|
|
The value added is a good laugh.
I am just having fun learning to code.
|
|
|
|
|
And the purpose of posting the question was what?
|
|
|
|
|
post = "function"
while input = 'function?':
print 'That was funny!'
else:
print 'That was Stupid'
|
|
|
|
|
My purpose was to try and find other programmers that share my enthusiasm for learning.
Have a good day.
|
|
|
|
|
This answer is partially correct.
Yes I forget the operative of : when typing this but the real problem is that it creates an infinite loop that causes Pythong to crash.
|
|
|
|