PHP Error: Call to undefined function session_id()

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
dozment
Posts: 11
Joined: 2013-02-11 17:00

PHP Error: Call to undefined function session_id()

Post by dozment » 2013-03-15 21:21

I apologize in advance for putting what might be a php issue here, but I'm not sure where to go for help. I'm trying to set up a development environment so that I don't accidentally clobber production (speaking from experience, here) using cygwin. I've got cygwin and apache installed. <?php phpinfo(); ?> returns what looks to be valid information.

I published an appgini app to the environment, and when I browsed to it it asked for database info and created the database. Then, when I try to go to the admin page I get a 500 error. This is the error in the apache log.

PHP Fatal error: Call to undefined function session_id() in /srv/www/htdocs/partner/admin/incCommon.php on line 25, referer: http://localhost/partner/

Can someone help me understand where to go next? Why isn't it finding session_id?

Thanks!

dozment
Posts: 11
Joined: 2013-02-11 17:00

Re: PHP Error: Call to undefined function session_id()

Post by dozment » 2013-03-15 22:57

I think this is a problem with my php install in cygwin. I'm not sure how to resolve it, but it's not an appgini error.

Johnk
AppGini Super Hero
AppGini Super Hero
Posts: 68
Joined: 2013-01-09 03:47
Location: Cairns, Australia

Re: PHP Error: Call to undefined function session_id()

Post by Johnk » 2013-03-15 23:52

I'd never heard of cygwin so I looked it up. I'm still confused, but it sounds like it emulates Linux on a windows box. I don't think AppGini is designed to run under Linux, so the problem could be there. I'm only guessing, but I think it would be best to instal WAMP or XAMP under Windows and keep cygwin completely out of the equation..

dozment
Posts: 11
Joined: 2013-02-11 17:00

Re: PHP Error: Call to undefined function session_id()

Post by dozment » 2013-03-16 00:09

Exactly right about Cygwin. It's a linux emulator for Windows. Great tool for things like this.

I'm actually running AppGini on the Windows machine. The idea is to run the php app that it creates on the local machine, too, for testing. That way I tell AppGini to build the app, then refresh my browser and see the changes that I've made.

I've got Apache and MySQL installed. It seems like there is something missing with PHP. AppGini is running fine. And, I expect if I pushed the app to my linux (not cygwin) server it would run fine as well.

Thanks for the feedback.

Dan

dozment
Posts: 11
Joined: 2013-02-11 17:00

Re: PHP Error: Call to undefined function session_id()

Post by dozment » 2013-03-16 03:11

Problem solved! I had a typo in my httpd.conf file. For anyone who is interested I seem to a fully working test environment on my laptop as described above. I followed the instructions detailed here: http://victormiti.umusebo.com/blog/inst ... -on-cygwin

Johnk
AppGini Super Hero
AppGini Super Hero
Posts: 68
Joined: 2013-01-09 03:47
Location: Cairns, Australia

Re: PHP Error: Call to undefined function session_id()

Post by Johnk » 2013-03-16 06:56

Thanks for sharing the problem and the fix. it's essential that people tell us how they fix problems they ask about even if it might be a teeny bit embarrassing. We can all make mistakes and others may venture by with a similar problem. Your fix may be theirs also.

John

Post Reply